@yoopta/ui 6.0.0-beta.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.
Files changed (107) hide show
  1. package/LICENSE +21 -0
  2. package/dist/action-menu-list/action-menu-list.d.ts +27 -0
  3. package/dist/action-menu-list/action-menu-list.d.ts.map +1 -0
  4. package/dist/action-menu-list/hooks.d.ts +912 -0
  5. package/dist/action-menu-list/hooks.d.ts.map +1 -0
  6. package/dist/action-menu-list/index.d.ts +7 -0
  7. package/dist/action-menu-list/index.d.ts.map +1 -0
  8. package/dist/action-menu-list/store.d.ts +22 -0
  9. package/dist/action-menu-list/store.d.ts.map +1 -0
  10. package/dist/action-menu-list/store.test.d.ts +2 -0
  11. package/dist/action-menu-list/store.test.d.ts.map +1 -0
  12. package/dist/action-menu-list/types.d.ts +26 -0
  13. package/dist/action-menu-list/types.d.ts.map +1 -0
  14. package/dist/action-menu-list/utils.d.ts +7 -0
  15. package/dist/action-menu-list/utils.d.ts.map +1 -0
  16. package/dist/block-options/block-options.d.ts +30 -0
  17. package/dist/block-options/block-options.d.ts.map +1 -0
  18. package/dist/block-options/hooks.d.ts +900 -0
  19. package/dist/block-options/hooks.d.ts.map +1 -0
  20. package/dist/block-options/index.d.ts +5 -0
  21. package/dist/block-options/index.d.ts.map +1 -0
  22. package/dist/block-options/store.d.ts +15 -0
  23. package/dist/block-options/store.d.ts.map +1 -0
  24. package/dist/block-options/store.test.d.ts +2 -0
  25. package/dist/block-options/store.test.d.ts.map +1 -0
  26. package/dist/floating-block-actions/floating-block-actions.d.ts +21 -0
  27. package/dist/floating-block-actions/floating-block-actions.d.ts.map +1 -0
  28. package/dist/floating-block-actions/hooks.d.ts +30 -0
  29. package/dist/floating-block-actions/hooks.d.ts.map +1 -0
  30. package/dist/floating-block-actions/index.d.ts +6 -0
  31. package/dist/floating-block-actions/index.d.ts.map +1 -0
  32. package/dist/floating-block-actions/store.d.ts +19 -0
  33. package/dist/floating-block-actions/store.d.ts.map +1 -0
  34. package/dist/floating-block-actions/store.test.d.ts +2 -0
  35. package/dist/floating-block-actions/store.test.d.ts.map +1 -0
  36. package/dist/floating-block-actions.js +1 -0
  37. package/dist/highlight-color-picker/highlight-color-picker.d.ts +27 -0
  38. package/dist/highlight-color-picker/highlight-color-picker.d.ts.map +1 -0
  39. package/dist/highlight-color-picker/index.d.ts +4 -0
  40. package/dist/highlight-color-picker/index.d.ts.map +1 -0
  41. package/dist/index-16ebe43d.js +10 -0
  42. package/dist/index.d.ts +12 -0
  43. package/dist/index.d.ts.map +1 -0
  44. package/dist/index.js +5 -0
  45. package/dist/overlay/Overlay.d.ts +12 -0
  46. package/dist/overlay/Overlay.d.ts.map +1 -0
  47. package/dist/overlay/index.d.ts +2 -0
  48. package/dist/overlay/index.d.ts.map +1 -0
  49. package/dist/portal/Portal.d.ts +8 -0
  50. package/dist/portal/Portal.d.ts.map +1 -0
  51. package/dist/portal/index.d.ts +2 -0
  52. package/dist/portal/index.d.ts.map +1 -0
  53. package/dist/slash-command-menu/components/SlashCommandContent.d.ts +10 -0
  54. package/dist/slash-command-menu/components/SlashCommandContent.d.ts.map +1 -0
  55. package/dist/slash-command-menu/components/SlashCommandEmpty.d.ts +10 -0
  56. package/dist/slash-command-menu/components/SlashCommandEmpty.d.ts.map +1 -0
  57. package/dist/slash-command-menu/components/SlashCommandFooter.d.ts +11 -0
  58. package/dist/slash-command-menu/components/SlashCommandFooter.d.ts.map +1 -0
  59. package/dist/slash-command-menu/components/SlashCommandGroup.d.ts +11 -0
  60. package/dist/slash-command-menu/components/SlashCommandGroup.d.ts.map +1 -0
  61. package/dist/slash-command-menu/components/SlashCommandInput.d.ts +9 -0
  62. package/dist/slash-command-menu/components/SlashCommandInput.d.ts.map +1 -0
  63. package/dist/slash-command-menu/components/SlashCommandItem.d.ts +17 -0
  64. package/dist/slash-command-menu/components/SlashCommandItem.d.ts.map +1 -0
  65. package/dist/slash-command-menu/components/SlashCommandList.d.ts +11 -0
  66. package/dist/slash-command-menu/components/SlashCommandList.d.ts.map +1 -0
  67. package/dist/slash-command-menu/components/SlashCommandLoading.d.ts +10 -0
  68. package/dist/slash-command-menu/components/SlashCommandLoading.d.ts.map +1 -0
  69. package/dist/slash-command-menu/components/SlashCommandRoot.d.ts +19 -0
  70. package/dist/slash-command-menu/components/SlashCommandRoot.d.ts.map +1 -0
  71. package/dist/slash-command-menu/components/SlashCommandSeparator.d.ts +8 -0
  72. package/dist/slash-command-menu/components/SlashCommandSeparator.d.ts.map +1 -0
  73. package/dist/slash-command-menu/constants.d.ts +16 -0
  74. package/dist/slash-command-menu/constants.d.ts.map +1 -0
  75. package/dist/slash-command-menu/context/SlashCommandContext.d.ts +20 -0
  76. package/dist/slash-command-menu/context/SlashCommandContext.d.ts.map +1 -0
  77. package/dist/slash-command-menu/hooks/useFilter.d.ts +13 -0
  78. package/dist/slash-command-menu/hooks/useFilter.d.ts.map +1 -0
  79. package/dist/slash-command-menu/hooks/usePositioning.d.ts +36 -0
  80. package/dist/slash-command-menu/hooks/usePositioning.d.ts.map +1 -0
  81. package/dist/slash-command-menu/hooks/useSlashCommand.d.ts +34 -0
  82. package/dist/slash-command-menu/hooks/useSlashCommand.d.ts.map +1 -0
  83. package/dist/slash-command-menu/index.d.ts +68 -0
  84. package/dist/slash-command-menu/index.d.ts.map +1 -0
  85. package/dist/slash-command-menu/types.d.ts +51 -0
  86. package/dist/slash-command-menu/types.d.ts.map +1 -0
  87. package/dist/theme/ThemeProvider.d.ts +16 -0
  88. package/dist/theme/ThemeProvider.d.ts.map +1 -0
  89. package/dist/theme/ThemeToggle.d.ts +6 -0
  90. package/dist/theme/ThemeToggle.d.ts.map +1 -0
  91. package/dist/theme/index.d.ts +5 -0
  92. package/dist/theme/index.d.ts.map +1 -0
  93. package/dist/theme/useTheme.d.ts +8 -0
  94. package/dist/theme/useTheme.d.ts.map +1 -0
  95. package/dist/toolbar/hooks.d.ts +879 -0
  96. package/dist/toolbar/hooks.d.ts.map +1 -0
  97. package/dist/toolbar/index.d.ts +6 -0
  98. package/dist/toolbar/index.d.ts.map +1 -0
  99. package/dist/toolbar/store.d.ts +12 -0
  100. package/dist/toolbar/store.d.ts.map +1 -0
  101. package/dist/toolbar/store.test.d.ts +2 -0
  102. package/dist/toolbar/store.test.d.ts.map +1 -0
  103. package/dist/toolbar/toolbar.d.ts +20 -0
  104. package/dist/toolbar/toolbar.d.ts.map +1 -0
  105. package/dist/utils/throttle.d.ts +8 -0
  106. package/dist/utils/throttle.d.ts.map +1 -0
  107. package/package.json +61 -0
