@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,5 +1,6 @@
1
1
  'use strict';
2
2
 
3
+ var nextThemes = require('next-themes');
3
4
  var React2 = require('react');
4
5
  var reactSlot = require('@radix-ui/react-slot');
5
6
  var classVarianceAuthority = require('class-variance-authority');
@@ -44,7 +45,7 @@ var CollapsiblePrimitive__namespace = /*#__PURE__*/_interopNamespace(Collapsible
44
45
  var AvatarPrimitive__namespace = /*#__PURE__*/_interopNamespace(AvatarPrimitive);
45
46
  var DropdownMenuPrimitive__namespace = /*#__PURE__*/_interopNamespace(DropdownMenuPrimitive);
46
47
 
47
- // src/next/components/ui/sidebar.tsx
48
+ // src/next/components/app-layout.tsx
48
49
  var MOBILE_BREAKPOINT = 768;
49
50
  function useIsMobile() {
50
51
  const [isMobile, setIsMobile] = React2__namespace.useState(void 0);
@@ -1277,15 +1278,15 @@ function AppSidebar({
1277
1278
  const pathSegments = currentPathname.split("/").filter(Boolean);
1278
1279
  const uuidRegex = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
1279
1280
  let pathOrgId = null;
1280
- if (pathSegments.length >= 2) {
1281
- const potentialOrgId = pathSegments[1];
1282
- if (potentialOrgId && uuidRegex.test(potentialOrgId)) {
1283
- pathOrgId = potentialOrgId;
1284
- }
1285
- } else if (pathSegments.length === 1) {
1286
- const potentialOrgId = pathSegments[0];
1287
- if (potentialOrgId && uuidRegex.test(potentialOrgId)) {
1288
- pathOrgId = potentialOrgId;
1281
+ if (pathSegments.length >= 1) {
1282
+ const firstSegment = pathSegments[0];
1283
+ if (firstSegment && uuidRegex.test(firstSegment)) {
1284
+ pathOrgId = firstSegment;
1285
+ } else if (pathSegments.length >= 2) {
1286
+ const secondSegment = pathSegments[1];
1287
+ if (secondSegment && uuidRegex.test(secondSegment)) {
1288
+ pathOrgId = secondSegment;
1289
+ }
1289
1290
  }
1290
1291
  }
1291
1292
  const detectedOrgId = organizationId || pathOrgId || void 0;
@@ -1354,17 +1355,26 @@ function AppLayout({
1354
1355
  apiBaseUrl,
1355
1356
  children
1356
1357
  }) {
1357
- return /* @__PURE__ */ jsxRuntime.jsxs(SidebarProvider, { children: [
1358
- /* @__PURE__ */ jsxRuntime.jsx(
1359
- AppSidebar,
1360
- {
1361
- user,
1362
- organizationId,
1363
- apiBaseUrl
1364
- }
1365
- ),
1366
- /* @__PURE__ */ jsxRuntime.jsx(SidebarInset, { children: /* @__PURE__ */ jsxRuntime.jsx(SidebarContent2, { children }) })
1367
- ] });
1358
+ return /* @__PURE__ */ jsxRuntime.jsx(
1359
+ nextThemes.ThemeProvider,
1360
+ {
1361
+ attribute: "class",
1362
+ defaultTheme: "system",
1363
+ enableSystem: true,
1364
+ disableTransitionOnChange: true,
1365
+ children: /* @__PURE__ */ jsxRuntime.jsxs(SidebarProvider, { children: [
1366
+ /* @__PURE__ */ jsxRuntime.jsx(
1367
+ AppSidebar,
1368
+ {
1369
+ user,
1370
+ organizationId,
1371
+ apiBaseUrl
1372
+ }
1373
+ ),
1374
+ /* @__PURE__ */ jsxRuntime.jsx(SidebarInset, { children: /* @__PURE__ */ jsxRuntime.jsx(SidebarContent2, { children }) })
1375
+ ] })
1376
+ }
1377
+ );
1368
1378
  }
1369
1379
 
1370
1380
  exports.AppLayout = AppLayout;