najm-kit 2.7.1 → 2.7.3

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,104 @@
1
+ // src/format/format.ts
2
+ var DEFAULT_PLACEHOLDER = "\u2014";
3
+ var numberFormats = /* @__PURE__ */ new Map();
4
+ var dateFormats = /* @__PURE__ */ new Map();
5
+ function numberFormat(locale, options) {
6
+ const key = `${locale}|${options ? JSON.stringify(options) : ""}`;
7
+ let format = numberFormats.get(key);
8
+ if (!format) {
9
+ format = new Intl.NumberFormat(locale, options);
10
+ numberFormats.set(key, format);
11
+ }
12
+ return format;
13
+ }
14
+ function dateFormat(locale, options) {
15
+ const key = `${locale}|${JSON.stringify(options)}`;
16
+ let format = dateFormats.get(key);
17
+ if (!format) {
18
+ format = new Intl.DateTimeFormat(locale, options);
19
+ dateFormats.set(key, format);
20
+ }
21
+ return format;
22
+ }
23
+ function minorUnitScale(locale, currency) {
24
+ const digits = numberFormat(locale, { style: "currency", currency }).resolvedOptions().maximumFractionDigits ?? 2;
25
+ return 10 ** digits;
26
+ }
27
+ function toDate(value) {
28
+ const date = value instanceof Date ? value : new Date(value);
29
+ return Number.isNaN(date.getTime()) ? null : date;
30
+ }
31
+ function isBlank(value) {
32
+ return value === null || value === void 0 || value === "";
33
+ }
34
+ function formatCurrency(minorUnits, { locale, currency, placeholder = DEFAULT_PLACEHOLDER }) {
35
+ if (!currency) {
36
+ throw new Error(
37
+ "formatCurrency requires a `currency`. Set it on NajmFormatProvider or pass it here."
38
+ );
39
+ }
40
+ if (minorUnits === null || minorUnits === void 0) return placeholder;
41
+ if (!Number.isSafeInteger(minorUnits)) return placeholder;
42
+ return numberFormat(locale, {
43
+ style: "currency",
44
+ currency
45
+ }).format(minorUnits / minorUnitScale(locale, currency));
46
+ }
47
+ function formatNumber(value, { locale, placeholder = DEFAULT_PLACEHOLDER }, options) {
48
+ if (value === null || value === void 0 || !Number.isFinite(value)) {
49
+ return placeholder;
50
+ }
51
+ return numberFormat(locale, options).format(value);
52
+ }
53
+ function formatPercent(value, config, fractionDigits = 0) {
54
+ return formatNumber(value, config, {
55
+ style: "percent",
56
+ minimumFractionDigits: fractionDigits,
57
+ maximumFractionDigits: fractionDigits
58
+ });
59
+ }
60
+ function formatDate(value, {
61
+ locale,
62
+ timeZone,
63
+ placeholder = DEFAULT_PLACEHOLDER
64
+ }, options = { dateStyle: "medium" }) {
65
+ if (isBlank(value)) return placeholder;
66
+ const date = toDate(value);
67
+ if (!date) return placeholder;
68
+ return dateFormat(locale, { ...options, timeZone }).format(date);
69
+ }
70
+ function formatDateTime(value, config, options = {
71
+ dateStyle: "short",
72
+ timeStyle: "short"
73
+ }) {
74
+ return formatDate(value, config, options);
75
+ }
76
+ function formatTime(value, config) {
77
+ return formatDate(value, config, { timeStyle: "short" });
78
+ }
79
+ var RELATIVE_UNITS = [
80
+ ["year", 31536e6],
81
+ ["month", 2592e6],
82
+ ["day", 864e5],
83
+ ["hour", 36e5],
84
+ ["minute", 6e4],
85
+ ["second", 1e3]
86
+ ];
87
+ function formatRelativeTime(value, { locale, placeholder = DEFAULT_PLACEHOLDER }, now = Date.now()) {
88
+ if (isBlank(value)) return placeholder;
89
+ const date = toDate(value);
90
+ if (!date) return placeholder;
91
+ const elapsed = date.getTime() - (now instanceof Date ? now.getTime() : now);
92
+ const format = new Intl.RelativeTimeFormat(locale, { numeric: "auto" });
93
+ for (const [unit, ms] of RELATIVE_UNITS) {
94
+ if (Math.abs(elapsed) >= ms) {
95
+ return format.format(Math.trunc(elapsed / ms), unit);
96
+ }
97
+ }
98
+ return format.format(0, "second");
99
+ }
100
+ function humanizeToken(value) {
101
+ return value.trim().replace(/[_-]+/g, " ").replace(/\s+/g, " ").replace(/\b\w/g, (letter) => letter.toUpperCase());
102
+ }
103
+
104
+ export { DEFAULT_PLACEHOLDER, formatCurrency, formatDate, formatDateTime, formatNumber, formatPercent, formatRelativeTime, formatTime, humanizeToken };
@@ -1,7 +1,9 @@
1
+ import { useNajmPreferencesContext } from './chunk-USZUOJMK.mjs';
2
+ import { humanizeToken, DEFAULT_PLACEHOLDER, formatRelativeTime, formatTime, formatDateTime, formatDate, formatPercent, formatNumber, formatCurrency } from './chunk-GPHWBOSP.mjs';
3
+ import * as React from 'react';
1
4
  import { createContext, useContext, useMemo, useState, useCallback } from 'react';
