@nice2dev/ui 1.3.15 → 1.3.16

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.
Files changed (30) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/dist/{NiceDataGrid-BwiBkE3u.cjs → NiceDataGrid-aNPAHsWy.cjs} +1 -1
  3. package/dist/{NiceForm-Cxvh2O6y.cjs → NiceForm-BtRBLffD.cjs} +1 -1
  4. package/dist/{NiceMention-CYTx04JY.cjs → NiceMention-CMqAGvO0.cjs} +1 -1
  5. package/dist/NiceModuleLifecyclePanel-ugNtHimh.cjs +1 -0
  6. package/dist/{NicePagination-CKsAP38Q.cjs → NicePagination-D7XxeNFz.cjs} +1 -1
  7. package/dist/{NiceSavedQueryPanel-CN1rCPFs.cjs → NiceSavedQueryPanel-JHrSlHAV.cjs} +1 -1
  8. package/dist/{NiceScheduler-K8ZAqFCQ.cjs → NiceScheduler-2TwOZq-y.cjs} +1 -1
  9. package/dist/{core-lazy-DfNWyf__.cjs → core-lazy-Cda-D35m.cjs} +1 -1
  10. package/dist/data.cjs +1 -1
  11. package/dist/editors/inputs/NiceNumberInput.mjs +27 -27
  12. package/dist/editors.cjs +1 -1
  13. package/dist/index.cjs +53 -53
  14. package/dist/index.d.ts +48 -14
  15. package/dist/lazy.cjs +1 -1
  16. package/dist/navigation/NiceFirstRunPreferences.mjs +55 -54
  17. package/dist/navigation/NiceNavShell.mjs +429 -429
  18. package/dist/navigation/NiceSetupWizard.mjs +333 -317
  19. package/dist/navigation/NiceSidebarNav.mjs +1111 -1039
  20. package/dist/navigation/menuBuilderModel.mjs +1 -1
  21. package/dist/navigation/sidebarColors.mjs +67 -39
  22. package/dist/navigation/sidebarNavTypes.mjs +16 -14
  23. package/dist/navigation/sidebarPrefs/NiceSidebarPrefsDisplay.mjs +120 -42
  24. package/dist/navigation.cjs +1 -1
  25. package/dist/navigation.d.ts +32 -6
  26. package/dist/{no-code-BQqK8mvU.cjs → no-code-B3BHeyG-.cjs} +1 -1
  27. package/dist/no-code.cjs +1 -1
  28. package/dist/style.css +2 -2
  29. package/package.json +5 -5
  30. package/dist/NiceModuleLifecyclePanel-DHHAjwQx.cjs +0 -1
package/dist/index.d.ts CHANGED
@@ -13632,8 +13632,11 @@ export declare interface NiceFirstRunValues {
13632
13632
  language?: string;
13633
13633
  /** The menu folded to icons. */
13634
13634
  collapsed?: boolean;
13635
- /** How branch colours show: a bar by each item, or whole items filled. */
13636
- colorStyle?: 'bar' | 'fill';
13635
+ /**
13636
+ * How the menu shows colour: the theme's shades (`'theme'`, the default since 1.3.16), plus a bar
13637
+ * by each item in its branch colour, or whole items filled.
13638
+ */
13639
+ colorStyle?: SidebarNavColorStyle;
13637
13640
  }
13638
13641
 
13639
13642
  /**
@@ -17693,11 +17696,12 @@ export declare interface NiceNavShellProps {
17693
17696
  tabColors?: NiceNavShellTabColors;
17694
17697
  /**
17695
17698
  * How a tab shows its colour (1.3.3): `'bar'` — a line under the tab, `'fill'` — a tint with a
17696
- * bar along the top. Absent: the sidebar's `colorStyle` preference (Preferences → Display) of
17697
- * `sidebarUserId`, so the tabs follow the user's choice. Pass it when your own `sidebar` keeps
17698
- * its preferences elsewhere (e.g. on the server).
17699
+ * bar along the top, `'theme'` (1.3.16) — no colour, the theme's tabs. Absent: the sidebar's
17700
+ * `colorStyle` preference (Preferences → Display) of `sidebarUserId` (default `'theme'`), so the
17701
+ * tabs follow the user's choice. Pass it when your own `sidebar` keeps its preferences elsewhere
17702
+ * (e.g. on the server).
17699
17703
  */
