najm-kit 2.7.0 → 2.7.1

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.
@@ -0,0 +1,82 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ReactNode } from 'react';
3
+
4
+ interface NBrandingValue {
5
+ /** Used as the logo's `alt` when the logo does not set one. */
6
+ appName?: string;
7
+ logoExpanded?: ReactNode | string;
8
+ /** Falls back to `logoExpanded`. */
9
+ logoCollapsed?: ReactNode | string;
10
+ /** Swapped in when a `string` logo fails to load. */
11
+ logoFallback?: string;
12
+ logoHref?: string;
13
+ }
14
+ /**
15
+ * What a Najm branding endpoint returns, as the marks the chrome needs.
16
+ *
17
+ * Accepted anywhere branding goes *in* so an application hands over its API
18
+ * payload unchanged instead of renaming two fields at every call site. Fields
19
+ * beyond these are ignored: excess-property checks only fire on object
20
+ * literals, so passing a wider response object — auth logos, a revision — type
21
+ * checks and drops what the chrome has no use for.
22
+ */
23
+ interface NBrandingPayload {
24
+ sidebarLogoExpandedPath?: string | null;
25
+ sidebarLogoCollapsedPath?: string | null;
26
+ }
27
+ /** Resolved marks, an endpoint payload, or both. */
28
+ type NBrandingInput = NBrandingValue & NBrandingPayload;
29
+ /**
30
+ * Projects an input onto the marks `useNBranding` publishes.
31
+ *
32
+ * Explicit marks win over payload fields, so an application already passing
33
+ * `logoExpanded` — or a `ReactNode` logo, which no payload can express — is
34
+ * unaffected by the wider input type.
35
+ */
36
+ declare function normalizeBranding(input?: NBrandingInput): NBrandingValue;
37
+ /** Returns `null` outside a provider, so every consumer stays optional. */
38
+ declare function useNBranding(): NBrandingValue | null;
39
+ /**
40
+ * Publishes the app's marks once, so shells stop threading a `logo` through
41
+ * every surface that shows one. `NSidebar` reads this when no `logo` prop is
42
+ * given; an explicit `logo` always wins.
43
+ *
44
+ * Unlike `NSidebarProvider` this owns no state — the values are resolved by the
45
+ * app (usually server-side) and only forwarded, so memoizing on the fields is
46
+ * correct here.
47
+ */
48
+ declare function NBrandingProvider({ children, appName, logoExpanded, logoCollapsed, logoFallback, logoHref, }: Readonly<NBrandingValue & {
49
+ children: ReactNode;
50
+ }>): react_jsx_runtime.JSX.Element;
51
+ interface NBrandingEditorValue {
52
+ branding: NBrandingValue;
53
+ /**
54
+ * Merges a patch over the current marks. Inert while controlled.
55
+ *
56
+ * Takes the endpoint payload shape too, so a settings surface hands back the
57
+ * response it just received rather than renaming its fields first.
58
+ */
59
+ setBranding: (patch: NBrandingInput) => void;
60
+ }
61
+ /**
62
+ * Lets a settings surface swap the app's marks without a reload.
63
+ *
64
+ * Returns `null` outside `NBrandingStateProvider`, so a branding editor stays
65
+ * mountable in an app that resolves its logos once and never changes them.
66
+ *
67
+ * Only the *display* values live here. Where the assets are stored, who may
68
+ * replace them, and what happens to a superseded upload are the application's
69
+ * concerns, and folding them in would make this a branding backend.
70
+ */
71
+ declare function useNBrandingEditor(): NBrandingEditorValue | null;
72
+ interface NBrandingStateProviderProps {
73
+ children: ReactNode;
74
+ /** Controlled marks. When given, `setBranding` is inert. */
75
+ branding?: NBrandingInput;
76
+ /** Seeds marks this provider owns from then on; ignored after mount. */
77
+ initialBranding?: NBrandingInput;
78
+ }
79
+ /** `NBrandingProvider` with the marks held as state an editor can write. */
80
+ declare function NBrandingStateProvider({ children, branding, initialBranding, }: Readonly<NBrandingStateProviderProps>): react_jsx_runtime.JSX.Element;
81
+
82
+ export { type NBrandingInput as N, type NBrandingEditorValue as a, type NBrandingPayload as b, NBrandingProvider as c, NBrandingStateProvider as d, type NBrandingStateProviderProps as e, type NBrandingValue as f, useNBrandingEditor as g, normalizeBranding as n, useNBranding as u };
@@ -328,7 +328,13 @@ interface NajmPreferencesProviderProps {
328
328
  onThemeChange?: (theme: NajmMode) => void | Promise<void>;
329
329
  /** Persist the new time zone. Rejections propagate to `setTimeZone`. */
330
330
  onTimeZoneChange?: (timeZone: string) => void | Promise<void>;
331
- /** Sanitize a time zone before it is stored. Defaults to identity. */
331
+ /**
332
+ * Sanitize a time zone before it is stored.
333
+ *
334
+ * Defaults to an IANA check that falls back to `DEFAULT_TIME_ZONE`, which is
335
+ * what every application wanted from the callback it used to have to supply.
336
+ * Pass one to narrow further — a fixed set backing a picker, say.
337
+ */
332
338
  normalizeTimeZone?: (value: string) => string;
333
339
  }
334
340
  /**
@@ -382,14 +388,34 @@ declare function buildPaginationLabels(t: NajmTranslate, prefix?: string): NTabl
382
388
  interface NajmUIProviderProps extends Omit<NajmPreferencesProviderProps, "children"> {
383
389
  children: React$1.ReactNode;
384
390
  /**
385
- * The design config handed to `NajmDesignProvider`.
391
+ * The design config handed to `NajmDesignProvider`, owned by the application.
386
392
  *
387
393
  * Optional, and deliberately so: an application with no runtime theme editor
388
394
  * has nothing to put here, and requiring it was the only reason such an
389
395
  * application still had to author a provider file just to hold a constant.
396
+ *
397
+ * Prefer `initialDesign` for a theme editor. Passing `design` means the
398
+ * application holds the draft state itself, which is the file this provider
399
+ * exists to delete.
390
400
  */
391
401
  design?: NajmDesignConfig;
392
- /** Forwarded to `NajmDesignProvider`. */
402
+ /**
403
+ * Seeds design state this provider owns from then on; ignored after mount.
404
+ * A theme editor drives it through `useNajmDesignEditor`.
405
+ */
406
+ initialDesign?: NajmDesignConfig;
407
+ /**
408
+ * Forwarded to `NajmDesignProvider`, merged over a `min-h-full` default.
409
+ *
410
+ * The default is not decoration. `NajmThemeProvider` renders a real `div`
411
+ * between the document body and the application, and a block box of
412
+ * automatic height severs any `h-full` chain below it — every application
413
+ * mounting this at the root was passing the same class back to repair that.
414
+ * It is inert where it is not needed: a percentage `min-height` against an
415
+ * auto-height parent imposes no constraint.
416
+ *
417
+ * Merged with `cn`, so a conflicting utility here still wins.
418
+ */
393
419
  className?: string;
394
420
  /**
395
421
  * Translator for the pagination labels. Omit it and the packaged English
@@ -426,6 +452,6 @@ interface NajmUIProviderProps extends Omit<NajmPreferencesProviderProps, "childr
426
452
  * an application with a runtime theme editor hoist preferences above its
427
453
  * design context without forking this component.
428
454
  */
429
- declare function NajmUIProvider({ children, design, className, t, paginationKeyPrefix, tableDefaults, initialTheme, initialTimeZone, onThemeChange, onTimeZoneChange, normalizeTimeZone, }: NajmUIProviderProps): react_jsx_runtime.JSX.Element;
455
+ declare function NajmUIProvider({ children, design, initialDesign, className, t, paginationKeyPrefix, tableDefaults, initialTheme, initialTimeZone, onThemeChange, onTimeZoneChange, normalizeTimeZone, }: NajmUIProviderProps): react_jsx_runtime.JSX.Element;
430
456
 
431
- export { type NajmDensity as A, type NajmPreferencesContextValue as B, NajmPreferencesProvider as C, DEFAULT_PAGINATION_KEY_PREFIX as D, type NajmPreferencesProviderProps as E, type NajmSlotStyle as F, type NajmTranslate as G, NajmUIProvider as H, buildPaginationLabels as I, resolveRadiusValue as J, useNTableDefaults as K, useNajmPreferencesContext as L, useNajmTheme as M, type NajmUIProviderProps as N, useNajmTimeZone as O, RADIUS_VALUE_MAP as R, type NajmThemeProviderProps as a, type NajmAppearance as b, type NajmMode as c, type NajmDesignConfig as d, type NajmThemeConfig as e, type NajmAccent as f, type NajmThemeTokens as g, type NajmPreset as h, type NajmComponentName as i, type NajmComponentStyleConfig as j, type NajmComponentThemeConfig as k, type NajmTypographyConfig as l, type NajmLayoutConfig as m, type NajmVariantStyle as n, type NTablePaginationVariant as o, type NTablePaginationLabels as p, type NTableCardPagination as q, type NajmResponsiveBreakpoint as r, type NajmResponsiveValue as s, DEFAULT_TIME_ZONE as t, NAJM_COMPONENT_NAMES as u, type NTableDefaults as v, NTableDefaultsProvider as w, type NTableInfinitePagination as x, type NTableLoadMorePagination as y, type NajmComponentRadius as z };
457
+ export { type NajmDensity as A, type NajmPreferencesContextValue as B, NajmPreferencesProvider as C, DEFAULT_PAGINATION_KEY_PREFIX as D, type NajmPreferencesProviderProps as E, type NajmSlotStyle as F, type NajmTranslate as G, NajmUIProvider as H, buildPaginationLabels as I, resolveRadiusValue as J, useNTableDefaults as K, useNajmPreferencesContext as L, useNajmTheme as M, type NajmUIProviderProps as N, useNajmTimeZone as O, RADIUS_VALUE_MAP as R, type NajmDesignConfig as a, type NajmThemeProviderProps as b, type NajmAppearance as c, type NajmMode as d, type NajmThemeConfig as e, type NajmAccent as f, type NajmThemeTokens as g, type NajmPreset as h, type NajmComponentName as i, type NajmComponentStyleConfig as j, type NajmComponentThemeConfig as k, type NajmTypographyConfig as l, type NajmLayoutConfig as m, type NajmVariantStyle as n, type NTablePaginationVariant as o, type NTablePaginationLabels as p, type NTableCardPagination as q, type NajmResponsiveBreakpoint as r, type NajmResponsiveValue as s, DEFAULT_TIME_ZONE as t, NAJM_COMPONENT_NAMES as u, type NTableDefaults as v, NTableDefaultsProvider as w, type NTableInfinitePagination as x, type NTableLoadMorePagination as y, type NajmComponentRadius as z };
@@ -1,8 +1,9 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { Translations } from 'najm-i18n';
3
+ import { N as NBrandingInput } from '../NBrandingContext-dkADu8JS.js';
3
4
  import { NajmNextUIProviderProps } from './next.js';