2
5
  import { jsx } from 'react/jsx-runtime';
3
6
 
4
- // src/components/branding/NBrandingContext.tsx
5
7
  function normalizeBranding(input) {
6
8
  if (!input) return {};
7
9
  const value = {};
@@ -61,5 +63,54 @@ function NBrandingStateProvider({
61
63
  }
62
64
  function noop() {
63
65
  }
66
+ var NajmFormatContext = React.createContext(
67
+ null
68
+ );
69
+ function NajmFormatProvider({
70
+ children,
71
+ locale,
72
+ currency,
73
+ timeZone,
74
+ placeholder = DEFAULT_PLACEHOLDER
75
+ }) {
76
+ const preferences = useNajmPreferencesContext();
77
+ const resolvedTimeZone = timeZone ?? preferences?.timeZone ?? Intl.DateTimeFormat().resolvedOptions().timeZone;
78
+ const value = React.useMemo(() => {
79
+ const config = {
80
+ locale,
81
+ timeZone: resolvedTimeZone,
82
+ currency,
83
+ placeholder
84
+ };
85
+ return {
86
+ locale,
87
+ timeZone: resolvedTimeZone,
88
+ currency,
89
+ placeholder,
90
+ config,
91
+ money: (minorUnits) => formatCurrency(minorUnits, config),
92
+ number: (value_, options) => formatNumber(value_, config, options),
93
+ percent: (value_, digits) => formatPercent(value_, config, digits),
94
+ date: (value_, options) => formatDate(value_, config, options),
95
+ dateTime: (value_) => formatDateTime(value_, config),
96
+ time: (value_) => formatTime(value_, config),
97
+ relativeTime: (value_) => formatRelativeTime(value_, config),
98
+ humanize: humanizeToken
99
+ };
100
+ }, [locale, resolvedTimeZone, currency, placeholder]);
101
+ return /* @__PURE__ */ jsx(NajmFormatContext.Provider, { value, children });
102
+ }
103
+ function useNajmFormatContext() {
104
+ return React.useContext(NajmFormatContext);
105
+ }
106
+ function useNajmFormat() {
107
+ const value = React.useContext(NajmFormatContext);
108
+ if (!value) {
109
+ throw new Error(
110
+ "useNajmFormat must be rendered under a NajmFormatProvider or NajmAppProvider."
111
+ );
112
+ }
113
+ return value;
114
+ }
64
115
 
65
- export { NBrandingProvider, NBrandingStateProvider, normalizeBranding, useNBranding, useNBrandingEditor };
116
+ export { NBrandingProvider, NBrandingStateProvider, NajmFormatProvider, normalizeBranding, useNBranding, useNBrandingEditor, useNajmFormat, useNajmFormatContext };
@@ -0,0 +1,52 @@
1
+ import { useCallback, useSyncExternalStore } from 'react';
2
+
3
+ // src/hooks/useMediaQuery.ts
4
+ function useMediaQuery(query, serverSnapshot = false) {
5
+ const subscribe = useCallback(
6
+ (onStoreChange) => {
7
+ const media = window.matchMedia(query);
8
+ media.addEventListener("change", onStoreChange);
9
+ return () => media.removeEventListener("change", onStoreChange);
10
+ },
11
+ [query]
12
+ );
13
+ return useSyncExternalStore(
14
+ subscribe,
15
+ () => window.matchMedia(query).matches,
16
+ () => serverSnapshot
17
+ );
18
+ }
19
+ var DEFAULT_CARD_BREAKPOINT = 1024;
20
+ function useCardViewport(breakpoint = DEFAULT_CARD_BREAKPOINT) {
21
+ return useMediaQuery(`(max-width: ${breakpoint - 1}px)`);
22
+ }
23
+ function useDesktopTableMode(breakpoint = DEFAULT_CARD_BREAKPOINT) {
24
+ return useMediaQuery(`(min-width: ${breakpoint}px)`) ? "table" : "cards";
25
+ }
26
+
27
+ // src/components/table/cardPagination.ts
28
+ var DEFAULT_CARD_PAGINATION_KEY_PREFIX = "common.pagination";
29
+ function buildCardPaginationLabels(t, prefix = DEFAULT_CARD_PAGINATION_KEY_PREFIX) {
30
+ return {
31
+ loadMoreError: t(`${prefix}.loadMoreError`),
32
+ retryLabel: t(`${prefix}.retryLoadMore`),
33
+ itemsLoaded: (count) => t(`${prefix}.itemsLoaded`, { count })
34
+ };
35
+ }
36
+ function createCardPagination(state, labels = {}) {
37
+ const mode = state.mode ?? (state.cardViewport ? "infinite" : "paged");
38
+ if (mode === "paged") return { mode: "paged" };
39
+ if (mode === "all") return { mode: "all" };
40
+ return {
41
+ mode: "infinite",
42
+ hasNextPage: state.hasNextPage,
43
+ loadingMore: state.loadingMore,
44
+ loadMoreError: state.loadMoreError ? labels.loadMoreError : void 0,
45
+ onLoadMore: state.onLoadMore,
46
+ retryLabel: labels.retryLabel,
47
+ loadMoreErrorLabel: labels.loadMoreError,
48
+ itemsLoadedLabel: labels.itemsLoaded
49
+ };
50
+ }
51
+
52
+ export { DEFAULT_CARD_BREAKPOINT, DEFAULT_CARD_PAGINATION_KEY_PREFIX, buildCardPaginationLabels, createCardPagination, useCardViewport, useDesktopTableMode, useMediaQuery };
@@ -0,0 +1,53 @@
1
+ /**
2
+ * Locale-aware value formatting.
3
+ *
4
+ * Pure functions with no React and no DOM: every input arrives through
5
+ * `NajmFormatConfig`. `NajmFormatProvider` binds them to the live locale and
6
+ * time zone, and is what an application normally uses — these are exported for
7
+ * the server, where there is no context to read.
8
+ */
9
+ /** Rendered in place of a value that is absent or not formattable. */
10
+ declare const DEFAULT_PLACEHOLDER = "\u2014";
11
+ interface NajmFormatConfig {
12
+ /** BCP 47 tag handed to `Intl`, e.g. `"fr-MA"`. */
13
+ locale: string;
14
+ /**
15
+ * IANA zone every date is rendered in. Omitted means the host zone, which is
16
+ * the runtime's guess rather than the user's preference — supply it.
17
+ */
18
+ timeZone?: string;
19
+ /** ISO 4217 code for `formatCurrency`, e.g. `"MAD"`. */
20
+ currency?: string;
21
+ /** Defaults to an em dash. */
22
+ placeholder?: string;
23
+ }
24
+ /**
25
+ * Formats an integer count of minor units — cents, centimes — as currency.
26
+ *
27
+ * Minor units are the input because money that survives a round trip is an
28
+ * integer; a major-unit float cannot represent 0.1 exactly and has no business
29
+ * in a ledger. A non-integer input is refused rather than rounded, since at
30
+ * this layer it means the caller has already lost precision upstream.
31
+ */
32
+ declare function formatCurrency(minorUnits: number | null | undefined, { locale, currency, placeholder }: NajmFormatConfig): string;
33
+ declare function formatNumber(value: number | null | undefined, { locale, placeholder }: NajmFormatConfig, options?: Intl.NumberFormatOptions): string;
34
+ declare function formatPercent(value: number | null | undefined, config: NajmFormatConfig, fractionDigits?: number): string;
35
+ declare function formatDate(value: Date | number | string | null | undefined, { locale, timeZone, placeholder, }: NajmFormatConfig, options?: Intl.DateTimeFormatOptions): string;
36
+ declare function formatDateTime(value: Date | number | string | null | undefined, config: NajmFormatConfig, options?: Intl.DateTimeFormatOptions): string;
37
+ declare function formatTime(value: Date | number | string | null | undefined, config: NajmFormatConfig): string;
38
+ /**
39
+ * Renders a timestamp as distance from now — "3 days ago", "in 2 hours".
40
+ *
41
+ * Time zone is not a parameter: an elapsed duration is the same in every zone.
42
+ */
43
+ declare function formatRelativeTime(value: Date | number | string | null | undefined, { locale, placeholder }: NajmFormatConfig, now?: Date | number): string;
44
+ /**
45
+ * Turns a machine token into readable text: `out_for_delivery` → `Out For
46
+ * Delivery`.
47
+ *
48
+ * The fallback for a value with no catalog entry, not a substitute for one.
49
+ * Anything user-visible and known in advance belongs in the translations.
50
+ */
51
+ declare function humanizeToken(value: string): string;
52
+
53
+ export { DEFAULT_PLACEHOLDER, type NajmFormatConfig, formatCurrency, formatDate, formatDateTime, formatNumber, formatPercent, formatRelativeTime, formatTime, humanizeToken };
@@ -0,0 +1,2 @@
1
+ import './chunk-F5KXJCCJ.mjs';
2
+ export { DEFAULT_PLACEHOLDER, formatCurrency, formatDate, formatDateTime, formatNumber, formatPercent, formatRelativeTime, formatTime, humanizeToken } from './chunk-GPHWBOSP.mjs';
package/dist/index.d.ts CHANGED
@@ -1,8 +1,10 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
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';
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 NajmResponsiveBreakpoint, p as NajmResponsiveValue } from './NajmUIProvider-IFU3dFkn.js';
3
+ export { D as DEFAULT_TIME_ZONE, q as NAJM_COMPONENT_NAMES, r as NTableDefaults, s as NTableDefaultsProvider, t as NajmComponentRadius, u as NajmDensity, v as NajmPreferencesContextValue, w as NajmPreferencesProvider, x as NajmPreferencesProviderProps, y as NajmSlotStyle, z as NajmUIProvider, N as NajmUIProviderProps, R as RADIUS_VALUE_MAP, A as resolveRadiusValue, B as useNTableDefaults, C as useNajmPreferencesContext, E as useNajmTheme, F as useNajmTimeZone } from './NajmUIProvider-IFU3dFkn.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
+ import { c as NTablePaginationVariant, b as NTablePaginationLabels, a as NTableCardPagination } from './paginationLabels-DgHutNWz.js';
7
+ export { D as DEFAULT_PAGINATION_KEY_PREFIX, d as NTableInfinitePagination, e as NTableLoadMorePagination, N as NajmTranslate, f as buildPaginationLabels } from './paginationLabels-DgHutNWz.js';
6
8
  import * as class_variance_authority_types from 'class-variance-authority/types';
7
9
  import { VariantProps } from 'class-variance-authority';
8
10
  import * as LabelPrimitive from '@radix-ui/react-label';
@@ -37,7 +39,11 @@ import { ZodTypeAny, TypeOf } from 'zod';
37
39
  import { SortingState, ExpandedState, ColumnDef, Row, ColumnFiltersState, VisibilityState, RowSelectionState } from '@tanstack/react-table';
38
40
  export { N as NTableJson } from './NTableJson-tXqgfZI1.js';
39
41
  import * as _tanstack_table_core from '@tanstack/table-core';
42
+ export { C as CardPaginationLabels, a as CardPaginationState, D as DEFAULT_CARD_PAGINATION_KEY_PREFIX, L as ListStrategy, R as ResolvedListMode, b as buildCardPaginationLabels, c as createCardPagination } from './cardPagination-A6h8vXuk.js';
40
43
  import { ClassValue } from 'clsx';
44
+ export { ApiPage, DEFAULT_MAX_PAGE_SIZE, DEFAULT_PAGE_SIZE, OffsetPage, OffsetPageFetcher, OffsetPageOptions, OffsetPagination, QueryValue, cleanQuery, createOffsetPagination, fetchOffsetPage, getPageIndex } from './pagination.js';
45
+ import { NajmFormatConfig } from './format.js';
46
+ export { DEFAULT_PLACEHOLDER, formatCurrency, formatDate, formatDateTime, formatNumber, formatPercent, formatRelativeTime, formatTime, humanizeToken } from './format.js';
41
47
 
42
48
  /**
43
49
  * Shared so the identity is stable across renders — `NajmDesignProvider`
@@ -386,6 +392,31 @@ declare function useSelection(visibleIds: string[]): {
386
392
  someVisibleSelected: boolean;
387
393
  };
388
394
 
395
+ /**
396
+ * A media query read during render rather than after it.
397
+ *
398
+ * `matchMedia` answers synchronously, so the answer belongs in the render that
399
+ * asks for it. Holding it in state and filling it from an effect makes every
400
+ * mount paint one frame of the wrong viewport: on a desktop table page that
401
+ * frame renders the card skeleton, which is then torn down for the table
402
+ * skeleton, so a single load appears to load twice.
403
+ *
404
+ * `useSyncExternalStore` still uses `serverSnapshot` for SSR and for the
405
+ * hydration render — nothing can be measured before the document exists — but
406
+ * every render after that, including every client-side navigation, reads the
407
+ * live value on its first pass.
408
+ */
409
+ declare function useMediaQuery(query: string, serverSnapshot?: boolean): boolean;
410
+ /**
411
+ * The viewport width below which a table renders as cards. Matches the `lg`
412
+ * breakpoint, which is where a row of table columns stops fitting.
413
+ */
414
+ declare const DEFAULT_CARD_BREAKPOINT = 1024;
415
+ /** Whether the viewport is narrow enough that a table should render as cards. */
416
+ declare function useCardViewport(breakpoint?: number): boolean;
417
+ /** The same decision as `useCardViewport`, as the mode name NTable takes. */
418
+ declare function useDesktopTableMode(breakpoint?: number): "table" | "cards";
419
+
389
420
  type NIconSource = React__default.ReactElement | React__default.ComponentType<any> | React__default.ExoticComponent<any> | string | {
390
421
  src: string;
391
422
  alt?: string;
@@ -3700,6 +3731,65 @@ declare function cn(...inputs: ClassValue[]): string;
3700
3731
 
3701
3732
  declare function resolveSlot<T>(slot: T | ((ctx: any) => ReactNode), ctx?: any): ReactNode;
3702
3733
 
3734
+ interface NajmFormatContextValue extends Required<Pick<NajmFormatConfig, "locale" | "timeZone" | "placeholder">> {
3735
+ currency?: string;
3736
+ /** Formats an integer count of minor units as `currency`. */
3737
+ money: (minorUnits: number | null | undefined) => string;
3738
+ number: (value: number | null | undefined, options?: Intl.NumberFormatOptions) => string;
3739
+ percent: (value: number | null | undefined, fractionDigits?: number) => string;
3740
+ date: (value: Date | number | string | null | undefined, options?: Intl.DateTimeFormatOptions) => string;
3741
+ dateTime: (value: Date | number | string | null | undefined) => string;
3742
+ time: (value: Date | number | string | null | undefined) => string;
3743
+ relativeTime: (value: Date | number | string | null | undefined) => string;
3744
+ humanize: (value: string) => string;
3745
+ /** The resolved inputs, for handing to the pure functions directly. */
3746
+ config: NajmFormatConfig;
3747
+ }
3748
+ interface NajmFormatProviderProps {
3749
+ children: React$1.ReactNode;
3750
+ /**
3751
+ * BCP 47 tag. `NajmAppProvider` derives this from the active `najm-i18n`
3752
+ * language, so applications using it rarely pass this by hand.
3753
+ */
3754
+ locale: string;
3755
+ /**
3756
+ * ISO 4217 code for `money`. Omitted means the application does not format
3757
+ * currency; calling `money` without it throws rather than guessing a symbol.
3758
+ */
3759
+ currency?: string;
3760
+ /**
3761
+ * Overrides the time zone from `NajmPreferencesProvider`.
3762
+ *
3763
+ * Reading preferences is the point — it is where the user's choice already
3764
+ * lives, and formatting dates against anything else is how a table ends up
3765
+ * disagreeing with the picker that set it.
3766
+ */
3767
+ timeZone?: string;
3768
+ /** Rendered for absent values. Defaults to an em dash. */
3769
+ placeholder?: string;
3770
+ }
3771
+ /**
3772
+ * Binds the formatters to the live locale and time zone.
3773
+ *
3774
+ * The time zone comes from `NajmPreferencesProvider` when one is mounted, which
3775
+ * is what makes this worth a provider rather than a helper import: the
3776
+ * preference and the rendering of every date derived from it stay in one place,
3777
+ * and a zone change re-renders the consumers instead of leaving stale text.
3778
+ */
3779
+ declare function NajmFormatProvider({ children, locale, currency, timeZone, placeholder, }: NajmFormatProviderProps): react_jsx_runtime.JSX.Element;
3780
+ /** Returns the context when one is mounted, or `null`. */
3781
+ declare function useNajmFormatContext(): NajmFormatContextValue | null;
3782
+ /**
3783
+ * The bound formatters.
3784
+ *
3785
+ * ```tsx
3786
+ * const fmt = useNajmFormat();
3787
+ * fmt.money(order.totalMinor); // "1 250,00 MAD"
3788
+ * fmt.date(order.createdAt); // "8 août 2026"
3789
+ * ```
3790
+ */
3791
+ declare function useNajmFormat(): NajmFormatContextValue;
3792
+
3703
3793
  interface JsonViewColors {
3704
3794
  background: string;
3705
3795
  phrase: string;
@@ -4122,4 +4212,4 @@ interface NGridItemProps extends Omit<React$1.AllHTMLAttributes<HTMLDivElement>,
4122
4212
  declare function NGrid({ as: Comp, children, cols, smCols, mdCols, lgCols, xlCols, gap, className, style, ...props }: NGridProps): react_jsx_runtime.JSX.Element;
4123
4213
  declare function NGridItem({ children, span, smSpan, mdSpan, lgSpan, xlSpan, className, ...props }: NGridItemProps): react_jsx_runtime.JSX.Element;
4124
4214
 
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 };
4215
+ 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_CARD_BREAKPOINT, 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, NajmFormatConfig, type NajmFormatContextValue, NajmFormatProvider, type NajmFormatProviderProps, 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, useCardViewport, useClickOutside, useContextMenu, useDebouncedValue, useDelayedLoading, useDesktopTableMode, useDialog, useDialogStore, useDynamicPageSize, useFormField, useFormSubmission, useInfiniteScroll, useKeyboard, useLocalStorageState, useMediaQuery, useNForm, useNPortalScope, useNSidebar, useNajmAppearance, useNajmComponentStyle, useNajmDesign, useNajmDesignEditor, useNajmFormat, useNajmFormatContext, useNajmThemeMode, usePrefix, useSelection, useStepNavigation, useStorageContextMenu, useStoreSync, useTable, useTableKeyboard, useTableStore, useVariant, useVariantPreset };
package/dist/index.mjs CHANGED
@@ -1,11 +1,15 @@
1
- import { useNBranding } from './chunk-5LW62RB6.mjs';
2
- export { NBrandingProvider, NBrandingStateProvider, normalizeBranding, useNBranding, useNBrandingEditor } from './chunk-5LW62RB6.mjs';
1
+ import { useNBranding } from './chunk-VKQIRB7F.mjs';
2
+ export { NBrandingProvider, NBrandingStateProvider, NajmFormatProvider, normalizeBranding, useNBranding, useNBrandingEditor, useNajmFormat, useNajmFormatContext } from './chunk-VKQIRB7F.mjs';
3
3
  import { useResolvedPaginationLabels } from './chunk-USZUOJMK.mjs';
4
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
5
  import { resolveRadiusValue, inputBorderClasses, Button, NIcon, NajmScroll, surfaceBorderClasses, useNajmScrollViewport, resolveVariantAlias, buttonVariants, NButton, parseNajmDesignConfig, useTableStore, TableStoreContext, sidebarBorderClasses, NTableJson } from './chunk-6OOBAEH2.mjs';
6
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
7
  import { useNajmComponentStyle, cn, NajmThemeContainerCtx, useNajmThemeMode, useNajmDesign, composePreset } from './chunk-KVZACF4G.mjs';
8
8
  export { NajmDesignProvider, NajmThemeProvider, cn, composePreset, resolvePreset, useNajmAppearance, useNajmComponentStyle, useNajmDesign, useNajmThemeMode } from './chunk-KVZACF4G.mjs';
9
+ export { DEFAULT_CARD_BREAKPOINT, DEFAULT_CARD_PAGINATION_KEY_PREFIX, buildCardPaginationLabels, createCardPagination, useCardViewport, useDesktopTableMode, useMediaQuery } from './chunk-XGDMPI5U.mjs';
10
+ import './chunk-F5KXJCCJ.mjs';
11
+ export { DEFAULT_PLACEHOLDER, formatCurrency, formatDate, formatDateTime, formatNumber, formatPercent, formatRelativeTime, formatTime, humanizeToken } from './chunk-GPHWBOSP.mjs';
12
+ export { DEFAULT_MAX_PAGE_SIZE, DEFAULT_PAGE_SIZE, cleanQuery, createOffsetPagination, fetchOffsetPage, getPageIndex } from './chunk-2NX2VKS2.mjs';
9
13
  import * as React60 from 'react';
10
14
  import React60__default, { createContext, useRef, useMemo, useState, useEffect, useContext, useCallback, useLayoutEffect, isValidElement } from 'react';
11
15
  import * as TabsPrimitive from '@radix-ui/react-tabs';
@@ -0,0 +1,78 @@
1
+ /**
2
+ * The offset-pagination protocol behind `NTable`'s page controls.
3
+ *
4
+ * The kit already owns the consuming half — `useDynamicPageSize` measures how
5
+ * many rows fit, `buildPageItems` renders the bar. This is the fetching half:
6
+ * how one page is requested, and how "is there another one" is answered when
7
+ * the endpoint does not say.
8
+ *
9
+ * Pure, framework-agnostic, and usable on the server. Nothing here knows about
10
+ * react-query.
11
+ */
12
+ /** A page response from an endpoint that reports a result total. */
13
+ interface ApiPage<T> {
14
+ rows: T[];
15
+ /** Rows matching the query on the server, or `null` if the endpoint is silent. */
16
+ total: number | null;
17
+ }
18
+ interface OffsetPagination {
19
+ limit: number;
20
+ offset: number;
21
+ }
22
+ interface OffsetPage<T> {
23
+ rows: T[];
24
+ hasNextPage: boolean;
25
+ nextOffset: number;
26
+ /** How many rows match in total, or `null` if the endpoint does not say. */
27
+ total: number | null;
28
+ }
29
+ /**
30
+ * Fetches one window.
31
+ *
32
+ * The bare-array return is not a legacy concession to delete later: plenty of
33
+ * endpoints have no cheap way to count, and `COUNT(*)` over a filtered join is
34
+ * exactly the query worth avoiding. Both shapes are first-class.
35
+ */
36
+ type OffsetPageFetcher<T> = (pagination: OffsetPagination) => Promise<ApiPage<T> | T[]>;
37
+ declare const DEFAULT_PAGE_SIZE = 25;
38
+ /**
39
+ * The largest `limit` a server will honour. Requests are clamped to it, and it
40
+ * is the ceiling the probe row cannot exceed — see `fetchOffsetPage`.
41
+ */
42
+ declare const DEFAULT_MAX_PAGE_SIZE = 100;
43
+ interface OffsetPageOptions {
44
+ /** Defaults to `DEFAULT_MAX_PAGE_SIZE`. Match your server's clamp. */
45
+ maxLimit?: number;
46
+ }
47
+ declare function createOffsetPagination(pageIndex?: number, pageSize?: number, { maxLimit }?: OffsetPageOptions): OffsetPagination;
48
+ declare function getPageIndex({ limit, offset }: OffsetPagination): number;
49
+ /**
50
+ * Fetches one page and answers whether another follows.
51
+ *
52
+ * Two strategies, chosen by what the endpoint returns:
53
+ *
54
+ * - **With a total**, continuation is arithmetic — no extra rows, no extra
55
+ * request.
56
+ * - **Without one**, the request carries a *probe row*: it asks for `limit + 1`
57
+ * and reports a next page when that extra row comes back. The probe is
58
+ * discarded before returning, so callers always receive at most `limit` rows.
59
+ *
60
+ * Whether an endpoint reports a total is only knowable from its response, so
61
+ * the probe row rides along on the first request either way. The one case the
62
+ * probe cannot cover is a request already at `maxLimit`, where there is no room
63
+ * to ask for one more; continuation then costs a second single-row lookahead.
64
+ * That is the case a result total exists to avoid, and why the endpoints
65
+ * backing numbered pages should report one.
66
+ */
67
+ declare function fetchOffsetPage<T>(fetchPage: OffsetPageFetcher<T>, pagination: OffsetPagination, { maxLimit }?: OffsetPageOptions): Promise<OffsetPage<T>>;
68
+ type QueryValue = string | number | boolean | null | undefined;
69
+ /**
70
+ * Drops empty entries from a query object, so an untouched filter contributes
71
+ * no parameter at all rather than `?status=`.
72
+ *
73
+ * `false` and `0` are kept — both are meaningful filter values, and dropping
74
+ * them is the bug this exists to prevent.
75
+ */
76
+ declare function cleanQuery(query: Record<string, QueryValue>): Record<string, QueryValue>;
77
+
78
+ export { type ApiPage, DEFAULT_MAX_PAGE_SIZE, DEFAULT_PAGE_SIZE, type OffsetPage, type OffsetPageFetcher, type OffsetPageOptions, type OffsetPagination, type QueryValue, cleanQuery, createOffsetPagination, fetchOffsetPage, getPageIndex };
@@ -0,0 +1 @@
1
+ export { DEFAULT_MAX_PAGE_SIZE, DEFAULT_PAGE_SIZE, cleanQuery, createOffsetPagination, fetchOffsetPage, getPageIndex } from './chunk-2NX2VKS2.mjs';