@invect/rbac 0.0.1 → 0.0.3

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 (35) hide show
  1. package/README.md +39 -77
  2. package/dist/backend/index.cjs +72 -40
  3. package/dist/backend/index.cjs.map +1 -1
  4. package/dist/backend/index.d.cts +49 -0
  5. package/dist/backend/index.d.cts.map +1 -0
  6. package/dist/backend/index.d.mts +49 -0
  7. package/dist/backend/index.d.mts.map +1 -0
  8. package/dist/backend/index.d.ts +1 -1
  9. package/dist/backend/index.d.ts.map +1 -1
  10. package/dist/backend/index.mjs +72 -40
  11. package/dist/backend/index.mjs.map +1 -1
  12. package/dist/backend/plugin.d.ts +12 -14
  13. package/dist/backend/plugin.d.ts.map +1 -1
  14. package/dist/frontend/components/TeamsPage.d.ts.map +1 -1
  15. package/dist/frontend/components/access-control/ScopeDetailPanel.d.ts.map +1 -1
  16. package/dist/frontend/components/access-control/index.d.ts +0 -1
  17. package/dist/frontend/components/access-control/index.d.ts.map +1 -1
  18. package/dist/frontend/index.cjs +61 -61
  19. package/dist/frontend/index.cjs.map +1 -1
  20. package/dist/frontend/index.d.cts +227 -0
  21. package/dist/frontend/index.d.cts.map +1 -0
  22. package/dist/frontend/index.d.mts +227 -0
  23. package/dist/frontend/index.d.mts.map +1 -0
  24. package/dist/frontend/index.d.ts +2 -2
  25. package/dist/frontend/index.d.ts.map +1 -1
  26. package/dist/frontend/index.mjs +7 -7
  27. package/dist/frontend/index.mjs.map +1 -1
  28. package/dist/frontend/types.d.ts +1 -1
  29. package/dist/shared/types.d.cts +2 -0
  30. package/dist/shared/types.d.mts +2 -0
  31. package/dist/types-D4DI2gyU.d.cts +175 -0
  32. package/dist/types-D4DI2gyU.d.cts.map +1 -0
  33. package/dist/types-DxJoguYy.d.mts +175 -0
  34. package/dist/types-DxJoguYy.d.mts.map +1 -0
  35. package/package.json +44 -46
@@ -2,7 +2,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  let lucide_react = require("lucide-react");
3
3
  let react = require("react");
4
4
  let _tanstack_react_query = require("@tanstack/react-query");
5
- let _invect_frontend = require("@invect/frontend");
5
+ let _invect_ui = require("@invect/ui");
6
6
  let react_jsx_runtime = require("react/jsx-runtime");
7
7
  let clsx = require("clsx");
8
8
  let tailwind_merge = require("tailwind-merge");
@@ -18,7 +18,7 @@ let zustand = require("zustand");
18
18
  */
19
19
  const RbacContext = (0, react.createContext)(null);
