@xenide-io/the-old-ui-theme 0.10.0 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/dist/{Chip-DKT-82Lf.d.mts → Chip-Dw2g2t8D.d.mts} +14 -2
  2. package/dist/{Chip-DKT-82Lf.d.ts → Chip-Dw2g2t8D.d.ts} +14 -2
  3. package/dist/{chunk-LHE4ROON.mjs → chunk-RIPGN6FG.mjs} +412 -61
  4. package/dist/index.d.mts +3 -2
  5. package/dist/index.d.ts +3 -2
  6. package/dist/index.js +355 -23
  7. package/dist/index.mjs +11 -3
  8. package/dist/suite-analytics--Mf1RZbw.d.mts +29 -0
  9. package/dist/suite-analytics--Mf1RZbw.d.ts +29 -0
  10. package/dist/suite.d.mts +14 -4
  11. package/dist/suite.d.ts +14 -4
  12. package/dist/suite.js +920 -513
  13. package/dist/suite.mjs +898 -523
  14. package/dist/ui.d.mts +2 -2
  15. package/dist/ui.d.ts +2 -2
  16. package/dist/ui.js +401 -66
  17. package/dist/ui.mjs +3 -1
  18. package/package.json +1 -1
  19. package/src/app/globals.css +57 -1
  20. package/src/components/ui/BrandSpinner.tsx +256 -0
  21. package/src/components/ui/CodeBlock.tsx +11 -1
  22. package/src/components/ui/Marketing.tsx +17 -1
  23. package/src/components/ui/SettingsLayout.tsx +4 -0
  24. package/src/components/ui/Table.tsx +32 -9
  25. package/src/components/ui/brand-spinner.test.tsx +62 -0
  26. package/src/components/ui/index.ts +7 -0
  27. package/src/components/ui/table.test.tsx +31 -4
  28. package/src/styles/suite-skin.css +78 -46
  29. package/src/suite/components/ai-draft-editor.tsx +184 -0
  30. package/src/suite/components/ai-panel-workflows.test.tsx +179 -0
  31. package/src/suite/components/ai-panel.tsx +184 -14
  32. package/src/suite/components/app-switcher.tsx +13 -0
  33. package/src/suite/components/command-palette-host.tsx +20 -2
  34. package/src/suite/components/suite-notification-bell.tsx +23 -2
  35. package/src/suite/components/suite-notification-settings.tsx +11 -0
  36. package/src/suite/components/suite-settings-layout.tsx +1 -1
  37. package/src/suite/components/suite-settings-mobile-nav.tsx +5 -1
  38. package/src/suite/components/suite-sidebar.tsx +2 -2
  39. package/src/suite/components/theme-provider.tsx +2 -0
  40. package/src/suite/components/today-ui.tsx +33 -28
  41. package/src/suite/index.ts +8 -0
  42. package/src/suite/lib/suite-notifications.tsx +5 -0
package/dist/suite.js CHANGED
@@ -106,7 +106,7 @@ function SuiteAiMarkdownMessage({
106
106
  markdown,
107
107
  animate = false
108
108
  }) {
109
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "suite-ai-markdown", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
109
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "suite-ai-markdown", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
110
110
  import_react_markdown.default,
111
111
  {
112
112
  remarkPlugins: [import_remark_gfm.default],
@@ -116,14 +116,14 @@ function SuiteAiMarkdownMessage({
116
116
  }
117
117
  ) });
118
118
  }
119
- var import_react_markdown, import_remark_gfm, import_jsx_runtime32, WORD_STEP_MS, MAX_DELAY_MS, SKIP_TAGS;
119
+ var import_react_markdown, import_remark_gfm, import_jsx_runtime33, WORD_STEP_MS, MAX_DELAY_MS, SKIP_TAGS;
120
120
  var init_ai_message_markdown = __esm({
121
121
  "src/suite/components/ai-message-markdown.tsx"() {
122
122
  "use strict";
123
123
  "use client";
124
124
  import_react_markdown = __toESM(require("react-markdown"));
125
125
  import_remark_gfm = __toESM(require("remark-gfm"));
126
- import_jsx_runtime32 = require("react/jsx-runtime");
126
+ import_jsx_runtime33 = require("react/jsx-runtime");
127
127
  WORD_STEP_MS = 18;
128
128
  MAX_DELAY_MS = 600;
129
129
  SKIP_TAGS = /* @__PURE__ */ new Set(["code", "pre", "style", "script"]);
@@ -147,6 +147,7 @@ __export(suite_exports, {
147
147
  SIDEBAR_MAX_WIDTH: () => SIDEBAR_MAX_WIDTH,
148
148
  SIDEBAR_MIN_EXPANDED_WIDTH: () => SIDEBAR_MIN_EXPANDED_WIDTH,
149
149
  SIDEBAR_RAIL_WIDTH: () => SIDEBAR_RAIL_WIDTH,
150
+ SUITE_ANALYTICS_EVENT: () => SUITE_ANALYTICS_EVENT,
150
151
  SUITE_APPS: () => SUITE_APPS2,
151
152
  SUITE_APP_MAP: () => SUITE_APP_MAP,
152
153
  SUITE_ASK_AI_OPEN_KEY: () => SUITE_ASK_AI_OPEN_KEY,
@@ -161,6 +162,7 @@ __export(suite_exports, {
161
162
  SUITE_SPRINGS: () => SUITE_SPRINGS,
162
163
  SUITE_THEME_COOKIE: () => SUITE_THEME_COOKIE,
163
164
  SourceAppGlyph: () => SourceAppGlyph,
165
+ SuiteAiDraftEditor: () => SuiteAiDraftEditor,
164
166
  SuiteAiPanel: () => SuiteAiPanel,
165
167
  SuiteAppIcon: () => SuiteAppIcon,
166
168
  SuiteAppLayout: () => SuiteAppLayout,
@@ -229,9 +231,12 @@ __export(suite_exports, {
229
231
  resolveSuiteNotificationHref: () => resolveSuiteNotificationHref,
230
232
  sidebarColumnWidth: () => sidebarColumnWidth,
231
233
  sourceToSuiteApp: () => sourceToSuiteApp,
234
+ subscribeSuiteAnalytics: () => subscribeSuiteAnalytics,
235
+ suiteAiDraftFields: () => suiteAiDraftFields,
232
236
  suiteAppBaseUrl: () => suiteAppBaseUrl,
233
237
  suiteAppLabel: () => suiteAppLabel,
234
238
  suiteThemeBootScript: () => suiteThemeBootScript,
239
+ trackSuiteEvent: () => trackSuiteEvent,
235
240
  useIdleMount: () => useIdleMount,
236
241
  useSidebarWidth: () => useSidebarWidth,
237
242
  useSuiteNotifications: () => useSuiteNotifications,
@@ -835,21 +840,25 @@ function getTodayGreeting(user, stats) {
835
840
  function TodayHero({
836
841
  message = "Take a nice, deep breath.",
837
842
  brief,
838
- briefMeta
843
+ briefMeta,
844
+ action
839
845
  }) {
840
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "mt-4 sm:mt-6", children: [
841
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
842
- "p",
843
- {
844
- className: "today-hero max-w-2xl font-display text-lg font-semibold tracking-tight text-ph-ink sm:text-xl sm:leading-snug",
845
- children: message
846
- },
847
- typeof message === "string" ? message : "hero"
848
- ),
849
- brief ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "mt-4 max-w-2xl", "data-test": "today-focus-brief", children: [
850
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: "text-[15px] leading-[1.65] text-ph-ink", children: brief }),
851
- briefMeta ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: "mt-1.5 text-xs text-ph-mutedtext", children: briefMeta }) : null
852
- ] }) : null
846
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex min-w-0 flex-col gap-5 border-b border-ph-border-subtle pb-6 sm:flex-row sm:items-center sm:justify-between", children: [
847
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "min-w-0 flex-1", children: [
848
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
849
+ "p",
850
+ {
851
+ className: "today-hero max-w-2xl font-display text-lg font-semibold tracking-tight text-ph-ink sm:text-xl",
852
+ children: message
853
+ },
854
+ typeof message === "string" ? message : "hero"
855
+ ),
856
+ brief ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "mt-2 max-w-xl", "data-test": "today-focus-brief", children: [
857
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: "text-sm leading-relaxed text-ph-subtle", children: brief }),
858
+ briefMeta ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: "mt-1.5 text-xs text-ph-mutedtext", children: briefMeta }) : null
859
+ ] }) : null
860
+ ] }),
861
+ action ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "w-full shrink-0 sm:w-72", children: action }) : null
853
862
  ] });
854
863
  }
855
864
  function TodayPrimaryAction({
@@ -922,16 +931,16 @@ function TodayEmptyAction({
922
931
  return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
923
932
  "div",
924
933
  {
925
- className: "rounded-[var(--ph-radius-surface)] border border-dashed border-ph-border/80 bg-[var(--ph-surface-inset)] px-4 py-4 text-center",
934
+ className: "rounded-[var(--ph-radius-surface)] border border-ph-border-subtle bg-ph-surface px-5 py-6 text-left",
926
935
  "data-test": dataTest,
927
936
  children: [
928
937
  /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: "text-sm font-semibold text-ph-ink", children: title }),
929
- description ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: "mx-auto mt-1 max-w-sm text-xs leading-relaxed text-ph-subtle sm:text-sm", children: description }) : null,
938
+ description ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: "mt-1.5 max-w-md text-sm leading-relaxed text-ph-subtle", children: description }) : null,
930
939
  actionLabel2 && (href || onClick) ? href ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
931
940
  "a",
932
941
  {
933
942
  href,
934
- className: "mt-2.5 inline-flex text-sm font-semibold text-ph-brand hover:underline",
943
+ className: "ph-btn ph-btn-link mt-3 text-sm",
935
944
  children: actionLabel2
936
945
  }
937
946
  ) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
@@ -939,7 +948,7 @@ function TodayEmptyAction({
939
948
  {
940
949
  type: "button",
941
950
  onClick,
942
- className: "mt-2.5 inline-flex text-sm font-semibold text-ph-brand hover:underline",
951
+ className: "ph-btn ph-btn-link mt-3 text-sm",
943
952
  children: actionLabel2
944
953
  }
945
954
  ) : null
@@ -960,9 +969,9 @@ function TodayLayout({
960
969
  "data-test": "today-layout",
961
970
  children: [
962
971
  primary ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "max-w-md", children: primary }) : null,
963
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "grid gap-6 lg:grid-cols-[minmax(0,1fr)_minmax(16rem,20rem)] lg:items-start lg:gap-8", children: [
972
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: cn("grid gap-8 lg:items-start", aside && "lg:grid-cols-[minmax(0,1fr)_minmax(15rem,19rem)]"), children: [
964
973
  /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "min-w-0 space-y-8", children: main }),
965
- aside ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("aside", { className: "space-y-3 lg:sticky lg:top-6 lg:self-start", children: aside }) : null
974
+ aside ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("aside", { className: "min-w-0 space-y-5", children: aside }) : null
966
975
  ] })
967
976
  ]
968
977
  }
@@ -1024,21 +1033,21 @@ function TodaySection({
1024
1033
  testId,
1025
1034
  children
1026
1035
  }) {
1027
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("section", { "data-test": testId, className: "space-y-5", children: [
1036
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("section", { "data-test": testId, className: "space-y-4", children: [
1028
1037
  /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex items-start justify-between gap-4", children: [
1029
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex min-w-0 items-start gap-3.5", children: [
1038
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex min-w-0 items-start gap-3", children: [
1030
1039
  /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1031
1040
  "span",
1032
1041
  {
1033
1042
  className: cn(
1034
- "inline-flex h-10 w-10 sm:h-11 sm:w-11 shrink-0 items-center justify-center rounded-[var(--ph-radius-surface)] border border-ph-border/70 shadow-[var(--ph-shadow-control)]",
1043
+ "inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-[var(--ph-radius-control)]",
1035
1044
  iconClassName != null ? iconClassName : "bg-ph-muted text-ph-ink"
1036
1045
  ),
1037
- children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Icon, { className: "h-5 w-5", "aria-hidden": true })
1046
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Icon, { className: "h-4 w-4", "aria-hidden": true })
1038
1047
  }
1039
1048
  ),
1040
1049
  /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "min-w-0 pt-0.5", children: [
1041
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("h2", { className: "font-display text-lg font-bold tracking-tight text-ph-ink", children: title }),
1050
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("h2", { className: "font-display text-lg font-semibold tracking-tight text-ph-ink", children: title }),
1042
1051
  description ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: "mt-1 max-w-xl text-sm leading-relaxed text-ph-subtle", children: description }) : null
1043
1052
  ] })
1044
1053
  ] }),