17700
- colorStyle?: 'bar' | 'fill';
17704
+ colorStyle?: SidebarNavColorStyle;
17701
17705
  /** Extra props for the built-in NiceSidebarNav (rendered from `sidebarData`), e.g. `levelColors`. */
17702
17706
  sidebarProps?: Partial<NiceSidebarNavProps>;
17703
17707
  /**
@@ -28074,6 +28078,11 @@ export declare interface SetupWizardStep {
28074
28078
  * The step that completes the wizard (1.3.14). When any step is `final`, only such a step calls
28075
28079
  * `onComplete`; every other one — the last one in view included — goes on to its `nextStep`
28076
28080
  * (or the next one) with `labels.next`. Without any `final` step, the last step completes.
28081
+ *
28082
+ * `false` (1.3.16): this step never completes, even while it is the only one or the last one in
28083
+ * view — for steps the host adds after it (a first choice that decides every step after it). Its
28084
+ * main button reads `labels.next`; pressed before the next step exists (e.g. the host adds the
28085
+ * steps in `validate`), the wizard moves on as soon as that step arrives.
28077
28086
  */
28078
28087
  final?: boolean;
28079
28088
  }
@@ -28152,6 +28161,9 @@ export declare interface SidebarNavBranchColors {
28152
28161
  levelColors?: string[];
28153
28162
  }
28154
28163
 
28164
+ /** How the sidebar tree and NavShell's tabs show colour — see {@link SidebarNavUserPrefs.colorStyle}. */
28165
+ export declare type SidebarNavColorStyle = 'theme' | 'bar' | 'fill';
28166
+
28155
28167
  /**
28156
28168
  * Top-level data node: one data source with all its navigation children.
28157
28169
  * modules → used in 'all' mode (depth: source → module → view → …)
@@ -28243,8 +28255,12 @@ export declare interface SidebarNavHelpers {
28243
28255
  setLeftClickBehavior: (v: 'focus-existing' | 'open-new') => void;
28244
28256
  /** Replace the per-mode ordering of item ids. Pass `null` to clear (revert to data-defined order). */
28245
28257
  reorderItems: (mode: SidebarNavMode, orderedIds: string[] | null) => void;
28246
- /** How level / branch colours show: a bar by each row (default) or the whole row filled. */
28247
- setColorStyle: (v: 'bar' | 'fill') => void;
28258
+ /** How the tree shows colour: the theme's shades (default), plus branch bars, or filled rows. */
28259
+ setColorStyle: (v: SidebarNavColorStyle) => void;
28260
+ /** A step per level (default) or no indentation (1.3.16). */
28261
+ setIndent: (v: SidebarNavUserPrefs['indent']) => void;
28262
+ /** What stays in view while the tree scrolls (1.3.16). */
28263
+ setStickyHeaders: (v: SidebarNavUserPrefs['stickyHeaders']) => void;
28248
28264
  /** How NiceNavShell opens pages: automatically, one at a time or in tabs (1.3.4). */
28249
28265
  setPageMode: (v: NiceNavShellPageMode) => void;
28250
28266
  /**
@@ -28396,16 +28412,34 @@ export declare interface SidebarNavUserPrefs {
28396
28412
  */
28397
28413
  itemOrder: Partial<Record<SidebarNavMode, string[]>>;
28398
28414
  /**
28399
- * How a level / branch colour shows (1.3.3; `levelColors`, a branch's `color`):
28400
- * - `'bar'` (default): a bar in the colour left of each row's arrow, and NavShell's tabs
28401
- * underlined in it;
28402
- * - `'fill'`: the whole row filled with it (text picked for contrast), and the tabs tinted
28403
- * with a bar along the top — the look of 1.3.2.
28415
+ * How the tree is coloured (1.3.3; `'theme'` and the default since 1.3.16):
28416
+ * - `'theme'` (default): the theme's colours, shaded by level — the source header in the
28417
+ * primary, each level under it lighter, pages a faint tint of their level; a theme's
28418
+ * `nesting.sidebar` or the sidebar's `levelColors` replaces the shades. Branch colours (e.g.
28419
+ * databases) paint nothing, and NavShell's tabs stay uncoloured;
28420
+ * - `'bar'`: the same shades, plus a branch's colour as a bar on the left edge of its rows and
28421
+ * NavShell's tabs underlined in it;
28422
+ * - `'fill'`: rows filled with the level / branch colours (text picked for contrast), and the
28423
+ * tabs tinted with a bar along the top — the look of 1.3.2.
28404
28424
  *
28405
28425
  * Set from the Display page of the preferences; `preferences={{ colorStyle: 'fill' }}` makes
28406
28426
  * `'fill'` the default.
28407
28427
  */
