@rebasepro/studio 0.33.2 → 0.34.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.
Files changed (33) hide show
  1. package/dist/{ApiExplorer-CJQZnOcP.js → ApiExplorer-BhQFd_iR.js} +2 -2
  2. package/dist/ApiExplorer-BhQFd_iR.js.map +1 -0
  3. package/dist/{ApiKeysView-9ZvwMPyh.js → ApiKeysView-CLBXUCgu.js} +20 -20
  4. package/dist/ApiKeysView-CLBXUCgu.js.map +1 -0
  5. package/dist/{BackupsView-BhOHB6iP.js → BackupsView-DJlYhWBy.js} +2 -2
  6. package/dist/{BackupsView-BhOHB6iP.js.map → BackupsView-DJlYhWBy.js.map} +1 -1
  7. package/dist/{BranchesView-DqIfywjf.js → BranchesView-BKGhk-PC.js} +8 -8
  8. package/dist/{BranchesView-DqIfywjf.js.map → BranchesView-BKGhk-PC.js.map} +1 -1
  9. package/dist/{CronJobsView-CMa1E-Tx.js → CronJobsView-CwF_m6ZB.js} +8 -8
  10. package/dist/CronJobsView-CwF_m6ZB.js.map +1 -0
  11. package/dist/{JSEditor-ojAVSkaU.js → JSEditor-Br22PfLh.js} +9 -9
  12. package/dist/JSEditor-Br22PfLh.js.map +1 -0
  13. package/dist/{LogsExplorer-C-bwDFIl.js → LogsExplorer-DOLRFQaW.js} +13 -16
  14. package/dist/LogsExplorer-DOLRFQaW.js.map +1 -0
  15. package/dist/{RLSEditor-BAwkENpj.js → RLSEditor-RE4YpN_z.js} +28 -55
  16. package/dist/RLSEditor-RE4YpN_z.js.map +1 -0
  17. package/dist/{SQLEditor-DX9LfbU7.js → SQLEditor-Dj5INEUZ.js} +11 -11
  18. package/dist/SQLEditor-Dj5INEUZ.js.map +1 -0
  19. package/dist/{SchemaVisualizer-C75TENPm.js → SchemaVisualizer-D2_cck4I.js} +17 -17
  20. package/dist/{SchemaVisualizer-C75TENPm.js.map → SchemaVisualizer-D2_cck4I.js.map} +1 -1
  21. package/dist/{StorageView-CPkDKbsX.js → StorageView-DHm22S7y.js} +16 -16
  22. package/dist/StorageView-DHm22S7y.js.map +1 -0
  23. package/dist/index.es.js +14 -14
  24. package/dist/index.es.js.map +1 -1
  25. package/package.json +9 -9
  26. package/dist/ApiExplorer-CJQZnOcP.js.map +0 -1
  27. package/dist/ApiKeysView-9ZvwMPyh.js.map +0 -1
  28. package/dist/CronJobsView-CMa1E-Tx.js.map +0 -1
  29. package/dist/JSEditor-ojAVSkaU.js.map +0 -1
  30. package/dist/LogsExplorer-C-bwDFIl.js.map +0 -1
  31. package/dist/RLSEditor-BAwkENpj.js.map +0 -1
  32. package/dist/SQLEditor-DX9LfbU7.js.map +0 -1
  33. package/dist/StorageView-CPkDKbsX.js.map +0 -1
@@ -3,7 +3,7 @@ import { t as MonacoEditor } from "./MonacoEditor-7IlHFZU5.js";
3
3
  import { r as schemaSourceProblem, t as SchemaSourceProblemAlert } from "./schema-source-C4ekB7WU.js";
4
4
  import { ConfirmationDialog, ErrorView, useApiBase, useApiConfig, useRebaseContext, useSnackbarController, useStudioCapabilities, useStudioSchemaEditing, useTableDescriptors, useTranslation } from "@rebasepro/app";
5
5
  import { useCallback, useEffect, useMemo, useRef, useState } from "react";
