Skip to content

Commit 0fc153d

Browse files
authored
Revert, move to specs and publish the typescript vesion (#3769)
* Another try * Do not transpile specs * Another one * Update snapshot
1 parent 89d04cf commit 0fc153d

File tree

7 files changed

+24
-25
lines changed

7 files changed

+24
-25
lines changed

lib/.npmignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,6 @@
55
*.d.js
66
# include the .d.ts files
77
!*.d.ts
8+
# ignore the .js files in the specs folder and include the .ts files and include the .ts files
9+
specs/**/*.js
10+
!specs/**/*.ts

lib/components/HighlighterOverlayView/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {processColor, StyleSheet, Modal, ViewStyle} from 'react-native';
33
// Import the Codegen specification for New Architecture
44
import HighlighterViewNativeComponent, {
55
HighlightViewTagParams as NativeHighlightViewTagParams
6-
} from './HighlighterViewNativeComponent';
6+
} from '../../specs/HighlighterViewNativeComponent';
77

88
const DefaultOverlayColor = 'rgba(0, 0, 0, 0.5)';
99

lib/components/Keyboard/KeyboardTrackingView/KeyboardTrackingView.ios.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React, {PureComponent} from 'react';
22
import ReactNative, {NativeModules} from 'react-native';
33
// Import the Codegen specification for New Architecture
4-
import KeyboardTrackingViewNativeComponent from './KeyboardTrackingViewNativeComponent';
4+
import KeyboardTrackingViewNativeComponent from '../../../specs/KeyboardTrackingViewNativeComponent';
55
import {KeyboardTrackingViewProps} from './index';
66

77
const KeyboardTrackingViewTempManager = NativeModules.KeyboardTrackingViewTempManager;

lib/components/HighlighterOverlayView/HighlighterViewNativeComponent.ts renamed to lib/specs/HighlighterViewNativeComponent.ts

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
// import type {ViewProps} from 'react-native';
2-
import {requireNativeComponent, type ViewProps} from 'react-native';
3-
import type {
4-
Float,
5-
Int32,
6-
WithDefault
7-
} from 'react-native/Libraries/Types/CodegenTypes';
8-
// import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
1+
import type {ViewProps} from 'react-native';
2+
// import {requireNativeComponent, type ViewProps} from 'react-native';
3+
import type {Float, Int32, WithDefault} from 'react-native/Libraries/Types/CodegenTypes';
4+
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
95

106
export interface HighlightFrame {
117
x: Float;
@@ -75,8 +71,8 @@ export interface NativeProps extends ViewProps {
7571
innerPadding?: WithDefault<Float, 0>;
7672
}
7773

78-
// export default codegenNativeComponent<NativeProps>('HighlighterView');
74+
export default codegenNativeComponent<NativeProps>('HighlighterView');
7975

80-
const HighlighterViewNativeComponent = requireNativeComponent<NativeProps>('HighlighterView');
76+
// const HighlighterViewNativeComponent = requireNativeComponent<NativeProps>('HighlighterView');
8177

82-
export default HighlighterViewNativeComponent;
78+
// export default HighlighterViewNativeComponent;
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
// import type {ViewProps} from 'react-native';
2-
import {requireNativeComponent, type ViewProps} from 'react-native';
1+
import type {ViewProps} from 'react-native';
2+
// import {requireNativeComponent, type ViewProps} from 'react-native';
33
import type {Int32, WithDefault} from 'react-native/Libraries/Types/CodegenTypes';
4-
// import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
4+
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
55

66
export interface NativeProps extends ViewProps {
77
/**
@@ -67,8 +67,8 @@ export interface NativeProps extends ViewProps {
6767
usesBottomTabs?: WithDefault<boolean, false>;
6868
}
6969

70-
// export default codegenNativeComponent<NativeProps>('KeyboardTrackingViewTemp');
70+
export default codegenNativeComponent<NativeProps>('KeyboardTrackingViewTemp');
7171

72-
const KeyboardTrackingViewNativeComponent = requireNativeComponent<NativeProps>('KeyboardTrackingViewTemp');
72+
// const KeyboardTrackingViewNativeComponent = requireNativeComponent<NativeProps>('KeyboardTrackingViewTemp');
7373

74-
export default KeyboardTrackingViewNativeComponent;
74+
// export default KeyboardTrackingViewNativeComponent;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"react-native-redash": "^12.0.3",
5757
"semver": "^5.5.0",
5858
"tinycolor2": "^1.4.2",
59-
"uilib-native": "5.0.0-snapshot.7207",
59+
"uilib-native": "5.0.0-snapshot.7212",
6060
"url-parse": "^1.2.0",
6161
"wix-react-native-text-size": "1.0.9"
6262
},

yarn.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10928,7 +10928,7 @@ __metadata:
1092810928
shell-utils: ^1.0.10
1092910929
tinycolor2: ^1.4.2
1093010930
typescript: 5.0.4
10931-
uilib-native: 5.0.0-snapshot.7207
10931+
uilib-native: 5.0.0-snapshot.7212
1093210932
url-parse: ^1.2.0
1093310933
wix-react-native-text-size: 1.0.9
1093410934
peerDependencies:
@@ -12560,16 +12560,16 @@ __metadata:
1256012560
languageName: node
1256112561
linkType: hard
1256212562

12563-
"uilib-native@npm:5.0.0-snapshot.7207":
12564-
version: 5.0.0-snapshot.7207
12565-
resolution: "uilib-native@npm:5.0.0-snapshot.7207"
12563+
"uilib-native@npm:5.0.0-snapshot.7212":
12564+
version: 5.0.0-snapshot.7212
12565+
resolution: "uilib-native@npm:5.0.0-snapshot.7212"
1256612566
dependencies:
1256712567
lodash: ^4.17.21
1256812568
prop-types: ^15.5.10
1256912569
peerDependencies:
1257012570
react: ">=17.0.1"
1257112571
react-native: ">=0.64.1"
12572-
checksum: 3246a839f411acc4b05507eb3f1c1eea350b38268c8167e68fe6ca123985a53b848578df33bf738aee230cd2ef535bc41bd975d1e1f848e7263ff59ee7ae04e9
12572+
checksum: f293839cebb6b8dca255de9b02dcf27f36892aa8d2c97ae1445c4e8506d43db03cd95758ae7685f642fce051bff016667a91632083d48ac6581dc101691f3365
1257312573
languageName: node
1257412574
linkType: hard
1257512575

0 commit comments

Comments
 (0)