@logickernel/bridge 0.15.6 → 0.16.0

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,3 +1,4 @@
1
+ import { ThemeProvider } from 'next-themes';
1
2
  import * as React2 from 'react';
2
3
  import { useState, useEffect } from 'react';
3
4
  import { Slot } from '@radix-ui/react-slot';
@@ -15,7 +16,7 @@ import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
15
16
  import * as AvatarPrimitive from '@radix-ui/react-avatar';
16
17
  import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
17
18
 
18
- // src/next/components/ui/sidebar.tsx
19
+ // src/next/components/app-layout.tsx
19
20
  var MOBILE_BREAKPOINT = 768;
20
21
  function useIsMobile() {
21
22
  const [isMobile, setIsMobile] = React2.useState(void 0);
@@ -1248,15 +1249,15 @@ function AppSidebar({
1248
1249
  const pathSegments = currentPathname.split("/").filter(Boolean);
1249
1250
  const uuidRegex = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
1250
1251
  let pathOrgId = null;
1251
- if (pathSegments.length >= 2) {
1252
- const potentialOrgId = pathSegments[1];
1253
- if (potentialOrgId && uuidRegex.test(potentialOrgId)) {
1254
- pathOrgId = potentialOrgId;
1255
- }
1256
- } else if (pathSegments.length === 1) {
1257
- const potentialOrgId = pathSegments[0];
1258
- if (potentialOrgId && uuidRegex.test(potentialOrgId)) {
1259
- pathOrgId = potentialOrgId;
1252
+ if (pathSegments.length >= 1) {
1253
+ const firstSegment = pathSegments[0];
1254
+ if (firstSegment && uuidRegex.test(firstSegment)) {
1255
+ pathOrgId = firstSegment;
1256
+ } else if (pathSegments.length >= 2) {
1257
+ const secondSegment = pathSegments[1];
1258
+ if (secondSegment && uuidRegex.test(secondSegment)) {
1259
+ pathOrgId = secondSegment;
1260
+ }
1260
1261
  }
1261
1262
  }
1262
1263
  const detectedOrgId = organizationId || pathOrgId || void 0;
@@ -1325,17 +1326,26 @@ function AppLayout({
1325
1326
  apiBaseUrl,
1326
1327
  children
1327
1328
  }) {
1328
- return /* @__PURE__ */ jsxs(SidebarProvider, { children: [
1329
- /* @__PURE__ */ jsx(
1330
- AppSidebar,
1331
- {
1332
- user,
1333
- organizationId,
1334
- apiBaseUrl
1335
- }
1336
- ),
1337
- /* @__PURE__ */ jsx(SidebarInset, { children: /* @__PURE__ */ jsx(SidebarContent2, { children }) })
1338
- ] });
1329
+ return /* @__PURE__ */ jsx(
1330
+ ThemeProvider,
1331
+ {
1332
+ attribute: "class",
1333
+ defaultTheme: "system",
1334
+ enableSystem: true,
1335
+ disableTransitionOnChange: true,
1336
+ children: /* @__PURE__ */ jsxs(SidebarProvider, { children: [
1337
+ /* @__PURE__ */ jsx(
1338
+ AppSidebar,
1339
+ {
1340
+ user,
1341
+ organizationId,
1342
+ apiBaseUrl
1343
+ }
1344
+ ),
1345
+ /* @__PURE__ */ jsx(SidebarInset, { children: /* @__PURE__ */ jsx(SidebarContent2, { children }) })
1346
+ ] })
1347
+ }
1348
+ );
1339
1349
  }
1340
1350
 
1341
1351
  export { AppLayout, AppSidebar, NavMain, NavUser, TeamSwitcher, getIconComponent, useNavigation };