28408
- colorStyle: 'bar' | 'fill';
28428
+ colorStyle: SidebarNavColorStyle;
28429
+ /**
28430
+ * Indentation of the tree (1.3.16): `'steps'` (default) — a step per level; `'none'` — every
28431
+ * level starts at the same place and the shades alone show the level.
28432
+ */
28433
+ indent: 'steps' | 'none';
28434
+ /**
28435
+ * What stays in view while the tree scrolls (1.3.16):
28436
+ * - `'path'` (default): the source header above the tree, outside its scroll area (the
28437
+ * scrollbar starts a level lower), and the headers above the first visible row stuck under it,
28438
+ * one per level;
28439
+ * - `'root'`: only the source header stays;
28440
+ * - `'none'`: everything scrolls — the most room on a short screen.
28441
+ */
28442
+ stickyHeaders: 'path' | 'root' | 'none';
28409
28443
  /**
28410
28444
  * How NiceNavShell opens pages when it offers tabs (`tabsMode="enabled"`, 1.3.4):
28411
28445
  * - `'auto'` (default): in tabs in an installed app (a window of its own, no browser tab strip),
package/dist/lazy.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react"),n=a.lazy(()=>Promise.resolve().then(()=>require("./devops-cgRBnZVX.cjs")).then(e=>e.NiceGitGraph$1).then(e=>({default:e.NiceGitGraph}))),o=a.lazy(()=>Promise.resolve().then(()=>require("./devops-cgRBnZVX.cjs")).then(e=>e.NiceBranchManager$1).then(e=>({default:e.NiceBranchManager}))),l=a.lazy(()=>Promise.resolve().then(()=>require("./devops-cgRBnZVX.cjs")).then(e=>e.NiceGitDiffViewer$1).then(e=>({default:e.NiceGitDiffViewer}))),s=a.lazy(()=>Promise.resolve().then(()=>require("./devops-cgRBnZVX.cjs")).then(e=>e.NiceGitBlame$1).then(e=>({default:e.NiceGitBlame}))),h=a.lazy(()=>Promise.resolve().then(()=>require("./devops-cgRBnZVX.cjs")).then(e=>e.NiceGitConflictResolver$1).then(e=>({default:e.NiceGitConflictResolver}))),c=a.lazy(()=>Promise.resolve().then(()=>require("./devops-cgRBnZVX.cjs")).then(e=>e.NicePipelineEditor$1).then(e=>({default:e.NicePipelineEditor}))),y=a.lazy(()=>Promise.resolve().then(()=>require("./devops-cgRBnZVX.cjs")).then(e=>e.NicePipelineMonitor$1).then(e=>({default:e.NicePipelineMonitor}))),u=a.lazy(()=>Promise.resolve().then(()=>require("./devops-cgRBnZVX.cjs")).then(e=>e.NiceGitHooks$1).then(e=>({default:e.NiceGitHooks}))),z=a.lazy(()=>Promise.resolve().then(()=>require("./devops-cgRBnZVX.cjs")).then(e=>e.NiceMergeRequestBuilder$1).then(e=>({default:e.NiceMergeRequestBuilder}))),d=a.lazy(()=>Promise.resolve().then(()=>require("./no-code-BQqK8mvU.cjs")).then(e=>e.NiceAPIFlow$1).then(e=>({default:e.NiceAPIFlow}))),f=a.lazy(()=>Promise.resolve().then(()=>require("./no-code-BQqK8mvU.cjs")).then(e=>e.NiceCodeTemplate$1).then(e=>({default:e.NiceCodeTemplate}))),N=a.lazy(()=>Promise.resolve().then(()=>require("./no-code-BQqK8mvU.cjs")).then(e=>e.NiceDataMapper$1).then(e=>({default:e.NiceDataMapper}))),L=a.lazy(()=>Promise.resolve().then(()=>require("./no-code-BQqK8mvU.cjs")).then(e=>e.NiceEventOrchestrator$1).then(e=>({default:e.NiceEventOrchestrator}))),p=a.lazy(()=>Promise.resolve().then(()=>require("./no-code-BQqK8mvU.cjs")).then(e=>e.NiceStateDesigner$1).then(e=>({default:e.NiceStateDesigner}))),v=a.lazy(()=>Promise.resolve().then(()=>require("./no-code-BQqK8mvU.cjs")).then(e=>e.NiceTestBuilder$1).then(e=>({default:e.NiceTestBuilder}))),D=a.lazy(()=>Promise.resolve().then(()=>require("./data-branching-7rpktFJ-.cjs")).then(e=>e.NiceDataBranchManager$1).then(e=>({default:e.NiceDataBranchManager}))),P=a.lazy(()=>Promise.resolve().then(()=>require("./data-branching-7rpktFJ-.cjs")).then(e=>e.NiceDataDiffViewer$1).then(e=>({default:e.NiceDataDiffViewer}))),m=a.lazy(()=>Promise.resolve().then(()=>require("./data-branching-7rpktFJ-.cjs")).then(e=>e.NiceDataBranchGraph$1).then(e=>({default:e.NiceDataBranchGraph}))),q=a.lazy(()=>Promise.resolve().then(()=>require("./data-branching-7rpktFJ-.cjs")).then(e=>e.NiceDataMergeBuilder$1).then(e=>({default:e.NiceDataMergeBuilder}))),B=a.lazy(()=>Promise.resolve().then(()=>require("./data-branching-7rpktFJ-.cjs")).then(e=>e.NiceDataConflictResolver$1).then(e=>({default:e.NiceDataConflictResolver}))),M=a.lazy(()=>Promise.resolve().then(()=>require("./data-branching-7rpktFJ-.cjs")).then(e=>e.NiceDataSnapshot$1).then(e=>({default:e.NiceDataSnapshot}))),G=a.lazy(()=>Promise.resolve().then(()=>require("./charts-B0tHOpJ7.cjs")).then(e=>e.NiceChart$1).then(e=>({default:e.NiceChart}))),g=a.lazy(()=>Promise.resolve().then(()=>require("./charts-B0tHOpJ7.cjs")).then(e=>e.NiceTreeMap$1).then(e=>({default:e.NiceTreeMap}))),$=a.lazy(()=>Promise.resolve().then(()=>require("./charts-B0tHOpJ7.cjs")).then(e=>e.NiceSankey$1).then(e=>({default:e.NiceSankey}))),t=()=>{Promise.resolve().then(()=>require("./devops.cjs"))},r=()=>{Promise.resolve().then(()=>require("./no-code.cjs"))},i=()=>{Promise.resolve().then(()=>require("./data-branching.cjs"))},C=()=>{"requestIdleCallback"in window?requestIdleCallback(()=>{t(),r(),i()}):setTimeout(()=>{t(),r(),i()},2e3)};exports.LazyAPIFlow=d;exports.LazyBranchManager=o;exports.LazyChart=G;exports.LazyCodeTemplate=f;exports.LazyDataBranchGraph=m;exports.LazyDataBranchManager=D;exports.LazyDataConflictResolver=B;exports.LazyDataDiffViewer=P;exports.LazyDataMapper=N;exports.LazyDataMergeBuilder=q;exports.LazyDataSnapshot=M;exports.LazyEventOrchestrator=L;exports.LazyGitBlame=s;exports.LazyGitConflictResolver=h;exports.LazyGitDiffViewer=l;exports.LazyGitGraph=n;exports.LazyGitHooks=u;exports.LazyMergeRequestBuilder=z;exports.LazyPipelineEditor=c;exports.LazyPipelineMonitor=y;exports.LazySankey=$;exports.LazyStateDesigner=p;exports.LazyTestBuilder=v;exports.LazyTreemap=g;exports.preloadDataBranching=i;exports.preloadDevOps=t;exports.preloadHeavyModules=C;exports.preloadNoCode=r;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react"),n=a.lazy(()=>Promise.resolve().then(()=>require("./devops-cgRBnZVX.cjs")).then(e=>e.NiceGitGraph$1).then(e=>({default:e.NiceGitGraph}))),o=a.lazy(()=>Promise.resolve().then(()=>require("./devops-cgRBnZVX.cjs")).then(e=>e.NiceBranchManager$1).then(e=>({default:e.NiceBranchManager}))),l=a.lazy(()=>Promise.resolve().then(()=>require("./devops-cgRBnZVX.cjs")).then(e=>e.NiceGitDiffViewer$1).then(e=>({default:e.NiceGitDiffViewer}))),s=a.lazy(()=>Promise.resolve().then(()=>require("./devops-cgRBnZVX.cjs")).then(e=>e.NiceGitBlame$1).then(e=>({default:e.NiceGitBlame}))),h=a.lazy(()=>Promise.resolve().then(()=>require("./devops-cgRBnZVX.cjs")).then(e=>e.NiceGitConflictResolver$1).then(e=>({default:e.NiceGitConflictResolver}))),c=a.lazy(()=>Promise.resolve().then(()=>require("./devops-cgRBnZVX.cjs")).then(e=>e.NicePipelineEditor$1).then(e=>({default:e.NicePipelineEditor}))),y=a.lazy(()=>Promise.resolve().then(()=>require("./devops-cgRBnZVX.cjs")).then(e=>e.NicePipelineMonitor$1).then(e=>({default:e.NicePipelineMonitor}))),u=a.lazy(()=>Promise.resolve().then(()=>require("./devops-cgRBnZVX.cjs")).then(e=>e.NiceGitHooks$1).then(e=>({default:e.NiceGitHooks}))),z=a.lazy(()=>Promise.resolve().then(()=>require("./devops-cgRBnZVX.cjs")).then(e=>e.NiceMergeRequestBuilder$1).then(e=>({default:e.NiceMergeRequestBuilder}))),d=a.lazy(()=>Promise.resolve().then(()=>require("./no-code-B3BHeyG-.cjs")).then(e=>e.NiceAPIFlow$1).then(e=>({default:e.NiceAPIFlow}))),f=a.lazy(()=>Promise.resolve().then(()=>require("./no-code-B3BHeyG-.cjs")).then(e=>e.NiceCodeTemplate$1).then(e=>({default:e.NiceCodeTemplate}))),N=a.lazy(()=>Promise.resolve().then(()=>require("./no-code-B3BHeyG-.cjs")).then(e=>e.NiceDataMapper$1).then(e=>({default:e.NiceDataMapper}))),L=a.lazy(()=>Promise.resolve().then(()=>require("./no-code-B3BHeyG-.cjs")).then(e=>e.NiceEventOrchestrator$1).then(e=>({default:e.NiceEventOrchestrator}))),p=a.lazy(()=>Promise.resolve().then(()=>require("./no-code-B3BHeyG-.cjs")).then(e=>e.NiceStateDesigner$1).then(e=>({default:e.NiceStateDesigner}))),v=a.lazy(()=>Promise.resolve().then(()=>require("./no-code-B3BHeyG-.cjs")).then(e=>e.NiceTestBuilder$1).then(e=>({default:e.NiceTestBuilder}))),D=a.lazy(()=>Promise.resolve().then(()=>require("./data-branching-7rpktFJ-.cjs")).then(e=>e.NiceDataBranchManager$1).then(e=>({default:e.NiceDataBranchManager}))),P=a.lazy(()=>Promise.resolve().then(()=>require("./data-branching-7rpktFJ-.cjs")).then(e=>e.NiceDataDiffViewer$1).then(e=>({default:e.NiceDataDiffViewer}))),m=a.lazy(()=>Promise.resolve().then(()=>require("./data-branching-7rpktFJ-.cjs")).then(e=>e.NiceDataBranchGraph$1).then(e=>({default:e.NiceDataBranchGraph}))),q=a.lazy(()=>Promise.resolve().then(()=>require("./data-branching-7rpktFJ-.cjs")).then(e=>e.NiceDataMergeBuilder$1).then(e=>({default:e.NiceDataMergeBuilder}))),B=a.lazy(()=>Promise.resolve().then(()=>require("./data-branching-7rpktFJ-.cjs")).then(e=>e.NiceDataConflictResolver$1).then(e=>({default:e.NiceDataConflictResolver}))),M=a.lazy(()=>Promise.resolve().then(()=>require("./data-branching-7rpktFJ-.cjs")).then(e=>e.NiceDataSnapshot$1).then(e=>({default:e.NiceDataSnapshot}))),G=a.lazy(()=>Promise.resolve().then(()=>require("./charts-B0tHOpJ7.cjs")).then(e=>e.NiceChart$1).then(e=>({default:e.NiceChart}))),g=a.lazy(()=>Promise.resolve().then(()=>require("./charts-B0tHOpJ7.cjs")).then(e=>e.NiceTreeMap$1).then(e=>({default:e.NiceTreeMap}))),$=a.lazy(()=>Promise.resolve().then(()=>require("./charts-B0tHOpJ7.cjs")).then(e=>e.NiceSankey$1).then(e=>({default:e.NiceSankey}))),t=()=>{Promise.resolve().then(()=>require("./devops.cjs"))},r=()=>{Promise.resolve().then(()=>require("./no-code.cjs"))},i=()=>{Promise.resolve().then(()=>require("./data-branching.cjs"))},C=()=>{"requestIdleCallback"in window?requestIdleCallback(()=>{t(),r(),i()}):setTimeout(()=>{t(),r(),i()},2e3)};exports.LazyAPIFlow=d;exports.LazyBranchManager=o;exports.LazyChart=G;exports.LazyCodeTemplate=f;exports.LazyDataBranchGraph=m;exports.LazyDataBranchManager=D;exports.LazyDataConflictResolver=B;exports.LazyDataDiffViewer=P;exports.LazyDataMapper=N;exports.LazyDataMergeBuilder=q;exports.LazyDataSnapshot=M;exports.LazyEventOrchestrator=L;exports.LazyGitBlame=s;exports.LazyGitConflictResolver=h;exports.LazyGitDiffViewer=l;exports.LazyGitGraph=n;exports.LazyGitHooks=u;exports.LazyMergeRequestBuilder=z;exports.LazyPipelineEditor=c;exports.LazyPipelineMonitor=y;exports.LazySankey=$;exports.LazyStateDesigner=p;exports.LazyTestBuilder=v;exports.LazyTreemap=g;exports.preloadDataBranching=i;exports.preloadDevOps=t;exports.preloadHeavyModules=C;exports.preloadNoCode=r;
@@ -1,10 +1,10 @@
1
- import { jsx as t, jsxs as o } from "react/jsx-runtime";
1
+ import { jsx as a, jsxs as o } from "react/jsx-runtime";
2
2
  import { useNiceTranslation as O } from "@nice2dev/ui-core";
3
- import { useState as N, useMemo as E } from "react";
3
+ import { useState as N, useMemo as T } from "react";
4
4
  import { NiceButton as R } from "../buttons/NiceButton.mjs";
5
5
  import { NiceSegmentedControl as d } from "../display/NiceSegmentedControl.mjs";
6
- import { NiceLanguagePicker as P } from "../editors/pickers/NiceLanguagePicker.mjs";
7
- import { NiceThemePicker as T } from "../editors/pickers/NiceThemePicker.mjs";
6
+ import { NiceLanguagePicker as E } from "../editors/pickers/NiceLanguagePicker.mjs";
7
+ import { NiceThemePicker as P } from "../editors/pickers/NiceThemePicker.mjs";
8
8
  import { NiceModal as A } from "../feedback/NiceModal.mjs";
9
9
  /* empty css */