6
- import { Alert, AlertTriangleIcon, Button, Chip, CircularProgress, DatabaseIcon, Dialog, DialogActions, DialogContent, DialogTitle, HelpCircleIcon, IconButton, KeyIcon, Link2Icon, LockIcon, MultiSelect, MultiSelectItem, Paper, RefreshCwIcon, ResizablePanels, Select, SelectItem, ShieldIcon, Tab, Tabs, TextField, Tooltip, Trash2Icon, Typography, cls, defaultBorderMixin, iconSize } from "@rebasepro/ui";
6
+ import { Alert, AlertTriangleIcon, Button, Chip, CircularProgress, DatabaseIcon, Dialog, DialogActions, DialogContent, DialogTitle, HelpCircleIcon, IconButton, KeyIcon, LockIcon, MultiSelect, MultiSelectItem, Paper, RefreshCwIcon, ResizablePanels, Select, SelectItem, ShieldIcon, Tab, Tabs, TextField, Tooltip, Trash2Icon, Typography, cls, defaultBorderMixin, iconSize } from "@rebasepro/ui";
7
7
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
8
8
  import { REBASE_ADMIN_REQUEST_ROLE, REBASE_ADMIN_ROLE, RLS_JWT_SQL, RLS_ROLES_SQL, RLS_UID_SQL, isRedactedSecurityRule, policy, rulePatches } from "@rebasepro/types";
9
9
  import { adminRequestPolicyName, getPolicyNamesForRule, getPolicyOperations } from "@rebasepro/utils";
@@ -316,7 +316,7 @@ var PolicyEditor = ({ policy, schema, table, roleOptions, onSave, onCancel }) =>
316
316
  t("studio_policy_behavior"),
317
317
  " ",
318
318
  /* @__PURE__ */ jsx("code", {
319
- className: "text-[10px] bg-hairline text-text-secondary dark:text-text-secondary-dark px-1 py-0.5 rounded ml-1",
319
+ className: "text-xs bg-hairline text-text-secondary dark:text-text-secondary-dark px-1 py-0.5 rounded ml-1",
320
320
  children: "AS"
321
321
  })
322
322
  ]
@@ -361,7 +361,7 @@ var PolicyEditor = ({ policy, schema, table, roleOptions, onSave, onCancel }) =>
361
361
  t("studio_policy_command"),
362
362
  " ",
363
363
  /* @__PURE__ */ jsx("code", {
364
- className: "text-[10px] bg-hairline text-text-secondary dark:text-text-secondary-dark px-1 py-0.5 rounded ml-1",
364
+ className: "text-xs bg-hairline text-text-secondary dark:text-text-secondary-dark px-1 py-0.5 rounded ml-1",
365
365
  children: "FOR"
366
366
  })
367
367
  ]
@@ -386,7 +386,7 @@ var PolicyEditor = ({ policy, schema, table, roleOptions, onSave, onCancel }) =>
386
386
  t("studio_policy_target_roles"),
387
387
  " ",
388
388
  /* @__PURE__ */ jsx("code", {
389
- className: "text-[10px] bg-hairline text-text-secondary dark:text-text-secondary-dark px-1 py-0.5 rounded ml-1",
389
+ className: "text-xs bg-hairline text-text-secondary dark:text-text-secondary-dark px-1 py-0.5 rounded ml-1",
390
390
  children: "TO"
391
391
  })
392
392
  ]
@@ -618,7 +618,7 @@ var PolicyEditor = ({ policy, schema, table, roleOptions, onSave, onCancel }) =>
618
618
  t("studio_policy_help_auth_uid"),
619
619
  " ",
620
620
  /* @__PURE__ */ jsxs("code", {
621
- className: "bg-surface-well px-1 py-0.5 rounded text-[11px]",
621
+ className: "bg-surface-well px-1 py-0.5 rounded text-xs",
622
622
  children: [RLS_UID_SQL, " = uid"]
623
623
  })
624
624
  ]
@@ -632,7 +632,7 @@ var PolicyEditor = ({ policy, schema, table, roleOptions, onSave, onCancel }) =>
632
632
  t("studio_policy_help_auth_jwt"),
633
633
  " ",
634
634
  /* @__PURE__ */ jsxs("code", {
635
- className: "bg-surface-well px-1 py-0.5 rounded text-[11px]",
635
+ className: "bg-surface-well px-1 py-0.5 rounded text-xs",
636
636
  children: [RLS_JWT_SQL, " ->> 'email' = 'admin@example.com'"]
637
637
  })