4
5
  import 'react';
5
- import '../NajmUIProvider-BsCoDjHH.js';
6
+ import '../NajmUIProvider-Dj32bd5d.js';
6
7
 
7
8
  /** Branding shown by the kit's chrome. Purely presentational values. */
8
9
  interface NajmAppBranding {
@@ -29,7 +30,30 @@ interface NajmAppProviderProps extends Omit<NajmNextUIProviderProps, 't'> {
29
30
  * would discard that work to re-render the same strings from the server.
30
31
  */
31
32
  languageEndpoint?: string;
32
- branding?: NajmAppBranding;
33
+ /**
34
+ * The product name, used as the logo's `alt` and by the kit's chrome.
35
+ *
36
+ * Separate from `initialBranding` because it is a constant rather than
37
+ * something a branding editor swaps, and because it is the one mark no
38
+ * branding endpoint returns. An `appName` inside `initialBranding` wins.
39
+ */
40
+ appName?: string;
41
+ /**
42
+ * Controlled marks. Prefer `initialBranding` — passing this means the
43
+ * application holds the state itself, which is the file this provider exists
44
+ * to delete.
45
+ */
46
+ branding?: NBrandingInput;
47
+ /**
48
+ * Seeds marks this provider owns from then on; ignored after mount. A
49
+ * branding editor swaps them through `useNBrandingEditor`.
50
+ *
51
+ * Takes a branding endpoint's payload as-is — `sidebarLogoExpandedPath` and
52
+ * `sidebarLogoCollapsedPath` are read straight off it, and unrelated fields
53
+ * are ignored — so the application forwards its response rather than
54
+ * renaming two keys here.
55
+ */
56
+ initialBranding?: NBrandingInput;
33
57
  }
34
58
  /**
35
59
  * The whole UI provider stack for a Najm application, as one component.
@@ -43,9 +67,13 @@ interface NajmAppProviderProps extends Omit<NajmNextUIProviderProps, 't'> {
43
67
  * and an application that wants different query policy should not have to fork
44
68
  * a provider to get it. Mount them above this, from their own packages.
45
69
  *
46
- * Design is optional. Applications that resolve a design config at runtime — a
47
- * theme editor compute it above and pass it down; everything else omits it.
70
+ * Design and branding are optional, and both are *uncontrolled* through their
71
+ * `initial*` props: an application with a runtime theme or branding editor
72
+ * seeds them from the server once and drives them afterwards through
73
+ * `useNajmDesignEditor` and `useNBrandingEditor`, rather than holding a draft
74
+ * state machine of its own above this provider. The controlled `design` and
75
+ * `branding` props still work for applications that already do.
48
76
  */
49
- declare function NajmAppProvider({ translations, initialLanguage, defaultLanguage, languageEndpoint, ...props }: NajmAppProviderProps): react_jsx_runtime.JSX.Element;
77
+ declare function NajmAppProvider({ translations, initialLanguage, defaultLanguage, languageEndpoint, appName, initialBranding, ...props }: NajmAppProviderProps): react_jsx_runtime.JSX.Element;
50
78
 
51
79
  export { type NajmAppBranding, NajmAppProvider, type NajmAppProviderProps };
@@ -1,32 +1,40 @@
1
1
  'use client';
2
- import { NBrandingProvider } from '../chunk-IGUQGT3G.mjs';
3
- import { NajmNextUIProvider } from '../chunk-4MRUJ2ZO.mjs';
4
- import '../chunk-7F65QM43.mjs';
5
- import '../chunk-YBM5CTE6.mjs';
2
+ import { NBrandingStateProvider } from '../chunk-5LW62RB6.mjs';
3
+ import { NajmNextUIProvider } from '../chunk-IRFFSAO2.mjs';
4
+ import '../chunk-USZUOJMK.mjs';
5
+ import '../chunk-KVZACF4G.mjs';
6
6
  import * as React from 'react';
7
7
  import { I18nProvider, useTranslation } from 'najm-i18n/react';
8
8
  import { jsx } from 'react/jsx-runtime';
9
9
 
10
10
  var DEFAULT_LANGUAGE_ENDPOINT = "/api/ui-language";
11
- function NajmAppUI({ children, branding, ...props }) {
11
+ function NajmAppUI({
12
+ children,
13
+ branding,
14
+ initialBranding,
15
+ ...props
16
+ }) {
12
17
  const { t } = useTranslation();
13
18
  return /* @__PURE__ */ jsx(NajmNextUIProvider, { t, ...props, children: /* @__PURE__ */ jsx(
14
- NBrandingProvider,
19
+ NBrandingStateProvider,
15
20
  {
16
- appName: branding?.appName,
17
- logoExpanded: branding?.logoExpanded,
18
- logoCollapsed: branding?.logoCollapsed,
21
+ branding,
22
+ initialBranding,
19
23
  children
20
24
  }
21
25
  ) });
22
26
  }
23
- function NajmAppNoI18n({ children, branding, ...props }) {
27
+ function NajmAppNoI18n({
28
+ children,
29
+ branding,
30
+ initialBranding,
31
+ ...props
32
+ }) {
24
33
  return /* @__PURE__ */ jsx(NajmNextUIProvider, { ...props, children: /* @__PURE__ */ jsx(
25
- NBrandingProvider,
34
+ NBrandingStateProvider,
26
35
  {
27
- appName: branding?.appName,
28
- logoExpanded: branding?.logoExpanded,
29
- logoCollapsed: branding?.logoCollapsed,
36
+ branding,
37
+ initialBranding,
30
38
  children
31
39
  }
32
40
  ) });
@@ -36,6 +44,8 @@ function NajmAppProvider({
36
44
  initialLanguage,
37
45
  defaultLanguage,
38
46
  languageEndpoint = DEFAULT_LANGUAGE_ENDPOINT,
47
+ appName,
48
+ initialBranding,
39
49
  ...props
40
50
  }) {
41
51
  const persistLanguage = React.useCallback(
@@ -54,7 +64,8 @@ function NajmAppProvider({
54
64
  },
55
65
  [languageEndpoint]
56
66
  );
57
- if (!translations) return /* @__PURE__ */ jsx(NajmAppNoI18n, { ...props });
67
+ const seeded = appName ? { appName, ...initialBranding } : initialBranding;
68
+ if (!translations) return /* @__PURE__ */ jsx(NajmAppNoI18n, { ...props, initialBranding: seeded });
58
69
  return /* @__PURE__ */ jsx(
59
70
  I18nProvider,
60
71
  {
@@ -62,7 +73,7 @@ function NajmAppProvider({
62
73
  initialLanguage: initialLanguage ?? defaultLanguage ?? "en",
63
74
  defaultLanguage,
64
75
  onLanguageChange: persistLanguage,
65
- children: /* @__PURE__ */ jsx(NajmAppUI, { ...props })
76
+ children: /* @__PURE__ */ jsx(NajmAppUI, { ...props, initialBranding: seeded })
66
77
  }
67
78
  );
68
79
  }
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import React__default from 'react';
3
- import { N as NajmUIProviderProps } from '../NajmUIProvider-BsCoDjHH.js';
3
+ import { N as NajmUIProviderProps } from '../NajmUIProvider-Dj32bd5d.js';
4
4
 
5
5
  interface NextLinkAdapterProps extends Record<string, any> {
6
6
  href: string;
@@ -1,3 +1,3 @@
1
- export { NajmNextUIProvider, NextLinkAdapter, useNextNavigationAdapter } from '../chunk-4MRUJ2ZO.mjs';
2
- import '../chunk-7F65QM43.mjs';
3
- import '../chunk-YBM5CTE6.mjs';
1
+ export { NajmNextUIProvider, NextLinkAdapter, useNextNavigationAdapter } from '../chunk-IRFFSAO2.mjs';
2
+ import '../chunk-USZUOJMK.mjs';
3
+ import '../chunk-KVZACF4G.mjs';
@@ -0,0 +1,65 @@
1
+ import { createContext, useContext, useMemo, useState, useCallback } from 'react';
2
+ import { jsx } from 'react/jsx-runtime';
3
+
4
+ // src/components/branding/NBrandingContext.tsx
5
+ function normalizeBranding(input) {
6
+ if (!input) return {};
7
+ const value = {};
8
+ const expanded = input.logoExpanded ?? input.sidebarLogoExpandedPath;
9
+ const collapsed = input.logoCollapsed ?? input.sidebarLogoCollapsedPath;
10
+ if (input.appName !== void 0) value.appName = input.appName;
11
+ if (input.logoFallback !== void 0) value.logoFallback = input.logoFallback;
12
+ if (input.logoHref !== void 0) value.logoHref = input.logoHref;
13
+ if (expanded !== void 0) value.logoExpanded = expanded;
14
+ if (collapsed !== void 0) value.logoCollapsed = collapsed;
15
+ return value;
16
+ }
17
+ var NBrandingContext = createContext(null);
18
+ function useNBranding() {
19
+ return useContext(NBrandingContext);
20
+ }
21
+ function NBrandingProvider({
22
+ children,
23
+ appName,
24
+ logoExpanded,
25
+ logoCollapsed,
26
+ logoFallback,
27
+ logoHref
28
+ }) {
29
+ const value = useMemo(
30
+ () => ({ appName, logoExpanded, logoCollapsed, logoFallback, logoHref }),
31
+ [appName, logoExpanded, logoCollapsed, logoFallback, logoHref]
32
+ );
33
+ return /* @__PURE__ */ jsx(NBrandingContext.Provider, { value, children });
34
+ }
35
+ var NBrandingEditorContext = createContext(null);
36
+ function useNBrandingEditor() {
37
+ return useContext(NBrandingEditorContext);
38
+ }
39
+ function NBrandingStateProvider({
40
+ children,
41
+ branding,
42
+ initialBranding
43
+ }) {
44
+ const [state, setState] = useState(
45
+ () => normalizeBranding(initialBranding ?? branding)
46
+ );
47
+ const setBranding = useCallback((patch) => {
48
+ const marks = normalizeBranding(patch);
49
+ setState((current) => ({ ...current, ...marks }));
50
+ }, []);
51
+ const controlled = useMemo(
52
+ () => branding ? normalizeBranding(branding) : void 0,
53
+ [branding]
54
+ );
55
+ const resolved = controlled ?? state;
56
+ const editor = useMemo(
57
+ () => ({ branding: resolved, setBranding: branding ? noop : setBranding }),
58
+ [resolved, branding, setBranding]
59
+ );
60
+ return /* @__PURE__ */ jsx(NBrandingEditorContext.Provider, { value: editor, children: /* @__PURE__ */ jsx(NBrandingProvider, { ...resolved, children }) });
61
+ }
62
+ function noop() {
63
+ }
64
+
65
+ export { NBrandingProvider, NBrandingStateProvider, normalizeBranding, useNBranding, useNBrandingEditor };
@@ -1,6 +1,4 @@
1
- import { useNajmComponentStyle } from './chunk-YBM5CTE6.mjs';
2
- import { clsx } from 'clsx';
3
- import { twMerge } from 'tailwind-merge';
1
+ import { useNajmComponentStyle, cn } from './chunk-KVZACF4G.mjs';
4
2
  import * as React2 from 'react';
5
3
  import React2__default, { createContext, useContext } from 'react';
6
4
  import * as LucideIcons from 'lucide-react';
@@ -11,9 +9,6 @@ import { cva } from 'class-variance-authority';
11
9
  import { OverlayScrollbars } from 'overlayscrollbars';
12
10
  import { OverlayScrollbarsComponent } from 'overlayscrollbars-react';
13
11
 
14
- function cn(...inputs) {
15
- return twMerge(clsx(inputs));
16
- }
17
12
  function toPascalCase(value) {
18
13
  return value.replace(/([a-z0-9])([A-Z])/g, "$1 $2").split(/[\s_-]+/).filter(Boolean).map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join("");
19
14
  }
@@ -829,4 +824,4 @@ function NTableJson() {
829
824
  return /* @__PURE__ */ jsx("div", { className: "flex-1 flex flex-col min-h-0 overflow-hidden", children: renderJson?.() ?? /* @__PURE__ */ jsx(NajmScroll, { axis: "both", className: "h-full min-h-0 rounded-md border border-border bg-muted/40", children: /* @__PURE__ */ jsx("pre", { className: "p-4 font-mono text-xs leading-relaxed text-foreground", children: formatJsonValue(jsonValue) }) }) });
830
825
  }
831
826
 
832
- export { Button, NAJM_COMPONENT_NAMES, NButton, NIcon, NTableJson, NajmScroll, RADIUS_VALUE_MAP, TableStoreContext, buttonVariants, cn, defineNajmDesignConfig, defineNajmThemeConfig, inputBorderClasses, parseNajmDesignConfig, parseNajmThemeConfig, resolveRadiusValue, resolveVariantAlias, sidebarBorderClasses, stringifyNajmDesignConfig, stringifyNajmThemeConfig, surfaceBorderClasses, useNajmScrollViewport, useTableStore };
827
+ export { Button, NAJM_COMPONENT_NAMES, NButton, NIcon, NTableJson, NajmScroll, RADIUS_VALUE_MAP, TableStoreContext, buttonVariants, defineNajmDesignConfig, defineNajmThemeConfig, inputBorderClasses, parseNajmDesignConfig, parseNajmThemeConfig, resolveRadiusValue, resolveVariantAlias, sidebarBorderClasses, stringifyNajmDesignConfig, stringifyNajmThemeConfig, surfaceBorderClasses, useNajmScrollViewport, useTableStore };
@@ -1,4 +1,4 @@
1
- import { NajmUIProvider } from './chunk-7F65QM43.mjs';
1
+ import { NajmUIProvider } from './chunk-USZUOJMK.mjs';
2
2
  import React from 'react';
3
3
  import { useRouter } from 'next/navigation';
4
4
  import { jsx } from 'react/jsx-runtime';
@@ -1,6 +1,8 @@
1
1
  import * as React from 'react';
2
2
  import { Slot } from '@radix-ui/react-slot';
3
3
  import { jsx } from 'react/jsx-runtime';
4
+ import { clsx } from 'clsx';
5
+ import { twMerge } from 'tailwind-merge';
4
6
 
5
7
  // src/theme/presets/modes.ts
6
8
  var lightMode = {
@@ -301,6 +303,9 @@ function NajmThemeProvider({
301
303
  }
302
304
  ) }) }) }) });
303
305
  }
