@memobit/libs 3.29.0 → 3.31.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.
@@ -75,6 +75,7 @@ var l = {
75
75
  pageAllWords: "All words",
76
76
  pageViewCalendar: "Calendar",
77
77
  pageViewMap: "Map",
78
+ pageGroupNone: "None",
78
79
  selectDate: "Select date...",
79
80
  monthNames: [
80
81
  "January",
@@ -215,6 +216,7 @@ var l = {
215
216
  pageAllWords: "Toate cuvintele",
216
217
  pageViewCalendar: "Calendar",
217
218
  pageViewMap: "Hartă",
219
+ pageGroupNone: "Fără grupare",
218
220
  selectDate: "Alege data...",
219
221
  monthNames: [
220
222
  "Ianuarie",
@@ -23,7 +23,7 @@ var r = (i) => {
23
23
  const o = {
24
24
  ...i,
25
25
  lib: d,
26
- libBuildNumber: 649,
26
+ libBuildNumber: 656,
27
27
  libCommit: n,
28
28
  libBuildDate: t
29
29
  };
package/dist/index.d.ts CHANGED
@@ -163,6 +163,8 @@ declare type AppFrameContextValue = Omit<AppFrameProps, 'children'>;
163
163
 
164
164
  export declare interface AppFrameProps {
165
165
  app: AppIdentity;
166
+ /** The app's sections. With react-router, RouterAppFrame from '@memobit/libs/router' builds these from paths. */
167
+ nav?: AppNavItem[];
166
168
  /** Adds the account menu (theme, password, two-factor, logout) and mounts the dialogs it opens. Needs an AuthProvider above. */
167
169
  account?: UseAccountMenuOptions;
168
170
  /** App-specific menu entries, listed before the account ones. Page actions join them on small screens. */
@@ -191,6 +193,16 @@ export declare interface AppIdentity {
191
193
  onHomeClick?: () => void;
192
194
  }
193
195
 
196
+ /** One of the app's sections. Shown as a side list on desktop, an icon rail on tablet and a bottom tab bar on phone. */
197
+ export declare interface AppNavItem {
198
+ id: string;
199
+ label: string;
200
+ icon: IconName;
201
+ count?: number;
202
+ isActive: boolean;
203
+ onSelect: () => void;
204
+ }
205
+
194
206
  export declare interface AppPersistenceDefaults<TPages, TTheme> {
195
207
  pages?: TPages;
196
208
  theme: TTheme;
@@ -2971,6 +2983,10 @@ export declare interface PageAction {
2971
2983
  icon?: IconName;
2972
2984
  variant?: ButtonVariant;
2973
2985
  disabled?: boolean;
2986
+ /** Always listed in the page menu, never as a button: for occasional actions such as "Manage locations". */
2987
+ menu?: boolean;
2988
+ /** In the menu, draws a divider above this action to start a new group. */
2989
+ separator?: boolean;
2974
2990
  onClick: () => void;
2975
2991
  }
2976
2992
 
@@ -2993,6 +3009,16 @@ export declare interface PageCounts {
2993
3009
 
2994
3010
  export declare type PageFilterValues = Record<string, FilterValue | undefined>;
2995
3011
 
3012
+ export declare interface PageGroupBy {
3013
+ options: Array<{
3014
+ value: string;
3015
+ label: string;
3016
+ }>;
3017
+ /** The grouping field, or null for no grouping. */
3018
+ value: string | null;
3019
+ onChange: (value: string | null) => void;
3020
+ }
3021
+
2996
3022
  /** What the list holds, singular and plural, in the app's language: { one: 'recipe', other: 'recipes' }. */
2997
3023
  export declare interface PageNoun {
2998
3024
  one: string;
@@ -3067,6 +3093,8 @@ export declare interface PageView {
3067
3093
  onChange: (value: string) => void;
3068
3094
  /** Optional fields the user can show or hide. Listed with the view options, closed until opened. */
3069
3095
  columns?: PageColumns;
3096
+ groupBy?: PageGroupBy;
3097
+ toggles?: PageViewToggle[];
3070
3098
  }
3071
3099
 
3072
3100
  export declare interface PageViewMode {
@@ -3075,6 +3103,14 @@ export declare interface PageViewMode {
3075
3103
  icon: IconName;
3076
3104
  }
3077
3105
 
3106
+ /** An on/off display preference shown with the view options, e.g. "Hide empty fields in cards". */
3107
+ export declare interface PageViewToggle {
3108
+ id: string;
3109
+ label: string;
3110
+ value: boolean;
3111
+ onChange: (value: boolean) => void;
3112
+ }
3113
+
3078
3114
  export declare const Pagination: FC<PaginationProps>;
3079
3115
 
3080
3116
  declare interface PaginationProps {
@@ -3734,7 +3770,7 @@ export declare interface TextFilterValue {
3734
3770
  mode?: string;
3735
3771
  }
3736
3772
 
3737
- export declare type Theme = 'amber-meridian' | 'archive-indigo' | 'arctic-blue' | 'asphalt-code' | 'atelier-media' | 'audit-ember' | 'azure-night' | 'blossom-meadow' | 'blueprint-clay' | 'blush-market' | 'brass-chronicle' | 'carbon-velocity' | 'chalk-circuit' | 'chrono-atlas' | 'circuit-harbor' | 'clinical-aqua' | 'cobalt-pulse' | 'citrus-vital' | 'command-slate' | 'crawler-dusk' | 'crimson-dusk' | 'cyber-forest' | 'dashdarkx' | 'ember-night' | 'emerald-ledger' | 'frost-petal' | 'garden-harvest' | 'gilded-bear' | 'graphite-shell' | 'horizon-amber' | 'horizon-drift' | 'indigo-stitch' | 'ivory-serif' | 'kindred-ink' | 'lamplight' | 'lavender-mist' | 'light-blue' | 'lumen' | 'luna' | 'mesh-circuit' | 'midnight-atlas' | 'midnight-amber' | 'midnight-folio' | 'mint-meadow' | 'mintone' | 'neon-tokyo' | 'noir-marquee' | 'ocean-breeze' | 'ocean-depths' | 'orbital-night' | 'sandstone' | 'sandy-parchment' | 'screening-room' | 'signal-burst' | 'signal-clarity' | 'slate-focus' | 'slate-bazaar' | 'spectrum-vault' | 'tailwind-vue-dark' | 'terminal-phosphor' | 'terracotta-kitchen' | 'twilight-pulse' | 'vault-guard' | 'velvet-reel' | 'velvet-tome' | 'verdant-pulse' | 'vital-aurora' | 'vital-signal' | 'war-room';
3773
+ export declare type Theme = 'arctic-blue' | 'asphalt-code' | 'atelier-media' | 'audit-ember' | 'azure-night' | 'blossom-meadow' | 'blueprint-clay' | 'carbon-velocity' | 'chalk-circuit' | 'chrono-atlas' | 'circuit-harbor' | 'cobalt-pulse' | 'citrus-vital' | 'crawler-dusk' | 'crimson-dusk' | 'cyber-forest' | 'dashdarkx' | 'emerald-ledger' | 'garden-harvest' | 'graphite-shell' | 'horizon-amber' | 'indigo-stitch' | 'ivory-serif' | 'kindred-ink' | 'lamplight' | 'lumen' | 'luna' | 'mesh-circuit' | 'midnight-atlas' | 'midnight-amber' | 'noir-marquee' | 'ocean-breeze' | 'ocean-depths' | 'orbital-night' | 'sandstone' | 'sandy-parchment' | 'screening-room' | 'signal-burst' | 'signal-clarity' | 'slate-focus' | 'slate-bazaar' | 'tailwind-vue-dark' | 'terminal-phosphor' | 'terracotta-kitchen' | 'vault-guard' | 'verdant-pulse' | 'vital-aurora' | 'vital-signal' | 'war-room';
3738
3774
 
3739
3775
  export { THEME_CONFIGS }
3740
3776
 
@@ -3764,6 +3800,11 @@ export declare interface ThemeProviderProps {
3764
3800
  effects: ThemeEffects;
3765
3801
  onSave?: (value: ThemeSaveValue) => void;
3766
3802
  allowedThemes?: string[];
3803
+ /**
3804
+ * Shown when `theme` is no longer in @memobit/themes (a saved choice of a removed theme).
3805
+ * Pass the app's own default, usually `getDefaultThemeForApp(appName)`.
3806
+ */
3807
+ fallbackTheme?: Theme;
3767
3808
  }
3768
3809
 
3769
3810
  export declare interface ThemeSaveValue {
package/dist/router.d.ts CHANGED
@@ -1,6 +1,60 @@
1
+ import { ComponentType } from 'react';
2
+ import { FC } from 'react';
3
+ import { IconName } from '@memobit/icons';
1
4
  import { ReactElement } from 'react';
2
5
  import { ReactNode } from 'react';
3
6
 
7
+ declare interface AccountMenuModalProps {
8
+ isOpen: boolean;
9
+ onClose: () => void;
10
+ }
11
+
12
+ declare interface AppFrameProps {
13
+ app: AppIdentity;
14
+ /** The app's sections. With react-router, RouterAppFrame from '@memobit/libs/router' builds these from paths. */
15
+ nav?: AppNavItem[];
16
+ /** Adds the account menu (theme, password, two-factor, logout) and mounts the dialogs it opens. Needs an AuthProvider above. */
17
+ account?: UseAccountMenuOptions;
18
+ /** App-specific menu entries, listed before the account ones. Page actions join them on small screens. */
19
+ menuItems?: MenuHamburgerItem[];
20
+ children: ReactNode;
21
+ }
22
+
23
+ declare interface AppIdentity {
24
+ name: string;
25
+ icon?: IconName;
26
+ /** The app's own logo, used instead of `icon`: an image URL (e.g. '/icon.svg') or any element. */
27
+ logo?: ReactNode;
28
+ onHomeClick?: () => void;
29
+ }
30
+
31
+ /** One of the app's sections. Shown as a side list on desktop, an icon rail on tablet and a bottom tab bar on phone. */
32
+ declare interface AppNavItem {
33
+ id: string;
34
+ label: string;
35
+ icon: IconName;
36
+ count?: number;
37
+ isActive: boolean;
38
+ onSelect: () => void;
39
+ }
40
+
41
+ export declare interface AppRouteNavItem {
42
+ path: string;
43
+ label: string;
44
+ icon: IconName;
45
+ count?: number;
46
+ /** Whether only the exact path counts as this section. Defaults to true for '/' and false otherwise, so '/archive/12' still lights up Archive. */
47
+ end?: boolean;
48
+ }
49
+
50
+ declare interface MenuHamburgerItem {
51
+ label: string;
52
+ icon?: IconName;
53
+ onClick: () => void;
54
+ isActive: boolean;
55
+ separator?: boolean;
56
+ }
57
+
4
58
  export declare function ProtectedRoute({ children, loginPath }: ProtectedRouteProps): ReactElement;
5
59
 
6
60
  export declare interface ProtectedRouteProps {
@@ -8,6 +62,20 @@ export declare interface ProtectedRouteProps {
8
62
  loginPath?: string;
9
63
  }
10
64
 
65
+ /** AppFrame for react-router apps: sections are given by path, the current one follows the URL, and the app logo leads home. */
66
+ export declare const RouterAppFrame: FC<RouterAppFrameProps>;
67
+
68
+ export declare interface RouterAppFrameProps extends Omit<AppFrameProps, 'nav'> {
69
+ nav: AppRouteNavItem[];
70
+ }
71
+
72
+ declare interface UseAccountMenuOptions {
73
+ appName: string;
74
+ mfaModal?: ComponentType<AccountMenuModalProps>;
75
+ themeLabel?: string;
76
+ loginPath?: string;
77
+ }
78
+
11
79
  export { }
12
80
 
13
81
 
package/dist/router.js CHANGED
@@ -1,4 +1,6 @@
1
- import { ProtectedRoute as t } from "./components/ProtectedRoute/ProtectedRoute2.js";
1
+ import { ProtectedRoute as r } from "./components/ProtectedRoute/ProtectedRoute2.js";
2
+ import { RouterAppFrame as e } from "./components/RouterAppFrame/RouterAppFrame.js";
2
3
  export {
3
- t as ProtectedRoute
4
+ r as ProtectedRoute,
5
+ e as RouterAppFrame
4
6
  };
package/dist/version.js CHANGED
@@ -1,4 +1,4 @@
1
- var I = "3.29.0", B = 649, L = "e417fba", _ = "2026-11-07T18:20:12.908Z", a = "649";
1
+ var I = "3.31.0", B = 656, L = "4f487ea", _ = "2026-11-07T19:44:52.809Z", a = "656";
2
2
  export {
3
3
  _ as LIB_BUILD_DATE,
4
4
  a as LIB_BUILD_ID,
package/dist/version.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
- "version": "3.29.0",
3
- "buildNumber": 649,
4
- "commit": "e417fba",
5
- "buildDate": "2026-11-07T18:20:12.908Z"
2
+ "version": "3.31.0",
3
+ "buildNumber": 656,
4
+ "commit": "4f487ea",
5
+ "buildDate": "2026-11-07T19:44:52.809Z"
6
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memobit/libs",
3
- "version": "3.29.0",
3
+ "version": "3.31.0",
4
4
  "description": "React component library powering the Memobit apps — 100+ components, helpers and hooks. Icons ship as @memobit/icons and themes as @memobit/themes. TypeScript-first, ESM-only, React 19.",
5
5
  "keywords": [
6
6
  "react",
@@ -82,7 +82,7 @@
82
82
  "peerDependencies": {
83
83
  "@memobit/core": "1.0.0",
84
84
  "@memobit/icons": "^1.7.0",
85
- "@memobit/themes": "^1.0.0",
85
+ "@memobit/themes": "^1.0.0 || ^2.0.0",
86
86
  "react": "19.3.0",
87
87
  "react-dom": "19.3.0",
88
88
  "react-router": "8.4.0"