@@ -1055,7 +1064,7 @@ function TodayPanel({
1055
1064
  "div",
1056
1065
  {
1057
1066
  className: cn(
1058
- "rounded-[var(--ph-radius-surface)] border border-ph-border/70 bg-ph-surface p-5 sm:p-5",
1067
+ "today-panel rounded-[var(--ph-radius-surface)] border border-ph-border-subtle bg-ph-surface p-5",
1059
1068
  className
1060
1069
  ),
1061
1070
  children
@@ -1076,6 +1085,36 @@ function TodayEmptyState({
1076
1085
  var import_image = __toESM(require("next/image"));
1077
1086
  var import_react = require("react");
1078
1087
  var import_iconoir_react2 = require("iconoir-react");
1088
+
1089
+ // src/lib/suite-analytics.ts
1090
+ var SUITE_ANALYTICS_EVENT = "shellstack:analytics";
1091
+ function trackSuiteEvent(event, properties) {
1092
+ if (typeof window === "undefined" || !event) return;
1093
+ try {
1094
+ window.dispatchEvent(
1095
+ new CustomEvent(SUITE_ANALYTICS_EVENT, {
1096
+ detail: { event, properties }
1097
+ })
1098
+ );
1099
+ } catch (e) {
1100
+ }
1101
+ }
1102
+ function subscribeSuiteAnalytics(handler) {
1103
+ if (typeof window === "undefined") return () => {
1104
+ };
1105
+ const listener = (raw) => {
1106
+ const detail = raw.detail;
1107
+ if (!(detail == null ? void 0 : detail.event)) return;
1108
+ try {
1109
+ handler(detail.event, detail.properties);
1110
+ } catch (e) {
1111
+ }
1112
+ };
1113
+ window.addEventListener(SUITE_ANALYTICS_EVENT, listener);
1114
+ return () => window.removeEventListener(SUITE_ANALYTICS_EVENT, listener);
1115
+ }
1116
+
1117
+ // src/suite/components/app-switcher.tsx
1079
1118
  var import_jsx_runtime5 = require("react/jsx-runtime");
1080
1119
  function appSwitcherTriggerClass(open, collapsed = false) {
1081
1120
  return cn(
@@ -1200,6 +1239,12 @@ function AppSwitcher({
1200
1239
  onMouseDown: (e) => e.preventDefault(),
1201
1240
  onClick: () => {
1202
1241
  setOpen(false);
1242
+ trackSuiteEvent("App Launched", {
1243
+ target_app: app.slug,
1244
+ from_app: currentApp,
1245
+ new_tab: false,
1246
+ origin: "app_switcher"
1247
+ });
1203
1248
  onSelect(app);
1204
1249
  },
1205
1250
  className: cn(appSwitcherMenuItemClass(), "pr-11"),
@@ -1230,6 +1275,12 @@ function AppSwitcher({
1230
1275
  onMouseDown: (e) => e.preventDefault(),
1231
1276
  onClick: () => {
1232
1277
  setOpen(false);
1278
+ trackSuiteEvent("App Launched", {
1279
+ target_app: app.slug,
1280
+ from_app: currentApp,
1281
+ new_tab: true,
1282
+ origin: "app_switcher"
1283
+ });
1233
1284
  onSelect(app, { newTab: true });
1234
1285
  },
1235
1286
  className: "absolute right-1.5 top-1/2 z-[1] flex h-8 -translate-y-1/2 justify-center p-0 text-ph-mutedtext",
@@ -1477,6 +1528,10 @@ function SuiteNotificationsProvider({
1477
1528
  suiteAppBaseUrl("shellstack")
1478
1529
  );
1479
1530
  launchUrl.searchParams.set("next", path);
1531
+ trackSuiteEvent("Cross-App Switch", {
1532
+ target_app: sourceApp,
1533
+ success: true
1534
+ });
1480
1535
  window.location.assign(launchUrl.toString());
1481
1536
  return;
1482
1537
  }
@@ -1549,7 +1604,14 @@ function SuiteNotificationBell({
1549
1604
  const [open, setOpen] = (0, import_react3.useState)(false);
1550
1605
  const onOpenChange = (next) => {
1551
1606
  setOpen(next);
1552
- if (next) refresh();
1607
+ if (next) {
1608
+ trackSuiteEvent("UI Opened", {
1609
+ view: "notification_bell",
1610
+ kind: "notifications",
1611
+ unread_count: unread
1612
+ });
1613
+ refresh();
1614
+ }
1553
1615
  };
1554
1616
  return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
1555
1617
  DropdownMenu2,
@@ -1574,7 +1636,13 @@ function SuiteNotificationBell({
1574
1636
  type: "button",
1575
1637
  id: `${dataTest}-mark-all`,
1576
1638
  "data-test": `${dataTest}-mark-all`,
1577
- onClick: markAllRead,
1639
+ onClick: () => {
1640
+ trackSuiteEvent("Notification Read", {
1641
+ operation: "all",
1642
+ count: unread
1643
+ });
1644
+ markAllRead();
1645
+ },
1578
1646
  className: "ph-btn ph-btn-link ph-btn-xs text-xs",
1579
1647
  children: "Mark all read"
1580
1648
  }
@@ -1587,6 +1655,13 @@ function SuiteNotificationBell({
1587
1655
  "data-test": `${dataTest}-item-${n.id}`,
1588
1656
  onClick: () => {
1589
1657
  setOpen(false);
1658
+ trackSuiteEvent("Notification Read", {
1659
+ operation: "read",
1660
+ notification_id: n.id,
1661
+ kind: n.kind,
1662
+ source_app: n.source_app,
1663
+ unread: !n.read_at
1664
+ });
1590
1665
  select(n);
1591
1666
  },
1592
1667
  className: "ph-dropdown-item flex w-full flex-col items-stretch gap-0.5 px-3 py-2 text-left",
@@ -3312,6 +3387,10 @@ function SuiteNotificationSettings({
3312
3387
  try {
3313
3388
  await controller.enable();
3314
3389
  await refresh();
3390
+ trackSuiteEvent("Push Notifications Configured", {
3391
+ enabled: true,
3392
+ permission: typeof Notification !== "undefined" ? Notification.permission : "unknown"
3393
+ });
3315
3394
  } catch (err) {
3316
3395
  setError(
3317
3396
  err instanceof Error ? err.message : "Could not enable notifications."
@@ -3327,6 +3406,10 @@ function SuiteNotificationSettings({
3327
3406
  try {
3328
3407
  await controller.disable();
3329
3408
  await refresh();
3409
+ trackSuiteEvent("Push Notifications Configured", {
3410
+ enabled: false,
3411
+ permission: typeof Notification !== "undefined" ? Notification.permission : "unknown"
3412
+ });
3330
3413
  } catch (err) {
3331
3414
  setError(
3332
3415
  err instanceof Error ? err.message : "Could not disable notifications."
@@ -3423,6 +3506,18 @@ function CommandPaletteHost({
3423
3506
  commandPalette: CommandPalette
3424
3507
  }) {
3425
3508
  const [open, setOpen] = (0, import_react16.useState)(false);
3509
+ const trackedItems = (0, import_react16.useMemo)(
3510
+ () => items.map((item) => __spreadProps(__spreadValues({}, item), {
3511
+ onSelect: () => {
3512
+ trackSuiteEvent("Command Palette Action", {
3513
+ action_kind: "command",
3514
+ target: item.id
3515
+ });
3516
+ item.onSelect();
3517
+ }
3518
+ })),
3519
+ [items]
3520
+ );
3426
3521
  (0, import_react16.useEffect)(() => {
3427
3522
  const onKey = (e) => {
3428
3523
  if (!((e.metaKey || e.ctrlKey) && e.key.toLowerCase() === "k")) return;
@@ -3437,7 +3532,7 @@ function CommandPaletteHost({
3437
3532
  return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3438
3533
  CommandPalette,
3439
3534
  {
3440
- items,
3535
+ items: trackedItems,
3441
3536
  isOpen: open,
3442
3537
  onClose: () => setOpen(false),
3443
3538
  placeholder,
@@ -3905,7 +4000,7 @@ function SuiteSettingsLayout({
3905
4000
  "aside",
3906
4001
  {
3907
4002
  "aria-label": "Settings",
3908
- className: "suite-settings-sidebar hidden w-56 shrink-0 lg:block lg:self-stretch lg:overflow-y-auto lg:overscroll-contain",
4003
+ className: "suite-settings-sidebar hidden w-56 shrink-0 lg:block lg:self-start lg:max-h-full lg:overflow-y-auto lg:overscroll-contain",
3909
4004
  children: sidebar
3910
4005
  }
3911
4006
  ),
@@ -4413,6 +4508,7 @@ function SuiteThemeProvider({
4413
4508
  }
4414
4509
  writeSharedTheme(next);
4415
4510
  broadcastTheme(next);
4511
+ trackSuiteEvent("Theme Updated", { theme: next, scope: "suite" });
4416
4512
  },
4417
4513
  [config]
4418
4514
  );
@@ -4447,7 +4543,182 @@ function suiteThemeBootScript(options) {
4447
4543
  // src/suite/components/ai-panel.tsx
4448
4544
  var import_react21 = require("react");
4449
4545
  var import_iconoir_react9 = require("iconoir-react");
4450
- var import_jsx_runtime33 = require("react/jsx-runtime");
4546
+
4547
+ // src/suite/components/ai-draft-editor.tsx
4548
+ var import_jsx_runtime32 = require("react/jsx-runtime");
4549
+ var EDITABLE_FIELDS = {
4550
+ propose_project_handover: ["title", "body"],
4551
+ propose_requirement_update: ["description"],
4552
+ propose_source_tasks: ["tasks"],
4553
+ propose_source_task_update: ["description"],
4554
+ propose_knowledge_pack: ["title", "body", "tasks"],
4555
+ propose_document_update: ["body"]
4556
+ };
4557
+ function suiteAiDraftFields(kind, payload) {
4558
+ const fields = EDITABLE_FIELDS[kind];
4559
+ return fields && payload ? Object.fromEntries(
4560
+ fields.map((key) => {
4561
+ var _a2;
4562
+ return [key, (_a2 = payload[key]) != null ? _a2 : key === "tasks" ? [] : ""];
4563
+ })
4564
+ ) : null;
4565
+ }
4566
+ function SuiteAiDraftEditor({
4567
+ kind,
4568
+ draft,
4569
+ canAddTasks,
4570
+ onChange
4571
+ }) {
4572
+ const change = (key, value) => onChange(__spreadProps(__spreadValues({}, draft), { [key]: value }));
4573
+ const tasks = Array.isArray(draft.tasks) ? draft.tasks : [];
4574
+ const editTask = (index, key, value) => change(
4575
+ "tasks",
4576
+ tasks.map((task, i) => i === index ? __spreadProps(__spreadValues({}, task), { [key]: value }) : task)
4577
+ );
4578
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
4579
+ "div",
4580
+ {
4581
+ className: "mt-3 space-y-3 rounded-lg border border-ph-border bg-ph-canvas p-3",
4582
+ "data-test": "ai-draft-editor",
4583
+ children: [
4584
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { className: "text-xs text-ph-mutedtext", children: "Edit draft content. Source evidence, versions and destination remain protected." }),
4585
+ Object.entries(draft).filter(([key]) => key !== "tasks").map(([key, value]) => /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("label", { className: "block space-y-1 text-sm", children: [
4586
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "font-medium", children: key === "title" ? "Title" : "Proposed content" }),
4587
+ key === "title" ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
4588
+ "input",
4589
+ {
4590
+ className: "ph-input min-h-11 w-full",
4591
+ value: String(value),
4592
+ maxLength: 255,
4593
+ onChange: (event) => change(key, event.target.value)
4594
+ }
4595
+ ) : /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
4596
+ "textarea",
4597
+ {
4598
+ className: "ph-input min-h-40 w-full",
4599
+ value: String(value),
4600
+ maxLength: kind === "propose_project_handover" ? 16e3 : 12e3,
4601
+ onChange: (event) => change(key, event.target.value)
4602
+ }
4603
+ )
4604
+ ] }, key)),
4605
+ "tasks" in draft ? /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "space-y-3", children: [
4606
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { className: "text-sm font-medium", children: "Task drafts" }),
4607
+ tasks.map((task, index) => {
4608
+ var _a2, _b, _c, _d;
4609
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
4610
+ "fieldset",
4611
+ {
4612
+ className: "space-y-2 rounded border border-ph-border p-2",
4613
+ children: [
4614
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("legend", { className: "px-1 text-xs", children: [
4615
+ "Task ",
4616
+ index + 1
4617
+ ] }),
4618
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("label", { className: "block text-sm", children: [
4619
+ "Title",
4620
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
4621
+ "input",
4622
+ {
4623
+ className: "ph-input min-h-11 w-full",
4624
+ value: String((_a2 = task.title) != null ? _a2 : ""),
4625
+ maxLength: 255,
4626
+ onChange: (event) => editTask(index, "title", event.target.value)
4627
+ }
4628
+ )
4629
+ ] }),
4630
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("label", { className: "block text-sm", children: [
4631
+ "Description",
4632
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
4633
+ "textarea",
4634
+ {
4635
+ className: "ph-input min-h-24 w-full",
4636
+ value: String((_b = task.description) != null ? _b : ""),
4637
+ maxLength: 1e4,
4638
+ onChange: (event) => editTask(index, "description", event.target.value)
4639
+ }
4640
+ )
4641
+ ] }),
4642
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex flex-wrap gap-2", children: [
4643
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("label", { className: "text-sm", children: [
4644
+ "Due date",
4645
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
4646
+ "input",
4647
+ {
4648
+ type: "date",
4649
+ className: "ph-input min-h-11 block",
4650
+ value: String((_c = task.due_date) != null ? _c : ""),
4651
+ onChange: (event) => editTask(index, "due_date", event.target.value || null)
4652
+ }
4653
+ )
4654
+ ] }),
4655
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("label", { className: "text-sm", children: [
4656
+ "Priority",
4657
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
4658
+ "select",
4659
+ {
4660
+ className: "ph-input min-h-11 block",
4661
+ value: String((_d = task.priority) != null ? _d : "low"),
4662
+ onChange: (event) => editTask(index, "priority", event.target.value),
4663
+ children: ["low", "medium", "high", "urgent"].map((value) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("option", { children: value }, value))
4664
+ }
4665
+ )
4666
+ ] })
4667
+ ] }),
4668
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("label", { className: "flex min-h-11 items-center gap-2 text-sm", children: [
4669
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
4670
+ "input",
4671
+ {
4672
+ type: "checkbox",
4673
+ checked: Boolean(task.assign_me),
4674
+ onChange: (event) => editTask(index, "assign_me", event.target.checked)
4675
+ }
4676
+ ),
4677
+ "Assign to me"
4678
+ ] }),
4679
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
4680
+ "button",
4681
+ {
4682
+ type: "button",
4683
+ className: "ph-btn ph-btn-secondary ph-btn-xs",
4684
+ disabled: kind === "propose_source_tasks" && tasks.length === 1,
4685
+ onClick: () => change(
4686
+ "tasks",
4687
+ tasks.filter((_, i) => i !== index)
4688
+ ),
4689
+ children: "Remove draft"
4690
+ }
4691
+ )
4692
+ ]
4693
+ },
4694
+ index
4695
+ );
4696
+ }),
4697
+ canAddTasks && tasks.length < 5 ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
4698
+ "button",
4699
+ {
4700
+ type: "button",
4701
+ className: "ph-btn ph-btn-secondary ph-btn-sm",
4702
+ onClick: () => change("tasks", [
4703
+ ...tasks,
4704
+ {
4705
+ title: "",
4706
+ description: "",
4707
+ priority: "low",
4708
+ assign_me: false
4709
+ }
4710
+ ]),
4711
+ children: "Add task draft"
4712
+ }
4713
+ ) : null
4714
+ ] }) : null
4715
+ ]
4716
+ }
4717
+ );
4718
+ }
4719
+
4720
+ // src/suite/components/ai-panel.tsx
4721
+ var import_jsx_runtime34 = require("react/jsx-runtime");
4451
4722
  var SuiteAiMarkdownMessage2 = (0, import_react21.lazy)(() => Promise.resolve().then(() => (init_ai_message_markdown(), ai_message_markdown_exports)));
4452
4723
  var SUITE_OPEN_ASK_AI_EVENT = "shellstack:open-ask-ai";
4453
4724
  var SUITE_ASK_AI_OPEN_KEY = "shellstack:shelly-open";
@@ -4538,6 +4809,7 @@ function SuiteAiPanel({
4538
4809
  const inputId = (0, import_react21.useId)();
4539
4810
  const [uncontrolledOpen, setUncontrolledOpen] = (0, import_react21.useState)(false);
4540
4811
  const [resolvingId, setResolvingId] = (0, import_react21.useState)("");
4812
+ const [actionDrafts, setActionDrafts] = (0, import_react21.useState)({});
4541
4813
  const open = openProp != null ? openProp : uncontrolledOpen;
4542
4814
  const setOpen = (0, import_react21.useCallback)(
4543
4815
  (next) => {
@@ -4575,6 +4847,11 @@ function SuiteAiPanel({
4575
4847
  window.addEventListener(SUITE_OPEN_ASK_AI_EVENT, onOpen);
4576
4848
  return () => window.removeEventListener(SUITE_OPEN_ASK_AI_EVENT, onOpen);
4577
4849
  }, [setOpen]);
4850
+ (0, import_react21.useEffect)(() => {
4851
+ if (!open) return;
4852
+ trackSuiteEvent("AI Chat Opened", { origin: "suite_panel" });
4853
+ trackSuiteEvent("UI Opened", { view: "ai_panel" });
4854
+ }, [open]);
4578
4855
  const scrollToBottom = (0, import_react21.useCallback)((behavior = "auto") => {
4579
4856
  const el = scrollerRef.current;
4580
4857
  if (!el) return;
@@ -4650,6 +4927,13 @@ function SuiteAiPanel({
4650
4927
  setPrompt("");
4651
4928
  setAtBottom(true);
4652
4929
  setMessages((prev) => [...prev, { role: "user", content: trimmed }]);
4930
+ trackSuiteEvent("AI Message Sent", {
4931
+ prompt_length: trimmed.length,
4932
+ page_path: typeof window !== "undefined" ? window.location.pathname : void 0,
4933
+ is_preset: presets.some((preset) => preset.prompt === trimmed),
4934
+ is_edit: false,
4935
+ has_attachment: false
4936
+ });
4653
4937
  try {
4654
4938
  const result = await sendMessage({
4655
4939
  prompt: trimmed,
@@ -4683,6 +4967,7 @@ function SuiteAiPanel({
4683
4967
  }
4684
4968
  function stop() {
4685
4969
  var _a2;
4970
+ trackSuiteEvent("AI Message Cancelled");
4686
4971
  (_a2 = abortRef.current) == null ? void 0 : _a2.abort();
4687
4972
  abortRef.current = null;
4688
4973
  setLoading(false);
@@ -4708,6 +4993,13 @@ function SuiteAiPanel({
4708
4993
  setError("");
4709
4994
  setAtBottom(true);
4710
4995
  setMessages((prev) => prev.slice(0, index));
4996
+ trackSuiteEvent("AI Message Sent", {
4997
+ prompt_length: trimmed.length,
4998
+ page_path: typeof window !== "undefined" ? window.location.pathname : void 0,
4999
+ is_preset: false,
5000
+ is_edit: true,
5001
+ has_attachment: false
5002
+ });
4711
5003
  const controller = new AbortController();
4712
5004
  abortRef.current = controller;
4713
5005
  setLoading(true);
@@ -4754,21 +5046,31 @@ function SuiteAiPanel({
4754
5046
  await clearChat();
4755
5047
  setMessages([]);
4756
5048
  setError("");
5049
+ trackSuiteEvent("AI Chat Cleared", {
5050
+ page_path: typeof window !== "undefined" ? window.location.pathname : void 0
5051
+ });
4757
5052
  } catch (err) {
4758
5053
  setError(
4759
5054
  err instanceof Error ? err.message : "Could not clear this chat."
4760
5055
  );
4761
5056
  }
4762
5057
  }
4763
- async function handleResolve(actionId, decision) {
4764
- var _a2;
5058
+ async function handleResolve(action, decision) {
5059
+ var _a2, _b;
4765
5060
  if (!resolveAction || resolvingId) return;
5061
+ const actionId = action.id;
4766
5062
  setResolvingId(actionId);
4767
5063
  setError("");
4768
5064
  try {
4769
- const result = await resolveAction(actionId, decision);
5065
+ const edits = decision === "confirm" ? actionDrafts[actionId] : void 0;
5066
+ const result = edits ? await resolveAction(actionId, decision, edits) : await resolveAction(actionId, decision);
4770
5067
  const nextMessages = (_a2 = result.messages) != null ? _a2 : [];
4771
5068
  setMessages(nextMessages);
5069
+ trackSuiteEvent("AI Action Resolved", {
5070
+ decision,
5071
+ action_kind: action.kind,
5072
+ destructive: Boolean((_b = action.payload) == null ? void 0 : _b.destructive)
5073
+ });
4772
5074
  notifySuiteMutated(
4773
5075
  nextMessages.flatMap((message) => {
4774
5076
  var _a3;
@@ -4816,16 +5118,35 @@ function SuiteAiPanel({
4816
5118
  -1
4817
5119
  );
4818
5120
  const Icon = BrandIcon != null ? BrandIcon : import_iconoir_react9.Sparks;
4819
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
5121
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
4820
5122
  "aside",
4821
5123
  {
4822
5124
  className: "flex h-full min-h-0 flex-col bg-ph-canvas",
4823
5125
  "data-test": "suite-ask-ai-panel",
4824
5126
  "aria-label": title,
4825
5127
  children: [
4826
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("header", { className: "flex items-center gap-2 px-2 pb-2", children: [
4827
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("h2", { className: "sr-only", children: title }),
4828
- messages.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
5128
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("header", { className: "flex items-center gap-2 px-2 pb-2", children: [
5129
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("h2", { className: "sr-only", children: title }),
5130
+ presets.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("details", { className: "relative", "data-test": "ask-ai-workflows", children: [
5131
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("summary", { className: "ph-btn ph-btn-secondary ph-btn-sm min-h-10 cursor-pointer list-none", children: "Workflows" }),
5132
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "absolute left-0 top-full z-30 mt-1 max-h-80 w-64 overflow-auto rounded-lg border border-ph-border bg-ph-surface p-1 shadow-lg", children: presets.map((preset) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
5133
+ "button",
5134
+ {
5135
+ type: "button",
5136
+ disabled: waiting || hydrating,
5137
+ className: "flex min-h-10 w-full items-center rounded px-3 py-2 text-left text-sm hover:bg-ph-muted focus-visible:outline focus-visible:outline-2 disabled:opacity-50",
5138
+ onClick: (event) => {
5139
+ var _a2, _b;
5140
+ setPrompt(preset.prompt);
5141
+ (_a2 = event.currentTarget.closest("details")) == null ? void 0 : _a2.removeAttribute("open");
5142
+ (_b = textareaRef.current) == null ? void 0 : _b.focus();
5143
+ },
5144
+ children: preset.label
5145
+ },
5146
+ preset.label
5147
+ )) })
5148
+ ] }) : null,
5149
+ messages.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
4829
5150
  "button",
4830
5151
  {
4831
5152
  type: "button",
@@ -4834,14 +5155,14 @@ function SuiteAiPanel({
4834
5155
  className: "ph-btn ph-btn-ghost ph-btn-sm ml-auto h-9 text-xs text-ph-subtle",
4835
5156
  "data-test": "ask-ai-clear",
4836
5157
  children: [
4837
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_iconoir_react9.Erase, { className: "h-3.5 w-3.5" }),
5158
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_iconoir_react9.Erase, { className: "h-3.5 w-3.5" }),
4838
5159
  "Clear"
4839
5160
  ]
4840
5161
  }
4841
5162
  ) : null
4842
5163
  ] }),
4843
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "relative min-h-0 flex-1", children: [
4844
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
5164
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "relative min-h-0 flex-1", children: [
5165
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
4845
5166
  "div",
4846
5167
  {
4847
5168
  ref: scrollerRef,
@@ -4852,15 +5173,15 @@ function SuiteAiPanel({
4852
5173
  "aria-label": "Conversation",
4853
5174
  className: "suite-scroll-lock h-full space-y-5 overflow-y-auto px-2 py-3",
4854
5175
  children: [
4855
- hydrating && messages.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex items-center gap-2 text-sm text-ph-subtle", children: [
4856
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Spinner, { className: "h-4 w-4 animate-spin" }),
5176
+ hydrating && messages.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex items-center gap-2 text-sm text-ph-subtle", children: [
5177
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Spinner, { className: "h-4 w-4 animate-spin" }),
4857
5178
  "Loading your chat\u2026"
4858
5179
  ] }) : null,
4859
- !hydrating && messages.length === 0 && !error ? /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "mx-auto mt-4 flex max-w-sm flex-col items-center px-1 text-center", children: [
4860
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "flex h-10 w-10 items-center justify-center rounded-[var(--ph-radius-surface)] bg-ph-brand/10 text-ph-brand", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Icon, { className: "h-5 w-5" }) }),
4861
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "mt-3 font-display text-base font-semibold text-ph-ink", children: "How can I help?" }),
4862
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "mt-1 text-sm leading-relaxed text-ph-subtle", children: emptyState }),
4863
- presets.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "mt-4 flex w-full flex-col gap-2", children: presets.map((preset) => /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
5180
+ !hydrating && messages.length === 0 && !error ? /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "mx-auto mt-4 flex max-w-sm flex-col items-center px-1 text-center", children: [
5181
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "flex h-10 w-10 items-center justify-center rounded-[var(--ph-radius-surface)] bg-ph-brand/10 text-ph-brand", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Icon, { className: "h-5 w-5" }) }),
5182
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: "mt-3 font-display text-base font-semibold text-ph-ink", children: "How can I help?" }),
5183
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: "mt-1 text-sm leading-relaxed text-ph-subtle", children: emptyState }),
5184
+ presets.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "mt-4 flex w-full flex-col gap-2", children: presets.map((preset) => /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
4864
5185
  "button",
4865
5186
  {
4866
5187
  type: "button",
@@ -4868,9 +5189,9 @@ function SuiteAiPanel({
4868
5189
  disabled: waiting || hydrating,
4869
5190
  className: "group flex w-full items-center gap-2 rounded-[var(--ph-radius-surface)] border border-ph-border bg-ph-surface px-3 py-2 text-left text-sm text-ph-ink transition-[background-color,border-color,box-shadow] hover:border-[var(--ph-selected-border)] hover:bg-[var(--ph-surface-hover)] focus-visible:outline-none focus-visible:shadow-[var(--ph-focus-halo)] disabled:opacity-40",
4870
5191
  children: [
4871
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_iconoir_react9.Sparks, { className: "h-4 w-4 shrink-0 text-ph-brand" }),
4872
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "min-w-0 flex-1 truncate", children: preset.label }),
4873
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_iconoir_react9.ArrowUp, { className: "h-3.5 w-3.5 shrink-0 rotate-45 text-ph-mutedtext transition-transform group-hover:translate-x-0.5" })
5192
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_iconoir_react9.Sparks, { className: "h-4 w-4 shrink-0 text-ph-brand" }),
5193
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "min-w-0 flex-1 truncate", children: preset.label }),
5194
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_iconoir_react9.ArrowUp, { className: "h-3.5 w-3.5 shrink-0 rotate-45 text-ph-mutedtext transition-transform group-hover:translate-x-0.5" })
4874
5195
  ]
4875
5196
  },
4876
5197
  preset.label
@@ -4881,13 +5202,13 @@ function SuiteAiPanel({
4881
5202
  const isUser = message.role === "user";
4882
5203
  if (isUser) {
4883
5204
  if (editingIndex === index) {
4884
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5205
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
4885
5206
  "div",
4886
5207
  {
4887
5208
  className: "suite-msg-in suite-msg-in--user flex justify-end",
4888
5209
  "data-test": "ask-ai-user",
4889
- children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "w-full max-w-[85%] space-y-2", children: [
4890
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5210
+ children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "w-full max-w-[85%] space-y-2", children: [
5211
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
4891
5212
  "textarea",
4892
5213
  {
4893
5214
  autoFocus: true,
@@ -4908,8 +5229,8 @@ function SuiteAiPanel({
4908
5229
  className: "w-full resize-none rounded-2xl rounded-br-md border border-ph-border bg-ph-surface px-3 py-2 text-sm leading-relaxed text-ph-ink outline-none focus-visible:border-[var(--ph-selected-border)] focus-visible:shadow-[var(--ph-focus-halo)]"
4909
5230
  }
4910
5231
  ),
4911
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex justify-end gap-2", children: [
4912
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5232
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex justify-end gap-2", children: [
5233
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
4913
5234
  "button",
4914
5235
  {
4915
5236
  type: "button",
@@ -4921,7 +5242,7 @@ function SuiteAiPanel({
4921
5242
  children: "Cancel"
4922
5243
  }
4923
5244
  ),
4924
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5245
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
4925
5246
  "button",
4926
5247
  {
4927
5248
  type: "button",
@@ -4938,14 +5259,14 @@ function SuiteAiPanel({
4938
5259
  `user-${index}`
4939
5260
  );
4940
5261
  }
4941
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5262
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
4942
5263
  "div",
4943
5264
  {
4944
5265
  className: "suite-msg-in suite-msg-in--user flex justify-end",
4945
5266
  "data-test": "ask-ai-user",
4946
- children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "group flex items-end gap-1.5", children: [
4947
- !waiting ? /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "mb-0.5 flex items-center gap-0.5 opacity-100 transition-opacity [@media(hover:hover)]:opacity-0 [@media(hover:hover)]:group-focus-within:opacity-100 [@media(hover:hover)]:group-hover:opacity-100", children: [
4948
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5267
+ children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "group flex items-end gap-1.5", children: [
5268
+ !waiting ? /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "mb-0.5 flex items-center gap-0.5 opacity-100 transition-opacity [@media(hover:hover)]:opacity-0 [@media(hover:hover)]:group-focus-within:opacity-100 [@media(hover:hover)]:group-hover:opacity-100", children: [
5269
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
4949
5270
  "button",
4950
5271
  {
4951
5272
  type: "button",
@@ -4953,10 +5274,10 @@ function SuiteAiPanel({
4953
5274
  "aria-label": copiedIndex === index ? "Copied" : "Copy message",
4954
5275
  "data-test": "ask-ai-copy",
4955
5276
  className: "ph-btn ph-btn-ghost ph-btn-square ph-btn-xs h-7 w-7 text-ph-mutedtext",
4956
- children: copiedIndex === index ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_iconoir_react9.Check, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_iconoir_react9.Copy, { className: "h-3.5 w-3.5" })
5277
+ children: copiedIndex === index ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_iconoir_react9.Check, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_iconoir_react9.Copy, { className: "h-3.5 w-3.5" })
4957
5278
  }
4958
5279
  ),
4959
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5280
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
4960
5281
  "button",
4961
5282
  {
4962
5283
  type: "button",
@@ -4967,41 +5288,41 @@ function SuiteAiPanel({
4967
5288
  "aria-label": "Edit message",
4968
5289
  "data-test": "ask-ai-edit",
4969
5290
  className: "ph-btn ph-btn-ghost ph-btn-square ph-btn-xs h-7 w-7 text-ph-mutedtext",
4970
- children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_iconoir_react9.EditPencil, { className: "h-3.5 w-3.5" })
5291
+ children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_iconoir_react9.EditPencil, { className: "h-3.5 w-3.5" })
4971
5292
  }
4972
5293
  )
4973
5294
  ] }) : null,
4974
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "w-fit max-w-[85%] whitespace-pre-wrap break-words rounded-2xl rounded-br-md bg-ph-brand px-3 py-2 text-sm leading-relaxed text-[var(--ph-on-accent)] [overflow-wrap:anywhere]", children: message.content })
5295
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "w-fit max-w-[85%] whitespace-pre-wrap break-words rounded-2xl rounded-br-md bg-ph-brand px-3 py-2 text-sm leading-relaxed text-[var(--ph-on-accent)] [overflow-wrap:anywhere]", children: message.content })
4975
5296
  ] })
4976
5297
  },
4977
5298
  `user-${index}`
4978
5299
  );
4979
5300
  }
4980
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
5301
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
4981
5302
  "div",
4982
5303
  {
4983
5304
  className: "flex items-end gap-2",
4984
5305
  "data-test": "ask-ai-assistant",
4985
5306
  children: [
4986
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5307
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
4987
5308
  "span",
4988
5309
  {
4989
5310
  className: "suite-msg-avatar mb-0.5 flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-ph-brand/10 text-ph-brand",
4990
5311
  "aria-hidden": true,
4991
- children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Icon, { className: "h-3.5 w-3.5" })
5312
+ children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Icon, { className: "h-3.5 w-3.5" })
4992
5313
  }
4993
5314
  ),
4994
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "suite-msg-bubble min-w-0 max-w-[85%] space-y-2", children: [
4995
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "rounded-2xl rounded-bl-md bg-ph-muted px-3 py-2 text-sm leading-relaxed text-ph-ink", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5315
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "suite-msg-bubble min-w-0 max-w-[85%] space-y-2", children: [
5316
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "rounded-2xl rounded-bl-md bg-ph-muted px-3 py-2 text-sm leading-relaxed text-ph-ink", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
4996
5317
  import_react21.Suspense,
4997
5318
  {
4998
5319
  fallback: (
4999
5320
  // The chunk is pre-warmed above, so this only shows on a
5000
5321
  // cold cache. Keep it invisible — a skeleton here reads
5001
5322
  // as if it were part of the answer.
5002
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "sr-only", role: "status", children: "Rendering response\u2026" })
5323
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "sr-only", role: "status", children: "Rendering response\u2026" })
5003
5324
  ),
5004
- children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5325
+ children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
5005
5326
  SuiteAiMarkdownMessage2,
5006
5327
  {
5007
5328
  markdown: message.content,
@@ -5010,84 +5331,161 @@ function SuiteAiPanel({
5010
5331
  )
5011
5332
  }
5012
5333
  ) }),
5013
- ((_a2 = message.actions) != null ? _a2 : []).map((action) => /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
5014
- "div",
5015
- {
5016
- "data-test": "ask-ai-action",
5017
- "data-status": action.status,
5018
- className: "rounded-[var(--ph-radius-surface)] border border-ph-border bg-ph-surface px-3 py-2 text-sm text-ph-ink",
5019
- children: [
5020
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "font-medium", children: action.summary }),
5021
- action.status === "proposed" ? /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "mt-2 flex flex-wrap gap-2", children: [
5022
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5023
- "button",
5024
- {
5025
- type: "button",
5026
- "data-test": "ask-ai-action-confirm",
5027
- disabled: Boolean(resolvingId) || !resolveAction,
5028
- onClick: () => void handleResolve(action.id, "confirm"),
5029
- className: "ph-btn ph-btn-primary ph-btn-xs",
5030
- children: resolvingId === action.id ? "Working\u2026" : "Confirm"
5031
- }
5032
- ),
5033
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5034
- "button",
5334
+ ((_a2 = message.actions) != null ? _a2 : []).map((action) => {
5335
+ var _a3, _b, _c, _d;
5336
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
5337
+ "div",
5338
+ {
5339
+ "data-test": "ask-ai-action",
5340
+ "data-status": action.status,
5341
+ className: "rounded-[var(--ph-radius-surface)] border border-ph-border bg-ph-surface px-3 py-2 text-sm text-ph-ink",
5342
+ children: [
5343
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: "font-medium", children: action.summary }),
5344
+ action.payload && action.kind.startsWith("propose_") ? /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
5345
+ "details",
5035
5346
  {
5036
- type: "button",
5037
- "data-test": "ask-ai-action-cancel",
5038
- disabled: Boolean(resolvingId) || !resolveAction,
5039
- onClick: () => void handleResolve(action.id, "cancel"),
5040
- className: "ph-btn ph-btn-secondary ph-btn-xs",
5041
- children: "Cancel"
5347
+ className: "mt-2",
5348
+ "data-test": "ask-ai-workflow-preview",
5349
+ children: [
5350
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("summary", { className: "cursor-pointer rounded text-xs text-ph-brand focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2", children: "Review proposed content and evidence" }),
5351
+ typeof action.payload.before === "string" ? /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "mt-2", children: [
5352
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: "text-xs font-medium text-ph-subtle", children: "Current description" }),
5353
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("pre", { className: "mt-1 max-h-48 overflow-auto whitespace-pre-wrap break-words text-xs", children: action.payload.before })
5354
+ ] }) : null,
5355
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "mt-2", children: [
5356
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: "text-xs font-medium text-ph-subtle", children: "Proposed draft" }),
5357
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("pre", { className: "mt-1 max-h-80 overflow-auto whitespace-pre-wrap break-words text-xs", children: String(
5358
+ (_c = (_a3 = action.payload.body) != null ? _a3 : action.payload.description) != null ? _c : JSON.stringify(
5359
+ (_b = action.payload.tasks) != null ? _b : action.payload,
5360
+ null,
5361
+ 2
5362
+ )
5363
+ ) })
5364
+ ] }),
5365
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("pre", { className: "mt-2 max-h-40 overflow-auto whitespace-pre-wrap break-words text-xs text-ph-subtle", children: JSON.stringify(
5366
+ action.kind === "propose_project_handover" ? {
5367
+ project_id: action.payload.project_id,
5368
+ sources: action.payload.sources,
5369
+ task_versions: action.payload.task_versions
5370
+ } : action.kind === "propose_requirement_update" ? {
5371
+ source_url: action.payload.source_url,
5372
+ document_revision: action.payload.document_revision,
5373
+ task_updated_at: action.payload.task_updated_at
5374
+ } : Object.fromEntries(
5375
+ Object.entries(action.payload).filter(
5376
+ ([key]) => ![
5377
+ "body",
5378
+ "description",
5379
+ "before",
5380
+ "tasks"
5381
+ ].includes(key)
5382
+ )
5383
+ ),
5384
+ null,
5385
+ 2
5386
+ ) })
5387
+ ]
5042
5388
  }
5043
- )
5044
- ] }) : null,
5045
- action.status === "applied" ? /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("p", { className: "mt-1 text-xs text-ph-subtle", children: [
5046
- "Done",
5047
- action.href ? /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
5048
- " \xB7 ",
5049
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5050
- "a",
5389
+ ) : null,
5390
+ action.status === "proposed" ? /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "mt-2 flex flex-wrap gap-2", children: [
5391
+ suiteAiDraftFields(action.kind, action.payload) ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
5392
+ "button",
5393
+ {
5394
+ type: "button",
5395
+ className: "ph-btn ph-btn-secondary ph-btn-xs",
5396
+ onClick: () => setActionDrafts((drafts) => {
5397
+ var _a4;
5398
+ return __spreadProps(__spreadValues({}, drafts), {
5399
+ [action.id]: (_a4 = drafts[action.id]) != null ? _a4 : suiteAiDraftFields(
5400
+ action.kind,
5401
+ action.payload
5402
+ )
5403
+ });
5404
+ }),
5405
+ children: "Edit draft"
5406
+ }
5407
+ ) : null,
5408
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
5409
+ "button",
5410
+ {
5411
+ type: "button",
5412
+ "data-test": "ask-ai-action-confirm",
5413
+ disabled: Boolean(resolvingId) || !resolveAction,
5414
+ onClick: () => void handleResolve(action, "confirm"),
5415
+ className: "ph-btn ph-btn-primary ph-btn-xs",
5416
+ children: resolvingId === action.id ? "Working\u2026" : "Confirm"
5417
+ }
5418
+ ),
5419
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
5420
+ "button",
5051
5421
  {
5052
- href: action.href,
5053
- className: "text-ph-brand underline-offset-2 hover:underline",
5054
- children: "Open"
5422
+ type: "button",
5423
+ "data-test": "ask-ai-action-cancel",
5424
+ disabled: Boolean(resolvingId) || !resolveAction,
5425
+ onClick: () => void handleResolve(action, "cancel"),
5426
+ className: "ph-btn ph-btn-secondary ph-btn-xs",
5427
+ children: "Cancel"
5055
5428
  }
5056
5429
  )
5057
- ] }) : null
5058
- ] }) : null,
5059
- action.status === "cancelled" ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "mt-1 text-xs text-ph-subtle", children: "Cancelled" }) : null,
5060
- action.status === "failed" ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "mt-1 text-xs text-ph-danger", children: action.error || "Could not apply that." }) : null
5061
- ]
5062
- },
5063
- action.id
5064
- ))
5430
+ ] }) : null,
5431
+ action.status === "proposed" && actionDrafts[action.id] ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
5432
+ SuiteAiDraftEditor,
5433
+ {
5434
+ kind: action.kind,
5435
+ draft: actionDrafts[action.id],
5436
+ canAddTasks: Boolean((_d = action.payload) == null ? void 0 : _d.project_id),
5437
+ onChange: (draft) => setActionDrafts((drafts) => __spreadProps(__spreadValues({}, drafts), {
5438
+ [action.id]: draft
5439
+ }))
5440
+ }
5441
+ ) : null,
5442
+ action.status === "applied" ? /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("p", { className: "mt-1 text-xs text-ph-subtle", children: [
5443
+ "Done",
5444
+ action.href ? /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
5445
+ " \xB7 ",
5446
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
5447
+ "a",
5448
+ {
5449
+ href: action.href,
5450
+ className: "text-ph-brand underline-offset-2 hover:underline",
5451
+ children: "Open"
5452
+ }
5453
+ )
5454
+ ] }) : null
5455
+ ] }) : null,
5456
+ action.status === "cancelled" ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: "mt-1 text-xs text-ph-subtle", children: "Cancelled" }) : null,
5457
+ action.status === "failed" ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: "mt-1 text-xs text-ph-danger", children: action.error || "Could not apply that." }) : null
5458
+ ]
5459
+ },
5460
+ action.id
5461
+ );
5462
+ })
5065
5463
  ] })
