@burdenoff/microfe-workspaces 2026.1123.3 → 2026.1125.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,164 +2,172 @@ import { useWorkspacesContext as e } from "./providers/WorkspacesProvider.js";
2
2
  import { WorkspaceContextPathSync as t } from "./components/WorkspaceContextPathSync.js";
3
3
  import { PendingInvitesRoute as n } from "./components/PendingInvitesRoute.js";
4
4
  import { WorkspacesListPage as r } from "./pages/WorkspacesListPage.js";
5
- import { Suspense as i, lazy as a } from "react";
6
- import { FeatureGate as o } from "@burdenoff/fe-libs/shared/feature-flags";
7
- import { useWorkspacePagesV2 as s } from "@burdenoff/fe-libs/ui";
8
- import { jsx as c, jsxs as l } from "react/jsx-runtime";
9
- import { Navigate as u, Route as d, Routes as f, useLocation as p, useParams as m } from "react-router";
5
+ import { CompactMarkOr as i, SectionLoaderOr as a } from "./components/loadingSystem.js";
6
+ import { Suspense as o, lazy as s } from "react";
7
+ import { FeatureGate as c } from "@burdenoff/fe-libs/shared/feature-flags";
8
+ import { useWorkspacePagesV2 as l } from "@burdenoff/fe-libs/ui";
9
+ import { jsx as u, jsxs as d } from "react/jsx-runtime";
10
+ import { Navigate as f, Route as p, Routes as m, useLocation as h, useParams as g } from "react-router";
10
11
  // src/WorkspacesRoutes.tsx