306
+ function cn(...inputs) {
307
+ return twMerge(clsx(inputs));
308
+ }
304
309
  var NajmDesignContext = React.createContext({
305
310
  components: {}
306
311
  });
@@ -363,4 +368,4 @@ function NajmDesignProvider({
363
368
  ) : children }) });
364
369
  }
365
370
 
366
- export { NajmDesignProvider, NajmThemeContainerCtx, NajmThemeProvider, composePreset, resolvePreset, useNajmAppearance, useNajmComponentStyle, useNajmDesign, useNajmThemeMode };
371
+ export { NajmDesignProvider, NajmThemeContainerCtx, NajmThemeProvider, cn, composePreset, resolvePreset, useNajmAppearance, useNajmComponentStyle, useNajmDesign, useNajmThemeMode };
@@ -1,4 +1,4 @@
1
- import { NajmDesignProvider } from './chunk-YBM5CTE6.mjs';
1
+ import { NajmDesignProvider, cn } from './chunk-KVZACF4G.mjs';
2
2
  import * as React2 from 'react';
3
3
  import React2__default from 'react';
4
4
  import { jsx } from 'react/jsx-runtime';
@@ -23,6 +23,17 @@ function useResolvedPaginationLabels(own) {
23
23
  }
24
24
  var NajmPreferencesContext = React2.createContext(null);
25
25
  var DEFAULT_TIME_ZONE = "UTC";