638
638
  ]
@@ -646,7 +646,7 @@ var PolicyEditor = ({ policy, schema, table, roleOptions, onSave, onCancel }) =>
646
646
  t("studio_policy_help_auth_roles"),
647
647
  " ",
648
648
  /* @__PURE__ */ jsxs("code", {
649
- className: "bg-surface-well px-1 py-0.5 rounded text-[11px]",
649
+ className: "bg-surface-well px-1 py-0.5 rounded text-xs",
650
650
  children: [
651
651
  "string_to_array(",
652
652
  RLS_ROLES_SQL,
@@ -1694,7 +1694,7 @@ var RLSEditor = ({ apiUrl = "" }) => {
1694
1694
  })
1695
1695
  }) : /* @__PURE__ */ jsxs(Fragment, { children: [
1696
1696
  categorizedTables.collection.length > 0 && /* @__PURE__ */ jsx(SidebarSection, {
1697
- title: "Schema Collections",
1697
+ title: "Schema Tables",
1698
1698
  icon: /* @__PURE__ */ jsx(DatabaseIcon, {
1699
1699
  size: 12,
1700
1700
  className: "text-primary dark:text-primary-light"
@@ -1784,7 +1784,7 @@ var RLSEditor = ({ apiUrl = "" }) => {
1784
1784
  })]
1785
1785
  }), /* @__PURE__ */ jsx(Typography, {
1786
1786
  variant: "caption",
1787
- className: "text-text-secondary dark:text-text-secondary-dark text-[11px] leading-relaxed block",
1787
+ className: "text-text-secondary dark:text-text-secondary-dark text-xs leading-relaxed block",
1788
1788
  children: "Manage Row Level Security policies for your PostgreSQL tables. Enable RLS and create fine-grained access policies."
1789
1789
  })]
1790
1790
  }),
