@prizmui/components 0.1.4 → 0.1.6

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.
@@ -1,22 +1,15 @@
1
- import type { ComponentProps, ComponentState, Slot, ARIAButtonSlotProps } from '../../utilities';
1
+ import type { ComponentProps, ComponentState, Slot } from '../../utilities';
2
2
  export type PopoverProps = {
3
3
  children?: any;
4
4
  /** @default false */
5
5
  defaultOpen?: boolean;
6
6
  };
7
- export type PopoverTriggerSlots = {
8
- root: NonNullable<Slot<ARIAButtonSlotProps<'a' | 'div'>>>;
9
- };
10
- export type PopoverTriggerProps = ComponentProps<PopoverTriggerSlots> & {
11
- /** @default false */
12
- disabled?: boolean;
13
- };
14
- export type PopoverTriggerState = ComponentState<PopoverTriggerSlots> & {
15
- disabled: boolean;
7
+ export type PopoverTriggerProps = {
8
+ children?: any;
16
9
  };
17
- export type PopoverContentSlots = {
10
+ export type PopoverSurfaceSlots = {
18
11
  root: NonNullable<Slot<'div'>>;
19
12
  };
20
- export type PopoverContentProps = ComponentProps<PopoverContentSlots>;
21
- export type PopoverContentState = ComponentState<PopoverContentSlots>;
13
+ export type PopoverSurfaceProps = ComponentProps<PopoverSurfaceSlots>;
14
+ export type PopoverSurfaceState = ComponentState<PopoverSurfaceSlots>;
22
15
  //# sourceMappingURL=Popover.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Popover.types.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/Popover.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,IAAI,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAIjG,MAAM,MAAM,YAAY,GAAG;IACvB,QAAQ,CAAC,EAAE,GAAG,CAAC;IACf,qBAAqB;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;CACzB,CAAC;AAIF,MAAM,MAAM,mBAAmB,GAAG;IAC9B,IAAI,EAAE,WAAW,CAAC,IAAI,CAAC,mBAAmB,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;CAC7D,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,cAAc,CAAC,mBAAmB,CAAC,GAAG;IACpE,qBAAqB;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,cAAc,CAAC,mBAAmB,CAAC,GAAG;IACpE,QAAQ,EAAE,OAAO,CAAC;CACrB,CAAC;AAIF,MAAM,MAAM,mBAAmB,GAAG;IAC9B,IAAI,EAAE,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;CAClC,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,cAAc,CAAC,mBAAmB,CAAC,CAAC;AAEtE,MAAM,MAAM,mBAAmB,GAAG,cAAc,CAAC,mBAAmB,CAAC,CAAC"}
1
+ {"version":3,"file":"Popover.types.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/Popover.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAI5E,MAAM,MAAM,YAAY,GAAG;IACvB,QAAQ,CAAC,EAAE,GAAG,CAAC;IACf,qBAAqB;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;CACzB,CAAC;AAIF,MAAM,MAAM,mBAAmB,GAAG;IAC9B,QAAQ,CAAC,EAAE,GAAG,CAAC;CAClB,CAAC;AAIF,MAAM,MAAM,mBAAmB,GAAG;IAC9B,IAAI,EAAE,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;CAClC,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,cAAc,CAAC,mBAAmB,CAAC,CAAC;AAEtE,MAAM,MAAM,mBAAmB,GAAG,cAAc,CAAC,mBAAmB,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { FC } from 'jsx-framework-test-pb';
2
+ import type { PopoverSurfaceProps } from './Popover.types';
3
+ export declare const PopoverSurface: FC<PopoverSurfaceProps>;
4
+ //# sourceMappingURL=PopoverSurface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PopoverSurface.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/PopoverSurface.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,uBAAuB,CAAC;AAMhD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAG3D,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CA6ClD,CAAC"}
@@ -0,0 +1,35 @@
1
+ import { jsx as _jsx } from "jsx-framework-test-pb/jsx-runtime";
2
+ import { useContext } from 'jsx-framework-test-pb';
3
+ import { PrizmProvider } from '../PrizmProvider/PrizmProvider';
4
+ import { ThemeContext } from '../PrizmProvider/ThemeContext';
5
+ import { PopoverContext } from './Popover.context';
6
+ import { usePopoverSurfaceStyles, popoverSurfaceClassNames } from './usePopoverSurfaceStyles.styles';
7
+ export const PopoverSurface = (props) => {
8
+ const context = useContext(PopoverContext);
9
+ const theme = useContext(ThemeContext);
10
+ const surfaceStyles = usePopoverSurfaceStyles();
11
+ const { children } = props;
12
+ // Return a reactive function — the framework calls createReactiveChild on it,
13
+ // so the surface is added to / removed from the DOM as open.val changes.
14
+ return (() => {
15
+ if (!context?.open.val || !theme)
16
+ return null;
17
+ const trigger = document.getElementById(context.triggerId);
18
+ const rect = trigger?.getBoundingClientRect();
19
+ return (_jsx(PrizmProvider, { theme: theme, style: {
20
+ position: 'absolute',
21
+ top: '0',
22
+ left: '0',
23
+ right: '0',
24
+ bottom: '0',
25
+ zIndex: '1000000',
26
+ backgroundColor: 'transparent',
27
+ // Catches all clicks — those outside the surface close the popover
28
+ pointerEvents: 'auto',
29
+ }, onClick: () => { context.open.val = false; }, children: _jsx("div", { className: `${popoverSurfaceClassNames.root} ${surfaceStyles.root}`, style: {
30
+ position: 'absolute',
31
+ top: rect ? `${rect.bottom + 8}px` : '0',
32
+ left: rect ? `${rect.left}px` : '0',
33
+ }, onClick: (e) => e.stopPropagation(), children: children }) }));
34
+ });
35
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"PopoverTrigger.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/PopoverTrigger.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAI3D,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CAIlD,CAAC"}
1
+ {"version":3,"file":"PopoverTrigger.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/PopoverTrigger.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,uBAAuB,CAAC;AAIhD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAE3D,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CA2BlD,CAAC"}
@@ -1,6 +1,28 @@
1
- import { usePopoverTrigger } from './usePopoverTrigger';
2
- import { renderPopoverTrigger } from './renderPopoverTrigger';
1
+ import { useContext, isElement } from 'jsx-framework-test-pb';
2
+ import { PopoverContext } from './Popover.context';
3
3
  export const PopoverTrigger = (props) => {
4
- const state = usePopoverTrigger(props);
5
- return renderPopoverTrigger(state);
4
+ const context = useContext(PopoverContext);
5
+ const children = Array.isArray(props.children) ? props.children : [props.children];
6
+ const child = children[0];
7
+ if (!isElement(child))
8
+ return child;
9
+ if (!context)
10
+ return child;
11
+ const { open, triggerId, contentId } = context;
12
+ const existingOnClick = child.props.onClick;
13
+ return {
14
+ ...child,
15
+ props: {
16
+ ...child.props,
17
+ id: triggerId,
18
+ 'aria-expanded': () => open.val,
19
+ 'aria-controls': contentId,
20
+ 'aria-haspopup': 'true',
21
+ onClick: (e) => {
22
+ open.val = !open.val;
23
+ if (typeof existingOnClick === 'function')
24
+ existingOnClick(e);
25
+ },
26
+ },
27
+ };
6
28
  };
@@ -1,8 +1,8 @@
1
1
  export { Popover } from './Popover';
2
2
  export type { PopoverProps } from './Popover.types';
3
3
  export { PopoverTrigger } from './PopoverTrigger';
4
- export type { PopoverTriggerProps, PopoverTriggerSlots, PopoverTriggerState } from './Popover.types';
5
- export { PopoverContent } from './PopoverContent';
6
- export type { PopoverContentProps, PopoverContentSlots, PopoverContentState } from './Popover.types';
7
- export { popoverContentClassNames } from './usePopoverContentStyles.styles';
4
+ export type { PopoverTriggerProps } from './Popover.types';
5
+ export { PopoverSurface } from './PopoverSurface';
6
+ export type { PopoverSurfaceProps, PopoverSurfaceSlots, PopoverSurfaceState } from './Popover.types';
7
+ export { popoverSurfaceClassNames } from './usePopoverSurfaceStyles.styles';
8
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,YAAY,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEpD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAErG,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACrG,OAAO,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,YAAY,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEpD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAE3D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACrG,OAAO,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC"}
@@ -1,4 +1,4 @@
1
1
  export { Popover } from './Popover';
2
2
  export { PopoverTrigger } from './PopoverTrigger';
3
- export { PopoverContent } from './PopoverContent';
4
- export { popoverContentClassNames } from './usePopoverContentStyles.styles';
3
+ export { PopoverSurface } from './PopoverSurface';
4
+ export { popoverSurfaceClassNames } from './usePopoverSurfaceStyles.styles';
@@ -0,0 +1,5 @@
1
+ import type { SlotClassNames } from '../../utilities';
2
+ import type { PopoverSurfaceSlots } from './Popover.types';
3
+ export declare const popoverSurfaceClassNames: SlotClassNames<PopoverSurfaceSlots>;
4
+ export declare const usePopoverSurfaceStyles: (options?: import("calame").MakeStylesOptions) => Record<"root", string>;
5
+ //# sourceMappingURL=usePopoverSurfaceStyles.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePopoverSurfaceStyles.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/usePopoverSurfaceStyles.styles.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAG3D,eAAO,MAAM,wBAAwB,EAAE,cAAc,CAAC,mBAAmB,CAExE,CAAC;AAEF,eAAO,MAAM,uBAAuB,0EASlC,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { makeStyles } from 'calame';
2
+ import { tokens } from '@prizmui/tokens';
3
+ export const popoverSurfaceClassNames = {
4
+ root: 'c-PopoverSurface',
5
+ };
6
+ export const usePopoverSurfaceStyles = makeStyles({
7
+ root: {
8
+ backgroundColor: tokens.colorNeutralBackground1,
9
+ border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke2}`,
10
+ borderRadius: tokens.borderRadiusMedium,
11
+ boxShadow: '0 8px 16px rgba(0,0,0,.14), 0 0 2px rgba(0,0,0,.12)',
12
+ padding: `${tokens.spacingVerticalM} ${tokens.spacingHorizontalM}`,
13
+ minWidth: '160px',
14
+ },
15
+ });
@@ -0,0 +1,3 @@
1
+ import type { Theme } from '@prizmui/tokens';
2
+ export declare const ThemeContext: import("jsx-framework-test-pb").Context<Theme | null>;
3
+ //# sourceMappingURL=ThemeContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ThemeContext.d.ts","sourceRoot":"","sources":["../../../src/components/PrizmProvider/ThemeContext.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAE7C,eAAO,MAAM,YAAY,uDAAoC,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { createContext } from 'jsx-framework-test-pb';
2
+ export const ThemeContext = createContext(null);
@@ -1,4 +1,5 @@
1
1
  export { PrizmProvider, } from './PrizmProvider';
2
2
  export { prizmProviderClassNames } from './useProviderStyles.styles';
3
3
  export type { PrizmProviderProps, PrizmProviderSlots, PrizmProviderState } from './PrizmProvider.types';
4
+ export { ThemeContext } from './ThemeContext';
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/PrizmProvider/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,GAAG,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AACrE,YAAY,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/PrizmProvider/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,GAAG,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AACrE,YAAY,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AACxG,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
@@ -1,2 +1,3 @@
1
1
  export { PrizmProvider, } from './PrizmProvider';
2
2
  export { prizmProviderClassNames } from './useProviderStyles.styles';
3
+ export { ThemeContext } from './ThemeContext';
@@ -1 +1 @@
1
- {"version":3,"file":"renderProvider.d.ts","sourceRoot":"","sources":["../../../src/components/PrizmProvider/renderProvider.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAsB,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAEpF,eAAO,MAAM,cAAc,GAAI,OAAO,kBAAkB,KAAG,UAQ1D,CAAC"}
1
+ {"version":3,"file":"renderProvider.d.ts","sourceRoot":"","sources":["../../../src/components/PrizmProvider/renderProvider.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAsB,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAGpF,eAAO,MAAM,cAAc,GAAI,OAAO,kBAAkB,KAAG,UAU1D,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import { jsx as _jsx } from "jsx-framework-test-pb/jsx-runtime";
2
2
  import { assertSlots } from '../../utilities';
3
+ import { ThemeContext } from './ThemeContext';
3
4
  export const renderProvider = (state) => {
4
5
  assertSlots(state);
5
- return (_jsx(state.root, { children: state.root.children }));
6
+ return (_jsx(ThemeContext.Provider, { value: state.theme, children: _jsx(state.root, { children: state.root.children }) }));
6
7
  };
package/dist/index.d.ts CHANGED
@@ -4,6 +4,7 @@ export { Button, buttonClassNames } from './components/Button';
4
4
  export type { ButtonProps, ButtonSlots, ButtonState } from './components/Button';
5
5
  export { Text, textClassNames } from './components/Text';
6
6
  export type { TextProps, TextSlots, TextState } from './components/Text';
7
- export { Popover, PopoverTrigger, PopoverContent, popoverContentClassNames } from './components/Popover';
8
- export type { PopoverProps, PopoverTriggerProps, PopoverTriggerSlots, PopoverTriggerState, PopoverContentProps, PopoverContentSlots, PopoverContentState } from './components/Popover';
7
+ export { Popover, PopoverTrigger, PopoverSurface, popoverSurfaceClassNames } from './components/Popover';
8
+ export type { PopoverProps, PopoverTriggerProps, PopoverSurfaceProps, PopoverSurfaceSlots, PopoverSurfaceState } from './components/Popover';
9
+ export { ThemeContext } from './components/PrizmProvider';
9
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AACpF,YAAY,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAE7G,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC/D,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEjF,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACzD,YAAY,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEzE,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AACzG,YAAY,EAAE,YAAY,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AACpF,YAAY,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAE7G,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC/D,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEjF,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACzD,YAAY,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEzE,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AACzG,YAAY,EAAE,YAAY,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE7I,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC"}
package/dist/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  export { PrizmProvider, prizmProviderClassNames } from './components/PrizmProvider';
2
2
  export { Button, buttonClassNames } from './components/Button';
3
3
  export { Text, textClassNames } from './components/Text';
4
- export { Popover, PopoverTrigger, PopoverContent, popoverContentClassNames } from './components/Popover';
4
+ export { Popover, PopoverTrigger, PopoverSurface, popoverSurfaceClassNames } from './components/Popover';
5
+ export { ThemeContext } from './components/PrizmProvider';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prizmui/components",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",