react-native-platform-components 1.2.0 → 1.3.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/README.md +9 -1
- package/android/src/main/java/com/platformcomponents/PCNativeThemeModule.kt +3 -0
- package/android/src/main/java/com/platformcomponents/PCSegmentedControlView.kt +2 -2
- package/android/src/main/java/com/platformcomponents/PlatformComponentsPackage.kt +9 -6
- package/android/src/main/jni/CMakeLists.txt +13 -1
- package/ios/PCNativeThemeModule.mm +13 -0
- package/ios/PCSelectionMenu.swift +9 -1
- package/lib/commonjs/ContextMenuNativeComponent.ts +5 -4
- package/lib/commonjs/DatePickerNativeComponent.ts +17 -11
- package/lib/commonjs/LiquidGlass.js +24 -4
- package/lib/commonjs/LiquidGlass.js.map +1 -1
- package/lib/commonjs/LiquidGlassNativeComponent.ts +6 -5
- package/lib/commonjs/NativePlatformComponentsTheme.js.map +1 -1
- package/lib/commonjs/SegmentedControlNativeComponent.ts +12 -11
- package/lib/commonjs/SelectionMenuNativeComponent.ts +6 -5
- package/lib/commonjs/codegenTypes.js +6 -0
- package/lib/commonjs/codegenTypes.js.map +1 -0
- package/lib/module/ContextMenuNativeComponent.ts +5 -4
- package/lib/module/DatePickerNativeComponent.ts +17 -11
- package/lib/module/LiquidGlass.js +24 -4
- package/lib/module/LiquidGlass.js.map +1 -1
- package/lib/module/LiquidGlassNativeComponent.ts +6 -5
- package/lib/module/NativePlatformComponentsTheme.js.map +1 -1
- package/lib/module/SegmentedControlNativeComponent.ts +12 -11
- package/lib/module/SelectionMenuNativeComponent.ts +6 -5
- package/lib/module/codegenTypes.js +4 -0
- package/lib/module/codegenTypes.js.map +1 -0
- package/lib/typescript/commonjs/src/ContextMenuNativeComponent.d.ts +5 -4
- package/lib/typescript/commonjs/src/ContextMenuNativeComponent.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/DatePickerNativeComponent.d.ts +12 -11
- package/lib/typescript/commonjs/src/DatePickerNativeComponent.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/LiquidGlass.d.ts +4 -3
- package/lib/typescript/commonjs/src/LiquidGlass.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/LiquidGlassNativeComponent.d.ts +6 -5
- package/lib/typescript/commonjs/src/LiquidGlassNativeComponent.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/NativePlatformComponentsTheme.d.ts +10 -2
- package/lib/typescript/commonjs/src/NativePlatformComponentsTheme.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/SegmentedControlNativeComponent.d.ts +7 -6
- package/lib/typescript/commonjs/src/SegmentedControlNativeComponent.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/SelectionMenuNativeComponent.d.ts +6 -5
- package/lib/typescript/commonjs/src/SelectionMenuNativeComponent.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/codegenTypes.d.ts +12 -0
- package/lib/typescript/commonjs/src/codegenTypes.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/sharedTypes.d.ts +2 -2
- package/lib/typescript/commonjs/src/sharedTypes.d.ts.map +1 -1
- package/lib/typescript/module/src/ContextMenuNativeComponent.d.ts +5 -4
- package/lib/typescript/module/src/ContextMenuNativeComponent.d.ts.map +1 -1
- package/lib/typescript/module/src/DatePickerNativeComponent.d.ts +12 -11
- package/lib/typescript/module/src/DatePickerNativeComponent.d.ts.map +1 -1
- package/lib/typescript/module/src/LiquidGlass.d.ts +4 -3
- package/lib/typescript/module/src/LiquidGlass.d.ts.map +1 -1
- package/lib/typescript/module/src/LiquidGlassNativeComponent.d.ts +6 -5
- package/lib/typescript/module/src/LiquidGlassNativeComponent.d.ts.map +1 -1
- package/lib/typescript/module/src/NativePlatformComponentsTheme.d.ts +10 -2
- package/lib/typescript/module/src/NativePlatformComponentsTheme.d.ts.map +1 -1
- package/lib/typescript/module/src/SegmentedControlNativeComponent.d.ts +7 -6
- package/lib/typescript/module/src/SegmentedControlNativeComponent.d.ts.map +1 -1
- package/lib/typescript/module/src/SelectionMenuNativeComponent.d.ts +6 -5
- package/lib/typescript/module/src/SelectionMenuNativeComponent.d.ts.map +1 -1
- package/lib/typescript/module/src/codegenTypes.d.ts +12 -0
- package/lib/typescript/module/src/codegenTypes.d.ts.map +1 -0
- package/lib/typescript/module/src/sharedTypes.d.ts +2 -2
- package/lib/typescript/module/src/sharedTypes.d.ts.map +1 -1
- package/package.json +4 -3
- package/shared/PCDatePickerState-custom.h +2 -2
- package/shared/PCSegmentedControlState-custom.h +2 -2
- package/shared/PCSelectionMenuState-custom.h +2 -2
- package/src/ContextMenuNativeComponent.ts +5 -4
- package/src/DatePickerNativeComponent.ts +17 -11
- package/src/LiquidGlass.tsx +24 -5
- package/src/LiquidGlassNativeComponent.ts +6 -5
- package/src/NativePlatformComponentsTheme.ts +11 -2
- package/src/SegmentedControlNativeComponent.ts +12 -11
- package/src/SelectionMenuNativeComponent.ts +6 -5
- package/src/codegenTypes.ts +40 -0
- package/src/sharedTypes.ts +2 -2
- /package/{app.plugin.cjs → app.plugin.js} +0 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// codegenTypes.ts
|
|
2
|
+
//
|
|
3
|
+
// Local mirror of React Native's `CodegenTypes`.
|
|
4
|
+
//
|
|
5
|
+
// Codegen resolves these names lexically — it matches the identifier used in a
|
|
6
|
+
// spec (`Int32`, `WithDefault`, ...) and never follows the import to its
|
|
7
|
+
// source. Declaring them here therefore produces exactly the same schema as
|
|
8
|
+
// importing them from React Native, while staying parseable by the codegen
|
|
9
|
+
// shipped with older releases: the `CodegenTypes.Int32` namespace form is only
|
|
10
|
+
// understood by React Native 0.80+, and the pre-0.80 deep import
|
|
11
|
+
// (`react-native/Libraries/Types/CodegenTypes`) no longer type-checks on 0.86.
|
|
12
|
+
//
|
|
13
|
+
// Keep these definitions in sync with
|
|
14
|
+
// `react-native/Libraries/Types/CodegenTypesNamespace.d.ts`.
|
|
15
|
+
import type { NativeSyntheticEvent } from 'react-native';
|
|
16
|
+
|
|
17
|
+
// Event types. The `_PaperName` parameter is unused by the New Architecture; it
|
|
18
|
+
// is kept so the signatures match React Native's.
|
|
19
|
+
export type BubblingEventHandler<
|
|
20
|
+
T,
|
|
21
|
+
_PaperName extends string | never = never,
|
|
22
|
+
> = (event: NativeSyntheticEvent<T>) => void | Promise<void>;
|
|
23
|
+
|
|
24
|
+
export type DirectEventHandler<T, _PaperName extends string | never = never> = (
|
|
25
|
+
event: NativeSyntheticEvent<T>
|
|
26
|
+
) => void | Promise<void>;
|
|
27
|
+
|
|
28
|
+
// Prop types.
|
|
29
|
+
export type Double = number;
|
|
30
|
+
export type Float = number;
|
|
31
|
+
export type Int32 = number;
|
|
32
|
+
export type UnsafeObject = object;
|
|
33
|
+
export type UnsafeMixed = unknown;
|
|
34
|
+
|
|
35
|
+
type DefaultTypes = number | boolean | string | ReadonlyArray<string>;
|
|
36
|
+
|
|
37
|
+
export type WithDefault<
|
|
38
|
+
Type extends DefaultTypes,
|
|
39
|
+
_Value extends Type | string | undefined | null,
|
|
40
|
+
> = Type | undefined | null;
|
package/src/sharedTypes.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// SharedTypes.ts
|
|
2
|
-
import type {
|
|
2
|
+
import type { BubblingEventHandler } from './codegenTypes';
|
|
3
3
|
|
|
4
4
|
/** Shared "open/closed" control state. */
|
|
5
5
|
export type Visible = 'open' | 'closed';
|
|
@@ -14,4 +14,4 @@ export type AndroidMaterialMode = 'system' | 'm3';
|
|
|
14
14
|
export type EmptyEvent = Readonly<{}>;
|
|
15
15
|
|
|
16
16
|
/** Convenience alias (optional). */
|
|
17
|
-
export type Bubbling<T> =
|
|
17
|
+
export type Bubbling<T> = BubblingEventHandler<T>;
|
|
File without changes
|