@@ -1795,7 +1795,7 @@ var RLSEditor = ({ apiUrl = "" }) => {
1795
1795
  className: cls("p-2.5 rounded border bg-surface-card flex items-center justify-between", defaultBorderMixin),
1796
1796
  children: [/* @__PURE__ */ jsx(Typography, {
1797
1797
  variant: "caption",
1798
- className: "text-text-secondary dark:text-text-secondary-dark text-[11px]",
1798
+ className: "text-text-secondary dark:text-text-secondary-dark text-xs",
1799
1799
  children: "Total tables"
1800
1800
  }), /* @__PURE__ */ jsx(Typography, {
1801
1801
  variant: "body2",
@@ -1807,7 +1807,7 @@ var RLSEditor = ({ apiUrl = "" }) => {
1807
1807
  className: cls("p-2.5 rounded border bg-surface-card flex items-center justify-between", defaultBorderMixin),
1808
1808
  children: [/* @__PURE__ */ jsx(Typography, {
1809
1809
  variant: "caption",
1810
- className: "text-text-secondary dark:text-text-secondary-dark text-[11px]",
1810
+ className: "text-text-secondary dark:text-text-secondary-dark text-xs",
1811
1811
  children: "RLS enabled"
1812
1812
  }), /* @__PURE__ */ jsxs("div", {
1813
1813
  className: "flex items-center gap-1.5",
@@ -1822,7 +1822,7 @@ var RLSEditor = ({ apiUrl = "" }) => {
1822
1822
  className: cls("p-2.5 rounded border bg-surface-card flex items-center justify-between", defaultBorderMixin),
1823
1823
  children: [/* @__PURE__ */ jsx(Typography, {
1824
1824
  variant: "caption",
1825
- className: "text-text-secondary dark:text-text-secondary-dark text-[11px]",
1825
+ className: "text-text-secondary dark:text-text-secondary-dark text-xs",
1826
1826
  children: "Tables with policies"
1827
1827
  }), /* @__PURE__ */ jsx(Typography, {
1828
1828
  variant: "body2",
@@ -1834,7 +1834,7 @@ var RLSEditor = ({ apiUrl = "" }) => {
1834
1834
  className: cls("p-2.5 rounded border bg-surface-card flex items-center justify-between", defaultBorderMixin),
1835
1835
  children: [/* @__PURE__ */ jsx(Typography, {
1836
1836
  variant: "caption",
1837
- className: "text-text-secondary dark:text-text-secondary-dark text-[11px]",
1837
+ className: "text-text-secondary dark:text-text-secondary-dark text-xs",
1838
1838
  children: "Total policies"
1839
1839
  }), /* @__PURE__ */ jsx(Typography, {
1840
1840
  variant: "body2",
@@ -1851,7 +1851,7 @@ var RLSEditor = ({ apiUrl = "" }) => {
1851
1851
  className: "text-yellow-600 dark:text-yellow-500 mt-0.5 shrink-0"
1852
1852
  }), /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsxs(Typography, {
1853
1853
  variant: "caption",
1854
- className: "text-yellow-800 dark:text-yellow-400 text-[11px] font-semibold block",
1854
+ className: "text-yellow-800 dark:text-yellow-400 text-xs font-semibold block",
1855
1855
  children: [
1856
1856
  rlsStats.total - rlsStats.enabled,
1857
1857
  " table",
@@ -1860,7 +1860,7 @@ var RLSEditor = ({ apiUrl = "" }) => {
1860
1860
  ]
1861
1861
  }), /* @__PURE__ */ jsx(Typography, {
1862
1862
  variant: "caption",
1863
- className: "text-yellow-700 dark:text-yellow-600 text-[10px] block mt-0.5",
1863
+ className: "text-yellow-700 dark:text-yellow-600 text-xs block mt-0.5",
1864
1864
  children: "These tables have no row-level access control. If auth enforcement is disabled, data may be publicly accessible."
1865
1865
  })] })]
1866
1866
  }),
@@ -1871,7 +1871,7 @@ var RLSEditor = ({ apiUrl = "" }) => {
1871
1871
  className: "text-blue-600 dark:text-blue-400 mt-0.5 shrink-0"
1872
1872
  }), /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsxs(Typography, {
1873
1873
  variant: "caption",
1874
- className: "text-blue-800 dark:text-blue-300 text-[11px] font-semibold block",
1874
+ className: "text-blue-800 dark:text-blue-300 text-xs font-semibold block",
1875
1875
  children: [
1876
1876
  rlsStats.enabled - rlsStats.withPolicies,
1877
1877
  " table",
@@ -1880,7 +1880,7 @@ var RLSEditor = ({ apiUrl = "" }) => {
1880
1880
  ]
1881
1881
  }), /* @__PURE__ */ jsx(Typography, {
1882
1882
  variant: "caption",
1883
- className: "text-blue-700 dark:text-blue-500 text-[10px] block mt-0.5",
1883
+ className: "text-blue-700 dark:text-blue-500 text-xs block mt-0.5",
1884
1884
  children: "RLS is enabled but no permissive policies exist. All access is denied by default (Postgres deny-all)."
1885
1885
  })] })]
1886
1886
  })
@@ -2072,25 +2072,19 @@ var RLSEditor = ({ apiUrl = "" }) => {
2072
2072
  }),
2073
2073
  activeTableData && activeTableManaged && !savesToCodebase && /* @__PURE__ */ jsx(Alert, {
2074
2074
  color: "info",
2075
- children: /* @__PURE__ */ jsxs("div", {
2075
+ children: /* @__PURE__ */ jsx("div", {
2076
2076
  className: "flex items-start gap-2",
2077
- children: [/* @__PURE__ */ jsx(RefreshCwIcon, {
2078
- size: 16,
2079
- className: "shrink-0 mt-0.5"
2080
- }), /* @__PURE__ */ jsx(Typography, {
2077
+ children: /* @__PURE__ */ jsx(Typography, {
2081
2078
  variant: "caption",
2082
2079
  children: t("studio_rls_reapplied_on_start", { table: activeTableData.tableName })
2083
- })]
2080
+ })
2084
2081
  })
2085
2082
  }),
2086
2083
  activeTableData && activeTableCategory === "internal" && /* @__PURE__ */ jsx(Alert, {
2087
2084
  color: "info",
2088
- children: /* @__PURE__ */ jsxs("div", {
2085
+ children: /* @__PURE__ */ jsx("div", {
2089
2086
  className: "flex items-start gap-2",
2090
- children: [/* @__PURE__ */ jsx(LockIcon, {
2091
- size: 16,
2092
- className: "shrink-0 mt-0.5"
2093
- }), /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx(Typography, {
2087
+ children: /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx(Typography, {
2094
2088
  variant: "body2",
2095
2089
  className: "mb-1 font-semibold",
2096
2090
  children: "Rebase System Table"
@@ -2098,17 +2092,14 @@ var RLSEditor = ({ apiUrl = "" }) => {
2098
2092
  variant: "caption",
2099
2093
  className: "opacity-80",
2100
2094
  children: "This table is managed internally by Rebase. Its security policies are configured automatically. Editing policies on system tables is an advanced operation."
2101
- })] })]
2095
+ })] })
2102
2096
  })
2103
2097
  }),
2104
2098
  activeTableData && activeTableCategory === "junction" && /* @__PURE__ */ jsx(Alert, {
2105
2099
  color: "info",
2106
- children: /* @__PURE__ */ jsxs("div", {
2100
+ children: /* @__PURE__ */ jsx("div", {
2107
2101
  className: "flex items-start gap-2",
2108
- children: [/* @__PURE__ */ jsx(Link2Icon, {
2109
- size: 16,
2110
- className: "shrink-0 mt-0.5"
2111
- }), /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx(Typography, {
2102
+ children: /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx(Typography, {
2112
2103
  variant: "body2",
2113
2104
  className: "mb-1 font-semibold",
2114
2105
  children: "Junction Table"
@@ -2116,25 +2107,7 @@ var RLSEditor = ({ apiUrl = "" }) => {
2116
2107
  variant: "caption",
2117
2108
  className: "opacity-80",
2118
2109
  children: "This is an auto-generated junction table for a many-to-many relation. Rebase derives its policies: rows are readable when both related rows are, and writable following the declaring collection's update rules (plus the server/admin baseline). You can still add RLS policies directly to broaden access."
2119
- })] })]
2120
- })
2121
- }),
2122
- activeTableData && activeTableCategory === "other" && /* @__PURE__ */ jsx(Alert, {
2123
- color: "warning",
2124
- children: /* @__PURE__ */ jsxs("div", {
2125
- className: "flex items-start gap-2",
2126
- children: [/* @__PURE__ */ jsx(AlertTriangleIcon, {
2127
- size: 16,
2128
- className: "shrink-0 mt-0.5"
2129
- }), /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx(Typography, {
2130
- variant: "body2",
2131
- className: "mb-1 font-semibold",
2132
- children: "Unmapped Table"
2133
- }), /* @__PURE__ */ jsx(Typography, {
2134
- variant: "caption",
2135
- className: "opacity-80",
2136
- children: "This table exists in the database but isn't mapped to a collection definition. Import it into a Schema configuration file to manage security policies visually."
2137
- })] })]
2110
+ })] })
2138
2111
  })
