@pelatform/starter.shared 0.2.12 → 0.2.14

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.
package/dist/index.d.ts CHANGED
@@ -38,9 +38,10 @@ declare function LayoutLoader({ children }: {
38
38
  declare function Sidebar({ children }: {
39
39
  children: ReactNode;
40
40
  }): react_jsx_runtime.JSX.Element | null;
41
- declare function SidebarHeaderBack({ linkHref, admin, }: {
41
+ declare function SidebarHeaderBack({ linkHref, admin, text, }: {
42
42
  linkHref?: string;
43
43
  admin?: boolean;
44
+ text?: string;
44
45
  }): react_jsx_runtime.JSX.Element;
45
46
  declare function SidebarContent({ children }: {
46
47
  children: ReactNode;
package/dist/index.js CHANGED
@@ -519,9 +519,13 @@ function UserMenu({
519
519
  const t = useTranslations7();
520
520
  const { isPending: sessionPending, user } = useSession3();
521
521
  const { setActiveSessionAsync } = useSetActiveSession();
522
- const { data: deviceSessions, isPending: deviceSessionsPending } = useListDeviceSessions({
523
- enabled: features.multiSession
524
- });
522
+ let deviceSessions = null;
523
+ let deviceSessionsPending = false;
524
+ if (features.multiSession) {
525
+ const { data, isPending: isPending2 } = useListDeviceSessions();
526
+ deviceSessions = data;
527
+ deviceSessionsPending = isPending2;
528
+ }
525
529
  const [activeSessionPending, setActiveSessionPending] = useState(false);
526
530
  const isPending = sessionPending || activeSessionPending;
527
531
  const switchAccount = useCallback(
@@ -703,10 +707,11 @@ function Sidebar({ children }) {
703
707
  }
704
708
  function SidebarHeaderBack({
705
709
  linkHref = "/",
706
- admin = false
710
+ admin = false,
711
+ text
707
712
  }) {
708
713
  const t = useTranslations8();
709
- return /* @__PURE__ */ jsx11("div", { className: "flex h-14 shrink-0 items-center gap-2 border-border border-b px-2.5 lg:h-15", children: /* @__PURE__ */ jsx11(BackLink, { Link: Link5, href: linkHref, children: admin ? t("common.actions.back") : t("ui.navigation.settings") }) });
714
+ return /* @__PURE__ */ jsx11("div", { className: "flex h-14 shrink-0 items-center gap-2 border-border border-b px-2.5 lg:h-15", children: /* @__PURE__ */ jsx11(BackLink, { Link: Link5, href: linkHref, children: text ?? (admin ? t("common.actions.back") : t("ui.navigation.settings")) }) });
710
715
  }
711
716
  function SidebarContent({ children }) {
712
717
  return /* @__PURE__ */ jsx11(ScrollArea, { className: "mt-2 mb-2.5 h-[calc(100vh-5.5rem)] grow lg:mt-4 lg:mb-7.5 lg:h-[calc(100vh-4rem)]", children });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pelatform/starter.shared",
3
- "version": "0.2.12",
3
+ "version": "0.2.14",
4
4
  "description": "A part of SaaS starter kit for Pelatform applications.",
5
5
  "author": "Pelatform",
6
6
  "license": "MIT",
@@ -37,13 +37,13 @@
37
37
  "devDependencies": {
38
38
  "@pelatform/starter.config": "0.2.2",
39
39
  "@pelatform/starter.hook": "0.2.4",
40
- "@pelatform/starter.utils": "0.2.7",
40
+ "@pelatform/starter.utils": "0.2.8",
41
41
  "@pelatform/tsconfig": "^0.1.4",
42
42
  "@types/react": "^19.2.7",
43
43
  "lucide-react": "^0.562.0",
44
44
  "next": "^16.1.1",
45
- "next-intl": "^4.6.1",
46
- "pelatform-ui": "^1.1.12",
45
+ "next-intl": "^4.7.0",
46
+ "pelatform-ui": "^1.1.15",
47
47
  "react": "^19.2.3",
48
48
  "tsup": "^8.5.1"
49
49
  },