@mercurjs/dashboard-shared 2.3.7 → 2.3.8-canary.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1806,6 +1806,20 @@ type ResolvedFormField = {
1806
1806
  name: string;
1807
1807
  field: CustomFormField;
1808
1808
  };
1809
+ type OnboardingStep = {
1810
+ id: string;
1811
+ label?: string;
1812
+ rank: number;
1813
+ optional: boolean;
1814
+ custom: boolean;
1815
+ };
1816
+ type OnboardingStepDefault = {
1817
+ id: string;
1818
+ rank: number;
1819
+ optional: boolean;
1820
+ /** Built-in steps that carry required data and can't be disabled. */
1821
+ required?: boolean;
1822
+ };
1809
1823
  type ResolvedDisplays = {
1810
1824
  fields: CustomDisplayField[];
1811
1825
  actions: SectionAction[];
@@ -1846,8 +1860,14 @@ declare class ExtensionRegistry {
1846
1860
  /** First lock reason a config returns for an action on this entity. */
1847
1861
  getActionLock(model: string, action: string, entity: unknown): string | undefined;
1848
1862
  getActivity(model: string, entity: unknown): ActivityEntry[];
1863
+ private resolveFormFields;
1849
1864
  /** Custom form fields for a model's form zone (and optional tab). */
1850
1865
  getFormFields(model: string, zone: string, tab?: string): ResolvedFormField[];
1866
+ /**
1867
+ * Resolves the onboarding wizard steps: built-ins merged with every
1868
+ * `zone: "onboarding"` form entry for the model. Later configs win per tab.
1869
+ */
1870
+ getOnboardingSteps(model: string, builtIns: OnboardingStepDefault[]): OnboardingStep[];
1851
1871
  /** All custom form fields for a model, keyed for schema/default building. */
1852
1872
  getAllFormFields(model: string): ResolvedFormField[];
1853
1873
  /** Section display contributions (field add/replace/remove + actions). */
@@ -2260,4 +2280,4 @@ declare const RICH_TEXT_ALLOWED_ATTRIBUTES: string[];
2260
2280
  declare const isHtml: (value?: string | null) => boolean;
2261
2281
  declare const plainTextToHtml: (value?: string | null) => string;
2262
2282
 
2263
- export { type Action, type ActionGroup, ActionMenu, AddressForm, AddressSchema, type AttributeChange, type AttributeChangeKind, AttributeValueInput, BadgeListSummary, ChipGroup, ChipInput, CodeCell, CodeHeader, Combobox, type Command, ConditionalTooltip, ConfirmPrompt, type ConfirmPromptProps, type CoreNavItem, CountrySelect, CreatedAtCell, CreatedAtHeader, type CurrencyInfo, type CustomFieldsModule, CustomerInfo, DataGrid, DataTable, DateCell, DateHeader, DateRangeDisplay, DeprecatedPercentageInput, DisplayExtensionZone, type DisplayExtensionZoneProps, DisplayField, type DisplayFieldProps, DisplaySection, type DisplaySectionField, type DisplaySectionProps, type EditAttributeAttribute, EditAttributeForm, type EditAttributeFormProps, EmailCell, EmailForm, EmailHeader, EmailSchema, ErrorBoundary, type ExtendableTable, ExtensionProvider, type ExtensionProviderProps, ExtensionRegistry, type ExtractableOffer, type ExtractableOffers, type FieldDiff, FilePreview, type FileType, FileUpload, type FileUploadProps, type Filter, FilterGroup, Form, FormExtensionZone, type FormExtensionZoneProps, GeneralSectionSkeleton, HandleInput, HeadingSkeleton, IconAvatar, IconButtonSkeleton, ImageAvatar, type ImageRef, IncludesTaxTooltip, InfiniteList, JsonViewSection, JsonViewSectionSkeleton, KeyboundForm, LinkButton, ListBadge, ListSummary, Listicle, type ListicleProps, LocalizedTablePagination, type MediaDiff, MetadataForm, MetadataSection, MoneyAmountCell, NameCell, NameHeader, type NavGroup, type NavGroupItem, type NavItemGroup, type NavigationModule, NoRecords, type NoRecordsProps, NoResults, type NoResultsProps, OrderBy, PercentageInput, PermissionAction, type PermissionActionProps, PermissionGuard, type PermissionGuardProps, type PermissionedCommand, PermissionsContext, PermissionsProvider, type PermissionsProviderProps, PlaceholderCell, PriceListDateStatus, type PriceListGridGroupRow, type PriceListGridOfferRow, type PriceListGridRow, PriceListStatus, PriceListType, type ProductAttributeBatchPayload, ProductAttributeSection, type ProductAttributeSectionProps, type ProductChangeAttribute, ProductChangePanel, type ProductChangePanelProps, type ProductChangeProduct, type ProductChangeResolvers, type ProductChangeVariant, type ProductChangeView, ProgressBar, ProvinceSelect, Query, REFERENCE_FIELDS, RICH_TEXT_ALLOWED_ATTRIBUTES, RICH_TEXT_ALLOWED_TAGS, type ReferenceField, type ResolvedAttribute, type ResolvedDisplays, type ResolvedFormField, RichText, RichTextEditor, type RichTextEditorProps, RouteDrawer, RouteFocusModal, RoutePermissionGuard, SIDEBAR_MENU_CONTENT, SIDEBAR_RAIL_FADE, SectionNoAccess, SectionRow, type SectionRowProps, SegmentedControl, type SegmentedControlOption, SidebarContext, type SidebarContextValue, SidebarLink, type SidebarLinkProps, SidebarProvider, type SidebarState, SingleColumnPage, SingleColumnPageSkeleton, Skeleton, SortableList, SortableTree, StackedDrawer, StackedFocusModal, type StaticCountry, StatusCell, SwitchBox, type TQueryKey, type TabDefinition, TabbedForm, TableFooterSkeleton, TableSectionSkeleton, TableSkeleton, TextCell, TextHeader, TextSkeleton, Thumbnail, TransferOwnershipSchema, TwoColumnPage, TwoColumnPageSkeleton, type UseExtendableFormProps, type UseExtendableTableProps, type UseQueryOptionsWrapper, type VariantGroup, VisuallyHidden, type Widget, type WidgetModule, type WidgetPlacement, type WidgetTab, type WidgetTabs, WidgetZone, type WidgetZoneProps, type ZoneWidgets, _DataTable, applyActionPermissions, applyNavGroups, applyNavOverrides, buildAdditionalDataDefaults, buildAdditionalDataSchema, buildOfferGridData, buildProductChangeView, countries, createDataGridHelper, createDataGridPriceColumns, createFormHelper, createWithPermission, currencies, extractPricesFromOffers, extractReferenceIds, filterCommandsByPermission, formatFieldValue, genericForwardRef, getCountryByIso2, getCurrencySymbol, getDecimalDigits, getExtensionRegistry, getFormattedAddress, getFormattedCountry, getLinkQuery, getLocaleAmount, getNativeSymbol, getPriceListStatus, getStylizedAmount, groupNavItems, humanizeFieldName, isAmountLessThenRoundingError, isForbidden, isHtml, isImageList, isOrderActionable, isOrderAwaitingAction, isPermitted, isPriceListGroupRow, isProductRow, isReferenceField, isSameAddress, linkFields, mergeListFilters, permissionMapAllows, plainTextToHtml, productChangeViewHasContent, queryClient, queryKeysFactory, richTextContentClasses, sanitizeRichText, toPermissionList, useActionLocks, useCan, useCollapsedSidebar, useCombinedRefs, useCommandHistory, useDataTable, useDate, useDisplayFieldOverride, useDocumentDirection, useExpandedSidebar, useExtendableForm, useExtendableTable, useExtension, useExtensionActivity, useLinkQuery, usePermissionGate, usePermissions, usePermittedCommands, useQueryParams, useResourcePermissions, useRouteModal, useSidebar, useSidebarMenuPlacement, useStackedModal, useTabManagement, useTabbedForm, useWidgetTabs, withLinkFields };
2283
+ export { type Action, type ActionGroup, ActionMenu, AddressForm, AddressSchema, type AttributeChange, type AttributeChangeKind, AttributeValueInput, BadgeListSummary, ChipGroup, ChipInput, CodeCell, CodeHeader, Combobox, type Command, ConditionalTooltip, ConfirmPrompt, type ConfirmPromptProps, type CoreNavItem, CountrySelect, CreatedAtCell, CreatedAtHeader, type CurrencyInfo, type CustomFieldsModule, CustomerInfo, DataGrid, DataTable, DateCell, DateHeader, DateRangeDisplay, DeprecatedPercentageInput, DisplayExtensionZone, type DisplayExtensionZoneProps, DisplayField, type DisplayFieldProps, DisplaySection, type DisplaySectionField, type DisplaySectionProps, type EditAttributeAttribute, EditAttributeForm, type EditAttributeFormProps, EmailCell, EmailForm, EmailHeader, EmailSchema, ErrorBoundary, type ExtendableTable, ExtensionProvider, type ExtensionProviderProps, ExtensionRegistry, type ExtractableOffer, type ExtractableOffers, type FieldDiff, FilePreview, type FileType, FileUpload, type FileUploadProps, type Filter, FilterGroup, Form, FormExtensionZone, type FormExtensionZoneProps, GeneralSectionSkeleton, HandleInput, HeadingSkeleton, IconAvatar, IconButtonSkeleton, ImageAvatar, type ImageRef, IncludesTaxTooltip, InfiniteList, JsonViewSection, JsonViewSectionSkeleton, KeyboundForm, LinkButton, ListBadge, ListSummary, Listicle, type ListicleProps, LocalizedTablePagination, type MediaDiff, MetadataForm, MetadataSection, MoneyAmountCell, NameCell, NameHeader, type NavGroup, type NavGroupItem, type NavItemGroup, type NavigationModule, NoRecords, type NoRecordsProps, NoResults, type NoResultsProps, type OnboardingStep, type OnboardingStepDefault, OrderBy, PercentageInput, PermissionAction, type PermissionActionProps, PermissionGuard, type PermissionGuardProps, type PermissionedCommand, PermissionsContext, PermissionsProvider, type PermissionsProviderProps, PlaceholderCell, PriceListDateStatus, type PriceListGridGroupRow, type PriceListGridOfferRow, type PriceListGridRow, PriceListStatus, PriceListType, type ProductAttributeBatchPayload, ProductAttributeSection, type ProductAttributeSectionProps, type ProductChangeAttribute, ProductChangePanel, type ProductChangePanelProps, type ProductChangeProduct, type ProductChangeResolvers, type ProductChangeVariant, type ProductChangeView, ProgressBar, ProvinceSelect, Query, REFERENCE_FIELDS, RICH_TEXT_ALLOWED_ATTRIBUTES, RICH_TEXT_ALLOWED_TAGS, type ReferenceField, type ResolvedAttribute, type ResolvedDisplays, type ResolvedFormField, RichText, RichTextEditor, type RichTextEditorProps, RouteDrawer, RouteFocusModal, RoutePermissionGuard, SIDEBAR_MENU_CONTENT, SIDEBAR_RAIL_FADE, SectionNoAccess, SectionRow, type SectionRowProps, SegmentedControl, type SegmentedControlOption, SidebarContext, type SidebarContextValue, SidebarLink, type SidebarLinkProps, SidebarProvider, type SidebarState, SingleColumnPage, SingleColumnPageSkeleton, Skeleton, SortableList, SortableTree, StackedDrawer, StackedFocusModal, type StaticCountry, StatusCell, SwitchBox, type TQueryKey, type TabDefinition, TabbedForm, TableFooterSkeleton, TableSectionSkeleton, TableSkeleton, TextCell, TextHeader, TextSkeleton, Thumbnail, TransferOwnershipSchema, TwoColumnPage, TwoColumnPageSkeleton, type UseExtendableFormProps, type UseExtendableTableProps, type UseQueryOptionsWrapper, type VariantGroup, VisuallyHidden, type Widget, type WidgetModule, type WidgetPlacement, type WidgetTab, type WidgetTabs, WidgetZone, type WidgetZoneProps, type ZoneWidgets, _DataTable, applyActionPermissions, applyNavGroups, applyNavOverrides, buildAdditionalDataDefaults, buildAdditionalDataSchema, buildOfferGridData, buildProductChangeView, countries, createDataGridHelper, createDataGridPriceColumns, createFormHelper, createWithPermission, currencies, extractPricesFromOffers, extractReferenceIds, filterCommandsByPermission, formatFieldValue, genericForwardRef, getCountryByIso2, getCurrencySymbol, getDecimalDigits, getExtensionRegistry, getFormattedAddress, getFormattedCountry, getLinkQuery, getLocaleAmount, getNativeSymbol, getPriceListStatus, getStylizedAmount, groupNavItems, humanizeFieldName, isAmountLessThenRoundingError, isForbidden, isHtml, isImageList, isOrderActionable, isOrderAwaitingAction, isPermitted, isPriceListGroupRow, isProductRow, isReferenceField, isSameAddress, linkFields, mergeListFilters, permissionMapAllows, plainTextToHtml, productChangeViewHasContent, queryClient, queryKeysFactory, richTextContentClasses, sanitizeRichText, toPermissionList, useActionLocks, useCan, useCollapsedSidebar, useCombinedRefs, useCommandHistory, useDataTable, useDate, useDisplayFieldOverride, useDocumentDirection, useExpandedSidebar, useExtendableForm, useExtendableTable, useExtension, useExtensionActivity, useLinkQuery, usePermissionGate, usePermissions, usePermittedCommands, useQueryParams, useResourcePermissions, useRouteModal, useSidebar, useSidebarMenuPlacement, useStackedModal, useTabManagement, useTabbedForm, useWidgetTabs, withLinkFields };
package/dist/index.js CHANGED
@@ -9571,6 +9571,14 @@ var require_mutation = __commonJS({
9571
9571
  }
9572
9572
  });
9573
9573
 
9574
+ // ../types/dist/seller/service.js
9575
+ var require_service30 = __commonJS({
9576
+ "../types/dist/seller/service.js"(exports) {
9577
+ "use strict";
9578
+ Object.defineProperty(exports, "__esModule", { value: true });
9579
+ }
9580
+ });
9581
+
9574
9582
  // ../types/dist/seller/index.js
9575
9583
  var require_seller = __commonJS({
9576
9584
  "../types/dist/seller/index.js"(exports) {
@@ -9594,6 +9602,7 @@ var require_seller = __commonJS({
9594
9602
  Object.defineProperty(exports, "__esModule", { value: true });
9595
9603
  __exportStar(require_common37(), exports);
9596
9604
  __exportStar(require_mutation(), exports);
9605
+ __exportStar(require_service30(), exports);
9597
9606
  }
9598
9607
  });
9599
9608
 
@@ -10092,6 +10101,14 @@ var require_mutations25 = __commonJS({
10092
10101
  }
10093
10102
  });
10094
10103
 
10104
+ // ../types/dist/offer/service.js
10105
+ var require_service31 = __commonJS({
10106
+ "../types/dist/offer/service.js"(exports) {
10107
+ "use strict";
10108
+ Object.defineProperty(exports, "__esModule", { value: true });
10109
+ }
10110
+ });
10111
+
10095
10112
  // ../types/dist/offer/index.js
10096
10113
  var require_offer2 = __commonJS({
10097
10114
  "../types/dist/offer/index.js"(exports) {
@@ -10115,6 +10132,7 @@ var require_offer2 = __commonJS({
10115
10132
  Object.defineProperty(exports, "__esModule", { value: true });
10116
10133
  __exportStar(require_common41(), exports);
10117
10134
  __exportStar(require_mutations25(), exports);
10135
+ __exportStar(require_service31(), exports);
10118
10136
  }
10119
10137
  });
10120
10138
 
@@ -26046,76 +26064,118 @@ var ExtensionRegistry = class {
26046
26064
  getActivity(model, entity) {
26047
26065
  return this.configsFor(model).flatMap((c) => c.activity?.(entity) ?? []);
26048
26066
  }
26049
- /** Custom form fields for a model's form zone (and optional tab). */
26050
- getFormFields(model, zone, tab) {
26051
- const out = [];
26067
+ // Configs are ordered plugins first, host app last. Entries are keyed so a
26068
+ // later config replaces an earlier one in place — including entries another
26069
+ // config added — instead of stacking a duplicate.
26070
+ resolveFormFields(model) {
26071
+ const byName = /* @__PURE__ */ new Map();
26052
26072
  for (const config3 of this.configsFor(model)) {
26053
26073
  for (const form of config3.forms ?? []) {
26054
- if (form.zone !== zone) continue;
26055
- if (form.tab && tab && form.tab !== tab) continue;
26056
- if (form.tab && !tab) continue;
26057
- for (const [name, field] of Object.entries(form.fields)) {
26058
- out.push({ name, field });
26074
+ for (const [name, field] of Object.entries(form.fields ?? {})) {
26075
+ byName.set(name, { name, field, zone: form.zone, tab: form.tab });
26059
26076
  }
26060
26077
  }
26061
26078
  }
26062
- return out;
26079
+ return [...byName.values()];
26063
26080
  }
26064
- /** All custom form fields for a model, keyed for schema/default building. */
26065
- getAllFormFields(model) {
26066
- const out = [];
26067
- const seen = /* @__PURE__ */ new Set();
26081
+ /** Custom form fields for a model's form zone (and optional tab). */
26082
+ getFormFields(model, zone, tab) {
26083
+ return this.resolveFormFields(model).filter((entry) => {
26084
+ if (entry.zone !== zone) return false;
26085
+ if (!entry.tab) return true;
26086
+ return !!tab && entry.tab === tab;
26087
+ }).map(({ name, field }) => ({ name, field }));
26088
+ }
26089
+ /**
26090
+ * Resolves the onboarding wizard steps: built-ins merged with every
26091
+ * `zone: "onboarding"` form entry for the model. Later configs win per tab.
26092
+ */
26093
+ getOnboardingSteps(model, builtIns) {
26094
+ const steps = /* @__PURE__ */ new Map();
26095
+ for (const step of builtIns) {
26096
+ steps.set(step.id, {
26097
+ id: step.id,
26098
+ rank: step.rank,
26099
+ optional: step.optional,
26100
+ custom: false
26101
+ });
26102
+ }
26103
+ const maxBuiltInRank = Math.max(0, ...builtIns.map((step) => step.rank));
26104
+ let nextCustomRank = maxBuiltInRank;
26068
26105
  for (const config3 of this.configsFor(model)) {
26069
26106
  for (const form of config3.forms ?? []) {
26070
- for (const [name, field] of Object.entries(form.fields)) {
26071
- if (seen.has(name)) continue;
26072
- seen.add(name);
26073
- out.push({ name, field });
26107
+ if (form.zone !== "onboarding" || !form.tab) continue;
26108
+ const existing = steps.get(form.tab);
26109
+ const builtIn = builtIns.find((step2) => step2.id === form.tab);
26110
+ if (form.disabled) {
26111
+ if (builtIn?.required) {
26112
+ if (process.env.NODE_ENV === "development") {
26113
+ console.warn(
26114
+ `[mercur] The "${form.tab}" onboarding step can't be disabled.`
26115
+ );
26116
+ }
26117
+ continue;
26118
+ }
26119
+ if (existing) existing.disabled = true;
26120
+ continue;
26074
26121
  }
26122
+ const step = existing ?? {
26123
+ id: form.tab,
26124
+ rank: nextCustomRank += 1,
26125
+ optional: false,
26126
+ custom: true
26127
+ };
26128
+ if (form.label !== void 0) step.label = form.label;
26129
+ if (form.rank !== void 0) step.rank = form.rank;
26130
+ if (form.optional !== void 0) step.optional = form.optional;
26131
+ steps.set(form.tab, step);
26075
26132
  }
26076
26133
  }
26077
- return out;
26134
+ return [...steps.values()].filter((step) => !step.disabled).map(({ disabled: _disabled, ...step }) => step).sort((a, b) => a.rank - b.rank);
26135
+ }
26136
+ /** All custom form fields for a model, keyed for schema/default building. */
26137
+ getAllFormFields(model) {
26138
+ return this.resolveFormFields(model).map(({ name, field }) => ({ name, field }));
26078
26139
  }
26079
26140
  /** Section display contributions (field add/replace/remove + actions). */
26080
26141
  getDisplays(model, zone) {
26081
- const fields = [];
26142
+ const fields = /* @__PURE__ */ new Map();
26082
26143
  const actions = [];
26083
26144
  for (const config3 of this.configsFor(model)) {
26084
26145
  for (const display of config3.displays ?? []) {
26085
26146
  if (display.zone !== zone) continue;
26086
- if (display.fields) fields.push(...display.fields);
26147
+ for (const field of display.fields ?? []) fields.set(field.id, field);
26087
26148
  if (display.actions) actions.push(...display.actions);
26088
26149
  }
26089
26150
  }
26090
26151
  actions.sort((a, b) => (a.rank ?? 0) - (b.rank ?? 0));
26091
- return { fields, actions };
26152
+ return { fields: [...fields.values()], actions };
26092
26153
  }
26093
26154
  /** Merged list-table extension for a model. */
26094
26155
  getListExtension(model) {
26095
- const merged = {
26096
- columns: [],
26097
- bulkActions: [],
26098
- filters: [],
26099
- viewDefaults: { columnVisibility: {}, columnOrder: [] }
26100
- };
26156
+ const columns = /* @__PURE__ */ new Map();
26157
+ const filters = /* @__PURE__ */ new Map();
26158
+ const bulkActions = [];
26159
+ const columnVisibility = {};
26160
+ let columnOrder = [];
26101
26161
  for (const config3 of this.configsFor(model)) {
26102
26162
  const list = config3.list;
26103
26163
  if (!list) continue;
26104
- if (list.columns) merged.columns.push(...list.columns);
26105
- if (list.bulkActions) merged.bulkActions.push(...list.bulkActions);
26106
- if (list.filters) merged.filters.push(...list.filters);
26107
- if (list.viewDefaults?.columnVisibility) {
26108
- Object.assign(
26109
- merged.viewDefaults.columnVisibility,
26110
- list.viewDefaults.columnVisibility
26111
- );
26112
- }
26164
+ for (const column of list.columns ?? []) columns.set(column.id, column);
26165
+ for (const filter of list.filters ?? []) filters.set(filter.key, filter);
26166
+ if (list.bulkActions) bulkActions.push(...list.bulkActions);
26167
+ Object.assign(columnVisibility, list.viewDefaults?.columnVisibility);
26113
26168
  if (list.viewDefaults?.columnOrder) {
26114
- merged.viewDefaults.columnOrder = list.viewDefaults.columnOrder;
26169
+ columnOrder = list.viewDefaults.columnOrder;
26115
26170
  }
26116
26171
  }
26117
- merged.bulkActions.sort((a, b) => (a.rank ?? 0) - (b.rank ?? 0));
26118
- return merged;
26172
+ bulkActions.sort((a, b) => (a.rank ?? 0) - (b.rank ?? 0));
26173
+ return {
26174
+ columns: [...columns.values()],
26175
+ bulkActions,
26176
+ filters: [...filters.values()],
26177
+ viewDefaults: { columnVisibility, columnOrder }
26178
+ };
26119
26179
  }
26120
26180
  };
26121
26181
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mercurjs/dashboard-shared",
3
- "version": "2.3.7",
3
+ "version": "2.3.8-canary.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/mercurjs/mercur",
@@ -34,7 +34,7 @@
34
34
  "@medusajs/dashboard": "2.21.2",
35
35
  "@medusajs/icons": "2.21.2",
36
36
  "@medusajs/ui": "4.2.3",
37
- "@mercurjs/client": "2.3.7",
37
+ "@mercurjs/client": "2.3.8-canary.1",
38
38
  "@radix-ui/react-dialog": "1.1.19",
39
39
  "@radix-ui/react-dismissable-layer": "1.1.4",
40
40
  "@tanstack/react-query": "5.64.2",
@@ -70,9 +70,9 @@
70
70
  },
71
71
  "devDependencies": {
72
72
  "@medusajs/types": "2.21.2",
73
- "@mercurjs/core": "2.3.7",
74
- "@mercurjs/dashboard-sdk": "2.3.7",
75
- "@mercurjs/types": "2.3.7",
73
+ "@mercurjs/core": "2.3.8-canary.1",
74
+ "@mercurjs/dashboard-sdk": "2.3.8-canary.1",
75
+ "@mercurjs/types": "2.3.8-canary.1",
76
76
  "@types/lodash.debounce": "^4.0.8",
77
77
  "@types/react": "^18.3.2",
78
78
  "@types/react-dom": "^18.2.22",