@burdenoff/microfe-workspaces 2026.1023.4 → 2026.1029.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.
@@ -1,76 +1,70 @@
1
- import { useWorkspacesContext as e } from "../providers/WorkspacesProvider.js";
2
- import { useTr as t } from "../hooks/useTr.js";
3
- import { getWorkspaceStatusClasses as n } from "../utils/tokenHelpers.js";
4
- import { useScopedNavigation as r } from "../hooks/useScopedNavigation.js";
5
- import { Building2 as i, FolderKanban as a, Users as o } from "lucide-react";
6
- import { useActiveContext as s } from "@burdenoff/fe-libs/shared/providers/shell";
7
- import { jsx as c, jsxs as l } from "react/jsx-runtime";
8
- import { Badge as u, CardContent as d, CardHeader as f, CardTitle as p, GlassCard as m } from "@burdenoff/fe-libs/ui";
9
- import { useNavigate as h } from "react-router";
1
+ import { useTr as e } from "../hooks/useTr.js";
2
+ import { getWorkspaceStatusClasses as t } from "../utils/tokenHelpers.js";
3
+ import { useOpenWorkspace as n } from "../hooks/useOpenWorkspace.js";
4
+ import { Building2 as r, FolderKanban as i, Users as a } from "lucide-react";
5
+ import { jsx as o, jsxs as s } from "react/jsx-runtime";
6
+ import { Badge as c, CardContent as l, CardHeader as u, CardTitle as d, GlassCard as f } from "@burdenoff/fe-libs/ui";
10
7
  //#region src/components/WorkspaceCard.tsx