@@ -0,0 +1,12 @@
1
+ import type { MouseEvent, ReactNode } from 'react';
2
+ type Props = {
3
+ children: ReactNode;
4
+ lockScroll?: boolean;
5
+ className?: string;
6
+ onClick?: (e: MouseEvent) => void;
7
+ onMouseDown?: (e: MouseEvent) => void;
8
+ style?: React.CSSProperties;
9
+ };
10
+ declare const Overlay: ({ className, children, lockScroll, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
11
+ export { Overlay };
12
+ //# sourceMappingURL=Overlay.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Overlay.d.ts","sourceRoot":"","sources":["../../src/overlay/Overlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGnD,KAAK,KAAK,GAAG;IACX,QAAQ,EAAE,SAAS,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;IAClC,WAAW,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;IACtC,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B,CAAC;AAEF,QAAA,MAAM,OAAO,kDAA0D,KAAK,4CAqB3E,CAAC;AAEF,OAAO,EAAE,OAAO,EAAE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { Overlay } from './Overlay';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/overlay/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { ReactNode } from 'react';
2
+ type Props = {
3
+ children: ReactNode;
4
+ id: string;
5
+ };
6
+ declare const Portal: (props: Props) => import("react/jsx-runtime").JSX.Element | null;
7
+ export { Portal };
8
+ //# sourceMappingURL=Portal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Portal.d.ts","sourceRoot":"","sources":["../../src/portal/Portal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKvC,KAAK,KAAK,GAAG;IACX,QAAQ,EAAE,SAAS,CAAC;IACpB,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAKF,QAAA,MAAM,MAAM,UAAW,KAAK,mDAoD3B,CAAC;AAEF,OAAO,EAAE,MAAM,EAAE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { Portal } from './Portal';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/portal/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC"}
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ export type SlashCommandContentProps = {
3
+ children: React.ReactNode;
4
+ className?: string;
5
+ };
6
+ export declare const SlashCommandContent: {
7
+ ({ children, className }: SlashCommandContentProps): import("react/jsx-runtime").JSX.Element;
8
+ displayName: string;
9
+ };
10
+ //# sourceMappingURL=SlashCommandContent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SlashCommandContent.d.ts","sourceRoot":"","sources":["../../../src/slash-command-menu/components/SlashCommandContent.tsx"],"names":[],"mappings":";AAAA,MAAM,MAAM,wBAAwB,GAAG;IACrC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,mBAAmB;8BAA6B,wBAAwB;;CAiBpF,CAAC"}
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ export type SlashCommandEmptyProps = {
3
+ children?: React.ReactNode;
4
+ className?: string;
5
+ };
6
+ export declare const SlashCommandEmpty: {
7
+ ({ children, className }: SlashCommandEmptyProps): import("react/jsx-runtime").JSX.Element | null;
8
+ displayName: string;
9
+ };
10
+ //# sourceMappingURL=SlashCommandEmpty.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SlashCommandEmpty.d.ts","sourceRoot":"","sources":["../../../src/slash-command-menu/components/SlashCommandEmpty.tsx"],"names":[],"mappings":";AAEA,MAAM,MAAM,sBAAsB,GAAG;IACnC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,iBAAiB;8BAA6B,sBAAsB;;CAQhF,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type React from 'react';
2
+ export type SlashCommandFooterProps = {
3
+ children?: React.ReactNode;
4
+ className?: string;
5
+ showHints?: boolean;
6
+ };
7
+ export declare const SlashCommandFooter: {
8
+ ({ children, className, showHints, }: SlashCommandFooterProps): import("react/jsx-runtime").JSX.Element;
9
+ displayName: string;
10
+ };
11
+ //# sourceMappingURL=SlashCommandFooter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SlashCommandFooter.d.ts","sourceRoot":"","sources":["../../../src/slash-command-menu/components/SlashCommandFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,MAAM,MAAM,uBAAuB,GAAG;IACpC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AA4BF,eAAO,MAAM,kBAAkB;0CAI5B,uBAAuB;;CAIzB,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type { ReactNode } from 'react';
2
+ export type SlashCommandGroupProps = {
3
+ children: ReactNode;
4
+ heading?: string;
5
+ className?: string;
6
+ };
7
+ export declare const SlashCommandGroup: {
8
+ ({ children, heading, className }: SlashCommandGroupProps): import("react/jsx-runtime").JSX.Element;
9
+ displayName: string;
10
+ };
11
+ //# sourceMappingURL=SlashCommandGroup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SlashCommandGroup.d.ts","sourceRoot":"","sources":["../../../src/slash-command-menu/components/SlashCommandGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,MAAM,sBAAsB,GAAG;IACnC,QAAQ,EAAE,SAAS,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAMF,eAAO,MAAM,iBAAiB;uCAAsC,sBAAsB;;CAKzF,CAAC"}
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ export type SlashCommandInputProps = {
3
+ placeholder?: string;
4
+ className?: string;
5
+ showTrigger?: boolean;
6
+ showEscHint?: boolean;
7
+ };
8
+ export declare const SlashCommandInput: import("react").ForwardRefExoticComponent<SlashCommandInputProps & import("react").RefAttributes<HTMLInputElement>>;
9
+ //# sourceMappingURL=SlashCommandInput.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SlashCommandInput.d.ts","sourceRoot":"","sources":["../../../src/slash-command-menu/components/SlashCommandInput.tsx"],"names":[],"mappings":";AAQA,MAAM,MAAM,sBAAsB,GAAG;IACnC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAMF,eAAO,MAAM,iBAAiB,qHA0B7B,CAAC"}
@@ -0,0 +1,17 @@
1
+ import type { ReactNode } from 'react';
2
+ export type SlashCommandItemProps = {
3
+ children?: ReactNode;
4
+ value: string;
5
+ title?: string;
6
+ description?: string;
7
+ icon?: ReactNode;
8
+ shortcut?: string[];
9
+ disabled?: boolean;
10
+ onSelect?: () => void;
11
+ className?: string;
12
+ };
13
+ export declare const SlashCommandItem: {
14
+ ({ children, value, title, description, icon, shortcut, disabled, onSelect, className, }: SlashCommandItemProps): import("react/jsx-runtime").JSX.Element | null;
15
+ displayName: string;
16
+ };
17
+ //# sourceMappingURL=SlashCommandItem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SlashCommandItem.d.ts","sourceRoot":"","sources":["../../../src/slash-command-menu/components/SlashCommandItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKvC,MAAM,MAAM,qBAAqB,GAAG;IAClC,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,gBAAgB;8FAU1B,qBAAqB;;CA0EvB,CAAC"}
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ export type SlashCommandListProps = {
3
+ children: React.ReactNode;
4
+ className?: string;
5
+ style?: React.CSSProperties;
6
+ };
7
+ export declare const SlashCommandList: {
8
+ ({ children, className, style }: SlashCommandListProps): import("react/jsx-runtime").JSX.Element;
9
+ displayName: string;
10
+ };
11
+ //# sourceMappingURL=SlashCommandList.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SlashCommandList.d.ts","sourceRoot":"","sources":["../../../src/slash-command-menu/components/SlashCommandList.tsx"],"names":[],"mappings":";AAAA,MAAM,MAAM,qBAAqB,GAAG;IAClC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B,CAAC;AAEF,eAAO,MAAM,gBAAgB;qCAAoC,qBAAqB;;CAIrF,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { ReactNode } from 'react';
2
+ export type SlashCommandLoadingProps = {
3
+ children?: ReactNode;
4
+ className?: string;
5
+ };
6
+ export declare const SlashCommandLoading: {
7
+ ({ children, className }: SlashCommandLoadingProps): import("react/jsx-runtime").JSX.Element;
8
+ displayName: string;
9
+ };
10
+ //# sourceMappingURL=SlashCommandLoading.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SlashCommandLoading.d.ts","sourceRoot":"","sources":["../../../src/slash-command-menu/components/SlashCommandLoading.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,MAAM,wBAAwB,GAAG;IACrC,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAMF,eAAO,MAAM,mBAAmB;8BAA6B,wBAAwB;;CAIpF,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { type ReactNode } from 'react';
2
+ import type { SlashCommandItem } from '../types';
3
+ import '../slash-command.css';
4
+ export type SlashCommandRootProps = {
5
+ children: ReactNode | ((props: SlashCommandRootChildrenProps) => ReactNode);
6
+ items?: SlashCommandItem[];
7
+ trigger?: string;
8
+ onSelect?: (item: SlashCommandItem) => void;
9
+ className?: string;
10
+ };
11
+ export type SlashCommandRootChildrenProps = {
12
+ groupedItems: Map<string, SlashCommandItem[]>;
13
+ items: SlashCommandItem[];
14
+ };
15
+ export declare const SlashCommandRoot: {
16
+ ({ children, items: itemsProps, trigger, onSelect, className, }: SlashCommandRootProps): import("react/jsx-runtime").JSX.Element;
17
+ displayName: string;
18
+ };
19
+ //# sourceMappingURL=SlashCommandRoot.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SlashCommandRoot.d.ts","sourceRoot":"","sources":["../../../src/slash-command-menu/components/SlashCommandRoot.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAW,MAAM,OAAO,CAAC;AAKhD,OAAO,KAAK,EAA4B,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE3E,OAAO,sBAAsB,CAAC;AAE9B,MAAM,MAAM,qBAAqB,GAAG;IAClC,QAAQ,EAAE,SAAS,GAAG,CAAC,CAAC,KAAK,EAAE,6BAA6B,KAAK,SAAS,CAAC,CAAC;IAC5E,KAAK,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG;IAC1C,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,gBAAgB,EAAE,CAAC,CAAC;IAC9C,KAAK,EAAE,gBAAgB,EAAE,CAAC;CAC3B,CAAC;AAEF,eAAO,MAAM,gBAAgB;qEAM1B,qBAAqB;;CAyEvB,CAAC"}
@@ -0,0 +1,8 @@
1
+ export type SlashCommandSeparatorProps = {
2
+ className?: string;
3
+ };
4
+ export declare const SlashCommandSeparator: {
5
+ ({ className }: SlashCommandSeparatorProps): import("react/jsx-runtime").JSX.Element;
6
+ displayName: string;
7
+ };
8
+ //# sourceMappingURL=SlashCommandSeparator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SlashCommandSeparator.d.ts","sourceRoot":"","sources":["../../../src/slash-command-menu/components/SlashCommandSeparator.tsx"],"names":[],"mappings":"AAAA,MAAM,MAAM,0BAA0B,GAAG;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAMF,eAAO,MAAM,qBAAqB;oBAAmB,0BAA0B;;CAM9E,CAAC"}
@@ -0,0 +1,16 @@
1
+ export declare const SLASH_TRIGGER = "/";
2
+ export declare const KEYS: {
3
+ readonly ARROW_UP: "ArrowUp";
4
+ readonly ARROW_DOWN: "ArrowDown";
5
+ readonly ENTER: "Enter";
6
+ readonly ESCAPE: "Escape";
7
+ readonly TAB: "Tab";
8
+ readonly BACKSPACE: "Backspace";
9
+ };
10
+ export declare const DEFAULT_POSITION: {
11
+ x: number;
12
+ y: number;
13
+ };
14
+ export declare const MENU_OFFSET = 10;
15
+ export declare const ANIMATION_DURATION = 150;
16
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/slash-command-menu/constants.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,aAAa,MAAM,CAAC;AAEjC,eAAO,MAAM,IAAI;;;;;;;CAOP,CAAC;AAEX,eAAO,MAAM,gBAAgB,EAAE;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAGpD,CAAC;AAEF,eAAO,MAAM,WAAW,KAAK,CAAC;AAE9B,eAAO,MAAM,kBAAkB,MAAM,CAAC"}
@@ -0,0 +1,20 @@
1
+ /// <reference types="react" />
2
+ import type { SlashCommandContextValue } from '../types';
3
+ export declare const SlashCommandContext: import("react").Context<SlashCommandContextValue | null>;
4
+ export declare function useSlashCommandContext(): SlashCommandContextValue;
5
+ export declare function useSlashCommandState(): import("../types").SlashCommandState;
6
+ export declare function useSlashCommandActions(): import("../types").SlashCommandActions;
7
+ export declare function useSlashCommandItems(): {
8
+ filteredItems: import("../types").SlashCommandItem[];
9
+ groupedItems: Map<string, import("../types").SlashCommandItem[]>;
10
+ };
11
+ export declare function useSlashCommandRefs(): {
12
+ refs: {
13
+ reference: import("react").MutableRefObject<import("@floating-ui/dom").VirtualElement | null>;
14
+ floating: import("react").MutableRefObject<HTMLElement | null>;
15
+ setReference: (node: import("@floating-ui/dom").VirtualElement | null) => void;
16
+ setFloating: (node: HTMLElement | null) => void;
17
+ };
18
+ floatingStyles: import("react").CSSProperties;
19
+ };
20
+ //# sourceMappingURL=SlashCommandContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SlashCommandContext.d.ts","sourceRoot":"","sources":["../../../src/slash-command-menu/context/SlashCommandContext.tsx"],"names":[],"mappings":";AAEA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAEzD,eAAO,MAAM,mBAAmB,0DAAuD,CAAC;AAGxF,wBAAgB,sBAAsB,IAAI,wBAAwB,CAQjE;AAED,wBAAgB,oBAAoB,yCAGnC;AAED,wBAAgB,sBAAsB,2CAGrC;AAED,wBAAgB,oBAAoB;;;EAGnC;AAED,wBAAgB,mBAAmB;;;;;;;;EAGlC"}
@@ -0,0 +1,13 @@
1
+ import type { SlashCommandItem } from '../types';
2
+ type UseFilterOptions = {
3
+ items: SlashCommandItem[];
4
+ search: string;
5
+ };
6
+ type UseFilterResult = {
7
+ filteredItems: SlashCommandItem[];
8
+ groupedItems: Map<string, SlashCommandItem[]>;
9
+ isEmpty: boolean;
10
+ };
11
+ export declare function useFilter({ items, search }: UseFilterOptions): UseFilterResult;
12
+ export {};
13
+ //# sourceMappingURL=useFilter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFilter.d.ts","sourceRoot":"","sources":["../../../src/slash-command-menu/hooks/useFilter.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAwDjD,KAAK,gBAAgB,GAAG;IACtB,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,KAAK,eAAe,GAAG;IACrB,aAAa,EAAE,gBAAgB,EAAE,CAAC;IAClC,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,gBAAgB,EAAE,CAAC,CAAC;IAC9C,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,wBAAgB,SAAS,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,gBAAgB,GAAG,eAAe,CA4B9E"}
@@ -0,0 +1,36 @@
1
+ /// <reference types="react" />
2
+ import type { VirtualElement } from '@floating-ui/react';
3
+ type UsePositioningOptions = {
4
+ isOpen: boolean;
5
+ virtualElement: VirtualElement | null;
6
+ };
7
+ export declare function usePositioning({ isOpen, virtualElement }: UsePositioningOptions): {
8
+ refs: {
9
+ reference: import("react").MutableRefObject<import("@floating-ui/react-dom").ReferenceType | null>;
10
+ floating: import("react").MutableRefObject<HTMLElement | null>;
11
+ setReference: (node: import("@floating-ui/react-dom").ReferenceType | null) => void;
12
+ setFloating: (node: HTMLElement | null) => void;
13
+ } & import("@floating-ui/react").ExtendedRefs<import("@floating-ui/react").ReferenceType>;
14
+ floatingStyles: import("react").CSSProperties;
15
+ floatingContext: {
16
+ placement: import("@floating-ui/utils").Placement;
17
+ strategy: import("@floating-ui/utils").Strategy;
18
+ x: number;
19
+ y: number;
20
+ middlewareData: import("@floating-ui/core").MiddlewareData;
21
+ isPositioned: boolean;
22
+ update: () => void;
23
+ floatingStyles: import("react").CSSProperties;
24
+ open: boolean;
25
+ onOpenChange: (open: boolean, event?: Event | undefined, reason?: import("@floating-ui/react").OpenChangeReason | undefined) => void;
26
+ events: import("@floating-ui/react").FloatingEvents;
27
+ dataRef: import("react").MutableRefObject<import("@floating-ui/react").ContextData>;
28
+ nodeId: string | undefined;
29
+ floatingId: string;
30
+ refs: import("@floating-ui/react").ExtendedRefs<import("@floating-ui/react").ReferenceType>;
31
+ elements: import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
32
+ };
33
+ };
34
+ export declare function getVirtualElementRects(): VirtualElement | null;
35
+ export {};
36
+ //# sourceMappingURL=usePositioning.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePositioning.d.ts","sourceRoot":"","sources":["../../../src/slash-command-menu/hooks/usePositioning.ts"],"names":[],"mappings":";AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAKzD,KAAK,qBAAqB,GAAG;IAC3B,MAAM,EAAE,OAAO,CAAC;IAChB,cAAc,EAAE,cAAc,GAAG,IAAI,CAAC;CACvC,CAAC;AAIF,wBAAgB,cAAc,CAAC,EAAE,MAAM,EAAE,cAAc,EAAE,EAAE,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;EAuC/E;AAED,wBAAgB,sBAAsB,IAAI,cAAc,GAAG,IAAI,CAa9D"}
@@ -0,0 +1,34 @@
1
+ /// <reference types="react" />
2
+ import type { VirtualElement } from '@floating-ui/dom';
3
+ import type { FloatingContext } from '@floating-ui/react';
4
+ import type { SlashCommandItem, SlashCommandState } from '../types';
5
+ type UseSlashCommandOptions = {
6
+ items: SlashCommandItem[];
7
+ trigger?: string;
8
+ onSelect?: (item: SlashCommandItem) => void;
9
+ };
10
+ export declare function useSlashCommand({ items, trigger, onSelect, }: UseSlashCommandOptions): {
11
+ refs: {
12
+ reference: import("react").MutableRefObject<import("@floating-ui/react-dom").ReferenceType | null>;
13
+ floating: import("react").MutableRefObject<HTMLElement | null>;
14
+ setReference: (node: import("@floating-ui/react-dom").ReferenceType | null) => void;
15
+ setFloating: (node: HTMLElement | null) => void;
16
+ } & import("@floating-ui/react").ExtendedRefs<import("@floating-ui/react").ReferenceType>;
17
+ state: SlashCommandState;
18
+ items: SlashCommandItem[];
19
+ isEmpty: boolean;
20
+ actionHandlers: {
21
+ open: (el: VirtualElement, ctx: FloatingContext<VirtualElement>) => void;
22
+ close: () => void;
23
+ setSearch: (search: string) => void;
24
+ selectItem: (index: number) => void;
25
+ executeSelected: () => void;
26
+ };
27
+ groupedItems: Map<string, SlashCommandItem[]>;
28
+ filteredItems: SlashCommandItem[];
29
+ floatingStyles: import("react").CSSProperties;
30
+ transitionStyles: import("react").CSSProperties;
31
+ isMounted: boolean;
32
+ };
33
+ export {};
34
+ //# sourceMappingURL=useSlashCommand.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSlashCommand.d.ts","sourceRoot":"","sources":["../../../src/slash-command-menu/hooks/useSlashCommand.ts"],"names":[],"mappings":";AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAM1D,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAsFpE,KAAK,sBAAsB,GAAG;IAC5B,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,gBAAgB,KAAK,IAAI,CAAC;CAC7C,CAAC;AAEF,wBAAgB,eAAe,CAAC,EAC9B,KAAK,EACL,OAAuB,EACvB,QAAQ,GACT,EAAE,sBAAsB;;;;;;;;;;;mBAqDO,cAAc,OAAO,gBAAgB,cAAc,CAAC;;4BAQ3C,MAAM;4BAIZ,MAAM;;;;;;;;EAsMxC"}
@@ -0,0 +1,68 @@
1
+ /// <reference types="react" />
2
+ export type { SlashCommandItem as SlashCommandItemType, SlashCommandGroup as SlashCommandGroupType, SlashCommandState, SlashCommandActions, SlashCommandContextValue, MenuPosition, } from './types';
3
+ export { SlashCommandContext, useSlashCommandContext, useSlashCommandState, useSlashCommandActions, useSlashCommandItems, useSlashCommandRefs, } from './context/SlashCommandContext';
4
+ export { useSlashCommand } from './hooks/useSlashCommand';
5
+ export { SlashCommandRoot } from './components/SlashCommandRoot';
6
+ export { SlashCommandContent } from './components/SlashCommandContent';
7
+ export { SlashCommandInput } from './components/SlashCommandInput';
8
+ export { SlashCommandList } from './components/SlashCommandList';
9
+ export { SlashCommandGroup } from './components/SlashCommandGroup';
10
+ export { SlashCommandItem } from './components/SlashCommandItem';
11
+ export { SlashCommandEmpty } from './components/SlashCommandEmpty';
12
+ export { SlashCommandSeparator } from './components/SlashCommandSeparator';
13
+ export { SlashCommandFooter } from './components/SlashCommandFooter';
14
+ export { SlashCommandLoading } from './components/SlashCommandLoading';
15
+ export type { SlashCommandRootProps } from './components/SlashCommandRoot';
16
+ export type { SlashCommandContentProps } from './components/SlashCommandContent';
17
+ export type { SlashCommandInputProps } from './components/SlashCommandInput';
18
+ export type { SlashCommandListProps } from './components/SlashCommandList';
19
+ export type { SlashCommandGroupProps } from './components/SlashCommandGroup';
20
+ export type { SlashCommandItemProps } from './components/SlashCommandItem';
21
+ export type { SlashCommandEmptyProps } from './components/SlashCommandEmpty';
22
+ export type { SlashCommandSeparatorProps } from './components/SlashCommandSeparator';
23
+ export type { SlashCommandFooterProps } from './components/SlashCommandFooter';
24
+ export type { SlashCommandLoadingProps } from './components/SlashCommandLoading';
25
+ export declare const SlashCommandMenu: {
26
+ ({ children, items: itemsProps, trigger, onSelect, className, }: import("./components/SlashCommandRoot").SlashCommandRootProps): import("react/jsx-runtime").JSX.Element;
27
+ displayName: string;
28
+ } & {
29
+ Root: {
30
+ ({ children, items: itemsProps, trigger, onSelect, className, }: import("./components/SlashCommandRoot").SlashCommandRootProps): import("react/jsx-runtime").JSX.Element;
31
+ displayName: string;
32
+ };
33
+ Content: {
34
+ ({ children, className }: import("./components/SlashCommandContent").SlashCommandContentProps): import("react/jsx-runtime").JSX.Element;
35
+ displayName: string;
36
+ };
37
+ Input: import("react").ForwardRefExoticComponent<import("./components/SlashCommandInput").SlashCommandInputProps & import("react").RefAttributes<HTMLInputElement>>;
38
+ List: {
39
+ ({ children, className, style }: import("./components/SlashCommandList").SlashCommandListProps): import("react/jsx-runtime").JSX.Element;
40
+ displayName: string;
41
+ };
42
+ Group: {
43
+ ({ children, heading, className }: import("./components/SlashCommandGroup").SlashCommandGroupProps): import("react/jsx-runtime").JSX.Element;
44
+ displayName: string;
45
+ };
46
+ Item: {
47
+ ({ children, value, title, description, icon, shortcut, disabled, onSelect, className, }: import("./components/SlashCommandItem").SlashCommandItemProps): import("react/jsx-runtime").JSX.Element | null;
48
+ displayName: string;
49
+ };
50
+ Empty: {
51
+ ({ children, className }: import("./components/SlashCommandEmpty").SlashCommandEmptyProps): import("react/jsx-runtime").JSX.Element | null;
52
+ displayName: string;
53
+ };
54
+ Separator: {
55
+ ({ className }: import("./components/SlashCommandSeparator").SlashCommandSeparatorProps): import("react/jsx-runtime").JSX.Element;
56
+ displayName: string;
57
+ };
58
+ Footer: {
59
+ ({ children, className, showHints, }: import("./components/SlashCommandFooter").SlashCommandFooterProps): import("react/jsx-runtime").JSX.Element;
60
+ displayName: string;
61
+ };
62
+ Loading: {
63
+ ({ children, className }: import("./components/SlashCommandLoading").SlashCommandLoadingProps): import("react/jsx-runtime").JSX.Element;
64
+ displayName: string;
65
+ };
66
+ };
67
+ export default SlashCommandMenu;
68
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/slash-command-menu/index.ts"],"names":[],"mappings":";AAWA,YAAY,EACV,gBAAgB,IAAI,oBAAoB,EACxC,iBAAiB,IAAI,qBAAqB,EAC1C,iBAAiB,EACjB,mBAAmB,EACnB,wBAAwB,EACxB,YAAY,GACb,MAAM,SAAS,CAAC;AAGjB,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EACtB,oBAAoB,EACpB,sBAAsB,EACtB,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,+BAA+B,CAAC;AAGvC,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAG1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAGvE,YAAY,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAC3E,YAAY,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AACjF,YAAY,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAC7E,YAAY,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAC3E,YAAY,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAC7E,YAAY,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAC3E,YAAY,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAC7E,YAAY,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;AACrF,YAAY,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAC/E,YAAY,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAEjF,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAW3B,CAAC;AAEH,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1,51 @@
1
+ import type { CSSProperties, MutableRefObject, ReactNode } from 'react';
2
+ import type { VirtualElement } from '@floating-ui/dom';
3
+ import type { FloatingContext } from '@floating-ui/react';
4
+ export type SlashCommandItem = {
5
+ id: string;
6
+ title: string;
7
+ description?: string;
8
+ icon?: ReactNode;
9
+ keywords?: string[];
10
+ group?: string;
11
+ disabled?: boolean;
12
+ onSelect?: () => void;
13
+ };
14
+ export type SlashCommandGroup = {
15
+ id: string;
16
+ label: string;
17
+ items: SlashCommandItem[];
18
+ };
19
+ export type MenuPosition = {
20
+ x: number;
21
+ y: number;
22
+ };
23
+ export type SlashCommandState = {
24
+ isOpen: boolean;
25
+ search: string;
26
+ selectedIndex: number;
27
+ virtualElement: VirtualElement | null;
28
+ floatingContext: FloatingContext<VirtualElement> | null;
29
+ };
30
+ export type SlashCommandActions = {
31
+ open: (virtualElement: VirtualElement, floatingContext: FloatingContext<VirtualElement>) => void;
32
+ close: () => void;
33
+ setSearch: (search: string) => void;
34
+ selectItem: (index: number) => void;
35
+ executeSelected: () => void;
36
+ };
37
+ export type SlashCommandContextValue = {
38
+ state: SlashCommandState;
39
+ actionHandlers: SlashCommandActions;
40
+ items: SlashCommandItem[];
41
+ filteredItems: SlashCommandItem[];
42
+ groupedItems: Map<string, SlashCommandItem[]>;
43
+ refs: {
44
+ reference: MutableRefObject<VirtualElement | null>;
45
+ floating: MutableRefObject<HTMLElement | null>;
46
+ setReference: (node: VirtualElement | null) => void;
47
+ setFloating: (node: HTMLElement | null) => void;
48
+ };
49
+ floatingStyles: CSSProperties;
50
+ };
51
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/slash-command-menu/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACxE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D,MAAM,MAAM,gBAAgB,GAAG;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,gBAAgB,EAAE,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,cAAc,GAAG,IAAI,CAAC;IACtC,eAAe,EAAE,eAAe,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC;CACzD,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,EAAE,CAAC,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,eAAe,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC;IACjG,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,eAAe,EAAE,MAAM,IAAI,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG;IACrC,KAAK,EAAE,iBAAiB,CAAC;IACzB,cAAc,EAAE,mBAAmB,CAAC;IACpC,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAC1B,aAAa,EAAE,gBAAgB,EAAE,CAAC;IAClC,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,gBAAgB,EAAE,CAAC,CAAC;IAC9C,IAAI,EAAE;QACJ,SAAS,EAAE,gBAAgB,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;QACnD,QAAQ,EAAE,gBAAgB,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;QAC/C,YAAY,EAAE,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI,KAAK,IAAI,CAAC;QACpD,WAAW,EAAE,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAC;KACjD,CAAC;IACF,cAAc,EAAE,aAAa,CAAC;CAC/B,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { ReactNode } from 'react';
2
+ import { Theme } from './useTheme';
3
+ type ThemeContextType = {
4
+ theme: Theme;
5
+ resolvedTheme: 'light' | 'dark';
6
+ setTheme: (theme: Theme) => void;
7
+ toggleTheme: () => void;
8
+ };
9
+ export declare const useThemeContext: () => ThemeContextType;
10
+ type ThemeProviderProps = {
11
+ children: ReactNode;
12
+ defaultTheme?: Theme;
13
+ };
14
+ export declare const ThemeProvider: ({ children, defaultTheme }: ThemeProviderProps) => import("react/jsx-runtime").JSX.Element;
15
+ export {};
16
+ //# sourceMappingURL=ThemeProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ThemeProvider.d.ts","sourceRoot":"","sources":["../../src/theme/ThemeProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA6B,SAAS,EAAE,MAAM,OAAO,CAAC;AAC7D,OAAO,EAAY,KAAK,EAAE,MAAM,YAAY,CAAC;AAE7C,KAAK,gBAAgB,GAAG;IACtB,KAAK,EAAE,KAAK,CAAC;IACb,aAAa,EAAE,OAAO,GAAG,MAAM,CAAC;IAChC,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,WAAW,EAAE,MAAM,IAAI,CAAC;CACzB,CAAC;AAIF,eAAO,MAAM,eAAe,wBAM3B,CAAC;AAEF,KAAK,kBAAkB,GAAG;IACxB,QAAQ,EAAE,SAAS,CAAC;IACpB,YAAY,CAAC,EAAE,KAAK,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,aAAa,+BAA2C,kBAAkB,4CAItF,CAAC"}
@@ -0,0 +1,6 @@
1
+ type ThemeToggleProps = {
2
+ className?: string;
3
+ };
4
+ export declare const ThemeToggle: ({ className }: ThemeToggleProps) => import("react/jsx-runtime").JSX.Element;
5
+ export {};
6
+ //# sourceMappingURL=ThemeToggle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ThemeToggle.d.ts","sourceRoot":"","sources":["../../src/theme/ThemeToggle.tsx"],"names":[],"mappings":"AAEA,KAAK,gBAAgB,GAAG;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,WAAW,kBAAmB,gBAAgB,4CAgD1D,CAAC"}
@@ -0,0 +1,5 @@
1
+ export { useTheme } from './useTheme';
2
+ export { ThemeProvider, useThemeContext } from './ThemeProvider';
3
+ export { ThemeToggle } from './ThemeToggle';
4
+ export type { Theme } from './useTheme';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/theme/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,YAAY,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC"}
@@ -0,0 +1,8 @@
1
+ export type Theme = 'light' | 'dark' | 'system';
2
+ export declare const useTheme: () => {
3
+ theme: Theme;
4
+ resolvedTheme: "light" | "dark";
5
+ setTheme: (newTheme: Theme) => void;
6
+ toggleTheme: () => void;
7
+ };
8
+ //# sourceMappingURL=useTheme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTheme.d.ts","sourceRoot":"","sources":["../../src/theme/useTheme.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,KAAK,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAC;AAkChD,eAAO,MAAM,QAAQ;;;yBA8BS,KAAK;;CAoBlC,CAAC"}