impact-nova 2.5.12 → 2.5.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/dist/components/data/expandable-list-item/expandable-list-item-attributes.js +3 -2
  2. package/dist/components/data/expandable-list-item/expandable-list-item-metrics.js +3 -2
  3. package/dist/components/data-display/calendar/calendar-week-utils.d.ts +2 -1
  4. package/dist/components/data-display/calendar/use-calendar-state.js +159 -157
  5. package/dist/components/feedback/tooltip/tab-tooltip-render.js +3 -2
  6. package/dist/components/flows/command-palette/shortcut-settings.js +10 -10
  7. package/dist/components/flows/filter-panel/filter-panel.js +4 -4
  8. package/dist/components/forms/date-picker/week-picker.js +81 -79
  9. package/dist/components/forms/date-picker/week-range-picker.js +89 -87
  10. package/dist/components/forms/select/components/SelectTriggerValue.js +3 -2
  11. package/dist/components/forms/select/components/Submenu.js +3 -2
  12. package/dist/form-react/Fields/MultiYearPickerField.d.ts +8 -0
  13. package/dist/form-react/Fields/MultiYearPickerField.js +57 -0
  14. package/dist/form-react/Fields/YearPickerField.d.ts +8 -0
  15. package/dist/form-react/Fields/YearPickerField.js +57 -0
  16. package/dist/form-react/Fields/YearRangePickerField.d.ts +8 -0
  17. package/dist/form-react/Fields/YearRangePickerField.js +57 -0
  18. package/dist/form-react/registry/defaultFieldRegistrations.d.ts +1 -1
  19. package/dist/form-react/registry/defaultFieldRegistrations.js +16 -13
  20. package/dist/form-react/types/fields.types.d.ts +55 -1
  21. package/dist/form-react/types/fieldsOutput.types.d.ts +8 -2
  22. package/dist/form-react/utils/fieldDefaults.utils.js +1 -1
  23. package/dist/lib/fiscal-calendar/index.d.ts +2 -2
  24. package/dist/lib/fiscal-calendar/index.js +26 -28
  25. package/dist/lib/fiscal-calendar/types.d.ts +0 -7
  26. package/dist/lib/fiscal-calendar/week-selection.d.ts +3 -4
  27. package/dist/lib/fiscal-calendar/week-selection.js +51 -78
  28. package/dist/llms/rules/installation.js +1 -1
  29. package/dist/llms/rules/requirements.js +1 -1
  30. package/package.json +1 -1
@@ -0,0 +1,57 @@
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { Controller as p } from "react-hook-form";
3
+ import { YearRangePicker as g } from "../../components/forms/date-picker/year-range-picker.js";
4
+ import { getFieldTestId as f } from "../utils/fieldTestIds.js";
5
+ import { toLocalDate as t } from "../utils/calendar-boundary.js";
6
+ const C = ({
7
+ field: r,
8
+ validationRules: d,
9
+ isDisabled: h,
10
+ formHelpers: a
11
+ }) => {
12
+ const e = r.fieldType === "year_range" ? r : null;
13
+ if (!e) return null;
14
+ const c = a.form.control, u = e.defaultRange ? { from: { year: e.defaultRange.start }, to: { year: e.defaultRange.end } } : void 0;
15
+ return /* @__PURE__ */ o(
16
+ p,
17
+ {
18
+ name: r.id,
19
+ control: c,
20
+ defaultValue: u,
21
+ rules: d,
22
+ render: ({ field: n, fieldState: l }) => {
23
+ const s = !!l.error, m = n.value;
24
+ return /* @__PURE__ */ o("div", { "data-testid": f(r.id), children: /* @__PURE__ */ o(
25
+ g,
26
+ {
27
+ label: r.label,
28
+ value: m ?? void 0,
29
+ onChange: (i) => {
30
+ n.onChange(i ?? null), a.setValue(r.id, i ?? null);
31
+ },
32
+ placeholder: r.placeholder,
33
+ minDate: t(e.minDate),
34
+ maxDate: t(e.maxDate),
35
+ startMonth: t(e.startMonth),
36
+ endMonth: t(e.endMonth),
37
+ required: r.isRequired,
38
+ disabled: h,
39
+ error: s,
40
+ helperText: s ? l.error?.message : r.helpText,
41
+ showFooter: e.showFooter,
42
+ showIntervalCaption: e.showIntervalCaption,
43
+ calendarKind: e.calendarKind,
44
+ fiscalMode: e.fiscalMode,
45
+ fiscalYearStartMonth: e.fiscalYearStartMonth,
46
+ fiscalMonthPattern: e.fiscalMonthPattern,
47
+ showPresets: e.showPresets,
48
+ ...e.componentProps
49
+ }
50
+ ) });
51
+ }
52
+ }
53
+ );
54
+ };
55
+ export {
56
+ C as YearRangePickerField
57
+ };
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Register all 23 built-in field types. Safe to call multiple times — runs once.
2
+ * Register all 26 built-in field types. Safe to call multiple times — runs once.
3
3
  *
4
4
  * Consumers must call this at app startup (or use `registerFieldType` selectively)
5
5
  * before rendering any `FieldRenderer` / `ReactHooksForm`.
@@ -2,8 +2,8 @@ import { registerFieldType as e } from "./fieldRegistry.js";
2
2
  import { SelectField as r } from "../Fields/SelectField.js";
3
3
  import { ButtonsGroupField as o } from "../Fields/ButtonsGroupField.js";
4
4
  import { RadioField as t } from "../Fields/RadioField.js";
5
- import { TextField as l } from "../Fields/TextField.js";
6
- import { TextAreaField as m } from "../Fields/TextAreaField.js";
5
+ import { TextField as m } from "../Fields/TextField.js";
6
+ import { TextAreaField as l } from "../Fields/TextAreaField.js";
7
7
  import { DateRangeField as d } from "../Fields/DateRangeField.js";
8
8
  import { DateInputField as p } from "../Fields/DateInputField.js";
9
9
  import { WeekRangeField as a } from "../Fields/WeekRangePicker.js";
@@ -13,19 +13,22 @@ import { MultiMonthPickerField as _ } from "../Fields/MultiMonthPickerField.js";
13
13
  import { FileUploadField as n } from "../Fields/FileUploadField.js";
14
14
  import { FillFormByPasteField as c } from "../Fields/FillFormByPasteField.js";
15
15
  import { FillFormByFileUploadField as u } from "../Fields/FillFormByFileUploadField.js";
16
- import { ChipsField as b } from "../Fields/ChipsField.js";
17
- import { TextFieldWithBackendValidation as h } from "../Fields/TextFieldWithBackendValidation.js";
18
- import { SwitchField as s } from "../Fields/SwitchField.js";
19
- import { CheckboxField as g } from "../Fields/CheckboxField.js";
20
- import { LabelField as k } from "../Fields/LabelField.js";
16
+ import { ChipsField as k } from "../Fields/ChipsField.js";
17
+ import { TextFieldWithBackendValidation as b } from "../Fields/TextFieldWithBackendValidation.js";
18
+ import { SwitchField as g } from "../Fields/SwitchField.js";
19
+ import { CheckboxField as h } from "../Fields/CheckboxField.js";
20
+ import { LabelField as s } from "../Fields/LabelField.js";
21
21
  import { DividerField as x } from "../Fields/DividerField.js";
22
- import { DividerWithLabelField as w } from "../Fields/DividerWithLabelField.js";
23
- import { NumericComboboxField as y } from "../Fields/NumericComboboxField.js";
24
- import { SliderRangeField as v } from "../Fields/SliderRangeField.js";
22
+ import { DividerWithLabelField as y } from "../Fields/DividerWithLabelField.js";
23
+ import { NumericComboboxField as w } from "../Fields/NumericComboboxField.js";
24
+ import { SliderRangeField as P } from "../Fields/SliderRangeField.js";
25
+ import { YearPickerField as R } from "../Fields/YearPickerField.js";
26
+ import { MultiYearPickerField as v } from "../Fields/MultiYearPickerField.js";
27
+ import { YearRangePickerField as D } from "../Fields/YearRangePickerField.js";
25
28
  let i = !1;
