@seliseblocks/genesis-os 4.0.2 → 4.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.
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkXJ6DPUCV_cjs = require('./chunk-XJ6DPUCV.cjs');
4
- var chunkH6RIPPT3_cjs = require('./chunk-H6RIPPT3.cjs');
4
+ var chunkUBF3PJTH_cjs = require('./chunk-UBF3PJTH.cjs');
5
5
  var chunkZ6N3Y5AQ_cjs = require('./chunk-Z6N3Y5AQ.cjs');
6
6
  var chunkAL2E2WC4_cjs = require('./chunk-AL2E2WC4.cjs');
7
7
  var chunkQ7Y32IBM_cjs = require('./chunk-Q7Y32IBM.cjs');
@@ -2989,7 +2989,7 @@ function MultiSelect({
2989
2989
  onChange,
2990
2990
  value: selectedValues
2991
2991
  }) {
2992
- const [buttonRef, popoverWidth] = chunkH6RIPPT3_cjs.usePopoverWidth();
2992
+ const [buttonRef, popoverWidth] = chunkUBF3PJTH_cjs.usePopoverWidth();
2993
2993
  const onSelectHandler = (value) => {
2994
2994
  const nextValues = selectedValues.includes(value) ? selectedValues.filter((item) => item !== value) : [...selectedValues, value];
2995
2995
  onChange(nextValues);
@@ -6138,9 +6138,9 @@ var AppSwitcher = ({ forwardedTo }) => {
6138
6138
  const [open, setOpen] = React8.useState(false);
6139
6139
  const [redirectUrls, setRedirectUrls] = React8.useState({});
6140
6140
  const isRedirecting = React8.useRef(false);
6141
- const config = chunkH6RIPPT3_cjs.useBlocksAppConfigStore((state) => state.getConfig());
6141
+ const config = chunkUBF3PJTH_cjs.useBlocksAppConfigStore((state) => state.getConfig());
6142
6142
  const getRedirectUrl = React8.useCallback(
6143
- (app) => chunkH6RIPPT3_cjs.initiateService.fetchRedirectUrl({
6143
+ (app) => chunkUBF3PJTH_cjs.initiateService.fetchRedirectUrl({
6144
6144
  clientId: chunkHF24SZFI_cjs.getRuntimeEnv(app.clientId),
6145
6145
  redirectUri: chunkHF24SZFI_cjs.getRuntimeEnv(app.redirectUri),
6146
6146
  forwardedTo: resolvedForwardedTo
@@ -6215,7 +6215,7 @@ var OPTIONS = [
6215
6215
  { value: "dark", Icon: lucideReact.Moon, label: "Dark" }
6216
6216
  ];
6217
6217
  function ThemeSwitcher() {
6218
- const { theme, setTheme } = chunkH6RIPPT3_cjs.useTheme();
6218
+ const { theme, setTheme } = chunkUBF3PJTH_cjs.useTheme();
6219
6219
  return /* @__PURE__ */ jsxRuntime.jsx(
6220
6220
  Tabs,
6221
6221
  {
@@ -6284,11 +6284,11 @@ function UserAvatar({ size = "sm" }) {
6284
6284
  function UserDropdownMenu() {
6285
6285
  const { data: data2 } = useGetUserInfo();
6286
6286
  const userData = data2?.data;
6287
- const { isPending, mutateAsync } = chunkH6RIPPT3_cjs.useLogout();
6287
+ const { isPending, mutateAsync } = chunkUBF3PJTH_cjs.useLogout();
6288
6288
  const { resetProjectStore } = chunkVAKGHXK6_cjs.useProjectStore();
6289
6289
  const { setUnAuthenticated, clearTokens } = chunkVAKGHXK6_cjs.useAuthStore();
6290
6290
  const { resetSelectedLanguages } = chunkVNUPOJ7H_cjs.useLanguageViewStore();
6291
- const { data: myOrgsData, isLoading: isOrgsLoading } = chunkH6RIPPT3_cjs.useGetMyOrganizations();
6291
+ const { data: myOrgsData, isLoading: isOrgsLoading } = chunkUBF3PJTH_cjs.useGetMyOrganizations();
6292
6292
  const fullName = [userData?.firstName, userData?.lastName].filter(Boolean).join(" ") || "\u2014";
6293
6293
  const email = userData?.email || "";
6294
6294
  const roles = Object.values(userData?.roles || {}).flat();
@@ -6416,7 +6416,7 @@ var languages = [
6416
6416
  { key: "fr", title: "French" }
6417
6417
  ];
6418
6418
  function LanguageSelector() {
6419
- const { changeLanguage, language } = chunkH6RIPPT3_cjs.useLanguageSwitcher();
6419
+ const { changeLanguage, language } = chunkUBF3PJTH_cjs.useLanguageSwitcher();
6420
6420
  return /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenu, { children: [
6421
6421
  /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
6422
6422
  "button",
@@ -6506,7 +6506,7 @@ var notificationListenerService = new NotificationListenerService();
6506
6506
 
6507
6507
  // src/components/common/notification/use-notification-socket.ts
6508
6508
  function useNotificationSocket() {
6509
- const { data: configData } = chunkH6RIPPT3_cjs.useGetBlocksNotificationConfig(0, 100);
6509
+ const { data: configData } = chunkUBF3PJTH_cjs.useGetBlocksNotificationConfig(0, 100);
6510
6510
  const queryClient = reactQuery.useQueryClient();
6511
6511
  notificationListenerService.connect();
6512
6512
  React8.useEffect(() => {
@@ -6521,7 +6521,7 @@ function useNotificationSocket() {
6521
6521
  notificationListenerService.connection.on(
6522
6522
  config.notifyMethod,
6523
6523
  (message) => {
6524
- chunkH6RIPPT3_cjs.notificationService.getNotificationConfig(config, message);
6524
+ chunkUBF3PJTH_cjs.notificationService.getNotificationConfig(config, message);
6525
6525
  try {
6526
6526
  const notice = typeof message === "string" ? JSON.parse(message) : message;
6527
6527
  const denom = JSON.parse(
@@ -6545,12 +6545,12 @@ function useNotificationFeed(open) {
6545
6545
  const [notifications, setNotifications] = React8.useState([]);
6546
6546
  const [hasMore, setHasMore] = React8.useState(true);
6547
6547
  const listRef = React8.useRef(null);
6548
- const { data: data2, isLoading, isFetching } = chunkH6RIPPT3_cjs.useGetNotifications(
6548
+ const { data: data2, isLoading, isFetching } = chunkUBF3PJTH_cjs.useGetNotifications(
6549
6549
  pageNumber,
6550
6550
  PAGE_SIZE
6551
6551
  );
6552
- const markAsRead = chunkH6RIPPT3_cjs.useMarkAsRead();
6553
- const markAllAsRead = chunkH6RIPPT3_cjs.useMarkAllAsRead();
6552
+ const markAsRead = chunkUBF3PJTH_cjs.useMarkAsRead();
6553
+ const markAllAsRead = chunkUBF3PJTH_cjs.useMarkAllAsRead();
6554
6554
  React8.useEffect(() => {
6555
6555
  if (!data2?.notifications) return;
6556
6556
  setNotifications((prev) => {
@@ -6784,7 +6784,7 @@ function ConsoleHeader() {
6784
6784
  window.addEventListener("scroll", handleScroll);
6785
6785
  return () => window.removeEventListener("scroll", handleScroll);
6786
6786
  }, []);
6787
- const { appLightLogo, appDarkLogo } = chunkH6RIPPT3_cjs.useLogo();
6787
+ const { appLightLogo, appDarkLogo } = chunkUBF3PJTH_cjs.useLogo();
6788
6788
  return /* @__PURE__ */ jsxRuntime.jsx(
6789
6789
  "div",
6790
6790
  {
@@ -7234,7 +7234,7 @@ var LoginHeader = ({
7234
7234
  }) => {
7235
7235
  const {
7236
7236
  config: { appLogoUrl }
7237
- } = chunkH6RIPPT3_cjs.useBlocksAppConfigStore((state) => state);
7237
+ } = chunkUBF3PJTH_cjs.useBlocksAppConfigStore((state) => state);
7238
7238
  const resolveLogo = (variant) => {
7239
7239
  if (!appLogoUrl) return void 0;
7240
7240
  if (typeof appLogoUrl === "string") return appLogoUrl;
@@ -7784,11 +7784,16 @@ function useAtmosphericCanvas(canvasRef) {
7784
7784
  if (!canvas) return;
7785
7785
  const ctx = canvas.getContext("2d");
7786
7786
  if (!ctx) return;
7787
- let raf = 0;
7787
+ const rafHandles = /* @__PURE__ */ new Set();
7788
7788
  let t = 0;
7789
7789
  let dpr = window.devicePixelRatio || 1;
7790
7790
  let w = 0;
7791
7791
  let h = 0;
7792
+ const schedule = (cb) => {
7793
+ const handle = requestAnimationFrame(cb);
7794
+ rafHandles.add(handle);
7795
+ return handle;
7796
+ };
7792
7797
  const resize = () => {
7793
7798
  dpr = window.devicePixelRatio || 1;
7794
7799
  w = canvas.width = Math.floor(window.innerWidth * dpr);
@@ -7846,13 +7851,14 @@ function useAtmosphericCanvas(canvasRef) {
7846
7851
  ctx.fillStyle = g3;
7847
7852
  ctx.fillRect(0, 0, w / dpr, h / dpr);
7848
7853
  t++;
7849
- raf = requestAnimationFrame(draw);
7854
+ schedule(draw);
7850
7855
  };
7851
7856
  resize();
7852
7857
  window.addEventListener("resize", resize);
7853
- raf = requestAnimationFrame(draw);
7858
+ schedule(draw);
7854
7859
  return () => {
7855
- cancelAnimationFrame(raf);
7860
+ rafHandles.forEach((handle) => cancelAnimationFrame(handle));
7861
+ rafHandles.clear();
7856
7862
  window.removeEventListener("resize", resize);
7857
7863
  };
7858
7864
  }, [canvasRef]);
@@ -8432,8 +8438,8 @@ var BlocksLoginPage = ({
8432
8438
  ] });
8433
8439
  };
8434
8440
  var LoginPage = () => {
8435
- const config = chunkH6RIPPT3_cjs.useBlocksAppConfigStore((state) => state.getConfig());
8436
- const { start, isLoading } = chunkH6RIPPT3_cjs.useLogin();
8441
+ const config = chunkUBF3PJTH_cjs.useBlocksAppConfigStore((state) => state.getConfig());
8442
+ const { start, isLoading } = chunkUBF3PJTH_cjs.useLogin();
8437
8443
  return /* @__PURE__ */ jsxRuntime.jsx(
8438
8444
  BlocksLoginPage,
8439
8445
  {
@@ -8515,10 +8521,10 @@ var DefaultDoc = () => {
8515
8521
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid gap-5 md:grid-cols-2 lg:grid-cols-3", children: data.map((item) => /* @__PURE__ */ jsxRuntime.jsx(DocCard, { ...item }, item.url)) });
8516
8522
  };
8517
8523
  function useCreateProjectRedirect() {
8518
- const { name } = chunkH6RIPPT3_cjs.useBlocksAppConfigStore((state) => state.config);
8524
+ const { name } = chunkUBF3PJTH_cjs.useBlocksAppConfigStore((state) => state.config);
8519
8525
  const navigate = reactRouter.useNavigate();
8520
8526
  const osApp = filteredAppSwitcherData.find((app) => app.id === "blocks-os");
8521
- const { isFetching, isReady, redirect } = chunkH6RIPPT3_cjs.usePrefetchRedirect({
8527
+ const { isFetching, isReady, redirect } = chunkUBF3PJTH_cjs.usePrefetchRedirect({
8522
8528
  clientId: osApp ? chunkHF24SZFI_cjs.getRuntimeEnv(osApp.clientId) : "",
8523
8529
  redirectUri: osApp ? chunkHF24SZFI_cjs.getRuntimeEnv(osApp.redirectUri) : "",
8524
8530
  forwardedTo: "/app/create-project",
@@ -8610,10 +8616,10 @@ function useProjectOverviewRedirect({
8610
8616
  tenantGroupId
8611
8617
  }) {
8612
8618
  const navigate = reactRouter.useNavigate();
8613
- const { name } = chunkH6RIPPT3_cjs.useBlocksAppConfigStore((state) => state.config);
8619
+ const { name } = chunkUBF3PJTH_cjs.useBlocksAppConfigStore((state) => state.config);
8614
8620
  const osApp = filteredAppSwitcherData.find((app) => app.id === "blocks-os");
8615
8621
  const redirectedRoute = `/app/project/${tenantGroupId}/environments`;
8616
- const { isFetching, isReady, redirect } = chunkH6RIPPT3_cjs.usePrefetchRedirect({
8622
+ const { isFetching, isReady, redirect } = chunkUBF3PJTH_cjs.usePrefetchRedirect({
8617
8623
  clientId: osApp ? chunkHF24SZFI_cjs.getRuntimeEnv(osApp.clientId) : "",
8618
8624
  redirectUri: osApp ? chunkHF24SZFI_cjs.getRuntimeEnv(osApp.redirectUri) : "",
8619
8625
  forwardedTo: redirectedRoute,
@@ -8881,7 +8887,7 @@ var CallbackPage = ({ defaultRedirectUrl }) => {
8881
8887
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex min-h-screen items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader, { className: "h-12 w-12 animate-spin text-gray-500" }) });
8882
8888
  };
8883
8889
  function ProfilePage() {
8884
- const { isLoading, error } = chunkH6RIPPT3_cjs.useInitiateRedirect({
8890
+ const { isLoading, error } = chunkUBF3PJTH_cjs.useInitiateRedirect({
8885
8891
  clientId: chunkHF24SZFI_cjs.getRuntimeEnv("BLOCKS_IAM_CLIENT_ID"),
8886
8892
  redirectUri: chunkHF24SZFI_cjs.getRuntimeEnv("BLOCKS_IAM_CALLBACK_URL"),
8887
8893
  forwardedTo: "/app/profile"
@@ -9159,7 +9165,7 @@ var ConfirmationModal = ({
9159
9165
  ] })
9160
9166
  ] });
9161
9167
  var DashboardOverview = () => {
9162
- const { name } = chunkH6RIPPT3_cjs.useBlocksAppConfigStore((state) => state.config);
9168
+ const { name } = chunkUBF3PJTH_cjs.useBlocksAppConfigStore((state) => state.config);
9163
9169
  const { data: data2, isFetching } = chunkPSATBGVF_cjs.useGetProject();
9164
9170
  const {
9165
9171
  endpoints,
@@ -9856,7 +9862,7 @@ function SidebarMobileView({
9856
9862
  navigationMenus
9857
9863
  }) {
9858
9864
  const [open, setOpen] = React8.useState(false);
9859
- const { appLightLogo, appDarkLogo } = chunkH6RIPPT3_cjs.useLogo();
9865
+ const { appLightLogo, appDarkLogo } = chunkUBF3PJTH_cjs.useLogo();
9860
9866
  const allowedMenu = chunkQ7Y32IBM_cjs.useFilteredMenus(navigationMenus);
9861
9867
  return /* @__PURE__ */ jsxRuntime.jsxs(Sheet, { open, onOpenChange: setOpen, children: [
9862
9868
  /* @__PURE__ */ jsxRuntime.jsx(SheetTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "outline", size: "icon", className: "shrink-0", children: [
@@ -9906,8 +9912,8 @@ function SidebarMenuDesktop({
9906
9912
  navigationMenus
9907
9913
  }) {
9908
9914
  const { isSidebarOpen, toggleSidebar } = React8.useContext(chunkAL2E2WC4_cjs.SidebarContext);
9909
- const { appLightLogo, appDarkLogo } = chunkH6RIPPT3_cjs.useLogo();
9910
- const icon = chunkH6RIPPT3_cjs.useIcon();
9915
+ const { appLightLogo, appDarkLogo } = chunkUBF3PJTH_cjs.useLogo();
9916
+ const icon = chunkUBF3PJTH_cjs.useIcon();
9911
9917
  const allowedMenu = chunkQ7Y32IBM_cjs.useFilteredMenus(navigationMenus);
9912
9918
  const { isActivePath: isProjectOverviewRoute } = chunkQ7Y32IBM_cjs.useIsActiveMenu("/app/project");
9913
9919
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -10999,7 +11005,7 @@ function MultiSelect2({
10999
11005
  onChange,
11000
11006
  value: selectedValues
11001
11007
  }) {
11002
- const [buttonRef, popoverWidth] = chunkH6RIPPT3_cjs.usePopoverWidth();
11008
+ const [buttonRef, popoverWidth] = chunkUBF3PJTH_cjs.usePopoverWidth();
11003
11009
  const onSelectHandler = (value) => {
11004
11010
  const nextValues = selectedValues.includes(value) ? selectedValues.filter((item) => item !== value) : [...selectedValues, value];
11005
11011
  onChange(nextValues);
@@ -11116,7 +11122,7 @@ var ClearButton = ({ onClear }) => {
11116
11122
  };
11117
11123
  function Radio({ label, options, onChange, value }) {
11118
11124
  const [search, setSearch] = React8.useState("");
11119
- const [buttonRef, popoverWidth] = chunkH6RIPPT3_cjs.usePopoverWidth();
11125
+ const [buttonRef, popoverWidth] = chunkUBF3PJTH_cjs.usePopoverWidth();
11120
11126
  const isMobile = chunkQ7Y32IBM_cjs.useIsMobile();
11121
11127
  const selected = React8.useMemo(
11122
11128
  () => options.find((item) => item.value === value) || null,
@@ -12184,5 +12190,5 @@ exports.useOidcContext = useOidcContext;
12184
12190
  exports.usePaginationQueryParams = usePaginationQueryParams;
12185
12191
  exports.useSortQueryParams = useSortQueryParams;
12186
12192
  exports.useWizardStepper = useWizardStepper;
12187
- //# sourceMappingURL=chunk-P34SPTPD.cjs.map
12188
- //# sourceMappingURL=chunk-P34SPTPD.cjs.map
12193
+ //# sourceMappingURL=chunk-MLXV2TTM.cjs.map
12194
+ //# sourceMappingURL=chunk-MLXV2TTM.cjs.map