5066
5464
  ]
5067
5465
  },
5068
5466
  `assistant-${index}`
5069
5467
  );
5070
5468
  }),
5071
- waiting ? /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex items-end gap-2", "aria-hidden": true, children: [
5072
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "mb-0.5 flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-ph-brand/10 text-ph-brand", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Icon, { className: "h-3.5 w-3.5" }) }),
5073
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex items-center gap-1.5 rounded-2xl rounded-bl-md bg-ph-muted px-3 py-2.5", children: [
5074
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "suite-think-dot h-1.5 w-1.5 rounded-full bg-ph-mutedtext" }),
5075
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "suite-think-dot suite-think-dot--2 h-1.5 w-1.5 rounded-full bg-ph-mutedtext" }),
5076
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "suite-think-dot suite-think-dot--3 h-1.5 w-1.5 rounded-full bg-ph-mutedtext" })
5469
+ waiting ? /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex items-end gap-2", "aria-hidden": true, children: [
5470
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "mb-0.5 flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-ph-brand/10 text-ph-brand", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Icon, { className: "h-3.5 w-3.5" }) }),
5471
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex items-center gap-1.5 rounded-2xl rounded-bl-md bg-ph-muted px-3 py-2.5", children: [
5472
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "suite-think-dot h-1.5 w-1.5 rounded-full bg-ph-mutedtext" }),
5473
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "suite-think-dot suite-think-dot--2 h-1.5 w-1.5 rounded-full bg-ph-mutedtext" }),
5474
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "suite-think-dot suite-think-dot--3 h-1.5 w-1.5 rounded-full bg-ph-mutedtext" })
5077
5475
  ] })
5078
5476
  ] }) : null,
5079
- waiting ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "sr-only", "aria-live": "polite", children: "Assistant is responding\u2026" }) : null,
5080
- error ? /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
5477
+ waiting ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "sr-only", "aria-live": "polite", children: "Assistant is responding\u2026" }) : null,
5478
+ error ? /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
5081
5479
  "div",
5082
5480
  {
5083
5481
  role: "alert",
5084
5482
  className: "flex items-start gap-2 rounded-[var(--ph-radius-surface)] border border-ph-danger/30 bg-ph-danger/10 px-3 py-2.5 text-sm text-ph-ink",
5085
5483
  children: [
5086
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_iconoir_react9.WarningTriangle, { className: "mt-0.5 h-4 w-4 shrink-0 text-ph-danger" }),
5087
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "min-w-0 flex-1", children: [
5088
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "font-medium text-ph-danger", children: "Something went wrong" }),
5089
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "mt-0.5 text-ph-subtle", children: error }),
5090
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5484
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_iconoir_react9.WarningTriangle, { className: "mt-0.5 h-4 w-4 shrink-0 text-ph-danger" }),
5485
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "min-w-0 flex-1", children: [
5486
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: "font-medium text-ph-danger", children: "Something went wrong" }),
5487
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: "mt-0.5 text-ph-subtle", children: error }),
5488
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
5091
5489
  "button",
5092
5490
  {
5093
5491
  type: "button",
@@ -5104,20 +5502,20 @@ function SuiteAiPanel({
5104
5502
  ]
5105
5503
  }
5106
5504
  ),
5107
- !atBottom ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "absolute bottom-3 left-1/2 -translate-x-1/2", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Tooltip, { content: "Scroll to latest", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5505
+ !atBottom ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "absolute bottom-3 left-1/2 -translate-x-1/2", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Tooltip, { content: "Scroll to latest", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
5108
5506
  "button",
5109
5507
  {
5110
5508
  type: "button",
5111
5509
  onClick: () => scrollToBottom("smooth"),
5112
5510
  className: "ph-btn ph-btn-ghost ph-btn-circle h-9 w-9 border border-ph-border bg-ph-surface text-ph-subtle shadow-[var(--ph-shadow-floating)]",
5113
5511
  "aria-label": "Scroll to latest",
5114
- children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_iconoir_react9.ArrowDown, { className: "h-4 w-4" })
5512
+ children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_iconoir_react9.ArrowDown, { className: "h-4 w-4" })
5115
5513
  }
5116
5514
  ) }) }) : null
5117
5515
  ] }),
5118
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "px-2 pt-2 pb-[max(2rem,calc(env(safe-area-inset-bottom)+1rem))]", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "suite-ai-composer flex items-end gap-1.5 border bg-ph-surface px-1.5 py-1", children: [
5119
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("label", { htmlFor: inputId, className: "sr-only", children: "Ask a question" }),
5120
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5516
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "px-2 pt-2 pb-[max(2rem,calc(env(safe-area-inset-bottom)+1rem))]", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "suite-ai-composer flex items-end gap-1.5 border bg-ph-surface px-1.5 py-1", children: [
5517
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("label", { htmlFor: inputId, className: "sr-only", children: "Ask a question" }),
5518
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
5121
5519
  "textarea",
5122
5520
  {
5123
5521
  id: inputId,
@@ -5136,7 +5534,7 @@ function SuiteAiPanel({
5136
5534
  className: "max-h-36 min-h-10 flex-1 resize-none bg-transparent px-1.5 py-2 text-sm leading-relaxed text-ph-ink outline-none placeholder:text-ph-mutedtext"
5137
5535
  }
5138
5536
  ),
5139
- waiting ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Tooltip, { content: "Stop generating", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5537
+ waiting ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Tooltip, { content: "Stop generating", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
5140
5538
  "button",
5141
5539
  {
5142
5540
  type: "button",
@@ -5144,9 +5542,9 @@ function SuiteAiPanel({
5144
5542
  "data-test": "ask-ai-stop",
5145
5543
  className: "ph-btn ph-btn-ghost ph-btn-circle h-9 w-9 shrink-0 bg-ph-muted text-ph-ink",
5146
5544
  "aria-label": "Stop generating",
5147
- children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_iconoir_react9.Square, { className: "h-3.5 w-3.5 fill-current" })
5545
+ children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_iconoir_react9.Square, { className: "h-3.5 w-3.5 fill-current" })
5148
5546
  }
5149
- ) }) : /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Tooltip, { content: "Send message", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
5547
+ ) }) : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Tooltip, { content: "Send message", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
5150
5548
  "button",
5151
5549
  {
5152
5550
  type: "button",
@@ -5155,7 +5553,7 @@ function SuiteAiPanel({
5155
5553
  "data-test": "ask-ai-send",
5156
5554
  className: "ph-btn ph-btn-primary ph-btn-circle h-9 w-9 shrink-0",
5157
5555
  "aria-label": "Send message",
5158
- children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_iconoir_react9.ArrowUp, { className: "h-4 w-4" })
5556
+ children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_iconoir_react9.ArrowUp, { className: "h-4 w-4" })
5159
5557
  }
5160
5558
  ) })
5161
5559
  ] }) })
