ncore-react-native-sheet 1.0.0-alpha.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.
@@ -0,0 +1,44 @@
1
+ import { ForwardRefRenderFunction, ReactNode } from "react";
2
+ import { ScrollViewProps, FlatListProps, ViewStyle } from "react-native";
3
+ export type SheetRef = {
4
+ close: () => void;
5
+ open: () => void;
6
+ };
7
+ export interface ISheetProps<T> {
8
+ scrollViewProps?: ScrollViewProps;
9
+ flatListProps?: FlatListProps<T>;
10
+ isCanFullScreenOnSnap?: boolean;
11
+ handler?: "inside" | "outside";
12
+ footerComponent?: ReactNode;
13
+ headerComponent?: ReactNode;
14
+ panGestureEnabled?: boolean;
15
+ onOverlayPress?: () => void;
16
+ backgroundColor?: string;
17
+ withFullScreen?: boolean;
18
+ contentStyle?: ViewStyle;
19
+ toSnapDuration?: number;
20
+ overlayStyle?: ViewStyle;
21
+ withSafeArea?: boolean;
22
+ closeDuration?: number;
23
+ handlerColor?: string;
24
+ openDuration?: number;
25
+ rootStyle?: ViewStyle;
26
+ onClosed?: () => void;
27
+ onOpened?: () => void;
28
+ autoHeight?: boolean;
29
+ children: ReactNode;
30
+ snapPoint?: number;
31
+ }
32
+ export interface RefForwardingComponent<T, P = {}> extends ForwardRefRenderFunction<T, P> {
33
+ }
34
+ type Dist = {
35
+ action: () => void;
36
+ value: number;
37
+ };
38
+ export type DistsType = {
39
+ distToBottom: Dist;
40
+ distToSnap?: Dist;
41
+ distToTop: Dist;
42
+ };
43
+ export {};
44
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,wBAAwB,EACxB,SAAS,EACZ,MAAM,OAAO,CAAC;AACf,OAAO,EACH,eAAe,EACf,aAAa,EACb,SAAS,EACZ,MAAM,cAAc,CAAC;AAEtB,MAAM,MAAM,QAAQ,GAA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AAA;AAED,MAAM,MAAM,SAAS,GAAG;IACpB,YAAY,EAAE,IAAI,CAAC;IACnB,UAAU,CAAC,EAAE,IAAI,CAAC;IAClB,SAAS,EAAE,IAAI,CAAC;CACnB,CAAA"}
package/package.json ADDED
@@ -0,0 +1,149 @@
1
+ {
2
+ "name": "ncore-react-native-sheet",
3
+ "version": "1.0.0-alpha.0",
4
+ "description": "NİBGAT® | NCore React Native Sheet",
5
+ "main": "lib/commonjs/index",
6
+ "module": "lib/module/index",
7
+ "types": "lib/typescript/src/index.d.ts",
8
+ "react-native": "src/index",
9
+ "source": "src/index",
10
+ "files": [
11
+ "src",
12
+ "lib",
13
+ "android",
14
+ "ios",
15
+ "cpp",
16
+ "!lib/typescript/example",
17
+ "!android/build",
18
+ "!ios/build",
19
+ "!**/__tests__",
20
+ "!**/__fixtures__",
21
+ "!**/__mocks__"
22
+ ],
23
+ "scripts": {
24
+ "test": "jest",
25
+ "typescript": "tsc --noEmit",
26
+ "lint": "eslint \"**/*.{js,ts,tsx}\"",
27
+ "prepare": "bob build",
28
+ "release": "release-it",
29
+ "example": "yarn --cwd example",
30
+ "pods": "cd example && pod-install --quiet",
31
+ "bootstrap": "yarn example && yarn && yarn pods"
32
+ },
33
+ "keywords": [
34
+ "bottom-sheet",
35
+ "react-native",
36
+ "android",
37
+ "bottom",
38
+ "react",
39
+ "ncore",
40
+ "sheet",
41
+ "ios"
42
+ ],
43
+ "repository": {
44
+ "type": "git",
45
+ "url": "https://git.nibgat.space/nibgat/ncore-react-native-sheet"
46
+ },
47
+ "author": "nibgat <contact@nibgat.com> (https://www.nibgat.com/)",
48
+ "license": "MIT",
49
+ "bugs": {
50
+ "url": "https://git.nibgat.space/nibgat/ncore-react-native-sheet/issues"
51
+ },
52
+ "homepage": "https://git.nibgat.space/nibgat/ncore-react-native-sheet#readme",
53
+ "publishConfig": {
54
+ "registry": "https://registry.npmjs.org/"
55
+ },
56
+ "devDependencies": {
57
+ "@commitlint/config-conventional": "11.0.0",
58
+ "@react-native-community/cli": "19.1.2",
59
+ "@react-native-community/cli-platform-android": "19.1.2",
60
+ "@react-native-community/cli-platform-ios": "19.1.2",
61
+ "@react-native-community/eslint-config": "2.0.0",
62
+ "@react-native/babel-preset": "0.80.2",
63
+ "@react-native/eslint-config": "0.80.2",
64
+ "@react-native/metro-config": "0.80.2",
65
+ "@react-native/typescript-config": "0.80.2",
66
+ "@release-it/conventional-changelog": "2.0.0",
67
+ "@types/jest": "26.0.0",
68
+ "@types/react": "19.2.2",
69
+ "@types/react-native": "0.62.13",
70
+ "@types/react-test-renderer": "18.0.0",
71
+ "commitlint": "11.0.0",
72
+ "eslint": "9.37.0",
73
+ "eslint-config-prettier": "7.0.0",
74
+ "eslint-plugin-import": "2.32.0",
75
+ "eslint-plugin-jsonc": "2.21.1",
76
+ "eslint-plugin-jsx-a11y": "6.10.2",
77
+ "eslint-plugin-local-rules": "3.0.2",
78
+ "eslint-plugin-prettier": "3.1.3",
79
+ "eslint-plugin-react": "7.37.5",
80
+ "eslint-plugin-react-hooks": "7.0.0",
81
+ "husky": "6.0.0",
82
+ "jest": "26.0.1",
83
+ "jsonc-eslint-parser": "2.4.1",
84
+ "pod-install": "0.1.0",
85
+ "prettier": "2.0.5",
86
+ "react": "19.2.2",
87
+ "react-native": "0.83.0",
88
+ "react-native-builder-bob": "^0.40.17",
89
+ "react-test-renderer": "19.2.0",
90
+ "release-it": "14.2.2",
91
+ "typescript": "5.9.3",
92
+ "typescript-eslint": "8.46.0"
93
+ },
94
+ "dependencies": {
95
+ "react-native-safe-area-context": "5.6.2"
96
+ },
97
+ "peerDependencies": {
98
+ "react": "*",
99
+ "react-native": "*",
100
+ "react-native-safe-area-context": ">= 5.6.2"
101
+ },
102
+ "jest": {
103
+ "preset": "react-native",
104
+ "modulePathIgnorePatterns": [
105
+ "<rootDir>/example/node_modules",
106
+ "<rootDir>/lib/"
107
+ ]
108
+ },
109
+ "commitlint": {
110
+ "extends": [
111
+ "@commitlint/config-conventional"
112
+ ]
113
+ },
114
+ "release-it": {
115
+ "git": {
116
+ "commitMessage": "chore: release ${version}",
117
+ "tagName": "v${version}"
118
+ },
119
+ "npm": {
120
+ "publish": true
121
+ },
122
+ "github": {
123
+ "release": true
124
+ },
125
+ "plugins": {
126
+ "@release-it/conventional-changelog": {
127
+ "preset": "react"
128
+ }
129
+ }
130
+ },
131
+ "eslintIgnore": [
132
+ "node_modules/",
133
+ "lib/"
134
+ ],
135
+ "react-native-builder-bob": {
136
+ "source": "src",
137
+ "output": "lib",
138
+ "targets": [
139
+ "commonjs",
140
+ "module",
141
+ [
142
+ "typescript",
143
+ {
144
+ "project": "tsconfig.build.json"
145
+ }
146
+ ]
147
+ ]
148
+ }
149
+ }
@@ -0,0 +1,6 @@
1
+ import {
2
+ Dimensions
3
+ } from "react-native";
4
+
5
+ export const windowHeight = Dimensions.get("window").height;
6
+ export const windowWidth = Dimensions.get("window").width;