10
10
  const D = ["single", "tabs"];
@@ -19,76 +19,76 @@ function F({
19
19
  languages: f,
20
20
  priorityLanguages: _,
21
21
  title: w,
22
- description: k,
23
- "data-testid": p = "nice-first-run-preferences"
22
+ description: S,
23
+ "data-testid": m = "nice-first-run-preferences"
24
24
  }) {
25
- const { t: n } = O(), [r, b] = N(h ?? {}), [C, S] = N(i);
26
- i !== C && (S(i), i && b(h ?? {}));
27
- const s = (a, e) => b((m) => ({ ...m, [a]: e })), x = E(
25
+ const { t: e } = O(), [r, b] = N(h ?? {}), [k, C] = N(i);
26
+ i !== k && (C(i), i && b(h ?? {}));
27
+ const s = (t, n) => b((p) => ({ ...p, [t]: n })), x = T(
28
28
  () => v ?? ["pages", "theme", "language", "menu"].filter(
29
- (a) => (a !== "theme" || (u?.length ?? 0) > 0) && (a !== "language" || (f?.length ?? 0) > 0)
29
+ (t) => (t !== "theme" || (u?.length ?? 0) > 0) && (t !== "language" || (f?.length ?? 0) > 0)
30
30
  ),
31
31
  [v, u, f]
32
32
  ), M = {
33
- auto: n("firstRun.pagesAuto", "Automatically"),
34
- single: n("firstRun.pagesSingle", "One at a time"),
35
- tabs: n("firstRun.pagesTabs", "In tabs")
36
- }, l = (a, e, m) => /* @__PURE__ */ o("section", { className: "nice-first-run__section", "aria-label": e, children: [
37
- /* @__PURE__ */ t("h3", { className: "nice-first-run__heading", children: e }),
38
- m
39
- ] }, a);
40
- return /* @__PURE__ */ t(
33
+ auto: e("firstRun.pagesAuto", "Automatically"),
34
+ single: e("firstRun.pagesSingle", "One at a time"),
35
+ tabs: e("firstRun.pagesTabs", "In tabs")
36
+ }, l = (t, n, p) => /* @__PURE__ */ o("section", { className: "nice-first-run__section", "aria-label": n, children: [
37
+ /* @__PURE__ */ a("h3", { className: "nice-first-run__heading", children: n }),
38
+ p
39
+ ] }, t);
40
+ return /* @__PURE__ */ a(
41
41
  A,
42
42
  {
43
43
  open: i,
44
44
  onClose: g,
45
45
  size: "md",
46
46
  closeOnOverlay: !1,
47
- title: w ?? n("firstRun.title", "Set up your workspace"),
48
- "data-testid": p,
47
+ title: w ?? e("firstRun.title", "Set up your workspace"),
48
+ "data-testid": m,
49
49
  footer: /* @__PURE__ */ o("div", { className: "nice-first-run__footer", children: [
50
- /* @__PURE__ */ t(R, { variant: "ghost", onClick: g, "data-testid": `${p}-skip`, children: n("firstRun.skip", "Skip") }),
51
- /* @__PURE__ */ t(
50
+ /* @__PURE__ */ a(R, { variant: "ghost", onClick: g, "data-testid": `${m}-skip`, children: e("firstRun.skip", "Skip") }),
51
+ /* @__PURE__ */ a(
52
52
  R,
53
53
  {
54
54
  variant: "primary",
55
55
  onClick: () => y(r),
56
- "data-testid": `${p}-save`,
57
- children: n("firstRun.save", "Save")
56
+ "data-testid": `${m}-save`,
57
+ children: e("firstRun.save", "Save")
58
58
  }
59
59
  )
60
60
  ] }),
61
61
  children: /* @__PURE__ */ o("div", { className: "nice-first-run", children: [
62
- /* @__PURE__ */ t("p", { className: "nice-first-run__intro", children: k ?? n(
62
+ /* @__PURE__ */ a("p", { className: "nice-first-run__intro", children: S ?? e(
63
63
  "firstRun.intro",
64
64
  "Choose how you want to work. You can change all of it later in the preferences."
65
65
  ) }),
66
- x.map((a) => {
67
- switch (a) {
66
+ x.map((t) => {
67
+ switch (t) {
68
68
  case "pages":
69
69
  return l(
70
- a,
71
- n("firstRun.pages", "Opening pages"),
72
- /* @__PURE__ */ t(
70
+ t,
71
+ e("firstRun.pages", "Opening pages"),
72
+ /* @__PURE__ */ a(
73
73
  d,
74
74
  {
75
75
  block: !0,
76
- options: c.map((e) => ({ value: e, label: M[e] })),
76
+ options: c.map((n) => ({ value: n, label: M[n] })),
77
77
  value: r.pageMode && c.includes(r.pageMode) ? r.pageMode : c[0],
78
- onChange: (e) => s("pageMode", e)
78
+ onChange: (n) => s("pageMode", n)
79
79
  }
80
80
  )
81
81
  );
82
82
  case "theme":
83
83
  return l(
84
- a,
85
- n("firstRun.theme", "Theme"),
86
- /* @__PURE__ */ t(
87
- T,
84
+ t,
85
+ e("firstRun.theme", "Theme"),
86
+ /* @__PURE__ */ a(
87
+ P,
88
88
  {
89
89
  themes: u,
90
90
  value: r.theme,
91
- onChange: (e) => s("theme", e?.id),
91
+ onChange: (n) => s("theme", n?.id),
92
92
  showPreviewInValue: !0,
93
93
  showPreviewInMenu: !0,
94
94
  showTextInValue: !0,
@@ -98,13 +98,13 @@ function F({
98
98
  );
99
99
  case "language":
100
100
  return l(
101
- a,
102
- n("firstRun.language", "Language"),
103
- /* @__PURE__ */ t(
104
- P,
101
+ t,
102
+ e("firstRun.language", "Language"),
103
+ /* @__PURE__ */ a(
104
+ E,
105
105
  {
106
106
  value: r.language,
107
- onChange: (e) => s("language", e?.code),
107
+ onChange: (n) => s("language", n?.code),
108
108
  allowedCodes: f,
109
109
  priorityCodes: _,
110
110
  displayName: "native"
@@ -113,32 +113,33 @@ function F({
113
113
  );
114
114
  case "menu":
115
115
  return l(
116
- a,
117
- n("firstRun.menu", "Menu"),
116
+ t,
117
+ e("firstRun.menu", "Menu"),
118
118
  /* @__PURE__ */ o("div", { className: "nice-first-run__stack", children: [
119
- /* @__PURE__ */ t(
119
+ /* @__PURE__ */ a(
120
120
  d,
121
121
  {
122
122
  block: !0,
123
123
  options: [
124
- { value: "expanded", label: n("firstRun.menuExpanded", "Expanded") },
125
- { value: "icons", label: n("firstRun.menuIcons", "Icons only") }
124
+ { value: "expanded", label: e("firstRun.menuExpanded", "Expanded") },
125
+ { value: "icons", label: e("firstRun.menuIcons", "Icons only") }
126
126
  ],
127
127
  value: r.collapsed ? "icons" : "expanded",
128
- onChange: (e) => s("collapsed", e === "icons")
128
+ onChange: (n) => s("collapsed", n === "icons")
129
129
  }
130
130
  ),
131
- /* @__PURE__ */ t("span", { className: "nice-first-run__label", children: n("firstRun.colorStyle", "Branch colours") }),
132
- /* @__PURE__ */ t(
131
+ /* @__PURE__ */ a("span", { className: "nice-first-run__label", children: e("firstRun.colorStyle", "Branch colours") }),
132
+ /* @__PURE__ */ a(
133
133
  d,
134
134
  {
135
135
  block: !0,
136
136
  options: [
137
- { value: "bar", label: n("firstRun.colorStyleBar", "A bar by each item") },
138
- { value: "fill", label: n("firstRun.colorStyleFill", "Whole items filled") }
137
+ { value: "theme", label: e("firstRun.colorStyleTheme", "Theme colours") },
138
+ { value: "bar", label: e("firstRun.colorStyleBar", "A bar by each item") },
139
+ { value: "fill", label: e("firstRun.colorStyleFill", "Whole items filled") }
139
140
  ],
140
- value: r.colorStyle === "fill" ? "fill" : "bar",
141
- onChange: (e) => s("colorStyle", e)
141
+ value: r.colorStyle ?? "theme",
142
+ onChange: (n) => s("colorStyle", n)
142
143
  }
143
144
  )
144
145
  ] })