@cp949/mui-react19 2.0.3 → 2.1.0
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/LICENSE +21 -0
- package/README.md +10 -0
- package/dist/closables-CeOGJV-d.d.cts +136 -0
- package/dist/closables-CeOGJV-d.d.ts +136 -0
- package/dist/file-drop/index.cjs +1 -1
- package/dist/file-drop/index.cjs.map +1 -1
- package/dist/file-drop/index.d.cts +224 -217
- package/dist/file-drop/index.d.ts +224 -217
- package/dist/file-drop/index.js +1 -1
- package/dist/file-drop/index.js.map +1 -1
- package/dist/helper/index.cjs +1 -1
- package/dist/helper/index.cjs.map +1 -1
- package/dist/helper/index.d.cts +22 -38
- package/dist/helper/index.d.ts +22 -38
- package/dist/helper/index.js +1 -1
- package/dist/helper/index.js.map +1 -1
- package/dist/hooks/index.cjs +1 -1
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.cts +417 -307
- package/dist/hooks/index.d.ts +417 -307
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/index.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1032 -684
- package/dist/index.d.ts +1032 -684
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/misc-utils-B2de-HS4.cjs +2 -0
- package/dist/misc-utils-B2de-HS4.cjs.map +1 -0
- package/dist/misc-utils-BXQ8UU0R.js +2 -0
- package/dist/misc-utils-BXQ8UU0R.js.map +1 -0
- package/dist/parallel-map-DyuHvxYY.js +2 -0
- package/dist/parallel-map-DyuHvxYY.js.map +1 -0
- package/dist/parallel-map-_ZhC5iBn.cjs +2 -0
- package/dist/parallel-map-_ZhC5iBn.cjs.map +1 -0
- package/dist/rolldown-runtime-Chgba0Kb.cjs +1 -0
- package/dist/rolldown-runtime-DK3Fl9T5.js +1 -0
- package/llm.txt +350 -0
- package/package.json +19 -17
- package/dist/chunk-2OEB5VHZ.js +0 -2
- package/dist/chunk-2OEB5VHZ.js.map +0 -1
- package/dist/chunk-4C666HHU.js +0 -2
- package/dist/chunk-4C666HHU.js.map +0 -1
- package/dist/chunk-M4G6J7DP.cjs +0 -2
- package/dist/chunk-M4G6J7DP.cjs.map +0 -1
- package/dist/chunk-QNR3IXPA.cjs +0 -2
- package/dist/chunk-QNR3IXPA.cjs.map +0 -1
- package/dist/closables-BK0Db72u.d.cts +0 -135
- package/dist/closables-BK0Db72u.d.ts +0 -135
- package/dist/parallel-map-M764G6IE.js +0 -2
- package/dist/parallel-map-M764G6IE.js.map +0 -1
- package/dist/parallel-map-V2OVUIFQ.cjs +0 -2
- package/dist/parallel-map-V2OVUIFQ.cjs.map +0 -1
package/llm.txt
ADDED
|
@@ -0,0 +1,350 @@
|
|
|
1
|
+
# Library: @cp949/mui-react19
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
- React component and hook library built on MUI (`@mui/material` v9).
|
|
5
|
+
- Ships four entry points: the package root (components and utilities), `/hooks`, `/helper`, and `/file-drop`.
|
|
6
|
+
- Requires React 19. React 18 is not supported.
|
|
7
|
+
- Peer dependencies: `react` ^19, `@mui/material` ^9, `@mui/system` ^9, `rxjs` ^7.
|
|
8
|
+
|
|
9
|
+
## Entry Points
|
|
10
|
+
- `@cp949/mui-react19`: layout and interaction components, `Closables`, event/sx utilities.
|
|
11
|
+
- `@cp949/mui-react19/hooks`: state, timing, storage, DOM observer, and responsive hooks.
|
|
12
|
+
- `@cp949/mui-react19/helper`: `cssVars` and `mediaQueries` helpers for MUI theme CSS variables and media queries.
|
|
13
|
+
- `@cp949/mui-react19/file-drop`: drag-and-drop file and directory tree processing. See `README.file-drop.md` in this package for details.
|
|
14
|
+
|
|
15
|
+
## Key APIs
|
|
16
|
+
Signatures are generated from the published type declarations. Props types list only their own members; inherited members come from the MUI type named in `extends`.
|
|
17
|
+
|
|
18
|
+
### `@cp949/mui-react19`
|
|
19
|
+
|
|
20
|
+
Values:
|
|
21
|
+
- `blurEventTarget(event: { target: EventTarget | null; }, delay?: number | undefined): void`
|
|
22
|
+
- `BottomAbsolute(props: BottomAbsoluteProps): ReactNode | Promise<ReactNode>`
|
|
23
|
+
- `BottomAbsolute.Left(props: BottomAbsoluteLeftProps): ReactNode | Promise<ReactNode>`
|
|
24
|
+
- `BottomAbsolute.Right(props: BottomAbsoluteRightProps): ReactNode | Promise<ReactNode>`
|
|
25
|
+
- `BottomAbsolute.Center(props: BottomAbsoluteCenterProps): ReactNode | Promise<ReactNode>`
|
|
26
|
+
- `Center(props: CenterProps): JSX.Element`
|
|
27
|
+
- `CenterAbsolute(props: CenterAbsoluteProps): ReactNode | Promise<ReactNode>`
|
|
28
|
+
- `CenterAbsolute.Left(props: CenterAbsoluteLeftProps): ReactNode | Promise<ReactNode>`
|
|
29
|
+
- `CenterAbsolute.Right(props: CenterAbsoluteRightProps): ReactNode | Promise<ReactNode>`
|
|
30
|
+
- `CenterAbsolute.Center(props: CenterAbsoluteCenterProps): ReactNode | Promise<ReactNode>`
|
|
31
|
+
- `class Closables { get events(): EventEmitter<{ closed: () => void; }, any>; get closeTrigger$(): Subject<unknown>; add: (...closables: (() => void)[]) => this; remove: (...closables: (() => void)[]) => this; addRx: (...closables: Array<{ unsubscribe: () => void; }>) => this; addUnsubscribe: (...closables: Array<{ unsubscribe: () => void; }>) => this; addClose: (...closables: Array<{ close: () => void; }>) => this; addDispose: (...closables: Array<{ dispose: () => void; }>) => this; addDestroy: (...closables: Array<{ destroy: () => void; }>) => this; addShutdown: (...closables: Array<{ shutdown: () => void; }>) => this; addTerminate: (...closables: Array<{ terminate: () => void; }>) => this; addElementListener: <K extends ElemEventType>(elem: HTMLElement, type: K, listener: ElemEventListener<K>, options?: EventOptions) => this; addDocumentListener: <K extends DocEventType>(type: K, listener: DocEventListener<K>, options?: EventOptions) => this; addWindowListener: <K extends WinEventType>(type: K, listener: WinEventListener<K>, options?: EventOptions) => this; get count(): number; close: () => void; static create: (...closables: (() => void)[]) => Closables; static createWindowListener: <K extends WinEventType>(type: K, listener: WinEventListener<K>, options?: EventOptions) => Closables; static createDocumentListener: <K extends DocEventType>(type: K, listener: DocEventListener<K>, options?: EventOptions) => Closables; static createElementListener: <K extends ElemEventType>(elem: HTMLElement, type: K, listener: ElemEventListener<K>, options?: EventOptions) => Closables; static createRx: (...closables: { unsubscribe: () => void; }[]) => Closables; static createClose: (...closables: { close: () => void; }[]) => Closables; static createTerminate: (...closables: { terminate: () => void; }[]) => Closables; static createShutdown: (...closables: { shutdown: () => void; }[]) => Closables; static createDestroy: (...closables: { destroy: () => void; }[]) => Closables; static createDispose: (...closables: { dispose: () => void; }[]) => Closables; }`
|
|
32
|
+
- `CooldownButton(props: CooldownButtonProps): JSX.Element`
|
|
33
|
+
- `CooldownButtonBase(props: CooldownButtonBaseProps): JSX.Element`
|
|
34
|
+
- `CooldownIconButton(props: CooldownIconButtonProps): JSX.Element`
|
|
35
|
+
- `CopyButtonWrapper(props: CopyButtonWrapperProps): JSX.Element`
|
|
36
|
+
- `CustomTableBody(props: CustomTableBodyProps): JSX.Element`
|
|
37
|
+
- `DebouncedButton(props: DebouncedButtonProps): JSX.Element`
|
|
38
|
+
- `DebouncedButtonBase(props: DebouncedButtonBaseProps): JSX.Element`
|
|
39
|
+
- `DebouncedIconButton(props: DebouncedIconButtonProps): JSX.Element`
|
|
40
|
+
- `DebouncedRender(props: DebouncedRenderProps): ReactNode | Promise<ReactNode>`
|
|
41
|
+
- `DelayedRender(props: DelayedRenderProps): ReactNode`
|
|
42
|
+
- `FileButton<Multiple extends boolean = false>(props: FileButtonProps<Multiple>): ReactElement<unknown, string | JSXElementConstructor<any>>`
|
|
43
|
+
- `firstSx<T extends Theme = Theme>(...sxArray: (SxProps<T> | undefined)[]): SxProps<T> | undefined`
|
|
44
|
+
- `flatSx<T extends Theme = Theme>(...sxArray: (false | SxProps<T> | undefined)[]): SxProps<T>`
|
|
45
|
+
- `FlexColumn(props: FlexColumnProps): ReactNode | Promise<ReactNode>`
|
|
46
|
+
- `FlexColumn.Start(props: FlexBaseProps): ReactNode | Promise<ReactNode>`
|
|
47
|
+
- `FlexColumn.End(props: FlexBaseProps): ReactNode | Promise<ReactNode>`
|
|
48
|
+
- `FlexColumn.Center(props: FlexBaseProps): ReactNode | Promise<ReactNode>`
|
|
49
|
+
- `FlexColumn.Between(props: FlexBaseProps): ReactNode | Promise<ReactNode>`
|
|
50
|
+
- `FlexColumn.Around(props: FlexBaseProps): ReactNode | Promise<ReactNode>`
|
|
51
|
+
- `FlexColumn.Evenly(props: FlexBaseProps): ReactNode | Promise<ReactNode>`
|
|
52
|
+
- `FlexItemsContainer<TItem>(props: FlexItemsContainerProps<TItem>): ReactElement<unknown, string | JSXElementConstructor<any>> | null`
|
|
53
|
+
- `FlexRow(props: FlexRowProps): ReactNode | Promise<ReactNode>`
|
|
54
|
+
- `FlexRow.Start(props: FlexBaseProps): ReactNode | Promise<ReactNode>`
|
|
55
|
+
- `FlexRow.End(props: FlexBaseProps): ReactNode | Promise<ReactNode>`
|
|
56
|
+
- `FlexRow.Center(props: FlexBaseProps): ReactNode | Promise<ReactNode>`
|
|
57
|
+
- `FlexRow.Between(props: FlexBaseProps): ReactNode | Promise<ReactNode>`
|
|
58
|
+
- `FlexRow.Around(props: FlexBaseProps): ReactNode | Promise<ReactNode>`
|
|
59
|
+
- `FlexRow.Evenly(props: FlexBaseProps): ReactNode | Promise<ReactNode>`
|
|
60
|
+
- `FloatingIndicator(props: FloatingIndicatorProps): JSX.Element | null`
|
|
61
|
+
- `getAbsolutePosition(element: HTMLElement): { x: number; y: number; }`
|
|
62
|
+
- `Hide(_props: HideProps): null`
|
|
63
|
+
- `Highlight(props: HighlightProps): JSX.Element`
|
|
64
|
+
- `isBrowser: boolean`
|
|
65
|
+
- `isEnterKeyEvent(e: KeyboardEvent<Element>): boolean`
|
|
66
|
+
- `isEnterOrTabKeyEvent(e: KeyboardEvent<Element>): boolean`
|
|
67
|
+
- `isEscapeKeyEvent(e: KeyboardEvent<Element>): boolean`
|
|
68
|
+
- `isMouseEvent(event: MouseEvent | TouchEvent): event is MouseEvent`
|
|
69
|
+
- `isNavigator: boolean`
|
|
70
|
+
- `isTabKeyEvent(e: KeyboardEvent<Element>): boolean`
|
|
71
|
+
- `isTouchDevice(): boolean`
|
|
72
|
+
- `isTouchEvent(event: MouseEvent | TouchEvent): event is TouchEvent`
|
|
73
|
+
- `isWebSerialSupportBrowser(): boolean`
|
|
74
|
+
- `LengthLimitHelperText(props: Props): JSX.Element`
|
|
75
|
+
- `LgOrUp(props: LgOrUpProps): JSX.Element | null`
|
|
76
|
+
- `ListPagination(props: ListPaginationProps): JSX.Element | null`
|
|
77
|
+
- `Mark(props: MarkProps): JSX.Element`
|
|
78
|
+
- `matchesOrClosest<T extends HTMLElement>(target: Element, selector: string): T | undefined`
|
|
79
|
+
- `MdOrDown(props: MdOrDownProps): JSX.Element | null`
|
|
80
|
+
- `MdOrUp(props: MdOrUpProps): JSX.Element | null`
|
|
81
|
+
- `noop(): void`
|
|
82
|
+
- `Paper(props: PaperProps): JSX.Element`
|
|
83
|
+
- `PasswordTextField(props: PasswordTextFieldProps): JSX.Element`
|
|
84
|
+
- `Portlet(props: PortletProps): ReactNode | Promise<ReactNode>`
|
|
85
|
+
- `Portlet.Content(props: PortletContentProps): JSX.Element`
|
|
86
|
+
- `Portlet.Header(props: PortletHeaderProps): JSX.Element`
|
|
87
|
+
- `Portlet.Footer(props: PortletFooterProps): JSX.Element`
|
|
88
|
+
- `Portlet.Label(props: PortletLabelProps): JSX.Element`
|
|
89
|
+
- `Portlet.Title(props: PortletTitleProps): JSX.Element`
|
|
90
|
+
- `Portlet.Toolbar(props: PortletToolbarProps): JSX.Element`
|
|
91
|
+
- `requestFocusSelector(parent: HTMLElement | Document | null | undefined, selector: string, delay?: number | undefined): void`
|
|
92
|
+
- `requestSelector(el: HTMLElement | Document | null | undefined, selector: string, callback: (elemnt: HTMLElement) => void, timeout?: number | undefined): void`
|
|
93
|
+
- `SearchBoxDebouncer<T>(props: SearchBoxDebouncerProps<T>): JSX.Element`
|
|
94
|
+
- `SegmentedControl(props: SegmentedControlProps): JSX.Element | null`
|
|
95
|
+
- `Show(props: ShowProps): ReactNode | Promise<ReactNode>`
|
|
96
|
+
- `SmOrDown(props: SmOrDownProps): JSX.Element | null`
|
|
97
|
+
- `SmOrUp(props: SmOrUpProps): JSX.Element | null`
|
|
98
|
+
- `Space(props: SpaceProps): JSX.Element`
|
|
99
|
+
- `Spoiler(props: SpoilerProps): JSX.Element`
|
|
100
|
+
- `StackColumn(props: StackColumnProps): ReactNode | Promise<ReactNode>`
|
|
101
|
+
- `StackColumn.Start(props: StackColumnSubVariantProps): ReactNode | Promise<ReactNode>`
|
|
102
|
+
- `StackColumn.End(props: StackColumnSubVariantProps): ReactNode | Promise<ReactNode>`
|
|
103
|
+
- `StackColumn.Between(props: StackColumnSubVariantProps): ReactNode | Promise<ReactNode>`
|
|
104
|
+
- `StackColumn.Around(props: StackColumnSubVariantProps): ReactNode | Promise<ReactNode>`
|
|
105
|
+
- `StackColumn.Center(props: StackColumnSubVariantProps): ReactNode | Promise<ReactNode>`
|
|
106
|
+
- `StackColumn.Evenly(props: StackColumnSubVariantProps): ReactNode | Promise<ReactNode>`
|
|
107
|
+
- `StackRow(props: StackRowProps): ReactNode | Promise<ReactNode>`
|
|
108
|
+
- `StackRow.Start(props: StackRowSubVariantProps): ReactNode | Promise<ReactNode>`
|
|
109
|
+
- `StackRow.End(props: StackRowSubVariantProps): ReactNode | Promise<ReactNode>`
|
|
110
|
+
- `StackRow.Between(props: StackRowSubVariantProps): ReactNode | Promise<ReactNode>`
|
|
111
|
+
- `StackRow.Around(props: StackRowSubVariantProps): ReactNode | Promise<ReactNode>`
|
|
112
|
+
- `StackRow.Center(props: StackRowSubVariantProps): ReactNode | Promise<ReactNode>`
|
|
113
|
+
- `StackRow.Evenly(props: StackRowSubVariantProps): ReactNode | Promise<ReactNode>`
|
|
114
|
+
- `sxDialogHeight(key?: "height" | "maxHeight" | "minHeight" | undefined, heightInPercent?: number | undefined): { '& .MuiDialog-scrollPaper > .MuiDialog-paper': { [x: string]: string; }; }`
|
|
115
|
+
- `TopAbsolute(props: TopAbsoluteProps): ReactNode | Promise<ReactNode>`
|
|
116
|
+
- `TopAbsolute.Left(props: TopAbsoluteLeftProps): ReactNode | Promise<ReactNode>`
|
|
117
|
+
- `TopAbsolute.Right(props: TopAbsoluteRightProps): ReactNode | Promise<ReactNode>`
|
|
118
|
+
- `TopAbsolute.Center(props: TopAbsoluteCenterProps): ReactNode | Promise<ReactNode>`
|
|
119
|
+
- `XsOrDown(props: XsOrDownProps): JSX.Element | null`
|
|
120
|
+
- `YmdTextField(props: YmdTextFieldProps): JSX.Element`
|
|
121
|
+
- `YmdTypography(props: YmdTypographyProps): JSX.Element`
|
|
122
|
+
- `YmTypography(props: YmTypographyProps): JSX.Element`
|
|
123
|
+
|
|
124
|
+
Types:
|
|
125
|
+
- `interface BottomAbsoluteCenterProps extends BoxProps { fullWidth?: boolean; bottom?: CSSProperties['bottom']; }`
|
|
126
|
+
- `interface BottomAbsoluteLeftProps extends BoxProps { fullWidth?: boolean; bottom?: CSSProperties['bottom']; left?: CSSProperties['left']; }`
|
|
127
|
+
- `interface BottomAbsoluteProps extends BoxProps { left?: CSSProperties['left']; right?: CSSProperties['right']; bottom?: CSSProperties['bottom']; }`
|
|
128
|
+
- `interface BottomAbsoluteRightProps extends BoxProps { fullWidth?: boolean; bottom?: CSSProperties['bottom']; right?: CSSProperties['right']; }`
|
|
129
|
+
- `interface CenterAbsoluteCenterProps extends BoxProps { fullWidth?: boolean; }`
|
|
130
|
+
- `interface CenterAbsoluteLeftProps extends BoxProps { left?: CSSProperties['left']; fullWidth?: boolean; }`
|
|
131
|
+
- `interface CenterAbsoluteProps extends BoxProps { left?: CSSProperties['left']; right?: CSSProperties['right']; }`
|
|
132
|
+
- `interface CenterAbsoluteRightProps extends BoxProps { right?: CSSProperties['right']; fullWidth?: boolean; }`
|
|
133
|
+
- `interface CenterProps extends Omit<StackProps, 'direction'> { vertical?: boolean; }`
|
|
134
|
+
- `interface CooldownButtonBaseProps extends ButtonBaseProps { cooldown?: number; }`
|
|
135
|
+
- `interface CooldownButtonProps extends ButtonProps { cooldown?: number; }`
|
|
136
|
+
- `interface CooldownIconButtonProps extends IconButtonProps { cooldown?: number; }`
|
|
137
|
+
- `interface CopyButtonWrapperProps { children: (payload: { copied: boolean; copy: () => void; }) => ReactNode; value: string | null | undefined | (() => string | null | undefined); timeout?: number; onCopySuccess?: (value: string) => void; }`
|
|
138
|
+
- `interface CustomTableBodyProps extends TableBodyProps { loading?: boolean; stripe?: boolean; }`
|
|
139
|
+
- `interface DebouncedButtonBaseProps extends ButtonBaseProps { debounce?: number; }`
|
|
140
|
+
- `interface DebouncedButtonProps extends ButtonProps { debounce?: number; }`
|
|
141
|
+
- `interface DebouncedIconButtonProps extends IconButtonProps { debounce?: number; }`
|
|
142
|
+
- `interface DebouncedRenderProps { children: ReactNode; leading?: boolean; trailing?: boolean; maxWait?: number; }`
|
|
143
|
+
- `interface DelayedRenderProps { delayMs?: number; children: ReactNode; }`
|
|
144
|
+
- `interface FileButtonProps<Multiple extends boolean = false> { onChange: (payload: Multiple extends true ? File[] : File) => void; children: (props: { onClick: () => void; }) => ReactNode; multiple?: Multiple; accept?: string; name?: string; form?: string; resetRef?: React.ForwardedRef<() => void>; disabled?: boolean; capture?: boolean | 'user' | 'environment'; inputProps?: React.ComponentPropsWithoutRef<'input'>; ref?: React.Ref<HTMLInputElement>; }`
|
|
145
|
+
- `interface FlexBaseProps extends BoxProps { alignItems?: CSSProperties['alignItems']; justifyContent?: CSSProperties['justifyContent']; flexWrap?: CSSProperties['flexWrap']; inlineFlex?: boolean; }`
|
|
146
|
+
- `interface FlexColumnProps extends FlexBaseProps { center?: boolean; }`
|
|
147
|
+
- `type FlexItemsContainerProps<TItem> = Omit<GridProps, 'container' | 'children'> & { items: readonly TItem[]; getItemKey: (item: TItem, index: number) => string | number; getItemSize?: (item: TItem, index: number) => GridProps['size'] | undefined; isLineBreakItem?: (item: TItem, index: number) => boolean; lineBreakGroup?: (item: TItem, index: number) => unknown; breakBefore?: (item: TItem, index: number) => boolean; breakAfter?: (item: TItem, index: number) => boolean; children: (item: TItem, index: number) => ReactNode; lineBreakHeight?: number | string; }`
|
|
148
|
+
- `interface FlexRowProps extends FlexBaseProps { center?: boolean; }`
|
|
149
|
+
- `interface FloatingIndicatorProps extends BoxProps { target: HTMLElement | null | undefined; parent: HTMLElement | null | undefined; transitionDuration?: number | string; displayAfterTransitionEnd?: boolean; excludeTargetBorderWidth?: boolean; }`
|
|
150
|
+
- `interface HideProps { devComment?: unknown; children?: ReactNode; }`
|
|
151
|
+
- `interface HighlightProps { sx?: SxProps<Theme>; className?: string; style?: CSSProperties; variant?: TypographyProps['variant']; highlight: string | string[]; color?: string; highlightSx?: SxProps; children: string; ignorecase?: boolean; includeDataAttribute?: boolean; ref?: Ref<HTMLElement>; }`
|
|
152
|
+
- `interface LgOrUpProps { children?: ReactNode | ReactNode[]; }`
|
|
153
|
+
- `interface ListPaginationProps extends Omit<PaginationProps, 'page' | 'count' | 'onChange' | 'hidden' | 'ref'> { page: number; count: number; onChange?: (pageNumber: number) => void; zeroBased?: boolean; hidden?: boolean; disableAutoScroll?: boolean; }`
|
|
154
|
+
- `interface MarkProps { sx?: SxProps; className?: string; color?: string; bgcolor?: string; children?: ReactNode; ref?: Ref<HTMLElement>; }`
|
|
155
|
+
- `interface MdOrDownProps { children?: ReactNode | ReactNode[]; }`
|
|
156
|
+
- `interface MdOrUpProps { children?: ReactNode | ReactNode[]; }`
|
|
157
|
+
- `interface PaperProps extends PaperProps$1 { squared?: boolean; outlined?: boolean; }`
|
|
158
|
+
- `type PasswordTextFieldProps = Omit<TextFieldProps, 'type'> & { showLabel?: string; hideLabel?: string; }`
|
|
159
|
+
- `interface PortletContentProps extends BoxProps { noPadding?: boolean; }`
|
|
160
|
+
- `interface PortletFooterProps extends BoxProps { noDivider?: boolean; }`
|
|
161
|
+
- `interface PortletHeaderProps extends BoxProps { noDivider?: boolean; noPadding?: boolean; }`
|
|
162
|
+
- `interface PortletLabelProps extends BoxProps { icon?: ReactNode; title?: string; subtitle?: string; }`
|
|
163
|
+
- `interface PortletProps extends Omit<PaperProps$1, 'elevation' | 'component' | 'nonce'> { children?: ReactNode; }`
|
|
164
|
+
- `interface PortletTitleProps extends Omit<StackProps, 'title' | 'direction' | 'children'> { title: ReactNode; titleVariant?: TypographyProps['variant']; itemCount?: number; formatItemCount?: (count: number) => ReactNode; loading?: boolean; disableNowrapTitle?: boolean; refreshLabel?: string; onClickRefresh?: MouseEventHandler<HTMLButtonElement>; }`
|
|
165
|
+
- `type PortletToolbarProps = BoxProps`
|
|
166
|
+
- `interface SearchBoxDebouncerProps<T> { delayMs?: number; params: Partial<T>; onChange: (params: Partial<T>) => void; children: (props: { params: Partial<T>; onChange: (params: Partial<T>) => void; flush: () => void; }) => ReactNode; }`
|
|
167
|
+
- `interface SegmentedControlItem { value: string; label: ReactNode; disabled?: boolean; }`
|
|
168
|
+
- `interface SegmentedControlProps { ref?: Ref<HTMLDivElement>; sx?: SxProps<Theme>; className?: string; style?: CSSProperties; disabled?: boolean; data: (string | SegmentedControlItem)[]; value?: string; defaultValue?: string; onChange?: (value: string) => void; fullWidth?: boolean; transitionDuration?: number; transitionTimingFunction?: string; vertical?: boolean; readOnly?: boolean; withItemBorder?: boolean; primaryColor?: TypographyProps['color']; secondaryColor?: TypographyProps['color']; indicator?: ReactNode; size?: 'small' | 'medium' | 'large'; }`
|
|
169
|
+
- `interface ShowProps { when: boolean | null | undefined; children?: ReactNode; fallback?: ReactNode; }`
|
|
170
|
+
- `interface SmOrDownProps { children?: ReactNode | ReactNode[]; }`
|
|
171
|
+
- `interface SmOrUpProps { children?: ReactNode | ReactNode[]; }`
|
|
172
|
+
- `interface SpaceProps extends BoxProps { width?: number; height?: number; minWidth?: number; minHeight?: number; }`
|
|
173
|
+
- `interface SpoilerProps { sx?: SxProps; className?: string; style?: CSSProperties; id?: string; maxHeight?: number; hideLabel: React.ReactNode; showLabel: React.ReactNode; controlRef?: React.ForwardedRef<HTMLButtonElement>; initialState?: boolean; expanded?: boolean; onExpandedChange?: (expanded: boolean) => void; transitionDuration?: number; children?: ReactNode; ref?: Ref<HTMLElement>; }`
|
|
174
|
+
- `interface StackColumnProps extends Omit<StackProps, 'direction'> { center?: boolean; alignItems?: React.CSSProperties['alignItems']; justifyContent?: React.CSSProperties['justifyContent']; }`
|
|
175
|
+
- `interface StackRowProps extends Omit<StackProps, 'direction'> { center?: boolean; alignItems?: React.CSSProperties['alignItems']; justifyContent?: React.CSSProperties['justifyContent']; }`
|
|
176
|
+
- `interface TopAbsoluteCenterProps extends BoxProps { fullWidth?: boolean; top?: CSSProperties['top']; }`
|
|
177
|
+
- `interface TopAbsoluteLeftProps extends BoxProps { fullWidth?: boolean; top?: CSSProperties['top']; left?: CSSProperties['left']; }`
|
|
178
|
+
- `interface TopAbsoluteProps extends BoxProps { top?: CSSProperties['top']; left?: CSSProperties['left']; right?: CSSProperties['right']; }`
|
|
179
|
+
- `interface TopAbsoluteRightProps extends BoxProps { fullWidth?: boolean; top?: CSSProperties['top']; right?: CSSProperties['right']; }`
|
|
180
|
+
- `interface XsOrDownProps { children?: ReactNode | ReactNode[]; }`
|
|
181
|
+
- `interface YmdTextFieldProps extends Omit<TextFieldProps, 'value' | 'onChange'> { value: string; onChange: (value: string) => void; format: string; }`
|
|
182
|
+
- `interface YmdTypographyProps extends Omit<TypographyProps, 'children'> { value: number | string | null | undefined; format?: string; fallback?: string; raw?: boolean; }`
|
|
183
|
+
- `interface YmTypographyProps extends Omit<TypographyProps, 'children'> { value: number | string | null | undefined; format?: string; fallback?: string; raw?: boolean; }`
|
|
184
|
+
|
|
185
|
+
### `@cp949/mui-react19/hooks`
|
|
186
|
+
|
|
187
|
+
Values:
|
|
188
|
+
- `composeRefs<T>(...refs: PossibleRef<T>[]): (node: T | null) => void`
|
|
189
|
+
- `useAbsolutePosition<E extends Element = Element>(deps: DependencyList, options?: { intervalMs?: number | undefined; } | undefined): [(element: E | null) => void, { x: number; y: number; }]`
|
|
190
|
+
- `useAudioUnlocked(options: { onUnlocked: () => void; }): boolean`
|
|
191
|
+
- `useBehaviorSubject<TItem>(subject: BehaviorSubject<TItem> | Fn<BehaviorSubject<TItem>>): TItem`
|
|
192
|
+
- `useCallbackRef<T extends (...args: any[]) => any>(callback: T | undefined): T`
|
|
193
|
+
- `useCenterInView(offset?: number | undefined): { ref: RefObject<HTMLDivElement | null>; isCenter: boolean; }`
|
|
194
|
+
- `useClipboard({ timeout }?: { timeout?: number | undefined; } | undefined): { copy: (valueToCopy: string) => Promise<boolean>; reset: () => void; error: Error | null; copied: boolean; }`
|
|
195
|
+
- `useClosableEffect(callback: Callback, deps: unknown[]): void`
|
|
196
|
+
- `useComposedRefs<T>(...refs: PossibleRef<T>[]): (node: T | null) => void`
|
|
197
|
+
- `useConstant<T>(fn: () => T): T`
|
|
198
|
+
- `useCooldown<T extends (...args: any[]) => void = () => void>(callback: T | undefined, cooldown: number): { isCooldown: boolean; trigger: (...args: Parameters<T>) => void; }`
|
|
199
|
+
- `useCustomCompareEffect<TDeps extends DependencyList>(effect: EffectCallback, deps: TDeps, depsEqual: DepsEqualFnType<TDeps>): void`
|
|
200
|
+
- `useCustomCompareMemo<T, Deps extends DependencyList>(factory: () => T, deps: Deps, comparator: DependenciesComparator<Deps>): T`
|
|
201
|
+
- `useDebouncedCallback<T extends (...args: any[]) => void>(callback: T, wait: number, options?: UseDebouncedCallbackOptions | undefined): T & { cancel: () => void; }`
|
|
202
|
+
- `useDebouncedParams<T>(params: Partial<T>, onChange: (params: Partial<T>) => void, options?: UseDebouncedParamsOptions | undefined): UseDebouncedParamsResult<T>`
|
|
203
|
+
- `useDebouncedState<T>(defaultValue: T, wait: number, options?: { leading: boolean; } | undefined): readonly [T, (next: SetStateAction<T>) => void]`
|
|
204
|
+
- `useDebouncedValue<T>(value: T, wait: number, options?: { leading: boolean; } | undefined): readonly [T, () => void]`
|
|
205
|
+
- `useDebounceEffect(effect: EffectCallback, deps?: DependencyList | undefined, options?: DebounceOptions$1 | undefined): void`
|
|
206
|
+
- `useDebounceFn<T extends noop>(fn: T, options?: DebounceOptions | undefined): { run: ((...args: Parameters<T>) => ReturnType<T>) & { cancel: () => void; flush: () => ReturnType<T> | undefined; }; cancel: () => void; flush: () => ReturnType<T> | undefined; }`
|
|
207
|
+
- `useDeepCompareEffect(effect: EffectCallback, deps: DependencyList): void`
|
|
208
|
+
- `useDeepCompareMemo<T, Deps extends DependencyList>(factory: () => T, deps: Deps): T`
|
|
209
|
+
- `useDidUpdate(fn: EffectCallback, dependencies?: DependencyList | undefined): void`
|
|
210
|
+
- `useEffectOnce(effect: EffectCallback): void`
|
|
211
|
+
- `useElementSize<T extends HTMLElement = HTMLElement>(options?: ResizeObserverOptions | undefined): { ref: RefObject<T | null>; width: number; height: number; }`
|
|
212
|
+
- `useEventListener<K extends keyof HTMLElementEventMap, T extends HTMLElement = HTMLElement>(type: K, listener: (this: T, ev: HTMLElementEventMap[K]) => void, options?: boolean | AddEventListenerOptions | undefined): RefObject<T | undefined>`
|
|
213
|
+
- `useId(staticId?: string | undefined): string`
|
|
214
|
+
- `useIdle(ms?: number | undefined, initialState?: boolean | undefined, events?: string[] | undefined): boolean`
|
|
215
|
+
- `useImageLoadCallback(img: HTMLImageElement | null, options: { keepListening?: boolean | undefined; onLoaded: (img: HTMLImageElement) => void; onError?: ((img: HTMLImageElement, error: unknown) => void) | undefined; }, deps?: DependencyList | undefined): void`
|
|
216
|
+
- `useImageUpload(file: Blob | null | undefined, handleFileUpload: (file: Blob) => Promise<FileUploadResult>, callback: (imageUrl: FileUploadResult | null) => void): boolean`
|
|
217
|
+
- `useInterval(fn: () => void, interval: number, { autoInvoke }?: UseIntervalOptions | undefined): { start: () => void; stop: () => void; toggle: () => void; active: boolean; }`
|
|
218
|
+
- `useIsomorphicEffect(effect: EffectCallback, deps?: DependencyList | undefined): void`
|
|
219
|
+
- `useLatest<T>(value: T): RefObject<T>`
|
|
220
|
+
- `useLgOrUp(options?: UseMediaQueryOptions | undefined): boolean`
|
|
221
|
+
- `useLifecycleLogger(componentName: string, deps?: DependencyList | undefined): void`
|
|
222
|
+
- `useLoadingVisible(paramLoading: boolean, opts?: Options$1 | undefined): boolean`
|
|
223
|
+
- `useLocalStorage<T>(key: string, initialValue?: T | undefined, options?: parserOptions$1<T> | undefined): [T | undefined, Dispatch<SetStateAction<T | undefined>>, () => void]`
|
|
224
|
+
- `useLocalStorageState(key: string | null, initializer?: string | StorageStateInitializer<string> | null | undefined, options?: DefaultStorageStateoptions<string> | undefined): UseStorageStateHookResult<string>`
|
|
225
|
+
- `useLocalStorageState<T>(key: string | null, initializer: T | StorageStateInitializer<T> | null, options: StorageStateOptions<T>): UseStorageStateHookResult<T>`
|
|
226
|
+
- `useLocalStorageState<T>(key: string | null, initializer?: T | StorageStateInitializer<T> | null | undefined, options?: StorageStateOptions<T> | undefined): UseStorageStateHookResult<T>`
|
|
227
|
+
- `useMdOrDown(options?: UseMediaQueryOptions | undefined): boolean`
|
|
228
|
+
- `useMdOrUp(options?: UseMediaQueryOptions | undefined): boolean`
|
|
229
|
+
- `useMount(fn: () => void): void`
|
|
230
|
+
- `useMounted(): boolean`
|
|
231
|
+
- `useMountedState(): () => boolean`
|
|
232
|
+
- `useMutationObserver<T extends HTMLElement = HTMLElement>(callback: MutationCallback, options: MutationObserverInit, target?: HTMLElement | (() => HTMLElement) | null | undefined): RefObject<T | null>`
|
|
233
|
+
- `useObservable<T>(observable: Observable<T> | (() => Observable<T>) | null | undefined): T | undefined`
|
|
234
|
+
- `useObservable<T>(observable: Observable<T> | (() => Observable<T>) | null | undefined, initialValue: T): T`
|
|
235
|
+
- `useObservableLocalStorage<T>(key: string, initialValue: T | GetFn$1<T>): [T, SetStateFn$1<T | null>]`
|
|
236
|
+
- `useObservableSessionStorage<T>(key: string, initialValue: T | GetFn<T>): [T, SetStateFn<T | null>]`
|
|
237
|
+
- `useOs(options?: UseOsOptions | undefined): OS`
|
|
238
|
+
- `useRafState<S>(initialState: S | (() => S)): [S, Dispatch<SetStateAction<S>>]`
|
|
239
|
+
- `useRefEffect<RefElement extends HTMLElement = HTMLElement>(callback: (element: RefElement) => CleanupCallback | undefined, deps: DependencyList): (element: RefElement | null) => void`
|
|
240
|
+
- `useResizeObserver<T extends HTMLElement = HTMLElement>(options?: ResizeObserverOptions | undefined): readonly [RefObject<T | null>, ObserverRect]`
|
|
241
|
+
- `useScript(src: string, options?: { removeOnUnmount?: boolean | undefined; } | undefined): LoadingState`
|
|
242
|
+
- `useSessionStorage<T>(key: string, initialValue?: T | undefined, options?: parserOptions<T> | undefined): [T | undefined, Dispatch<SetStateAction<T | undefined>>, () => void]`
|
|
243
|
+
- `useSessionStorageState(key: string | null, initializer?: string | StorageStateInitializer<string> | null | undefined, options?: DefaultStorageStateoptions<string> | undefined): UseStorageStateHookResult<string>`
|
|
244
|
+
- `useSessionStorageState<T>(key: string | null, initializer: T | StorageStateInitializer<T> | null, options: StorageStateOptions<T>): UseStorageStateHookResult<T>`
|
|
245
|
+
- `useSessionStorageState<T>(key: string | null, initializer?: T | StorageStateInitializer<T> | null | undefined, options?: StorageStateOptions<T> | undefined): UseStorageStateHookResult<T>`
|
|
246
|
+
- `useSmOrDown(options?: UseMediaQueryOptions | undefined): boolean`
|
|
247
|
+
- `useSmOrUp(options?: UseMediaQueryOptions | undefined): boolean`
|
|
248
|
+
- `useThrottledCallback<T extends (...args: any[]) => any>(callback: T, wait: number): (...args: Parameters<T>) => void`
|
|
249
|
+
- `useThrottledCallbackWithClearTimeout<T extends (...args: any[]) => any>(callback: T, wait: number): readonly [(...args: Parameters<T>) => void, () => void]`
|
|
250
|
+
- `useThrottledState<T>(defaultValue: T, wait: number): readonly [T, (value: SetStateAction<T>) => void]`
|
|
251
|
+
- `useThrottledValue<T>(value: T, wait: number): T`
|
|
252
|
+
- `useTimeout(callback: (...callbackParams: unknown[]) => void, delay: number, options?: { autoInvoke: boolean; } | undefined): { start: (...callbackParams: unknown[]) => void; clear: () => void; }`
|
|
253
|
+
- `useTimeoutData<T>(timeoutMs: number): [T | null, (t: T | null) => void]`
|
|
254
|
+
- `useUncontrolled<T>(props: UseUncontrolledInput<T>): [T, (value: T, ...payload: unknown[]) => void, boolean]`
|
|
255
|
+
- `useUnmount(fn: () => void): void`
|
|
256
|
+
- `useUpdate(): () => void`
|
|
257
|
+
- `useUpdateEffect(effect: EffectCallback, deps?: DependencyList | undefined): void`
|
|
258
|
+
- `useUpdateLayoutEffect(effect: EffectCallback, deps?: DependencyList | undefined): void`
|
|
259
|
+
- `useWindowEvent<K extends string>(type: K, listener: K extends keyof WindowEventMap ? (this: Window, ev: WindowEventMap[K]) => void : (this: Window, ev: CustomEvent<any>) => void, options?: boolean | AddEventListenerOptions | undefined): void`
|
|
260
|
+
- `useWindowSize({ initialWidth, initialHeight, onChange }?: Options | undefined): { width: number; height: number; }`
|
|
261
|
+
- `useXsOrDown(options?: UseMediaQueryOptions | undefined): boolean`
|
|
262
|
+
|
|
263
|
+
Types:
|
|
264
|
+
- `type CleanupCallback = () => void`
|
|
265
|
+
- `interface FileUploadResult { id: string; url: string; totalBytes?: number; fileName?: string; contentType?: string; }`
|
|
266
|
+
- `type OS = 'undetermined' | 'macos' | 'ios' | 'windows' | 'android' | 'linux'`
|
|
267
|
+
- `interface UseDebouncedParamsOptions { delayMs?: number; }`
|
|
268
|
+
- `interface UseDebouncedParamsResult<T> { params: Partial<T>; onChange: (updated: Partial<T>) => void; flush: () => void; }`
|
|
269
|
+
|
|
270
|
+
### `@cp949/mui-react19/helper`
|
|
271
|
+
|
|
272
|
+
Values:
|
|
273
|
+
- `cssVars.color(paletteName: "primary" | "secondary" | "warning" | "info" | "error" | "success", shade?: "main" | "light" | "dark" | "contrastText" | undefined): string`
|
|
274
|
+
- `cssVars.colorChannel(paletteName: "primary" | "secondary" | "warning" | "info" | "error" | "success", shade?: "main" | "light" | "dark" | "contrastText" | undefined): string`
|
|
275
|
+
- `cssVars.rgba(paletteName: "primary" | "secondary" | "warning" | "info" | "error" | "success", shade: "main" | "light" | "dark" | "contrastText", alpha: number): string`
|
|
276
|
+
- `cssVars.shadow(paletteName: "primary" | "secondary" | "warning" | "info" | "error" | "success", shade: "main" | "light" | "dark" | "contrastText", index: number): string`
|
|
277
|
+
- `cssVars.shadowValue(index: number, hexColor?: string | undefined): string`
|
|
278
|
+
- `mediaQueries.lgOrDown(theme: THEME, css: AliasesCSSProperties | StandardCSSProperties): { [x: string]: AliasesCSSProperties | StandardCSSProperties; }`
|
|
279
|
+
- `mediaQueries.lgOrUp(theme: THEME, css: AliasesCSSProperties | StandardCSSProperties): { [x: string]: AliasesCSSProperties | StandardCSSProperties; }`
|
|
280
|
+
- `mediaQueries.mdOrDown(theme: THEME, css: AliasesCSSProperties | StandardCSSProperties): { [x: string]: AliasesCSSProperties | StandardCSSProperties; }`
|
|
281
|
+
- `mediaQueries.mdOrUp(theme: THEME, css: AliasesCSSProperties | StandardCSSProperties): { [x: string]: AliasesCSSProperties | StandardCSSProperties; }`
|
|
282
|
+
- `mediaQueries.smOrDown(theme: THEME, css: AliasesCSSProperties | StandardCSSProperties): { [x: string]: AliasesCSSProperties | StandardCSSProperties; }`
|
|
283
|
+
- `mediaQueries.smOrUp(theme: THEME, css: AliasesCSSProperties | StandardCSSProperties): { [x: string]: AliasesCSSProperties | StandardCSSProperties; }`
|
|
284
|
+
- `mediaQueries.xlOrUp(theme: THEME, css: AliasesCSSProperties | StandardCSSProperties): { [x: string]: AliasesCSSProperties | StandardCSSProperties; }`
|
|
285
|
+
- `mediaQueries.xsOrDown(theme: THEME, css: AliasesCSSProperties | StandardCSSProperties): { [x: string]: AliasesCSSProperties | StandardCSSProperties; }`
|
|
286
|
+
|
|
287
|
+
### `@cp949/mui-react19/file-drop`
|
|
288
|
+
|
|
289
|
+
Values:
|
|
290
|
+
- `buildFileTree(items: FileItem[]): FileTreeNode`
|
|
291
|
+
- `class FileDropError extends Error { code: FileDropErrorCode; item?: FileItem | undefined; constructor(code: FileDropErrorCode, item?: FileItem | undefined, message?: string); }`
|
|
292
|
+
- `class FilePathUtils { static normalize(path: string): string; static join(...segments: string[]): string; static dirname(path: string): string; static basename(path: string, ext?: string): string; static extname(path: string): string; static relative(from: string, to: string): string; }`
|
|
293
|
+
- `FilterPresets.imagesOnly(): FilterOptions`
|
|
294
|
+
- `FilterPresets.textOnly(): FilterOptions`
|
|
295
|
+
- `FilterPresets.smallFilesOnly(): FilterOptions`
|
|
296
|
+
- `FilterPresets.developmentFiles(): FilterOptions`
|
|
297
|
+
- `filterTree(tree: FileTreeNode, predicate: (node: FileTreeNode) => boolean): FileTreeNode | null`
|
|
298
|
+
- `findInTree(tree: FileTreeNode, predicate: (node: FileTreeNode) => boolean): FileTreeNode | null`
|
|
299
|
+
- `flattenTree(tree: FileTreeNode): FileItem[]`
|
|
300
|
+
- `handleFileTreeDropEvent(event: React.DragEvent<HTMLElement>, callbackAccept?: ((file: File) => boolean) | undefined): Promise<({ type: "dir"; path: string; } | { type: "file"; path: string; file: File; })[]>`
|
|
301
|
+
- `isValidFileName(name: string): boolean`
|
|
302
|
+
- `isValidFileSize(file: File, maxSize: number): boolean`
|
|
303
|
+
- `isValidFileType(file: File, allowedExtensions: string[]): boolean`
|
|
304
|
+
- `class PathHolder { readonly segments: string[]; readonly path: string; constructor(path: string | string[]); static EMPTY: PathHolder; static from: (...args: (string[] | string | undefined | null)[]) => PathHolder; join: (...args: (string[] | string | undefined | null)[]) => PathHolder; changeLast: (fileName: string) => PathHolder; parentOrNull: () => PathHolder | null; lastSegmentOrNull: () => string | null; lastSegment: () => string; startsWith: (otherPath: string | string[] | PathHolder) => boolean; toString(): string; }`
|
|
305
|
+
- `class PathUtils { static join(...args: (string[] | string | undefined | null)[]): string; static split: (...args: (string[] | string | undefined | null)[]) => string[]; static pathStartsWith(p1: string, p2: string): boolean; static segmentsStartsWith(p1: string[], p2: string[]): boolean; }`
|
|
306
|
+
- `processFileTreeDrop(source: any, options?: FileDropOptions | undefined): Promise<ProcessResult>`
|
|
307
|
+
- `processFileTreeDropSafe(source: any, options?: FileDropOptions | undefined): Promise<SafeProcessResult>`
|
|
308
|
+
|
|
309
|
+
Types:
|
|
310
|
+
- `interface CallbackOptions { onProgress?: (progress: ProgressInfo) => void; onError?: (error: FileDropError, item?: FileItem) => void; onFile?: (file: ProcessedFile) => void; }`
|
|
311
|
+
- `type DebugLevel = 'none' | 'warn' | 'info' | 'verbose'`
|
|
312
|
+
- `interface FileDropOptions { filter?: FilterOptions; processing?: ProcessingOptions; callbacks?: CallbackOptions; includeMetadata?: boolean; signal?: AbortSignal; debug?: DebugLevel | boolean; }`
|
|
313
|
+
- `type FileDropSource = React.DragEvent<HTMLElement> | FileList | FileSystemHandle[] | File[]`
|
|
314
|
+
- `interface FileItem { type: 'file' | 'directory'; name: string; path: string; pathSegments: string[]; size?: number; lastModified?: Date; relativePath: string; }`
|
|
315
|
+
- `interface FileMetadata { size: number; lastModified: Date; mimeType?: string; extension: string; }`
|
|
316
|
+
- `interface FileTreeNode { name: string; type: 'file' | 'directory'; path: string; children?: FileTreeNode[]; file?: File; metadata?: FileMetadata; }`
|
|
317
|
+
- `interface FilterOptions { accept?: (item: FileItem) => boolean; maxSize?: number; maxFiles?: number; allowedExtensions?: string[]; excludeDirectories?: boolean; }`
|
|
318
|
+
- `interface LegacyFileItem { type: 'file' | 'dir'; path: string; file?: File; }`
|
|
319
|
+
- `interface ProcessedDirectory extends FileItem { type: 'directory'; children?: FileItem[]; }`
|
|
320
|
+
- `interface ProcessedFile extends FileItem { type: 'file'; file: File; mimeType: string; extension: string; }`
|
|
321
|
+
- `interface ProcessingOptions { parallel?: boolean; concurrency?: number; preserveStructure?: boolean; }`
|
|
322
|
+
- `interface ProcessResult { files: ProcessedFile[]; directories: ProcessedDirectory[]; tree: FileTreeNode; metadata: { totalFiles: number; totalDirectories: number; totalSize: number; processingTime: number; }; errors: FileDropError[]; }`
|
|
323
|
+
- `interface ProgressInfo { totalItems: number; processedItems: number; currentItem?: FileItem; percentage: number; estimatedTimeLeft?: number; }`
|
|
324
|
+
- `type SafeProcessResult = ProcessResult | ErrorResult`
|
|
325
|
+
|
|
326
|
+
## Usage Patterns
|
|
327
|
+
- Import components from `@cp949/mui-react19`, hooks from `@cp949/mui-react19/hooks`, helpers from `@cp949/mui-react19/helper`.
|
|
328
|
+
- Components accept `sx` and the props of the MUI component they wrap, including `ref` as a regular prop.
|
|
329
|
+
- Compound components expose variants as static members, for example `FlexRow.Between`, `TopAbsolute.Right`, `Portlet.Title`.
|
|
330
|
+
- In Next.js App Router, use components and hooks from files that start with `'use client'`.
|
|
331
|
+
|
|
332
|
+
## Examples
|
|
333
|
+
- `import { Center, FlexRow, Space } from '@cp949/mui-react19';`
|
|
334
|
+
- `import { useElementSize, useDebouncedCallback } from '@cp949/mui-react19/hooks';`
|
|
335
|
+
- `import { mediaQueries, cssVars } from '@cp949/mui-react19/helper';`
|
|
336
|
+
- `import { processFileTreeDropSafe } from '@cp949/mui-react19/file-drop';`
|
|
337
|
+
- `<CooldownButton cooldown={3000} onClick={save}>Save</CooldownButton>`
|
|
338
|
+
- `<FlexRow.Between sx={{ width: '100%' }}><span>Left</span><span>Right</span></FlexRow.Between>`
|
|
339
|
+
|
|
340
|
+
## Constraints
|
|
341
|
+
- Use only exports from the package root or the subpaths listed above.
|
|
342
|
+
- `react` must be ^19. Components rely on ref-as-prop and do not use `forwardRef`.
|
|
343
|
+
- `@mui/material` and `@mui/system` must be ^9. For MUI 7, use the 1.x line of this package.
|
|
344
|
+
- `rxjs` ^7 must be installed. `Closables`, `useAbsolutePosition`, and `useLoadingVisible` import it at runtime.
|
|
345
|
+
|
|
346
|
+
## Anti-Patterns
|
|
347
|
+
- Do not wrap these components in `forwardRef`. Pass `ref` as a prop.
|
|
348
|
+
- Do not import from `dist/chunk-*` files or from `src/` paths.
|
|
349
|
+
- Do not import hooks from the package root. Use the `/hooks` subpath.
|
|
350
|
+
- Do not use this package with React 18 or with `@mui/material` below v9.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cp949/mui-react19",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "React UI components and hooks built on MUI (Material-UI)",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -10,11 +10,12 @@
|
|
|
10
10
|
"files": [
|
|
11
11
|
"dist",
|
|
12
12
|
"README.md",
|
|
13
|
-
"README.file-drop.md"
|
|
13
|
+
"README.file-drop.md",
|
|
14
|
+
"llm.txt"
|
|
14
15
|
],
|
|
15
16
|
"scripts": {
|
|
16
|
-
"build": "
|
|
17
|
-
"dev": "
|
|
17
|
+
"build": "tsdown && node ./scripts/generate-llm-txt.mjs",
|
|
18
|
+
"dev": "tsdown --watch",
|
|
18
19
|
"lint": "biome check .",
|
|
19
20
|
"lint:fix": "biome check --write .",
|
|
20
21
|
"format": "biome format --write .",
|
|
@@ -25,26 +26,27 @@
|
|
|
25
26
|
"prepack": "pnpm build",
|
|
26
27
|
"publish:npm": "npm publish"
|
|
27
28
|
},
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"clsx": "^2.1.1"
|
|
31
|
+
},
|
|
28
32
|
"devDependencies": {
|
|
29
|
-
"@mui/material": "^9.
|
|
30
|
-
"@mui/system": "^9.
|
|
31
|
-
"@types/node": "^26.
|
|
32
|
-
"@types/react": "^19.
|
|
33
|
-
"@types/react-dom": "^19.
|
|
34
|
-
"@vitest/ui": "^
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"react": "^19.
|
|
38
|
-
"react-dom": "^19.2.8",
|
|
33
|
+
"@mui/material": "^9.5.0",
|
|
34
|
+
"@mui/system": "^9.5.0",
|
|
35
|
+
"@types/node": "^26.6.4",
|
|
36
|
+
"@types/react": "^19.3.0",
|
|
37
|
+
"@types/react-dom": "^19.3.0",
|
|
38
|
+
"@vitest/ui": "^5.0.3",
|
|
39
|
+
"happy-dom": "^20.14.6",
|
|
40
|
+
"react": "^19.3.0",
|
|
41
|
+
"react-dom": "^19.3.0",
|
|
39
42
|
"rxjs": "^7.8.2",
|
|
40
|
-
"
|
|
43
|
+
"tsdown": "^0.23.0",
|
|
41
44
|
"typescript": "^6.0.3",
|
|
42
|
-
"vitest": "^
|
|
45
|
+
"vitest": "^5.0.3"
|
|
43
46
|
},
|
|
44
47
|
"peerDependencies": {
|
|
45
48
|
"@mui/material": "^9",
|
|
46
49
|
"@mui/system": "^9",
|
|
47
|
-
"clsx": "^2",
|
|
48
50
|
"react": "^19",
|
|
49
51
|
"rxjs": "^7"
|
|
50
52
|
},
|
package/dist/chunk-2OEB5VHZ.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{useCallback as q,useEffect as V,useRef as k,useState as B}from"react";function ve(t,e){let[n,r]=B(!1),s=k(!1),o=k(null);V(()=>()=>{o.current!==null&&window.clearTimeout(o.current)},[]);let i=q((...u)=>{if(!(s.current||!t)){s.current=!0;try{t(...u)}catch(c){throw s.current=!1,c}r(!0),o.current=window.setTimeout(()=>{s.current=!1,r(!1),o.current=null},e)}},[t,e]);return{isCooldown:n,trigger:i}}import{useState as L}from"react";function ye({timeout:t=1e3}={}){let[e,n]=L(null),[r,s]=L(!1),[o,i]=L(null),u=m=>{o!==null&&window.clearTimeout(o),i(window.setTimeout(()=>s(!1),t)),s(m)};return{copy:async m=>{if("clipboard"in navigator)try{return await navigator.clipboard.writeText(m),u(!0),!0}catch(p){return n(p instanceof Error?p:new Error(String(p))),!1}else return n(new Error("useClipboard: navigator.clipboard is not supported")),!1},reset:()=>{s(!1),n(null),o!==null&&window.clearTimeout(o)},error:e,copied:r}}import{useEffect as $,useLayoutEffect as J}from"react";var S=typeof document<"u"?J:$;import{useRef as X}from"react";function T(t){let e=X(t);return S(()=>{e.current=t},[t]),e}import{useEffect as Y,useMemo as G}from"react";function x(t,e=0,n={}){let r,s,o,i,u,c,d=0,{leading:m=!1,trailing:p=!0,maxWait:D}=n;if(typeof t!="function")throw new TypeError("Expected a function");typeof D=="number"&&(o=Math.max(D,e));function b(){return Date.now()}function w(a){let l=r,f=s;return r=void 0,s=void 0,d=a,i=t.apply(f,l),i}function _(a){return d=a,u=setTimeout(v,e),m?w(a):i}function U(a){let l=a-(c||0),f=a-d,M=e-l;return o!==void 0?Math.min(M,o-f):M}function R(a){let l=a-(c||0),f=a-d;return c===void 0||l>=e||l<0||o!==void 0&&f>=o}function v(){let a=b();if(R(a))return C(a);u=setTimeout(v,U(a))}function C(a){return u=void 0,p&&r?w(a):(r=void 0,s=void 0,i)}function z(){u!==void 0&&clearTimeout(u),d=0,r=void 0,c=void 0,s=void 0,u=void 0}function F(){return u===void 0?i:C(b())}function g(...a){let l=b(),f=R(l);if(r=a,s=this,c=l,f){if(u===void 0)return _(c);if(o!==void 0)return clearTimeout(u),u=setTimeout(v,e),w(c)}return u===void 0&&(u=setTimeout(v,e)),i}return g.cancel=z,g.flush=F,g}function Oe(t,e=0,n={}){return x(t,e,{leading:n.leading??!0,trailing:n.trailing??!0,maxWait:e})}function ke(t,e,n={}){let{leading:r=!1,trailing:s=!0}=n,o=T(t),i=G(()=>x((...u)=>{o.current(...u)},e,{leading:r,trailing:s}),[e,r,s]);return Y(()=>i.cancel,[i]),i}import{useCallback as Q}from"react";function Z(t,e){typeof t=="function"?t(e):t!=null&&(t.current=e)}function ee(...t){return e=>t.forEach(n=>{Z(n,e)})}function Ke(...t){return Q(ee(...t),t)}import{useMemo as ne,useRef as te}from"react";var H=(t,e,n)=>{let r=te(void 0);return(r.current===void 0||!n(r.current,e))&&(r.current=e),ne(t,r.current)};function E(t,e){if(t===e)return!0;let n=typeof t;if(n!==typeof e||n!=="object"||t===null||e===null)return!1;if(Array.isArray(t)&&Array.isArray(e))return t.length!==e.length?!1:t.every((c,d)=>E(c,e[d]));let s=t,o=e,i=Object.keys(s),u=Object.keys(o);return i.length!==u.length?!1:i.every(c=>E(s[c],o[c]))}function K(t,e){return H(t,e,E)}import{useEffect as re,useRef as A}from"react";function qe(t,e,n){let r=A(null),s=A(null),o=K(()=>e,[e]),i=T(t);return re(()=>{let u=typeof n=="function"?n():n;if(u||s.current){let c=(...d)=>{i.current(...d)};r.current=new MutationObserver(c),r.current.observe(u||s.current,o)}return()=>{r.current?.disconnect()}},[o]),s}import{useCallback as W,useEffect as se,useRef as oe}from"react";function $e(t,e,n={autoInvoke:!1}){let r=oe(null),s=W((...i)=>{r.current||(r.current=window.setTimeout(()=>{t(...i),r.current=null},e))},[e,t]),o=W(()=>{r.current&&(window.clearTimeout(r.current),r.current=null)},[]);return se(()=>(n.autoInvoke&&s(),o),[o,s,n.autoInvoke]),{start:s,clear:o}}import{useId as ie}from"react";function Ye(t){let e=ie();return typeof t=="string"?t:e}import{useState as ue}from"react";function Ze({value:t,defaultValue:e,finalValue:n,onChange:r=()=>{}}){let[s,o]=ue(e!==void 0?e:n),i=(u,...c)=>{o(u),r?.(u,...c)};return t!==void 0?[t,r,!0]:[s,i,!1]}import{useEffect as ce,useMemo as ae,useRef as I,useState as de}from"react";var le={x:0,y:0,width:0,height:0,top:0,left:0,bottom:0,right:0};function j(t){let e=I(0),n=I(null),[r,s]=de(le),o=ae(()=>typeof window<"u"?new ResizeObserver(i=>{let u=i[0];u&&(cancelAnimationFrame(e.current),e.current=requestAnimationFrame(()=>{n.current&&s(u.contentRect)}))}):null,[]);return ce(()=>(n.current&&o?.observe(n.current,t),()=>{o?.disconnect(),e.current&&cancelAnimationFrame(e.current)}),[n.current]),[n,r]}function sn(t){let[e,{width:n,height:r}]=j(t);return{ref:e,width:n,height:r}}import{Subject as fe}from"rxjs";function O(t,e,n,r,s){if(typeof n!="function")throw new TypeError("The listener must be a function");let o={fn:n,context:r||t,once:s},i=e;t._events[i]?t._events[i].fn?t._events[i]=[t._events[i],o]:t._events[i].push(o):(t._events[i]=o,t._eventsCount++)}function y(t,e){--t._eventsCount===0?t._events={}:delete t._events[e]}var h=class{_eventsCount=0;_events={};eventNames(){let e=[];if(this._eventsCount===0)return e;let n=this._events;for(let r in n)Object.hasOwn(n,r)&&e.push(r);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(n)):e}listeners(e){let n=e,r=this._events[n];if(!r)return[];if("fn"in r)return[r.fn];let s=new Array(r.length);for(let o=0;o<r.length;o++)s[o]=r[o].fn;return s}listenerCount(e){let n=this._events[e];return n?"fn"in n?1:n.length:0}emit(e,...n){let r=e,s=this._events[r];if(!s)return!1;if("fn"in s)s.once&&this.removeListener(e,s.fn,void 0,!0),s.fn.apply(s.context,n);else{let o=s.length;for(let i=0;i<o;i++)s[i].once&&this.removeListener(e,s[i].fn,void 0,!0),s[i].fn.apply(s[i].context,n)}return!0}on(e,n,r){return O(this,e,n,r),()=>{this.removeListener(e,n,r)}}addListener(e,n,r){return O(this,e,n,r),()=>{this.removeListener(e,n,r)}}once(e,n,r){return O(this,e,n,r,!0),()=>{this.removeListener(e,n,r,!0)}}removeListener(e,n,r,s){let o=e,i=this._events[o];if(!i)return this;if(!n)return y(this,o),this;if("fn"in i)i.fn===n&&(!s||i.once)&&(!r||i.context===r)&&y(this,o);else{let u=[];for(let c=0,d=i.length;c<d;c++)(i[c].fn!==n||s&&!i[c].once||r&&i[c].context!==r)&&u.push(i[c]);u.length?this._events[o]=u.length===1?u[0]:u:y(this,o)}return this}off(e,n,r,s){return this.removeListener(e,n,r,s)}removeAllListeners(e){if(e){let n=e;this._events[n]&&y(this,n)}else this._events={},this._eventsCount=0;return this}};var N=class t{#e=new Set;#n;#t=new h;get events(){return this.#t}get closeTrigger$(){return this.#n||(this.#n=new fe),this.#n}add=(...e)=>(e.forEach(n=>{this.#e.add(n)}),this);remove=(...e)=>(e.forEach(n=>{this.#e.delete(n)}),this);addRx=(...e)=>(e.forEach(n=>{this.#e.add(()=>{n.unsubscribe()})}),this);addUnsubscribe=this.addRx;addClose=(...e)=>(e.forEach(n=>{this.#e.add(()=>{n.close()})}),this);addDispose=(...e)=>(e.forEach(n=>{this.#e.add(()=>{n.dispose()})}),this);addDestroy=(...e)=>(e.forEach(n=>{this.#e.add(()=>{n.destroy()})}),this);addShutdown=(...e)=>(e.forEach(n=>{this.#e.add(()=>{n.shutdown()})}),this);addTerminate=(...e)=>(e.forEach(n=>{this.#e.add(()=>{n.terminate()})}),this);addElementListener=(e,n,r,s)=>(e.addEventListener(n,r,s),this.#e.add(()=>{e.removeEventListener(n,r,s)}),this);addDocumentListener=(e,n,r)=>(document.addEventListener(e,n,r),this.#e.add(()=>{document.removeEventListener(e,n,r)}),this);addWindowListener=(e,n,r)=>(window.addEventListener(e,n,r),this.#e.add(()=>{window.removeEventListener(e,n,r)}),this);get count(){return this.#e.size}close=()=>{this.#t.emit("closed"),this.#t.removeAllListeners(),this.#n&&(this.#n.next(1),this.#n=void 0),this.#e.size>0&&(Array.from(this.#e).forEach(e=>{e()}),this.#e.clear())};static create=(...e)=>{let n=new t;return n.add(...e),n};static createWindowListener=(e,n,r)=>{let s=new t;return s.addWindowListener(e,n,r),s};static createDocumentListener=(e,n,r)=>{let s=new t;return s.addDocumentListener(e,n,r),s};static createElementListener=(e,n,r,s)=>{let o=new t;return o.addElementListener(e,n,r,s),o};static createRx=(...e)=>{let n=new t;return n.addRx(...e),n};static createClose=(...e)=>{let n=new t;return n.addClose(...e),n};static createTerminate=(...e)=>{let n=new t;return n.addTerminate(...e),n};static createShutdown=(...e)=>{let n=new t;return n.addShutdown(...e),n};static createDestroy=(...e)=>{let n=new t;return n.addDestroy(...e),n};static createDispose=(...e)=>{let n=new t;return n.addDispose(...e),n}};var P=(t,e)=>{setTimeout(()=>{t()},e<0?0:e)},me=(t,e)=>t?t.querySelector(e):null,ln=(t,e,n=-1)=>{t&&P(()=>{t.querySelector(e)?.focus()},n)},fn=(t,e,n,r=-1)=>{P(()=>{let s=me(t,e);s&&n(s)},r)};function mn(){return window.navigator&&"serial"in window.navigator}function pn(){return typeof window<"u"&&typeof navigator<"u"&&("ontouchstart"in window||navigator.maxTouchPoints>0)}function vn(t,e){let n=t.matches(e)?t:t.closest(e);if(n)return n}function Tn(t){let e=t.getBoundingClientRect(),n=window.pageYOffset||document.documentElement.scrollTop,r=window.pageXOffset||document.documentElement.scrollLeft,s=e.top+n;return{x:e.left+r,y:s}}var En=typeof window<"u",yn=typeof navigator<"u",hn=()=>{};export{ve as a,ye as b,x as c,Oe as d,S as e,T as f,ke as g,ee as h,Ke as i,E as j,H as k,K as l,qe as m,$e as n,Ye as o,Ze as p,j as q,sn as r,h as s,N as t,ln as u,fn as v,mn as w,pn as x,vn as y,Tn as z,En as A,yn as B,hn as C};
|
|
2
|
-
//# sourceMappingURL=chunk-2OEB5VHZ.js.map
|