@hamster-note/components 0.3.0 → 0.4.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 (74) hide show
  1. package/README.md +28 -0
  2. package/dist/Icon-BuZRZcjv.js +1143 -0
  3. package/dist/button-mmBNcoG1.js +45 -0
  4. package/dist/button.js +1 -1
  5. package/dist/components/button/Button.d.ts +3 -2
  6. package/dist/components/icon/icon-names.d.ts +1 -15
  7. package/dist/components/theme/theme.d.ts +1 -87
  8. package/dist/{confirm-Faavk_5T.js → confirm-DKgVMWkR.js} +2 -2
  9. package/dist/confirm.js +1 -1
  10. package/dist/{dialog-BYlEUJ_j.js → dialog-DI_yumUn.js} +1 -1
  11. package/dist/dialog.js +1 -1
  12. package/dist/{drawer-BV9RFSna.js → drawer-Cpe3Yf3K.js} +1 -1
  13. package/dist/drawer.js +1 -1
  14. package/dist/hamster-note-components.css +1 -1
  15. package/dist/{icon-BFAcjkFI.js → icon-u7jiIYal.js} +1 -1
  16. package/dist/icon.js +2 -2
  17. package/dist/index.js +7 -7
  18. package/dist/shared/icon-names.d.ts +15 -0
  19. package/dist/shared/icons.d.ts +1216 -0
  20. package/dist/shared/theme.d.ts +87 -0
  21. package/dist/shared/tokens.d.ts +67 -0
  22. package/dist/test/shared-data.test.d.ts +1 -0
  23. package/dist/{theme-CVNLJL1G.js → theme-DNK-xd31.js} +1 -1
  24. package/dist/theme.js +1 -1
  25. package/dist-native/badge.d.ts +10 -0
  26. package/dist-native/badge.js +7 -0
  27. package/dist-native/button.d.ts +16 -0
  28. package/dist-native/button.js +7 -0
  29. package/dist-native/chunk-6RD26X3W.js +78 -0
  30. package/dist-native/chunk-6SR5ZHDD.js +13 -0
  31. package/dist-native/chunk-6VYUVVCP.js +27 -0
  32. package/dist-native/chunk-7LN4VNRB.js +124 -0
  33. package/dist-native/chunk-CF76TWL4.js +85 -0
  34. package/dist-native/chunk-ENTYQ6M4.js +256 -0
  35. package/dist-native/chunk-GSG6CXIE.js +1688 -0
  36. package/dist-native/chunk-JHT74YG3.js +186 -0
  37. package/dist-native/chunk-KPDK62A5.js +106 -0
  38. package/dist-native/chunk-PLFX4RVR.js +134 -0
  39. package/dist-native/chunk-QUGLAOXA.js +49 -0
  40. package/dist-native/chunk-S2EUKEYI.js +35 -0
  41. package/dist-native/chunk-VTE5RPMO.js +38 -0
  42. package/dist-native/chunk-YJ4H3ZBQ.js +145 -0
  43. package/dist-native/chunk-ZTQATW6Y.js +127 -0
  44. package/dist-native/confirm.d.ts +24 -0
  45. package/dist-native/confirm.js +14 -0
  46. package/dist-native/dialog.d.ts +8 -0
  47. package/dist-native/dialog.js +10 -0
  48. package/dist-native/drawer.d.ts +13 -0
  49. package/dist-native/drawer.js +10 -0
  50. package/dist-native/focus-C0k0lLui.d.ts +9 -0
  51. package/dist-native/icon.d.ts +28 -0
  52. package/dist-native/icon.js +9 -0
  53. package/dist-native/index.d.ts +20 -0
  54. package/dist-native/index.js +84 -0
  55. package/dist-native/kbd.d.ts +9 -0
  56. package/dist-native/kbd.js +7 -0
  57. package/dist-native/loading.d.ts +19 -0
  58. package/dist-native/loading.js +11 -0
  59. package/dist-native/menu.d.ts +31 -0
  60. package/dist-native/menu.js +17 -0
  61. package/dist-native/modal-panel-BOpp1oRC.d.ts +23 -0
  62. package/dist-native/note-card.d.ts +13 -0
  63. package/dist-native/note-card.js +7 -0
  64. package/dist-native/popover.d.ts +34 -0
  65. package/dist-native/popover.js +8 -0
  66. package/dist-native/position-CkPoZ5AD.d.ts +3 -0
  67. package/dist-native/text-field.d.ts +13 -0
  68. package/dist-native/text-field.js +7 -0
  69. package/dist-native/theme.d.ts +120 -0
  70. package/dist-native/theme.js +16 -0
  71. package/dist-native/tokens-DHoNd-yT.d.ts +41 -0
  72. package/package.json +137 -5
  73. package/dist/Icon-BBSPOBTI.js +0 -531
  74. package/dist/button-DjMS8bKj.js +0 -20
