@hzblj/kara-ui 0.4.1 → 0.6.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/CHANGELOG.md +47 -0
- package/README.md +3 -14
- package/package.json +7 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,52 @@
|
|
|
1
1
|
# @hzblj/kara-ui
|
|
2
2
|
|
|
3
|
+
## 0.6.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#10](https://github.com/hzblj/kara-ui/pull/10) [`62b7131`](https://github.com/hzblj/kara-ui/commit/62b713143bd03872ecdd89ca8de42d98fe589617) Thanks [@hzblj](https://github.com/hzblj)! - Haptics: kara's own, native on both platforms, named for what happened.
|
|
8
|
+
|
|
9
|
+
- `haptics.success()`, `haptics.selection()`, … — one function per haptic — and `haptics.play(name)` for a name that arrives as data. `selection`, `tick`, `toggleOn`/`toggleOff`, `success`/`warning`/`error`, `longPress`, `dragStart`, `thresholdActivate`/`thresholdDeactivate`, `keyPress`, and the impacts `soft`, `light`, `medium`, `rigid`, `heavy` (`intensity` scales them on iOS). Synchronous, nothing to await.
|
|
10
|
+
- iOS: UIKit's feedback generators, kept alive and warmed up with `haptics.prepare` — `Pressable` prepares its haptic on press-in. Android: the system's own haptic feedback (`View.performHapticFeedback`), with Android 14's constants falling back to older ones — never a raw vibration. Both follow the user's system setting.
|
|
11
|
+
- `useHapticFeedback(trigger, haptic)` plays on every change of a value, never on mount; a function of the previous and next value picks a haptic per change.
|
|
12
|
+
- `haptics.setEnabled(false)` silences every kara haptic, the components' own included.
|
|
13
|
+
- `Pressable`'s `haptic` takes a name as well as `true` (a `light` impact); `Chip` plays `selection`.
|
|
14
|
+
- On Android, where Compose's Material controls play nothing: `Switch` plays `toggleOn`/`toggleOff`, a stepped `Slider` ticks at every stop, `SegmentedControl` plays `selection`. iOS keeps its native controls' own feedback.
|
|
15
|
+
- `Slider`: `step` is the increment on Android too — it was passed to Compose as the number of stops.
|
|
16
|
+
- `expo-haptics` is no longer a peer dependency.
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- Updated dependencies [[`62b7131`](https://github.com/hzblj/kara-ui/commit/62b713143bd03872ecdd89ca8de42d98fe589617)]:
|
|
21
|
+
- @hzblj/kara-native@0.6.0
|
|
22
|
+
- @hzblj/kara-components@0.6.0
|
|
23
|
+
- @hzblj/kara-router@0.6.0
|
|
24
|
+
- @hzblj/kara-theme@0.6.0
|
|
25
|
+
- @hzblj/kara-sx@0.6.0
|
|
26
|
+
- @hzblj/kara-expo-plugin@0.6.0
|
|
27
|
+
|
|
28
|
+
## 0.5.0
|
|
29
|
+
|
|
30
|
+
### Minor Changes
|
|
31
|
+
|
|
32
|
+
- [#8](https://github.com/hzblj/kara-ui/pull/8) [`3b0a6fb`](https://github.com/hzblj/kara-ui/commit/3b0a6fbc49559720023fece2b5c6189ad4d88bc8) Thanks [@hzblj](https://github.com/hzblj)! - `ZoomTransition`: a push that grows out of the photo it was opened from and shrinks back into it.
|
|
33
|
+
|
|
34
|
+
- iOS 18: UIKit's zoom transition, with the interactive dismissal (swipe down, edge swipe, pinch) gated on the scroll views under the finger. Below iOS 18 the push stays a slide. Android: Material's container transform, both ways.
|
|
35
|
+
- Three pieces from `@hzblj/kara-ui/router`, tied by one identifier: `ZoomTransition.Source` on the list, `ZoomTransition.Enabler` and `ZoomTransition.Target` on the pushed screen; `useZoomTransitionSourceId`, `ZOOM_TRANSITION_PARAM`, `useZoomTransitionParam` and `withZoomTransition` (an Android fade under the transform) around them.
|
|
36
|
+
- Settings both platforms honour sit at the top (`scrim`); the rest is typed apart under `ios` (`dismissGesture`, `blur`, the target's `fit`) and `android` (`duration`, `easing`, `fade`, `path`, corner radii, the target's `fit` and `flex`).
|
|
37
|
+
- `ContextMenu`: with a `ZoomTransition.Source` in the trigger, a tap on the iOS preview zooms the preview's photo straight into the pushed screen. `previewTransition` (`zoom`, `pop`, `dismiss`) picks how the preview leaves.
|
|
38
|
+
- `DurationSize`, the keys of `duration`.
|
|
39
|
+
|
|
40
|
+
### Patch Changes
|
|
41
|
+
|
|
42
|
+
- Updated dependencies [[`3b0a6fb`](https://github.com/hzblj/kara-ui/commit/3b0a6fbc49559720023fece2b5c6189ad4d88bc8)]:
|
|
43
|
+
- @hzblj/kara-router@0.5.0
|
|
44
|
+
- @hzblj/kara-native@0.5.0
|
|
45
|
+
- @hzblj/kara-components@0.5.0
|
|
46
|
+
- @hzblj/kara-theme@0.5.0
|
|
47
|
+
- @hzblj/kara-sx@0.5.0
|
|
48
|
+
- @hzblj/kara-expo-plugin@0.5.0
|
|
49
|
+
|
|
3
50
|
## 0.4.1
|
|
4
51
|
|
|
5
52
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -8,8 +8,8 @@ iOS and Android, Expo SDK 57, development build required.
|
|
|
8
8
|
## Install
|
|
9
9
|
|
|
10
10
|
```bash
|
|
11
|
-
npx expo install @hzblj/kara-ui @expo/ui @lodev09/react-native-true-sheet @shopify/flash-list expo-
|
|
12
|
-
npx expo install expo-router # optional, for
|
|
11
|
+
npx expo install @hzblj/kara-ui @expo/ui @lodev09/react-native-true-sheet @shopify/flash-list expo-image react-native-reanimated react-native-worklets
|
|
12
|
+
npx expo install expo-router # optional, for @hzblj/kara-ui/router
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
## Use
|
|
@@ -53,20 +53,9 @@ plugins: [['@hzblj/kara-ui', {icons: {source: './assets/icons'}}]]
|
|
|
53
53
|
|
|
54
54
|
Every SVG in the folder becomes a native icon at prebuild: `bolt.svg` → `<Icon name="bolt" />`.
|
|
55
55
|
|
|
56
|
-
## Sheets
|
|
57
|
-
|
|
58
|
-
```tsx
|
|
59
|
-
<Sheet onDismiss={close} visible={open}>
|
|
60
|
-
<Sheet.Header title="Choose a size" trailingItems={[{type: 'close', onPress: close}]} />
|
|
61
|
-
<Content />
|
|
62
|
-
</Sheet>
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
The header is a real navigation bar: `back`, `close` and icon items on either side, a centred, leading or large title.
|
|
66
|
-
|
|
67
56
|
## Entry points
|
|
68
57
|
|
|
69
|
-
`@hzblj/kara-ui` (everything), `@hzblj/kara-ui/router` (
|
|
58
|
+
`@hzblj/kara-ui` (everything), `@hzblj/kara-ui/router` (what needs Expo Router), `@hzblj/kara-ui/swift-ui` and
|
|
70
59
|
`@hzblj/kara-ui/jetpack-compose` (the raw native views).
|
|
71
60
|
|
|
72
61
|
[Example app and source](https://github.com/hzblj/kara-ui) · MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hzblj/kara-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "A native-first design system for Expo: real SwiftUI and Jetpack Compose views through @expo/ui, styled by one token-typed sx engine.",
|
|
5
5
|
"author": "Jan Blazej",
|
|
6
6
|
"license": "MIT",
|
|
@@ -87,19 +87,18 @@
|
|
|
87
87
|
]
|
|
88
88
|
},
|
|
89
89
|
"dependencies": {
|
|
90
|
-
"@hzblj/kara-components": "^0.
|
|
91
|
-
"@hzblj/kara-expo-plugin": "^0.
|
|
92
|
-
"@hzblj/kara-native": "^0.
|
|
93
|
-
"@hzblj/kara-router": "^0.
|
|
94
|
-
"@hzblj/kara-sx": "^0.
|
|
95
|
-
"@hzblj/kara-theme": "^0.
|
|
90
|
+
"@hzblj/kara-components": "^0.6.0",
|
|
91
|
+
"@hzblj/kara-expo-plugin": "^0.6.0",
|
|
92
|
+
"@hzblj/kara-native": "^0.6.0",
|
|
93
|
+
"@hzblj/kara-router": "^0.6.0",
|
|
94
|
+
"@hzblj/kara-sx": "^0.6.0",
|
|
95
|
+
"@hzblj/kara-theme": "^0.6.0"
|
|
96
96
|
},
|
|
97
97
|
"peerDependencies": {
|
|
98
98
|
"@expo/ui": "~57.0.0",
|
|
99
99
|
"@lodev09/react-native-true-sheet": ">=3.11.0",
|
|
100
100
|
"@shopify/flash-list": ">=2.0.0",
|
|
101
101
|
"expo": "~57.0.0",
|
|
102
|
-
"expo-haptics": "*",
|
|
103
102
|
"expo-image": "*",
|
|
104
103
|
"expo-router": "*",
|
|
105
104
|
"react": "*",
|
|
@@ -117,7 +116,6 @@
|
|
|
117
116
|
"@shopify/flash-list": "^2.3.2",
|
|
118
117
|
"@types/react": "~19.2.18",
|
|
119
118
|
"expo": "~57.0.22",
|
|
120
|
-
"expo-haptics": "~57.0.3",
|
|
121
119
|
"expo-image": "~57.0.5",
|
|
122
120
|
"expo-router": "~57.0.21",
|
|
123
121
|
"react": "19.2.3",
|