@@ -5167,7 +5565,7 @@ function SuiteAiPanel({
5167
5565
  // src/suite/components/workspace-switcher.tsx
5168
5566
  var import_react22 = require("react");
5169
5567
  var import_iconoir_react10 = require("iconoir-react");
5170
- var import_jsx_runtime34 = require("react/jsx-runtime");
5568
+ var import_jsx_runtime35 = require("react/jsx-runtime");
5171
5569
  function SuiteWorkspaceSwitcher({
5172
5570
  workspaces = [],
5173
5571
  groups,
@@ -5185,7 +5583,7 @@ function SuiteWorkspaceSwitcher({
5185
5583
  var _a2;
5186
5584
  const [open, setOpen] = (0, import_react22.useState)(false);
5187
5585
  const sections = (_a2 = groups == null ? void 0 : groups.filter((group) => group.workspaces.length > 0)) != null ? _a2 : workspaces.length > 0 ? [{ id: "workspaces", label: "Switch workspace", workspaces }] : [];
5188
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
5586
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
5189
5587
  DropdownMenu2,
5190
5588
  {
5191
5589
  "aria-label": "Switch workspace",
@@ -5196,7 +5594,7 @@ function SuiteWorkspaceSwitcher({
5196
5594
  align: "start",
5197
5595
  open,
5198
5596
  onOpenChange: setOpen,
5199
- trigger: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
5597
+ trigger: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
5200
5598
  "span",
5201
5599
  {
5202
5600
  className: cn(
@@ -5206,10 +5604,10 @@ function SuiteWorkspaceSwitcher({
5206
5604
  ),
5207
5605
  "data-test": "workspace-switcher-trigger",
5208
5606
  children: [
5209
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_iconoir_react10.Building, { className: "h-4 w-4 shrink-0 text-ph-ink", "aria-hidden": true }),
5210
- !collapsed ? /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
5211
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "min-w-0 flex-1 truncate text-sm font-semibold text-ph-ink", children: name }),
5212
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
5607
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_iconoir_react10.Building, { className: "h-4 w-4 shrink-0 text-ph-ink", "aria-hidden": true }),
5608
+ !collapsed ? /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
5609
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "min-w-0 flex-1 truncate text-sm font-semibold text-ph-ink", children: name }),
5610
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
5213
5611
  import_iconoir_react10.NavArrowDown,
5214
5612
  {
5215
5613
  className: cn(
@@ -5223,16 +5621,16 @@ function SuiteWorkspaceSwitcher({
5223
5621
  ]
5224
5622
  }
5225
5623
  ),
5226
- children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
5624
+ children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
5227
5625
  "div",
5228
5626
  {
5229
5627
  id: "workspace-switcher-menu",
5230
5628
  className: "p-1",
5231
5629
  "data-test": "workspace-switcher-menu",
5232
5630
  children: [
5233
- sections.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: "px-3 py-2 text-sm text-ph-mutedtext", children: emptyLabel }) : sections.map((section) => /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { children: [
5234
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: "px-3 py-2 text-[length:var(--ph-type-overline)] font-semibold uppercase tracking-[0.08em] text-ph-mutedtext", children: section.label }),
5235
- section.workspaces.map((workspace) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
5631
+ sections.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { className: "px-3 py-2 text-sm text-ph-mutedtext", children: emptyLabel }) : sections.map((section) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { children: [
5632
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { className: "px-3 py-2 text-[length:var(--ph-type-overline)] font-semibold uppercase tracking-[0.08em] text-ph-mutedtext", children: section.label }),
5633
+ section.workspaces.map((workspace) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
5236
5634
  DropdownItem2,
5237
5635
  {
5238
5636
  id: `workspace-option-${workspace.id}`,
@@ -5245,12 +5643,12 @@ function SuiteWorkspaceSwitcher({
5245
5643
  onSelect(workspace);
5246
5644
  },
5247
5645
  className: appSwitcherMenuItemClass(),
5248
- children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("span", { className: "flex min-w-0 w-full items-center gap-3", children: [
5249
- /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("span", { className: "min-w-0 flex-1", children: [
5250
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "block truncate text-sm font-medium text-ph-ink", children: workspace.name }),
5251
- workspace.description ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "block truncate text-xs text-ph-mutedtext", children: workspace.description }) : null
5646
+ children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("span", { className: "flex min-w-0 w-full items-center gap-3", children: [
5647
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("span", { className: "min-w-0 flex-1", children: [
5648
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "block truncate text-sm font-medium text-ph-ink", children: workspace.name }),
5649
+ workspace.description ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "block truncate text-xs text-ph-mutedtext", children: workspace.description }) : null
5252
5650
  ] }),
5253
- workspace.id === currentId ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
5651
+ workspace.id === currentId ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
5254
5652
  import_iconoir_react10.Check,
5255
5653
  {
5256
5654
  className: "h-4 w-4 shrink-0 text-ph-brand",
@@ -5262,7 +5660,7 @@ function SuiteWorkspaceSwitcher({
5262
5660
  workspace.id
5263
5661
  ))
5264
5662
  ] }, section.id)),
5265
- footer ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "mt-1 border-t border-ph-border pt-1", children: footer }) : null
5663
+ footer ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "mt-1 border-t border-ph-border pt-1", children: footer }) : null
5266
5664
  ]
5267
5665
  }
5268
5666
  )
@@ -5271,7 +5669,7 @@ function SuiteWorkspaceSwitcher({
5271
5669
  }
5272
5670
 
5273
5671
  // src/suite/icons/suite-icon.tsx
5274
- var import_jsx_runtime35 = require("react/jsx-runtime");
5672
+ var import_jsx_runtime36 = require("react/jsx-runtime");
5275
5673
  var TODAY_SUN_STYLE = `
5276
5674
  @media (prefers-reduced-motion: no-preference) {
5277
5675
  .suite-icon-today-sun-rays {
@@ -5297,7 +5695,7 @@ function SuiteIcon({
5297
5695
  const glyph = SUITE_GLYPHS[name];
5298
5696
  const accentHex = accent ? APP_ACCENTS[accent].accent : void 0;
5299
5697
  const mergedStyle = accentHex ? __spreadProps(__spreadValues({}, style), { "--suite-icon-accent": accentHex }) : style;
5300
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
5698
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
5301
5699
  "svg",
5302
5700
  {
5303
5701
  width: size,
@@ -5314,8 +5712,8 @@ function SuiteIcon({
5314
5712
  "aria-label": label,
5315
5713
  "aria-hidden": label ? void 0 : true,
5316
5714
  children: [
5317
- glyph.animatedAccent && animated ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("style", { children: TODAY_SUN_STYLE }) : null,
5318
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
5715
+ glyph.animatedAccent && animated ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("style", { children: TODAY_SUN_STYLE }) : null,
5716
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
5319
5717
  GlyphParts,
5320
5718
  {
5321
5719
  elements: glyph.elements,
@@ -5496,9 +5894,9 @@ function useSidebarWidth(storageKey = SUITE_SIDEBAR_WIDTH_KEY, defaultWidth = SI
5496
5894
 
5497
5895
  // src/suite/lib/motion.tsx
5498
5896
  var import_react24 = require("motion/react");
5499
- var import_jsx_runtime36 = require("react/jsx-runtime");
5897
+ var import_jsx_runtime37 = require("react/jsx-runtime");
5500
5898
  function SuiteMotionProvider({ children }) {
5501
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react24.LazyMotion, { features: import_react24.domAnimation, strict: true, children });
5899
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react24.LazyMotion, { features: import_react24.domAnimation, strict: true, children });
5502
5900
  }
5503
5901
  var SUITE_SPRINGS = {
5504
5902
  /** Snappy panel/sheet entrances — small overshoot. */
@@ -5510,24 +5908,24 @@ var SUITE_SPRINGS = {
5510
5908
  };
5511
5909
 
5512
5910
  // src/suite/components/suite-skeleton.tsx
5513
- var import_jsx_runtime37 = require("react/jsx-runtime");
5911
+ var import_jsx_runtime38 = require("react/jsx-runtime");
5514
5912
  function SuiteSkeleton({
5515
5913
  className,
5516
5914
  lines = 1,
5517
5915
  circle,
5518
5916
  width
5519
5917
  }) {
5520
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
5918
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
5521
5919
  "div",
5522
5920
  {
5523
5921
  className: cn("space-y-2", circle ? "flex flex-col items-center" : ""),
5524
5922
  "aria-hidden": true,
5525
- children: Array.from({ length: lines }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
5923
+ children: Array.from({ length: lines }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
5526
5924
  "div",
5527
5925
  {
5528
5926
  className: "animate-[skeleton-stagger_0.6s_ease-out_both]",
5529
5927
  style: { animationDelay: `${index * 80}ms` },
5530
- children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
5928
+ children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
5531
5929
  "div",
5532
5930
  {
5533
5931
  className: cn(
@@ -5551,7 +5949,7 @@ function SuiteSkeletonCard({
5551
5949
  rows = 3,
5552
5950
  header = true
5553
5951
  }) {
5554
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
5952
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
5555
5953
  "div",
5556
5954
  {
5557
5955
  className: cn(
@@ -5560,26 +5958,26 @@ function SuiteSkeletonCard({
5560
5958
  ),
5561
5959
  "aria-hidden": true,
5562
5960
  children: [
5563
- header ? /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
5961
+ header ? /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
5564
5962
  "div",
5565
5963
  {
5566
5964
  className: "mb-5 flex items-center gap-3 animate-[skeleton-stagger_0.5s_ease-out_both]",
5567
5965
  style: { animationDelay: "100ms" },
5568
5966
  children: [
5569
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "ph-skeleton h-10 w-10 rounded-[var(--ph-radius-control)]" }),
5570
- /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex-1 space-y-2", children: [
5571
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "ph-skeleton h-4 w-1/3" }),
5572
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "ph-skeleton h-3 w-1/2" })
5967
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "ph-skeleton h-10 w-10 rounded-[var(--ph-radius-control)]" }),
5968
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex-1 space-y-2", children: [
5969
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "ph-skeleton h-4 w-1/3" }),
5970
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "ph-skeleton h-3 w-1/2" })
5573
5971
  ] })
5574
5972
  ]
5575
5973
  }
5576
5974
  ) : null,
5577
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "space-y-3", children: Array.from({ length: rows }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
5975
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "space-y-3", children: Array.from({ length: rows }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
5578
5976
  "div",
5579
5977
  {
5580
5978
  className: "animate-[skeleton-stagger_0.5s_ease-out_both]",
5581
5979
  style: { animationDelay: `${200 + index * 80}ms` },
5582
- children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
5980
+ children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
5583
5981
  "div",
5584
5982
  {
5585
5983
  className: "ph-skeleton h-3",
@@ -5597,16 +5995,16 @@ function SuiteSkeletonList({
5597
5995
  className,
5598
5996
  items = 4
5599
5997
  }) {
5600
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: cn("space-y-3", className), "aria-hidden": true, children: Array.from({ length: items }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
5998
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: cn("space-y-3", className), "aria-hidden": true, children: Array.from({ length: items }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
5601
5999
  "div",
5602
6000
  {
5603
6001
  className: "animate-[skeleton-stagger_0.6s_ease-out_both]",
5604
6002
  style: { animationDelay: `${index * 100}ms` },
5605
- children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex items-center gap-3 rounded-[var(--ph-radius-surface)] border border-ph-border bg-ph-surface p-4", children: [
5606
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "ph-skeleton h-10 w-10 rounded-[var(--ph-radius-control)]" }),
5607
- /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "min-w-0 flex-1 space-y-2", children: [
5608
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "ph-skeleton h-3.5 w-3/4" }),
5609
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "ph-skeleton h-3 w-1/2" })
6003
+ children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex items-center gap-3 rounded-[var(--ph-radius-surface)] border border-ph-border bg-ph-surface p-4", children: [
6004
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "ph-skeleton h-10 w-10 rounded-[var(--ph-radius-control)]" }),
6005
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "min-w-0 flex-1 space-y-2", children: [
6006
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "ph-skeleton h-3.5 w-3/4" }),
6007
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "ph-skeleton h-3 w-1/2" })
5610
6008
  ] })
5611
6009
  ] })
5612
6010
  },
@@ -5621,7 +6019,7 @@ function SuiteEmptyState({
5621
6019
  className,
5622
6020
  size = "md"
5623
6021
  }) {
5624
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
6022
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
5625
6023
  "div",
5626
6024
  {
5627
6025
  className: cn(
@@ -5630,13 +6028,13 @@ function SuiteEmptyState({
5630
6028
  className
5631
6029
  ),
5632
6030
  children: [
5633
- /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "pointer-events-none absolute inset-0 overflow-hidden opacity-60", "aria-hidden": true, children: [
5634
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "absolute -left-10 -top-10 h-40 w-40 rounded-full bg-ph-brand/10 blur-3xl" }),
5635
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "absolute -bottom-10 -right-10 h-40 w-40 rounded-full bg-ph-accent/10 blur-3xl" })
6031
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "pointer-events-none absolute inset-0 overflow-hidden opacity-60", "aria-hidden": true, children: [
6032
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "absolute -left-10 -top-10 h-40 w-40 rounded-full bg-ph-brand/10 blur-3xl" }),
6033
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "absolute -bottom-10 -right-10 h-40 w-40 rounded-full bg-ph-accent/10 blur-3xl" })
5636
6034
  ] }),
5637
- /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "relative", children: [
5638
- icon ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "mx-auto mb-4 inline-flex items-center justify-center rounded-[var(--ph-radius-surface)] border border-ph-border bg-ph-muted p-3 shadow-[var(--ph-shadow-control)]", children: icon }) : null,
5639
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
6035
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "relative", children: [
6036
+ icon ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "mx-auto mb-4 inline-flex items-center justify-center rounded-[var(--ph-radius-surface)] border border-ph-border bg-ph-muted p-3 shadow-[var(--ph-shadow-control)]", children: icon }) : null,
6037
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
5640
6038
  "h2",
5641
6039
  {
5642
6040
  className: cn(
@@ -5646,8 +6044,8 @@ function SuiteEmptyState({
5646
6044
  children: title
5647
6045
  }
5648
6046
  ),
5649
- description ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("p", { className: "mx-auto mt-2 max-w-sm text-sm leading-relaxed text-ph-subtle", children: description }) : null,
5650
- action ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "mt-5 flex flex-wrap items-center justify-center gap-2", children: action }) : null
6047
+ description ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("p", { className: "mx-auto mt-2 max-w-sm text-sm leading-relaxed text-ph-subtle", children: description }) : null,
6048
+ action ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "mt-5 flex flex-wrap items-center justify-center gap-2", children: action }) : null
5651
6049
  ] })
5652
6050
  ]
5653
6051
  }
@@ -5656,7 +6054,7 @@ function SuiteEmptyState({
5656
6054
 
5657
6055
  // src/suite/components/suite-settings-mobile-nav.tsx
5658
6056
  var import_react25 = require("react");
5659
- var import_jsx_runtime38 = require("react/jsx-runtime");
6057
+ var import_jsx_runtime39 = require("react/jsx-runtime");
5660
6058
  function SuiteSettingsMobileNav({
5661
6059
  items,
5662
6060
  activeHref,
@@ -5665,16 +6063,16 @@ function SuiteSettingsMobileNav({
5665
6063
  ariaLabel = "Settings sections",
5666
6064
  className
5667
6065
  }) {
5668
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
6066
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
5669
6067
  "nav",
5670
6068
  {
5671
6069
  "data-test": dataTest,
5672
6070
  "aria-label": ariaLabel,
5673
6071
  className: cn("suite-settings-mobile-nav lg:hidden", className),
5674
- children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "flex snap-x gap-2 overflow-x-auto pb-3 pt-1 scrollbar-hide [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden", children: items.map((item) => {
6072
+ children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "flex snap-x gap-2 overflow-x-auto pb-3 pt-1 scrollbar-hide [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden", children: items.map((item) => {
5675
6073
  const Icon = item.icon;
5676
6074
  const active = activeHref === item.href || activeHref.startsWith(`${item.href}/`);
5677
- const iconNode = (0, import_react25.isValidElement)(item.icon) ? item.icon : /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
6075
+ const iconNode = (0, import_react25.isValidElement)(item.icon) ? item.icon : /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
5678
6076
  Icon,
5679
6077
  {
5680
6078
  className: cn(
@@ -5684,13 +6082,17 @@ function SuiteSettingsMobileNav({
5684
6082
  "aria-hidden": true
5685
6083
  }
5686
6084
  );
5687
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
6085
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
5688
6086
  "button",
5689
6087
  {
5690
6088
  type: "button",
5691
6089
  id: item.id,
5692
6090
  "data-test": item.testId,
5693
- onClick: () => onSelect(item.href),
6091
+ onClick: () => {
6092
+ var _a2;
6093
+ trackSuiteEvent("Tab Viewed", { tab: (_a2 = item.id) != null ? _a2 : item.href });
6094
+ onSelect(item.href);
6095
+ },
5694
6096
  "aria-current": active ? "page" : void 0,
5695
6097
  className: cn(
5696
6098
  "group relative flex min-h-[44px] shrink-0 snap-start items-center gap-2 rounded-[var(--ph-radius-control)] border px-3.5 py-2.5 text-sm font-medium transition-colors focus-visible:outline-none focus-visible:shadow-[var(--ph-focus-halo)]",
@@ -5698,7 +6100,7 @@ function SuiteSettingsMobileNav({
5698
6100
  ),
5699
6101
  children: [
5700
6102
  iconNode,
5701
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "whitespace-nowrap", children: item.label })
6103
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "whitespace-nowrap", children: item.label })
5702
6104
  ]
5703
6105
  },
5704
6106
  item.href
@@ -5712,7 +6114,7 @@ function SuiteSettingsMobileNav({
5712
6114
  var import_link2 = __toESM(require("next/link"));
5713
6115
  var import_react26 = require("react");
5714
6116
  var import_iconoir_react11 = require("iconoir-react");
5715
- var import_jsx_runtime39 = require("react/jsx-runtime");
6117
+ var import_jsx_runtime40 = require("react/jsx-runtime");
5716
6118
  function renderNode(node, collapsed) {
5717
6119
  if (typeof node === "function") return node(collapsed);
5718
6120
  return node;
@@ -5789,7 +6191,7 @@ function SuiteSidebar({
5789
6191
  if (collapsed) onRequestExpand == null ? void 0 : onRequestExpand();
5790
6192
  setAskAi(true);
5791
6193
  }
5792
- const askAiButton = /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
6194
+ const askAiButton = /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
5793
6195
  "button",
5794
6196
  {
5795
6197
  ref: askAiButtonRef,
@@ -5802,11 +6204,11 @@ function SuiteSidebar({
5802
6204
  "ph-btn ph-btn-ghost ph-btn-square h-10 w-10 shrink-0",
5803
6205
  askAiOpen ? "bg-ph-brand/10 text-ph-brand" : "text-ph-mutedtext hover:bg-ph-muted hover:text-ph-ink"
5804
6206
  ),
5805
- children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_iconoir_react11.Sparks, { className: "h-4 w-4", "aria-hidden": true })
6207
+ children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_iconoir_react11.Sparks, { className: "h-4 w-4", "aria-hidden": true })
5806
6208
  }
5807
6209
  );
5808
6210
  if (chatOpen) {
5809
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
6211
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
5810
6212
  "div",
5811
6213
  {
5812
6214
  "data-suite-chat-open": "",
@@ -5816,7 +6218,7 @@ function SuiteSidebar({
5816
6218
  className
5817
6219
  ),
5818
6220
  children: [
5819
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
6221
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
5820
6222
  "div",
5821
6223
  {
5822
6224
  className: cn(
@@ -5824,7 +6226,7 @@ function SuiteSidebar({
5824
6226
  surface ? "bg-ph-surface" : "bg-ph-canvas"
5825
6227
  ),
5826
6228
  children: [
5827
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
6229
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
5828
6230
  "button",
5829
6231
  {
5830
6232
  ref: askAiBackRef,
@@ -5833,19 +6235,19 @@ function SuiteSidebar({
5833
6235
  "aria-label": "Back to navigation",
5834
6236
  onClick: closeAskAi,
5835
6237
  className: "ph-btn ph-btn-ghost ph-btn-square h-10 w-10 shrink-0 text-ph-subtle",
5836
- children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_iconoir_react11.NavArrowLeft, { className: "h-4 w-4", "aria-hidden": true })
6238
+ children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_iconoir_react11.NavArrowLeft, { className: "h-4 w-4", "aria-hidden": true })
5837
6239
  }
5838
6240
  ),
5839
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "min-w-0 flex-1 truncate text-sm font-semibold text-ph-ink", children: "Shelly AI" })
6241
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "min-w-0 flex-1 truncate text-sm font-semibold text-ph-ink", children: "Shelly AI" })
5840
6242
  ]
5841
6243
  }
5842
6244
  ),
5843
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "min-h-0 flex-1", children: askAi })
6245
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "min-h-0 flex-1", children: askAi })
5844
6246
  ]
5845
6247
  }
5846
6248
  );
5847
6249
  }
5848
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
6250
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
5849
6251
  "div",
5850
6252
  {
5851
6253
  "data-surface": surface ? "true" : "false",
@@ -5854,7 +6256,7 @@ function SuiteSidebar({
5854
6256
  className
5855
6257
  ),
5856
6258
  children: [
5857
- appSwitcher || notificationBell ? /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
6259
+ appSwitcher || notificationBell ? /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
5858
6260
  "div",
5859
6261
  {
5860
6262
  className: cn(
@@ -5862,12 +6264,12 @@ function SuiteSidebar({
5862
6264
  collapsed ? "flex-col items-center gap-1 px-1 py-2" : "h-14 items-center justify-between gap-2 px-3"
5863
6265
  ),
5864
6266
  children: [
5865
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: cn("min-w-0", collapsed ? "shrink-0" : "flex-1"), children: renderNode(appSwitcher, collapsed) }),
5866
- collapsed ? null : /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "shrink-0", children: renderNode(notificationBell, collapsed) })
6267
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: cn("min-w-0", collapsed ? "shrink-0" : "flex-1"), children: renderNode(appSwitcher, collapsed) }),
6268
+ collapsed ? null : /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "shrink-0", children: renderNode(notificationBell, collapsed) })
5867
6269
  ]
5868
6270
  }
5869
6271
  ) : null,
5870
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
6272
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
5871
6273
  "div",
5872
6274
  {
5873
6275
  className: cn(
@@ -5876,7 +6278,7 @@ function SuiteSidebar({
5876
6278
  collapsed ? "px-1.5 py-2" : "p-3"
5877
6279
  ),
5878
6280
  children: [
5879
- contextSwitcher ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
6281
+ contextSwitcher ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
5880
6282
  "div",
5881
6283
  {
5882
6284
  className: cn(
@@ -5886,9 +6288,9 @@ function SuiteSidebar({
5886
6288
  children: renderNode(contextSwitcher, collapsed)
5887
6289
  }
5888
6290
  ) : null,
5889
- chatOpen ? /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex min-h-0 flex-1 flex-col", children: [
5890
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "mb-2 flex shrink-0 items-center gap-1", children: [
5891
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
6291
+ chatOpen ? /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "flex min-h-0 flex-1 flex-col", children: [
6292
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "mb-2 flex shrink-0 items-center gap-1", children: [
6293
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
5892
6294
  "button",
5893
6295
  {
5894
6296
  type: "button",
@@ -5896,20 +6298,20 @@ function SuiteSidebar({
5896
6298
  onClick: closeAskAi,
5897
6299
  className: "ph-btn ph-btn-ghost ph-btn-sm h-9 text-ph-subtle",
5898
6300
  children: [
5899
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_iconoir_react11.NavArrowLeft, { className: "h-4 w-4", "aria-hidden": true }),
6301
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_iconoir_react11.NavArrowLeft, { className: "h-4 w-4", "aria-hidden": true }),
5900
6302
  "Nav"
5901
6303
  ]
5902
6304
  }
5903
6305
  ),
5904
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "truncate text-sm font-semibold text-ph-ink", children: "Shelly AI" })
6306
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "truncate text-sm font-semibold text-ph-ink", children: "Shelly AI" })
5905
6307
  ] }),
5906
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "min-h-0 flex-1", children: askAi })
5907
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_jsx_runtime39.Fragment, { children: [
5908
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("nav", { "aria-label": "Pages", className: "shrink-0 space-y-1", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "space-y-1", children: navItems.map((item) => {
6308
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "min-h-0 flex-1", children: askAi })
6309
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_jsx_runtime40.Fragment, { children: [
6310
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("nav", { "aria-label": "Pages", className: "shrink-0 space-y-1", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "space-y-1", children: navItems.map((item) => {
5909
6311
  var _a2;
5910
6312
  const Icon = item.icon;
5911
6313
  const active = Boolean(item.active);
5912
- const link = /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
6314
+ const link = /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
5913
6315
  import_link2.default,
5914
6316
  {
5915
6317
  href: item.href,
@@ -5918,12 +6320,12 @@ function SuiteSidebar({
5918
6320
  "aria-current": active ? "page" : void 0,
5919
6321
  onClick: item.onClick,
5920
6322
  className: cn(
5921
- "group relative flex min-h-11 touch-manipulation items-center gap-2.5 rounded-[var(--ph-radius-control)] text-sm font-medium transition-colors focus-visible:outline-none focus-visible:shadow-[var(--ph-focus-halo)]",
5922
- active ? "bg-[var(--ph-selected-bg)] text-[var(--ph-selected-text)] shadow-[inset_0_0_0_1px_var(--ph-selected-border)]" : "text-ph-subtle hover:bg-[var(--ph-surface-hover)] hover:text-ph-ink",
6323
+ "suite-sidebar-link group relative flex min-h-11 touch-manipulation items-center gap-2.5 rounded-[var(--ph-radius-control)] text-sm font-medium transition-colors",
6324
+ active ? "bg-[var(--ph-selected-bg)] text-[var(--ph-selected-text)]" : "text-ph-subtle hover:bg-[var(--ph-surface-hover)] hover:text-ph-ink",
5923
6325
  collapsed ? "mx-auto size-11 shrink-0 justify-center gap-0 px-0 py-0" : "w-full px-2.5 py-2"
5924
6326
  ),
5925
6327
  children: [
5926
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
6328
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
5927
6329
  "span",
5928
6330
  {
5929
6331
  className: cn(
@@ -5931,7 +6333,7 @@ function SuiteSidebar({
5931
6333
  item.iconClassName
5932
6334
  ),
5933
6335
  "aria-hidden": true,
5934
- children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
6336
+ children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
5935
6337
  Icon,
5936
6338
  {
5937
6339
  className: "h-full w-full",
@@ -5940,7 +6342,7 @@ function SuiteSidebar({
5940
6342
  )
5941
6343
  }
5942
6344
  ),
5943
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
6345
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
5944
6346
  "span",
5945
6347
  {
5946
6348
  className: cn(
@@ -5951,14 +6353,14 @@ function SuiteSidebar({
5951
6353
  children: item.label
5952
6354
  }
5953
6355
  ),
5954
- !collapsed && item.badge ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "relative ml-auto shrink-0", children: item.badge }) : null
6356
+ !collapsed && item.badge ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "relative ml-auto shrink-0", children: item.badge }) : null
5955
6357
  ]
5956
6358
  },
5957
6359
  item.label
5958
6360
  );
5959
- return collapsed ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Tooltip, { content: item.label, side: "right", children: link }, item.label) : link;
6361
+ return collapsed ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Tooltip, { content: item.label, side: "right", children: link }, item.label) : link;
5960
6362
  }) }) }),
5961
- secondaryNav ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
6363
+ secondaryNav ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
5962
6364
  "div",
5963
6365
  {
5964
6366
  className: "min-h-0 flex-1",
@@ -5970,14 +6372,14 @@ function SuiteSidebar({
5970
6372
  ]
5971
6373
  }
5972
6374
  ),
5973
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
6375
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
5974
6376
  "div",
5975
6377
  {
5976
6378
  className: cn(
5977
6379
  "shrink-0 border-t border-ph-border",
5978
6380
  collapsed ? "p-1.5" : "p-3"
5979
6381
  ),
5980
- children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
6382
+ children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
5981
6383
  "div",
5982
6384
  {
5983
6385
  className: cn(
@@ -5986,8 +6388,8 @@ function SuiteSidebar({
5986
6388
  ),
5987
6389
  children: [
5988
6390
  renderNode(userMenu, collapsed),
5989
- showAskAi ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: cn("shrink-0", collapsed ? "mt-2" : "ml-auto"), children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Tooltip, { content: "Shelly AI", side: collapsed ? "right" : "top", children: askAiButton }) }) : footerExtras ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: cn("shrink-0", collapsed ? "mt-2" : "ml-auto"), children: renderNode(footerExtras, collapsed) }) : null,
5990
- showAskAi && footerExtras ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: cn("shrink-0", collapsed && "mt-2"), children: renderNode(footerExtras, collapsed) }) : null
6391
+ showAskAi ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: cn("shrink-0", collapsed ? "mt-2" : "ml-auto"), children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Tooltip, { content: "Shelly AI", side: collapsed ? "right" : "top", children: askAiButton }) }) : footerExtras ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: cn("shrink-0", collapsed ? "mt-2" : "ml-auto"), children: renderNode(footerExtras, collapsed) }) : null,
6392
+ showAskAi && footerExtras ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: cn("shrink-0", collapsed && "mt-2"), children: renderNode(footerExtras, collapsed) }) : null
5991
6393
  ]
5992
6394
  }
5993
6395
  )
@@ -5999,7 +6401,7 @@ function SuiteSidebar({
5999
6401
  }
6000
6402
 
6001
6403
  // src/suite/components/suite-app-layout.tsx
6002
- var import_jsx_runtime40 = require("react/jsx-runtime");
6404
+ var import_jsx_runtime41 = require("react/jsx-runtime");
6003
6405
  function SuiteAppLayout({
6004
6406
  sidebar,
6005
6407
  children,
@@ -6013,7 +6415,7 @@ function SuiteAppLayout({
6013
6415
  onResetWidth,
6014
6416
  className
6015
6417
  }) {
6016
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
6418
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
6017
6419
  "div",
6018
6420
  {
6019
6421
  "data-test": "app-shell",
@@ -6022,7 +6424,7 @@ function SuiteAppLayout({
6022
6424
  className
6023
6425
  ),
6024
6426
  children: [
6025
- /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
6427
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
6026
6428
  "aside",
6027
6429
  {
6028
6430
  "aria-label": "Sidebar",
@@ -6030,8 +6432,8 @@ function SuiteAppLayout({
6030
6432
  style: { width: `${sidebarWidth}px` },
6031
6433
  "data-collapsed": collapsed ? "true" : "false",
6032
6434
  children: [
6033
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "relative z-0 h-full min-h-0 isolate", children: sidebar }),
6034
- onStartResize ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
6435
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "relative z-0 h-full min-h-0 isolate", children: sidebar }),
6436
+ onStartResize ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
6035
6437
  "div",
6036
6438
  {
6037
6439
  role: "separator",
@@ -6066,9 +6468,9 @@ function SuiteAppLayout({
6066
6468
  ]
6067
6469
  }
6068
6470
  ),
6069
- /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "flex min-h-0 min-w-0 flex-1 flex-col", children: [
6070
- mobileHeader ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "shrink-0 lg:hidden", children: mobileHeader }) : null,
6071
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
6471
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex min-h-0 min-w-0 flex-1 flex-col", children: [
6472
+ mobileHeader ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "shrink-0 lg:hidden", children: mobileHeader }) : null,
6473
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
6072
6474
  "main",
6073
6475
  {
6074
6476
  id: "main-content",
@@ -6082,7 +6484,7 @@ function SuiteAppLayout({
6082
6484
  children
6083
6485
  }
6084
6486
  ),
6085
- bottomNav ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "shrink-0 lg:hidden", children: bottomNav }) : null
6487
+ bottomNav ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "shrink-0 lg:hidden", children: bottomNav }) : null
6086
6488
  ] })
6087
6489
  ]
6088
6490
  }
@@ -6092,24 +6494,24 @@ function SuiteAppLayout({
6092
6494
  // src/suite/components/suite-integration-picker.tsx
6093
6495
  var import_react27 = require("react");
6094
6496
  var import_iconoir_react12 = require("iconoir-react");
6095
- var import_jsx_runtime41 = require("react/jsx-runtime");
6497
+ var import_jsx_runtime42 = require("react/jsx-runtime");
6096
6498
  var DESCRIPTION_LIMIT = 90;
6097
6499
  function IntegrationSkeletonCard() {
6098
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
6500
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
6099
6501
  "div",
6100
6502
  {
6101
6503
  className: "flex min-h-36 min-w-0 animate-pulse flex-col justify-between rounded-[var(--ph-radius-surface)] border border-ph-border bg-ph-surface p-4",
6102
6504
  "aria-hidden": "true",
6103
6505
  children: [
6104
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex items-start gap-3", children: [
6105
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "h-8 w-8 shrink-0 rounded-md bg-ph-muted" }),
6106
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "min-w-0 flex-1 space-y-2 pt-1", children: [
6107
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "h-4 w-3/5 rounded bg-ph-muted" }),
6108
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "h-3 w-full rounded bg-ph-muted" }),
6109
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "h-3 w-4/5 rounded bg-ph-muted" })
6506
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex items-start gap-3", children: [
6507
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "h-8 w-8 shrink-0 rounded-md bg-ph-muted" }),
6508
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "min-w-0 flex-1 space-y-2 pt-1", children: [
6509
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "h-4 w-3/5 rounded bg-ph-muted" }),
6510
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "h-3 w-full rounded bg-ph-muted" }),
6511
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "h-3 w-4/5 rounded bg-ph-muted" })
6110
6512
  ] })
6111
6513
  ] }),
6112
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "mt-3 h-9 w-20 rounded bg-ph-muted" })
6514
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "mt-3 h-9 w-20 rounded bg-ph-muted" })
6113
6515
  ]
6114
6516
  }
6115
6517
  );
@@ -6445,8 +6847,8 @@ function SuiteIntegrationPicker({
6445
6847
  observer.observe(sentinel);
6446
6848
  return () => observer.disconnect();
6447
6849
  }, [catalogLoading, hasMore, loading, loadingMore, onEndReached, open]);
6448
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
6449
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
6850
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_jsx_runtime42.Fragment, { children: [
6851
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
6450
6852
  Modal,
6451
6853
  {
6452
6854
  open,
@@ -6456,15 +6858,15 @@ function SuiteIntegrationPicker({
6456
6858
  size: "xl",
6457
6859
  dataTest,
6458
6860
  bodyClassName: "!overflow-hidden",
6459
- children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "space-y-4", children: [
6460
- connectionError ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { className: "text-sm text-ph-danger", role: "alert", children: connectionError }) : null,
6461
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
6861
+ children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "space-y-4", children: [
6862
+ connectionError ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { className: "text-sm text-ph-danger", role: "alert", children: connectionError }) : null,
6863
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
6462
6864
  "label",
6463
6865
  {
6464
6866
  className: "inline-flex w-fit cursor-pointer items-center gap-2 text-sm text-ph-ink",
6465
6867
  "data-test": `${dataTest}-bridge-only`,
6466
6868
  children: [
6467
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
6869
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
6468
6870
  "input",
6469
6871
  {
6470
6872
  type: "checkbox",
@@ -6475,27 +6877,27 @@ function SuiteIntegrationPicker({
6475
6877
  "aria-label": "Shelly Bridge only"
6476
6878
  }
6477
6879
  ),
6478
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
6880
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
6479
6881
  import_iconoir_react12.Bridge3d,
6480
6882
  {
6481
6883
  className: "h-4 w-4 shrink-0 text-ph-subtle",
6482
6884
  "aria-hidden": true
6483
6885
  }
6484
6886
  ),
6485
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { children: "Shelly Bridge only" })
6887
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { children: "Shelly Bridge only" })
6486
6888
  ]
6487
6889
  }
6488
6890
  ),
6489
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "grid gap-4 md:grid-cols-2", children: [
6490
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "relative", children: [
6491
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
6891
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "grid gap-4 md:grid-cols-2", children: [
6892
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "relative", children: [
6893
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
6492
6894
  import_iconoir_react12.Search,
6493
6895
  {
6494
6896
  className: "pointer-events-none absolute left-3 top-1/2 z-10 h-4 w-4 -translate-y-1/2 text-ph-subtle",
6495
6897
  "aria-hidden": true
6496
6898
  }
6497
6899
  ),
6498
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
6900
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
6499
6901
  Input,
6500
6902
  {
6501
6903
  value: activeSearch,
@@ -6509,8 +6911,8 @@ function SuiteIntegrationPicker({
6509
6911
  }
6510
6912
  )
6511
6913
  ] }),
6512
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { ref: categoryMenuRef, className: "relative", children: [
6513
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
6914
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { ref: categoryMenuRef, className: "relative", children: [
6915
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
6514
6916
  "button",
6515
6917
  {
6516
6918
  ref: categoryTriggerRef,
@@ -6527,17 +6929,17 @@ function SuiteIntegrationPicker({
6527
6929
  },
6528
6930
  onKeyDown: handleCategoryTriggerKeyDown,
6529
6931
  children: [
6530
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("span", { className: "flex items-center gap-2", children: [
6531
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
6932
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("span", { className: "flex items-center gap-2", children: [
6933
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
6532
6934
  import_iconoir_react12.Filter,
6533
6935
  {
6534
6936
  className: "h-4 w-4 shrink-0 text-ph-subtle",
6535
6937
  "aria-hidden": true
6536
6938
  }
6537
6939
  ),
6538
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { children: activeCategory === "all" ? "All apps" : categoryLabel(activeCategory) })
6940
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { children: activeCategory === "all" ? "All apps" : categoryLabel(activeCategory) })
6539
6941
  ] }),
6540
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
6942
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
6541
6943
  import_iconoir_react12.NavArrowDown,
6542
6944
  {
6543
6945
  className: `h-4 w-4 transition-transform ${categoryMenuOpen ? "rotate-180" : ""}`,
@@ -6547,12 +6949,12 @@ function SuiteIntegrationPicker({
6547
6949
  ]
6548
6950
  }
6549
6951
  ),
6550
- categoryMenuOpen ? /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
6952
+ categoryMenuOpen ? /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
6551
6953
  "div",
6552
6954
  {
6553
6955
  className: "absolute z-20 mt-2 max-h-[min(22rem,calc(100dvh-12rem))] w-full max-w-full overflow-hidden rounded-[var(--ph-radius-overlay)] border border-[var(--ph-border-control)] bg-[var(--ph-surface-overlay)] p-2 shadow-[var(--ph-shadow-floating)]",
6554
6956
  children: [
6555
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
6957
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
6556
6958
  Input,
6557
6959
  {
6558
6960
  ref: categorySearchRef,
@@ -6572,7 +6974,7 @@ function SuiteIntegrationPicker({
6572
6974
  }
6573
6975
  }
6574
6976
  ),
6575
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
6977
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
6576
6978
  "div",
6577
6979
  {
6578
6980
  id: `${dataTest}-category-options`,
@@ -6580,7 +6982,7 @@ function SuiteIntegrationPicker({
6580
6982
  "aria-label": "Integration categories",
6581
6983
  className: "mt-2 max-h-52 overflow-y-auto",
6582
6984
  "data-test": "integration-category-options",
6583
- children: categoryValues.map((value) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
6985
+ children: categoryValues.map((value) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
6584
6986
  "button",
6585
6987
  {
6586
6988
  type: "button",
@@ -6612,20 +7014,20 @@ function SuiteIntegrationPicker({
6612
7014
  ) : null
6613
7015
  ] })
6614
7016
  ] }),
6615
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
7017
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
6616
7018
  "div",
6617
7019
  {
6618
7020
  ref: scrollViewportRef,
6619
7021
  className: "min-h-0 max-h-[min(60vh,32rem)] w-full overflow-y-auto pr-1",
6620
7022
  children: [
6621
- loading || catalogLoading ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
7023
+ loading || catalogLoading ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
6622
7024
  "div",
6623
7025
  {
6624
7026
  className: "grid gap-3 sm:grid-cols-2 lg:grid-cols-3",
6625
7027
  "aria-label": "Loading apps",
6626
- children: Array.from({ length: SKELETON_COUNT }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(IntegrationSkeletonCard, {}, index))
7028
+ children: Array.from({ length: SKELETON_COUNT }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(IntegrationSkeletonCard, {}, index))
6627
7029
  }
6628
- ) : /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "grid gap-3 sm:grid-cols-2 lg:grid-cols-3", children: [
7030
+ ) : /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "grid gap-3 sm:grid-cols-2 lg:grid-cols-3", children: [
6629
7031
  filtered.map((item) => {
6630
7032
  var _a2, _b;
6631
7033
  const isExpanded = expanded === item.id;
@@ -6633,33 +7035,33 @@ function SuiteIntegrationPicker({
6633
7035
  const bridgeApps = suiteAppsForIntegration(item);
6634
7036
  const schemes = authSchemesFor(item);
6635
7037
  const text = isExpanded || !longDescription ? item.description : `${item.description.slice(0, DESCRIPTION_LIMIT).trimEnd()}...`;
6636
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
7038
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
6637
7039
  "div",
6638
7040
  {
6639
7041
  className: "flex min-h-36 min-w-0 flex-col justify-between rounded-[var(--ph-radius-surface)] border border-ph-border bg-ph-surface p-4",
6640
7042
  children: [
6641
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
7043
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
6642
7044
  "button",
6643
7045
  {
6644
7046
  type: "button",
6645
7047
  className: "min-w-0 text-left",
6646
7048
  onClick: () => longDescription && setExpanded(isExpanded ? null : item.id),
6647
7049
  "aria-expanded": longDescription ? isExpanded : void 0,
6648
- children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("span", { className: "flex items-start gap-3", children: [
6649
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "flex h-8 w-8 shrink-0 items-center justify-center rounded-md bg-ph-muted text-ph-ink", children: (_a2 = item.icon) != null ? _a2 : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_iconoir_react12.EvPlug, { className: "h-4 w-4", "aria-hidden": true }) }),
6650
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("span", { className: "min-w-0", children: [
6651
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "block truncate font-medium text-ph-ink", children: item.label }),
6652
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "mt-1 block text-xs text-ph-subtle", children: text }),
6653
- longDescription ? /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("span", { className: "mt-1 block text-xs font-medium text-ph-brand", children: [
7050
+ children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("span", { className: "flex items-start gap-3", children: [
7051
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "flex h-8 w-8 shrink-0 items-center justify-center rounded-md bg-ph-muted text-ph-ink", children: (_a2 = item.icon) != null ? _a2 : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_iconoir_react12.EvPlug, { className: "h-4 w-4", "aria-hidden": true }) }),
7052
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("span", { className: "min-w-0", children: [
7053
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "block truncate font-medium text-ph-ink", children: item.label }),
7054
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "mt-1 block text-xs text-ph-subtle", children: text }),
7055
+ longDescription ? /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("span", { className: "mt-1 block text-xs font-medium text-ph-brand", children: [
6654
7056
  isExpanded ? "See less" : "See more",
6655
7057
  " ",
6656
- isExpanded ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_iconoir_react12.NavArrowUp, { className: "inline h-3 w-3" }) : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_iconoir_react12.NavArrowDown, { className: "inline h-3 w-3" })
7058
+ isExpanded ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_iconoir_react12.NavArrowUp, { className: "inline h-3 w-3" }) : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_iconoir_react12.NavArrowDown, { className: "inline h-3 w-3" })
6657
7059
  ] }) : null
6658
7060
  ] })
6659
7061
  ] })
6660
7062
  }
6661
7063
  ),
6662
- bridgeApps.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
7064
+ bridgeApps.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
6663
7065
  "div",
6664
7066
  {
6665
7067
  className: "mt-3 flex flex-wrap items-center gap-1.5",
@@ -6667,7 +7069,7 @@ function SuiteIntegrationPicker({
6667
7069
  children: bridgeApps.map((app) => {
6668
7070
  const mark = BRIDGE_MARK[app];
6669
7071
  if (!mark) return null;
6670
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
7072
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
6671
7073
  "img",
6672
7074
  {
6673
7075
  src: mark.src,
@@ -6681,12 +7083,12 @@ function SuiteIntegrationPicker({
6681
7083
  })
6682
7084
  }
6683
7085
  ) : null,
6684
- schemes.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
7086
+ schemes.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
6685
7087
  "div",
6686
7088
  {
6687
7089
  className: "mt-3 flex flex-wrap gap-1.5",
6688
7090
  "aria-label": "Connection methods",
6689
- children: schemes.map((scheme) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
7091
+ children: schemes.map((scheme) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
6690
7092
  "span",
6691
7093
  {
6692
7094
  className: "rounded-full border border-ph-border bg-ph-muted px-2 py-1 text-[0.6875rem] font-medium text-ph-subtle",
@@ -6697,7 +7099,7 @@ function SuiteIntegrationPicker({
6697
7099
  ))
6698
7100
  }
6699
7101
  ) : null,
6700
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
7102
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
6701
7103
  Button,
6702
7104
  {
6703
7105
  type: "button",
@@ -6705,8 +7107,8 @@ function SuiteIntegrationPicker({
6705
7107
  className: "mt-3 self-start",
6706
7108
  disabled: Boolean(item.unavailableReason) || item.connecting,
6707
7109
  onClick: () => connectItem(item),
6708
- children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("span", { className: "flex items-center gap-1.5", children: [
6709
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_iconoir_react12.EvPlug, { className: "h-3.5 w-3.5", "aria-hidden": true }),
7110
+ children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("span", { className: "flex items-center gap-1.5", children: [
7111
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_iconoir_react12.EvPlug, { className: "h-3.5 w-3.5", "aria-hidden": true }),
6710
7112
  item.connecting ? "Connecting..." : (_b = item.unavailableReason) != null ? _b : "Connect"
6711
7113
  ] })
6712
7114
  }
@@ -6716,31 +7118,31 @@ function SuiteIntegrationPicker({
6716
7118
  item.id
6717
7119
  );
6718
7120
  }),
6719
- loadingMore ? Array.from({ length: 3 }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(IntegrationSkeletonCard, {}, `loading-${index}`)) : null
7121
+ loadingMore ? Array.from({ length: 3 }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(IntegrationSkeletonCard, {}, `loading-${index}`)) : null
6720
7122
  ] }),
6721
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { ref: loadMoreSentinelRef, className: "h-1", "aria-hidden": "true" })
7123
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { ref: loadMoreSentinelRef, className: "h-1", "aria-hidden": "true" })
6722
7124
  ]
6723
7125
  }
6724
7126
  ),
6725
- connectedItems.length > 0 && onDisconnect ? /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "space-y-2 border-t border-ph-border pt-4", children: [
6726
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("h3", { className: "font-medium text-ph-ink", children: "Connected apps" }),
6727
- connectedItems.map((item) => /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
7127
+ connectedItems.length > 0 && onDisconnect ? /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "space-y-2 border-t border-ph-border pt-4", children: [
7128
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("h3", { className: "font-medium text-ph-ink", children: "Connected apps" }),
7129
+ connectedItems.map((item) => /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
6728
7130
  "div",
6729
7131
  {
6730
7132
  className: "flex items-center justify-between gap-3 rounded-[var(--ph-radius-surface)] border border-ph-border bg-[var(--ph-surface-inset)] p-3",
6731
7133
  children: [
6732
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("span", { className: "flex min-w-0 items-center gap-2 text-sm text-ph-ink", children: [
7134
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("span", { className: "flex min-w-0 items-center gap-2 text-sm text-ph-ink", children: [
6733
7135
  item.icon,
6734
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "truncate", children: item.label })
7136
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "truncate", children: item.label })
6735
7137
  ] }),
6736
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
7138
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
6737
7139
  Button,
6738
7140
  {
6739
7141
  type: "button",
6740
7142
  variant: "danger",
6741
7143
  onClick: () => requestDisconnect(item),
6742
- children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("span", { className: "flex items-center gap-1.5", children: [
6743
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_iconoir_react12.Xmark, { className: "h-4 w-4", "aria-hidden": true }),
7144
+ children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("span", { className: "flex items-center gap-1.5", children: [
7145
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_iconoir_react12.Xmark, { className: "h-4 w-4", "aria-hidden": true }),
6744
7146
  "Disconnect"
6745
7147
  ] })
6746
7148
  }
@@ -6753,7 +7155,7 @@ function SuiteIntegrationPicker({
6753
7155
  ] })
6754
7156
  }
6755
7157
  ),
6756
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
7158
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
6757
7159
  Modal,
6758
7160
  {
6759
7161
  open: itemToDisconnect !== null,
@@ -6765,8 +7167,8 @@ function SuiteIntegrationPicker({
6765
7167
  size: "sm",
6766
7168
  zIndex: 220,
6767
7169
  dataTest: `${dataTest}-disconnect-confirmation`,
6768
- footer: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex justify-end gap-2", children: [
6769
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
7170
+ footer: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex justify-end gap-2", children: [
7171
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
6770
7172
  Button,
6771
7173
  {
6772
7174
  type: "button",
@@ -6776,7 +7178,7 @@ function SuiteIntegrationPicker({
6776
7178
  children: "Cancel"
6777
7179
  }
6778
7180
  ),
6779
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
7181
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
6780
7182
  Button,
6781
7183
  {
6782
7184
  type: "button",
@@ -6789,8 +7191,8 @@ function SuiteIntegrationPicker({
6789
7191
  )
6790
7192
  ] }),
6791
7193
  children: [
6792
- disconnectError ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { className: "text-sm text-ph-danger", role: "alert", children: disconnectError }) : null,
6793
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("p", { className: "text-sm text-ph-ink", children: [
7194
+ disconnectError ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { className: "text-sm text-ph-danger", role: "alert", children: disconnectError }) : null,
7195
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("p", { className: "text-sm text-ph-ink", children: [
6794
7196
  "Disconnect ",
6795
7197
  itemToDisconnect == null ? void 0 : itemToDisconnect.label,
6796
7198
  "? You can reconnect it later."
@@ -6798,7 +7200,7 @@ function SuiteIntegrationPicker({
6798
7200
  ]
6799
7201
  }
6800
7202
  ),
6801
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
7203
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
6802
7204
  Modal,
6803
7205
  {
6804
7206
  open: Boolean(methodItem),
@@ -6808,7 +7210,7 @@ function SuiteIntegrationPicker({
6808
7210
  size: "sm",
6809
7211
  zIndex: 200,
6810
7212
  dataTest: `${dataTest}-auth-method`,
6811
- children: methodItem ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "space-y-2", children: authSchemesFor(methodItem).map((scheme) => /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
7213
+ children: methodItem ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "space-y-2", children: authSchemesFor(methodItem).map((scheme) => /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
6812
7214
  "button",
6813
7215
  {
6814
7216
  type: "button",
@@ -6816,15 +7218,15 @@ function SuiteIntegrationPicker({
6816
7218
  onClick: () => void prepareConnection(methodItem, scheme),
6817
7219
  "data-test": `${dataTest}-choose-${scheme.toLowerCase()}`,
6818
7220
  children: [
6819
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "font-medium", children: authSchemeLabel(scheme) }),
6820
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "text-xs text-ph-subtle", children: "Select" })
7221
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "font-medium", children: authSchemeLabel(scheme) }),
7222
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "text-xs text-ph-subtle", children: "Select" })
6821
7223
  ]
6822
7224
  },
6823
7225
  scheme
6824
7226
  )) }) : null
6825
7227
  }
6826
7228
  ),
6827
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
7229
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
6828
7230
  Modal,
6829
7231
  {
6830
7232
  open: Boolean(authItem),
@@ -6834,14 +7236,14 @@ function SuiteIntegrationPicker({
6834
7236
  size: "md",
6835
7237
  zIndex: 210,
6836
7238
  dataTest: `${dataTest}-auth-form`,
6837
- children: authLoading ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { className: "text-sm text-ph-subtle", children: "Loading authentication fields..." }) : authItem ? /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
7239
+ children: authLoading ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { className: "text-sm text-ph-subtle", children: "Loading authentication fields..." }) : authItem ? /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
6838
7240
  "form",
6839
7241
  {
6840
7242
  className: "space-y-4",
6841
7243
  onSubmit: (event) => void submitAuthForm(event),
6842
7244
  children: [
6843
- authError ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { className: "text-sm text-ph-danger", role: "alert", children: authError }) : null,
6844
- authItem.fields.length === 0 && authError ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
7245
+ authError ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { className: "text-sm text-ph-danger", role: "alert", children: authError }) : null,
7246
+ authItem.fields.length === 0 && authError ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
6845
7247
  Button,
6846
7248
  {
6847
7249
  type: "button",
@@ -6852,7 +7254,7 @@ function SuiteIntegrationPicker({
6852
7254
  ) : null,
6853
7255
  authItem.fields.map((field) => {
6854
7256
  var _a2, _b;
6855
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
7257
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
6856
7258
  Input,
6857
7259
  {
6858
7260
  label: field.label,
@@ -6868,8 +7270,8 @@ function SuiteIntegrationPicker({
6868
7270
  field.name
6869
7271
  );
6870
7272
  }),
6871
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex justify-end gap-2 border-t border-ph-border pt-4", children: [
6872
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
7273
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex justify-end gap-2 border-t border-ph-border pt-4", children: [
7274
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
6873
7275
  Button,
6874
7276
  {
6875
7277
  type: "button",
@@ -6879,7 +7281,7 @@ function SuiteIntegrationPicker({
6879
7281
  children: "Cancel"
6880
7282
  }
6881
7283
  ),
6882
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Button, { type: "submit", variant: "primary", disabled: authSubmitting, children: authSubmitting ? "Connecting..." : "Connect" })
7284
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Button, { type: "submit", variant: "primary", disabled: authSubmitting, children: authSubmitting ? "Connecting..." : "Connect" })
6883
7285
  ] })
6884
7286
  ]
6885
7287
  }
@@ -6892,7 +7294,7 @@ function SuiteIntegrationPicker({
6892
7294
  // src/suite/components/suite-integration-rules.tsx
6893
7295
  var import_react28 = require("react");
6894
7296
  var import_iconoir_react13 = require("iconoir-react");
6895
- var import_jsx_runtime42 = require("react/jsx-runtime");
7297
+ var import_jsx_runtime43 = require("react/jsx-runtime");
6896
7298
  var ACTION_LABELS = {
6897
7299
  create_tides_task: "Create a Tides task",
6898
7300
  draft_time_entry: "Draft a time entry",
@@ -6998,20 +7400,20 @@ function SuiteIntegrationRules({
6998
7400
  setBusyId(null);
6999
7401
  }
7000
7402
  }
7001
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("section", { className: "space-y-4", "data-test": dataTest, children: [
7002
- /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
7403
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("section", { className: "space-y-4", "data-test": dataTest, children: [
7404
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
7003
7405
  Card,
7004
7406
  {
7005
7407
  variant: "outlined",
7006
7408
  bodyClassName: "p-5",
7007
7409
  "data-test": `${dataTest}-card`,
7008
7410
  children: [
7009
- /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between", children: [
7010
- /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { children: [
7011
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("h3", { className: "font-medium text-ph-ink", children: "Automation rules" }),
7012
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { className: "mt-1 text-sm text-ph-subtle", children: "Turn incoming integration events into tasks, time entries, or notifications for this workspace." })
7411
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between", children: [
7412
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { children: [
7413
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("h3", { className: "font-medium text-ph-ink", children: "Automation rules" }),
7414
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { className: "mt-1 text-sm text-ph-subtle", children: "Turn incoming integration events into tasks, time entries, or notifications for this workspace." })
7013
7415
  ] }),
7014
- canManage && onCreate ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
7416
+ canManage && onCreate ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
7015
7417
  Button,
7016
7418
  {
7017
7419
  type: "button",
@@ -7019,14 +7421,14 @@ function SuiteIntegrationRules({
7019
7421
  size: "sm",
7020
7422
  onClick: () => setFormOpen((open) => !open),
7021
7423
  "data-test": `${dataTest}-new`,
7022
- children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("span", { className: "flex items-center gap-1.5", children: [
7023
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_iconoir_react13.Plus, { className: "h-4 w-4", "aria-hidden": true }),
7424
+ children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("span", { className: "flex items-center gap-1.5", children: [
7425
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_iconoir_react13.Plus, { className: "h-4 w-4", "aria-hidden": true }),
7024
7426
  "New rule"
7025
7427
  ] })
7026
7428
  }
7027
7429
  ) : null
7028
7430
  ] }),
7029
- error ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
7431
+ error ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
7030
7432
  Alert,
7031
7433
  {
7032
7434
  status: "danger",
@@ -7034,36 +7436,36 @@ function SuiteIntegrationRules({
7034
7436
  description: error
7035
7437
  }
7036
7438
  ) : null,
7037
- loading ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { className: "mt-4 text-sm text-ph-subtle", children: "Loading rules..." }) : rules.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
7439
+ loading ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { className: "mt-4 text-sm text-ph-subtle", children: "Loading rules..." }) : rules.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
7038
7440
  "div",
7039
7441
  {
7040
7442
  className: "mt-4 rounded-[var(--ph-radius-surface)] border border-dashed border-ph-border bg-[var(--ph-surface-inset)] px-4 py-6 text-center",
7041
7443
  "data-test": `${dataTest}-empty`,
7042
- children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("p", { className: "text-sm text-ph-subtle", children: [
7444
+ children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("p", { className: "text-sm text-ph-subtle", children: [
7043
7445
  "No automation rules yet.",
7044
7446
  canManage ? " Create one to get started." : ""
7045
7447
  ] })
7046
7448
  }
7047
- ) : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("ul", { className: "mt-4 space-y-2", "data-test": `${dataTest}-list`, children: rules.map((rule) => /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
7449
+ ) : /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("ul", { className: "mt-4 space-y-2", "data-test": `${dataTest}-list`, children: rules.map((rule) => /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
7048
7450
  "li",
7049
7451
  {
7050
7452
  className: "flex items-center justify-between gap-3 rounded-[var(--ph-radius-surface)] border border-ph-border bg-[var(--ph-surface-inset)] px-3 py-3",
7051
7453
  "data-test": `${dataTest}-rule-${rule.id}`,
7052
7454
  children: [
7053
- /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "min-w-0", children: [
7054
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { className: "truncate text-sm font-medium text-ph-ink", children: rule.name }),
7055
- /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("p", { className: "mt-0.5 truncate text-xs text-ph-subtle", children: [
7455
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "min-w-0", children: [
7456
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { className: "truncate text-sm font-medium text-ph-ink", children: rule.name }),
7457
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("p", { className: "mt-0.5 truncate text-xs text-ph-subtle", children: [
7056
7458
  rule.trigger_event_type,
7057
7459
  " \u2192 ",
7058
7460
  actionLabel(rule.action_type)
7059
7461
  ] }),
7060
- /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("p", { className: "mt-0.5 truncate text-xs text-ph-subtle", children: [
7462
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("p", { className: "mt-0.5 truncate text-xs text-ph-subtle", children: [
7061
7463
  "Last fired: ",
7062
7464
  formatDateTime(rule.last_fired_at)
7063
7465
  ] })
7064
7466
  ] }),
7065
- canManage ? /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex shrink-0 items-center gap-2", children: [
7066
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
7467
+ canManage ? /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex shrink-0 items-center gap-2", children: [
7468
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
7067
7469
  Toggle,
7068
7470
  {
7069
7471
  checked: rule.enabled,
@@ -7072,7 +7474,7 @@ function SuiteIntegrationRules({
7072
7474
  "aria-label": `Enable ${rule.name}`
7073
7475
  }
7074
7476
  ),
7075
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
7477
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
7076
7478
  Button,
7077
7479
  {
7078
7480
  type: "button",
@@ -7081,10 +7483,10 @@ function SuiteIntegrationRules({
7081
7483
  disabled: busyId === rule.id,
7082
7484
  onClick: () => requestDelete(rule),
7083
7485
  "aria-label": `Delete ${rule.name}`,
7084
- children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_iconoir_react13.Xmark, { className: "h-4 w-4", "aria-hidden": true })
7486
+ children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_iconoir_react13.Xmark, { className: "h-4 w-4", "aria-hidden": true })
7085
7487
  }
7086
7488
  )
7087
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
7489
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
7088
7490
  Badge,
7089
7491
  {
7090
7492
  variant: rule.enabled ? "success" : "neutral",
@@ -7096,15 +7498,15 @@ function SuiteIntegrationRules({
7096
7498
  },
7097
7499
  rule.id
7098
7500
  )) }),
7099
- canManage && formOpen && onCreate ? /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
7501
+ canManage && formOpen && onCreate ? /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
7100
7502
  "form",
7101
7503
  {
7102
7504
  className: "mt-4 space-y-3 rounded-[var(--ph-radius-surface)] border border-ph-border bg-ph-surface p-4",
7103
7505
  onSubmit: (event) => void submitForm(event),
7104
7506
  "data-test": `${dataTest}-form`,
7105
7507
  children: [
7106
- formError ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { className: "text-sm text-ph-danger", role: "alert", children: formError }) : null,
7107
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
7508
+ formError ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { className: "text-sm text-ph-danger", role: "alert", children: formError }) : null,
7509
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
7108
7510
  Input,
7109
7511
  {
7110
7512
  label: "Rule name",
@@ -7115,7 +7517,7 @@ function SuiteIntegrationRules({
7115
7517
  "data-test": `${dataTest}-name`
7116
7518
  }
7117
7519
  ),
7118
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
7520
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
7119
7521
  Input,
7120
7522
  {
7121
7523
  label: "Trigger event type",
@@ -7127,7 +7529,7 @@ function SuiteIntegrationRules({
7127
7529
  "data-test": `${dataTest}-trigger`
7128
7530
  }
7129
7531
  ),
7130
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
7532
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
7131
7533
  Select,
7132
7534
  {
7133
7535
  label: "Action",
@@ -7136,10 +7538,10 @@ function SuiteIntegrationRules({
7136
7538
  event.target.value
7137
7539
  ),
7138
7540
  "data-test": `${dataTest}-action`,
7139
- children: Object.entries(ACTION_LABELS).map(([value, label]) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("option", { value, children: label }, value))
7541
+ children: Object.entries(ACTION_LABELS).map(([value, label]) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("option", { value, children: label }, value))
7140
7542
  }
7141
7543
  ),
7142
- needsProject ? /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
7544
+ needsProject ? /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
7143
7545
  Select,
7144
7546
  {
7145
7547
  label: "Project",
@@ -7147,12 +7549,12 @@ function SuiteIntegrationRules({
7147
7549
  onChange: (event) => setProjectId(event.target.value),
7148
7550
  "data-test": `${dataTest}-project`,
7149
7551
  children: [
7150
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("option", { value: "", children: "Choose a project..." }),
7151
- projects.map((project) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("option", { value: project.id, children: project.name }, project.id))
7552
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("option", { value: "", children: "Choose a project..." }),
7553
+ projects.map((project) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("option", { value: project.id, children: project.name }, project.id))
7152
7554
  ]
7153
7555
  }
7154
7556
  ) : null,
7155
- actionType === "draft_time_entry" ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
7557
+ actionType === "draft_time_entry" ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
7156
7558
  Input,
7157
7559
  {
7158
7560
  label: "Minutes (optional)",
@@ -7163,7 +7565,7 @@ function SuiteIntegrationRules({
7163
7565
  "data-test": `${dataTest}-minutes`
7164
7566
  }
7165
7567
  ) : null,
7166
- actionType === "create_tides_task" ? /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
7568
+ actionType === "create_tides_task" ? /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
7167
7569
  Select,
7168
7570
  {
7169
7571
  label: "Priority",
@@ -7171,15 +7573,15 @@ function SuiteIntegrationRules({
7171
7573
  onChange: (event) => setPriority(event.target.value),
7172
7574
  "data-test": `${dataTest}-priority`,
7173
7575
  children: [
7174
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("option", { value: "low", children: "Low" }),
7175
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("option", { value: "medium", children: "Medium" }),
7176
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("option", { value: "high", children: "High" }),
7177
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("option", { value: "urgent", children: "Urgent" })
7576
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("option", { value: "low", children: "Low" }),
7577
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("option", { value: "medium", children: "Medium" }),
7578
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("option", { value: "high", children: "High" }),
7579
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("option", { value: "urgent", children: "Urgent" })
7178
7580
  ]
7179
7581
  }
7180
7582
  ) : null,
7181
- /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex justify-end gap-2 border-t border-ph-border pt-3", children: [
7182
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
7583
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex justify-end gap-2 border-t border-ph-border pt-3", children: [
7584
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
7183
7585
  Button,
7184
7586
  {
7185
7587
  type: "button",
@@ -7189,7 +7591,7 @@ function SuiteIntegrationRules({
7189
7591
  children: "Cancel"
7190
7592
  }
7191
7593
  ),
7192
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Button, { type: "submit", variant: "primary", disabled: submitting, children: submitting ? "Creating..." : "Create rule" })
7594
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Button, { type: "submit", variant: "primary", disabled: submitting, children: submitting ? "Creating..." : "Create rule" })
7193
7595
  ] })
7194
7596
  ]
7195
7597
  }
@@ -7197,7 +7599,7 @@ function SuiteIntegrationRules({
7197
7599
  ]
7198
7600
  }
7199
7601
  ),
7200
- /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
7602
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
7201
7603
  Modal,
7202
7604
  {
7203
7605
  open: ruleToDelete !== null,
@@ -7207,8 +7609,8 @@ function SuiteIntegrationRules({
7207
7609
  title: "Delete automation rule",
7208
7610
  description: "This action cannot be undone.",
7209
7611
  dataTest: `${dataTest}-delete-confirmation`,
7210
- footer: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex justify-end gap-2", children: [
7211
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
7612
+ footer: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex justify-end gap-2", children: [
7613
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
7212
7614
  Button,
7213
7615
  {
7214
7616
  type: "button",
@@ -7218,7 +7620,7 @@ function SuiteIntegrationRules({
7218
7620
  children: "Cancel"
7219
7621
  }
7220
7622
  ),
7221
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
7623
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
7222
7624
  Button,
7223
7625
  {
7224
7626
  type: "button",
@@ -7231,8 +7633,8 @@ function SuiteIntegrationRules({
7231
7633
  )
7232
7634
  ] }),
7233
7635
  children: [
7234
- deleteError ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { className: "text-sm text-ph-danger", role: "alert", children: deleteError }) : null,
7235
- /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("p", { className: "text-sm text-ph-ink", children: [
7636
+ deleteError ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { className: "text-sm text-ph-danger", role: "alert", children: deleteError }) : null,
7637
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("p", { className: "text-sm text-ph-ink", children: [
7236
7638
  "Delete ",
7237
7639
  ruleToDelete == null ? void 0 : ruleToDelete.name,
7238
7640
  "? This cannot be undone."
@@ -7240,36 +7642,36 @@ function SuiteIntegrationRules({
7240
7642
  ]
7241
7643
  }
7242
7644
  ),
7243
- /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
7645
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
7244
7646
  Card,
7245
7647
  {
7246
7648
  variant: "outlined",
7247
7649
  bodyClassName: "p-5",
7248
7650
  "data-test": `${dataTest}-events-card`,
7249
7651
  children: [
7250
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("h3", { className: "font-medium text-ph-ink", children: "Recent events" }),
7251
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { className: "mt-1 text-sm text-ph-subtle", children: "The latest events received from your connected apps." }),
7252
- events.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
7652
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("h3", { className: "font-medium text-ph-ink", children: "Recent events" }),
7653
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { className: "mt-1 text-sm text-ph-subtle", children: "The latest events received from your connected apps." }),
7654
+ events.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
7253
7655
  "p",
7254
7656
  {
7255
7657
  className: "mt-4 rounded-[var(--ph-radius-surface)] border border-dashed border-ph-border bg-[var(--ph-surface-inset)] px-4 py-6 text-center text-sm text-ph-subtle",
7256
7658
  "data-test": `${dataTest}-events-empty`,
7257
7659
  children: "No integration events yet."
7258
7660
  }
7259
- ) : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("ul", { className: "mt-4 space-y-2", "data-test": `${dataTest}-events-list`, children: events.map((event) => /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
7661
+ ) : /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("ul", { className: "mt-4 space-y-2", "data-test": `${dataTest}-events-list`, children: events.map((event) => /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
7260
7662
  "li",
7261
7663
  {
7262
7664
  className: "flex items-center justify-between gap-3 rounded-[var(--ph-radius-surface)] border border-ph-border bg-[var(--ph-surface-inset)] px-3 py-2",
7263
7665
  children: [
7264
- /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "min-w-0", children: [
7265
- /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("p", { className: "truncate text-sm text-ph-ink", children: [
7666
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "min-w-0", children: [
7667
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("p", { className: "truncate text-sm text-ph-ink", children: [
7266
7668
  event.provider,
7267
7669
  " \xB7 ",
7268
7670
  event.event_type
7269
7671
  ] }),
7270
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { className: "mt-0.5 text-xs text-ph-subtle", children: formatDateTime(event.created_at) })
7672
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { className: "mt-0.5 text-xs text-ph-subtle", children: formatDateTime(event.created_at) })
7271
7673
  ] }),
7272
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
7674
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
7273
7675
  Badge,
7274
7676
  {
7275
7677
  variant: event.processed_at ? "success" : "warning",
@@ -7347,7 +7749,7 @@ function paletteIconSrc(imageUrl, color) {
7347
7749
  }
7348
7750
 
7349
7751
  // src/suite/components/suite-entity-icon.tsx
7350
- var import_jsx_runtime43 = require("react/jsx-runtime");
7752
+ var import_jsx_runtime44 = require("react/jsx-runtime");
7351
7753
  function SuiteEntityIcon({
7352
7754
  imageUrl,
7353
7755
  label,
@@ -7362,7 +7764,7 @@ function SuiteEntityIcon({
7362
7764
  const neutralBackground = "var(--ph-muted, rgba(127,127,127,0.08))";
7363
7765
  if (imageUrl) {
7364
7766
  const src = tinted && tint ? paletteIconSrc(imageUrl, tint) : imageUrl;
7365
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
7767
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
7366
7768
  "span",
7367
7769
  {
7368
7770
  className: cn2(
@@ -7373,11 +7775,11 @@ function SuiteEntityIcon({
7373
7775
  style: __spreadValues({
7374
7776
  backgroundColor: tint ? `${tint}18` : neutralBackground
7375
7777
  }, style),
7376
- children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("img", { src: src != null ? src : void 0, alt: "", className: "h-full w-full object-contain" })
7778
+ children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("img", { src: src != null ? src : void 0, alt: "", className: "h-full w-full object-contain" })
7377
7779
  }
7378
7780
  );
7379
7781
  }
7380
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
7782
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
7381
7783
  "span",
7382
7784
  {
7383
7785
  className: cn2(
@@ -7391,7 +7793,7 @@ function SuiteEntityIcon({
7391
7793
  }, style),
7392
7794
  "aria-hidden": "true",
7393
7795
  title: label != null ? label : void 0,
7394
- children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
7796
+ children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
7395
7797
  import_iconoir_react14.Folder,
7396
7798
  {
7397
7799
  className: "h-[88%] w-[88%]",
@@ -7406,7 +7808,7 @@ function SuiteEntityIcon({
7406
7808
  // src/suite/components/suite-palette-library.tsx
7407
7809
  var import_react29 = require("react");
7408
7810
  var import_iconoir_react15 = require("iconoir-react");
7409
- var import_jsx_runtime44 = require("react/jsx-runtime");
7811
+ var import_jsx_runtime45 = require("react/jsx-runtime");
7410
7812
  var PAGE_SIZE = 60;
7411
7813
  var DISCOVER_LIMIT = 120;
7412
7814
  var ICON_TYPES = [
@@ -7424,15 +7826,15 @@ function FilterSelect({
7424
7826
  onChange,
7425
7827
  children
7426
7828
  }) {
7427
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "relative", children: [
7428
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
7829
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "relative", children: [
7830
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
7429
7831
  Icon,
7430
7832
  {
7431
7833
  className: "pointer-events-none absolute left-2.5 top-1/2 h-4 w-4 -translate-y-1/2 text-ph-mutedtext",
7432
7834
  "aria-hidden": true
7433
7835
  }
7434
7836
  ),
7435
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
7837
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
7436
7838
  "select",
7437
7839
  {
7438
7840
  "aria-label": label,
@@ -7442,7 +7844,7 @@ function FilterSelect({
7442
7844
  children
7443
7845
  }
7444
7846
  ),
7445
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
7847
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
7446
7848
  import_iconoir_react15.NavArrowDown,
7447
7849
  {
7448
7850
  className: "pointer-events-none absolute right-2 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-ph-mutedtext",
@@ -7643,18 +8045,18 @@ function SuitePaletteLibrary({
7643
8045
  event.preventDefault();
7644
8046
  (_c = options[nextIndex]) == null ? void 0 : _c.focus();
7645
8047
  };
7646
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "space-y-3", "data-test": "palette-icon-library", children: [
7647
- /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { ref: libraryRef, className: "space-y-2", children: [
7648
- /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "flex flex-col gap-2 sm:flex-row", children: [
7649
- /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "relative flex-1", children: [
7650
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
8048
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "space-y-3", "data-test": "palette-icon-library", children: [
8049
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { ref: libraryRef, className: "space-y-2", children: [
8050
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex flex-col gap-2 sm:flex-row", children: [
8051
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "relative flex-1", children: [
8052
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
7651
8053
  import_iconoir_react15.Search,
7652
8054
  {
7653
8055
  className: "pointer-events-none absolute left-2.5 top-1/2 h-4 w-4 -translate-y-1/2 text-ph-mutedtext",
7654
8056
  "aria-hidden": true
7655
8057
  }
7656
8058
  ),
7657
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
8059
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
7658
8060
  "input",
7659
8061
  {
7660
8062
  type: "search",
@@ -7666,7 +8068,7 @@ function SuitePaletteLibrary({
7666
8068
  }
7667
8069
  )
7668
8070
  ] }),
7669
- /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
8071
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
7670
8072
  "button",
7671
8073
  {
7672
8074
  ref: libraryTriggerRef,
@@ -7683,9 +8085,9 @@ function SuitePaletteLibrary({
7683
8085
  },
7684
8086
  className: "ph-input flex items-center gap-2 px-2.5 py-2 text-sm text-ph-ink",
7685
8087
  children: [
7686
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_iconoir_react15.FilterList, { className: "h-4 w-4 shrink-0 text-ph-mutedtext", "aria-hidden": true }),
7687
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "max-w-[10rem] truncate", children: (_b = activeLibrary == null ? void 0 : activeLibrary.name) != null ? _b : "All libraries" }),
7688
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
8088
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_iconoir_react15.FilterList, { className: "h-4 w-4 shrink-0 text-ph-mutedtext", "aria-hidden": true }),
8089
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "max-w-[10rem] truncate", children: (_b = activeLibrary == null ? void 0 : activeLibrary.name) != null ? _b : "All libraries" }),
8090
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
7689
8091
  import_iconoir_react15.NavArrowDown,
7690
8092
  {
7691
8093
  className: cn2(
@@ -7698,27 +8100,27 @@ function SuitePaletteLibrary({
7698
8100
  ]
7699
8101
  }
7700
8102
  ),
7701
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
8103
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
7702
8104
  FilterSelect,
7703
8105
  {
7704
8106
  icon: import_iconoir_react15.Filter,
7705
8107
  label: "Filter by icon type",
7706
8108
  value: typeFilter,
7707
8109
  onChange: setTypeFilter,
7708
- children: ICON_TYPES.map((type) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("option", { value: type.value, children: type.label }, type.value))
8110
+ children: ICON_TYPES.map((type) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("option", { value: type.value, children: type.label }, type.value))
7709
8111
  }
7710
8112
  )
7711
8113
  ] }),
7712
- libraryOpen ? /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "rounded-[var(--ph-radius-overlay)] border border-[var(--ph-border-control)] bg-[var(--ph-surface-overlay)] p-2 shadow-[var(--ph-shadow-floating)]", children: [
7713
- /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "relative mb-2", children: [
7714
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
8114
+ libraryOpen ? /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "rounded-[var(--ph-radius-overlay)] border border-[var(--ph-border-control)] bg-[var(--ph-surface-overlay)] p-2 shadow-[var(--ph-shadow-floating)]", children: [
8115
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "relative mb-2", children: [
8116
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
7715
8117
  import_iconoir_react15.Search,
7716
8118
  {
7717
8119
  className: "pointer-events-none absolute left-2.5 top-1/2 h-4 w-4 -translate-y-1/2 text-ph-mutedtext",
7718
8120
  "aria-hidden": true
7719
8121
  }
7720
8122
  ),
7721
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
8123
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
7722
8124
  "input",
7723
8125
  {
7724
8126
  type: "search",
@@ -7741,7 +8143,7 @@ function SuitePaletteLibrary({
7741
8143
  }
7742
8144
  )
7743
8145
  ] }),
7744
- /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
8146
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
7745
8147
  "ul",
7746
8148
  {
7747
8149
  role: "listbox",
@@ -7749,7 +8151,7 @@ function SuitePaletteLibrary({
7749
8151
  "aria-label": "Libraries",
7750
8152
  className: "max-h-56 overflow-y-auto",
7751
8153
  children: [
7752
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
8154
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
7753
8155
  "button",
7754
8156
  {
7755
8157
  type: "button",
@@ -7768,7 +8170,7 @@ function SuitePaletteLibrary({
7768
8170
  children: "All libraries"
7769
8171
  }
7770
8172
  ) }),
7771
- filteredLibraries.map((collection) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
8173
+ filteredLibraries.map((collection) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
7772
8174
  "button",
7773
8175
  {
7774
8176
  type: "button",
@@ -7785,19 +8187,19 @@ function SuitePaletteLibrary({
7785
8187
  collectionFilter === collection.slug ? "bg-[var(--ph-selected-bg)] text-[var(--ph-selected-text)]" : "text-ph-ink hover:bg-[var(--ph-surface-hover)]"
7786
8188
  ),
7787
8189
  children: [
7788
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "truncate", children: collection.name }),
7789
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "shrink-0 text-xs text-ph-mutedtext", children: collection.count })
8190
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "truncate", children: collection.name }),
8191
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "shrink-0 text-xs text-ph-mutedtext", children: collection.count })
7790
8192
  ]
7791
8193
  }
7792
8194
  ) }, collection.slug)),
7793
- filteredLibraries.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("li", { className: "px-2 py-4 text-center text-sm text-ph-mutedtext", children: "No libraries match." }) : null
8195
+ filteredLibraries.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("li", { className: "px-2 py-4 text-center text-sm text-ph-mutedtext", children: "No libraries match." }) : null
7794
8196
  ]
7795
8197
  }
7796
8198
  )
7797
8199
  ] }) : null
7798
8200
  ] }),
7799
- error ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("p", { className: "text-sm text-ph-danger", children: error }) : loading ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("p", { className: "py-8 text-center text-sm text-ph-mutedtext", children: "Loading icons\u2026" }) : icons.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("p", { className: "py-8 text-center text-sm text-ph-mutedtext", children: "No icons matched. Try another word or filter." }) : /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_jsx_runtime44.Fragment, { children: [
7800
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "max-h-[320px] overflow-y-auto rounded-[var(--ph-radius-surface)] border border-ph-border p-2 focus-within:border-[var(--ph-selected-border)]", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "grid grid-cols-6 gap-1.5 sm:grid-cols-8", children: icons.map((icon) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
8201
+ error ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: "text-sm text-ph-danger", children: error }) : loading ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: "py-8 text-center text-sm text-ph-mutedtext", children: "Loading icons\u2026" }) : icons.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: "py-8 text-center text-sm text-ph-mutedtext", children: "No icons matched. Try another word or filter." }) : /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_jsx_runtime45.Fragment, { children: [
8202
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "max-h-[320px] overflow-y-auto rounded-[var(--ph-radius-surface)] border border-ph-border p-2 focus-within:border-[var(--ph-selected-border)]", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "grid grid-cols-6 gap-1.5 sm:grid-cols-8", children: icons.map((icon) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
7801
8203
  "button",
7802
8204
  {
7803
8205
  type: "button",
@@ -7805,7 +8207,7 @@ function SuitePaletteLibrary({
7805
8207
  title: icon.name,
7806
8208
  "aria-label": `Use ${icon.name}`,
7807
8209
  className: "flex h-10 items-center justify-center rounded-[var(--ph-radius-control)] border border-transparent p-1.5 hover:border-[var(--ph-selected-border)] hover:bg-[var(--ph-surface-hover)] focus-visible:outline-none focus-visible:shadow-[var(--ph-focus-halo)]",
7808
- children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
8210
+ children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
7809
8211
  "img",
7810
8212
  {
7811
8213
  src: icon.url,
@@ -7818,14 +8220,14 @@ function SuitePaletteLibrary({
7818
8220
  },
7819
8221
  icon.id
7820
8222
  )) }) }),
7821
- /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "flex items-center justify-between text-xs text-ph-mutedtext", children: [
7822
- /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("span", { children: [
8223
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex items-center justify-between text-xs text-ph-mutedtext", children: [
8224
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("span", { children: [
7823
8225
  icons.length,
7824
8226
  " of ",
7825
8227
  total,
7826
8228
  searching ? " matching" : activeLibrary ? ` in ${activeLibrary.name}` : " across all libraries"
7827
8229
  ] }),
7828
- !searching && activeLibrary && icons.length < total ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
8230
+ !searching && activeLibrary && icons.length < total ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
7829
8231
  "button",
7830
8232
  {
7831
8233
  type: "button",
@@ -7844,7 +8246,7 @@ function SuitePaletteLibrary({
7844
8246
  }
7845
8247
 
7846
8248
  // src/suite/components/suite-clients-projects-directory.tsx
7847
- var import_jsx_runtime45 = require("react/jsx-runtime");
8249
+ var import_jsx_runtime46 = require("react/jsx-runtime");
7848
8250
  var DEFAULT_ICON = "";
7849
8251
  var DEFAULT_COLOR = "";
7850
8252
  function DirectoryIconPicker({
@@ -7855,11 +8257,11 @@ function DirectoryIconPicker({
7855
8257
  onClear,
7856
8258
  onBrowse
7857
8259
  }) {
7858
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "space-y-2", children: [
7859
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "mb-1.5 block text-sm font-medium text-ph-ink", children: "Icon" }),
7860
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "rounded-[var(--ph-radius-surface)] border border-ph-border bg-[var(--ph-surface-inset)] p-3", children: [
7861
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex items-center gap-3", children: [
7862
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
8260
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "space-y-2", children: [
8261
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "mb-1.5 block text-sm font-medium text-ph-ink", children: "Icon" }),
8262
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "rounded-[var(--ph-radius-surface)] border border-ph-border bg-[var(--ph-surface-inset)] p-3", children: [
8263
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex items-center gap-3", children: [
8264
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
7863
8265
  SuiteEntityIcon,
7864
8266
  {
7865
8267
  imageUrl: preview,
@@ -7869,11 +8271,11 @@ function DirectoryIconPicker({
7869
8271
  className: "h-9 w-9 text-base"
7870
8272
  }
7871
8273
  ),
7872
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "min-w-0 flex-1", children: [
7873
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: "text-sm font-medium text-ph-ink", children: preview ? "Custom image" : "No icon yet" }),
7874
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: "text-xs text-ph-mutedtext", children: preview ? "Shown on cards and lists." : "Browse the library or upload your own." })
8274
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "min-w-0 flex-1", children: [
8275
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { className: "text-sm font-medium text-ph-ink", children: preview ? "Custom image" : "No icon yet" }),
8276
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { className: "text-xs text-ph-mutedtext", children: preview ? "Shown on cards and lists." : "Browse the library or upload your own." })
7875
8277
  ] }),
7876
- onBrowse ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
8278
+ onBrowse ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
7877
8279
  "button",
7878
8280
  {
7879
8281
  type: "button",
@@ -7883,7 +8285,7 @@ function DirectoryIconPicker({
7883
8285
  }
7884
8286
  ) : null
7885
8287
  ] }),
7886
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "mt-3", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
8288
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "mt-3", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
7887
8289
  FileUpload,
7888
8290
  {
7889
8291
  accept: "image/png,image/jpeg,image/gif,image/webp,image/svg+xml,.svg",
@@ -7893,14 +8295,14 @@ function DirectoryIconPicker({
7893
8295
  }
7894
8296
  }
7895
8297
  ) }),
7896
- preview ? /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
8298
+ preview ? /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
7897
8299
  "button",
7898
8300
  {
7899
8301
  type: "button",
7900
8302
  className: "mt-2 inline-flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-ph-mutedtext hover:bg-ph-surface hover:text-ph-ink",
7901
8303
  onClick: onClear,
7902
8304
  children: [
7903
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_iconoir_react16.Trash, { className: "h-3.5 w-3.5", "aria-hidden": true }),
8305
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_iconoir_react16.Trash, { className: "h-3.5 w-3.5", "aria-hidden": true }),
7904
8306
  " Remove image"
7905
8307
  ]
7906
8308
  }
@@ -7911,7 +8313,7 @@ function DirectoryIconPicker({
7911
8313
  function DirectoryIcon({
7912
8314
  item
7913
8315
  }) {
7914
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
8316
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
7915
8317
  SuiteEntityIcon,
7916
8318
  {
7917
8319
  imageUrl: item.icon_image,
@@ -8141,10 +8543,10 @@ function SuiteClientsProjectsDirectory({
8141
8543
  );
8142
8544
  }
8143
8545
  }
8144
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { "data-test": dataTest, className: "space-y-3", children: [
8145
- error || mutationError ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Alert, { status: "danger", live: "assertive", children: error || mutationError }) : null,
8146
- loading ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: "text-sm text-ph-mutedtext", children: "Loading directory..." }) : /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "overflow-hidden rounded-[var(--ph-radius-surface)] border border-ph-border bg-ph-surface lg:grid lg:min-h-[22rem] lg:grid-cols-[minmax(14rem,18rem)_1fr]", children: [
8147
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
8546
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { "data-test": dataTest, className: "space-y-3", children: [
8547
+ error || mutationError ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Alert, { status: "danger", live: "assertive", children: error || mutationError }) : null,
8548
+ loading ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { className: "text-sm text-ph-mutedtext", children: "Loading directory..." }) : /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "overflow-hidden rounded-[var(--ph-radius-surface)] border border-ph-border bg-ph-surface lg:grid lg:min-h-[22rem] lg:grid-cols-[minmax(14rem,18rem)_1fr]", children: [
8549
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
8148
8550
  "section",
8149
8551
  {
8150
8552
  className: cn2(
@@ -8152,16 +8554,16 @@ function SuiteClientsProjectsDirectory({
8152
8554
  mobileDetail ? "hidden lg:block" : "block"
8153
8555
  ),
8154
8556
  children: [
8155
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex h-14 items-center gap-2 border-b border-ph-border px-3", children: [
8156
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "relative min-w-0 flex-1", children: [
8157
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
8557
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex h-14 items-center gap-2 border-b border-ph-border px-3", children: [
8558
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "relative min-w-0 flex-1", children: [
8559
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
8158
8560
  import_iconoir_react16.Search,
8159
8561
  {
8160
8562
  className: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-ph-mutedtext",
8161
8563
  "aria-hidden": true
8162
8564
  }
8163
8565
  ),
8164
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
8566
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
8165
8567
  Input,
8166
8568
  {
8167
8569
  hideLabel: true,
@@ -8173,18 +8575,18 @@ function SuiteClientsProjectsDirectory({
8173
8575
  }
8174
8576
  )
8175
8577
  ] }),
8176
- canEdit && onCreateClient ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
8578
+ canEdit && onCreateClient ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
8177
8579
  Button,
8178
8580
  {
8179
8581
  size: "sm",
8180
8582
  variant: "primary",
8181
- icon: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_iconoir_react16.Plus, { className: "h-4 w-4" }),
8583
+ icon: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_iconoir_react16.Plus, { className: "h-4 w-4" }),
8182
8584
  onClick: () => openNew("client"),
8183
8585
  children: "New client"
8184
8586
  }
8185
8587
  ) : null
8186
8588
  ] }),
8187
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
8589
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
8188
8590
  "ul",
8189
8591
  {
8190
8592
  role: "listbox",
@@ -8195,7 +8597,7 @@ function SuiteClientsProjectsDirectory({
8195
8597
  const count = projects.filter(
8196
8598
  (project) => project.clientId === client.id
8197
8599
  ).length;
8198
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("li", { role: "none", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
8600
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("li", { role: "none", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
8199
8601
  "button",
8200
8602
  {
8201
8603
  type: "button",
@@ -8212,10 +8614,10 @@ function SuiteClientsProjectsDirectory({
8212
8614
  selected ? "bg-ph-muted" : "hover:bg-ph-canvas"
8213
8615
  ),
8214
8616
  children: [
8215
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(DirectoryIcon, { item: client }),
8216
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("span", { className: "min-w-0 flex-1", children: [
8217
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "block truncate text-sm font-medium text-ph-ink", children: client.name }),
8218
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("span", { className: "text-xs text-ph-mutedtext", children: [
8617
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(DirectoryIcon, { item: client }),
8618
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("span", { className: "min-w-0 flex-1", children: [
8619
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "block truncate text-sm font-medium text-ph-ink", children: client.name }),
8620
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("span", { className: "text-xs text-ph-mutedtext", children: [
8219
8621
  count,
8220
8622
  " project",
8221
8623
  count === 1 ? "" : "s"
@@ -8224,13 +8626,13 @@ function SuiteClientsProjectsDirectory({
8224
8626
  ]
8225
8627
  }
8226
8628
  ) }, client.id);
8227
- }) : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("li", { className: "px-3 py-8 text-center text-sm text-ph-mutedtext", children: clients.length ? "No matches." : "Add a client to get started." })
8629
+ }) : /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("li", { className: "px-3 py-8 text-center text-sm text-ph-mutedtext", children: clients.length ? "No matches." : "Add a client to get started." })
8228
8630
  }
8229
8631
  )
8230
8632
  ]
8231
8633
  }
8232
8634
  ),
8233
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
8635
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
8234
8636
  "section",
8235
8637
  {
8236
8638
  className: cn2(
@@ -8238,8 +8640,8 @@ function SuiteClientsProjectsDirectory({
8238
8640
  mobileDetail ? "flex" : "hidden lg:flex"
8239
8641
  ),
8240
8642
  children: [
8241
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "flex min-h-14 items-center gap-2 border-b border-ph-border px-3 py-2", children: selectedClient ? /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_jsx_runtime45.Fragment, { children: [
8242
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
8643
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "flex min-h-14 items-center gap-2 border-b border-ph-border px-3 py-2", children: selectedClient ? /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
8644
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
8243
8645
  "button",
8244
8646
  {
8245
8647
  type: "button",
@@ -8250,36 +8652,36 @@ function SuiteClientsProjectsDirectory({
8250
8652
  setMobileDetail(false);
8251
8653
  },
8252
8654
  "aria-label": "Back to clients",
8253
- children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_iconoir_react16.ArrowLeft, { className: "h-4 w-4" })
8655
+ children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_iconoir_react16.ArrowLeft, { className: "h-4 w-4" })
8254
8656
  }
8255
8657
  ),
8256
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(DirectoryIcon, { item: selectedClient }),
8257
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "min-w-0 flex-1", children: [
8258
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("h3", { className: "truncate text-sm font-semibold text-ph-ink", children: selectedClient.name }),
8259
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("p", { className: "text-xs text-ph-mutedtext", children: [
8658
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(DirectoryIcon, { item: selectedClient }),
8659
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "min-w-0 flex-1", children: [
8660
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("h3", { className: "truncate text-sm font-semibold text-ph-ink", children: selectedClient.name }),
8661
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("p", { className: "text-xs text-ph-mutedtext", children: [
8260
8662
  selectedProjects.length,
8261
8663
  " project",
8262
8664
  selectedProjects.length === 1 ? "" : "s"
8263
8665
  ] })
8264
8666
  ] }),
8265
- canEdit && (onUpdateClient || onDeleteClient) ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { onClick: (event) => event.stopPropagation(), children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
8667
+ canEdit && (onUpdateClient || onDeleteClient) ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { onClick: (event) => event.stopPropagation(), children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
8266
8668
  DropdownMenu,
8267
8669
  {
8268
8670
  "aria-label": `Actions for ${selectedClient.name}`,
8269
8671
  align: "end",
8270
- trigger: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("span", { className: "inline-flex h-8 w-8 items-center justify-center rounded-md text-ph-mutedtext hover:bg-ph-muted hover:text-ph-ink", children: [
8271
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_iconoir_react16.MoreHoriz, { className: "h-4 w-4", "aria-hidden": true }),
8272
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "sr-only", children: "Client actions" })
8672
+ trigger: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("span", { className: "inline-flex h-8 w-8 items-center justify-center rounded-md text-ph-mutedtext hover:bg-ph-muted hover:text-ph-ink", children: [
8673
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_iconoir_react16.MoreHoriz, { className: "h-4 w-4", "aria-hidden": true }),
8674
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "sr-only", children: "Client actions" })
8273
8675
  ] }),
8274
- children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "p-1", children: [
8275
- onUpdateClient ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
8676
+ children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "p-1", children: [
8677
+ onUpdateClient ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
8276
8678
  DropdownItem,
8277
8679
  {
8278
8680
  onClick: () => openEdit(selectedClient, "client"),
8279
8681
  children: "Edit client"
8280
8682
  }
8281
8683
  ) : null,
8282
- onDeleteClient ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
8684
+ onDeleteClient ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
8283
8685
  DropdownItem,
8284
8686
  {
8285
8687
  className: "text-red-600",
@@ -8290,32 +8692,32 @@ function SuiteClientsProjectsDirectory({
8290
8692
  ] })
8291
8693
  }
8292
8694
  ) }) : null
8293
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: "text-sm text-ph-mutedtext", children: "Select a client" }) }),
8294
- canEdit && onCreateProject ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "border-b border-ph-border p-3", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
8695
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { className: "text-sm text-ph-mutedtext", children: "Select a client" }) }),
8696
+ canEdit && onCreateProject ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "border-b border-ph-border p-3", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
8295
8697
  Button,
8296
8698
  {
8297
8699
  variant: "primary",
8298
- icon: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_iconoir_react16.Plus, { className: "h-4 w-4" }),
8700
+ icon: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_iconoir_react16.Plus, { className: "h-4 w-4" }),
8299
8701
  onClick: () => openNew("project"),
8300
8702
  children: "Add project"
8301
8703
  }
8302
8704
  ) }) : null,
8303
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("ul", { className: "flex-1 p-2", children: selectedClient && selectedProjects.length ? selectedProjects.map((project) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
8705
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("ul", { className: "flex-1 p-2", children: selectedClient && selectedProjects.length ? selectedProjects.map((project) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
8304
8706
  "div",
8305
8707
  {
8306
8708
  className: "flex items-center gap-3 rounded-[var(--ph-radius-control)] px-2 py-1 hover:bg-ph-canvas",
8307
8709
  onClick: () => openEdit(project, "project"),
8308
8710
  children: [
8309
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
8711
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
8310
8712
  "button",
8311
8713
  {
8312
8714
  type: "button",
8313
8715
  className: "flex min-w-0 flex-1 items-center gap-3 rounded-[var(--ph-radius-control)] py-1 text-left focus-visible:outline-none focus-visible:shadow-[var(--ph-focus-halo)]",
8314
8716
  onClick: () => openEdit(project, "project"),
8315
8717
  children: [
8316
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(DirectoryIcon, { item: project }),
8317
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("span", { className: "min-w-0 flex-1", children: [
8318
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
8718
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(DirectoryIcon, { item: project }),
8719
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("span", { className: "min-w-0 flex-1", children: [
8720
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
8319
8721
  "span",
8320
8722
  {
8321
8723
  className: cn2(
@@ -8325,36 +8727,36 @@ function SuiteClientsProjectsDirectory({
8325
8727
  children: project.name
8326
8728
  }
8327
8729
  ),
8328
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "text-xs text-ph-mutedtext", children: project.isArchived ? "Archived" : "Active" })
8730
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "text-xs text-ph-mutedtext", children: project.isArchived ? "Archived" : "Active" })
8329
8731
  ] })
8330
8732
  ]
8331
8733
  }
8332
8734
  ),
8333
- canEdit && (onUpdateProject || onDeleteProject) ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { onClick: (event) => event.stopPropagation(), children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
8735
+ canEdit && (onUpdateProject || onDeleteProject) ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { onClick: (event) => event.stopPropagation(), children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
8334
8736
  DropdownMenu,
8335
8737
  {
8336
8738
  "aria-label": `Actions for ${project.name}`,
8337
8739
  align: "end",
8338
- trigger: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("span", { className: "inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-ph-mutedtext hover:bg-ph-muted hover:text-ph-ink", children: [
8339
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
8740
+ trigger: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("span", { className: "inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-ph-mutedtext hover:bg-ph-muted hover:text-ph-ink", children: [
8741
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
8340
8742
  import_iconoir_react16.MoreHoriz,
8341
8743
  {
8342
8744
  className: "h-4 w-4",
8343
8745
  "aria-hidden": true
8344
8746
  }
8345
8747
  ),
8346
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "sr-only", children: "Project actions" })
8748
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "sr-only", children: "Project actions" })
8347
8749
  ] }),
8348
- children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "p-1", children: [
8349
- onUpdateProject ? /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_jsx_runtime45.Fragment, { children: [
8350
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
8750
+ children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "p-1", children: [
8751
+ onUpdateProject ? /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
8752
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
8351
8753
  DropdownItem,
8352
8754
  {
8353
8755
  onClick: () => openEdit(project, "project"),
8354
8756
  children: "Edit project"
8355
8757
  }
8356
8758
  ),
8357
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
8759
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
8358
8760
  DropdownItem,
8359
8761
  {
8360
8762
  onClick: () => void toggleArchive(project),
@@ -8362,7 +8764,7 @@ function SuiteClientsProjectsDirectory({
8362
8764
  }
8363
8765
  )
8364
8766
  ] }) : null,
8365
- onDeleteProject ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
8767
+ onDeleteProject ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
8366
8768
  DropdownItem,
8367
8769
  {
8368
8770
  className: "text-red-600",
@@ -8375,20 +8777,20 @@ function SuiteClientsProjectsDirectory({
8375
8777
  ) }) : null
8376
8778
  ]
8377
8779
  }
8378
- ) }, project.id)) : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("li", { className: "px-3 py-8 text-center text-sm text-ph-mutedtext", children: selectedClient ? "No projects yet." : "Select a client to see its projects." }) })
8780
+ ) }, project.id)) : /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("li", { className: "px-3 py-8 text-center text-sm text-ph-mutedtext", children: selectedClient ? "No projects yet." : "Select a client to see its projects." }) })
8379
8781
  ]
8380
8782
  }
8381
8783
  )
8382
8784
  ] }),
8383
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
8785
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
8384
8786
  Modal,
8385
8787
  {
8386
8788
  open: editing !== null,
8387
8789
  onClose: closeEditor,
8388
8790
  title: (editing == null ? void 0 : editing.kind.includes("project")) ? editing.kind === "new-project" ? "New project" : "Edit project" : (editing == null ? void 0 : editing.kind) === "new-client" ? "New client" : "Edit client",
8389
- footer: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex justify-end gap-2", children: [
8390
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Button, { variant: "tertiary", onClick: closeEditor, disabled: saving, children: "Cancel" }),
8391
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
8791
+ footer: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex justify-end gap-2", children: [
8792
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Button, { variant: "tertiary", onClick: closeEditor, disabled: saving, children: "Cancel" }),
8793
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
8392
8794
  Button,
8393
8795
  {
8394
8796
  variant: "primary",
@@ -8398,8 +8800,8 @@ function SuiteClientsProjectsDirectory({
8398
8800
  }
8399
8801
  )
8400
8802
  ] }),
8401
- children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "space-y-3", children: [
8402
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
8803
+ children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "space-y-3", children: [
8804
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
8403
8805
  Input,
8404
8806
  {
8405
8807
  label: "Name",
@@ -8408,7 +8810,7 @@ function SuiteClientsProjectsDirectory({
8408
8810
  onChange: (event) => setDraft(__spreadProps(__spreadValues({}, draft), { name: event.target.value }))
8409
8811
  }
8410
8812
  ),
8411
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
8813
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
8412
8814
  DirectoryIconPicker,
8413
8815
  {
8414
8816
  preview,
@@ -8419,10 +8821,10 @@ function SuiteClientsProjectsDirectory({
8419
8821
  onBrowse: () => setLibraryOpen(true)
8420
8822
  }
8421
8823
  ),
8422
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { children: [
8423
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "mb-1.5 block text-sm font-medium text-ph-ink", children: "Colour" }),
8424
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex flex-wrap items-center gap-2", children: [
8425
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
8824
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { children: [
8825
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "mb-1.5 block text-sm font-medium text-ph-ink", children: "Colour" }),
8826
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex flex-wrap items-center gap-2", children: [
8827
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
8426
8828
  "button",
8427
8829
  {
8428
8830
  type: "button",
@@ -8434,7 +8836,7 @@ function SuiteClientsProjectsDirectory({
8434
8836
  "flex h-8 w-8 items-center justify-center rounded-full border border-ph-border bg-ph-surface text-ph-mutedtext ring-offset-2",
8435
8837
  !draft.color && "ring-2 ring-ph-brand"
8436
8838
  ),
8437
- children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_iconoir_react16.Prohibition, { className: "h-4 w-4", "aria-hidden": true })
8839
+ children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_iconoir_react16.Prohibition, { className: "h-4 w-4", "aria-hidden": true })
8438
8840
  }
8439
8841
  ),
8440
8842
  [
@@ -8445,7 +8847,7 @@ function SuiteClientsProjectsDirectory({
8445
8847
  "#ef4444",
8446
8848
  "#a855f7",
8447
8849
  "#64748b"
8448
- ].map((color) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
8850
+ ].map((color) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
8449
8851
  "button",
8450
8852
  {
8451
8853
  type: "button",
@@ -8460,7 +8862,7 @@ function SuiteClientsProjectsDirectory({
8460
8862
  },
8461
8863
  color
8462
8864
  )),
8463
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
8865
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
8464
8866
  "label",
8465
8867
  {
8466
8868
  className: cn2(
@@ -8480,7 +8882,7 @@ function SuiteClientsProjectsDirectory({
8480
8882
  },
8481
8883
  title: "Custom colour",
8482
8884
  children: [
8483
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "flex h-4 w-4 items-center justify-center rounded-full bg-ph-surface", children: [
8885
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "flex h-4 w-4 items-center justify-center rounded-full bg-ph-surface", children: [
8484
8886
  "#6366f1",
8485
8887
  "#0ea5e9",
8486
8888
  "#10b981",
@@ -8488,14 +8890,14 @@ function SuiteClientsProjectsDirectory({
8488
8890
  "#ef4444",
8489
8891
  "#a855f7",
8490
8892
  "#64748b"
8491
- ].includes(draft.color) ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_iconoir_react16.Plus, { className: "h-3 w-3 text-ph-ink", "aria-hidden": true }) : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
8893
+ ].includes(draft.color) ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_iconoir_react16.Plus, { className: "h-3 w-3 text-ph-ink", "aria-hidden": true }) : /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
8492
8894
  "span",
8493
8895
  {
8494
8896
  className: "h-2.5 w-2.5 rounded-full",
8495
8897
  style: { backgroundColor: draft.color }
8496
8898
  }
8497
8899
  ) }),
8498
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
8900
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
8499
8901
  "input",
8500
8902
  {
8501
8903
  type: "color",
@@ -8510,20 +8912,20 @@ function SuiteClientsProjectsDirectory({
8510
8912
  )
8511
8913
  ] })
8512
8914
  ] }),
8513
- (editing == null ? void 0 : editing.kind.includes("project")) ? /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
8915
+ (editing == null ? void 0 : editing.kind.includes("project")) ? /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
8514
8916
  Select,
8515
8917
  {
8516
8918
  label: "Client",
8517
8919
  value: draftClientId != null ? draftClientId : "",
8518
8920
  onChange: (event) => setDraftClientId(event.target.value || null),
8519
8921
  children: [
8520
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("option", { value: "", children: "No client" }),
8521
- clients.map((client) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("option", { value: client.id, children: client.name }, client.id))
8922
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("option", { value: "", children: "No client" }),
8923
+ clients.map((client) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("option", { value: client.id, children: client.name }, client.id))
8522
8924
  ]
8523
8925
  }
8524
8926
  ) : null,
8525
- (editing == null ? void 0 : editing.kind.includes("project")) ? /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("label", { className: "flex items-center gap-2 text-sm text-ph-ink", children: [
8526
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
8927
+ (editing == null ? void 0 : editing.kind.includes("project")) ? /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("label", { className: "flex items-center gap-2 text-sm text-ph-ink", children: [
8928
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
8527
8929
  "input",
8528
8930
  {
8529
8931
  type: "checkbox",
@@ -8536,26 +8938,26 @@ function SuiteClientsProjectsDirectory({
8536
8938
  ] })
8537
8939
  }
8538
8940
  ),
8539
- libraryOpen ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
8941
+ libraryOpen ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
8540
8942
  Modal,
8541
8943
  {
8542
8944
  open: true,
8543
8945
  onClose: () => setLibraryOpen(false),
8544
8946
  title: "Icon library",
8545
- children: renderIconLibrary ? renderIconLibrary({ onPick: pickFromLibrary }) : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(SuitePaletteLibrary, { onPick: pickFromLibrary })
8947
+ children: renderIconLibrary ? renderIconLibrary({ onPick: pickFromLibrary }) : /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(SuitePaletteLibrary, { onPick: pickFromLibrary })
8546
8948
  }
8547
8949
  ) : null,
8548
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
8950
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
8549
8951
  Modal,
8550
8952
  {
8551
8953
  open: confirming !== null,
8552
8954
  onClose: () => setConfirming(null),
8553
8955
  title: "Confirm deletion",
8554
- footer: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex justify-end gap-2", children: [
8555
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Button, { variant: "tertiary", onClick: () => setConfirming(null), children: "Cancel" }),
8556
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Button, { variant: "primary", onClick: () => void confirmRemove(), children: "Delete" })
8956
+ footer: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex justify-end gap-2", children: [
8957
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Button, { variant: "tertiary", onClick: () => setConfirming(null), children: "Cancel" }),
8958
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Button, { variant: "primary", onClick: () => void confirmRemove(), children: "Delete" })
8557
8959
  ] }),
8558
- children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("p", { className: "text-sm text-ph-ink", children: [
8960
+ children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("p", { className: "text-sm text-ph-ink", children: [
8559
8961
  "Delete ",
8560
8962
  confirming == null ? void 0 : confirming.item.name,
8561
8963
  "? This cannot be undone."
@@ -8580,6 +8982,7 @@ function SuiteClientsProjectsDirectory({
8580
8982
  SIDEBAR_MAX_WIDTH,
8581
8983
  SIDEBAR_MIN_EXPANDED_WIDTH,
8582
8984
  SIDEBAR_RAIL_WIDTH,
8985
+ SUITE_ANALYTICS_EVENT,
8583
8986
  SUITE_APPS,
8584
8987
  SUITE_APP_MAP,
8585
8988
  SUITE_ASK_AI_OPEN_KEY,
@@ -8594,6 +8997,7 @@ function SuiteClientsProjectsDirectory({
8594
8997
  SUITE_SPRINGS,
8595
8998
  SUITE_THEME_COOKIE,
8596
8999
  SourceAppGlyph,
9000
+ SuiteAiDraftEditor,
8597
9001
  SuiteAiPanel,
8598
9002
  SuiteAppIcon,
8599
9003
  SuiteAppLayout,
@@ -8662,9 +9066,12 @@ function SuiteClientsProjectsDirectory({
8662
9066
  resolveSuiteNotificationHref,
8663
9067
  sidebarColumnWidth,
8664
9068
  sourceToSuiteApp,
9069
+ subscribeSuiteAnalytics,
9070
+ suiteAiDraftFields,
8665
9071
  suiteAppBaseUrl,
8666
9072
  suiteAppLabel,
8667
9073
  suiteThemeBootScript,
9074
+ trackSuiteEvent,
8668
9075
  useIdleMount,
8669
9076
  useSidebarWidth,
8670
9077
  useSuiteNotifications,