@@ -0,0 +1,127 @@
1
+ import {
2
+ ModalPanel
3
+ } from "./chunk-PLFX4RVR.js";
4
+ import {
5
+ Button
6
+ } from "./chunk-6RD26X3W.js";
7
+
8
+ // native/confirm.tsx
9
+ import {
10
+ createContext,
11
+ useCallback,
12
+ useContext,
13
+ useLayoutEffect,
14
+ useRef,
15
+ useState
16
+ } from "react";
17
+ import { View } from "react-native";
18
+ import { jsx, jsxs } from "react/jsx-runtime";
19
+ var ConfirmContext = createContext(null);
20
+ function Confirm(props) {
21
+ return /* @__PURE__ */ jsx(ConfirmPanel, { ...props });
22
+ }
23
+ function ConfirmPanel({
24
+ onConfirm,
25
+ onCancel,
26
+ confirmText = "\u786E\u8BA4",
27
+ cancelText = "\u53D6\u6D88",
28
+ tone = "default",
29
+ loading = false,
30
+ requestId,
31
+ ...props
32
+ }) {
33
+ const settled = useRef(false);
34
+ useLayoutEffect(() => {
35
+ settled.current = false;
36
+ }, [props.open, requestId]);
37
+ const settle = (callback) => {
38
+ if (!props.open || loading || settled.current) return;
39
+ settled.current = true;
40
+ callback();
41
+ };
42
+ return /* @__PURE__ */ jsx(
43
+ ModalPanel,
44
+ {
45
+ ...props,
46
+ focusKey: requestId,
47
+ dismissDisabled: loading,
48
+ onClose: onCancelAndClose,
49
+ closeOnBackdrop: !loading && (props.closeOnBackdrop ?? true),
50
+ closeOnSystemBack: !loading && (props.closeOnSystemBack ?? true),
51
+ children: /* @__PURE__ */ jsxs(View, { style: { flexDirection: "row", flexWrap: "wrap", justifyContent: "flex-end", gap: 8 }, children: [
52
+ /* @__PURE__ */ jsx(Button, { disabled: loading, ghost: true, onPress: onCancelAndClose, children: cancelText }),
53
+ /* @__PURE__ */ jsx(
54
+ Button,
55
+ {
56
+ disabled: loading,
57
+ variant: tone === "danger" ? "danger" : "primary",
58
+ onPress: () => settle(onConfirm),
59
+ children: loading ? "\u5904\u7406\u4E2D\u2026" : confirmText
60
+ }
61
+ )
62
+ ] })
63
+ }
64
+ );
65
+ function onCancelAndClose() {
66
+ settle(onCancel);
67
+ }
68
+ }
69
+ function ConfirmProvider({ children }) {
70
+ const active = useRef(true);
71
+ const sequence = useRef(0);
72
+ const current = useRef(null);
73
+ const [request, setRequest] = useState(null);
74
+ const [lastOptions, setLastOptions] = useState(null);
75
+ useLayoutEffect(() => {
76
+ active.current = true;
77
+ return () => {
78
+ active.current = false;
79
+ current.current?.resolve(false);
80
+ current.current = null;
81
+ };
82
+ }, []);
83
+ const confirm = useCallback(
84
+ (options) => new Promise((resolve) => {
85
+ if (!active.current) {
86
+ resolve(false);
87
+ return;
88
+ }
89
+ current.current?.resolve(false);
90
+ const next = { id: ++sequence.current, options, resolve };
91
+ current.current = next;
92
+ setLastOptions(options);
93
+ setRequest(next);
94
+ }),
95
+ []
96
+ );
97
+ const settle = (result) => {
98
+ if (!request || current.current !== request) return;
99
+ current.current = null;
100
+ setRequest(null);
101
+ request.resolve(result);
102
+ };
103
+ return /* @__PURE__ */ jsxs(ConfirmContext.Provider, { value: confirm, children: [
104
+ children,
105
+ lastOptions && /* @__PURE__ */ jsx(
106
+ ConfirmPanel,
107
+ {
108
+ ...lastOptions,
109
+ requestId: request?.id,
110
+ open: request !== null,
111
+ onConfirm: () => settle(true),
112
+ onCancel: () => settle(false)
113
+ }
114
+ )
115
+ ] });
116
+ }
117
+ function useConfirm() {
118
+ const confirm = useContext(ConfirmContext);
119
+ if (!confirm) throw new Error("useConfirm \u5FC5\u987B\u5728 ConfirmProvider \u5185\u8C03\u7528\u3002");
120
+ return confirm;
121
+ }
122
+
123
+ export {
124
+ Confirm,
125
+ ConfirmProvider,
126
+ useConfirm
127
+ };
@@ -0,0 +1,24 @@
1
+ import * as react from 'react';
2
+ import { ReactNode } from 'react';
3
+ import { D as DialogProps } from './modal-panel-BOpp1oRC.js';
4
+ import 'react-native';
5
+ import './focus-C0k0lLui.js';
6
+
7
+ type ConfirmTone = 'default' | 'danger';
8
+ interface ConfirmProps extends Omit<DialogProps, 'children' | 'onClose'> {
9
+ confirmText?: string;
10
+ cancelText?: string;
11
+ tone?: ConfirmTone;
12
+ loading?: boolean;
13
+ onConfirm: () => void;
14
+ onCancel: () => void;
15
+ }
16
+ type ConfirmOptions = Omit<ConfirmProps, 'open' | 'onConfirm' | 'onCancel'>;
17
+ type ConfirmFunction = (options: ConfirmOptions) => Promise<boolean>;
18
+ declare function Confirm(props: ConfirmProps): react.JSX.Element;
19
+ declare function ConfirmProvider({ children }: {
20
+ children: ReactNode;
21
+ }): react.JSX.Element;
22
+ declare function useConfirm(): ConfirmFunction;
23
+
24
+ export { Confirm, type ConfirmFunction, type ConfirmOptions, type ConfirmProps, ConfirmProvider, type ConfirmTone, useConfirm };
@@ -0,0 +1,14 @@
1
+ import {
2
+ Confirm,
3
+ ConfirmProvider,
4
+ useConfirm
5
+ } from "./chunk-ZTQATW6Y.js";
6
+ import "./chunk-PLFX4RVR.js";
7
+ import "./chunk-7LN4VNRB.js";
8
+ import "./chunk-6RD26X3W.js";
9
+ import "./chunk-YJ4H3ZBQ.js";
10
+ export {
11
+ Confirm,
12
+ ConfirmProvider,
13
+ useConfirm
14
+ };
@@ -0,0 +1,8 @@
1
+ import * as react from 'react';
2
+ import { D as DialogProps } from './modal-panel-BOpp1oRC.js';
3
+ import 'react-native';
4
+ import './focus-C0k0lLui.js';
5
+
6
+ declare function Dialog(props: DialogProps): react.JSX.Element;
7
+
8
+ export { Dialog, DialogProps };
@@ -0,0 +1,10 @@
1
+ import {
2
+ Dialog
3
+ } from "./chunk-6SR5ZHDD.js";
4
+ import "./chunk-PLFX4RVR.js";
5
+ import "./chunk-7LN4VNRB.js";
6
+ import "./chunk-6RD26X3W.js";
7
+ import "./chunk-YJ4H3ZBQ.js";
8
+ export {
9
+ Dialog
10
+ };
@@ -0,0 +1,13 @@
1
+ import * as react from 'react';
2
+ import { D as DialogProps } from './modal-panel-BOpp1oRC.js';
3
+ import { P as Placement } from './position-CkPoZ5AD.js';
4
+ import 'react-native';
5
+ import './focus-C0k0lLui.js';
6
+
7
+ type DrawerPlacement = Placement;
8
+ interface DrawerProps extends DialogProps {
9
+ placement?: DrawerPlacement;
10
+ }
11
+ declare function Drawer({ placement, ...props }: DrawerProps): react.JSX.Element;
12
+
13
+ export { Drawer, type DrawerPlacement, type DrawerProps };
@@ -0,0 +1,10 @@
1
+ import {
2
+ Drawer
3
+ } from "./chunk-6VYUVVCP.js";
4
+ import "./chunk-PLFX4RVR.js";
5
+ import "./chunk-7LN4VNRB.js";
6
+ import "./chunk-6RD26X3W.js";
7
+ import "./chunk-YJ4H3ZBQ.js";
8
+ export {
9
+ Drawer
10
+ };
@@ -0,0 +1,9 @@
1
+ import { RefObject } from 'react';
2
+ import { View } from 'react-native';
3
+
4
+ type FocusTarget = View & {
5
+ focus?: () => void;
6
+ };
7
+ type FocusRef = RefObject<FocusTarget | null>;
8
+
9
+ export type { FocusRef as F, FocusTarget as a };
@@ -0,0 +1,28 @@
1
+ import * as react from 'react';
2
+ import { SvgProps } from 'react-native-svg';
3
+
4
+ /**
5
+ * Icon 名称数组 + 派生类型
6
+ * ───────────────────────────────────────────────────────────────────────────
7
+ * 把名称数组从 Icon.tsx 拆出来的原因:
8
+ * `react-refresh/only-export-components` 要求一个文件要么只导出组件,要么把
9
+ * 非组件导出拆到独立文件。Icon.tsx 同时导出 Icon 组件和 ICON_NAMES 常量会
10
+ * 触发该规则,故把名称数组 + 类型派生放到这里。
11
+ *
12
+ * 设计:单一数据源。IconName 类型从 ICON_NAMES 数组派生,避免数组与联合
13
+ * 类型之间出现漂移。新增图标只需在数组里追加一个字面量。
14
+ */
15
+ /** 59 个图标名称字面量数组(运行时枚举与 demo 遍历用) */
16
+ declare const ICON_NAMES: readonly ["file", "save", "study", "switch", "mouse", "line", "curve", "polygon", "lasso", "rectangle", "ellipse", "pen", "eraser", "magnet", "locate", "delete", "add", "copy", "paste", "info", "touch", "edit", "comment", "keyboard", "type", "handle", "card", "minimap", "font-size", "drag", "crop", "search", "close", "check", "chevron-down", "chevron-up", "chevron-left", "chevron-right", "arrow-up", "arrow-down", "arrow-left", "arrow-right", "settings", "user", "home", "star", "bookmark", "link", "image", "calendar", "clock", "bell", "download", "upload", "share", "undo", "redo", "zoom-in", "zoom-out", "fullscreen", "fullscreen-exit", "menu", "more", "filter", "sort"];
17
+ /** 59 个图标的名称联合类型(从 ICON_NAMES 派生,单一数据源) */
18
+ type IconName = (typeof ICON_NAMES)[number];
19
+
20
+ interface IconProps extends Omit<SvgProps, 'name'> {
21
+ name: IconName;
22
+ label?: string;
23
+ size?: number;
24
+ color?: string;
25
+ }
26
+ declare function Icon({ name, label, size, color, ...props }: IconProps): react.JSX.Element;
27
+
28
+ export { ICON_NAMES, Icon, type IconName, type IconProps };
@@ -0,0 +1,9 @@
1
+ import {
2
+ ICON_NAMES,
3
+ Icon
4
+ } from "./chunk-GSG6CXIE.js";
5
+ import "./chunk-YJ4H3ZBQ.js";
6
+ export {
7
+ ICON_NAMES,
8
+ Icon
9
+ };
@@ -0,0 +1,20 @@
1
+ export { Button, ButtonProps, ButtonSize, ButtonVariant } from './button.js';
2
+ export { ICON_NAMES, Icon, IconName, IconProps } from './icon.js';
3
+ export { TextField, TextFieldProps } from './text-field.js';
4
+ export { Popover, PopoverProps } from './popover.js';
5
+ export { Menu, MenuItem, MenuItemProps, MenuLabel, MenuProps, MenuSeparator, MenuSubmenu, MenuSubmenuProps } from './menu.js';
6
+ export { AccentColors, NativeAccent, NativeTheme, THEME_ACCENTS, ThemeAccentPreset, ThemeMode, ThemeProvider, ThemeProviderProps, TokenOverrides, createTheme, resolveAccent, useTheme } from './theme.js';
7
+ export { Badge, BadgeProps, BadgeTone } from './badge.js';
8
+ export { Confirm, ConfirmFunction, ConfirmOptions, ConfirmProps, ConfirmProvider, ConfirmTone, useConfirm } from './confirm.js';
9
+ export { Dialog } from './dialog.js';
10
+ export { Drawer, DrawerPlacement, DrawerProps } from './drawer.js';
11
+ export { Kbd, KbdProps } from './kbd.js';
12
+ export { Loading, LoadingOptions, LoadingProps, LoadingProvider, LoadingSize, ShowLoading, useLoading } from './loading.js';
13
+ export { NoteCard, NoteCardProps } from './note-card.js';
14
+ export { D as DialogProps } from './modal-panel-BOpp1oRC.js';
15
+ export { F as FocusRef, a as FocusTarget } from './focus-C0k0lLui.js';
16
+ export { N as NUMERIC_TOKENS } from './tokens-DHoNd-yT.js';
17
+ export { P as Placement } from './position-CkPoZ5AD.js';
18
+ import 'react';
19
+ import 'react-native';
20
+ import 'react-native-svg';
@@ -0,0 +1,84 @@
1
+ import {
2
+ Loading,
3
+ LoadingProvider,
4
+ useLoading
5
+ } from "./chunk-KPDK62A5.js";
6
+ import {
7
+ Menu,
8
+ MenuItem,
9
+ MenuLabel,
10
+ MenuSeparator,
11
+ MenuSubmenu
12
+ } from "./chunk-JHT74YG3.js";
13
+ import {
14
+ NoteCard
15
+ } from "./chunk-QUGLAOXA.js";
16
+ import {
17
+ Popover
18
+ } from "./chunk-ENTYQ6M4.js";
19
+ import {
20
+ TextField
21
+ } from "./chunk-CF76TWL4.js";
22
+ import {
23
+ Badge
24
+ } from "./chunk-S2EUKEYI.js";
25
+ import {
26
+ Confirm,
27
+ ConfirmProvider,
28
+ useConfirm
29
+ } from "./chunk-ZTQATW6Y.js";
30
+ import {
31
+ Dialog
32
+ } from "./chunk-6SR5ZHDD.js";
33
+ import {
34
+ Drawer
35
+ } from "./chunk-6VYUVVCP.js";
36
+ import "./chunk-PLFX4RVR.js";
37
+ import "./chunk-7LN4VNRB.js";
38
+ import {
39
+ Button
40
+ } from "./chunk-6RD26X3W.js";
41
+ import {
42
+ ICON_NAMES,
43
+ Icon
44
+ } from "./chunk-GSG6CXIE.js";
45
+ import {
46
+ Kbd
47
+ } from "./chunk-VTE5RPMO.js";
48
+ import {
49
+ NUMERIC_TOKENS,
50
+ THEME_ACCENTS,
51
+ ThemeProvider,
52
+ createTheme,
53
+ resolveAccent,
54
+ useTheme
55
+ } from "./chunk-YJ4H3ZBQ.js";
56
+ export {
57
+ Badge,
58
+ Button,
59
+ Confirm,
60
+ ConfirmProvider,
61
+ Dialog,
62
+ Drawer,
63
+ ICON_NAMES,
64
+ Icon,
65
+ Kbd,
66
+ Loading,
67
+ LoadingProvider,
68
+ Menu,
69
+ MenuItem,
70
+ MenuLabel,
71
+ MenuSeparator,
72
+ MenuSubmenu,
73
+ NUMERIC_TOKENS,
74
+ NoteCard,
75
+ Popover,
76
+ THEME_ACCENTS,
77
+ TextField,
78
+ ThemeProvider,
79
+ createTheme,
80
+ resolveAccent,
81
+ useConfirm,
82
+ useLoading,
83
+ useTheme
84
+ };
@@ -0,0 +1,9 @@
1
+ import * as react from 'react';
2
+ import { ViewProps } from 'react-native';
3
+
4
+ interface KbdProps extends ViewProps {
5
+ keys?: readonly string[];
6
+ }
7
+ declare function Kbd({ children, keys, style, ...props }: KbdProps): react.JSX.Element;
8
+
9
+ export { Kbd, type KbdProps };
@@ -0,0 +1,7 @@
1
+ import {
2
+ Kbd
3
+ } from "./chunk-VTE5RPMO.js";
4
+ import "./chunk-YJ4H3ZBQ.js";
5
+ export {
6
+ Kbd
7
+ };
@@ -0,0 +1,19 @@
1
+ import * as react from 'react';
2
+ import { ReactNode } from 'react';
3
+ import { ViewProps } from 'react-native';
4
+
5
+ type LoadingSize = 'small' | 'medium' | 'large';
6
+ interface LoadingOptions {
7
+ text?: string;
8
+ size?: LoadingSize;
9
+ }
10
+ interface LoadingProps extends ViewProps, LoadingOptions {
11
+ }
12
+ declare function Loading({ text, size, style, accessibilityLabel, ...props }: LoadingProps): react.JSX.Element;
13
+ type ShowLoading = (options?: LoadingOptions) => () => void;
14
+ declare function LoadingProvider({ children }: {
15
+ children: ReactNode;
16
+ }): react.JSX.Element;
17
+ declare function useLoading(): ShowLoading;
18
+
19
+ export { Loading, type LoadingOptions, type LoadingProps, LoadingProvider, type LoadingSize, type ShowLoading, useLoading };
@@ -0,0 +1,11 @@
1
+ import {
2
+ Loading,
3
+ LoadingProvider,
4
+ useLoading
5
+ } from "./chunk-KPDK62A5.js";
6
+ import "./chunk-YJ4H3ZBQ.js";
7
+ export {
8
+ Loading,
9
+ LoadingProvider,
10
+ useLoading
11
+ };
@@ -0,0 +1,31 @@
1
+ import * as react from 'react';
2
+ import { ReactNode } from 'react';
3
+ import { PopoverProps } from './popover.js';
4
+ import 'react-native';
5
+ import './focus-C0k0lLui.js';
6
+ import './position-CkPoZ5AD.js';
7
+
8
+ interface MenuItemProps {
9
+ children: ReactNode;
10
+ disabled?: boolean;
11
+ tone?: 'default' | 'danger';
12
+ shortcut?: string;
13
+ onPress?: () => void;
14
+ accessibilityLabel?: string;
15
+ }
16
+ interface MenuSubmenuProps {
17
+ label: string;
18
+ children: ReactNode;
19
+ disabled?: boolean;
20
+ }
21
+ declare function MenuItem(_props: MenuItemProps): null;
22
+ declare function MenuSubmenu(_props: MenuSubmenuProps): null;
23
+ declare function MenuLabel(_props: {
24
+ children: ReactNode;
25
+ }): null;
26
+ declare function MenuSeparator(): null;
27
+ interface MenuProps extends Omit<PopoverProps, 'onBack' | 'initialFocusRef' | 'focusKey'> {
28
+ }
29
+ declare function Menu({ children, open, onClose, ...props }: MenuProps): react.JSX.Element;
30
+
31
+ export { Menu, MenuItem, type MenuItemProps, MenuLabel, type MenuProps, MenuSeparator, MenuSubmenu, type MenuSubmenuProps };
@@ -0,0 +1,17 @@
1
+ import {
2
+ Menu,
3
+ MenuItem,
4
+ MenuLabel,
5
+ MenuSeparator,
6
+ MenuSubmenu
7
+ } from "./chunk-JHT74YG3.js";
8
+ import "./chunk-ENTYQ6M4.js";
9
+ import "./chunk-7LN4VNRB.js";
10
+ import "./chunk-YJ4H3ZBQ.js";
11
+ export {
12
+ Menu,
13
+ MenuItem,
14
+ MenuLabel,
15
+ MenuSeparator,
16
+ MenuSubmenu
17
+ };
@@ -0,0 +1,23 @@
1
+ import { ReactNode } from 'react';
2
+ import { StyleProp, ViewStyle } from 'react-native';
3
+ import { F as FocusRef } from './focus-C0k0lLui.js';
4
+
5
+ interface ModalFocusProps {
6
+ triggerRef?: FocusRef;
7
+ fallbackFocusRef?: FocusRef;
8
+ initialFocusRef?: FocusRef;
9
+ }
10
+
11
+ interface DialogProps extends ModalFocusProps {
12
+ open: boolean;
13
+ title: string;
14
+ description?: string;
15
+ children?: ReactNode;
16
+ onClose: () => void;
17
+ closeLabel?: string;
18
+ closeOnBackdrop?: boolean;
19
+ closeOnSystemBack?: boolean;
20
+ style?: StyleProp<ViewStyle>;
21
+ }
22
+
23
+ export type { DialogProps as D };
@@ -0,0 +1,13 @@
1
+ import * as react from 'react';
2
+ import { ViewProps, PressableProps } from 'react-native';
3
+
4
+ interface NoteCardProps extends Omit<ViewProps, 'children'> {
5
+ title: string;
6
+ excerpt: string;
7
+ meta: string;
8
+ selected?: boolean;
9
+ onPress?: PressableProps['onPress'];
10
+ }
11
+ declare function NoteCard({ title, excerpt, meta, selected, onPress, style, accessibilityState, ...props }: NoteCardProps): react.JSX.Element;
12
+
13
+ export { NoteCard, type NoteCardProps };
@@ -0,0 +1,7 @@
1
+ import {
2
+ NoteCard
3
+ } from "./chunk-QUGLAOXA.js";
4
+ import "./chunk-YJ4H3ZBQ.js";
5
+ export {
6
+ NoteCard
7
+ };
@@ -0,0 +1,34 @@
1
+ import * as react from 'react';
2
+ import { ReactNode, RefObject } from 'react';
3
+ import { View, StyleProp, ViewStyle } from 'react-native';
4
+ import { F as FocusRef } from './focus-C0k0lLui.js';
5
+ export { a as FocusTarget } from './focus-C0k0lLui.js';
6
+ import { P as Placement } from './position-CkPoZ5AD.js';
7
+
8
+ interface PopoverProps {
9
+ open: boolean;
10
+ onClose: () => void;
11
+ children: ReactNode;
12
+ accessibilityLabel: string;
13
+ anchorRef?: RefObject<View | null>;
14
+ triggerRef?: FocusRef;
15
+ fallbackFocusRef?: FocusRef;
16
+ initialFocusRef?: FocusRef;
17
+ placement?: Placement;
18
+ anchorOffset?: number;
19
+ viewportMargin?: number;
20
+ /** Supply host safe-area insets (e.g. useSafeAreaInsets); library has no Expo dependency. */
21
+ safeAreaInsets?: {
22
+ top: number;
23
+ right: number;
24
+ bottom: number;
25
+ left: number;
26
+ };
27
+ style?: StyleProp<ViewStyle>;
28
+ onBack?: () => boolean;
29
+ focusKey?: string;
30
+ closeLabel?: string;
31
+ }
32
+ declare function Popover({ open, onClose, children, accessibilityLabel, anchorRef, triggerRef, fallbackFocusRef, initialFocusRef, placement, anchorOffset, viewportMargin, safeAreaInsets, style, onBack, focusKey, closeLabel, }: PopoverProps): react.JSX.Element;
33
+
34
+ export { FocusRef, Placement, Popover, type PopoverProps };
@@ -0,0 +1,8 @@
1
+ import {
2
+ Popover
3
+ } from "./chunk-ENTYQ6M4.js";
4
+ import "./chunk-7LN4VNRB.js";
5
+ import "./chunk-YJ4H3ZBQ.js";
6
+ export {
7
+ Popover
8
+ };
@@ -0,0 +1,3 @@
1
+ type Placement = 'top' | 'bottom' | 'left' | 'right';
2
+
3
+ export type { Placement as P };
@@ -0,0 +1,13 @@
1
+ import * as react from 'react';
2
+ import { TextInputProps, StyleProp, ViewStyle, TextInput } from 'react-native';
3
+
4
+ interface TextFieldProps extends TextInputProps {
5
+ label: string;
6
+ hint?: string;
7
+ error?: string;
8
+ disabled?: boolean;
9
+ containerStyle?: StyleProp<ViewStyle>;
10
+ }
11
+ declare const TextField: react.ForwardRefExoticComponent<TextFieldProps & react.RefAttributes<TextInput>>;
12
+
13
+ export { TextField, type TextFieldProps };
@@ -0,0 +1,7 @@
1
+ import {
2
+ TextField
3
+ } from "./chunk-CF76TWL4.js";
4
+ import "./chunk-YJ4H3ZBQ.js";
5
+ export {
6
+ TextField
7
+ };