@tetrax/squircle 1.0.0 → 1.0.2
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 +19 -2
- package/dist/core.d.mts +67 -68
- package/dist/core.d.ts +67 -68
- package/dist/core.js +696 -629
- package/dist/core.mjs +666 -599
- package/dist/react/index.d.mts +22 -21
- package/dist/react/index.d.ts +22 -21
- package/dist/react/index.js +842 -809
- package/dist/react/index.mjs +806 -773
- package/dist/react-native/index.d.ts +19 -18
- package/dist/react-native/index.js +384 -360
- package/dist/react-native/index.mjs +349 -325
- package/package.json +1 -1
package/dist/react/index.d.mts
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import React, { ReactNode, ComponentType } from 'react';
|
|
2
|
-
|
|
3
|
-
interface SquircleProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
-
children?: ReactNode;
|
|
5
|
-
cornerRadius?: number;
|
|
6
|
-
cornerSmoothing?: number;
|
|
7
|
-
preserveSmoothing?: boolean;
|
|
8
|
-
as?: ComponentType | string;
|
|
9
|
-
g2Continuous?: boolean;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
declare function
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
import React, { ReactNode, ComponentType } from 'react';
|
|
2
|
+
|
|
3
|
+
interface SquircleProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
children?: ReactNode;
|
|
5
|
+
cornerRadius?: number;
|
|
6
|
+
cornerSmoothing?: number;
|
|
7
|
+
preserveSmoothing?: boolean;
|
|
8
|
+
as?: ComponentType | string;
|
|
9
|
+
g2Continuous?: boolean;
|
|
10
|
+
zSquircle?: boolean;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Drop-in squircle wrapper. Uses Figma's algorithm (2 Bézier curves + 1 arc per corner).
|
|
14
|
+
*/
|
|
15
|
+
declare function Squircle(props: SquircleProps): React.JSX.Element;
|
|
16
|
+
/**
|
|
17
|
+
* Noscript fallback — place once in root layout.
|
|
18
|
+
*/
|
|
19
|
+
declare function SquircleNoScript(): React.JSX.Element;
|
|
20
|
+
declare function initGlobalSquircleObserver(): void;
|
|
21
|
+
|
|
22
|
+
export { Squircle, SquircleNoScript, type SquircleProps, Squircle as default, initGlobalSquircleObserver };
|
package/dist/react/index.d.ts
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import React, { ReactNode, ComponentType } from 'react';
|
|
2
|
-
|
|
3
|
-
interface SquircleProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
-
children?: ReactNode;
|
|
5
|
-
cornerRadius?: number;
|
|
6
|
-
cornerSmoothing?: number;
|
|
7
|
-
preserveSmoothing?: boolean;
|
|
8
|
-
as?: ComponentType | string;
|
|
9
|
-
g2Continuous?: boolean;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
declare function
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
import React, { ReactNode, ComponentType } from 'react';
|
|
2
|
+
|
|
3
|
+
interface SquircleProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
children?: ReactNode;
|
|
5
|
+
cornerRadius?: number;
|
|
6
|
+
cornerSmoothing?: number;
|
|
7
|
+
preserveSmoothing?: boolean;
|
|
8
|
+
as?: ComponentType | string;
|
|
9
|
+
g2Continuous?: boolean;
|
|
10
|
+
zSquircle?: boolean;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Drop-in squircle wrapper. Uses Figma's algorithm (2 Bézier curves + 1 arc per corner).
|
|
14
|
+
*/
|
|
15
|
+
declare function Squircle(props: SquircleProps): React.JSX.Element;
|
|
16
|
+
/**
|
|
17
|
+
* Noscript fallback — place once in root layout.
|
|
18
|
+
*/
|
|
19
|
+
declare function SquircleNoScript(): React.JSX.Element;
|
|
20
|
+
declare function initGlobalSquircleObserver(): void;
|
|
21
|
+
|
|
22
|
+
export { Squircle, SquircleNoScript, type SquircleProps, Squircle as default, initGlobalSquircleObserver };
|