11
- var h = a(() => import("./pages/CreateWorkspacePage.js").then((e) => ({ default: e.CreateWorkspacePage }))), g = a(() => import("./pages/WorkspaceDetailPage.js").then((e) => ({ default: e.WorkspaceDetailPage }))), _ = a(() => import("./pages/WorkspaceSettingsPage.js").then((e) => ({ default: e.WorkspaceSettingsPage }))), v = a(() => import("./pages/ProjectsListPage.js").then((e) => ({ default: e.ProjectsListPage }))), y = a(() => import("./pages/ProjectDetailPage.js").then((e) => ({ default: e.ProjectDetailPage }))), b = a(() => import("./pages/ProjectMembersPage.js").then((e) => ({ default: e.ProjectMembersPage }))), x = a(() => import("./pages/MembersListPage.js").then((e) => ({ default: e.MembersListPage }))), S = a(() => import("./pages/ActivityListPage.js").then((e) => ({ default: e.ActivityListPage }))), C = a(() => import("./pages/InviteAcceptancePage.js").then((e) => ({ default: e.InviteAcceptancePage }))), w = a(() => import("./pages/WorkspaceInvitePage.js").then((e) => ({ default: e.WorkspaceInvitePage }))), T = a(() => import("./pages/CollaborationConsolePage.js").then((e) => ({ default: e.CollaborationConsolePage }))), E = a(() => import("./pages/v2/WorkspacesPage.js").then((e) => ({ default: e.WorkspacesPageV2 }))), D = a(() => import("./pages/v2/MembersPage.js").then((e) => ({ default: e.MembersPageV2 }))), O = a(() => import("./pages/v2/ProjectsPage.js").then((e) => ({ default: e.ProjectsPageV2 }))), k = a(() => import("./pages/v2/ActivityPage.js").then((e) => ({ default: e.ActivityPageV2 })));
12
- function A() {
13
- return /* @__PURE__ */ c("div", {
14
- className: "flex items-center justify-center h-64",
15
- children: /* @__PURE__ */ c("div", { className: "animate-spin rounded-full size-8 border-b-2 border-primary" })
12
+ var _ = s(() => import("./pages/CreateWorkspacePage.js").then((e) => ({ default: e.CreateWorkspacePage }))), v = s(() => import("./pages/WorkspaceDetailPage.js").then((e) => ({ default: e.WorkspaceDetailPage }))), y = s(() => import("./pages/WorkspaceSettingsPage.js").then((e) => ({ default: e.WorkspaceSettingsPage }))), b = s(() => import("./pages/ProjectsListPage.js").then((e) => ({ default: e.ProjectsListPage }))), x = s(() => import("./pages/ProjectDetailPage.js").then((e) => ({ default: e.ProjectDetailPage }))), S = s(() => import("./pages/ProjectMembersPage.js").then((e) => ({ default: e.ProjectMembersPage }))), C = s(() => import("./pages/MembersListPage.js").then((e) => ({ default: e.MembersListPage }))), w = s(() => import("./pages/ActivityListPage.js").then((e) => ({ default: e.ActivityListPage }))), T = s(() => import("./pages/InviteAcceptancePage.js").then((e) => ({ default: e.InviteAcceptancePage }))), E = s(() => import("./pages/WorkspaceInvitePage.js").then((e) => ({ default: e.WorkspaceInvitePage }))), D = s(() => import("./pages/CollaborationConsolePage.js").then((e) => ({ default: e.CollaborationConsolePage }))), O = s(() => import("./pages/v2/WorkspacesPage.js").then((e) => ({ default: e.WorkspacesPageV2 }))), k = s(() => import("./pages/v2/MembersPage.js").then((e) => ({ default: e.MembersPageV2 }))), A = s(() => import("./pages/v2/ProjectsPage.js").then((e) => ({ default: e.ProjectsPageV2 }))), j = s(() => import("./pages/v2/ActivityPage.js").then((e) => ({ default: e.ActivityPageV2 })));
13
+ function M() {
14
+ return /* @__PURE__ */ u(a, {
15
+ route: !0,
16
+ minHeight: "16rem",
17
+ today: /* @__PURE__ */ u("div", {
18
+ className: "flex items-center justify-center h-64",
19
+ children: /* @__PURE__ */ u(i, {
20
+ className: "size-8",
21
+ today: /* @__PURE__ */ u("div", { className: "animate-spin rounded-full size-8 border-b-2 border-primary" })
22
+ })
23
+ })
16
24
  });
17
25
  }
18
- function j() {
19
- return /* @__PURE__ */ c("div", {
26
+ function N() {
27
+ return /* @__PURE__ */ u("div", {
20
28
  className: "flex h-full items-center justify-center p-8 text-center",
21
- children: /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("h2", {
29
+ children: /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("h2", {
22
30
  className: "text-lg font-semibold mb-2 text-text-primary",
23
31
  children: "Feature Not Available"
24
- }), /* @__PURE__ */ c("p", {
32
+ }), /* @__PURE__ */ u("p", {
25
33
  className: "text-sm text-text-secondary",
26
34
  children: "This feature is not currently available. Enable it under Feature Previews to access this functionality."
27
35
  })] })
28
36
  });
29
37
  }
30
- function M(e, t, n = !1) {
31
- return /* @__PURE__ */ c(o, {
38
+ function P(e, t, n = !1) {
39
+ return /* @__PURE__ */ u(c, {
32
40
  flag: e,
33
41
  defaultValue: n,
34
- fallback: /* @__PURE__ */ c(j, {}),
42
+ fallback: /* @__PURE__ */ u(N, {}),
35
43
  children: t
36
44
  });
37
45
  }
38
- function N() {
46
+ function F() {
39
47
  let { basePath: t = "/workspaces" } = e();
40
- return /* @__PURE__ */ c(u, {
48
+ return /* @__PURE__ */ u(f, {
41
49
  to: `${t}/list`,
42
50
  replace: !0
43
51
  });
44
52
  }
45
- function P() {
53
+ function I() {
46
54
  let { basePath: t = "/workspaces", workspaceId: n } = e();
47
- return n ? /* @__PURE__ */ c(u, {
55
+ return n ? /* @__PURE__ */ u(f, {
48
56
  to: `${t}/${n}/invite`,
49
57
  replace: !0
50
- }) : /* @__PURE__ */ c(w, {});
58
+ }) : /* @__PURE__ */ u(E, {});
51
59
  }
52
- function F({ to: e, set: t }) {
53
- let { search: n } = p(), r = new URLSearchParams(n);
60
+ function L({ to: e, set: t }) {
61
+ let { search: n } = h(), r = new URLSearchParams(n);
54
62
  for (let [e, n] of Object.entries(t ?? {})) r.set(e, n);
55
63
  let i = r.toString();
56
- return /* @__PURE__ */ c(u, {
64
+ return /* @__PURE__ */ u(f, {
57
65
  to: i ? `${e}?${i}` : e,
58
66
  replace: !0
59
67
  });
60
68
  }
61
- function I() {
62
- let { basePath: t = "/workspaces" } = e(), { workspaceId: n } = m();
63
- return /* @__PURE__ */ c(F, {
69
+ function R() {
70
+ let { basePath: t = "/workspaces" } = e(), { workspaceId: n } = g();
71
+ return /* @__PURE__ */ u(L, {
64
72
  to: `${t}/${n}/members`,
65
73
  set: { dialog: "invite" }
66
74
  });
67
75
  }
68
- function L() {
69
- let a = s(), { basePath: o = "/workspaces" } = e();
70
- return /* @__PURE__ */ l(i, {
71
- fallback: /* @__PURE__ */ c(A, {}),
72
- children: [/* @__PURE__ */ c(t, {}), /* @__PURE__ */ l(f, { children: [
73
- /* @__PURE__ */ c(d, {
76
+ function z() {
77
+ let i = l(), { basePath: a = "/workspaces" } = e();
78
+ return /* @__PURE__ */ d(o, {
79
+ fallback: /* @__PURE__ */ u(M, {}),
80
+ children: [/* @__PURE__ */ u(t, {}), /* @__PURE__ */ d(m, { children: [
81
+ /* @__PURE__ */ u(p, {
74
82
  index: !0,
75
- element: a ? /* @__PURE__ */ c(F, { to: `${o}/list` }) : /* @__PURE__ */ c(u, {
83
+ element: i ? /* @__PURE__ */ u(L, { to: `${a}/list` }) : /* @__PURE__ */ u(f, {
76
84
  to: "list",
77
85
  replace: !0
78
86
  })
79
87
  }),
80
- /* @__PURE__ */ c(d, {
88
+ /* @__PURE__ */ u(p, {
81
89
  path: "list",
82
- element: c(a ? E : r, {})
90
+ element: u(i ? O : r, {})
83
91
  }),
84
- /* @__PURE__ */ c(d, {
92
+ /* @__PURE__ */ u(p, {
85
93
  path: "new",
86
- element: /* @__PURE__ */ c(h, {})
94
+ element: /* @__PURE__ */ u(_, {})
87
95
  }),
88
- /* @__PURE__ */ c(d, {
96
+ /* @__PURE__ */ u(p, {
89
97
  path: "collaboration",
90
- element: /* @__PURE__ */ c(T, {})
98
+ element: /* @__PURE__ */ u(D, {})
91
99
  }),
92
- /* @__PURE__ */ c(d, {
100
+ /* @__PURE__ */ u(p, {
93
101
  path: "msp",
94
- element: /* @__PURE__ */ c(T, {})
102
+ element: /* @__PURE__ */ u(D, {})
95
103
  }),
96
- /* @__PURE__ */ c(d, {
104
+ /* @__PURE__ */ u(p, {
97
105
  path: "invites",
98
- element: a ? /* @__PURE__ */ c(F, {
99
- to: `${o}/list`,
106
+ element: i ? /* @__PURE__ */ u(L, {
107
+ to: `${a}/list`,
100
108
  set: { tab: "invites" }
101
- }) : /* @__PURE__ */ c(n, {})
109
+ }) : /* @__PURE__ */ u(n, {})
102
110
  }),
103
- /* @__PURE__ */ c(d, {
111
+ /* @__PURE__ */ u(p, {
104
112
  path: "invite",
105
- element: a ? /* @__PURE__ */ c(F, {
106
- to: `${o}/list`,
113
+ element: i ? /* @__PURE__ */ u(L, {
114
+ to: `${a}/list`,
107
115
  set: { dialog: "invite" }
108
- }) : /* @__PURE__ */ c(P, {})
116
+ }) : /* @__PURE__ */ u(I, {})
109
117
  }),
110
- /* @__PURE__ */ c(d, {
118
+ /* @__PURE__ */ u(p, {
111
119
  path: "invite/:invitationId",
112
- element: /* @__PURE__ */ c(C, {})
120
+ element: /* @__PURE__ */ u(T, {})
113
121
  }),
114
- /* @__PURE__ */ c(d, {
122
+ /* @__PURE__ */ u(p, {
115
123
  path: ":workspaceId",
116
- element: /* @__PURE__ */ c(g, {})
124
+ element: /* @__PURE__ */ u(v, {})
117
125
  }),
118
- /* @__PURE__ */ c(d, {
126
+ /* @__PURE__ */ u(p, {
119
127
  path: ":workspaceId/settings",
120
- element: M("workspaces.settings", /* @__PURE__ */ c(_, {}), !0)
128
+ element: P("workspaces.settings", /* @__PURE__ */ u(y, {}), !0)
121
129
  }),
122
- /* @__PURE__ */ c(d, {
130
+ /* @__PURE__ */ u(p, {
123
131
  path: ":workspaceId/invite",
124
- element: c(a ? I : w, {})
132
+ element: u(i ? R : E, {})
125
133
  }),
126
- /* @__PURE__ */ c(d, {
134
+ /* @__PURE__ */ u(p, {
127
135
  path: "projects",
128
- element: c(a ? O : v, {})
136
+ element: u(i ? A : b, {})
129
137
  }),
130
- /* @__PURE__ */ c(d, {
138
+ /* @__PURE__ */ u(p, {
131
139
  path: ":workspaceId/projects",
132
- element: c(a ? O : v, {})
140
+ element: u(i ? A : b, {})
133
141
  }),
134
- /* @__PURE__ */ c(d, {
142
+ /* @__PURE__ */ u(p, {
135
143
  path: ":workspaceId/projects/:projectId",
136
- element: /* @__PURE__ */ c(y, {})
144
+ element: /* @__PURE__ */ u(x, {})
137
145
  }),
138
- /* @__PURE__ */ c(d, {
146
+ /* @__PURE__ */ u(p, {
139
147
  path: ":workspaceId/projects/:projectId/members",
140
- element: /* @__PURE__ */ c(b, {})
148
+ element: /* @__PURE__ */ u(S, {})
141
149
  }),
142
- /* @__PURE__ */ c(d, {
150
+ /* @__PURE__ */ u(p, {
143
151
  path: "members",
144
- element: c(a ? D : x, {})
152
+ element: u(i ? k : C, {})
145
153
  }),
146
- /* @__PURE__ */ c(d, {
154
+ /* @__PURE__ */ u(p, {
147
155
  path: ":workspaceId/members",
148
- element: c(a ? D : x, {})
156
+ element: u(i ? k : C, {})
149
157
  }),
150
- /* @__PURE__ */ c(d, {
158
+ /* @__PURE__ */ u(p, {
151
159
  path: "activity",
152
- element: c(a ? k : S, {})
160
+ element: u(i ? j : w, {})
153
161
  }),
154
- /* @__PURE__ */ c(d, {
162
+ /* @__PURE__ */ u(p, {
155
163
  path: ":workspaceId/activity",
156
- element: c(a ? k : S, {})
164
+ element: u(i ? j : w, {})
157
165
  }),
158
- /* @__PURE__ */ c(d, {
166
+ /* @__PURE__ */ u(p, {
159
167
  path: "*",
160
- element: /* @__PURE__ */ c(N, {})
168
+ element: /* @__PURE__ */ u(F, {})
161
169
  })
162
170
  ] })]
163
171
  });
164
172
  }
165
- export { L as WorkspacesRoutes };
173
+ export { z as WorkspacesRoutes };
@@ -0,0 +1,64 @@
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
+ import { SpinnerIconProps } from '@burdenoff/fe-libs/ui/loading/SpinnerIcon';
3
+ /**
4
+ * A drop-in for `<Loader2 className="… animate-spin" />`. Without the opt-in it IS this module's
5
+ * `Loader2`, with exactly the props it was given: fe-libs resolves a newer lucide-react than the
6
+ * module's (its icons add `aria-hidden`), so fe-libs' own `SpinnerIcon` would not draw the module's
7
+ * spinner byte for byte. Under the opt-in, fe-libs' `SpinnerIcon`: the compact mark, sized from
8
+ * the classes, `animate-spin` dropped; `tone="current"` lights it in the label's colour (a filled
9
+ * button).
10
+ */
11
+ export declare function SpinnerIcon({ tone, ...props }: SpinnerIconProps): import('react').JSX.Element;
12
+ /**
13
+ * A spinner the module draws itself (a CSS ring, its own svg, a turning icon): `today` exactly
14
+ * without the opt-in; under it, the compact mark. As fe-libs' `CompactMarkOr`, with the mark's
15
+ * `tone`: in a filled button it lights in the label's colour (an accent light on an accent fill
16
+ * would not show).
17
+ */
18
+ export declare function CompactMarkOr({ today, className, tone, }: {
19
+ /** The spinner as the module draws it today. */
20
+ today: ReactNode;
21
+ /** The compact mark's classes (its size, its margins). */
22
+ className?: string;
23
+ tone?: 'brand' | 'current';
24
+ }): import('react').JSX.Element;
25
+ export type SkeletonBlockProps = HTMLAttributes<HTMLElement> & {
26
+ /** Today's element: a `span` stays a `span` (it may sit in a line of text). */
27
+ as?: 'div' | 'span';
28
+ };
29
+ /**
30
+ * A grey block standing in for content on its way: a drop-in for today's hand-made
31
+ * `<div className="… animate-pulse bg-…" />`. Without the opt-in it IS that element, with exactly
32
+ * the props it was given, in their order; under it, the system's skeleton (one light passing, still
33
+ * under reduced motion, hidden from assistive technology) in the block's size, shape and place.
34
+ */
35
+ export declare function SkeletonBlock({ as, ...props }: SkeletonBlockProps): import('react').JSX.Element;
36
+ /**
37
+ * A box that pulses as a whole around its grey blocks (today's `<div className="animate-pulse …">`
38
+ * with plain blocks inside): a drop-in for that element. Without the opt-in it IS that element,
39
+ * prop for prop; under it, the same element without the pulse (its blocks are `SkeletonBlock`s,
40
+ * each with the system's light).
41
+ */
42
+ export type SkeletonGroupProps = HTMLAttributes<HTMLElement> & {
43
+ /** Today's element. */
44
+ as?: 'div' | 'span' | 'li' | 'section';
45
+ };
46
+ export declare function SkeletonGroup({ as, ...props }: SkeletonGroupProps): import('react').JSX.Element;
47
+ export interface SectionLoaderOrProps {
48
+ /** Today's loader, rendered exactly as it is without the opt-in. */
49
+ today: ReactNode;
50
+ /** What is loading, from today's words; the shell's "Loading…" when the box had none. */
51
+ label?: string;
52
+ /** Today's box height, so nothing moves when the content lands. */
53
+ minHeight?: string;
54
+ /** A page's loader (a route's code or its first data): it also runs the route wire. */
55
+ route?: boolean;
56
+ /** Where today's box sat (its grid span, margins). */
57
+ className?: string;
58
+ }
59
+ /**
60
+ * A box that waits on content of unknown shape. Without the opt-in it is `today`, exactly; under
61
+ * it, fe-libs' `SectionLoader`: nothing for 300 ms, then the product's mark and the words, held at
62
+ * least 600 ms, in a box of today's height.
63
+ */
64
+ export declare function SectionLoaderOr({ today, label, minHeight, route, className, }: SectionLoaderOrProps): import('react').JSX.Element;
@@ -0,0 +1,32 @@
1
+ import { Loader2 as e } from "lucide-react";
2
+ import { Fragment as t, jsx as n } from "react/jsx-runtime";
3
+ import { BrandLoader as r } from "@burdenoff/fe-libs/ui/loading/BrandLoader";
4
+ import { useLoadingSystem as i } from "@burdenoff/fe-libs/ui/loading/LoadingSystemProvider";
5
+ import { SectionLoader as a } from "@burdenoff/fe-libs/ui/loading/Loaders";
6
+ import { SpinnerIcon as o } from "@burdenoff/fe-libs/ui/loading/SpinnerIcon";
7
+ import "@burdenoff/fe-libs/ui/skeleton";
8
+ import { useShellLabel as s } from "@burdenoff/fe-libs/shared/providers/shell/useShellLabel";
9
+ // src/components/loadingSystem.tsx
10
+ function c({ tone: t, ...r }) {
11
+ return i() ? /* @__PURE__ */ n(o, {
12
+ tone: t,
13
+ ...r
14
+ }) : /* @__PURE__ */ n(e, { ...r });
15
+ }
16
+ function l({ today: e, className: a, tone: o }) {
17
+ return i() ? /* @__PURE__ */ n(r, {
18
+ size: "s",
19
+ tone: o,
20
+ className: a
21
+ }) : /* @__PURE__ */ n(t, { children: e });
22
+ }
23
+ function u({ today: e, label: r, minHeight: o, route: c, className: l }) {
24
+ let u = i(), d = s();
25
+ return u ? /* @__PURE__ */ n(a, {
26
+ label: r ?? d("loading.generic", "Loading…"),
27
+ minHeight: o,
28
+ route: c,
29
+ className: l
30
+ }) : /* @__PURE__ */ n(t, { children: e });
31
+ }
32
+ export { l as CompactMarkOr, u as SectionLoaderOr, c as SpinnerIcon };
@@ -1,15 +1,16 @@
1
1
  import { useTr as e } from "../../hooks/useTr.js";
2
- import { useCallback as t, useEffect as n, useRef as r, useState as i } from "react";
3
- import { Loader2 as a, Plus as ee, Tag as te, X as ne } from "lucide-react";
4
- import { Command as o, CommandEmpty as s, CommandGroup as c, CommandInput as re, CommandItem as l, CommandList as u, Popover as d, PopoverContent as f, PopoverTrigger as p } from "@burdenoff/fe-libs/ui";
5
- import { jsx as m, jsxs as h } from "react/jsx-runtime";
6
- import { cn as g } from "@burdenoff/fe-libs/shared/utils";
7
- import { useGatewayClient as ie } from "@burdenoff/fe-libs/shared/graphql";
8
- import { TagBadge as ae } from "@burdenoff/fe-libs/tag";
9
- import { gql as _ } from "@apollo/client";
10
- import { useLazyQuery as v, useMutation as y } from "@apollo/client/react";
2
+ import { SpinnerIcon as t } from "../loadingSystem.js";
3
+ import { useCallback as n, useEffect as r, useRef as i, useState as a } from "react";
4
+ import { Plus as ee, Tag as te, X as ne } from "lucide-react";
5
+ import { Command as re, CommandEmpty as o, CommandGroup as s, CommandInput as ie, CommandItem as c, CommandList as l, Popover as u, PopoverContent as d, PopoverTrigger as f } from "@burdenoff/fe-libs/ui";
6
+ import { jsx as p, jsxs as m } from "react/jsx-runtime";
7
+ import { cn as h } from "@burdenoff/fe-libs/shared/utils";
8
+ import { useGatewayClient as ae } from "@burdenoff/fe-libs/shared/graphql";
9
+ import { TagBadge as oe } from "@burdenoff/fe-libs/tag";
10
+ import { gql as g } from "@apollo/client";
11
+ import { useLazyQuery as _, useMutation as v } from "@apollo/client/react";
11
12
  // src/components/tags/ProjectTagsWidget.tsx
12
- var b = _`
13
+ var y = g`
13
14
  query ProjectTagsWidget_SearchTags($query: String!, $vocabularyId: ID, $limit: Int) {
14
15
  searchTags(query: $query, vocabularyId: $vocabularyId, limit: $limit) {
15
16
  id
@@ -27,7 +28,7 @@ var b = _`
27
28
  }
28
29
  }
29
30
  }
30
- `, x = _`
31
+ `, se = g`
31
32
  query ProjectTagsWidget_GetVocabularyByKey($key: String!) {
32
33
  getVocabularyByKey(key: $key) {
33
34
  id
@@ -35,7 +36,7 @@ var b = _`
35
36
  name
36
37
  }
37
38
  }
38
- `, oe = _`
39
+ `, b = g`
39
40
  mutation ProjectTagsWidget_CreateVocabulary($input: CreateVocabularyInput!) {
40
41
  createVocabulary(input: $input) {
41
42
  id
@@ -43,7 +44,7 @@ var b = _`
43
44
  name
44
45
  }
45
46
  }
46
- `, se = _`
47
+ `, x = g`
47
48
  mutation ProjectTagsWidget_CreateTag($input: CreateTagInput!) {
48
49
  createTag(input: $input) {
49
50
  id
@@ -66,8 +67,8 @@ function C(e) {
66
67
  let t = e;
67
68
  return typeof t.id == "string" && typeof t.key == "string" && typeof t.label == "string";
68
69
  }
69
- function w({ entityType: _, entityId: w, workspaceId: ce, tags: T, onAdd: E, onRemove: D, allowCreate: O = !0, maxTags: k = 20, className: le }) {
70
- let A = e(), [ue, j] = i(!1), [M, N] = i(""), [P, F] = i(null), [I, L] = i(!1), [R, z] = i(), B = r(null), V = ie("workspace"), H = !ce || !w, de = new Set(T.map((e) => e.id)), U = T.length < k, [W, { data: fe, loading: G }] = v(b, { client: V }), K = (fe?.searchTags ?? []).filter((e) => C(e) && !de.has(e.id)), [q, { loading: J }] = y(se, { client: V }), [Y] = v(x, { client: V }), [X] = y(oe, { client: V }), Z = t(async () => {
70
+ function w({ entityType: g, entityId: w, workspaceId: ce, tags: T, onAdd: E, onRemove: D, allowCreate: O = !0, maxTags: k = 20, className: le }) {
71
+ let A = e(), [ue, j] = a(!1), [M, N] = a(""), [P, F] = a(null), [I, L] = a(!1), [R, z] = a(), B = i(null), V = ae("workspace"), H = !ce || !w, de = new Set(T.map((e) => e.id)), U = T.length < k, [W, { data: fe, loading: G }] = _(y, { client: V }), K = (fe?.searchTags ?? []).filter((e) => C(e) && !de.has(e.id)), [q, { loading: J }] = v(x, { client: V }), [Y] = _(se, { client: V }), [X] = v(b, { client: V }), Z = n(async () => {
71
72
  if (R) return R;
72
73
  let e = (await Y({ variables: { key: S } })).data?.getVocabularyByKey;
73
74
  if (e) return z(e.id), e.id;
@@ -85,7 +86,7 @@ function w({ entityType: _, entityId: w, workspaceId: ce, tags: T, onAdd: E, onR
85
86
  Y,
86
87
  X,
87
88
  A
88
- ]), pe = t((e) => {
89
+ ]), pe = n((e) => {
89
90
  N(e), P && F(null), B.current && clearTimeout(B.current), e.trim() && (B.current = setTimeout(() => {
90
91
  W({ variables: {
91
92
  query: e,
@@ -98,10 +99,10 @@ function w({ entityType: _, entityId: w, workspaceId: ce, tags: T, onAdd: E, onR
98
99
  R,
99
100
  P
100
101
  ]);
101
- n(() => () => {
102
+ r(() => () => {
102
103
  B.current && clearTimeout(B.current);
103
104
  }, []);
104
- let Q = t(async (e) => {
105
+ let Q = n(async (e) => {
105
106
  if (U && !I) {
106
107
  L(!0);
107
108
  try {
@@ -117,7 +118,7 @@ function w({ entityType: _, entityId: w, workspaceId: ce, tags: T, onAdd: E, onR
117
118
  E,
118
119
  U,
119
120
  I
120
- ]), me = t(async () => {
121
+ ]), me = n(async () => {
121
122
  if (O && M.trim() && !J) {
122
123
  F(null);
123
124
  try {
@@ -145,14 +146,14 @@ function w({ entityType: _, entityId: w, workspaceId: ce, tags: T, onAdd: E, onR
145
146
  q,
146
147
  Q,
147
148
  A
148
- ]), he = t(async (e) => {
149
+ ]), he = n(async (e) => {
149
150
  await D(e);
150
151
  }, [D]);
151
152
  if (H) return null;
152
153
  let $ = !!(O && M.trim() && !G && K.length === 0);
153
- return /* @__PURE__ */ h("div", {
154
- className: g("flex flex-wrap items-center gap-1.5", le),
155
- children: [T.map((e) => /* @__PURE__ */ m(ae, {
154
+ return /* @__PURE__ */ m("div", {
155
+ className: h("flex flex-wrap items-center gap-1.5", le),
156
+ children: [T.map((e) => /* @__PURE__ */ p(oe, {
156
157
  id: e.id,
157
158
  label: e.label,
158
159
  color: e.color ?? void 0,
@@ -161,79 +162,79 @@ function w({ entityType: _, entityId: w, workspaceId: ce, tags: T, onAdd: E, onR
161
162
  removable: !0,
162
163
  onRemove: () => void he(e.id),
163
164
  size: "sm"
164
- }, e.id)), U && /* @__PURE__ */ h(d, {
165
+ }, e.id)), U && /* @__PURE__ */ m(u, {
165
166
  open: ue,
166
167
  onOpenChange: j,
167
- children: [/* @__PURE__ */ h(p, {
168
+ children: [/* @__PURE__ */ m(f, {
168
169
  type: "button",
169
170
  "aria-label": A("projectTagsWidget.addTagAriaLabel", "Add tag"),
170
- className: g("inline-flex items-center gap-1 px-2 py-0.5 rounded-full border border-dashed", "border-border-subtle text-text-secondary text-xs", "hover:border-foreground hover:text-text-primary transition-colors", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]"),
171
- children: [/* @__PURE__ */ m(te, { className: "size-3" }), /* @__PURE__ */ m("span", { children: T.length > 0 ? A("projectTagsWidget.add", "Add") : A("projectTagsWidget.addTags", "Add tags") })]
172
- }), /* @__PURE__ */ m(f, {
171
+ className: h("inline-flex items-center gap-1 px-2 py-0.5 rounded-full border border-dashed", "border-border-subtle text-text-secondary text-xs", "hover:border-foreground hover:text-text-primary transition-colors", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]"),
172
+ children: [/* @__PURE__ */ p(te, { className: "size-3" }), /* @__PURE__ */ p("span", { children: T.length > 0 ? A("projectTagsWidget.add", "Add") : A("projectTagsWidget.addTags", "Add tags") })]
173
+ }), /* @__PURE__ */ p(d, {
173
174
  className: "z-50 w-72 max-w-[calc(100vw-2rem)] border-border-subtle/80 bg-popover p-0 shadow-xl",
174
175
  align: "start",
175
176
  side: "bottom",
176
177
  sideOffset: 8,
177
- children: /* @__PURE__ */ h(o, {
178
+ children: /* @__PURE__ */ m(re, {
178
179
  shouldFilter: !1,
179
180
  children: [
180
- /* @__PURE__ */ h("div", {
181
+ /* @__PURE__ */ m("div", {
181
182
  className: "relative",
182
- children: [/* @__PURE__ */ m(re, {
183
+ children: [/* @__PURE__ */ p(ie, {
183
184
  placeholder: A("projectTagsWidget.searchPlaceholder", "Search or create a tag..."),
184
185
  value: M,
185
186
  onValueChange: pe,
186
187
  className: "h-10 border-0 bg-transparent pr-9 text-sm outline-none placeholder:text-text-secondary"
187
- }), G && /* @__PURE__ */ m(a, { className: "absolute right-3 top-1/2 size-3.5 -translate-y-1/2 animate-spin text-text-secondary" })]
188
+ }), G && /* @__PURE__ */ p(t, { className: "absolute right-3 top-1/2 size-3.5 -translate-y-1/2 animate-spin text-text-secondary" })]
188
189
  }),
189
- /* @__PURE__ */ h(u, {
190
+ /* @__PURE__ */ m(l, {
190
191
  className: "max-h-48 overflow-y-auto",
191
192
  children: [
192
- M.trim() === "" && /* @__PURE__ */ m(s, {
193
+ M.trim() === "" && /* @__PURE__ */ p(o, {
193
194
  className: "py-4 text-center text-xs text-text-secondary",
194
195
  children: A("projectTagsWidget.typeToSearch", "Type to search or create a tag")
195
196
  }),
196
- K.length > 0 && /* @__PURE__ */ m(c, { children: K.map((e) => /* @__PURE__ */ h(l, {
197
+ K.length > 0 && /* @__PURE__ */ p(s, { children: K.map((e) => /* @__PURE__ */ m(c, {
197
198
  value: e.id,
198
199
  onSelect: () => void Q(e),
199
200
  className: "flex items-center gap-2 px-3 py-2 cursor-pointer",
200
201
  disabled: I,
201
202
  children: [
202
- e.icon && /* @__PURE__ */ m("span", {
203
+ e.icon && /* @__PURE__ */ p("span", {
203
204
  className: "text-sm",
204
205
  children: e.icon
205
206
  }),
206
- /* @__PURE__ */ m("span", {
207
+ /* @__PURE__ */ p("span", {
207
208
  className: "truncate text-sm",
208
209
  style: e.color ? { color: e.color } : void 0,
209
210
  children: e.label
210
211
  }),
211
- I && /* @__PURE__ */ m(a, { className: "ml-auto size-3 animate-spin" })
212
+ I && /* @__PURE__ */ p(t, { className: "ml-auto size-3 animate-spin" })
212
213
  ]
213
214
  }, e.id)) }),
214
- $ && /* @__PURE__ */ m(c, { children: /* @__PURE__ */ h(l, {
215
+ $ && /* @__PURE__ */ p(s, { children: /* @__PURE__ */ m(c, {
215
216
  value: `__create__${M}`,
216
217
  onSelect: () => void me(),
217
218
  className: "flex items-center gap-2 px-3 py-2 cursor-pointer text-primary",
218
219
  disabled: J,
219
- children: [J ? /* @__PURE__ */ m(a, { className: "size-3.5 animate-spin" }) : /* @__PURE__ */ m(ee, { className: "size-3.5" }), /* @__PURE__ */ m("span", {
220
+ children: [J ? /* @__PURE__ */ p(t, { className: "size-3.5 animate-spin" }) : /* @__PURE__ */ p(ee, { className: "size-3.5" }), /* @__PURE__ */ p("span", {
220
221
  className: "text-sm truncate",
221
222
  children: J ? A("projectTagsWidget.creating", "Creating...") : A("projectTagsWidget.create", "Create \"{{label}}\"", { label: M })
222
223
  })]
223
224
  }) }),
224
- M.trim() !== "" && !G && K.length === 0 && !$ && /* @__PURE__ */ m(s, {
225
+ M.trim() !== "" && !G && K.length === 0 && !$ && /* @__PURE__ */ p(o, {
225
226
  className: "py-4 text-center text-xs text-text-secondary",
226
227
  children: A("projectTagsWidget.noTagsFound", "No tags found")
227
228
  }),
228
- P && /* @__PURE__ */ m("div", {
229
+ P && /* @__PURE__ */ p("div", {
229
230
  className: "px-3 py-2 text-xs text-status-error-text border-t border-border-subtle",
230
231
  children: P
231
232
  })
232
233
  ]
233
234
  }),
234
- !U && /* @__PURE__ */ h("div", {
235
+ !U && /* @__PURE__ */ m("div", {
235
236
  className: "border-t border-border-subtle px-3 py-2 text-xs text-text-secondary flex items-center gap-1",
236
- children: [/* @__PURE__ */ m(ne, { className: "size-3" }), A("projectTagsWidget.maxTagsReached", "Maximum {{maxTags}} tags reached", { maxTags: k })]
237
+ children: [/* @__PURE__ */ p(ne, { className: "size-3" }), A("projectTagsWidget.maxTagsReached", "Maximum {{maxTags}} tags reached", { maxTags: k })]
237
238
  })
238
239
  ]
239
240
  })