26
+ function isValidTimeZone(value) {
27
+ try {
28
+ new Intl.DateTimeFormat(void 0, { timeZone: value });
29
+ return true;
30
+ } catch {
31
+ return false;
32
+ }
33
+ }
34
+ function defaultNormalizeTimeZone(value) {
35
+ return isValidTimeZone(value) ? value : DEFAULT_TIME_ZONE;
36
+ }
26
37
  function applyTheme(theme) {
27
38
  if (typeof document === "undefined") return;
28
39
  document.documentElement.classList.toggle("dark", theme === "dark");
@@ -37,11 +48,11 @@ function NajmPreferencesProvider({
37
48
  initialTimeZone = DEFAULT_TIME_ZONE,
38
49
  onThemeChange,
39
50
  onTimeZoneChange,
40
- normalizeTimeZone
51
+ normalizeTimeZone = defaultNormalizeTimeZone
41
52
  }) {
42
53
  const [theme, setThemeState] = React2.useState(initialTheme);
43
54
  const [timeZone, setTimeZoneState] = React2.useState(
44
- () => normalizeTimeZone ? normalizeTimeZone(initialTimeZone) : initialTimeZone
55
+ () => normalizeTimeZone(initialTimeZone)
45
56
  );
46
57
  const onThemeChangeRef = React2.useRef(onThemeChange);
47
58
  const onTimeZoneChangeRef = React2.useRef(onTimeZoneChange);
@@ -61,7 +72,7 @@ function NajmPreferencesProvider({
61
72
  await onThemeChangeRef.current?.(next);
62
73
  }, []);
63
74
  const setTimeZone = React2.useCallback(async (next) => {
64
- const normalized = normalizeRef.current ? normalizeRef.current(next) : next;
75
+ const normalized = normalizeRef.current(next);
65
76
  setTimeZoneState(normalized);
66
77
  applyTimeZone(normalized);
67
78
  await onTimeZoneChangeRef.current?.(normalized);
@@ -119,26 +130,95 @@ var EMPTY_DESIGN = Object.freeze({
119
130
  theme: {},
120
131
  components: {}
121
132
  });
133
+ var NajmDesignEditorContext = React2.createContext(null);
134
+ function useNajmDesignEditor() {
135
+ return React2.useContext(NajmDesignEditorContext);
136
+ }
137
+ function cloneDesign(design) {
138
+ return structuredClone(design);
139
+ }
140
+ function NajmDesignEditorProvider({
141
+ children,
142
+ design,
143
+ initialDesign
144
+ }) {
145
+ const [state, setState] = React2.useState(() => ({
146
+ committed: initialDesign ?? design ?? EMPTY_DESIGN,
147
+ draft: null
148
+ }));
149
+ const beginDraft = React2.useCallback(() => {
150
+ setState(
151
+ (current) => current.draft ? current : { ...current, draft: cloneDesign(current.committed) }
152
+ );
153
+ }, []);
154
+ const setDraft = React2.useCallback((next) => {
155
+ setState((current) => ({ ...current, draft: cloneDesign(next) }));
156
+ }, []);
157
+ const cancelDraft = React2.useCallback(() => {
158
+ setState(
159
+ (current) => current.draft === null ? current : { ...current, draft: null }
160
+ );
161
+ }, []);
162
+ const setCommitted = React2.useCallback((next) => {
163
+ setState({ committed: next, draft: null });
164
+ }, []);
165
+ const value = React2.useMemo(() => {
166
+ if (design) {
167
+ return {
168
+ design,
169
+ committed: design,
170
+ draft: null,
171
+ hasDraft: false,
172
+ beginDraft: noop,
173
+ setDraft: noop,
174
+ cancelDraft: noop,
175
+ setCommitted: noop
176
+ };
177
+ }
178
+ return {
179
+ design: state.draft ?? state.committed,
180
+ committed: state.committed,
181
+ draft: state.draft,
182
+ hasDraft: state.draft !== null,
183
+ beginDraft,
184
+ setDraft,
185
+ cancelDraft,
186
+ setCommitted
187
+ };
188
+ }, [design, state, beginDraft, setDraft, cancelDraft, setCommitted]);
189
+ return /* @__PURE__ */ jsx(NajmDesignEditorContext.Provider, { value, children });
190
+ }
191
+ function noop() {
192
+ }
122
193
  function NajmUICore({
123
194
  children,
124
- design = EMPTY_DESIGN,
125
195
  className,
126
196
  t,
127
197
  paginationKeyPrefix = DEFAULT_PAGINATION_KEY_PREFIX,
128
198
  tableDefaults
129
199
  }) {
130
200
  const { theme } = useNajmTheme();
201
+ const design = useNajmDesignEditor()?.design ?? EMPTY_DESIGN;
131
202
  const defaults = React2.useMemo(() => {
132
203
  const translated = t ? buildPaginationLabels(t, paginationKeyPrefix) : void 0;
133
204
  const overrides = tableDefaults?.paginationLabels;
134
205
  const paginationLabels = translated || overrides ? { ...translated, ...overrides } : void 0;
135
206
  return { ...tableDefaults, paginationLabels };
136
207
  }, [t, paginationKeyPrefix, tableDefaults]);
137
- return /* @__PURE__ */ jsx(NajmDesignProvider, { config: design, mode: theme, className, children: /* @__PURE__ */ jsx(NTableDefaultsProvider, { value: defaults, children }) });
208
+ return /* @__PURE__ */ jsx(
209
+ NajmDesignProvider,
210
+ {
211
+ config: design,
212
+ mode: theme,
213
+ className: cn("min-h-full", className),
214
+ children: /* @__PURE__ */ jsx(NTableDefaultsProvider, { value: defaults, children })
215
+ }
216
+ );
138
217
  }
139
218
  function NajmUIProvider({
140
219
  children,
141
220
  design,
221
+ initialDesign,
142
222
  className,
143
223
  t,
144
224
  paginationKeyPrefix,
@@ -150,17 +230,16 @@ function NajmUIProvider({
150
230
  normalizeTimeZone
151
231
  }) {
152
232
  const outerPreferences = useNajmPreferencesContext();
153
- const core = /* @__PURE__ */ jsx(
233
+ const core = /* @__PURE__ */ jsx(NajmDesignEditorProvider, { design, initialDesign, children: /* @__PURE__ */ jsx(
154
234
  NajmUICore,
155
235
  {
156
- design,
157
236
  className,
158
237
  t,
159
238
  paginationKeyPrefix,
160
239
  tableDefaults,
161
240
  children
162
241
  }
163
- );
242
+ ) });
164
243
  if (outerPreferences) return core;
165
244
  return /* @__PURE__ */ jsx(
166
245
  NajmPreferencesProvider,
@@ -175,4 +254,4 @@ function NajmUIProvider({
175
254
  );
176
255
  }
177
256
 
178
- export { DEFAULT_PAGINATION_KEY_PREFIX, DEFAULT_TIME_ZONE, NTableDefaultsProvider, NajmPreferencesProvider, NajmUIProvider, buildPaginationLabels, useNTableDefaults, useNajmPreferencesContext, useNajmTheme, useNajmTimeZone, useResolvedPaginationLabels };
257
+ export { DEFAULT_PAGINATION_KEY_PREFIX, DEFAULT_TIME_ZONE, EMPTY_DESIGN, NTableDefaultsProvider, NajmDesignEditorProvider, NajmPreferencesProvider, NajmUIProvider, buildPaginationLabels, useNTableDefaults, useNajmDesignEditor, useNajmPreferencesContext, useNajmTheme, useNajmTimeZone, useResolvedPaginationLabels };
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { a as NajmThemeProviderProps, b as NajmAppearance, c as NajmMode, d as NajmDesignConfig, e as NajmThemeConfig, f as NajmAccent, g as NajmThemeTokens, h as NajmPreset, i as NajmComponentName, j as NajmComponentStyleConfig, k as NajmComponentThemeConfig, l as NajmTypographyConfig, m as NajmLayoutConfig, n as NajmVariantStyle, o as NTablePaginationVariant, p as NTablePaginationLabels, q as NTableCardPagination, r as NajmResponsiveBreakpoint, s as NajmResponsiveValue } from './NajmUIProvider-BsCoDjHH.js';
3
- export { D as DEFAULT_PAGINATION_KEY_PREFIX, t as DEFAULT_TIME_ZONE, u as NAJM_COMPONENT_NAMES, v as NTableDefaults, w as NTableDefaultsProvider, x as NTableInfinitePagination, y as NTableLoadMorePagination, z as NajmComponentRadius, A as NajmDensity, B as NajmPreferencesContextValue, C as NajmPreferencesProvider, E as NajmPreferencesProviderProps, F as NajmSlotStyle, G as NajmTranslate, H as NajmUIProvider, N as NajmUIProviderProps, R as RADIUS_VALUE_MAP, I as buildPaginationLabels, J as resolveRadiusValue, K as useNTableDefaults, L as useNajmPreferencesContext, M as useNajmTheme, O as useNajmTimeZone } from './NajmUIProvider-BsCoDjHH.js';
2
+ import { a as NajmDesignConfig, b as NajmThemeProviderProps, c as NajmAppearance, d as NajmMode, e as NajmThemeConfig, f as NajmAccent, g as NajmThemeTokens, h as NajmPreset, i as NajmComponentName, j as NajmComponentStyleConfig, k as NajmComponentThemeConfig, l as NajmTypographyConfig, m as NajmLayoutConfig, n as NajmVariantStyle, o as NTablePaginationVariant, p as NTablePaginationLabels, q as NTableCardPagination, r as NajmResponsiveBreakpoint, s as NajmResponsiveValue } from './NajmUIProvider-Dj32bd5d.js';
3
+ export { D as DEFAULT_PAGINATION_KEY_PREFIX, t as DEFAULT_TIME_ZONE, u as NAJM_COMPONENT_NAMES, v as NTableDefaults, w as NTableDefaultsProvider, x as NTableInfinitePagination, y as NTableLoadMorePagination, z as NajmComponentRadius, A as NajmDensity, B as NajmPreferencesContextValue, C as NajmPreferencesProvider, E as NajmPreferencesProviderProps, F as NajmSlotStyle, G as NajmTranslate, H as NajmUIProvider, N as NajmUIProviderProps, R as RADIUS_VALUE_MAP, I as buildPaginationLabels, J as resolveRadiusValue, K as useNTableDefaults, L as useNajmPreferencesContext, M as useNajmTheme, O as useNajmTimeZone } from './NajmUIProvider-Dj32bd5d.js';
4
4
  import * as React$1 from 'react';
5
5
  import React__default, { RefObject, ReactNode, ComponentType, InputHTMLAttributes, Ref, ImgHTMLAttributes, CSSProperties, MouseEvent, MouseEventHandler } from 'react';
6
6
  import * as class_variance_authority_types from 'class-variance-authority/types';
@@ -20,6 +20,7 @@ import * as TooltipPrimitive from '@radix-ui/react-tooltip';
20
20
  import * as ProgressPrimitive from '@radix-ui/react-progress';
21
21
  import * as SeparatorPrimitive from '@radix-ui/react-separator';
22
22
  import { OverlayScrollbarsComponentProps } from 'overlayscrollbars-react';
23
+ export { a as NBrandingEditorValue, N as NBrandingInput, b as NBrandingPayload, c as NBrandingProvider, d as NBrandingStateProvider, e as NBrandingStateProviderProps, f as NBrandingValue, n as normalizeBranding, u as useNBranding, g as useNBrandingEditor } from './NBrandingContext-dkADu8JS.js';
23
24
  import * as AvatarPrimitive from '@radix-ui/react-avatar';
24
25
  import { Command as Command$1 } from 'cmdk';
25
26
  import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
@@ -38,6 +39,56 @@ export { N as NTableJson } from './NTableJson-tXqgfZI1.js';
38
39
  import * as _tanstack_table_core from '@tanstack/table-core';
39
40
  import { ClassValue } from 'clsx';
40
41
 
42
+ /**
43
+ * Shared so the identity is stable across renders — `NajmDesignProvider`
44
+ * memoizes on `config.components`, `config.typography` and `config.layout`, and
45
+ * a fresh literal here would invalidate that on every render of the tree.
46
+ */
47
+ declare const EMPTY_DESIGN: NajmDesignConfig;
48
+ interface NajmDesignEditorValue {
49
+ /** `draft ?? committed`. What the tree is currently rendered against. */
50
+ design: NajmDesignConfig;
51
+ /** The last design the application saved. */
52
+ committed: NajmDesignConfig;
53
+ /** The unsaved edit layered over `committed`, or `null`. */
54
+ draft: NajmDesignConfig | null;
55
+ hasDraft: boolean;
56
+ /** Clones `committed` into a draft. A no-op while one is already open. */
57
+ beginDraft: () => void;
58
+ setDraft: (design: NajmDesignConfig) => void;
59
+ cancelDraft: () => void;
60
+ /** Adopt a design the application persisted, discarding any draft. */
61
+ setCommitted: (design: NajmDesignConfig) => void;
62
+ }
63
+ /**
64
+ * The draft/commit layer a runtime theme editor needs.
65
+ *
66
+ * Returns `null` outside a provider, so a component that only *offers* theme
67
+ * editing stays mountable in an application that has none.
68
+ *
69
+ * The editor holds no opinion about persistence: an application saves through
70
+ * whatever its own API is, then hands the result back via `setCommitted`. That
71
+ * is the same split `NajmPreferencesProvider` draws for theme and time zone.
72
+ */
73
+ declare function useNajmDesignEditor(): NajmDesignEditorValue | null;
74
+ interface NajmDesignEditorProviderProps {
75
+ children: React$1.ReactNode;
76
+ /**
77
+ * Controlled design. When given, this provider only forwards it and every
78
+ * command below is inert — the application already owns the state.
79
+ */
80
+ design?: NajmDesignConfig;
81
+ /**
82
+ * Seeds design state this provider owns from then on; ignored after mount.
83
+ *
84
+ * Uncontrolled on purpose, matching `initialTheme` and `initialTimeZone`:
85
+ * the page is rendered once against what the server resolved, and every
86
+ * change after that originates in the editor.
87
+ */
88
+ initialDesign?: NajmDesignConfig;
89
+ }
90
+ declare function NajmDesignEditorProvider({ children, design, initialDesign, }: NajmDesignEditorProviderProps): react_jsx_runtime.JSX.Element;
91
+
41
92
  /** Returns the active mode inherited from the nearest Najm theme provider. */
42
93
  declare function useNajmThemeMode(): NajmMode | undefined;
43
94
  declare function useNajmAppearance(): NajmAppearance;
@@ -1083,31 +1134,6 @@ interface NImageProps extends Omit<ImgHTMLAttributes<HTMLImageElement>, "src" |
1083
1134
  */
1084
1135
  declare function NImage({ src, fallback, alt, ...rest }: NImageProps): react_jsx_runtime.JSX.Element;
1085
1136
 
1086
- interface NBrandingValue {
1087
- /** Used as the logo's `alt` when the logo does not set one. */
1088
- appName?: string;
1089
- logoExpanded?: ReactNode | string;
1090
- /** Falls back to `logoExpanded`. */
1091
- logoCollapsed?: ReactNode | string;
1092
- /** Swapped in when a `string` logo fails to load. */
1093
- logoFallback?: string;
1094
- logoHref?: string;
1095
- }
1096
- /** Returns `null` outside a provider, so every consumer stays optional. */
1097
- declare function useNBranding(): NBrandingValue | null;
1098
- /**
1099
- * Publishes the app's marks once, so shells stop threading a `logo` through
1100
- * every surface that shows one. `NSidebar` reads this when no `logo` prop is
1101
- * given; an explicit `logo` always wins.
1102
- *
1103
- * Unlike `NSidebarProvider` this owns no state — the values are resolved by the
1104
- * app (usually server-side) and only forwarded, so memoizing on the fields is
1105
- * correct here.
1106
- */
1107
- declare function NBrandingProvider({ children, appName, logoExpanded, logoCollapsed, logoFallback, logoHref, }: Readonly<NBrandingValue & {
1108
- children: ReactNode;
1109
- }>): react_jsx_runtime.JSX.Element;
1110
-
1111
1137
  type AvatarSize = "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
1112
1138
  type AvatarShape$1 = "circle" | "rounded" | "square";
1113
1139
  type AvatarStatusType = "online" | "offline" | "busy" | "away";
@@ -4096,4 +4122,4 @@ interface NGridItemProps extends Omit<React$1.AllHTMLAttributes<HTMLDivElement>,
4096
4122
  declare function NGrid({ as: Comp, children, cols, smCols, mdCols, lgCols, xlCols, gap, className, style, ...props }: NGridProps): react_jsx_runtime.JSX.Element;
4097
4123
  declare function NGridItem({ children, span, smSpan, mdSpan, lgSpan, xlSpan, className, ...props }: NGridItemProps): react_jsx_runtime.JSX.Element;
4098
4124
 
4099
- export { Alert, type AlertLook, type AlertOrientation, type AlertProps, type AlertSize, type AlertTone, type AlertVariant, NCard as AsyncCard, Avatar, AvatarFallback, AvatarFormInput, type AvatarFormInputProps, AvatarGroup, type AvatarGroupProps, AvatarImage, AvatarInput, type AvatarInputProps, type AvatarInputRadius, type AvatarProps$1 as AvatarProps, type AvatarShape$1 as AvatarShape, type AvatarSize, AvatarStatus, type AvatarStatusType, Badge, type BadgeColor, type BadgeIcon, type BadgeLook, type BadgeProps, type BadgeShape, type BadgeSize, type BadgeVariant, BaseInput, type BuildDefaultFileColumnsOptions, Button, type ButtonConfig, type ButtonIcon, type ButtonLoaderPosition, type ButtonProps, type ButtonRounded, type ButtonSize, type ButtonVariant, Calendar, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, CheckboxGroupInput, type CheckboxGroupInputProps, CheckboxInput, type CheckboxInputProps, Collapsible, CollapsibleContent, CollapsibleTrigger, ColorArrayInput, type ColorArrayInputProps, type ColorFormat, ColorPickerInput, type ColorPickerInputProps, Combobox, ComboboxInput, type ComboboxInputProps, type ComboboxOption, type ComboboxProps, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, type ContextMenuItem, DEFAULT_THEME_FILE_NAME, DateInput, type DateInputProps, type DeleteDialogOptions, Dialog, type DialogActionMode, type DialogApi, DialogClose, type DialogConfig, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, DialogHeader, type DialogHeight, DialogOverlay, type DialogPadding, DialogPortal, type DialogRenderContext, type DialogRenderer, type DialogSize, type DialogStore, DialogTitle, DialogTrigger, type DialogVariant, type DialogWidth, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, DynamicArray, type DynamicArrayProps, EmojiInput, type EmojiInputProps, type FileBrowserMode, FileImportButton, FileInput, type FileInputProps, type FileNode, Form, FormControl, FormDescription, FormField, FormInput, type FormInputBackground, type FormInputProps, FormItem, FormLabel, FormMessage, type FormProps, type FormSlotClassNames, type FormVariant, IconButton, type IconButtonProps, type IconButtonSize, type IconButtonVariant, ImageInput, type ImageInputPreviewError, type ImageInputPreviewSource, type ImageInputProps, Indicator, type IndicatorHorizontal, type IndicatorOverlay, type IndicatorPosition, type IndicatorProps, type IndicatorResponsivePosition, type IndicatorSize, type IndicatorVertical, Input, type InputIcon, Label, LangInput, type LangInputProps, type LinkComponentType, MultiSelectInput, type MultiSelectInputProps, NAJM_SAVED_THEME_VALUE, NAlert, type NAppCommandItem, NAppShell, type NAppShellAction, type NAppShellClassNames, type NAppShellProps, type NAppShellUser, NCard as NAsyncCard, type CardClassNames as NAsyncCardClassNames, type CardProps as NAsyncCardProps, NAvatar, type NAvatarClassNames, type NAvatarProps, type AvatarShape as NAvatarShape, NBadge, type NBadgeLook, type NBadgeProps, NBarChart, type NBarChartProps, NBrandingProvider, type NBrandingValue, type NBulkAction, type NBulkActionButton, type NBulkActionSelect, NBulkActionsBar, type NBulkActionsBarProps, NButton, type NButtonProps, NCard, NCardAction, type CardClassNames as NCardClassNames, type NCardDensity, NCardFooter, NCardInfo, type NCardInfoProps, NCardMedia, type NCardMediaAspect, type NCardMediaPlacement, type NCardMediaProps, type NCardMediaSize, type NCardMediaVariant, type CardProps as NCardProps, NCardSection, type NCardSectionProps, type NCardSectionSurface, type NCartesianChartProps, type NChartCardProps, type NChartDatum, type NChartItem, type NChartSeries, type NChartSize, NChartSkeleton, type NChartSkeletonProps, type NChartSkeletonVariant, NCommandPalette, type NCommandPaletteProps, NConfirmDialog, type NConfirmDialogProps, NContextMenu, type NContextMenuItem, type NContextMenuProps, NDataCardShell, type NDataCardShellActions, type NDataCardShellProps, NDeleteDialog, NDeleteDialogContent, type NDeleteDialogContentProps, type NDeleteDialogProps, NDetailCard, type NDetailCardClassNames, type NDetailCardProps, NDetailItem, type NDetailItemProps, NDetailList, type NDetailListItem, type NDetailListProps, NDialog, type NDialogActionProps, NDialogDescription, type NDialogDescriptionProps, type NDialogDirectProps, NDialogHeader, type NDialogHeaderProps, NDialogPrimaryButton, type NDialogProps, NDialogSecondaryButton, NDonutCard, type NDonutCardClassNames, type NDonutCardItem, type NDonutCardLayout, type NDonutCardLegendMarker, type NDonutCardProps, type NDonutCardVariant, type NEditorTab, NEditorTabs, type NEditorTabsProps, NEmptyState, type NEmptyStateProps, NErrorBoundary, NErrorState, type NErrorStateProps, NFileBrowser, type NFileBrowserCardProps, type NFileBrowserProps, type NFileBrowserRenderThumbProps, NFileTypeIcon, type NFileTypeIconProps, NFilterBar, NFolderIcon, type NFolderIconProps, NForm, NFormSectionHeader, type NFormSectionHeaderProps, NGrid, type NGridCols, NGridItem, type NGridItemProps, type NGridProps, type NGridSpan, NIcon, type NIconProps, type NIconSource, NImage, type NImageProps, NIndicator, NInspectorSheet, NLineChart, type NLineChartProps, NLoadingState, type NLoadingStateProps, NMultiDialog, type NMultiDialogProps, NNavbar, NPageHeader, NPageHeaderActions, type NPageHeaderBreakpoint, NPageHeaderCompactActions, NPageHeaderFilters, type NPageHeaderProps, NPageHeaderTop, NPageLayout, type NPageLayoutProps, NPieChart, type NPieChartProps, NPortalScopeProvider, NProgress, type NProgressProps, NRowActions, NSection, NSectionHeader, type NSectionHeaderActionsProps, type NSectionHeaderContentProps, type NSectionHeaderProps, type NSectionHeaderSubtitleProps, type NSectionHeaderTitleProps, NSectionInfo, type NSectionInfoProps, type NSectionProps, NSectionWithInfo, type NSectionWithInfoItem, type NSectionWithInfoProps, NSheet, type NSheetClassNames, type NSheetProps, NSidebar, NSidebarBrand, type NSidebarBrandProps, NSidebarContent, type NSidebarContentProps, type NSidebarContextValue, NSidebarFooter, type NSidebarFooterProps, NSidebarHeader, type NSidebarHeaderProps, NSidebarItem, NSidebarMobile, type NSidebarMobileProps, NSidebarProvider, NSidebarSection, type NSidebarSectionProps, NSkeleton, NSkeletonCalendar, NSkeletonChart, NSkeletonDonut, NSkeletonEventList, NSkeletonWidget, NSkeletonWidgets, NSlider, type NSliderProps, NSmartPasteDialog, type NSmartPasteDialogProps, NSpinner, type NSpinnerProps, NStatCard, type NStatCardClassNames, type NStatCardProps, NStatCardSkeleton, type NStatCardVariant, NStatusBreakdown, type NStatusBreakdownProps, Swap as NSwap, type NSwapProps, NTable, NTableCardPagination, NTableCardRoot, type NTableCardRootProps, NTableCards, type NTableClassNames, type NTableColumnBreakpoint, type NTableColumnDef, type NTableColumnMeta, NTableContent, NTableHeader, NTableLoadingSkeleton, type NTableMenu, type NTableMenuProp, type NTablePageItem, NTablePagination, NTablePaginationLabels, NTablePaginationVariant, type NTableProps, NTableRowSkeleton, NTableSkeleton, type NTableState, NTabs, type NTabsClassNames, type NTabsColor, type NTabsItem, type NTabsProps, type NTabsStyles, NThemeCustomizer, type NThemeCustomizerFontOption, type NThemeCustomizerLabels, type NThemeCustomizerProps, type NThemeCustomizerTab, type NThemePreset, NThemePresets, type NThemePresetsLabels, type NThemePresetsProps, type NThemePresetsStatus, NUploader, type NUploaderItem, type NUploaderItemStatus, type NUploaderProps, NViewBody, NViewToggle, NajmAccent, NajmAppearance, type NajmBorderSide, NajmComponentName, NajmComponentStyleConfig, NajmComponentThemeConfig, NajmDesignConfig, NajmDesignProvider, type NajmDesignProviderProps, NajmLayoutConfig, NajmMode, NajmPreset, NajmResponsiveBreakpoint, NajmResponsiveValue, NajmScroll, type NajmScrollProps, NajmThemeConfig, NajmThemeProvider, NajmThemeProviderProps, NajmThemeTokens, NajmTypographyConfig, NajmVariantStyle, NativeSelect, type NativeSelectOption, type NativeSelectProps, type NavItem, type NavItemGroup, NumberInput, type NumberInputProps, OtpInput, type OtpInputProps, PasswordInput, type PasswordInputProps, PhoneInput, type PhoneInputProps, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PrefixProvider, Progress, type ProgressColor, type ProgressLabelPosition, type ProgressProps, type ProgressSize, type PushDialogOptions, RadioGroup, RadioGroupInput, type RadioGroupInputProps, RadioGroupItem, type RenderSlot, RepeatingFields, type RepeatingFieldsProps, ScrollArea, type ScrollAreaProps, SearchField, SearchField as SearchInput, SegmentedControl, type SegmentedControlOption, type SegmentedControlProps, Select, SelectContent, SelectGroup, SelectInput, type SelectInputProps, SelectItem, type SelectItemType$1 as SelectItemDataType, type SelectItemType, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, type SidebarItemProps, type SidebarLogo, type SidebarLogoRender, type SidebarProps, type SidebarWidth, type SidebarWidths, SimpleTooltip, type SimpleTooltipProps, NSkeleton as Skeleton, Slider, SliderInput, type SliderInputProps, type SliderOrientation, type SliderProps, type SliderSize, type SliderVariant, type SmartPastePreview, type SpinnerVariant, StarRatingInput, type StarRatingInputProps, StatusPill, type StatusPillProps, type StatusPillTone, type StepConfig, StepIndicator, type StepMeta, StepsHeader, StepsProgress, type StorageMenuAction, type StorageSortOption, type StorageTarget, Swap, type SwapEffect, SwapIndeterminate, SwapOff, SwapOn, type SwapProps, type SwapSize, type SwapState, Switch, type SwitchColor, SwitchInput, type SwitchInputProps, type SwitchSize, TAB_COLORS, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, type TableHeaderColor, TableRow, type TableState, type TableStore, TableStoreContext, Tabs, TabsContent, TabsList, type TabsListProps, type TabsOrientation, type TabsProps, TabsTrigger, type TabsTriggerProps, type TabsVariant, TextAreaInput, type TextAreaInputProps, TextInput, type TextInputProps, Textarea, TimeInput, type TimeInputProps, TimeZoneInput, type TimeZoneInputProps, Toaster, Toggle, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type UseContextMenuResult, type UseNFormOptions, type UseStorageContextMenuOptions, type UseStorageContextMenuResult, type UserMenuAction, VariantProvider, type WizardClassNames, WizardForm, type WizardFormProps, alertVariants, avatarVariants, badgeColorVariants, badgeVariants, buildDefaultFileColumns, buildPageItems, buttonVariants, cn, composePreset, createDialogStore, createTableStore, defineNajmDesignConfig, defineNajmThemeConfig, detectFormat, dialogVariants, filterResponsiveColumns, formatColor, formatFileBytes, formatFileRelative, getIconColorProps, getNChartColor, getNextEditorTabValue, hiddenBelowClasses, indicatorVariants, inputBorderClasses, normalizeThemeFileName, parseColor, parseNajmDesignConfig, parseNajmThemeConfig, parseThemeFile, resolveHiddenBelowClass, resolvePreset, resolveSlot, resolveVariantAlias, sidebarBorderClasses, sliderVariants, stringifyNajmDesignConfig, stringifyNajmThemeConfig, stringifyThemeFile, surfaceBorderClasses, swapVariants, toPickerHex, toggleVariants, tooltipContentVariants, truncateByCharacters, useClickOutside, useContextMenu, useDebouncedValue, useDelayedLoading, useDialog, useDialogStore, useDynamicPageSize, useFormField, useFormSubmission, useInfiniteScroll, useKeyboard, useLocalStorageState, useNBranding, useNForm, useNPortalScope, useNSidebar, useNajmAppearance, useNajmComponentStyle, useNajmDesign, useNajmThemeMode, usePrefix, useSelection, useStepNavigation, useStorageContextMenu, useStoreSync, useTable, useTableKeyboard, useTableStore, useVariant, useVariantPreset };
4125
+ export { Alert, type AlertLook, type AlertOrientation, type AlertProps, type AlertSize, type AlertTone, type AlertVariant, NCard as AsyncCard, Avatar, AvatarFallback, AvatarFormInput, type AvatarFormInputProps, AvatarGroup, type AvatarGroupProps, AvatarImage, AvatarInput, type AvatarInputProps, type AvatarInputRadius, type AvatarProps$1 as AvatarProps, type AvatarShape$1 as AvatarShape, type AvatarSize, AvatarStatus, type AvatarStatusType, Badge, type BadgeColor, type BadgeIcon, type BadgeLook, type BadgeProps, type BadgeShape, type BadgeSize, type BadgeVariant, BaseInput, type BuildDefaultFileColumnsOptions, Button, type ButtonConfig, type ButtonIcon, type ButtonLoaderPosition, type ButtonProps, type ButtonRounded, type ButtonSize, type ButtonVariant, Calendar, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, CheckboxGroupInput, type CheckboxGroupInputProps, CheckboxInput, type CheckboxInputProps, Collapsible, CollapsibleContent, CollapsibleTrigger, ColorArrayInput, type ColorArrayInputProps, type ColorFormat, ColorPickerInput, type ColorPickerInputProps, Combobox, ComboboxInput, type ComboboxInputProps, type ComboboxOption, type ComboboxProps, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, type ContextMenuItem, DEFAULT_THEME_FILE_NAME, DateInput, type DateInputProps, type DeleteDialogOptions, Dialog, type DialogActionMode, type DialogApi, DialogClose, type DialogConfig, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, DialogHeader, type DialogHeight, DialogOverlay, type DialogPadding, DialogPortal, type DialogRenderContext, type DialogRenderer, type DialogSize, type DialogStore, DialogTitle, DialogTrigger, type DialogVariant, type DialogWidth, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, DynamicArray, type DynamicArrayProps, EMPTY_DESIGN, EmojiInput, type EmojiInputProps, type FileBrowserMode, FileImportButton, FileInput, type FileInputProps, type FileNode, Form, FormControl, FormDescription, FormField, FormInput, type FormInputBackground, type FormInputProps, FormItem, FormLabel, FormMessage, type FormProps, type FormSlotClassNames, type FormVariant, IconButton, type IconButtonProps, type IconButtonSize, type IconButtonVariant, ImageInput, type ImageInputPreviewError, type ImageInputPreviewSource, type ImageInputProps, Indicator, type IndicatorHorizontal, type IndicatorOverlay, type IndicatorPosition, type IndicatorProps, type IndicatorResponsivePosition, type IndicatorSize, type IndicatorVertical, Input, type InputIcon, Label, LangInput, type LangInputProps, type LinkComponentType, MultiSelectInput, type MultiSelectInputProps, NAJM_SAVED_THEME_VALUE, NAlert, type NAppCommandItem, NAppShell, type NAppShellAction, type NAppShellClassNames, type NAppShellProps, type NAppShellUser, NCard as NAsyncCard, type CardClassNames as NAsyncCardClassNames, type CardProps as NAsyncCardProps, NAvatar, type NAvatarClassNames, type NAvatarProps, type AvatarShape as NAvatarShape, NBadge, type NBadgeLook, type NBadgeProps, NBarChart, type NBarChartProps, type NBulkAction, type NBulkActionButton, type NBulkActionSelect, NBulkActionsBar, type NBulkActionsBarProps, NButton, type NButtonProps, NCard, NCardAction, type CardClassNames as NCardClassNames, type NCardDensity, NCardFooter, NCardInfo, type NCardInfoProps, NCardMedia, type NCardMediaAspect, type NCardMediaPlacement, type NCardMediaProps, type NCardMediaSize, type NCardMediaVariant, type CardProps as NCardProps, NCardSection, type NCardSectionProps, type NCardSectionSurface, type NCartesianChartProps, type NChartCardProps, type NChartDatum, type NChartItem, type NChartSeries, type NChartSize, NChartSkeleton, type NChartSkeletonProps, type NChartSkeletonVariant, NCommandPalette, type NCommandPaletteProps, NConfirmDialog, type NConfirmDialogProps, NContextMenu, type NContextMenuItem, type NContextMenuProps, NDataCardShell, type NDataCardShellActions, type NDataCardShellProps, NDeleteDialog, NDeleteDialogContent, type NDeleteDialogContentProps, type NDeleteDialogProps, NDetailCard, type NDetailCardClassNames, type NDetailCardProps, NDetailItem, type NDetailItemProps, NDetailList, type NDetailListItem, type NDetailListProps, NDialog, type NDialogActionProps, NDialogDescription, type NDialogDescriptionProps, type NDialogDirectProps, NDialogHeader, type NDialogHeaderProps, NDialogPrimaryButton, type NDialogProps, NDialogSecondaryButton, NDonutCard, type NDonutCardClassNames, type NDonutCardItem, type NDonutCardLayout, type NDonutCardLegendMarker, type NDonutCardProps, type NDonutCardVariant, type NEditorTab, NEditorTabs, type NEditorTabsProps, NEmptyState, type NEmptyStateProps, NErrorBoundary, NErrorState, type NErrorStateProps, NFileBrowser, type NFileBrowserCardProps, type NFileBrowserProps, type NFileBrowserRenderThumbProps, NFileTypeIcon, type NFileTypeIconProps, NFilterBar, NFolderIcon, type NFolderIconProps, NForm, NFormSectionHeader, type NFormSectionHeaderProps, NGrid, type NGridCols, NGridItem, type NGridItemProps, type NGridProps, type NGridSpan, NIcon, type NIconProps, type NIconSource, NImage, type NImageProps, NIndicator, NInspectorSheet, NLineChart, type NLineChartProps, NLoadingState, type NLoadingStateProps, NMultiDialog, type NMultiDialogProps, NNavbar, NPageHeader, NPageHeaderActions, type NPageHeaderBreakpoint, NPageHeaderCompactActions, NPageHeaderFilters, type NPageHeaderProps, NPageHeaderTop, NPageLayout, type NPageLayoutProps, NPieChart, type NPieChartProps, NPortalScopeProvider, NProgress, type NProgressProps, NRowActions, NSection, NSectionHeader, type NSectionHeaderActionsProps, type NSectionHeaderContentProps, type NSectionHeaderProps, type NSectionHeaderSubtitleProps, type NSectionHeaderTitleProps, NSectionInfo, type NSectionInfoProps, type NSectionProps, NSectionWithInfo, type NSectionWithInfoItem, type NSectionWithInfoProps, NSheet, type NSheetClassNames, type NSheetProps, NSidebar, NSidebarBrand, type NSidebarBrandProps, NSidebarContent, type NSidebarContentProps, type NSidebarContextValue, NSidebarFooter, type NSidebarFooterProps, NSidebarHeader, type NSidebarHeaderProps, NSidebarItem, NSidebarMobile, type NSidebarMobileProps, NSidebarProvider, NSidebarSection, type NSidebarSectionProps, NSkeleton, NSkeletonCalendar, NSkeletonChart, NSkeletonDonut, NSkeletonEventList, NSkeletonWidget, NSkeletonWidgets, NSlider, type NSliderProps, NSmartPasteDialog, type NSmartPasteDialogProps, NSpinner, type NSpinnerProps, NStatCard, type NStatCardClassNames, type NStatCardProps, NStatCardSkeleton, type NStatCardVariant, NStatusBreakdown, type NStatusBreakdownProps, Swap as NSwap, type NSwapProps, NTable, NTableCardPagination, NTableCardRoot, type NTableCardRootProps, NTableCards, type NTableClassNames, type NTableColumnBreakpoint, type NTableColumnDef, type NTableColumnMeta, NTableContent, NTableHeader, NTableLoadingSkeleton, type NTableMenu, type NTableMenuProp, type NTablePageItem, NTablePagination, NTablePaginationLabels, NTablePaginationVariant, type NTableProps, NTableRowSkeleton, NTableSkeleton, type NTableState, NTabs, type NTabsClassNames, type NTabsColor, type NTabsItem, type NTabsProps, type NTabsStyles, NThemeCustomizer, type NThemeCustomizerFontOption, type NThemeCustomizerLabels, type NThemeCustomizerProps, type NThemeCustomizerTab, type NThemePreset, NThemePresets, type NThemePresetsLabels, type NThemePresetsProps, type NThemePresetsStatus, NUploader, type NUploaderItem, type NUploaderItemStatus, type NUploaderProps, NViewBody, NViewToggle, NajmAccent, NajmAppearance, type NajmBorderSide, NajmComponentName, NajmComponentStyleConfig, NajmComponentThemeConfig, NajmDesignConfig, NajmDesignEditorProvider, type NajmDesignEditorProviderProps, type NajmDesignEditorValue, NajmDesignProvider, type NajmDesignProviderProps, NajmLayoutConfig, NajmMode, NajmPreset, NajmResponsiveBreakpoint, NajmResponsiveValue, NajmScroll, type NajmScrollProps, NajmThemeConfig, NajmThemeProvider, NajmThemeProviderProps, NajmThemeTokens, NajmTypographyConfig, NajmVariantStyle, NativeSelect, type NativeSelectOption, type NativeSelectProps, type NavItem, type NavItemGroup, NumberInput, type NumberInputProps, OtpInput, type OtpInputProps, PasswordInput, type PasswordInputProps, PhoneInput, type PhoneInputProps, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PrefixProvider, Progress, type ProgressColor, type ProgressLabelPosition, type ProgressProps, type ProgressSize, type PushDialogOptions, RadioGroup, RadioGroupInput, type RadioGroupInputProps, RadioGroupItem, type RenderSlot, RepeatingFields, type RepeatingFieldsProps, ScrollArea, type ScrollAreaProps, SearchField, SearchField as SearchInput, SegmentedControl, type SegmentedControlOption, type SegmentedControlProps, Select, SelectContent, SelectGroup, SelectInput, type SelectInputProps, SelectItem, type SelectItemType$1 as SelectItemDataType, type SelectItemType, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, type SidebarItemProps, type SidebarLogo, type SidebarLogoRender, type SidebarProps, type SidebarWidth, type SidebarWidths, SimpleTooltip, type SimpleTooltipProps, NSkeleton as Skeleton, Slider, SliderInput, type SliderInputProps, type SliderOrientation, type SliderProps, type SliderSize, type SliderVariant, type SmartPastePreview, type SpinnerVariant, StarRatingInput, type StarRatingInputProps, StatusPill, type StatusPillProps, type StatusPillTone, type StepConfig, StepIndicator, type StepMeta, StepsHeader, StepsProgress, type StorageMenuAction, type StorageSortOption, type StorageTarget, Swap, type SwapEffect, SwapIndeterminate, SwapOff, SwapOn, type SwapProps, type SwapSize, type SwapState, Switch, type SwitchColor, SwitchInput, type SwitchInputProps, type SwitchSize, TAB_COLORS, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, type TableHeaderColor, TableRow, type TableState, type TableStore, TableStoreContext, Tabs, TabsContent, TabsList, type TabsListProps, type TabsOrientation, type TabsProps, TabsTrigger, type TabsTriggerProps, type TabsVariant, TextAreaInput, type TextAreaInputProps, TextInput, type TextInputProps, Textarea, TimeInput, type TimeInputProps, TimeZoneInput, type TimeZoneInputProps, Toaster, Toggle, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type UseContextMenuResult, type UseNFormOptions, type UseStorageContextMenuOptions, type UseStorageContextMenuResult, type UserMenuAction, VariantProvider, type WizardClassNames, WizardForm, type WizardFormProps, alertVariants, avatarVariants, badgeColorVariants, badgeVariants, buildDefaultFileColumns, buildPageItems, buttonVariants, cn, composePreset, createDialogStore, createTableStore, defineNajmDesignConfig, defineNajmThemeConfig, detectFormat, dialogVariants, filterResponsiveColumns, formatColor, formatFileBytes, formatFileRelative, getIconColorProps, getNChartColor, getNextEditorTabValue, hiddenBelowClasses, indicatorVariants, inputBorderClasses, normalizeThemeFileName, parseColor, parseNajmDesignConfig, parseNajmThemeConfig, parseThemeFile, resolveHiddenBelowClass, resolvePreset, resolveSlot, resolveVariantAlias, sidebarBorderClasses, sliderVariants, stringifyNajmDesignConfig, stringifyNajmThemeConfig, stringifyThemeFile, surfaceBorderClasses, swapVariants, toPickerHex, toggleVariants, tooltipContentVariants, truncateByCharacters, useClickOutside, useContextMenu, useDebouncedValue, useDelayedLoading, useDialog, useDialogStore, useDynamicPageSize, useFormField, useFormSubmission, useInfiniteScroll, useKeyboard, useLocalStorageState, useNForm, useNPortalScope, useNSidebar, useNajmAppearance, useNajmComponentStyle, useNajmDesign, useNajmDesignEditor, useNajmThemeMode, usePrefix, useSelection, useStepNavigation, useStorageContextMenu, useStoreSync, useTable, useTableKeyboard, useTableStore, useVariant, useVariantPreset };
package/dist/index.mjs CHANGED
@@ -1,11 +1,11 @@
1
- import { useNBranding } from './chunk-IGUQGT3G.mjs';
2
- export { NBrandingProvider, useNBranding } from './chunk-IGUQGT3G.mjs';
3
- import { useResolvedPaginationLabels } from './chunk-7F65QM43.mjs';
4
- export { DEFAULT_PAGINATION_KEY_PREFIX, DEFAULT_TIME_ZONE, NTableDefaultsProvider, NajmPreferencesProvider, NajmUIProvider, buildPaginationLabels, useNTableDefaults, useNajmPreferencesContext, useNajmTheme, useNajmTimeZone } from './chunk-7F65QM43.mjs';
5
- import { resolveRadiusValue, inputBorderClasses, cn, Button, NIcon, NajmScroll, surfaceBorderClasses, useNajmScrollViewport, resolveVariantAlias, buttonVariants, NButton, parseNajmDesignConfig, useTableStore, TableStoreContext, sidebarBorderClasses, NTableJson } from './chunk-4DLRXB2W.mjs';
6
- export { Button, NAJM_COMPONENT_NAMES, NButton, NIcon, NTableJson, NajmScroll, RADIUS_VALUE_MAP, TableStoreContext, buttonVariants, cn, defineNajmDesignConfig, defineNajmThemeConfig, inputBorderClasses, parseNajmDesignConfig, parseNajmThemeConfig, resolveRadiusValue, resolveVariantAlias, sidebarBorderClasses, stringifyNajmDesignConfig, stringifyNajmThemeConfig, surfaceBorderClasses, useTableStore } from './chunk-4DLRXB2W.mjs';
7
- import { useNajmComponentStyle, NajmThemeContainerCtx, useNajmThemeMode, useNajmDesign, composePreset } from './chunk-YBM5CTE6.mjs';
8
- export { NajmDesignProvider, NajmThemeProvider, composePreset, resolvePreset, useNajmAppearance, useNajmComponentStyle, useNajmDesign, useNajmThemeMode } from './chunk-YBM5CTE6.mjs';
1
+ import { useNBranding } from './chunk-5LW62RB6.mjs';
2
+ export { NBrandingProvider, NBrandingStateProvider, normalizeBranding, useNBranding, useNBrandingEditor } from './chunk-5LW62RB6.mjs';
3
+ import { useResolvedPaginationLabels } from './chunk-USZUOJMK.mjs';
4
+ export { DEFAULT_PAGINATION_KEY_PREFIX, DEFAULT_TIME_ZONE, EMPTY_DESIGN, NTableDefaultsProvider, NajmDesignEditorProvider, NajmPreferencesProvider, NajmUIProvider, buildPaginationLabels, useNTableDefaults, useNajmDesignEditor, useNajmPreferencesContext, useNajmTheme, useNajmTimeZone } from './chunk-USZUOJMK.mjs';
5
+ import { resolveRadiusValue, inputBorderClasses, Button, NIcon, NajmScroll, surfaceBorderClasses, useNajmScrollViewport, resolveVariantAlias, buttonVariants, NButton, parseNajmDesignConfig, useTableStore, TableStoreContext, sidebarBorderClasses, NTableJson } from './chunk-6OOBAEH2.mjs';
6
+ export { Button, NAJM_COMPONENT_NAMES, NButton, NIcon, NTableJson, NajmScroll, RADIUS_VALUE_MAP, TableStoreContext, buttonVariants, defineNajmDesignConfig, defineNajmThemeConfig, inputBorderClasses, parseNajmDesignConfig, parseNajmThemeConfig, resolveRadiusValue, resolveVariantAlias, sidebarBorderClasses, stringifyNajmDesignConfig, stringifyNajmThemeConfig, surfaceBorderClasses, useTableStore } from './chunk-6OOBAEH2.mjs';
7
+ import { useNajmComponentStyle, cn, NajmThemeContainerCtx, useNajmThemeMode, useNajmDesign, composePreset } from './chunk-KVZACF4G.mjs';
8
+ export { NajmDesignProvider, NajmThemeProvider, cn, composePreset, resolvePreset, useNajmAppearance, useNajmComponentStyle, useNajmDesign, useNajmThemeMode } from './chunk-KVZACF4G.mjs';
9
9
  import * as React60 from 'react';
10
10
  import React60__default, { createContext, useRef, useMemo, useState, useEffect, useContext, useCallback, useLayoutEffect, isValidElement } from 'react';
11
11
  import * as TabsPrimitive from '@radix-ui/react-tabs';
package/dist/json.mjs CHANGED
@@ -1,6 +1,6 @@
1
- import { cn, Button } from './chunk-4DLRXB2W.mjs';
2
- export { NTableJson } from './chunk-4DLRXB2W.mjs';
3
- import './chunk-YBM5CTE6.mjs';
1
+ import { Button } from './chunk-6OOBAEH2.mjs';
2
+ export { NTableJson } from './chunk-6OOBAEH2.mjs';
3
+ import { cn } from './chunk-KVZACF4G.mjs';
4
4
  import { useMemo, useRef, useCallback } from 'react';
5
5
  import CodeMirror from '@uiw/react-codemirror';
6
6
  import { json } from '@codemirror/lang-json';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "najm-kit",
3
- "version": "2.7.0",
3
+ "version": "2.7.1",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "description": "Reusable React UI component package for Najm framework",
@@ -1,24 +0,0 @@
1
- import { createContext, useContext, useMemo } from 'react';
2
- import { jsx } from 'react/jsx-runtime';
3
-
4
- // src/components/branding/NBrandingContext.tsx
5
- var NBrandingContext = createContext(null);
6
- function useNBranding() {
7
- return useContext(NBrandingContext);
8
- }
9
- function NBrandingProvider({
10
- children,
11
- appName,
12
- logoExpanded,
13
- logoCollapsed,
14
- logoFallback,
15
- logoHref
16
- }) {
17
- const value = useMemo(
18
- () => ({ appName, logoExpanded, logoCollapsed, logoFallback, logoHref }),
19
- [appName, logoExpanded, logoCollapsed, logoFallback, logoHref]
20
- );
21
- return /* @__PURE__ */ jsx(NBrandingContext.Provider, { value, children });
22
- }
23
-
24
- export { NBrandingProvider, useNBranding };