11
- function g({ workspace: g }) {
12
- let _ = t(), v = h(), { basePath: y = "/" } = e(), { withCurrentSearch: b } = r(), { setOrganization: x, setWorkspace: S, setProject: C, setTenant: w } = s(), T = () => {
13
- let e = g.organizationId ?? g.orgId;
14
- e && x(e), S(g.id), C(null), typeof g.tenantId == "string" && w(g.tenantId), v(b(`${y}/${g.id}`));
15
- };
16
- return /* @__PURE__ */ l(m, {
8
+ function p({ workspace: p }) {
9
+ let m = e(), h = n(), g = () => h(p);
10
+ return /* @__PURE__ */ s(f, {
17
11
  treatment: "insight",
18
12
  className: "cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-action-primary-bg/50",
19
- onClick: T,
13
+ onClick: g,
20
14
  onKeyDown: (e) => {
21
- (e.key === "Enter" || e.key === " ") && (e.preventDefault(), T());
15
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), g());
22
16
  },
23
17
  role: "button",
24
18
  tabIndex: 0,
25
- "aria-label": _("workspaceCard.openWorkspaceAriaLabel", "Open workspace {{name}}", { name: g.name }),
19
+ "aria-label": m("workspaceCard.openWorkspaceAriaLabel", "Open workspace {{name}}", { name: p.name }),
26
20
  "data-tour": "workspaces-card",
27
- children: [/* @__PURE__ */ c(f, { children: /* @__PURE__ */ l("div", {
21
+ children: [/* @__PURE__ */ o(u, { children: /* @__PURE__ */ s("div", {
28
22
  className: "flex items-center gap-3",
29
- children: [/* @__PURE__ */ c("div", {
23
+ children: [/* @__PURE__ */ o("div", {
30
24
  className: "p-3 rounded-lg bg-action-primary-bg/10 transition-colors",
31
- children: /* @__PURE__ */ c(i, {
25
+ children: /* @__PURE__ */ o(r, {
32
26
  className: "text-primary",
33
27
  size: 24
34
28
  })
35
- }), /* @__PURE__ */ l("div", {
29
+ }), /* @__PURE__ */ s("div", {
36
30
  className: "flex-1 min-w-0",
37
- children: [/* @__PURE__ */ c(p, {
31
+ children: [/* @__PURE__ */ o(d, {
38
32
  className: "text-lg truncate",
39
- children: g.name
40
- }), /* @__PURE__ */ c("div", {
33
+ children: p.name
34
+ }), /* @__PURE__ */ o("div", {
41
35
  className: "flex items-center gap-2 mt-1",
42
- children: /* @__PURE__ */ c(u, {
43
- className: `text-xs border ${n(g.status)}`,
44
- children: g.status
36
+ children: /* @__PURE__ */ o(c, {
37
+ className: `text-xs border ${t(p.status)}`,
38
+ children: p.status
45
39
  })
46
40
  })]
47
41
  })]
48
- }) }), /* @__PURE__ */ l(d, { children: [/* @__PURE__ */ l("div", {
42
+ }) }), /* @__PURE__ */ s(l, { children: [/* @__PURE__ */ s("div", {
49
43
  className: "flex flex-wrap gap-4 text-sm text-text-secondary",
50
- children: [typeof g.memberCount == "number" && g.memberCount > 0 && /* @__PURE__ */ l("div", {
44
+ children: [typeof p.memberCount == "number" && p.memberCount > 0 && /* @__PURE__ */ s("div", {
51
45
  className: "flex items-center gap-1",
52
- children: [/* @__PURE__ */ c(o, {
46
+ children: [/* @__PURE__ */ o(a, {
53
47
  size: 16,
54
48
  "aria-hidden": "true"
55
- }), /* @__PURE__ */ c("span", { children: _("workspaceCard.memberCount", "{{count}} member{{suffix}}", {
56
- count: g.memberCount,
57
- suffix: g.memberCount === 1 ? "" : "s"
49
+ }), /* @__PURE__ */ o("span", { children: m("workspaceCard.memberCount", "{{count}} member{{suffix}}", {
50
+ count: p.memberCount,
51
+ suffix: p.memberCount === 1 ? "" : "s"
58
52
  }) })]
59
- }), typeof g.projectCount == "number" && g.projectCount > 0 && /* @__PURE__ */ l("div", {
53
+ }), typeof p.projectCount == "number" && p.projectCount > 0 && /* @__PURE__ */ s("div", {
60
54
  className: "flex items-center gap-1",
61
- children: [/* @__PURE__ */ c(a, {
55
+ children: [/* @__PURE__ */ o(i, {
62
56
  size: 16,
63
57
  "aria-hidden": "true"
64
- }), /* @__PURE__ */ c("span", { children: _("workspaceCard.projectCount", "{{count}} project{{suffix}}", {
65
- count: g.projectCount,
66
- suffix: g.projectCount === 1 ? "" : "s"
58
+ }), /* @__PURE__ */ o("span", { children: m("workspaceCard.projectCount", "{{count}} project{{suffix}}", {
59
+ count: p.projectCount,
60
+ suffix: p.projectCount === 1 ? "" : "s"
67
61
  }) })]
68
62
  })]
69
- }), g.domain && /* @__PURE__ */ c("p", {
63
+ }), p.domain && /* @__PURE__ */ o("p", {
70
64
  className: "mt-2 truncate text-xs text-text-muted",
71
- children: g.domain
65
+ children: p.domain
72
66
  })] })]
73
67
  });
74
68
  }
75
69
  //#endregion
76
- export { g as WorkspaceCard };
70
+ export { p as WorkspaceCard };
@@ -0,0 +1,29 @@
1
+ export interface OpenableWorkspace {
2
+ id: string;
3
+ organizationId?: string | null;
4
+ /** The local Workspace type still names the organization field `orgId`. */
5
+ orgId?: string | null;
6
+ tenantId?: unknown;
7
+ }
8
+ export interface WorkspaceSelectionSetters {
9
+ setOrganization: (organizationId: string | null) => void;
10
+ setWorkspace: (workspaceId: string | null) => void;
11
+ setProject: (projectId: string | null) => void;
12
+ setTenant: (tenantId: string | null) => void;
13
+ }
14
+ /**
15
+ * Commits `workspace` as the active selection (BOFF-2821 G1, BOFF-7187).
16
+ *
17
+ * The workspace token and `x-workspace-id` follow the committed selection, and
18
+ * the workspace-layer `workspace(id)` resolver only answers for the workspace
19
+ * the request is scoped to. A detail page opened for any other workspace gets
20
+ * `null` back and renders "Workspace not found". Setting the selection also
21
+ * re-issues the token and syncs the `?workspace=…` query.
22
+ */
23
+ export declare function commitWorkspaceSelection(setters: WorkspaceSelectionSetters, workspace: OpenableWorkspace): void;
24
+ /**
25
+ * Opens a workspace's detail page with that workspace committed as the active
26
+ * selection. Use it for every navigation into `/<workspaceId>`, including the
27
+ * redirect after a workspace is created.
28
+ */
29
+ export declare function useOpenWorkspace(): (workspace: OpenableWorkspace) => void;
@@ -0,0 +1,31 @@
1
+ import { useWorkspacesContext as e } from "../providers/WorkspacesProvider.js";
2
+ import { useScopedNavigation as t } from "./useScopedNavigation.js";
3
+ import { useCallback as n } from "react";
4
+ import { useActiveContext as r } from "@burdenoff/fe-libs/shared/providers/shell";
5
+ import { useNavigate as i } from "react-router";
6
+ //#region src/hooks/useOpenWorkspace.ts
7
+ function a(e, t) {
8
+ let n = t.organizationId ?? t.orgId;
9
+ n && e.setOrganization(n), e.setWorkspace(t.id), e.setProject(null), typeof t.tenantId == "string" && e.setTenant(t.tenantId);
10
+ }
11
+ function o() {
12
+ let o = i(), { basePath: s = "/" } = e(), { withCurrentSearch: c } = t(), { setOrganization: l, setWorkspace: u, setProject: d, setTenant: f } = r();
13
+ return n((e) => {
14
+ a({
15
+ setOrganization: l,
16
+ setWorkspace: u,
17
+ setProject: d,
18
+ setTenant: f
19
+ }, e), o(c(`${s}/${e.id}`));
20
+ }, [
21
+ s,
22
+ o,
23
+ l,
24
+ d,
25
+ f,
26
+ u,
27
+ c
28
+ ]);
29
+ }
30
+ //#endregion
31
+ export { o as useOpenWorkspace };
@@ -1,256 +1,257 @@
1
1
  import { useWorkspacesContext as e } from "../providers/WorkspacesProvider.js";
2
- import { tWithFallback as t } from "../utils/i18n.js";
3
- import { useWorkspacesPageView as n } from "../hooks/useWorkspacesPageView.js";
2
+ import { useOpenWorkspace as t } from "../hooks/useOpenWorkspace.js";
3
+ import { tWithFallback as n } from "../utils/i18n.js";
4
+ import { useWorkspacesPageView as r } from "../hooks/useWorkspacesPageView.js";
4
5
  import { useCreateWorkspace as ee } from "../hooks/useWorkspaceMutations.js";
5
- import { useMyOrganizations as r, useMyTenants as i } from "../hooks/useTenants.js";
6
- import { generateSlug as te } from "../utils/slug.js";
7
- import { useOrgsWithPermission as a } from "../hooks/useOrgsWithPermission.js";
8
- import { useEffect as o, useMemo as s } from "react";
9
- import { AlertCircle as c, ArrowLeft as l } from "lucide-react";
10
- import { jsx as u, jsxs as d } from "react/jsx-runtime";
11
- import { Button as f, CardContent as p, CardDescription as m, CardHeader as h, CardTitle as ne, GlassCard as g, PagePurpose as _, Skeleton as v } from "@burdenoff/fe-libs/ui";
12
- import { useI18n as y } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
13
- import { Link as b, useNavigate as x } from "react-router";
14
- import { useUpgradePrompt as S } from "@burdenoff/fe-libs/shared/hooks";
15
- import { AccessDenied as C, UpgradeInlineBanner as w } from "@burdenoff/fe-libs/shared/components";
16
- import { useForm as T, z as E } from "@burdenoff/fe-libs/form";
6
+ import { useMyOrganizations as te, useMyTenants as i } from "../hooks/useTenants.js";
7
+ import { generateSlug as a } from "../utils/slug.js";
8
+ import { useOrgsWithPermission as o } from "../hooks/useOrgsWithPermission.js";
9
+ import { useEffect as s, useMemo as c } from "react";
10
+ import { AlertCircle as l, ArrowLeft as u } from "lucide-react";
11
+ import { jsx as d, jsxs as f } from "react/jsx-runtime";
12
+ import { Button as p, CardContent as m, CardDescription as h, CardHeader as g, CardTitle as _, GlassCard as v, PagePurpose as ne, Skeleton as y } from "@burdenoff/fe-libs/ui";
13
+ import { useI18n as re } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
14
+ import { Link as b, useNavigate as ie } from "react-router";
15
+ import { useUpgradePrompt as ae } from "@burdenoff/fe-libs/shared/hooks";
16
+ import { AccessDenied as oe, UpgradeInlineBanner as x } from "@burdenoff/fe-libs/shared/components";
17
+ import { useForm as S, z as C } from "@burdenoff/fe-libs/form";
17
18
  //#region src/pages/CreateWorkspacePage.tsx
18
- function D() {
19
- n("workspaces.create");
20
- let { t: D } = y(), { isFree: O, approachingLimits: re, plan: ie } = S({ resource: "workspaces" }), k = re[0], A = !!k && typeof k.limit == "number" && k.current >= k.limit, j = O && !!k, M = s(() => E.object({
21
- name: E.string().min(2, t(D, "createWorkspace.validation.nameMin", "Name must be at least 2 characters")).max(100),
22
- slug: E.string().min(2, t(D, "createWorkspace.validation.slugMin", "Slug must be at least 2 characters")).max(50).regex(/^[a-z0-9-]+$/, t(D, "createWorkspace.validation.slugFormat", "Slug can only contain lowercase letters, numbers, and hyphens")),
23
- tenantId: E.string().min(1, t(D, "createWorkspace.validation.tenantRequired", "Please select a tenant")),
24
- organizationId: E.string().min(1, t(D, "createWorkspace.validation.organizationRequired", "Please select an organization"))
25
- }), [D]), N = x(), { basePath: P = "/" } = e(), { mutate: F, isPending: I } = ee(), { data: L, isLoading: R, error: z } = i(), { data: B, isLoading: V, error: H } = r(), U = s(() => L?.items ?? [], [L]), W = s(() => B?.items ?? [], [B]), G = s(() => U.find((e) => e.type === "SHARED" || e.slug === "burdenoff-shared")?.id ?? U[0]?.id ?? "", [U]), K = T({
26
- schema: M,
19
+ function w() {
20
+ r("workspaces.create");
21
+ let { t: w } = re(), { isFree: T, approachingLimits: E, plan: D } = ae({ resource: "workspaces" }), O = E[0], k = !!O && typeof O.limit == "number" && O.current >= O.limit, A = T && !!O, j = c(() => C.object({
22
+ name: C.string().min(2, n(w, "createWorkspace.validation.nameMin", "Name must be at least 2 characters")).max(100),
23
+ slug: C.string().min(2, n(w, "createWorkspace.validation.slugMin", "Slug must be at least 2 characters")).max(50).regex(/^[a-z0-9-]+$/, n(w, "createWorkspace.validation.slugFormat", "Slug can only contain lowercase letters, numbers, and hyphens")),
24
+ tenantId: C.string().min(1, n(w, "createWorkspace.validation.tenantRequired", "Please select a tenant")),
25
+ organizationId: C.string().min(1, n(w, "createWorkspace.validation.organizationRequired", "Please select an organization"))
26
+ }), [w]), M = ie(), { basePath: N = "/" } = e(), { mutate: P, isPending: F } = ee(), I = t(), { data: L, isLoading: R, error: z } = i(), { data: B, isLoading: V, error: H } = te(), U = c(() => L?.items ?? [], [L]), W = c(() => B?.items ?? [], [B]), G = c(() => U.find((e) => e.type === "SHARED" || e.slug === "burdenoff-shared")?.id ?? U[0]?.id ?? "", [U]), K = S({
27
+ schema: j,
27
28
  defaultValues: {
28
29
  name: "",
29
30
  slug: "",
30
31
  tenantId: "",
31
32
  organizationId: ""
32
33
  }
33
- }), q = K.watch("tenantId"), J = K.watch("name"), { allowedIds: Y, loading: X, isError: Z } = a(s(() => W.map((e) => e.id), [W]), "workspace", "create"), Q = s(() => q ? W.filter((e) => e.tenantId === q) : [], [q, W]), $ = s(() => Z ? Q : Q.filter((e) => Y.has(e.id)), [
34
+ }), q = K.watch("tenantId"), J = K.watch("name"), { allowedIds: Y, loading: X, isError: Z } = o(c(() => W.map((e) => e.id), [W]), "workspace", "create"), Q = c(() => q ? W.filter((e) => e.tenantId === q) : [], [q, W]), $ = c(() => Z ? Q : Q.filter((e) => Y.has(e.id)), [
34
35
  Q,
35
36
  Y,
36
37
  Z
37
38
  ]);
38
- o(() => {
39
- K.setValue("slug", J ? te(J) : "");
40
- }, [J, K]), o(() => {
39
+ s(() => {
40
+ K.setValue("slug", J ? a(J) : "");
41
+ }, [J, K]), s(() => {
41
42
  K.setValue("organizationId", "");
42
- }, [q, K]), o(() => {
43
+ }, [q, K]), s(() => {
43
44
  !K.getValues("tenantId") && G && K.setValue("tenantId", G, {
44
45
  shouldDirty: !1,
45
46
  shouldTouch: !1
46
47
  });
47
- }, [G, K]), o(() => {
48
+ }, [G, K]), s(() => {
48
49
  let e = K.getValues("organizationId");
49
50
  !$.some((t) => t.id === e) && $[0]?.id && K.setValue("organizationId", $[0].id, {
50
51
  shouldDirty: !1,
51
52
  shouldTouch: !1
52
53
  });
53
54
  }, [$, K]);
54
- let ae = (e) => {
55
- F({
55
+ let se = (e) => {
56
+ P({
56
57
  name: e.name,
57
58
  slug: e.slug,
58
59
  tenantId: e.tenantId,
59
60
  organizationId: e.organizationId
60
61
  }, { onSuccess: (e) => {
61
- N(`${P}/${e.id}`);
62
+ I(e);
62
63
  } });
63
- }, oe = Y.size > 0, se = R || V || X, ce = !z && !H && W.length > 0;
64
- return !se && !Z && ce && !oe ? /* @__PURE__ */ d("div", {
64
+ }, ce = Y.size > 0, le = R || V || X, ue = !z && !H && W.length > 0;
65
+ return !le && !Z && ue && !ce ? /* @__PURE__ */ f("div", {
65
66
  className: "p-6",
66
- children: [/* @__PURE__ */ d(b, {
67
- to: `${P}/list`,
67
+ children: [/* @__PURE__ */ f(b, {
68
+ to: `${N}/list`,
68
69
  className: "inline-flex items-center gap-2 text-text-secondary hover:text-text-primary transition-colors mb-6",
69
- children: [/* @__PURE__ */ u(l, { size: 20 }), t(D, "createWorkspace.backToWorkspaces", "Back to Workspaces")]
70
- }), /* @__PURE__ */ u(C, {
70
+ children: [/* @__PURE__ */ d(u, { size: 20 }), n(w, "createWorkspace.backToWorkspaces", "Back to Workspaces")]
71
+ }), /* @__PURE__ */ d(oe, {
71
72
  variant: "card",
72
- title: t(D, "createWorkspace.permissionRequiredTitle", "Permission Required"),
73
- description: t(D, "createWorkspace.permissionRequiredDescription", "You don't have permission to create workspaces in any of your organizations."),
74
- details: t(D, "createWorkspace.permissionRequiredDetails", "Required: workspace:create"),
73
+ title: n(w, "createWorkspace.permissionRequiredTitle", "Permission Required"),
74
+ description: n(w, "createWorkspace.permissionRequiredDescription", "You don't have permission to create workspaces in any of your organizations."),
75
+ details: n(w, "createWorkspace.permissionRequiredDetails", "Required: workspace:create"),
75
76
  primaryAction: {
76
- label: t(D, "createWorkspace.goBack", "Go Back"),
77
- onClick: () => N(`${P}/list`)
77
+ label: n(w, "createWorkspace.goBack", "Go Back"),
78
+ onClick: () => M(`${N}/list`)
78
79
  }
79
80
  })]
80
- }) : /* @__PURE__ */ d("div", {
81
+ }) : /* @__PURE__ */ f("div", {
81
82
  className: "space-y-4 sm:space-y-6 p-3 sm:p-6",
82
83
  children: [
83
- /* @__PURE__ */ d(b, {
84
- to: `${P}/list`,
84
+ /* @__PURE__ */ f(b, {
85
+ to: `${N}/list`,
85
86
  className: "inline-flex items-center gap-2 text-text-secondary hover:text-text-primary transition-colors",
86
- children: [/* @__PURE__ */ u(l, { size: 20 }), t(D, "createWorkspace.backToWorkspaces", "Back to Workspaces")]
87
+ children: [/* @__PURE__ */ d(u, { size: 20 }), n(w, "createWorkspace.backToWorkspaces", "Back to Workspaces")]
87
88
  }),
88
- /* @__PURE__ */ u("div", {
89
+ /* @__PURE__ */ d("div", {
89
90
  className: "max-w-2xl mx-auto w-full",
90
- children: /* @__PURE__ */ u(_, { children: t(D, "createWorkspace.purpose", "Create a workspace to give a team, client or initiative its own dedicated space — with its own projects, members, agents and activity, kept separate from the rest. Give it a clear name, pick the organization that owns it, and you can invite people and add projects right after.") })
91
+ children: /* @__PURE__ */ d(ne, { children: n(w, "createWorkspace.purpose", "Create a workspace to give a team, client or initiative its own dedicated space — with its own projects, members, agents and activity, kept separate from the rest. Give it a clear name, pick the organization that owns it, and you can invite people and add projects right after.") })
91
92
  }),
92
- j && /* @__PURE__ */ u("div", {
93
+ A && /* @__PURE__ */ d("div", {
93
94
  className: "max-w-2xl mx-auto w-full",
94
- children: /* @__PURE__ */ u(w, {
95
+ children: /* @__PURE__ */ d(x, {
95
96
  resource: "workspaces",
96
- current: k.current,
97
- limit: k.limit ?? void 0,
98
- severity: A ? "critical" : void 0,
99
- message: A ? t(D, "createWorkspace.upgradeCapMessage", `You've used all workspaces in the ${ie?.planName ?? "free"} plan.`) : t(D, "createWorkspace.upgradeApproachingMessage", "Upgrade to create more workspaces.")
97
+ current: O.current,
98
+ limit: O.limit ?? void 0,
99
+ severity: k ? "critical" : void 0,
100
+ message: k ? n(w, "createWorkspace.upgradeCapMessage", `You've used all workspaces in the ${D?.planName ?? "free"} plan.`) : n(w, "createWorkspace.upgradeApproachingMessage", "Upgrade to create more workspaces.")
100
101
  })
101
102
  }),
102
- /* @__PURE__ */ d(g, {
103
+ /* @__PURE__ */ f(v, {
103
104
  treatment: "glass",
104
105
  glow: !0,
105
106
  className: "max-w-2xl mx-auto border-border-seam",
106
- children: [/* @__PURE__ */ d(h, { children: [/* @__PURE__ */ u(ne, { children: t(D, "createWorkspace.title", "Create New Workspace") }), /* @__PURE__ */ u(m, { children: t(D, "createWorkspace.subtitle", "Set up a new workspace for your team") })] }), /* @__PURE__ */ d(p, { children: [Z && /* @__PURE__ */ d("div", {
107
+ children: [/* @__PURE__ */ f(g, { children: [/* @__PURE__ */ d(_, { children: n(w, "createWorkspace.title", "Create New Workspace") }), /* @__PURE__ */ d(h, { children: n(w, "createWorkspace.subtitle", "Set up a new workspace for your team") })] }), /* @__PURE__ */ f(m, { children: [Z && /* @__PURE__ */ f("div", {
107
108
  role: "alert",
108
109
  className: "mb-4 flex items-start gap-2 rounded-md border border-warning/30 bg-warning/10 p-3 text-sm text-text-primary",
109
- children: [/* @__PURE__ */ u(c, {
110
+ children: [/* @__PURE__ */ d(l, {
110
111
  size: 16,
111
112
  className: "mt-0.5 shrink-0 text-warning"
112
- }), /* @__PURE__ */ u("span", { children: t(D, "createWorkspace.permissionCheckUnavailable", "We couldn't verify your workspace-create permissions just now, so the organization list isn't filtered. If you submit and don't have access, the request will be rejected and you can retry.") })]
113
- }), /* @__PURE__ */ d("form", {
114
- onSubmit: K.handleSubmit(ae),
113
+ }), /* @__PURE__ */ d("span", { children: n(w, "createWorkspace.permissionCheckUnavailable", "We couldn't verify your workspace-create permissions just now, so the organization list isn't filtered. If you submit and don't have access, the request will be rejected and you can retry.") })]
114
+ }), /* @__PURE__ */ f("form", {
115
+ onSubmit: K.handleSubmit(se),
115
116
  className: "space-y-6",
116
117
  children: [
117
- /* @__PURE__ */ d("div", {
118
+ /* @__PURE__ */ f("div", {
118
119
  className: "space-y-2",
119
120
  children: [
120
- /* @__PURE__ */ u("label", {
121
+ /* @__PURE__ */ d("label", {
121
122
  htmlFor: "workspace-name",
122
123
  className: "text-sm font-medium text-text-primary",
123
- children: t(D, "createWorkspace.nameLabel", "Workspace Name *")
124
+ children: n(w, "createWorkspace.nameLabel", "Workspace Name *")
124
125
  }),
125
- /* @__PURE__ */ u("input", {
126
+ /* @__PURE__ */ d("input", {
126
127
  id: "workspace-name",
127
- placeholder: t(D, "createWorkspace.namePlaceholder", "My Workspace"),
128
+ placeholder: n(w, "createWorkspace.namePlaceholder", "My Workspace"),
128
129
  className: "h-10 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm text-text-primary",
129
130
  ...K.register("name")
130
131
  }),
131
- /* @__PURE__ */ u("p", {
132
+ /* @__PURE__ */ d("p", {
132
133
  className: "text-xs text-text-secondary",
133
- children: t(D, "createWorkspace.nameHint", "A descriptive name for your workspace")
134
+ children: n(w, "createWorkspace.nameHint", "A descriptive name for your workspace")
134
135
  }),
135
- K.formState.errors.name?.message && /* @__PURE__ */ u("p", {
136
+ K.formState.errors.name?.message && /* @__PURE__ */ d("p", {
136
137
  className: "text-sm text-status-error-text",
137
138
  children: K.formState.errors.name.message
138
139
  })
139
140
  ]
140
141
  }),
141
- /* @__PURE__ */ d("div", {
142
+ /* @__PURE__ */ f("div", {
142
143
  className: "space-y-2",
143
144
  children: [
144
- /* @__PURE__ */ u("label", {
145
+ /* @__PURE__ */ d("label", {
145
146
  htmlFor: "workspace-slug",
146
147
  className: "text-sm font-medium text-text-primary",
147
- children: t(D, "createWorkspace.slugLabel", "Slug *")
148
+ children: n(w, "createWorkspace.slugLabel", "Slug *")
148
149
  }),
149
- /* @__PURE__ */ u("input", {
150
+ /* @__PURE__ */ d("input", {
150
151
  id: "workspace-slug",
151
- placeholder: t(D, "createWorkspace.slugPlaceholder", "my-workspace"),
152
+ placeholder: n(w, "createWorkspace.slugPlaceholder", "my-workspace"),
152
153
  className: "h-10 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm text-text-primary",
153
154
  ...K.register("slug")
154
155
  }),
155
- /* @__PURE__ */ u("p", {
156
+ /* @__PURE__ */ d("p", {
156
157
  className: "text-xs text-text-secondary",
157
- children: t(D, "createWorkspace.slugHint", "URL-friendly identifier (auto-generated, but you can edit it)")
158
+ children: n(w, "createWorkspace.slugHint", "URL-friendly identifier (auto-generated, but you can edit it)")
158
159
  }),
159
- K.formState.errors.slug?.message && /* @__PURE__ */ u("p", {
160
+ K.formState.errors.slug?.message && /* @__PURE__ */ d("p", {
160
161
  className: "text-sm text-status-error-text",
161
162
  children: K.formState.errors.slug.message
162
163
  })
163
164
  ]
164
165
  }),
165
- U.length === 1 ? null : /* @__PURE__ */ d("div", {
166
+ U.length === 1 ? null : /* @__PURE__ */ f("div", {
166
167
  className: "space-y-2",
167
168
  children: [
168
- /* @__PURE__ */ u("label", {
169
+ /* @__PURE__ */ d("label", {
169
170
  htmlFor: "workspace-tenant",
170
171
  className: "text-sm font-medium text-text-primary",
171
- children: t(D, "createWorkspace.tenantLabel", "Tenant *")
172
+ children: n(w, "createWorkspace.tenantLabel", "Tenant *")
172
173
  }),
173
- R ? /* @__PURE__ */ u(v, { className: "h-10 w-full" }) : z ? /* @__PURE__ */ d("div", {
174
+ R ? /* @__PURE__ */ d(y, { className: "h-10 w-full" }) : z ? /* @__PURE__ */ f("div", {
174
175
  className: "flex items-center gap-2 text-sm text-status-error-text",
175
- children: [/* @__PURE__ */ u(c, { size: 16 }), t(D, "createWorkspace.failedToLoadTenants", "Failed to load tenants")]
176
- }) : U.length === 0 ? /* @__PURE__ */ u("div", {
176
+ children: [/* @__PURE__ */ d(l, { size: 16 }), n(w, "createWorkspace.failedToLoadTenants", "Failed to load tenants")]
177
+ }) : U.length === 0 ? /* @__PURE__ */ d("div", {
177
178
  className: "text-sm text-text-secondary",
178
- children: t(D, "createWorkspace.noTenantsAvailable", "No tenants available. Contact your administrator.")
179
- }) : /* @__PURE__ */ d("select", {
179
+ children: n(w, "createWorkspace.noTenantsAvailable", "No tenants available. Contact your administrator.")
180
+ }) : /* @__PURE__ */ f("select", {
180
181
  id: "workspace-tenant",
181
182
  className: "h-10 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm text-text-primary scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
182
183
  ...K.register("tenantId"),
183
- children: [/* @__PURE__ */ u("option", {
184
+ children: [/* @__PURE__ */ d("option", {
184
185
  value: "",
185
- children: t(D, "createWorkspace.selectTenantPlaceholder", "Select a tenant")
186
- }), U.map((e) => /* @__PURE__ */ u("option", {
186
+ children: n(w, "createWorkspace.selectTenantPlaceholder", "Select a tenant")
187
+ }), U.map((e) => /* @__PURE__ */ d("option", {
187
188
  value: e.id,
188
189
  children: e.name
189
190
  }, e.id))]
190
191
  }),
191
- /* @__PURE__ */ u("p", {
192
+ /* @__PURE__ */ d("p", {
192
193
  className: "text-xs text-text-secondary",
193
- children: t(D, "createWorkspace.tenantHint", "Select which tenant this workspace belongs to")
194
+ children: n(w, "createWorkspace.tenantHint", "Select which tenant this workspace belongs to")
194
195
  }),
195
- K.formState.errors.tenantId?.message && /* @__PURE__ */ u("p", {
196
+ K.formState.errors.tenantId?.message && /* @__PURE__ */ d("p", {
196
197
  className: "text-sm text-status-error-text",
197
198
  children: K.formState.errors.tenantId.message
198
199
  })
199
200
  ]
200
201
  }),
201
- /* @__PURE__ */ d("div", {
202
+ /* @__PURE__ */ f("div", {
202
203
  className: "space-y-2",
203
204
  children: [
204
- /* @__PURE__ */ u("label", {
205
+ /* @__PURE__ */ d("label", {
205
206
  htmlFor: "workspace-organization",
206
207
  className: "text-sm font-medium text-text-primary",
207
- children: t(D, "createWorkspace.organizationLabel", "Organization *")
208
+ children: n(w, "createWorkspace.organizationLabel", "Organization *")
208
209
  }),
209
- V || X ? /* @__PURE__ */ u(v, { className: "h-10 w-full" }) : H ? /* @__PURE__ */ d("div", {
210
+ V || X ? /* @__PURE__ */ d(y, { className: "h-10 w-full" }) : H ? /* @__PURE__ */ f("div", {
210
211
  className: "flex items-center gap-2 text-sm text-status-error-text",
211
- children: [/* @__PURE__ */ u(c, { size: 16 }), t(D, "createWorkspace.failedToLoadOrganizations", "Failed to load organizations")]
212
- }) : q ? $.length === 0 ? /* @__PURE__ */ u("div", {
212
+ children: [/* @__PURE__ */ d(l, { size: 16 }), n(w, "createWorkspace.failedToLoadOrganizations", "Failed to load organizations")]
213
+ }) : q ? $.length === 0 ? /* @__PURE__ */ d("div", {
213
214
  className: "text-sm text-text-secondary",
214
- children: t(D, "createWorkspace.noOrganizationsFound", "No organizations found for this tenant")
215
- }) : /* @__PURE__ */ d("select", {
215
+ children: n(w, "createWorkspace.noOrganizationsFound", "No organizations found for this tenant")
216
+ }) : /* @__PURE__ */ f("select", {
216
217
  id: "workspace-organization",
217
218
  className: "h-10 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm text-text-primary scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
218
219
  disabled: !q,
219
220
  ...K.register("organizationId"),
220
- children: [/* @__PURE__ */ u("option", {
221
+ children: [/* @__PURE__ */ d("option", {
221
222
  value: "",
222
- children: t(D, "createWorkspace.selectOrganizationPlaceholder", "Select an organization")
223
- }), $.map((e) => /* @__PURE__ */ u("option", {
223
+ children: n(w, "createWorkspace.selectOrganizationPlaceholder", "Select an organization")
224
+ }), $.map((e) => /* @__PURE__ */ d("option", {
224
225
  value: e.id,
225
226
  children: e.name
226
227
  }, e.id))]
227
- }) : /* @__PURE__ */ u("div", {
228
+ }) : /* @__PURE__ */ d("div", {
228
229
  className: "text-sm text-text-secondary",
229
- children: t(D, "createWorkspace.selectTenantFirst", "Please select a tenant first")
230
+ children: n(w, "createWorkspace.selectTenantFirst", "Please select a tenant first")
230
231
  }),
231
- /* @__PURE__ */ u("p", {
232
+ /* @__PURE__ */ d("p", {
232
233
  className: "text-xs text-text-secondary",
233
- children: t(D, "createWorkspace.organizationHint", "Select which organization owns this workspace")
234
+ children: n(w, "createWorkspace.organizationHint", "Select which organization owns this workspace")
234
235
  }),
235
- K.formState.errors.organizationId?.message && /* @__PURE__ */ u("p", {
236
+ K.formState.errors.organizationId?.message && /* @__PURE__ */ d("p", {
236
237
  className: "text-sm text-status-error-text",
237
238
  children: K.formState.errors.organizationId.message
238
239
  })
239
240
  ]
240
241
  }),
241
- /* @__PURE__ */ d("div", {
242
+ /* @__PURE__ */ f("div", {
242
243
  className: "flex justify-end gap-3 pt-4",
243
- children: [/* @__PURE__ */ u(f, {
244
+ children: [/* @__PURE__ */ d(p, {
244
245
  type: "button",
245
246
  variant: "outline",
246
- onClick: () => N(`${P}/list`),
247
- disabled: I,
248
- children: t(D, "createWorkspace.cancel", "Cancel")
249
- }), /* @__PURE__ */ u(f, {
247
+ onClick: () => M(`${N}/list`),
248
+ disabled: F,
249
+ children: n(w, "createWorkspace.cancel", "Cancel")
250
+ }), /* @__PURE__ */ d(p, {
250
251
  type: "submit",
251
- disabled: I || R || V || X || A,
252
- title: A ? t(D, "createWorkspace.disabledAtCap", "Workspace limit reached — upgrade your plan to create more.") : void 0,
253
- children: I ? t(D, "createWorkspace.creating", "Creating...") : t(D, "createWorkspace.submit", "Create Workspace")
252
+ disabled: F || R || V || X || k,
253
+ title: k ? n(w, "createWorkspace.disabledAtCap", "Workspace limit reached — upgrade your plan to create more.") : void 0,
254
+ children: F ? n(w, "createWorkspace.creating", "Creating...") : n(w, "createWorkspace.submit", "Create Workspace")
254
255
  })]
255
256
  })
256
257
  ]
@@ -260,4 +261,4 @@ function D() {
260
261
  });
261
262
  }
262
263
  //#endregion
263
- export { D as CreateWorkspacePage };
264
+ export { w as CreateWorkspacePage };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/microfe-workspaces",
3
- "version": "2026.1023.4",
3
+ "version": "2026.1029.1",
4
4
  "description": "Workspaces microfrontend for Burdenoff products",
5
5
  "type": "module",
6
6
  "files": [