@nice2dev/ui 1.3.2 → 1.3.4
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/CHANGELOG.md +64 -0
- package/dist/NiceModuleLifecyclePanel-CODg_uxV.js +7376 -0
- package/dist/NiceModuleLifecyclePanel-DIYT_O2m.cjs +1 -0
- package/dist/NiceModuleLifecyclePanel-DUdks77F.cjs +1 -0
- package/dist/NiceModuleLifecyclePanel-M-LNxTvd.js +7373 -0
- package/dist/NiceModuleLifecyclePanel.css +1 -1
- package/dist/index.cjs +223 -223
- package/dist/index.css +1 -1
- package/dist/index.d.ts +72 -3
- package/dist/index.mjs +12802 -12659
- package/dist/navigation.cjs +1 -1
- package/dist/navigation.d.ts +30 -0
- package/dist/navigation.mjs +1 -1
- package/dist/style.css +2 -2
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -17287,6 +17287,9 @@ export declare interface NiceNavShellHomeShortcut {
|
|
|
17287
17287
|
onClick?: () => void;
|
|
17288
17288
|
}
|
|
17289
17289
|
|
|
17290
|
+
/** How NiceNavShell opens pages — see {@link SidebarNavUserPrefs.pageMode}. */
|
|
17291
|
+
export declare type NiceNavShellPageMode = 'auto' | 'single' | 'tabs';
|
|
17292
|
+
|
|
17290
17293
|
export declare type NiceNavShellPersistence = 'memory' | 'localStorage' | 'session';
|
|
17291
17294
|
|
|
17292
17295
|
export declare interface NiceNavShellProps {
|
|
@@ -17335,6 +17338,13 @@ export declare interface NiceNavShellProps {
|
|
|
17335
17338
|
* row's own colour. Applies to the built-in sidebar and to `api.openFromSidebar`.
|
|
17336
17339
|
*/
|
|
17337
17340
|
tabColors?: NiceNavShellTabColors;
|
|
17341
|
+
/**
|
|
17342
|
+
* How a tab shows its colour (1.3.3): `'bar'` — a line under the tab, `'fill'` — a tint with a
|
|
17343
|
+
* bar along the top. Absent: the sidebar's `colorStyle` preference (Preferences → Display) of
|
|
17344
|
+
* `sidebarUserId`, so the tabs follow the user's choice. Pass it when your own `sidebar` keeps
|
|
17345
|
+
* its preferences elsewhere (e.g. on the server).
|
|
17346
|
+
*/
|
|
17347
|
+
colorStyle?: 'bar' | 'fill';
|
|
17338
17348
|
/** Extra props for the built-in NiceSidebarNav (rendered from `sidebarData`), e.g. `levelColors`. */
|
|
17339
17349
|
sidebarProps?: Partial<NiceSidebarNavProps>;
|
|
17340
17350
|
/**
|
|
@@ -17384,8 +17394,20 @@ export declare interface NiceNavShellProps {
|
|
|
17384
17394
|
* shortcuts grid, etc.).
|
|
17385
17395
|
*/
|
|
17386
17396
|
emptyState?: ReactNode;
|
|
17387
|
-
/**
|
|
17397
|
+
/**
|
|
17398
|
+
* `'enabled'` offers tabs: whether the strip shows is the user's choice (`pageMode`, set on the
|
|
17399
|
+
* General page of the sidebar preferences) — by default one page at a time in a browser tab,
|
|
17400
|
+
* which has tabs of its own, and tabs in an installed app (1.3.4; before, always tabs).
|
|
17401
|
+
* `'disabled'` (default) never shows tabs and just routes content.
|
|
17402
|
+
*/
|
|
17388
17403
|
tabsMode?: 'enabled' | 'disabled';
|
|
17404
|
+
/**
|
|
17405
|
+
* How pages open when `tabsMode="enabled"` (1.3.4): `'auto'` — tabs in an installed app, one
|
|
17406
|
+
* page at a time in a browser tab; `'single'`; `'tabs'`. Absent: the `pageMode` preference of
|
|
17407
|
+
* `sidebarUserId` (Preferences → General), so the user chooses. Pass it when your own `sidebar`
|
|
17408
|
+
* keeps its preferences elsewhere (e.g. on the server), or to fix the mode.
|
|
17409
|
+
*/
|
|
17410
|
+
pageMode?: NiceNavShellPageMode;
|
|
17389
17411
|
/** When `false` (default) navigating to an already-open route focuses it instead of duplicating. */
|
|
17390
17412
|
allowDuplicateTabs?: boolean;
|
|
17391
17413
|
/** Maximum number of tabs (oldest non-pinned auto-closes when exceeded). */
|
|
@@ -17454,6 +17476,12 @@ export declare interface NiceNavShellProps {
|
|
|
17454
17476
|
* is the whole page, a number — or give its parent one.
|
|
17455
17477
|
*/
|
|
17456
17478
|
height?: number | string;
|
|
17479
|
+
/**
|
|
17480
|
+
* Padding round the page in the body (1.3.4) — px or any CSS `padding` value. Default `10` px;
|
|
17481
|
+
* `0` for a page that fills the body edge to edge (an editor, a map). Also settable in CSS as
|
|
17482
|
+
* `--nice-nav-shell-content-padding`.
|
|
17483
|
+
*/
|
|
17484
|
+
contentPadding?: number | string;
|
|
17457
17485
|
className?: string;
|
|
17458
17486
|
contentClassName?: string;
|
|
17459
17487
|
'data-testid'?: string;
|
|
@@ -20954,6 +20982,11 @@ export declare interface NiceSidebarNavProps {
|
|
|
20954
20982
|
routeToUrl?: (route: string) => string;
|
|
20955
20983
|
/** Enable the right-click context menu on view nodes. Default `true`. */
|
|
20956
20984
|
contextMenu?: boolean;
|
|
20985
|
+
/**
|
|
20986
|
+
* Show "Open in new tab" in the context menu (1.3.4). Default `true`; NiceNavShell turns it off
|
|
20987
|
+
* for its built-in sidebar while it opens one page at a time.
|
|
20988
|
+
*/
|
|
20989
|
+
openInNewTab?: boolean;
|
|
20957
20990
|
/**
|
|
20958
20991
|
* Disable individual destructive context-menu actions (and the matching
|
|
20959
20992
|
* gestures). Listed actions render greyed-out; non-destructive actions
|
|
@@ -23172,6 +23205,11 @@ export declare interface NiceTopNavProps {
|
|
|
23172
23205
|
/** Fired when a view is clicked in the mobile sidebar drawer. Closes the drawer. `opts` as in
|
|
23173
23206
|
* NiceSidebarNav's `onNavigate` (new tab, colours, path). */
|
|
23174
23207
|
onSidebarNavigate?: (route: string, view: SidebarNavView, opts?: SidebarNavNavigateOptions) => void;
|
|
23208
|
+
/**
|
|
23209
|
+
* Show "Open in new tab" in the drawer sidebar's context menu (1.3.4, default `true`).
|
|
23210
|
+
* NiceNavShell turns it off while it opens one page at a time.
|
|
23211
|
+
*/
|
|
23212
|
+
sidebarOpenInNewTab?: boolean;
|
|
23175
23213
|
/**
|
|
23176
23214
|
* Force the narrow "2-row" mobile layout regardless of viewport width. Use
|
|
23177
23215
|
* from `NiceNavShell` to keep the breakpoint decision in one place when the
|
|
@@ -27169,6 +27207,10 @@ export declare interface SidebarNavHelpers {
|
|
|
27169
27207
|
setLeftClickBehavior: (v: 'focus-existing' | 'open-new') => void;
|
|
27170
27208
|
/** Replace the per-mode ordering of item ids. Pass `null` to clear (revert to data-defined order). */
|
|
27171
27209
|
reorderItems: (mode: SidebarNavMode, orderedIds: string[] | null) => void;
|
|
27210
|
+
/** How level / branch colours show: a bar by each row (default) or the whole row filled. */
|
|
27211
|
+
setColorStyle: (v: 'bar' | 'fill') => void;
|
|
27212
|
+
/** How NiceNavShell opens pages: automatically, one at a time or in tabs (1.3.4). */
|
|
27213
|
+
setPageMode: (v: NiceNavShellPageMode) => void;
|
|
27172
27214
|
resetAll: () => void;
|
|
27173
27215
|
}
|
|
27174
27216
|
|
|
@@ -27287,6 +27329,28 @@ export declare interface SidebarNavUserPrefs {
|
|
|
27287
27329
|
* Edited from the "Order" page in preferences.
|
|
27288
27330
|
*/
|
|
27289
27331
|
itemOrder: Partial<Record<SidebarNavMode, string[]>>;
|
|
27332
|
+
/**
|
|
27333
|
+
* How a level / branch colour shows (1.3.3; `levelColors`, a branch's `color`):
|
|
27334
|
+
* - `'bar'` (default): a bar in the colour left of each row's arrow, and NavShell's tabs
|
|
27335
|
+
* underlined in it;
|
|
27336
|
+
* - `'fill'`: the whole row filled with it (text picked for contrast), and the tabs tinted
|
|
27337
|
+
* with a bar along the top — the look of 1.3.2.
|
|
27338
|
+
*
|
|
27339
|
+
* Set from the Display page of the preferences; `preferences={{ colorStyle: 'fill' }}` makes
|
|
27340
|
+
* `'fill'` the default.
|
|
27341
|
+
*/
|
|
27342
|
+
colorStyle: 'bar' | 'fill';
|
|
27343
|
+
/**
|
|
27344
|
+
* How NiceNavShell opens pages when it offers tabs (`tabsMode="enabled"`, 1.3.4):
|
|
27345
|
+
* - `'auto'` (default): in tabs in an installed app (a window of its own, no browser tab strip),
|
|
27346
|
+
* one page at a time in a browser tab — the browser has tabs already;
|
|
27347
|
+
* - `'single'`: one page at a time in the body;
|
|
27348
|
+
* - `'tabs'`: every page in a tab of the shell's strip.
|
|
27349
|
+
*
|
|
27350
|
+
* Set from the General page of the preferences; `preferences={{ pageMode: 'tabs' }}` makes tabs
|
|
27351
|
+
* the default (e.g. a desktop build).
|
|
27352
|
+
*/
|
|
27353
|
+
pageMode: NiceNavShellPageMode;
|
|
27290
27354
|
}
|
|
27291
27355
|
|
|
27292
27356
|
/**
|
|
@@ -27350,7 +27414,7 @@ export declare interface SidebarPrefsCategory {
|
|
|
27350
27414
|
icon: ReactNode;
|
|
27351
27415
|
}
|
|
27352
27416
|
|
|
27353
|
-
export declare function SidebarPrefsScopeProvider({ userId, data, children, }: SidebarPrefsScopeProviderProps): default_2.ReactElement;
|
|
27417
|
+
export declare function SidebarPrefsScopeProvider({ userId, data, tabsAvailable, children, }: SidebarPrefsScopeProviderProps): default_2.ReactElement;
|
|
27354
27418
|
|
|
27355
27419
|
export declare interface SidebarPrefsScopeProviderProps extends SidebarPrefsScopeValue {
|
|
27356
27420
|
children: ReactNode;
|
|
@@ -27364,6 +27428,11 @@ export declare interface SidebarPrefsScopeProviderProps extends SidebarPrefsScop
|
|
|
27364
27428
|
export declare interface SidebarPrefsScopeValue {
|
|
27365
27429
|
userId?: string;
|
|
27366
27430
|
data?: SidebarNavDataNode[];
|
|
27431
|
+
/**
|
|
27432
|
+
* Whether the NavShell around the pages offers tabs (`tabsMode="enabled"`, 1.3.4) — the General
|
|
27433
|
+
* page then lets the user choose how pages open. Unset outside a NavShell.
|
|
27434
|
+
*/
|
|
27435
|
+
tabsAvailable?: boolean;
|
|
27367
27436
|
}
|
|
27368
27437
|
|
|
27369
27438
|
export declare interface SignalRLiveChartSourceConfig {
|
|
@@ -29705,7 +29774,7 @@ export { UseShowAtOptions }
|
|
|
29705
29774
|
|
|
29706
29775
|
export declare function useSidebarNavPrefs(userId: string | undefined, initialEnableModeIcons: boolean | undefined, controlledPrefs: Partial<SidebarNavUserPrefs> | undefined, onChange: ((prefs: SidebarNavUserPrefs) => void) | undefined): [SidebarNavUserPrefs, SidebarNavHelpers];
|
|
29707
29776
|
|
|
29708
|
-
/** Resolve `{ userId, data }` for a preferences page. Props override context. */
|
|
29777
|
+
/** Resolve `{ userId, data, tabsAvailable }` for a preferences page. Props override context. */
|
|
29709
29778
|
export declare function useSidebarPrefsScope(overrides?: SidebarPrefsScopeValue): SidebarPrefsScopeValue;
|
|
29710
29779
|
|
|
29711
29780
|
/** Shortcut for pages that only need the userId. */
|