@hexdspace/react 0.1.40 → 0.1.42

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
@@ -474,6 +474,7 @@ interface DialogOptions {
474
474
  modal: boolean;
475
475
  dismissible: boolean;
476
476
  zIndex: number;
477
+ resolveOnEnter?: boolean;
477
478
  }
478
479
  interface DialogInstance {
479
480
  id: string;
@@ -713,6 +714,15 @@ interface ShortcutBinding {
713
714
  group?: string;
714
715
  }
715
716
 
717
+ interface ListedShortcut {
718
+ registrationId: string;
719
+ scopeId: string;
720
+ combos: string[];
721
+ description: string;
722
+ group?: string;
723
+ }
724
+ type GroupedShortcuts = Record<string, ListedShortcut[]>;
725
+
716
726
  interface ShortcutRegistration {
717
727
  id: string;
718
728
  scopeId: string;
@@ -747,15 +757,6 @@ interface DisableScope {
747
757
  disableScope(id: string): void;
748
758
  }
749
759
 
750
- interface ListedShortcut {
751
- registrationId: string;
752
- scopeId: string;
753
- combos: string[];
754
- description: string;
755
- group?: string;
756
- }
757
- type GroupedShortcuts = Record<string, ListedShortcut[]>;
758
-
759
760
  interface ListShortcuts {
760
761
  listShortcutsByScope(): GroupedShortcuts;
761
762
  }
@@ -841,6 +842,7 @@ declare class KeyboardController {
841
842
  handleUnregisterShortcut(id: string): void;
842
843
  handleListShortcutsByScope(): GroupedShortcuts;
843
844
  }
845
+ declare const keyboardController: KeyboardController;
844
846
 
845
847
  declare const KeyboardProvider: React__default.FC<{
846
848
  children: React__default.ReactNode;
@@ -976,12 +978,13 @@ interface DialogProps<TPayload = unknown> extends Omit<React.HTMLAttributes<HTML
976
978
  onDismiss?: () => void;
977
979
  onResolve?: (result?: unknown) => void;
978
980
  onOpenChange?: (open: boolean) => void;
981
+ resolveOnEnter?: boolean;
979
982
  showClose?: boolean;
980
983
  closeLabel?: string;
981
984
  open?: boolean;
982
985
  defaultOpen?: boolean;
983
986
  }
984
- declare function Dialog<TPayload>({ id, template, payload, trigger, modal, dismissible, zIndex, maxWidthPx, onDismiss, onResolve, onOpenChange, showClose, closeLabel, open, defaultOpen, chrome, className, style, ...props }: DialogProps<TPayload>): react_jsx_runtime.JSX.Element;
987
+ declare function Dialog<TPayload>({ id, template, payload, trigger, modal, dismissible, zIndex, maxWidthPx, onDismiss, onResolve, onOpenChange, resolveOnEnter, showClose, closeLabel, open, defaultOpen, chrome, className, style, onKeyDown, ...props }: DialogProps<TPayload>): react_jsx_runtime.JSX.Element;
985
988
 
986
989
  type ControlLikeProps = {
987
990
  id?: string;
@@ -1089,6 +1092,7 @@ type DropdownMenuContentProps = Omit<React.ComponentPropsWithoutRef<typeof Dropd
1089
1092
  className?: string;
1090
1093
  style?: React.CSSProperties;
1091
1094
  ref?: React.Ref<HTMLDivElement>;
1095
+ onEntryFocus?: (event: Event) => void;
1092
1096
  };
1093
1097
  declare const dropdownMenuItemVariants: (props?: ({
1094
1098
  inset?: boolean | null | undefined;
@@ -1100,7 +1104,6 @@ interface DropdownMenuProps extends VariantProps<typeof dropdownMenuContentVaria
1100
1104
  children: React.ReactNode;
1101
1105
  open?: boolean;
1102
1106
  defaultOpen?: boolean;
1103
- keepMounted?: boolean;
1104
1107
  onOpenChange?: (open: boolean) => void;
1105
1108
  hoverOpen?: boolean;
1106
1109
  hoverCloseDelayMs?: number;
@@ -1117,7 +1120,7 @@ interface DropdownMenuProps extends VariantProps<typeof dropdownMenuContentVaria
1117
1120
  style?: React.CSSProperties;
1118
1121
  contentProps?: DropdownMenuContentProps;
1119
1122
  }
1120
- declare function DropdownMenu({ trigger, children, open, defaultOpen, keepMounted, onOpenChange, hoverOpen, hoverCloseDelayMs, modal, side, align, sideOffset, alignOffset, collisionPadding, portalContainer, ariaLabel, ariaLabelledBy, chrome, orientation, className, style, contentProps, }: DropdownMenuProps): react_jsx_runtime.JSX.Element;
1123
+ declare function DropdownMenu({ trigger, children, open, defaultOpen, onOpenChange, hoverOpen, hoverCloseDelayMs, modal, side, align, sideOffset, alignOffset, collisionPadding, portalContainer, ariaLabel, ariaLabelledBy, chrome, orientation, className, style, contentProps, }: DropdownMenuProps): react_jsx_runtime.JSX.Element;
1121
1124
  interface DropdownMenuItemProps extends React.ComponentPropsWithoutRef<typeof DropdownMenu$1.Item>, Omit<VariantProps<typeof dropdownMenuItemVariants>, 'orientation'> {
1122
1125
  }
1123
1126
  declare const DropdownMenuItem: React.ForwardRefExoticComponent<DropdownMenuItemProps & React.RefAttributes<HTMLDivElement>>;
@@ -1130,4 +1133,4 @@ interface KbdProps extends React.HTMLAttributes<HTMLSpanElement>, VariantProps<t
1130
1133
  }
1131
1134
  declare const Kbd: React.ForwardRefExoticComponent<KbdProps & React.RefAttributes<HTMLSpanElement>>;
1132
1135
 
1133
- export { AuthController, AuthControllerCtx, type AuthControllerDeps, AuthControllerProvider, AuthDispatchCtx, AuthProvider, type AuthState, AuthStateCtx, Button, type ButtonProps, type CacheInstruction, type ClearSelectionArgs, type ClearTarget, type CombineMode, ConfirmDialog, type ConfirmDialogProps, type ConfirmPayload, type CursorFallback, CustomDialog, type CustomDialogPayload, type CustomDialogProps, type CustomInstruction, DEFAULT_NOTIFICATION_CHANNEL, type DefaultDialogPayloads, type DefaultDialogTemplateKey, DefaultDialogTemplateKeys, Dialog, DialogContent, DialogController, DialogHost, type DialogInstance, type DialogOptions, type DialogProps, type DialogTemplate, type DisableScope, DisableScopeUseCase, DropdownMenu, DropdownMenuItem, type DropdownMenuItemProps, type DropdownMenuProps, DropdownMenuSeparator, type EnableScope, EnableScopeUseCase, type ErrorResponse, Field, type FieldProps, type GenericResponse, type HandleSelection, type HttpClient, HttpError, type HttpMethod, type HttpResponse, InMemorySelectionStore, InfoDialog, type InfoDialogProps, type InfoPayload, Input, type InputProps, type Instruction, type InstructionContext, type ItemId, Kbd, type KbdProps, KeyboardProvider, type ListShortcuts, ListShortcutsUseCase, MockAuthHttpClient, MockHttpClient, type Mode, type MutationFn, type Notification, type NotificationAction, NotificationHost, type NotificationInstruction, type NotificationVariant, NotifierController, type OnSuccessFn, type OptimisticSnapshot, type OptimisticUpdateFn, Popover, type PopoverProps, type QuerySelection, RedirectIfAuthed, type RedirectIfAuthedProps, type RegionId, type RegionKey, type RegionSelection, type RegisterRegionArgs, type RegisterShortcut, RegisterShortcutUseCase, type RequestConfig, RequireAuth, type RequireAuthProps, type ResolvedToastTheme, type ResponsiveMutation, type ScopeId, ScopeManager, type ScopeState, SelectionController, type SelectionControllerDeps, SelectionControllerProvider, type SelectionState, type SelectionStore, type ShortcutBinding, type ShortcutHandler, type ShortcutRegistration, type ShortcutScope, Skeleton, type SkeletonProps, Textarea, type TextareaProps, type ToastActionTheme, type ToastTheme, type ToastTransition, type ToastifyCSSVars, Tooltip, type UIFail, type UIOk, type UIResult, type UnregisterShortcut, UnregisterShortcutUseCase, type UseVimRegionArgs, type UseVimRegionResult, type User, VimController, type VimControllerDeps, VimControllerProvider, type VimDirection, type VimInterDirection, type VimKeyState, type VimPending, type VimRegionMeta, VimRegionRegistry, authController, controllerFactory, createAuthController, createSelectionController, createVimController, dialogController, httpClient as fetchHttpClient, getDialogTemplate, notifierController, registerDefaultDialogs, registerDialogTemplate, resolveToastTheme, ui, unregisterDialogTemplate, useAuth, useAuthActions, useAuthController, useAuthDispatch, useAuthedUser, useDialog, useKeyboardController, useResponsiveMutation, useSelectionController, useShortcut, useShortcutScope, useVimBindings, useVimController, useVimRegion };
1136
+ export { AuthController, AuthControllerCtx, type AuthControllerDeps, AuthControllerProvider, AuthDispatchCtx, AuthProvider, type AuthState, AuthStateCtx, Button, type ButtonProps, type CacheInstruction, type ClearSelectionArgs, type ClearTarget, type CombineMode, ConfirmDialog, type ConfirmDialogProps, type ConfirmPayload, type CursorFallback, CustomDialog, type CustomDialogPayload, type CustomDialogProps, type CustomInstruction, DEFAULT_NOTIFICATION_CHANNEL, type DefaultDialogPayloads, type DefaultDialogTemplateKey, DefaultDialogTemplateKeys, Dialog, DialogContent, DialogController, DialogHost, type DialogInstance, type DialogOptions, type DialogProps, type DialogTemplate, type DisableScope, DisableScopeUseCase, DropdownMenu, DropdownMenuItem, type DropdownMenuItemProps, type DropdownMenuProps, DropdownMenuSeparator, type EnableScope, EnableScopeUseCase, type ErrorResponse, Field, type FieldProps, type GenericResponse, type GroupedShortcuts, type HandleSelection, type HttpClient, HttpError, type HttpMethod, type HttpResponse, InMemorySelectionStore, InfoDialog, type InfoDialogProps, type InfoPayload, Input, type InputProps, type Instruction, type InstructionContext, type ItemId, Kbd, type KbdProps, KeyboardController, KeyboardProvider, type ListShortcuts, ListShortcutsUseCase, type ListedShortcut, MockAuthHttpClient, MockHttpClient, type Mode, type MutationFn, type Notification, type NotificationAction, NotificationHost, type NotificationInstruction, type NotificationVariant, NotifierController, type OnSuccessFn, type OptimisticSnapshot, type OptimisticUpdateFn, Popover, type PopoverProps, type QuerySelection, RedirectIfAuthed, type RedirectIfAuthedProps, type RegionId, type RegionKey, type RegionSelection, type RegisterRegionArgs, type RegisterShortcut, RegisterShortcutUseCase, type RequestConfig, RequireAuth, type RequireAuthProps, type ResolvedToastTheme, type ResponsiveMutation, type ScopeId, ScopeManager, type ScopeState, SelectionController, type SelectionControllerDeps, SelectionControllerProvider, type SelectionState, type SelectionStore, type ShortcutBinding, type ShortcutHandler, type ShortcutRegistration, type ShortcutScope, Skeleton, type SkeletonProps, Textarea, type TextareaProps, type ToastActionTheme, type ToastTheme, type ToastTransition, type ToastifyCSSVars, Tooltip, type UIFail, type UIOk, type UIResult, type UnregisterShortcut, UnregisterShortcutUseCase, type UseVimRegionArgs, type UseVimRegionResult, type User, VimController, type VimControllerDeps, VimControllerProvider, type VimDirection, type VimInterDirection, type VimKeyState, type VimPending, type VimRegionMeta, VimRegionRegistry, authController, controllerFactory, createAuthController, createSelectionController, createVimController, dialogController, httpClient as fetchHttpClient, getDialogTemplate, keyboardController, notifierController, registerDefaultDialogs, registerDialogTemplate, resolveToastTheme, ui, unregisterDialogTemplate, useAuth, useAuthActions, useAuthController, useAuthDispatch, useAuthedUser, useDialog, useKeyboardController, useResponsiveMutation, useSelectionController, useShortcut, useShortcutScope, useVimBindings, useVimController, useVimRegion };
package/dist/index.js CHANGED
@@ -1686,6 +1686,7 @@ function Dialog({
1686
1686
  onDismiss,
1687
1687
  onResolve,
1688
1688
  onOpenChange,
1689
+ resolveOnEnter = true,
1689
1690
  showClose = true,
1690
1691
  closeLabel = "Close dialog",
1691
1692
  open: open2,
@@ -1693,6 +1694,7 @@ function Dialog({
1693
1694
  chrome,
1694
1695
  className,
1695
1696
  style,
1697
+ onKeyDown,
1696
1698
  ...props
1697
1699
  }) {
1698
1700
  const fallbackId = React3.useId();
@@ -1734,6 +1736,39 @@ function Dialog({
1734
1736
  const overlayClassName = cn(dialogOverlayClass);
1735
1737
  const surfaceClassName = cn(dialogSurfaceVariants({ chrome }));
1736
1738
  const panelRef = React3.useRef(null);
1739
+ const handleKeyDown = React3.useCallback(
1740
+ (event) => {
1741
+ onKeyDown?.(event);
1742
+ if (event.defaultPrevented || !resolveOnEnter) return;
1743
+ const isComposing = "isComposing" in event.nativeEvent ? event.nativeEvent.isComposing : false;
1744
+ if (event.key !== "Enter" || isComposing || event.altKey || event.ctrlKey || event.metaKey) return;
1745
+ if (event.shiftKey) return;
1746
+ const target = event.target;
1747
+ if (target) {
1748
+ if (target.isContentEditable) return;
1749
+ const tagName = target.tagName;
1750
+ if (tagName === "TEXTAREA" || tagName === "SELECT") return;
1751
+ if (target instanceof HTMLInputElement) {
1752
+ const inputType = target.type;
1753
+ if (!["button", "submit", "reset", "checkbox", "radio"].includes(inputType)) return;
1754
+ }
1755
+ }
1756
+ const defaultAction = panelRef.current?.querySelector("[data-dialog-default]");
1757
+ if (defaultAction) {
1758
+ const isDisabled = defaultAction instanceof HTMLButtonElement && defaultAction.disabled || defaultAction.getAttribute("aria-disabled") === "true";
1759
+ if (!isDisabled) {
1760
+ event.preventDefault();
1761
+ defaultAction.click();
1762
+ }
1763
+ return;
1764
+ }
1765
+ if (onResolve) {
1766
+ event.preventDefault();
1767
+ handleResolve(payload);
1768
+ }
1769
+ },
1770
+ [handleResolve, onKeyDown, onResolve, payload, resolveOnEnter]
1771
+ );
1737
1772
  return /* @__PURE__ */ jsxs3(DialogPrimitive.Root, { open: open2, defaultOpen, onOpenChange: handleOpenChange, modal, children: [
1738
1773
  trigger ? /* @__PURE__ */ jsx7(DialogPrimitive.Trigger, { asChild: true, children: trigger }) : null,
1739
1774
  /* @__PURE__ */ jsx7(DialogPrimitive.Portal, { forceMount: true, children: /* @__PURE__ */ jsx7(AnimatePresence, { children: isOpen ? /* @__PURE__ */ jsxs3(Fragment2, { children: [
@@ -1776,6 +1811,7 @@ function Dialog({
1776
1811
  panelRef.current?.focus();
1777
1812
  });
1778
1813
  },
1814
+ onKeyDown: handleKeyDown,
1779
1815
  ...props,
1780
1816
  children: /* @__PURE__ */ jsx7(
1781
1817
  motion.div,
@@ -1864,7 +1900,15 @@ var ConfirmDialog = (props) => {
1864
1900
  p.message ? /* @__PURE__ */ jsx8(DialogPrimitive2.Description, { className: "mt-2 text-sm opacity-80", children: p.message }) : null,
1865
1901
  /* @__PURE__ */ jsxs4("div", { className: "mt-5 flex items-center justify-end gap-4", children: [
1866
1902
  /* @__PURE__ */ jsx8(DialogPrimitive2.Close, { asChild: true, children: /* @__PURE__ */ jsx8(Button, { variant: "secondary", children: p.cancelText ?? "Cancel" }) }),
1867
- /* @__PURE__ */ jsx8(DialogPrimitive2.Close, { asChild: true, children: /* @__PURE__ */ jsx8(Button, { variant: confirmVariant, onClick: () => props.onResolve?.({ confirmed: true }), children: p.confirmText ?? "Confirm" }) })
1903
+ /* @__PURE__ */ jsx8(DialogPrimitive2.Close, { asChild: true, children: /* @__PURE__ */ jsx8(
1904
+ Button,
1905
+ {
1906
+ variant: confirmVariant,
1907
+ "data-dialog-default": true,
1908
+ onClick: () => props.onResolve?.({ confirmed: true }),
1909
+ children: p.confirmText ?? "Confirm"
1910
+ }
1911
+ ) })
1868
1912
  ] })
1869
1913
  ] });
1870
1914
  };
@@ -1948,7 +1992,7 @@ var OpenDialogUseCase = class {
1948
1992
  }
1949
1993
  async execute(cmd) {
1950
1994
  const id = uuid();
1951
- const options = cmd.options ?? getDefaultOptions();
1995
+ const options = { ...getDefaultOptions(), ...cmd.options };
1952
1996
  if (!options.zIndex) {
1953
1997
  options.zIndex = 2e3;
1954
1998
  }
@@ -1967,7 +2011,8 @@ function getDefaultOptions() {
1967
2011
  return {
1968
2012
  modal: true,
1969
2013
  dismissible: true,
1970
- zIndex: 2500
2014
+ zIndex: 2500,
2015
+ resolveOnEnter: true
1971
2016
  };
1972
2017
  }
1973
2018
 
@@ -2120,6 +2165,7 @@ var DialogHost = () => {
2120
2165
  payload: dialog.payload,
2121
2166
  modal: dialog.options.modal,
2122
2167
  dismissible: dialog.options.dismissible,
2168
+ resolveOnEnter: dialog.options.resolveOnEnter,
2123
2169
  zIndex: dialog.options.zIndex + index,
2124
2170
  open: !isClosing,
2125
2171
  onResolve: (result) => scheduleClose(dialog.id, "resolve", result),
@@ -4531,7 +4577,6 @@ function DropdownMenu({
4531
4577
  children,
4532
4578
  open: open2,
4533
4579
  defaultOpen,
4534
- keepMounted = false,
4535
4580
  onOpenChange,
4536
4581
  hoverOpen = false,
4537
4582
  hoverCloseDelayMs = 50,
@@ -4637,15 +4682,7 @@ function DropdownMenu({
4637
4682
  );
4638
4683
  const onPointerDownOutside = (event) => {
4639
4684
  restContentProps.onPointerDownOutside?.(event);
4640
- if (keepMounted) {
4641
- const target = event.target;
4642
- const isTriggerEvent = target instanceof Node && triggerRef.current?.contains(target);
4643
- if (!resolvedOpen || isTriggerEvent) {
4644
- event.preventDefault();
4645
- }
4646
- }
4647
4685
  };
4648
- const keepMountedClassName = keepMounted && !resolvedOpen ? "pointer-events-none" : void 0;
4649
4686
  const initialMotionState = {
4650
4687
  opacity: 0,
4651
4688
  scale: 0.98,
@@ -4658,22 +4695,12 @@ function DropdownMenu({
4658
4695
  x: 0,
4659
4696
  y: 0
4660
4697
  };
4661
- const closedMotionState = {
4662
- opacity: 0,
4663
- scale: 0.98,
4664
- x: "var(--menu-x)",
4665
- y: "var(--menu-y)"
4666
- };
4667
- const motionEase = keepMounted ? resolvedOpen ? "easeOut" : "easeIn" : "easeOut";
4668
4698
  const onInteractOutside = (event) => {
4669
4699
  restContentProps.onInteractOutside?.(event);
4670
- if (keepMounted) {
4671
- const target = event.target;
4672
- const isTriggerEvent = target instanceof Node && triggerRef.current?.contains(target);
4673
- if (!resolvedOpen || isTriggerEvent) {
4674
- event.preventDefault();
4675
- }
4676
- }
4700
+ };
4701
+ const onEntryFocus = (event) => {
4702
+ restContentProps.onEntryFocus?.(event);
4703
+ event.preventDefault();
4677
4704
  };
4678
4705
  const resolvedContentProps = hoverOpen ? {
4679
4706
  ...restContentProps,
@@ -4692,11 +4719,14 @@ function DropdownMenu({
4692
4719
  closeTimer.clear();
4693
4720
  },
4694
4721
  onPointerDownOutside,
4722
+ onEntryFocus,
4695
4723
  onInteractOutside
4696
4724
  } : {
4697
4725
  ...restContentProps,
4698
4726
  onKeyDown: handleContentKeyDown,
4699
- ...keepMounted ? { onPointerDownOutside, onInteractOutside } : void 0
4727
+ onEntryFocus,
4728
+ onPointerDownOutside,
4729
+ onInteractOutside
4700
4730
  };
4701
4731
  const contentNode = /* @__PURE__ */ jsx22(
4702
4732
  DropdownMenuPrimitive.Content,
@@ -4714,17 +4744,15 @@ function DropdownMenu({
4714
4744
  children: /* @__PURE__ */ jsx22(
4715
4745
  motion4.div,
4716
4746
  {
4717
- "aria-hidden": keepMounted ? !resolvedOpen : void 0,
4718
4747
  className: cn(
4719
4748
  dropdownMenuContentVariants({ chrome, orientation }),
4720
- keepMountedClassName,
4721
4749
  className,
4722
4750
  contentClassName
4723
4751
  ),
4724
4752
  ref: composedContentRef,
4725
4753
  initial: initialMotionState,
4726
- animate: keepMounted ? resolvedOpen ? openMotionState : closedMotionState : openMotionState,
4727
- exit: keepMounted ? void 0 : {
4754
+ animate: openMotionState,
4755
+ exit: {
4728
4756
  opacity: 0,
4729
4757
  scale: 0.98,
4730
4758
  x: "var(--menu-x)",
@@ -4733,7 +4761,7 @@ function DropdownMenu({
4733
4761
  },
4734
4762
  transition: {
4735
4763
  duration: motionDuration,
4736
- ease: motionEase
4764
+ ease: "easeOut"
4737
4765
  },
4738
4766
  style: { ...style, ...contentStyle },
4739
4767
  children
@@ -4743,7 +4771,7 @@ function DropdownMenu({
4743
4771
  );
4744
4772
  return /* @__PURE__ */ jsx22(DropdownMenuOrientationContext.Provider, { value: resolvedItemsOrientation, children: /* @__PURE__ */ jsxs11(DropdownMenuPrimitive.Root, { open: resolvedOpen, onOpenChange: handleOpenChange, modal, children: [
4745
4773
  /* @__PURE__ */ jsx22(DropdownMenuPrimitive.Trigger, { asChild: true, children: resolvedTrigger }),
4746
- /* @__PURE__ */ jsx22(DropdownMenuPrimitive.Portal, { forceMount: true, container: portalContainer, children: keepMounted ? contentNode : /* @__PURE__ */ jsx22(AnimatePresence4, { children: resolvedOpen ? contentNode : null }) })
4774
+ /* @__PURE__ */ jsx22(DropdownMenuPrimitive.Portal, { forceMount: true, container: portalContainer, children: /* @__PURE__ */ jsx22(AnimatePresence4, { children: resolvedOpen ? contentNode : null }) })
4747
4775
  ] }) });
4748
4776
  }
4749
4777
  var DropdownMenuItem = React13.forwardRef(
@@ -4821,6 +4849,7 @@ export {
4821
4849
  InfoDialog,
4822
4850
  Input,
4823
4851
  Kbd,
4852
+ KeyboardController,
4824
4853
  KeyboardProvider,
4825
4854
  ListShortcutsUseCase,
4826
4855
  MockAuthHttpClient,
@@ -4849,6 +4878,7 @@ export {
4849
4878
  dialogController,
4850
4879
  httpClient as fetchHttpClient,
4851
4880
  getDialogTemplate,
4881
+ keyboardController,
4852
4882
  notifierController,
4853
4883
  registerDefaultDialogs,
4854
4884
  registerDialogTemplate,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hexdspace/react",
3
- "version": "0.1.40",
3
+ "version": "0.1.42",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",