deepsea-components 5.18.5 → 5.18.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -23
- package/dist/components/AutoFit.d.ts +1 -1
- package/dist/components/AutoScroll.d.ts +2 -2
- package/dist/components/AutoSizeTextarea.d.ts +1 -1
- package/dist/components/CircleText.d.ts +1 -1
- package/dist/components/CopyButton.cjs +2 -5
- package/dist/components/CopyButton.d.ts +3 -3
- package/dist/components/CopyButton.js +2 -2
- package/dist/components/DraggableGrid.d.ts +2 -2
- package/dist/components/Echart.d.ts +3 -3
- package/dist/components/Flow.d.ts +1 -1
- package/dist/components/FormLabel.d.ts +1 -1
- package/dist/components/HlsPlayer.d.ts +1 -1
- package/dist/components/IconFileType.d.ts +1 -1
- package/dist/components/InfiniteScroll.d.ts +1 -1
- package/dist/components/InputFile.d.ts +1 -1
- package/dist/components/InputFileButton.d.ts +2 -2
- package/dist/components/LoopSwiper.d.ts +1 -1
- package/dist/components/ReadExcel.d.ts +1 -1
- package/dist/components/ReadSheet.d.ts +2 -2
- package/dist/components/Ring.d.ts +1 -1
- package/dist/components/RtspPlayer.d.ts +1 -1
- package/dist/components/Scroll.d.ts +1 -1
- package/dist/components/ScrollMask.d.ts +1 -1
- package/dist/components/SectionRing.d.ts +1 -1
- package/dist/components/Skeleton.d.ts +1 -1
- package/dist/components/Title.d.ts +1 -1
- package/dist/components/TransitionBox.d.ts +1 -1
- package/dist/components/TransitionNum.d.ts +1 -1
- package/dist/components/Trapezium.d.ts +1 -1
- package/dist/components/Unify.d.ts +1 -1
- package/dist/components/WriteExcel.d.ts +1 -1
- package/dist/components/WriteSheet.d.ts +2 -2
- package/dist/utils/index.d.ts +1 -1
- package/package.json +6 -6
- package/src/components/AutoFit.tsx +1 -1
- package/src/components/AutoScroll.tsx +3 -3
- package/src/components/AutoSizeTextarea.tsx +1 -1
- package/src/components/CircleText.tsx +81 -81
- package/src/components/CopyButton.tsx +4 -3
- package/src/components/DraggableGrid.tsx +3 -2
- package/src/components/Echart.tsx +63 -62
- package/src/components/Flow.tsx +5 -1
- package/src/components/FormLabel.tsx +1 -1
- package/src/components/HlsPlayer.tsx +1 -1
- package/src/components/IconFileType.tsx +1 -1
- package/src/components/InfiniteScroll.tsx +10 -1
- package/src/components/InputFile.tsx +3 -1
- package/src/components/InputFileButton.tsx +13 -13
- package/src/components/LoopSwiper.tsx +1 -1
- package/src/components/ReadExcel.tsx +13 -13
- package/src/components/ReadSheet.tsx +2 -2
- package/src/components/Ring.tsx +1 -1
- package/src/components/RtspPlayer.tsx +3 -4
- package/src/components/Scroll.tsx +12 -1
- package/src/components/ScrollMask.module.css +87 -87
- package/src/components/ScrollMask.tsx +1 -1
- package/src/components/SectionRing.tsx +2 -2
- package/src/components/Skeleton.tsx +1 -1
- package/src/components/Title.tsx +1 -1
- package/src/components/TransitionBox.tsx +1 -1
- package/src/components/TransitionNum.tsx +1 -1
- package/src/components/Trapezium.tsx +1 -1
- package/src/components/Unify.tsx +11 -1
- package/src/components/WriteExcel.tsx +13 -13
- package/src/components/WriteSheet.tsx +2 -2
- package/src/components/rtspPlayer/reader.ts +6 -9
- package/src/utils/getReactVersion.ts +7 -7
- package/src/utils/index.ts +33 -33
- package/tsconfig.json +6 -13
|
@@ -1,71 +1,71 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
|
|
3
|
-
import { ComponentProps, FC, ReactNode, Ref, useEffect, useImperativeHandle, useLayoutEffect, useRef } from "react"
|
|
3
|
+
import { type ComponentProps, type FC, type ReactNode, type Ref, useEffect, useImperativeHandle, useLayoutEffect, useRef } from "react"
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
|
-
AngleAxisComponentOption,
|
|
7
|
-
AriaComponentOption,
|
|
8
|
-
AxisPointerComponentOption,
|
|
9
|
-
BarSeriesOption,
|
|
10
|
-
BoxplotSeriesOption,
|
|
11
|
-
BrushComponentOption,
|
|
12
|
-
CalendarComponentOption,
|
|
13
|
-
CandlestickSeriesOption,
|
|
14
|
-
ChordSeriesOption,
|
|
15
|
-
ComposeOption,
|
|
16
|
-
ContinousVisualMapComponentOption,
|
|
17
|
-
CustomSeriesOption,
|
|
18
|
-
DatasetComponentOption,
|
|
19
|
-
DataZoomComponentOption,
|
|
20
|
-
ECharts,
|
|
21
|
-
EChartsInitOpts,
|
|
22
|
-
EffectScatterSeriesOption,
|
|
23
|
-
FunnelSeriesOption,
|
|
24
|
-
GaugeSeriesOption,
|
|
25
|
-
GeoComponentOption,
|
|
26
|
-
GraphicComponentOption,
|
|
27
|
-
GraphSeriesOption,
|
|
28
|
-
GridComponentOption,
|
|
29
|
-
HeatmapSeriesOption,
|
|
6
|
+
type AngleAxisComponentOption,
|
|
7
|
+
type AriaComponentOption,
|
|
8
|
+
type AxisPointerComponentOption,
|
|
9
|
+
type BarSeriesOption,
|
|
10
|
+
type BoxplotSeriesOption,
|
|
11
|
+
type BrushComponentOption,
|
|
12
|
+
type CalendarComponentOption,
|
|
13
|
+
type CandlestickSeriesOption,
|
|
14
|
+
type ChordSeriesOption,
|
|
15
|
+
type ComposeOption,
|
|
16
|
+
type ContinousVisualMapComponentOption,
|
|
17
|
+
type CustomSeriesOption,
|
|
18
|
+
type DatasetComponentOption,
|
|
19
|
+
type DataZoomComponentOption,
|
|
20
|
+
type ECharts,
|
|
21
|
+
type EChartsInitOpts,
|
|
22
|
+
type EffectScatterSeriesOption,
|
|
23
|
+
type FunnelSeriesOption,
|
|
24
|
+
type GaugeSeriesOption,
|
|
25
|
+
type GeoComponentOption,
|
|
26
|
+
type GraphicComponentOption,
|
|
27
|
+
type GraphSeriesOption,
|
|
28
|
+
type GridComponentOption,
|
|
29
|
+
type HeatmapSeriesOption,
|
|
30
|
+
type InsideDataZoomComponentOption,
|
|
31
|
+
type LegendComponentOption,
|
|
32
|
+
type LineSeriesOption,
|
|
33
|
+
type LinesSeriesOption,
|
|
34
|
+
type MapSeriesOption,
|
|
35
|
+
type MarkAreaComponentOption,
|
|
36
|
+
type MarkLineComponentOption,
|
|
37
|
+
type MarkPointComponentOption,
|
|
38
|
+
type MatrixComponentOption,
|
|
39
|
+
type ParallelSeriesOption,
|
|
40
|
+
type PictorialBarSeriesOption,
|
|
41
|
+
type PiecewiseVisualMapComponentOption,
|
|
42
|
+
type PieSeriesOption,
|
|
43
|
+
type PlainLegendComponentOption,
|
|
44
|
+
type PolarComponentOption,
|
|
45
|
+
type RadarComponentOption,
|
|
46
|
+
type RadarSeriesOption,
|
|
47
|
+
type RadiusAxisComponentOption,
|
|
48
|
+
type SankeySeriesOption,
|
|
49
|
+
type ScatterSeriesOption,
|
|
50
|
+
type ScrollableLegendComponentOption,
|
|
51
|
+
type SeriesOption,
|
|
52
|
+
type SingleAxisComponentOption,
|
|
53
|
+
type SliderDataZoomComponentOption,
|
|
54
|
+
type SunburstSeriesOption,
|
|
55
|
+
type ThemeRiverSeriesOption,
|
|
56
|
+
type ThumbnailComponentOption,
|
|
57
|
+
type TimelineComponentOption,
|
|
58
|
+
type TitleComponentOption,
|
|
59
|
+
type ToolboxComponentOption,
|
|
60
|
+
type TooltipComponentOption,
|
|
61
|
+
type TreemapSeriesOption,
|
|
62
|
+
type TreeSeriesOption,
|
|
63
|
+
type VisualMapComponentOption,
|
|
64
|
+
type XAXisComponentOption,
|
|
65
|
+
type YAXisComponentOption,
|
|
30
66
|
init,
|
|
31
|
-
InsideDataZoomComponentOption,
|
|
32
|
-
LegendComponentOption,
|
|
33
|
-
LineSeriesOption,
|
|
34
|
-
LinesSeriesOption,
|
|
35
|
-
MapSeriesOption,
|
|
36
|
-
MarkAreaComponentOption,
|
|
37
|
-
MarkLineComponentOption,
|
|
38
|
-
MarkPointComponentOption,
|
|
39
|
-
MatrixComponentOption,
|
|
40
|
-
ParallelSeriesOption,
|
|
41
|
-
PictorialBarSeriesOption,
|
|
42
|
-
PiecewiseVisualMapComponentOption,
|
|
43
|
-
PieSeriesOption,
|
|
44
|
-
PlainLegendComponentOption,
|
|
45
|
-
PolarComponentOption,
|
|
46
|
-
RadarComponentOption,
|
|
47
|
-
RadarSeriesOption,
|
|
48
|
-
RadiusAxisComponentOption,
|
|
49
|
-
SankeySeriesOption,
|
|
50
|
-
ScatterSeriesOption,
|
|
51
|
-
ScrollableLegendComponentOption,
|
|
52
|
-
SeriesOption,
|
|
53
|
-
SingleAxisComponentOption,
|
|
54
|
-
SliderDataZoomComponentOption,
|
|
55
|
-
SunburstSeriesOption,
|
|
56
|
-
ThemeRiverSeriesOption,
|
|
57
|
-
ThumbnailComponentOption,
|
|
58
|
-
TimelineComponentOption,
|
|
59
|
-
TitleComponentOption,
|
|
60
|
-
ToolboxComponentOption,
|
|
61
|
-
TooltipComponentOption,
|
|
62
|
-
TreemapSeriesOption,
|
|
63
|
-
TreeSeriesOption,
|
|
64
|
-
VisualMapComponentOption,
|
|
65
|
-
XAXisComponentOption,
|
|
66
|
-
YAXisComponentOption,
|
|
67
67
|
} from "echarts"
|
|
68
|
-
import { ECBasicOption } from "echarts/types/src/util/types.js"
|
|
68
|
+
import type { ECBasicOption } from "echarts/types/src/util/types.js"
|
|
69
69
|
import hash from "stable-hash"
|
|
70
70
|
|
|
71
71
|
export type ChartOption<T extends SeriesOption = never> = ComposeOption<
|
|
@@ -179,6 +179,7 @@ export function Echart<T extends ECBasicOption = ECBasicOption>({
|
|
|
179
179
|
useLayoutEffect(() => {
|
|
180
180
|
const ele = container.current!
|
|
181
181
|
chartRef.current = init(ele, option, { ...initOption, width, height, locale })
|
|
182
|
+
|
|
182
183
|
return () => chartRef.current?.dispose()
|
|
183
184
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
184
185
|
}, [])
|
package/src/components/Flow.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
|
|
3
|
-
import { CSSProperties, HTMLAttributes, Key, ReactNode, Ref, useEffect, useImperativeHandle, useRef, useState } from "react"
|
|
3
|
+
import { type CSSProperties, type HTMLAttributes, type Key, type ReactNode, type Ref, useEffect, useImperativeHandle, useRef, useState } from "react"
|
|
4
4
|
|
|
5
5
|
import { css } from "@emotion/css"
|
|
6
6
|
import { clsx } from "deepsea-tools"
|
|
@@ -268,12 +268,16 @@ export function Flow<T>(props: FlowProps<T>): ReactNode {
|
|
|
268
268
|
const ele = useRef<HTMLDivElement>(null)
|
|
269
269
|
const size = useSize(ele)
|
|
270
270
|
const width = useRef(size?.width || 0)
|
|
271
|
+
|
|
271
272
|
// eslint-disable-next-line react-hooks/refs
|
|
272
273
|
if (size && size.width !== 0) width.current = size.width
|
|
274
|
+
|
|
273
275
|
// eslint-disable-next-line react-hooks/exhaustive-deps, react-hooks/refs
|
|
274
276
|
useImperativeHandle(element, () => ele.current!, [ele.current])
|
|
277
|
+
|
|
275
278
|
// eslint-disable-next-line react-hooks/refs
|
|
276
279
|
if (width.current === 0) return <div ref={ele} {...rest} />
|
|
280
|
+
|
|
277
281
|
// eslint-disable-next-line react-hooks/refs
|
|
278
282
|
return <ManualFlow element={ele} {...props} width={width.current} />
|
|
279
283
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
|
|
3
|
-
import { ComponentPropsWithoutRef,
|
|
3
|
+
import { type ComponentPropsWithoutRef, type FC, type ReactNode, createContext, Fragment, useContext } from "react"
|
|
4
4
|
|
|
5
5
|
export interface FormLabelConfig {
|
|
6
6
|
/**
|
|
@@ -2,7 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
/* eslint-disable no-restricted-syntax */
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
type ComponentPropsWithoutRef,
|
|
7
|
+
type CSSProperties,
|
|
8
|
+
type MouseEvent as ReactMouseEvent,
|
|
9
|
+
forwardRef,
|
|
10
|
+
useEffect,
|
|
11
|
+
useImperativeHandle,
|
|
12
|
+
useRef,
|
|
13
|
+
} from "react"
|
|
6
14
|
|
|
7
15
|
import { css } from "@emotion/css"
|
|
8
16
|
import { clsx } from "deepsea-tools"
|
|
@@ -90,6 +98,7 @@ export const InfiniteScroll = forwardRef<HTMLDivElement, InfiniteScrollProps>((p
|
|
|
90
98
|
},
|
|
91
99
|
{ duration, iterations: Infinity },
|
|
92
100
|
)
|
|
101
|
+
|
|
93
102
|
return () => animation.current?.cancel()
|
|
94
103
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
95
104
|
}, [wrapperSize, containerSize, overflow, direction, duration])
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
/* eslint-disable no-restricted-syntax */
|
|
4
4
|
|
|
5
|
-
import { ChangeEvent, ComponentProps, ReactNode, useState } from "react"
|
|
5
|
+
import { type ChangeEvent, type ComponentProps, type ReactNode, useState } from "react"
|
|
6
6
|
|
|
7
7
|
export interface InputFileDataTypeMap {
|
|
8
8
|
base64: string
|
|
@@ -23,9 +23,11 @@ export function getFileData<T extends InputFileDataType>(file: File, type: T): P
|
|
|
23
23
|
fileReader.addEventListener("load", () => {
|
|
24
24
|
resolve(fileReader.result as any)
|
|
25
25
|
})
|
|
26
|
+
|
|
26
27
|
fileReader.addEventListener("error", () => {
|
|
27
28
|
reject(fileReader.error ?? new Error("Failed to read file"))
|
|
28
29
|
})
|
|
30
|
+
|
|
29
31
|
fileReader.addEventListener("abort", () => {
|
|
30
32
|
reject(fileReader.error ?? new Error("File reading was aborted"))
|
|
31
33
|
})
|
|
@@ -3,29 +3,29 @@
|
|
|
3
3
|
/* eslint-disable no-restricted-syntax */
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
|
-
ComponentProps,
|
|
7
|
-
ComponentRef,
|
|
6
|
+
type ComponentProps,
|
|
7
|
+
type ComponentRef,
|
|
8
|
+
type DragEvent,
|
|
9
|
+
type JSX,
|
|
10
|
+
type JSXElementConstructor,
|
|
11
|
+
type MouseEvent as ReactMouseEvent,
|
|
8
12
|
createElement,
|
|
9
|
-
DragEvent,
|
|
10
13
|
Fragment,
|
|
11
|
-
JSX,
|
|
12
|
-
JSXElementConstructor,
|
|
13
|
-
MouseEvent as ReactMouseEvent,
|
|
14
14
|
useImperativeHandle,
|
|
15
15
|
useRef,
|
|
16
16
|
useState,
|
|
17
17
|
} from "react"
|
|
18
18
|
|
|
19
19
|
import {
|
|
20
|
-
DataType,
|
|
21
|
-
FileType,
|
|
20
|
+
type DataType,
|
|
21
|
+
type FileType,
|
|
22
|
+
type InputFileBaseProps,
|
|
23
|
+
type InputFileDataType,
|
|
24
|
+
type InputFileDataTypeMap,
|
|
25
|
+
type InputFileExtraProps,
|
|
26
|
+
type ValueType,
|
|
22
27
|
getFileData,
|
|
23
28
|
InputFile,
|
|
24
|
-
InputFileBaseProps,
|
|
25
|
-
InputFileDataType,
|
|
26
|
-
InputFileDataTypeMap,
|
|
27
|
-
InputFileExtraProps,
|
|
28
|
-
ValueType,
|
|
29
29
|
} from "./InputFile"
|
|
30
30
|
|
|
31
31
|
export type InputFileButtonProps<
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
|
|
3
|
-
import { ComponentProps, CSSProperties, FC, useEffect, useImperativeHandle, useRef, useState } from "react"
|
|
3
|
+
import { type ComponentProps, type CSSProperties, type FC, useEffect, useImperativeHandle, useRef, useState } from "react"
|
|
4
4
|
|
|
5
5
|
import { css } from "@emotion/css"
|
|
6
6
|
import { clsx } from "deepsea-tools"
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* @deprecated 请使用 ReadSheetProps 代替
|
|
7
|
-
*/
|
|
8
|
-
export type ReadExcelProps = ReadSheetProps
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* @deprecated 请使用 ReadSheet 代替
|
|
12
|
-
*/
|
|
13
|
-
export const ReadExcel = ReadSheet
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import { type ReadSheetProps, ReadSheet } from "./ReadSheet"
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated 请使用 ReadSheetProps 代替
|
|
7
|
+
*/
|
|
8
|
+
export type ReadExcelProps = ReadSheetProps
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* @deprecated 请使用 ReadSheet 代替
|
|
12
|
+
*/
|
|
13
|
+
export const ReadExcel = ReadSheet
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { type WorkBookData, type WorkSheetData, readSheet } from "deepsea-tools"
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { type InputFileProps, InputFile } from "./InputFile"
|
|
6
6
|
|
|
7
7
|
export interface ReadSheetProps<Sheet = WorkSheetData> extends Omit<InputFileProps<false, "arrayBuffer">, "multiple" | "accept" | "type" | "onValueChange"> {
|
|
8
8
|
onValueChange?: (data: WorkBookData<Sheet>) => void
|
package/src/components/Ring.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
|
|
3
|
-
import { ComponentProps, FC, useEffect, useImperativeHandle, useRef } from "react"
|
|
3
|
+
import { type ComponentProps, type FC, useEffect, useImperativeHandle, useRef } from "react"
|
|
4
4
|
|
|
5
5
|
import { MediaMTXWebRTCReader } from "@/components/rtspPlayer/reader"
|
|
6
6
|
|
|
@@ -15,9 +15,7 @@ export interface RtspPlayerProps extends Omit<ComponentProps<"video">, "src" | "
|
|
|
15
15
|
function getWhepUrl(src: string) {
|
|
16
16
|
const url = new URL(src, window.location.href)
|
|
17
17
|
|
|
18
|
-
if (url.protocol !== "http:" && url.protocol !== "https:")
|
|
19
|
-
throw new Error("RtspPlayer expects a MediaMTX HTTP(S) playback URL, not an RTSP URL")
|
|
20
|
-
}
|
|
18
|
+
if (url.protocol !== "http:" && url.protocol !== "https:") throw new Error("RtspPlayer expects a MediaMTX HTTP(S) playback URL, not an RTSP URL")
|
|
21
19
|
|
|
22
20
|
const pathname = url.pathname.replace(/\/+$/, "")
|
|
23
21
|
url.pathname = pathname.endsWith("/whep") ? pathname : `${pathname}/whep`
|
|
@@ -60,6 +58,7 @@ export const RtspPlayer: FC<RtspPlayerProps> = ({ ref, src, user, pass, token, o
|
|
|
60
58
|
|
|
61
59
|
let closed = false
|
|
62
60
|
const fallbackStream = new MediaStream()
|
|
61
|
+
|
|
63
62
|
const reader = new MediaMTXWebRTCReader({
|
|
64
63
|
url: whepUrl,
|
|
65
64
|
user,
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
type ComponentProps,
|
|
5
|
+
type CSSProperties,
|
|
6
|
+
type FC,
|
|
7
|
+
type ForwardedRef,
|
|
8
|
+
useEffect,
|
|
9
|
+
useEffectEvent,
|
|
10
|
+
useImperativeHandle,
|
|
11
|
+
useLayoutEffect,
|
|
12
|
+
useRef,
|
|
13
|
+
} from "react"
|
|
4
14
|
|
|
5
15
|
import { css } from "@emotion/css"
|
|
6
16
|
import { clsx } from "deepsea-tools"
|
|
@@ -48,6 +58,7 @@ export const Scroll: FC<ScrollProps> = ({
|
|
|
48
58
|
|
|
49
59
|
useLayoutEffect(() => {
|
|
50
60
|
bar.current = Scrollbar.init(ele.current!, scrollbarOptions)
|
|
61
|
+
|
|
51
62
|
return () => bar.current?.destroy()
|
|
52
63
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
53
64
|
}, [])
|
|
@@ -1,87 +1,87 @@
|
|
|
1
|
-
.scroll-mask {
|
|
2
|
-
position: sticky;
|
|
3
|
-
z-index: 10;
|
|
4
|
-
pointer-events: none;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.top-scroll-mask {
|
|
8
|
-
width: 100%;
|
|
9
|
-
height: 0;
|
|
10
|
-
top: 0;
|
|
11
|
-
right: 0;
|
|
12
|
-
bottom: 100%;
|
|
13
|
-
left: 0;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.scroll-mask-content {
|
|
17
|
-
position: absolute;
|
|
18
|
-
background-image: linear-gradient(
|
|
19
|
-
to var(--scroll-mask-direction),
|
|
20
|
-
var(--scroll-mask-color-from, rgba(0, 0, 0, 0.1)),
|
|
21
|
-
var(--scroll-mask-color-to, rgba(0, 0, 0, 0))
|
|
22
|
-
);
|
|
23
|
-
clip-path: var(--scroll-mask-clip-path, none);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.top-scroll-mask-content {
|
|
27
|
-
width: 100%;
|
|
28
|
-
height: var(--scroll-mask-size, 8px);
|
|
29
|
-
top: 0;
|
|
30
|
-
right: 50%;
|
|
31
|
-
transform: translateX(50%);
|
|
32
|
-
--scroll-mask-direction: bottom;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.bottom-scroll-mask {
|
|
36
|
-
width: 100%;
|
|
37
|
-
height: 0;
|
|
38
|
-
top: 100%;
|
|
39
|
-
right: 0;
|
|
40
|
-
bottom: 0;
|
|
41
|
-
left: 0;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.bottom-scroll-mask-content {
|
|
45
|
-
width: 100%;
|
|
46
|
-
height: var(--scroll-mask-size, 8px);
|
|
47
|
-
bottom: 0;
|
|
48
|
-
left: 50%;
|
|
49
|
-
transform: translateX(-50%);
|
|
50
|
-
--scroll-mask-direction: top;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.left-scroll-mask {
|
|
54
|
-
width: 0;
|
|
55
|
-
height: 100%;
|
|
56
|
-
top: 0;
|
|
57
|
-
right: 100%;
|
|
58
|
-
bottom: 0;
|
|
59
|
-
left: 0;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.left-scroll-mask-content {
|
|
63
|
-
width: var(--scroll-mask-size, 8px);
|
|
64
|
-
height: 100%;
|
|
65
|
-
left: 0;
|
|
66
|
-
top: 50%;
|
|
67
|
-
transform: translateY(-50%);
|
|
68
|
-
--scroll-mask-direction: right;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.right-scroll-mask {
|
|
72
|
-
width: 0;
|
|
73
|
-
height: 100%;
|
|
74
|
-
top: 0;
|
|
75
|
-
right: 0;
|
|
76
|
-
bottom: 0;
|
|
77
|
-
left: 100%;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.right-scroll-mask-content {
|
|
81
|
-
width: var(--scroll-mask-size, 8px);
|
|
82
|
-
height: 100%;
|
|
83
|
-
right: 0;
|
|
84
|
-
bottom: 50%;
|
|
85
|
-
transform: translateY(50%);
|
|
86
|
-
--scroll-mask-direction: left;
|
|
87
|
-
}
|
|
1
|
+
.scroll-mask {
|
|
2
|
+
position: sticky;
|
|
3
|
+
z-index: 10;
|
|
4
|
+
pointer-events: none;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.top-scroll-mask {
|
|
8
|
+
width: 100%;
|
|
9
|
+
height: 0;
|
|
10
|
+
top: 0;
|
|
11
|
+
right: 0;
|
|
12
|
+
bottom: 100%;
|
|
13
|
+
left: 0;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.scroll-mask-content {
|
|
17
|
+
position: absolute;
|
|
18
|
+
background-image: linear-gradient(
|
|
19
|
+
to var(--scroll-mask-direction),
|
|
20
|
+
var(--scroll-mask-color-from, rgba(0, 0, 0, 0.1)),
|
|
21
|
+
var(--scroll-mask-color-to, rgba(0, 0, 0, 0))
|
|
22
|
+
);
|
|
23
|
+
clip-path: var(--scroll-mask-clip-path, none);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.top-scroll-mask-content {
|
|
27
|
+
width: 100%;
|
|
28
|
+
height: var(--scroll-mask-size, 8px);
|
|
29
|
+
top: 0;
|
|
30
|
+
right: 50%;
|
|
31
|
+
transform: translateX(50%);
|
|
32
|
+
--scroll-mask-direction: bottom;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.bottom-scroll-mask {
|
|
36
|
+
width: 100%;
|
|
37
|
+
height: 0;
|
|
38
|
+
top: 100%;
|
|
39
|
+
right: 0;
|
|
40
|
+
bottom: 0;
|
|
41
|
+
left: 0;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.bottom-scroll-mask-content {
|
|
45
|
+
width: 100%;
|
|
46
|
+
height: var(--scroll-mask-size, 8px);
|
|
47
|
+
bottom: 0;
|
|
48
|
+
left: 50%;
|
|
49
|
+
transform: translateX(-50%);
|
|
50
|
+
--scroll-mask-direction: top;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.left-scroll-mask {
|
|
54
|
+
width: 0;
|
|
55
|
+
height: 100%;
|
|
56
|
+
top: 0;
|
|
57
|
+
right: 100%;
|
|
58
|
+
bottom: 0;
|
|
59
|
+
left: 0;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.left-scroll-mask-content {
|
|
63
|
+
width: var(--scroll-mask-size, 8px);
|
|
64
|
+
height: 100%;
|
|
65
|
+
left: 0;
|
|
66
|
+
top: 50%;
|
|
67
|
+
transform: translateY(-50%);
|
|
68
|
+
--scroll-mask-direction: right;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.right-scroll-mask {
|
|
72
|
+
width: 0;
|
|
73
|
+
height: 100%;
|
|
74
|
+
top: 0;
|
|
75
|
+
right: 0;
|
|
76
|
+
bottom: 0;
|
|
77
|
+
left: 100%;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.right-scroll-mask-content {
|
|
81
|
+
width: var(--scroll-mask-size, 8px);
|
|
82
|
+
height: 100%;
|
|
83
|
+
right: 0;
|
|
84
|
+
bottom: 50%;
|
|
85
|
+
transform: translateY(50%);
|
|
86
|
+
--scroll-mask-direction: left;
|
|
87
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { type HTMLAttributes, forwardRef } from "react"
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { type DrawArcOptions, drawArc } from "deepsea-tools"
|
|
6
6
|
|
|
7
7
|
export interface SectionRingProps extends HTMLAttributes<HTMLDivElement> {
|
|
8
8
|
outerRadius: number
|
package/src/components/Title.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
|
|
3
|
-
import { ComponentProps, FC, useImperativeHandle, useLayoutEffect, useRef } from "react"
|
|
3
|
+
import { type ComponentProps, type FC, useImperativeHandle, useLayoutEffect, useRef } from "react"
|
|
4
4
|
import { createPortal } from "react-dom"
|
|
5
5
|
import { renderToString } from "react-dom/server"
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
|
|
3
|
-
import { CSSProperties, FC,
|
|
3
|
+
import { type CSSProperties, type FC, type HTMLAttributes, forwardRef, useEffect, useRef, useState } from "react"
|
|
4
4
|
|
|
5
5
|
import { useSize } from "soda-hooks"
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
|
|
3
|
-
import { ForwardedRef,
|
|
3
|
+
import { type ForwardedRef, type HTMLAttributes, forwardRef, useEffect, useImperativeHandle, useRef } from "react"
|
|
4
4
|
|
|
5
5
|
import { setFrameInterval } from "deepsea-tools"
|
|
6
6
|
|
package/src/components/Unify.tsx
CHANGED
|
@@ -2,7 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
/* eslint-disable no-restricted-syntax */
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
type ComponentProps,
|
|
7
|
+
type CSSProperties,
|
|
8
|
+
type FC,
|
|
9
|
+
type JSX,
|
|
10
|
+
type JSXElementConstructor,
|
|
11
|
+
type ReactNode,
|
|
12
|
+
createContext,
|
|
13
|
+
createElement,
|
|
14
|
+
useContext,
|
|
15
|
+
} from "react"
|
|
6
16
|
|
|
7
17
|
import { clsx } from "deepsea-tools"
|
|
8
18
|
|