26
- function Q() {
27
- i || (i = !0, e("divider", x), e("divider_with_label", w), e("label", k), e("select", r), e("button_group", o), e("radio", t), e("text", l), e("numeric_combobox", y), e("text_area", m), e("date", p), e("date_range", d), e("week_range", a), e("multi_week_picker", F), e("month_range", f), e("multi_month_picker", _), e("file_upload", n), e("fill_form_by_paste", c), e("fill_form_by_file_upload", u), e("chips", b), e("text_with_backend_validation", h), e("switch", s), e("checkbox", g), e("slider_range", v));
29
+ function ie() {
30
+ i || (i = !0, e("divider", x), e("divider_with_label", y), e("label", s), e("select", r), e("button_group", o), e("radio", t), e("text", m), e("numeric_combobox", w), e("text_area", l), e("date", p), e("date_range", d), e("week_range", a), e("multi_week_picker", F), e("month_range", f), e("multi_month_picker", _), e("file_upload", n), e("fill_form_by_paste", c), e("fill_form_by_file_upload", u), e("chips", k), e("text_with_backend_validation", b), e("switch", g), e("checkbox", h), e("slider_range", P), e("year_picker", R), e("multi_year_picker", v), e("year_range", D));
28
31
  }
29
32
  export {
30
- Q as registerDefaultFieldTypes
33
+ ie as registerDefaultFieldTypes
31
34
  };
@@ -284,6 +284,60 @@ export type MultiMonthPickerField = BaseField & {
284
284
  /** When true, open on the first enabled month. Navigate only. */
285
285
  autoNavigateToAvailable?: boolean;
286
286
  };
287
+ export type YearPickerField = BaseField & {
288
+ fieldType: "year_picker";
289
+ defaultValue?: number;
290
+ minDate?: string;
291
+ maxDate?: string;
292
+ startMonth?: string;
293
+ endMonth?: string;
294
+ showFooter?: boolean;
295
+ showIntervalCaption?: boolean;
296
+ calendarKind?: "gregorian" | "fiscal";
297
+ fiscalMode?: "basic" | "advanced" | "custom";
298
+ fiscalYearStartMonth?: number;
299
+ fiscalMonthPattern?: number[];
300
+ showPresets?: boolean;
301
+ /** Additional props forwarded directly to the underlying YearPicker component */
302
+ componentProps?: Record<string, unknown>;
303
+ };
304
+ export type MultiYearPickerField = BaseField & {
305
+ fieldType: "multi_year_picker";
306
+ defaultValue?: number[];
307
+ minDate?: string;
308
+ maxDate?: string;
309
+ startMonth?: string;
310
+ endMonth?: string;
311
+ showFooter?: boolean;
312
+ showIntervalCaption?: boolean;
313
+ calendarKind?: "gregorian" | "fiscal";
314
+ fiscalMode?: "basic" | "advanced" | "custom";
315
+ fiscalYearStartMonth?: number;
316
+ fiscalMonthPattern?: number[];
317
+ showPresets?: boolean;
318
+ /** Additional props forwarded directly to the underlying MultiYearPicker component */
319
+ componentProps?: Record<string, unknown>;
320
+ };
321
+ export type YearRangePickerField = BaseField & {
322
+ fieldType: "year_range";
323
+ defaultRange?: {
324
+ start: number;
325
+ end: number;
326
+ };
327
+ minDate?: string;
328
+ maxDate?: string;
329
+ startMonth?: string;
330
+ endMonth?: string;
331
+ showFooter?: boolean;
332
+ showIntervalCaption?: boolean;
333
+ calendarKind?: "gregorian" | "fiscal";
334
+ fiscalMode?: "basic" | "advanced" | "custom";
335
+ fiscalYearStartMonth?: number;
336
+ fiscalMonthPattern?: number[];
337
+ showPresets?: boolean;
338
+ /** Additional props forwarded directly to the underlying YearRangePicker component */
339
+ componentProps?: Record<string, unknown>;
340
+ };
287
341
  export type TextAreaField = BaseField & {
288
342
  fieldType: "text_area";
289
343
  maxRows?: number;
@@ -453,6 +507,6 @@ export type RichTextField = BaseField & {
453
507
  /** Minimum editor height in px. Default: 150 */
454
508
  minHeight?: number;
455
509
  };
456
- export type IField = FileUploadField | ButtonsGroupField | SelectField | DateInputField | DateRangeField | WeekRangeField | MonthRangeField | MultiMonthPickerField | TextAreaField | RadioField | TextField | NumericComboboxField | CopyPasteField | FillFormByFileUploadField | TextFieldWithBackendValidation | ChipsField | DividerField | DividerWithLabelField | LabelField | SwitchField | CheckboxField | MultiWeekRangeField | SliderRangeField | RichTextField | ObjectFieldConfig | ArrayFieldConfig;
510
+ export type IField = FileUploadField | ButtonsGroupField | SelectField | DateInputField | DateRangeField | WeekRangeField | MonthRangeField | MultiMonthPickerField | TextAreaField | RadioField | TextField | NumericComboboxField | CopyPasteField | FillFormByFileUploadField | TextFieldWithBackendValidation | ChipsField | DividerField | DividerWithLabelField | LabelField | SwitchField | CheckboxField | YearPickerField | MultiYearPickerField | YearRangePickerField | MultiWeekRangeField | SliderRangeField | RichTextField | ObjectFieldConfig | ArrayFieldConfig;
457
511
  /** Discriminant string union for every built-in field type */
458
512
  export type FieldType = IField["fieldType"];
@@ -1,5 +1,5 @@
1
1
  import { Option } from '../../components/forms/select';
2
- import { MonthSelection, WeekSelection } from '../../components/data-display/calendar';
2
+ import { MonthSelection, WeekSelection, YearRange, YearSelection } from '../../components/data-display/calendar';
3
3
  /** Shared range shape for date_range / week_range / month_range */
4
4
  export type RangeFieldOutput = {
5
5
  start: string | null;
@@ -26,6 +26,9 @@ export type ChipsFieldOutput = string | string[] | null | undefined;
26
26
  export type SwitchFieldOutput = boolean | null | undefined;
27
27
  export type CheckboxFieldOutput = boolean | null | undefined;
28
28
  export type SliderRangeFieldOutput = number[] | null | undefined;
29
+ export type YearPickerFieldOutput = YearSelection | null | undefined;
30
+ export type MultiYearPickerFieldOutput = YearSelection[] | null | undefined;
31
+ export type YearRangePickerFieldOutput = YearRange | null | undefined;
29
32
  export type RichTextFieldOutput = string | null | undefined;
30
33
  /** Presentational fields do not store a value */
31
34
  export type PresentationalFieldOutput = null | undefined;
@@ -33,7 +36,7 @@ export type PresentationalFieldOutput = null | undefined;
33
36
  * Union of all field output values (recursive for object / array nesting).
34
37
  * Defined independently of FieldTypeToOutputMap to avoid circular map lookups.
35
38
  */
36
- export type FieldOutputValue = FileUploadFieldOutput | ButtonsGroupFieldOutput | SelectFieldOutput | DateInputFieldOutput | DateRangeFieldOutput | WeekRangeFieldOutput | MultiWeekPickerFieldOutput | MonthRangeFieldOutput | MultiMonthPickerFieldOutput | TextAreaFieldOutput | RadioFieldOutput | TextFieldOutput | NumericComboboxFieldOutput | CopyPasteFieldOutput | FillFormByFileUploadFieldOutput | TextFieldWithBackendValidationOutput | ChipsFieldOutput | SwitchFieldOutput | CheckboxFieldOutput | SliderRangeFieldOutput | RichTextFieldOutput | PresentationalFieldOutput | {
39
+ export type FieldOutputValue = FileUploadFieldOutput | ButtonsGroupFieldOutput | SelectFieldOutput | DateInputFieldOutput | DateRangeFieldOutput | WeekRangeFieldOutput | MultiWeekPickerFieldOutput | MonthRangeFieldOutput | MultiMonthPickerFieldOutput | TextAreaFieldOutput | RadioFieldOutput | TextFieldOutput | NumericComboboxFieldOutput | CopyPasteFieldOutput | FillFormByFileUploadFieldOutput | TextFieldWithBackendValidationOutput | ChipsFieldOutput | SwitchFieldOutput | CheckboxFieldOutput | SliderRangeFieldOutput | YearPickerFieldOutput | MultiYearPickerFieldOutput | YearRangePickerFieldOutput | RichTextFieldOutput | PresentationalFieldOutput | {
37
40
  [key: string]: FieldOutputValue;
38
41
  } | Array<{
39
42
  [key: string]: FieldOutputValue;
@@ -62,6 +65,9 @@ export type FieldTypeToOutputMap = {
62
65
  switch: SwitchFieldOutput;
63
66
  checkbox: CheckboxFieldOutput;
64
67
  slider_range: SliderRangeFieldOutput;
68
+ year_picker: YearPickerFieldOutput;
69
+ multi_year_picker: MultiYearPickerFieldOutput;
70
+ year_range: YearRangePickerFieldOutput;
65
71
  rich_text: RichTextFieldOutput;
66
72
  object: {
67
73
  [key: string]: FieldOutputValue;
@@ -30,7 +30,7 @@ function u(e) {
30
30
  const t = e.min ?? 0;
31
31
  return e.range ? [t, e.max ?? 100] : [t];
32
32
  }
33
- return e.fieldType === "date" ? "" : e.fieldType === "select" ? [] : e.fieldType === "week_range" && e.defaultRange ? {
33
+ return e.fieldType === "year_picker" ? e.defaultValue != null ? { year: e.defaultValue } : null : e.fieldType === "multi_year_picker" ? e.defaultValue?.map((t) => ({ year: t })) ?? null : e.fieldType === "year_range" && e.defaultRange ? { from: { year: e.defaultRange.start }, to: { year: e.defaultRange.end } } : e.fieldType === "date" ? "" : e.fieldType === "select" ? [] : e.fieldType === "week_range" && e.defaultRange ? {
34
34
  start: e.defaultRange.start || null,
35
35
  end: e.defaultRange.end || null
36
36
  } : null;
@@ -1,4 +1,4 @@
1
- export type { CalendarInterval, CalendarKind, CalendarSelection, CalendarSelectionMode, CivilDate, DateCellMeta, FiscalCalendarConfig, FiscalMode, FiscalMonth, FiscalMonthPattern, FiscalPeriod, FiscalQuarter, FiscalWeek, FiscalYearModel, FyLabelStyle, Granularity, LeapWeekPolicy, RetailPatternId, WeekSelection, Weekday, } from './types';
1
+ export type { CalendarInterval, CalendarKind, CalendarSelection, CalendarSelectionMode, CivilDate, DateCellMeta, FiscalCalendarConfig, FiscalMode, FiscalMonthPattern, FiscalPeriod, FiscalQuarter, FiscalWeek, FiscalYearModel, FyLabelStyle, Granularity, LeapWeekPolicy, RetailPatternId, WeekSelection, Weekday, } from './types';
2
2
  export { DEFAULT_FY_LABEL, DEFAULT_LEAP_WEEK_POLICY, FISCAL_PATTERNS, } from './types';
3
3
  export { addDays, civilFromLocalDate, compareCivil, diffDays, formatCivilRange, lastDayOfMonth, localDateFromCivil, parseCivilDate, toCivilDate, weekStart, weekday, } from './civil-date';
4
4
  export { buildFiscalYear, clearFiscalYearCache, formatFyLabel, resolvePattern, shiftedFyForDate, } from './build-year';
@@ -6,5 +6,5 @@ export { getCellMeta, getFiscalYearForDate, clearFiscalLookupCache } from './loo
6
6
  export { getFiscalPresets } from './presets';
7
7
  export type { FiscalPreset } from './presets';
8
8
  export { isSameInterval, nextIntervalSelection } from './selection';
9
- export { buildFiscalMonthCalendar, getCalendarWeekSelection, getFiscalMonthSelection, getFiscalWeekSelection, resolveWeekSelection, toFiscalCalendarConfig, } from './week-selection';
9
+ export { getCalendarWeekSelection, getFiscalWeekSelection, resolveWeekSelection, toFiscalCalendarConfig, } from './week-selection';
10
10
  export type { ResolveWeekSelectionOptions } from './week-selection';
@@ -1,40 +1,38 @@
1
- import { DEFAULT_FY_LABEL as t, DEFAULT_LEAP_WEEK_POLICY as l, FISCAL_PATTERNS as o } from "./types.js";
2
- import { addDays as i, civilFromLocalDate as c, compareCivil as s, diffDays as F, formatCivilRange as n, lastDayOfMonth as f, localDateFromCivil as C, parseCivilDate as m, toCivilDate as D, weekStart as d, weekday as p } from "./civil-date.js";
3
- import { buildFiscalYear as L, clearFiscalYearCache as S, formatFyLabel as g, resolvePattern as x, shiftedFyForDate as E } from "./build-year.js";
4
- import { clearFiscalLookupCache as k, getCellMeta as y, getFiscalYearForDate as A } from "./lookup.js";
5
- import { getFiscalPresets as P } from "./presets.js";
6
- import { isSameInterval as I, nextIntervalSelection as M } from "./selection.js";
7
- import { buildFiscalMonthCalendar as W, getCalendarWeekSelection as b, getFiscalMonthSelection as u, getFiscalWeekSelection as w, resolveWeekSelection as O, toFiscalCalendarConfig as R } from "./week-selection.js";
1
+ import { DEFAULT_FY_LABEL as t, DEFAULT_LEAP_WEEK_POLICY as r, FISCAL_PATTERNS as o } from "./types.js";
2
+ import { addDays as i, civilFromLocalDate as c, compareCivil as s, diffDays as F, formatCivilRange as f, lastDayOfMonth as m, localDateFromCivil as n, parseCivilDate as C, toCivilDate as D, weekStart as p, weekday as v } from "./civil-date.js";
3
+ import { buildFiscalYear as d, clearFiscalYearCache as x, formatFyLabel as S, resolvePattern as g, shiftedFyForDate as E } from "./build-year.js";
4
+ import { clearFiscalLookupCache as y, getCellMeta as A, getFiscalYearForDate as _ } from "./lookup.js";
5
+ import { getFiscalPresets as Y } from "./presets.js";
6
+ import { isSameInterval as I, nextIntervalSelection as T } from "./selection.js";
7
+ import { getCalendarWeekSelection as b, getFiscalWeekSelection as u, resolveWeekSelection as w, toFiscalCalendarConfig as M } from "./week-selection.js";
8
8
  export {
9
9
  t as DEFAULT_FY_LABEL,
10
- l as DEFAULT_LEAP_WEEK_POLICY,
10
+ r as DEFAULT_LEAP_WEEK_POLICY,
11
11
  o as FISCAL_PATTERNS,
12
12
  i as addDays,
13
- W as buildFiscalMonthCalendar,
14
- L as buildFiscalYear,
13
+ d as buildFiscalYear,
15
14
  c as civilFromLocalDate,
16
- k as clearFiscalLookupCache,
17
- S as clearFiscalYearCache,
15
+ y as clearFiscalLookupCache,
16
+ x as clearFiscalYearCache,
18
17
  s as compareCivil,
19
18
  F as diffDays,
20
- n as formatCivilRange,
21
- g as formatFyLabel,
19
+ f as formatCivilRange,
20
+ S as formatFyLabel,
22
21
  b as getCalendarWeekSelection,
23
- y as getCellMeta,
24
- u as getFiscalMonthSelection,
25
- P as getFiscalPresets,
26
- w as getFiscalWeekSelection,
27
- A as getFiscalYearForDate,
22
+ A as getCellMeta,
23
+ Y as getFiscalPresets,
24
+ u as getFiscalWeekSelection,
25
+ _ as getFiscalYearForDate,
28
26
  I as isSameInterval,
29
- f as lastDayOfMonth,
30
- C as localDateFromCivil,
31
- M as nextIntervalSelection,
32
- m as parseCivilDate,
33
- x as resolvePattern,
34
- O as resolveWeekSelection,
27
+ m as lastDayOfMonth,
28
+ n as localDateFromCivil,
29
+ T as nextIntervalSelection,
30
+ C as parseCivilDate,
31
+ g as resolvePattern,
32
+ w as resolveWeekSelection,
35
33
  E as shiftedFyForDate,
36
34
  D as toCivilDate,
37
- R as toFiscalCalendarConfig,
38
- d as weekStart,
39
- p as weekday
35
+ M as toFiscalCalendarConfig,
36
+ p as weekStart,
37
+ v as weekday
40
38
  };
@@ -133,13 +133,6 @@ export interface WeekSelection {
133
133
  startDate: Date;
134
134
  endDate: Date;
135
135
  }
136
- /** Legacy fiscal-month block described as a WeekSelection (weekOfMonth = period index). */
137
- export interface FiscalMonth {
138
- index: number;
139
- startDate: Date;
140
- endDate: Date;
141
- weekCount: number;
142
- }
143
136
  export declare const FISCAL_PATTERNS: Record<RetailPatternId, FiscalMonthPattern>;
144
137
  export declare const DEFAULT_LEAP_WEEK_POLICY: LeapWeekPolicy;
145
138
  export declare const DEFAULT_FY_LABEL: FyLabelStyle;
@@ -1,8 +1,6 @@
1
- import { CalendarKind, FiscalMode, FiscalMonth, FiscalMonthPattern, Granularity, WeekSelection, FiscalCalendarConfig, Weekday } from './types';
2
- export type { FiscalMode, FiscalMonth, FiscalMonthPattern };
1
+ import { CalendarKind, FiscalMode, FiscalMonthPattern, Granularity, WeekSelection, FiscalCalendarConfig, Weekday } from './types';
2
+ export type { FiscalMode, FiscalMonthPattern };
3
3
  export declare function getFiscalWeekSelection(date: Date, weekStartsOn: Weekday): WeekSelection;
4
- export declare function buildFiscalMonthCalendar(civilYear: number, pattern: FiscalMonthPattern, weekStartsOn: Weekday, fiscalYearStartMonth?: number): FiscalMonth[];
5
- export declare function getFiscalMonthSelection(date: Date, fiscalCalendar: FiscalMonth[]): WeekSelection | undefined;
6
4
  export declare function getCalendarWeekSelection(date: Date, weekStartsOn: Weekday): WeekSelection;
7
5
  export interface ResolveWeekSelectionOptions {
8
6
  calendarKind?: CalendarKind;
@@ -11,6 +9,7 @@ export interface ResolveWeekSelectionOptions {
11
9
  fiscalMonthPattern?: FiscalMonthPattern;
12
10
  fiscalYearStartMonth?: number;
13
11
  weekStartsOn?: Weekday;
12
+ fiscalConfig?: FiscalCalendarConfig;
14
13
  }
15
14
  export declare function resolveWeekSelection(date: Date, options?: ResolveWeekSelectionOptions): WeekSelection;
16
15
  export declare function toFiscalCalendarConfig(options: {
@@ -1,107 +1,80 @@
1
1
  import { FISCAL_PATTERNS as y } from "./types.js";
2
- function g(t, a) {
3
- const e = new Date(t), s = (e.getDay() + 7 - a) % 7;
4
- return e.setDate(e.getDate() - s), e.setHours(0, 0, 0, 0), e;
2
+ import { buildFiscalYear as d } from "./build-year.js";
3
+ import { civilFromLocalDate as m, parseCivilDate as w, localDateFromCivil as l } from "./civil-date.js";
4
+ import { getCellMeta as k } from "./lookup.js";
5
+ function D(t, n) {
6
+ const e = new Date(t), r = (e.getDay() + 7 - n) % 7;
7
+ return e.setDate(e.getDate() - r), e.setHours(0, 0, 0, 0), e;
5
8
  }
6
- function D(t, a) {
9
+ function h(t, n) {
7
10
  const e = new Date(t);
8
- return e.setDate(e.getDate() + a), e;
11
+ return e.setDate(e.getDate() + n), e;
9
12
  }
10
- function u(t, a) {
11
- const e = g(t, a), n = D(e, 6), c = new Date(t.getFullYear(), t.getMonth(), 1).getDay(), o = e.getDate(), r = e.getMonth() === t.getMonth() ? o : 1, i = Math.ceil((r + c) / 7);
13
+ function c(t, n) {
14
+ const e = D(t, n), a = h(e, 6), o = new Date(t.getFullYear(), t.getMonth(), 1).getDay(), i = e.getDate(), s = e.getMonth() === t.getMonth() ? i : 1, f = Math.ceil((s + o) / 7);
12
15
  return {
13
16
  year: t.getFullYear(),
14
17
  month: t.getMonth(),
15
- weekOfMonth: Math.max(1, i),
18
+ weekOfMonth: Math.max(1, f),
16
19
  startDate: e,
17
- endDate: n
20
+ endDate: a
18
21
  };
19
22
  }
20
- function M(t, a, e, n = 1) {
21
- if (a.length !== 12)
22
- throw new Error(`fiscalMonthPattern must have exactly 12 entries, got ${a.length}`);
23
- const s = new Date(t, n - 1, 1);
24
- let c = g(s, e);
25
- const o = [];
26
- for (let r = 0; r < 12; r++) {
27
- const i = a[r], f = new Date(c), l = D(f, i * 7 - 1);
28
- o.push({ index: r, startDate: f, endDate: l, weekCount: i }), c = D(l, 1);
29
- }
30
- return o;
31
- }
32
- function w(t, a) {
33
- const e = new Date(t);
34
- e.setHours(0, 0, 0, 0);
35
- for (const n of a) {
36
- const s = new Date(n.startDate);
37
- s.setHours(0, 0, 0, 0);
38
- const c = new Date(n.endDate);
39
- if (c.setHours(23, 59, 59, 999), e >= s && e <= c)
40
- return {
41
- year: n.startDate.getFullYear(),
42
- month: n.startDate.getMonth(),
43
- weekOfMonth: n.index + 1,
44
- startDate: n.startDate,
45
- endDate: n.endDate
46
- };
47
- }
23
+ function O(t, n) {
24
+ const e = D(t, n), a = h(e, 6), r = new Date(t.getFullYear(), t.getMonth(), 1), o = new Date(t.getFullYear(), t.getMonth() + 1, 0), i = e < r ? new Date(r) : new Date(e), s = a > o ? new Date(o) : new Date(a), u = new Date(i.getFullYear(), i.getMonth(), 1).getDay(), g = i.getDate(), M = Math.ceil((g + u) / 7);
25
+ return {
26
+ year: i.getFullYear(),
27
+ month: i.getMonth(),
28
+ weekOfMonth: Math.max(1, M),
29
+ startDate: i,
30
+ endDate: s
31
+ };
48
32
  }
49
- function d(t, a) {
50
- const e = g(t, a), n = D(e, 6), s = new Date(t.getFullYear(), t.getMonth(), 1), c = new Date(t.getFullYear(), t.getMonth() + 1, 0), o = e < s ? new Date(s) : new Date(e), r = n > c ? new Date(c) : new Date(n), f = new Date(o.getFullYear(), o.getMonth(), 1).getDay(), l = o.getDate(), h = Math.ceil((l + f) / 7);
33
+ function F(t, n, e) {
34
+ const a = k(t, m(n));
35
+ if (a?.fy == null || a.fiscalPeriod == null)
36
+ return c(n, e);
37
+ const r = d(t, a.fy).periods.find(
38
+ (i) => i.period === a.fiscalPeriod
39
+ );
40
+ if (!r) return c(n, e);
41
+ const o = w(r.start);
51
42
  return {
52
- year: o.getFullYear(),
53
- month: o.getMonth(),
54
- weekOfMonth: Math.max(1, h),
55
- startDate: o,
56
- endDate: r
43
+ year: o.y,
44
+ month: o.m - 1,
45
+ weekOfMonth: r.period,
46
+ startDate: l(r.start),
47
+ endDate: l(r.end)
57
48
  };
58
49
  }
59
- function F(t, a = {}) {
50
+ function v(t, n = {}) {
60
51
  const {
61
52
  calendarKind: e = "gregorian",
62
- fiscalMode: n = "basic",
63
- granularity: s,
64
- fiscalMonthPattern: c,
65
- fiscalYearStartMonth: o = 1,
66
- weekStartsOn: r = 1
67
- } = a;
53
+ fiscalMode: a = "basic",
54
+ granularity: r,
55
+ weekStartsOn: o = 1,
56
+ fiscalConfig: i
57
+ } = n;
68
58
  if (e !== "fiscal")
69
- return d(t, r);
70
- if (n === "basic" || s !== "period")
71
- return u(t, r);
72
- const i = c ?? y["4-5-4"];
73
- if (i.length !== 12)
74
- return u(t, r);
75
- const f = M(
76
- t.getFullYear(),
77
- i,
78
- r,
79
- o
80
- ), l = w(t, f);
81
- if (l) return l;
82
- const h = M(
83
- t.getFullYear() - 1,
84
- i,
85
- r,
86
- o
87
- );
88
- return w(t, h) ?? u(t, r);
59
+ return O(t, o);
60
+ if (a === "basic" || r !== "period")
61
+ return c(t, o);
62
+ const s = i ?? S(n);
63
+ return s ? F(s, t, o) : c(t, o);
89
64
  }
90
65
  function S(t) {
91
66
  if (t.calendarKind !== "fiscal") return;
92
- const a = t.weekStartsOn ?? 1, e = t.fiscalYearStartMonth ?? 1;
67
+ const n = t.weekStartsOn ?? 1, e = t.fiscalYearStartMonth ?? 1;
93
68
  return {
94
69
  kind: "retail",
95
70
  pattern: t.fiscalMonthPattern ?? y["4-5-4"],
96
- weekStartsOn: a,
71
+ weekStartsOn: n,
97
72
  fyAnchor: { month: e, day: 1, rule: "on-or-before" }
98
73
  };
99
74
  }
100
75
  export {
101
- M as buildFiscalMonthCalendar,
102
- d as getCalendarWeekSelection,
103
- w as getFiscalMonthSelection,
104
- u as getFiscalWeekSelection,
105
- F as resolveWeekSelection,
76
+ O as getCalendarWeekSelection,
77
+ c as getFiscalWeekSelection,
78
+ v as resolveWeekSelection,
106
79
  S as toFiscalCalendarConfig
107
80
  };
@@ -1 +1 @@
1
- export default "# Install and configure Impact Nova\n\nUse these steps to add Impact Nova to an existing project. Run the commands in your project root and apply the code changes to your entry file and layout.\n\n## 0. Scaffold a new app (recommended)\n\n**`create-impact-nova@^1.4.9`** is on npm. Scaffold auto-detects dependency mode:\n\n| Where you run | `impact-nova` dependency |\n|---------------|--------------------------|\n| Published CLI / MCP (outside monorepo) | `impact-nova@^2.5.12` from npm (`latest` tag) |\n| Inside impact-nova monorepo | `file:` link to repo root |\n\n```bash\nnpx create-impact-nova my-dashboard\ncd my-dashboard\nnpm run dev\n```\n\nMCP: **`scaffold_impact_nova_app`** with `projectName` and optional `modules[]` from the user prompt.\n\n**Overrides:** CLI `--from-npm` · `--link-monorepo` · MCP `usePublishedPackages: true | false`\n\n```bash\nnpx create-impact-nova my-dashboard --from-npm\n```\n\nBase template is shell-only (Home + shared primitives). Feature pages come from recipes — see `create-impact-nova/recipes/README.md`.\n\n**Local link in an existing app** (manual):\n\n```bash\nnpm install impact-nova@file:../path-to-impact-nova-repo\n```\n\nRun `npm run build` in the impact-nova repo after design-system changes.\n\n## 1. Install the package and peer dependencies\n\n```bash\nnpm install impact-nova impact-nova-icons\nnpm install react@^19 react-dom@^19\n```\n\n**Required peers:** `react@^19`, `react-dom@^19`, `impact-nova-icons@^0.1.1`\n\n**Optional peers** (install when you use these features):\n\n| Package | Version | When needed |\n|---------|---------|-------------|\n| `ag-grid-community` | `36.0.1` | AG Grid types/API (pin with react + enterprise) |\n| `ag-grid-react` | `36.0.1` | DataTable / AG Grid |\n| `ag-grid-enterprise` | `36.0.1` | Enterprise grid features |\n| `highcharts` | `^12` | Chart component |\n| `highcharts-react-official` | `^3` | Chart component |\n| `highcharts-border-radius` | `^0.0.4` | Rounded chart corners |\n\nIf you use AG Grid or Highcharts in your app, also install:\n\n```bash\nnpm install ag-grid-community@36.0.1 ag-grid-react@36.0.1 ag-grid-enterprise@36.0.1\n# Optional, for charts:\nnpm install highcharts@^12 highcharts-react-official@^3 highcharts-border-radius@^0.0.4\n```\n\n## 2. Import styles in your root entry\n\nIn your app root (e.g. `main.tsx`, `App.tsx`, or `layout.tsx`), **import the CSS before your app component**:\n\n```tsx\nimport 'impact-nova/dist/impact-nova.css';\nimport App from './App';\n// ... rest of your bootstrap\n```\n\n## 3. Add Manrope font (recommended)\n\nIn your `index.html` or layout:\n\n```html\n<link href=\"https://fonts.googleapis.com/css2?family=Manrope:wght@200..800&display=swap\" rel=\"stylesheet\" />\n```\n\nIn your global CSS or Tailwind base:\n\n```css\n@layer base {\n body {\n font-family: 'Manrope', sans-serif;\n }\n}\n```\n\n## 4. Wrap your app with providers (recommended)\n\nMount **`ImpactNovaProviders`** once at the app root. It bundles i18n (`ImpactNovaI18nProvider`) and `TooltipProvider` (required for tooltips since v2.0.8):\n\n```tsx\nimport { ImpactNovaProviders } from 'impact-nova/form';\n\nfunction Root() {\n return (\n <ImpactNovaProviders locale=\"en\">\n <App />\n </ImpactNovaProviders>\n );\n}\n```\n\nFor another locale, pass a locale pack:\n\n```tsx\nimport { ImpactNovaProviders } from 'impact-nova/form';\nimport { de } from 'impact-nova/locale/de';\n\n<ImpactNovaProviders locale=\"de\" messages={de}>\n <App />\n</ImpactNovaProviders>\n```\n\n**Barrel exception:** locale packs may use `import { de } from 'impact-nova'`. All UI components still use subpaths (see §5).\n\n## 5. Subpath imports (recommended)\n\nPrefer subpath imports in feature code for tree-shaking:\n\n```tsx\nimport { Button } from 'impact-nova/button';\nimport { Card, CardContent } from 'impact-nova/card';\nimport { DataTable, DataTableContent, useDataTable } from 'impact-nova/data-table';\nimport { CheckCircle } from 'impact-nova-icons';\n```\n\nThe barrel `import { Button } from 'impact-nova'` still works but pulls a larger module graph. **Use subpaths for all UI components**; reserve the barrel for locale packs at app root only. Use `ImpactNovaProviders` from `impact-nova/form` for app setup.\n\n## 6. Using Impact Nova with CSS or SCSS (no Tailwind)\n\nIf your app uses **plain CSS or SCSS** and does **not** use Tailwind, you can still use Impact Nova. Tailwind is optional. Impact Nova ships a single built CSS file (no SCSS source).\n\n- **Import the library CSS** in your app root (e.g. `main.tsx`, `App.tsx`):\n ```tsx\n import 'impact-nova/dist/impact-nova.css';\n ```\n **CSS split exports** (optional, for layered theming): `impact-nova/impact-nova-tokens.scss`, `impact-nova/impact-nova-base.scss`, `impact-nova/impact-nova-components.css`\n Or from your main stylesheet: `@import 'impact-nova/dist/impact-nova.css';` in your main.css or main.scss.\n- **Component styling** comes from Impact Nova's CSS. Use each component's `variant` and `size` props; no Tailwind classes are required.\n- **Your layout and spacing** stay in your CSS or SCSS (margins, padding, flexbox, grid). Use your usual class names; the design system does not require Tailwind utilities.\n- **Manrope font:** Add the font link in `index.html` and in your CSS/SCSS set `body { font-family: 'Manrope', sans-serif; }` (see section 3).\n- **Summary:** No Tailwind, no Tailwind config. Load `impact-nova.css` once; use components with their props; use your existing CSS/SCSS for the rest.\n\n## 6b. Theming in consumer apps\n\n| Surface | What ships |\n|---------|------------|\n| **npm / consumer apps** | **Impact Light** only — `import 'impact-nova/dist/impact-nova.css'` (from `src/theme/tokens/light.json`) |\n| **Storybook / dev** | 10 curated **theme presets** (Impact Dark, Midnight, Ocean, …) — preview switcher only |\n\n**Do not** copy Storybook preset JSON or `theme-presets.ts` into consumer apps. Presets are not in the published package.\n\n**Custom branding:** override CSS variables on `:root` or a scoped class (e.g. `.my-brand`). Use Storybook **Theme Builder** / **Token Catalog** to explore tokens, then export CSS/JSON for your overrides.\n\n## 7. Using Impact Nova with Webpack\n\nIf your app is built with **Webpack** (including Create React App, which uses Webpack):\n\n- **CSS import:** Webpack will bundle the library CSS as long as you have a rule for `.css`. Ensure your config includes something like:\n ```js\n module: {\n rules: [\n {\n test: /\\.css$/,\n use: ['style-loader', 'css-loader'],\n // or with MiniCssExtractPlugin:\n // use: [MiniCssExtractPlugin.loader, 'css-loader'],\n },\n // ... other rules (e.g. for .tsx, .js)\n ],\n },\n ```\n Then in your root component or entry:\n ```tsx\n import 'impact-nova/dist/impact-nova.css';\n ```\n- **Create React App (CRA):** No extra config. Add `import 'impact-nova/dist/impact-nova.css';` in `index.tsx` or `App.tsx`.\n- **Dedupe React / AG Grid:** If you see “multiple copies of React” or AG Grid issues, use Webpack’s `resolve.alias` so the app uses a single version:\n ```js\n resolve: {\n alias: {\n react: path.resolve(__dirname, 'node_modules/react'),\n 'react-dom': path.resolve(__dirname, 'node_modules/react-dom'),\n // If using AG Grid:\n 'ag-grid-react': path.resolve(__dirname, 'node_modules/ag-grid-react'),\n 'ag-grid-community': path.resolve(__dirname, 'node_modules/ag-grid-community'),\n 'ag-grid-enterprise': path.resolve(__dirname, 'node_modules/ag-grid-enterprise'),\n },\n },\n ```\n- **Tailwind + Webpack:** If you use Tailwind, add the Impact Nova preset and include the package in `content` (see section 7 below).\n\n## 8. Optional: extend Tailwind with Impact Nova preset\n\nIf your project uses Tailwind and you want the same theme (colors, radius), extend your `tailwind.config.js` with the preset from the package:\n\n```js\n// tailwind.config.js\nimport impactNovaPreset from 'impact-nova/tailwind.config.js';\n// → dist/tailwind.config.js (bundled theme; no package src/ required)\n\nexport default {\n presets: [impactNovaPreset],\n content: [\n './index.html',\n './src/**/*.{js,ts,jsx,tsx}',\n './node_modules/impact-nova/dist/**/*.js',\n ],\n // ... rest of your config\n};\n```\n\n## Summary checklist\n\n- [ ] `npm install impact-nova impact-nova-icons` (and react, react-dom; optional: ag-grid, highcharts)\n- [ ] `import 'impact-nova/dist/impact-nova.css'` in root entry (or @import in main.css/main.scss if using CSS or SCSS without Tailwind; see §6)\n- [ ] Add Manrope font link and body font-family\n- [ ] Wrap app with `<ImpactNovaProviders locale=\"en\">` from `impact-nova/form`\n- [ ] Use subpath imports in feature code (see §5)\n- [ ] (Optional) Add Tailwind preset and content path for impact-nova\n- [ ] **Webpack:** Ensure a CSS rule (style-loader + css-loader) and, if needed, resolve.alias for React/AG Grid\n\nAfter this, import components via subpaths: `import { Button } from 'impact-nova/button';`\n\n## 9. Dashboard app shell (optional)\n\nTo scaffold a full dashboard (sidebar, header, breadcrumb, filters), read resource **`impact-nova://layout`** or call `get_real_world_patterns` with `topic: \"layout\"`. Use `Layout` from `impact-nova/layout` — not `DynamicLayout` (grid/flex utility only).\n";
1
+ export default "# Install and configure Impact Nova\n\nUse these steps to add Impact Nova to an existing project. Run the commands in your project root and apply the code changes to your entry file and layout.\n\n## 0. Scaffold a new app (recommended)\n\n**`create-impact-nova@^1.4.9`** is on npm. Scaffold auto-detects dependency mode:\n\n| Where you run | `impact-nova` dependency |\n|---------------|--------------------------|\n| Published CLI / MCP (outside monorepo) | `impact-nova@^2.5.13` from npm (`latest` tag) |\n| Inside impact-nova monorepo | `file:` link to repo root |\n\n```bash\nnpx create-impact-nova my-dashboard\ncd my-dashboard\nnpm run dev\n```\n\nMCP: **`scaffold_impact_nova_app`** with `projectName` and optional `modules[]` from the user prompt.\n\n**Overrides:** CLI `--from-npm` · `--link-monorepo` · MCP `usePublishedPackages: true | false`\n\n```bash\nnpx create-impact-nova my-dashboard --from-npm\n```\n\nBase template is shell-only (Home + shared primitives). Feature pages come from recipes — see `create-impact-nova/recipes/README.md`.\n\n**Local link in an existing app** (manual):\n\n```bash\nnpm install impact-nova@file:../path-to-impact-nova-repo\n```\n\nRun `npm run build` in the impact-nova repo after design-system changes.\n\n## 1. Install the package and peer dependencies\n\n```bash\nnpm install impact-nova impact-nova-icons\nnpm install react@^19 react-dom@^19\n```\n\n**Required peers:** `react@^19`, `react-dom@^19`, `impact-nova-icons@^0.1.1`\n\n**Optional peers** (install when you use these features):\n\n| Package | Version | When needed |\n|---------|---------|-------------|\n| `ag-grid-community` | `36.0.1` | AG Grid types/API (pin with react + enterprise) |\n| `ag-grid-react` | `36.0.1` | DataTable / AG Grid |\n| `ag-grid-enterprise` | `36.0.1` | Enterprise grid features |\n| `highcharts` | `^12` | Chart component |\n| `highcharts-react-official` | `^3` | Chart component |\n| `highcharts-border-radius` | `^0.0.4` | Rounded chart corners |\n\nIf you use AG Grid or Highcharts in your app, also install:\n\n```bash\nnpm install ag-grid-community@36.0.1 ag-grid-react@36.0.1 ag-grid-enterprise@36.0.1\n# Optional, for charts:\nnpm install highcharts@^12 highcharts-react-official@^3 highcharts-border-radius@^0.0.4\n```\n\n## 2. Import styles in your root entry\n\nIn your app root (e.g. `main.tsx`, `App.tsx`, or `layout.tsx`), **import the CSS before your app component**:\n\n```tsx\nimport 'impact-nova/dist/impact-nova.css';\nimport App from './App';\n// ... rest of your bootstrap\n```\n\n## 3. Add Manrope font (recommended)\n\nIn your `index.html` or layout:\n\n```html\n<link href=\"https://fonts.googleapis.com/css2?family=Manrope:wght@200..800&display=swap\" rel=\"stylesheet\" />\n```\n\nIn your global CSS or Tailwind base:\n\n```css\n@layer base {\n body {\n font-family: 'Manrope', sans-serif;\n }\n}\n```\n\n## 4. Wrap your app with providers (recommended)\n\nMount **`ImpactNovaProviders`** once at the app root. It bundles i18n (`ImpactNovaI18nProvider`) and `TooltipProvider` (required for tooltips since v2.0.8):\n\n```tsx\nimport { ImpactNovaProviders } from 'impact-nova/form';\n\nfunction Root() {\n return (\n <ImpactNovaProviders locale=\"en\">\n <App />\n </ImpactNovaProviders>\n );\n}\n```\n\nFor another locale, pass a locale pack:\n\n```tsx\nimport { ImpactNovaProviders } from 'impact-nova/form';\nimport { de } from 'impact-nova/locale/de';\n\n<ImpactNovaProviders locale=\"de\" messages={de}>\n <App />\n</ImpactNovaProviders>\n```\n\n**Barrel exception:** locale packs may use `import { de } from 'impact-nova'`. All UI components still use subpaths (see §5).\n\n## 5. Subpath imports (recommended)\n\nPrefer subpath imports in feature code for tree-shaking:\n\n```tsx\nimport { Button } from 'impact-nova/button';\nimport { Card, CardContent } from 'impact-nova/card';\nimport { DataTable, DataTableContent, useDataTable } from 'impact-nova/data-table';\nimport { CheckCircle } from 'impact-nova-icons';\n```\n\nThe barrel `import { Button } from 'impact-nova'` still works but pulls a larger module graph. **Use subpaths for all UI components**; reserve the barrel for locale packs at app root only. Use `ImpactNovaProviders` from `impact-nova/form` for app setup.\n\n## 6. Using Impact Nova with CSS or SCSS (no Tailwind)\n\nIf your app uses **plain CSS or SCSS** and does **not** use Tailwind, you can still use Impact Nova. Tailwind is optional. Impact Nova ships a single built CSS file (no SCSS source).\n\n- **Import the library CSS** in your app root (e.g. `main.tsx`, `App.tsx`):\n ```tsx\n import 'impact-nova/dist/impact-nova.css';\n ```\n **CSS split exports** (optional, for layered theming): `impact-nova/impact-nova-tokens.scss`, `impact-nova/impact-nova-base.scss`, `impact-nova/impact-nova-components.css`\n Or from your main stylesheet: `@import 'impact-nova/dist/impact-nova.css';` in your main.css or main.scss.\n- **Component styling** comes from Impact Nova's CSS. Use each component's `variant` and `size` props; no Tailwind classes are required.\n- **Your layout and spacing** stay in your CSS or SCSS (margins, padding, flexbox, grid). Use your usual class names; the design system does not require Tailwind utilities.\n- **Manrope font:** Add the font link in `index.html` and in your CSS/SCSS set `body { font-family: 'Manrope', sans-serif; }` (see section 3).\n- **Summary:** No Tailwind, no Tailwind config. Load `impact-nova.css` once; use components with their props; use your existing CSS/SCSS for the rest.\n\n## 6b. Theming in consumer apps\n\n| Surface | What ships |\n|---------|------------|\n| **npm / consumer apps** | **Impact Light** only — `import 'impact-nova/dist/impact-nova.css'` (from `src/theme/tokens/light.json`) |\n| **Storybook / dev** | 10 curated **theme presets** (Impact Dark, Midnight, Ocean, …) — preview switcher only |\n\n**Do not** copy Storybook preset JSON or `theme-presets.ts` into consumer apps. Presets are not in the published package.\n\n**Custom branding:** override CSS variables on `:root` or a scoped class (e.g. `.my-brand`). Use Storybook **Theme Builder** / **Token Catalog** to explore tokens, then export CSS/JSON for your overrides.\n\n## 7. Using Impact Nova with Webpack\n\nIf your app is built with **Webpack** (including Create React App, which uses Webpack):\n\n- **CSS import:** Webpack will bundle the library CSS as long as you have a rule for `.css`. Ensure your config includes something like:\n ```js\n module: {\n rules: [\n {\n test: /\\.css$/,\n use: ['style-loader', 'css-loader'],\n // or with MiniCssExtractPlugin:\n // use: [MiniCssExtractPlugin.loader, 'css-loader'],\n },\n // ... other rules (e.g. for .tsx, .js)\n ],\n },\n ```\n Then in your root component or entry:\n ```tsx\n import 'impact-nova/dist/impact-nova.css';\n ```\n- **Create React App (CRA):** No extra config. Add `import 'impact-nova/dist/impact-nova.css';` in `index.tsx` or `App.tsx`.\n- **Dedupe React / AG Grid:** If you see “multiple copies of React” or AG Grid issues, use Webpack’s `resolve.alias` so the app uses a single version:\n ```js\n resolve: {\n alias: {\n react: path.resolve(__dirname, 'node_modules/react'),\n 'react-dom': path.resolve(__dirname, 'node_modules/react-dom'),\n // If using AG Grid:\n 'ag-grid-react': path.resolve(__dirname, 'node_modules/ag-grid-react'),\n 'ag-grid-community': path.resolve(__dirname, 'node_modules/ag-grid-community'),\n 'ag-grid-enterprise': path.resolve(__dirname, 'node_modules/ag-grid-enterprise'),\n },\n },\n ```\n- **Tailwind + Webpack:** If you use Tailwind, add the Impact Nova preset and include the package in `content` (see section 7 below).\n\n## 8. Optional: extend Tailwind with Impact Nova preset\n\nIf your project uses Tailwind and you want the same theme (colors, radius), extend your `tailwind.config.js` with the preset from the package:\n\n```js\n// tailwind.config.js\nimport impactNovaPreset from 'impact-nova/tailwind.config.js';\n// → dist/tailwind.config.js (bundled theme; no package src/ required)\n\nexport default {\n presets: [impactNovaPreset],\n content: [\n './index.html',\n './src/**/*.{js,ts,jsx,tsx}',\n './node_modules/impact-nova/dist/**/*.js',\n ],\n // ... rest of your config\n};\n```\n\n## Summary checklist\n\n- [ ] `npm install impact-nova impact-nova-icons` (and react, react-dom; optional: ag-grid, highcharts)\n- [ ] `import 'impact-nova/dist/impact-nova.css'` in root entry (or @import in main.css/main.scss if using CSS or SCSS without Tailwind; see §6)\n- [ ] Add Manrope font link and body font-family\n- [ ] Wrap app with `<ImpactNovaProviders locale=\"en\">` from `impact-nova/form`\n- [ ] Use subpath imports in feature code (see §5)\n- [ ] (Optional) Add Tailwind preset and content path for impact-nova\n- [ ] **Webpack:** Ensure a CSS rule (style-loader + css-loader) and, if needed, resolve.alias for React/AG Grid\n\nAfter this, import components via subpaths: `import { Button } from 'impact-nova/button';`\n\n## 9. Dashboard app shell (optional)\n\nTo scaffold a full dashboard (sidebar, header, breadcrumb, filters), read resource **`impact-nova://layout`** or call `get_real_world_patterns` with `topic: \"layout\"`. Use `Layout` from `impact-nova/layout` — not `DynamicLayout` (grid/flex utility only).\n";
@@ -1 +1 @@
1
- export default "# Impact Nova — baseline\n\nUse **Impact Nova** design-system components and tokens. Prefer subpath imports (e.g. `impact-nova/button`) when you only need a few modules. For live component lists, specs, and codegen, use the **impact-nova-mcp** MCP server (see npm `impact-nova-mcp`). Browse **Storybook**: https://impact-nova.iaproducts.ai/\n\n## Peer dependency summary\n\n```json\n{\n \"impactNova\": {\n \"package\": \"impact-nova\",\n \"recommendedVersion\": \"2.5.12\",\n \"recommendedDistTag\": \"latest\",\n \"description\": \"Design system package — ESM with 90+ subpath exports. Install: npm install impact-nova@latest\"\n },\n \"createImpactNova\": {\n \"package\": \"create-impact-nova\",\n \"recommendedVersion\": \"^1.4.9\",\n \"description\": \"Vite + React scaffold with recipe-based modules\"\n },\n \"localDevelopment\": {\n \"defaultScaffoldDependency\": \"auto\",\n \"description\": \"create-impact-nova auto-detects: file: link when run inside the impact-nova monorepo; npm (impact-nova@^2.5.12) otherwise. CLI: --from-npm or --link-monorepo to override. Rebuild impact-nova (npm run build) after DS changes when using file: link.\",\n \"cliFlagForNpm\": \"--from-npm\",\n \"cliFlagForMonorepo\": \"--link-monorepo\",\n \"mcpScaffoldFlag\": \"usePublishedPackages: true | false (omit for auto-detect)\"\n },\n \"mandatoryRules\": {\n \"componentsOnly\": \"Use Impact Nova components only — never create new custom UI components\",\n \"tables\": \"Any table/grid/spreadsheet → DataTable from impact-nova/data-table (not HTML table, not raw ag-grid-react)\",\n \"validateBeforeDone\": \"Call validate_snippet on generated UI code\",\n \"resource\": \"impact-nova://design-system-mandate\"\n },\n \"requiredPeers\": [\n {\n \"package\": \"react\",\n \"recommendedVersion\": \"^19.0.0\",\n \"description\": \"React 19 required\"\n },\n {\n \"package\": \"react-dom\",\n \"recommendedVersion\": \"^19.0.0\",\n \"description\": \"React DOM 19 required\"\n },\n {\n \"package\": \"impact-nova-icons\",\n \"recommendedVersion\": \">=0.1.0\",\n \"description\": \"Icons peer — not bundled in impact-nova; 0.1.x and 0.2.x supported\"\n }\n ],\n \"optionalPeers\": [\n {\n \"package\": \"ag-grid-community\",\n \"recommendedVersion\": \"36.0.1\",\n \"description\": \"AG Grid community types/API; pin to the same version as ag-grid-react\"\n },\n {\n \"package\": \"ag-grid-react\",\n \"recommendedVersion\": \"36.0.1\",\n \"description\": \"For DataTable and grid components; use exact version to match Impact Nova\"\n },\n {\n \"package\": \"ag-grid-enterprise\",\n \"recommendedVersion\": \"36.0.1\",\n \"description\": \"Required if using ag-grid-react with enterprise features\"\n },\n {\n \"package\": \"highcharts\",\n \"recommendedVersion\": \"^12.0.0\",\n \"description\": \"For Chart component\"\n },\n {\n \"package\": \"highcharts-react-official\",\n \"recommendedVersion\": \"^3.0.0\",\n \"description\": \"For Chart component\"\n },\n {\n \"package\": \"highcharts-border-radius\",\n \"recommendedVersion\": \"^0.0.4\",\n \"description\": \"Optional Highcharts plugin for rounded corners\"\n }\n ]\n}\n```\n";
1
+ export default "# Impact Nova — baseline\n\nUse **Impact Nova** design-system components and tokens. Prefer subpath imports (e.g. `impact-nova/button`) when you only need a few modules. For live component lists, specs, and codegen, use the **impact-nova-mcp** MCP server (see npm `impact-nova-mcp`). Browse **Storybook**: https://impact-nova.iaproducts.ai/\n\n## Peer dependency summary\n\n```json\n{\n \"impactNova\": {\n \"package\": \"impact-nova\",\n \"recommendedVersion\": \"2.5.13\",\n \"recommendedDistTag\": \"latest\",\n \"description\": \"Design system package — ESM with 90+ subpath exports. Install: npm install impact-nova@latest\"\n },\n \"createImpactNova\": {\n \"package\": \"create-impact-nova\",\n \"recommendedVersion\": \"^1.4.9\",\n \"description\": \"Vite + React scaffold with recipe-based modules\"\n },\n \"localDevelopment\": {\n \"defaultScaffoldDependency\": \"auto\",\n \"description\": \"create-impact-nova auto-detects: file: link when run inside the impact-nova monorepo; npm (impact-nova@^2.5.13) otherwise. CLI: --from-npm or --link-monorepo to override. Rebuild impact-nova (npm run build) after DS changes when using file: link.\",\n \"cliFlagForNpm\": \"--from-npm\",\n \"cliFlagForMonorepo\": \"--link-monorepo\",\n \"mcpScaffoldFlag\": \"usePublishedPackages: true | false (omit for auto-detect)\"\n },\n \"mandatoryRules\": {\n \"componentsOnly\": \"Use Impact Nova components only — never create new custom UI components\",\n \"tables\": \"Any table/grid/spreadsheet → DataTable from impact-nova/data-table (not HTML table, not raw ag-grid-react)\",\n \"validateBeforeDone\": \"Call validate_snippet on generated UI code\",\n \"resource\": \"impact-nova://design-system-mandate\"\n },\n \"requiredPeers\": [\n {\n \"package\": \"react\",\n \"recommendedVersion\": \"^19.0.0\",\n \"description\": \"React 19 required\"\n },\n {\n \"package\": \"react-dom\",\n \"recommendedVersion\": \"^19.0.0\",\n \"description\": \"React DOM 19 required\"\n },\n {\n \"package\": \"impact-nova-icons\",\n \"recommendedVersion\": \">=0.1.0\",\n \"description\": \"Icons peer — not bundled in impact-nova; 0.1.x and 0.2.x supported\"\n }\n ],\n \"optionalPeers\": [\n {\n \"package\": \"ag-grid-community\",\n \"recommendedVersion\": \"36.0.1\",\n \"description\": \"AG Grid community types/API; pin to the same version as ag-grid-react\"\n },\n {\n \"package\": \"ag-grid-react\",\n \"recommendedVersion\": \"36.0.1\",\n \"description\": \"For DataTable and grid components; use exact version to match Impact Nova\"\n },\n {\n \"package\": \"ag-grid-enterprise\",\n \"recommendedVersion\": \"36.0.1\",\n \"description\": \"Required if using ag-grid-react with enterprise features\"\n },\n {\n \"package\": \"highcharts\",\n \"recommendedVersion\": \"^12.0.0\",\n \"description\": \"For Chart component\"\n },\n {\n \"package\": \"highcharts-react-official\",\n \"recommendedVersion\": \"^3.0.0\",\n \"description\": \"For Chart component\"\n },\n {\n \"package\": \"highcharts-border-radius\",\n \"recommendedVersion\": \"^0.0.4\",\n \"description\": \"Optional Highcharts plugin for rounded corners\"\n }\n ]\n}\n```\n";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impact-nova",
3
- "version": "2.5.12",
3
+ "version": "2.5.14",
4
4
  "description": "Enterprise-grade React design system built with React 19, Vite, Tailwind CSS, and Radix UI. Built-in internationalization (i18n) and comprehensive UI component library for scalable, accessible, and performant applications.",
5
5
  "type": "module",
6
6
  "workspaces": [