20
20
  function RbacProvider({ children }) {
21
- const api = (0, _invect_frontend.useApiClient)();
21
+ const api = (0, _invect_ui.useApiClient)();
22
22
  const { data: me, isLoading } = (0, _tanstack_react_query.useQuery)({
23
23
  queryKey: [
24
24
  "rbac",
@@ -83,7 +83,7 @@ function useRbac() {
83
83
  */
84
84
  /** Fetch access records for a specific flow */
85
85
  function useFlowAccess(flowId) {
86
- const api = (0, _invect_frontend.useApiClient)();
86
+ const api = (0, _invect_ui.useApiClient)();
87
87
  return (0, _tanstack_react_query.useQuery)({
88
88
  queryKey: [
89
89
  "rbac",
@@ -100,7 +100,7 @@ function useFlowAccess(flowId) {
100
100
  }
101
101
  /** Fetch all flow IDs accessible to the current user with their effective permission */
102
102
  function useAccessibleFlows() {
103
- const api = (0, _invect_frontend.useApiClient)();
103
+ const api = (0, _invect_ui.useApiClient)();
104
104
  return (0, _tanstack_react_query.useQuery)({
105
105
  queryKey: ["rbac", "accessible-flows"],
106
106
  queryFn: async () => {
@@ -115,7 +115,7 @@ function useAccessibleFlows() {
115
115
  }
116
116
  /** Grant access to a flow */
117
117
  function useGrantFlowAccess(flowId) {
118
- const api = (0, _invect_frontend.useApiClient)();
118
+ const api = (0, _invect_ui.useApiClient)();
119
119
  const queryClient = (0, _tanstack_react_query.useQueryClient)();
120
120
  return (0, _tanstack_react_query.useMutation)({
121
121
  mutationFn: async (input) => {
@@ -147,7 +147,7 @@ function useGrantFlowAccess(flowId) {
147
147
  }
148
148
  /** Revoke a specific access record */
149
149
  function useRevokeFlowAccess(flowId) {
150
- const api = (0, _invect_frontend.useApiClient)();
150
+ const api = (0, _invect_ui.useApiClient)();
151
151
  const queryClient = (0, _tanstack_react_query.useQueryClient)();
152
152
  return (0, _tanstack_react_query.useMutation)({
153
153
  mutationFn: async (accessId) => {
@@ -340,7 +340,7 @@ function ShareFlowModal({ flowId, onClose }) {
340
340
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: "my-1 border-t border-imp-border" }),
341
341
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
342
342
  type: "button",
343
- className: "w-full px-3 py-1.5 text-left text-xs text-red-600 hover:bg-red-500/10 dark:text-red-400",
343
+ className: "w-full px-3 py-1.5 text-left text-xs text-imp-destructive hover:bg-imp-destructive/10",
344
344
  onClick: () => {
345
345
  handleRevoke(record.id);
346
346
  setOpenRoleDropdown(null);
@@ -529,7 +529,7 @@ function FlowAccessPanel({ flowId }) {
529
529
  */
530
530
  /** List all teams */
531
531
  function useTeams() {
532
- const api = (0, _invect_frontend.useApiClient)();
532
+ const api = (0, _invect_ui.useApiClient)();
533
533
  return (0, _tanstack_react_query.useQuery)({
534
534
  queryKey: ["rbac", "teams"],
535
535
  queryFn: async () => {
@@ -541,7 +541,7 @@ function useTeams() {
541
541
  }
542
542
  /** Get a single team with members */
543
543
  function useTeam(teamId) {
544
- const api = (0, _invect_frontend.useApiClient)();
544
+ const api = (0, _invect_ui.useApiClient)();
545
545
  return (0, _tanstack_react_query.useQuery)({
546
546
  queryKey: [
547
547
  "rbac",
@@ -558,7 +558,7 @@ function useTeam(teamId) {
558
558
  }
559
559
  /** Get current user's teams */
560
560
  function useMyTeams() {
561
- const api = (0, _invect_frontend.useApiClient)();
561
+ const api = (0, _invect_ui.useApiClient)();
562
562
  return (0, _tanstack_react_query.useQuery)({
563
563
  queryKey: ["rbac", "my-teams"],
564
564
  queryFn: async () => {
@@ -570,7 +570,7 @@ function useMyTeams() {
570
570
  }
571
571
  /** Create a team */
572
572
  function useCreateTeam() {
573
- const api = (0, _invect_frontend.useApiClient)();
573
+ const api = (0, _invect_ui.useApiClient)();
574
574
  const queryClient = (0, _tanstack_react_query.useQueryClient)();
575
575
  return (0, _tanstack_react_query.useMutation)({
576
576
  mutationFn: async (input) => {
@@ -594,7 +594,7 @@ function useCreateTeam() {
594
594
  }
595
595
  /** Update a team */
596
596
  function useUpdateTeam(teamId) {
597
- const api = (0, _invect_frontend.useApiClient)();
597
+ const api = (0, _invect_ui.useApiClient)();
598
598
  const queryClient = (0, _tanstack_react_query.useQueryClient)();
599
599
  return (0, _tanstack_react_query.useMutation)({
600
600
  mutationFn: async (input) => {
@@ -623,7 +623,7 @@ function useUpdateTeam(teamId) {
623
623
  }
624
624
  /** Delete a team */
625
625
  function useDeleteTeam() {
626
- const api = (0, _invect_frontend.useApiClient)();
626
+ const api = (0, _invect_ui.useApiClient)();
627
627
  const queryClient = (0, _tanstack_react_query.useQueryClient)();
628
628
  return (0, _tanstack_react_query.useMutation)({
629
629
  mutationFn: async (teamId) => {
@@ -644,7 +644,7 @@ function useDeleteTeam() {
644
644
  }
645
645
  /** Add a member to a team */
646
646
  function useAddTeamMember(teamId) {
647
- const api = (0, _invect_frontend.useApiClient)();
647
+ const api = (0, _invect_ui.useApiClient)();
648
648
  const queryClient = (0, _tanstack_react_query.useQueryClient)();
649
649
  return (0, _tanstack_react_query.useMutation)({
650
650
  mutationFn: async (input) => {
@@ -673,7 +673,7 @@ function useAddTeamMember(teamId) {
673
673
  }
674
674
  /** Remove a member from a team */
675
675
  function useRemoveTeamMember(teamId) {
676
- const api = (0, _invect_frontend.useApiClient)();
676
+ const api = (0, _invect_ui.useApiClient)();
677
677
  const queryClient = (0, _tanstack_react_query.useQueryClient)();
678
678
  return (0, _tanstack_react_query.useMutation)({
679
679
  mutationFn: async (userId) => {
@@ -700,7 +700,7 @@ function useRemoveTeamMember(teamId) {
700
700
  //#endregion
701
701
  //#region src/frontend/hooks/useScopes.ts
702
702
  function useScopeTree() {
703
- const api = (0, _invect_frontend.useApiClient)();
703
+ const api = (0, _invect_ui.useApiClient)();
704
704
  return (0, _tanstack_react_query.useQuery)({
705
705
  queryKey: ["rbac", "scope-tree"],
706
706
  queryFn: async () => {
@@ -714,7 +714,7 @@ function useScopeTree() {
714
714
  });
715
715
  }
716
716
  function useScopeAccess(scopeId) {
717
- const api = (0, _invect_frontend.useApiClient)();
717
+ const api = (0, _invect_ui.useApiClient)();
718
718
  return (0, _tanstack_react_query.useQuery)({
719
719
  queryKey: [
720
720
  "rbac",
@@ -733,7 +733,7 @@ function useScopeAccess(scopeId) {
733
733
  });
734
734
  }
735
735
  function useGrantScopeAccess(scopeId) {
736
- const api = (0, _invect_frontend.useApiClient)();
736
+ const api = (0, _invect_ui.useApiClient)();
737
737
  const queryClient = (0, _tanstack_react_query.useQueryClient)();
738
738
  return (0, _tanstack_react_query.useMutation)({
739
739
  mutationFn: async (input) => {
@@ -760,7 +760,7 @@ function useGrantScopeAccess(scopeId) {
760
760
  });
761
761
  }
762
762
  function useRevokeScopeAccess(scopeId) {
763
- const api = (0, _invect_frontend.useApiClient)();
763
+ const api = (0, _invect_ui.useApiClient)();
764
764
  const queryClient = (0, _tanstack_react_query.useQueryClient)();
765
765
  return (0, _tanstack_react_query.useMutation)({
766
766
  mutationFn: async (accessId) => {
@@ -784,7 +784,7 @@ function useRevokeScopeAccess(scopeId) {
784
784
  });
785
785
  }
786
786
  function useEffectiveFlowAccess(flowId) {
787
- const api = (0, _invect_frontend.useApiClient)();
787
+ const api = (0, _invect_ui.useApiClient)();
788
788
  return (0, _tanstack_react_query.useQuery)({
789
789
  queryKey: [
790
790
  "rbac",
@@ -803,7 +803,7 @@ function useEffectiveFlowAccess(flowId) {
803
803
  });
804
804
  }
805
805
  function useMoveFlow(flowId) {
806
- const api = (0, _invect_frontend.useApiClient)();
806
+ const api = (0, _invect_ui.useApiClient)();
807
807
  const queryClient = (0, _tanstack_react_query.useQueryClient)();
808
808
  return (0, _tanstack_react_query.useMutation)({
809
809
  mutationFn: async (scopeId) => {
@@ -831,7 +831,7 @@ function useMoveFlow(flowId) {
831
831
  });
832
832
  }
833
833
  function usePreviewMove() {
834
- const api = (0, _invect_frontend.useApiClient)();
834
+ const api = (0, _invect_ui.useApiClient)();
835
835
  return (0, _tanstack_react_query.useMutation)({ mutationFn: async (input) => {
836
836
  const response = await fetch(`${api.getBaseURL()}/plugins/rbac/preview-move`, {
837
837
  method: "POST",
@@ -862,7 +862,7 @@ function getPermissionBadgeClasses(_permission) {
862
862
  //#endregion
863
863
  //#region src/frontend/components/access-control/useUsers.ts
864
864
  function useUsers$1() {
865
- const api = (0, _invect_frontend.useApiClient)();
865
+ const api = (0, _invect_ui.useApiClient)();
866
866
  const { data } = (0, _tanstack_react_query.useQuery)({
867
867
  queryKey: ["rbac", "auth-users"],
868
868
  queryFn: async () => {
@@ -903,7 +903,7 @@ const ROLE_OPTIONS = [
903
903
  }
904
904
  ];
905
905
  function RoleSelector({ value, onChange }) {
906
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_invect_frontend.DropdownMenu, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_invect_frontend.DropdownMenuTrigger, {
906
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_invect_ui.DropdownMenu, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_invect_ui.DropdownMenuTrigger, {
907
907
  asChild: true,
908
908
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
909
909
  type: "button",
@@ -913,16 +913,16 @@ function RoleSelector({ value, onChange }) {
913
913
  children: value
914
914
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronDown, { className: "h-3.5 w-3.5 shrink-0" })]
915
915
  })
916
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_invect_frontend.DropdownMenuContent, {
916
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_invect_ui.DropdownMenuContent, {
917
917
  align: "end",
918
918
  className: "w-56",
919
919
  children: [
920
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_invect_frontend.DropdownMenuLabel, {
920
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_invect_ui.DropdownMenuLabel, {
921
921
  className: "text-xs",
922
922
  children: "Select role"
923
923
  }),
924
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_invect_frontend.DropdownMenuSeparator, {}),
925
- ROLE_OPTIONS.map((role) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_invect_frontend.DropdownMenuItem, {
924
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_invect_ui.DropdownMenuSeparator, {}),
925
+ ROLE_OPTIONS.map((role) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_invect_ui.DropdownMenuItem, {
926
926
  onSelect: () => onChange(role.value),
927
927
  className: cn("items-start gap-0 px-2 py-2", value === role.value && "bg-accent text-accent-foreground"),
928
928
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
@@ -940,7 +940,7 @@ function RoleSelector({ value, onChange }) {
940
940
  })] });
941
941
  }
942
942
  function OptionalRoleSelector({ value, onChange, emptyLabel = "No direct access" }) {
943
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_invect_frontend.DropdownMenu, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_invect_frontend.DropdownMenuTrigger, {
943
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_invect_ui.DropdownMenu, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_invect_ui.DropdownMenuTrigger, {
944
944
  asChild: true,
945
945
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
946
946
  type: "button",
@@ -950,22 +950,22 @@ function OptionalRoleSelector({ value, onChange, emptyLabel = "No direct access"
950
950
  children: value ?? emptyLabel
951
951
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronDown, { className: "h-3.5 w-3.5 shrink-0" })]
952
952
  })
953
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_invect_frontend.DropdownMenuContent, {
953
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_invect_ui.DropdownMenuContent, {
954
954
  align: "end",
955
955
  className: "w-56",
956
956
  children: [
957
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_invect_frontend.DropdownMenuLabel, {
957
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_invect_ui.DropdownMenuLabel, {
958
958
  className: "text-xs",
959
959
  children: "Set access level"
960
960
  }),
961
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_invect_frontend.DropdownMenuSeparator, {}),
962
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_invect_frontend.DropdownMenuItem, {
961
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_invect_ui.DropdownMenuSeparator, {}),
962
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_invect_ui.DropdownMenuItem, {
963
963
  onSelect: () => onChange(null),
964
964
  className: cn("px-2 py-2 text-sm", value === null && "bg-accent text-accent-foreground"),
965
965
  children: emptyLabel
966
966
  }),
967
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_invect_frontend.DropdownMenuSeparator, {}),
968
- ROLE_OPTIONS.map((role) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_invect_frontend.DropdownMenuItem, {
967
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_invect_ui.DropdownMenuSeparator, {}),
968
+ ROLE_OPTIONS.map((role) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_invect_ui.DropdownMenuItem, {
969
969
  onSelect: () => onChange(role.value),
970
970
  className: cn("items-start gap-0 px-2 py-2", value === role.value && "bg-accent text-accent-foreground"),
971
971
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
@@ -1052,7 +1052,7 @@ function AccessTable({ rows, isLoading, emptyLabel }) {
1052
1052
  }),
1053
1053
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", {
1054
1054
  className: "px-3 py-2.5 text-center",
1055
- children: row.permission ? row.onPermissionChange ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_invect_frontend.DropdownMenu, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_invect_frontend.DropdownMenuTrigger, {
1055
+ children: row.permission ? row.onPermissionChange ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_invect_ui.DropdownMenu, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_invect_ui.DropdownMenuTrigger, {
1056
1056
  asChild: true,
1057
1057
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
1058
1058
  type: "button",
@@ -1063,16 +1063,16 @@ function AccessTable({ rows, isLoading, emptyLabel }) {
1063
1063
  children: row.permission
1064
1064
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronDown, { className: "h-3.5 w-3.5 shrink-0" })]
1065
1065
  })
1066
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_invect_frontend.DropdownMenuContent, {
1066
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_invect_ui.DropdownMenuContent, {
1067
1067
  align: "end",
1068
1068
  className: "w-64",
1069
1069
  children: [
1070
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_invect_frontend.DropdownMenuLabel, {
1070
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_invect_ui.DropdownMenuLabel, {
1071
1071
  className: "text-xs",
1072
1072
  children: "Change access role"
1073
1073
  }),
1074
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_invect_frontend.DropdownMenuSeparator, {}),
1075
- ROLE_OPTIONS.map((role) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_invect_frontend.DropdownMenuItem, {
1074
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_invect_ui.DropdownMenuSeparator, {}),
1075
+ ROLE_OPTIONS.map((role) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_invect_ui.DropdownMenuItem, {
1076
1076
  onSelect: () => row.onPermissionChange?.(role.value),
1077
1077
  className: cn("items-start gap-0 px-2 py-2", row.permission === role.value && "bg-accent text-accent-foreground"),
1078
1078
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
@@ -1098,19 +1098,19 @@ function AccessTable({ rows, isLoading, emptyLabel }) {
1098
1098
  children: row.canRemove && row.onRemove ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
1099
1099
  type: "button",
1100
1100
  onClick: () => setPendingRemovalRow(row),
1101
- className: "p-1 rounded text-imp-muted-foreground hover:bg-red-500/10 hover:text-red-500",
1101
+ className: "p-1 rounded text-imp-muted-foreground hover:bg-imp-destructive/10 hover:text-imp-destructive",
1102
1102
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Trash2, { className: "h-3.5 w-3.5" })
1103
1103
  }) : null
1104
1104
  })
1105
1105
  ]
1106
1106
  }, row.id))] }, group.label || "_default")) })]
1107
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_invect_frontend.Dialog, {
1107
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_invect_ui.Dialog, {
1108
1108
  open: !!pendingRemovalRow,
1109
1109
  onOpenChange: (open) => !open && setPendingRemovalRow(null),
1110
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_invect_frontend.DialogContent, {
1110
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_invect_ui.DialogContent, {
1111
1111
  className: "max-w-sm border-imp-border bg-imp-background text-imp-foreground sm:max-w-sm",
1112
1112
  children: [
1113
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_invect_frontend.DialogHeader, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_invect_frontend.DialogTitle, {
1113
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_invect_ui.DialogHeader, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_invect_ui.DialogTitle, {
1114
1114
  className: "text-sm font-semibold",
1115
1115
  children: removalDialogCopy?.title
1116
1116
  }) }),
@@ -1118,7 +1118,7 @@ function AccessTable({ rows, isLoading, emptyLabel }) {
1118
1118
  className: "text-sm text-imp-muted-foreground",
1119
1119
  children: removalDialogCopy?.body
1120
1120
  }),
1121
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_invect_frontend.DialogFooter, {
1121
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_invect_ui.DialogFooter, {
1122
1122
  className: "justify-between w-full sm:gap-2",
1123
1123
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
1124
1124
  type: "button",
@@ -1142,14 +1142,14 @@ function AccessTable({ rows, isLoading, emptyLabel }) {
1142
1142
  //#endregion
1143
1143
  //#region src/frontend/components/access-control/FormDialog.tsx
1144
1144
  function FormDialog({ open, onClose, title, children }) {
1145
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_invect_frontend.Dialog, {
1145
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_invect_ui.Dialog, {
1146
1146
  open,
1147
1147
  onOpenChange: (nextOpen) => !nextOpen && onClose(),
1148
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_invect_frontend.DialogContent, {
1148
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_invect_ui.DialogContent, {
1149
1149
  className: "max-w-md p-4 border-imp-border bg-imp-background text-imp-foreground sm:max-w-md",
1150
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_invect_frontend.DialogHeader, {
1150
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_invect_ui.DialogHeader, {
1151
1151
  className: "mb-1",
1152
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_invect_frontend.DialogTitle, {
1152
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_invect_ui.DialogTitle, {
1153
1153
  className: "text-sm font-semibold",
1154
1154
  children: title
1155
1155
  })
@@ -1342,7 +1342,7 @@ function ScopeDetailPanel({ scopeId, scopeName, users, userMap, teams, isAdmin }
1342
1342
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
1343
1343
  type: "button",
1344
1344
  onClick: () => setShowDeleteConfirm(true),
1345
- className: "flex items-center gap-1.5 rounded-md border border-red-200 px-3 py-1.5 text-xs font-medium text-red-600 transition-colors hover:bg-red-500/10 dark:border-red-500/20 dark:text-red-400",
1345
+ className: "flex items-center gap-1.5 rounded-md border border-imp-destructive/30 px-3 py-1.5 text-xs font-medium text-imp-destructive transition-colors hover:bg-imp-destructive/10",
1346
1346
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Trash2, { className: "w-4 h-4" }), " Delete team"]
1347
1347
  })
1348
1348
  }) : null]
@@ -1506,13 +1506,13 @@ function ScopeDetailPanel({ scopeId, scopeName, users, userMap, teams, isAdmin }
1506
1506
  })]
1507
1507
  })
1508
1508
  }),
1509
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_invect_frontend.Dialog, {
1509
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_invect_ui.Dialog, {
1510
1510
  open: showDeleteConfirm,
1511
1511
  onOpenChange: (open) => !open && setShowDeleteConfirm(false),
1512
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_invect_frontend.DialogContent, {
1512
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_invect_ui.DialogContent, {
1513
1513
  className: "max-w-sm border-imp-border bg-imp-background text-imp-foreground sm:max-w-sm",
1514
1514
  children: [
1515
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_invect_frontend.DialogHeader, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_invect_frontend.DialogTitle, {
1515
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_invect_ui.DialogHeader, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_invect_ui.DialogTitle, {
1516
1516
  className: "text-sm font-semibold",
1517
1517
  children: "Delete team"
1518
1518
  }) }),
@@ -1528,7 +1528,7 @@ function ScopeDetailPanel({ scopeId, scopeName, users, userMap, teams, isAdmin }
1528
1528
  "? Flows directly inside this team will move to the parent team when one exists, and this team's access grants will be removed."
1529
1529
  ]
1530
1530
  }),
1531
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_invect_frontend.DialogFooter, {
1531
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_invect_ui.DialogFooter, {
1532
1532
  className: "gap-2 sm:gap-0",
1533
1533
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
1534
1534
  type: "button",
@@ -2266,7 +2266,7 @@ function AccessControlPage() {
2266
2266
  setMovePreview,
2267
2267
  setMoveError
2268
2268
  ]);
2269
- if (!isAuthenticated) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_invect_frontend.PageLayout, {
2269
+ if (!isAuthenticated) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_invect_ui.PageLayout, {
2270
2270
  title: "Access Control",
2271
2271
  subtitle: "Manage team hierarchy and flow-level access grants.",
2272
2272
  icon: lucide_react.Shield,
@@ -2276,7 +2276,7 @@ function AccessControlPage() {
2276
2276
  })
2277
2277
  });
2278
2278
  const isLoading = scopeTreeQuery.isLoading;
2279
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_invect_frontend.PageLayout, {
2279
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_invect_ui.PageLayout, {
2280
2280
  title: "Access Control",
2281
2281
  subtitle: "Manage team hierarchy and flow-level access grants.",
2282
2282
  icon: lucide_react.Shield,
@@ -2467,7 +2467,7 @@ function AccessControlPage() {
2467
2467
  * TeamsPage — Team management page with create/edit/delete teams and member management.
2468
2468
  */
2469
2469
  function useUsers() {
2470
- const api = (0, _invect_frontend.useApiClient)();
2470
+ const api = (0, _invect_ui.useApiClient)();
2471
2471
  const [users, setUsers] = (0, react.useState)([]);
2472
2472
  (0, react.useEffect)(() => {
2473
2473
  let cancelled = false;
@@ -2524,7 +2524,7 @@ function TeamsPage() {
2524
2524
  children: "Please sign in to access this page."
2525
2525
  })
2526
2526
  });
2527
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_invect_frontend.PageLayout, {
2527
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_invect_ui.PageLayout, {
2528
2528
  title: "Teams",
2529
2529
  icon: lucide_react.Users,
2530
2530
  actions: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
@@ -2856,11 +2856,11 @@ function UserAvatar({ className }) {
2856
2856
  * @invect/rbac/ui — Frontend Plugin Entry Point
2857
2857
  *
2858
2858
  * This is the browser-safe entry point that exports the RBAC frontend plugin.
2859
- * Import via: `import { rbacFrontendPlugin } from '@invect/rbac/ui'`
2859
+ * Import via: `import { rbacFrontend } from '@invect/rbac/ui'`
2860
2860
  *
2861
2861
  * No Node.js dependencies. No @invect/core runtime imports.
2862
2862
  */
2863
- const rbacFrontendPlugin = {
2863
+ const rbacFrontend = {
2864
2864
  id: "rbac",
2865
2865
  name: "Role-Based Access Control",
2866
2866
  providers: [RbacProvider],
@@ -2903,7 +2903,7 @@ exports.ShareFlowModal = ShareFlowModal;
2903
2903
  exports.TeamsPage = TeamsPage;
2904
2904
  exports.UserAvatar = UserAvatar;
2905
2905
  exports.UserMenuSection = UserMenuSection;
2906
- exports.rbacFrontendPlugin = rbacFrontendPlugin;
2906
+ exports.rbacFrontend = rbacFrontend;
2907
2907
  exports.useAccessibleFlows = useAccessibleFlows;
2908
2908
  exports.useAddTeamMember = useAddTeamMember;
2909
2909
  exports.useCreateTeam = useCreateTeam;