2139
2112
  }),
2140
2113
  activeTableData && !activeTableData.rlsEnabled && /* @__PURE__ */ jsxs("div", {
@@ -2195,7 +2168,7 @@ var RLSEditor = ({ apiUrl = "" }) => {
2195
2168
  policy.drift && policy.drift.length > 0 && /* @__PURE__ */ jsx(Tooltip, {
2196
2169
  title: t("studio_rls_drift_tooltip", { fields: policy.drift.join(", ") }),
2197
2170
  children: /* @__PURE__ */ jsx("div", {
2198
- className: "px-1.5 py-0.5 rounded text-[10px] bg-orange-500/10 text-orange-600 border border-orange-500/20 shrink-0",
2171
+ className: "px-1.5 py-0.5 rounded text-xs bg-orange-500/10 text-orange-600 border border-orange-500/20 shrink-0",
2199
2172
  children: `${t("studio_rls_drift")}: ${policy.drift.join(", ")}`
2200
2173
  })
2201
2174
  }),
@@ -2342,4 +2315,4 @@ var RLSEditor = ({ apiUrl = "" }) => {
2342
2315
  //#endregion
2343
2316
  export { RLSEditor };
2344
2317
 
2345
- //# sourceMappingURL=RLSEditor-BAwkENpj.js.map
2318
+ //# sourceMappingURL=RLSEditor-RE4YpN_z.js.map