@symbiote-native/store-review 0.3.0 → 1.0.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 +51 -11
- package/package.json +26 -15
package/README.md
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
A wrapper package for [SymbioteNative](../../README.md) that makes
|
|
4
4
|
[`expo-store-review`](https://github.com/expo/expo/tree/main/packages/expo-store-review)
|
|
5
5
|
— prompting the platform's native in-app review flow — usable from **every** adapter, React,
|
|
6
|
-
Vue, and Angular, not just React. Like [`@symbiote-native/device`](../device) and
|
|
6
|
+
Vue, Svelte, Solid, and Angular, not just React. Like [`@symbiote-native/device`](../device) and
|
|
7
7
|
[`@symbiote-native/local-auth`](../local-auth), every export here is a one-shot async call with
|
|
8
|
-
no per-instance state, so there is no hook/composable/service to wrap — the React, Vue,
|
|
9
|
-
|
|
8
|
+
no per-instance state, so there is no hook/composable/service to wrap — the React, Vue, Svelte,
|
|
9
|
+
and Solid entry points are plain re-exports of the same `core`.
|
|
10
10
|
|
|
11
11
|
## Install
|
|
12
12
|
|
|
@@ -47,9 +47,10 @@ src/core/ isAvailableAsync / requestReview / hasAction, plus the IStoreRevie
|
|
|
47
47
|
src/angular/ @symbiote-native/store-review/angular — export * from '../core'
|
|
48
48
|
```
|
|
49
49
|
|
|
50
|
-
`./react`, `./vue`, and `./
|
|
51
|
-
physical per-framework file, since there's nothing to subscribe to or clean up.
|
|
52
|
-
a physical file/subpath since Angular ships through a separate `ngc`/AOT build
|
|
50
|
+
`./react`, `./vue`, `./svelte`, and `./solid` are `exports`-map aliases straight onto
|
|
51
|
+
`src/core/` — no physical per-framework file, since there's nothing to subscribe to or clean up.
|
|
52
|
+
`./angular` stays a physical file/subpath since Angular ships through a separate `ngc`/AOT build
|
|
53
|
+
(`build-ngc/`).
|
|
53
54
|
|
|
54
55
|
## Use it
|
|
55
56
|
|
|
@@ -94,6 +95,41 @@ function onRatePress() {
|
|
|
94
95
|
</template>
|
|
95
96
|
```
|
|
96
97
|
|
|
98
|
+
```svelte
|
|
99
|
+
<!-- Svelte -->
|
|
100
|
+
<script lang="ts">
|
|
101
|
+
import { Button } from '@symbiote-native/svelte';
|
|
102
|
+
import { requestReview } from '@symbiote-native/store-review/svelte';
|
|
103
|
+
|
|
104
|
+
function onRatePress(): void {
|
|
105
|
+
void requestReview({
|
|
106
|
+
iosAppStoreUrl: 'https://apps.apple.com/app/id123456789',
|
|
107
|
+
androidPlayStoreUrl:
|
|
108
|
+
'https://play.google.com/store/apps/details?id=com.example.app',
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
</script>
|
|
112
|
+
|
|
113
|
+
<Button title="Rate this app" onPress={onRatePress} />
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
```tsx
|
|
117
|
+
// Solid
|
|
118
|
+
import { Button } from '@symbiote-native/solid';
|
|
119
|
+
import { requestReview } from '@symbiote-native/store-review/solid';
|
|
120
|
+
|
|
121
|
+
function RateAppButton() {
|
|
122
|
+
const onRatePress = () =>
|
|
123
|
+
void requestReview({
|
|
124
|
+
iosAppStoreUrl: 'https://apps.apple.com/app/id123456789',
|
|
125
|
+
androidPlayStoreUrl:
|
|
126
|
+
'https://play.google.com/store/apps/details?id=com.example.app',
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
return <Button title="Rate this app" onPress={onRatePress} />;
|
|
130
|
+
}
|
|
131
|
+
```
|
|
132
|
+
|
|
97
133
|
```ts
|
|
98
134
|
// Angular
|
|
99
135
|
import { Component } from '@angular/core';
|
|
@@ -118,6 +154,7 @@ export class RateAppButton {
|
|
|
118
154
|
|
|
119
155
|
These snippets mirror the real canary demo screens — `examples/expo-react/screens/StoreReviewScreen.tsx`,
|
|
120
156
|
`examples/expo-vue-sfc/screens/StoreReviewScreen.vue`, `examples/expo-vue-tsx/screens/StoreReviewScreen.tsx`,
|
|
157
|
+
`examples/expo-svelte/screens/StoreReviewScreen.svelte`, `examples/expo-solid/screens/StoreReviewScreen.tsx`,
|
|
121
158
|
`examples/expo-angular/src/screens/StoreReviewScreen.ts`.
|
|
122
159
|
|
|
123
160
|
## API
|
|
@@ -142,6 +179,8 @@ import {
|
|
|
142
179
|
// or the framework-scoped entry points — identical surface, re-exported verbatim:
|
|
143
180
|
import { requestReview } from '@symbiote-native/store-review/react';
|
|
144
181
|
import { requestReview } from '@symbiote-native/store-review/vue';
|
|
182
|
+
import { requestReview } from '@symbiote-native/store-review/svelte';
|
|
183
|
+
import { requestReview } from '@symbiote-native/store-review/solid';
|
|
145
184
|
import { requestReview } from '@symbiote-native/store-review/angular';
|
|
146
185
|
```
|
|
147
186
|
|
|
@@ -173,9 +212,10 @@ view or per-instance state. Tests inject a fake native-module object in place of
|
|
|
173
212
|
ViewConfig. Native rendering itself is verified on-device (see the parent
|
|
174
213
|
[README](../../README.md) for the project's testing model).
|
|
175
214
|
|
|
176
|
-
Native autolinking wiring for `expo-modules-core` packages is already done in
|
|
215
|
+
Native autolinking wiring for `expo-modules-core` packages is already done in all six Expo
|
|
177
216
|
canary apps (`examples/expo-react`, `examples/expo-vue-sfc`, `examples/expo-vue-tsx`,
|
|
178
|
-
`examples/expo-
|
|
179
|
-
package reuses that same wiring
|
|
180
|
-
|
|
181
|
-
`
|
|
217
|
+
`examples/expo-svelte`, `examples/expo-solid`, `examples/expo-angular`) via
|
|
218
|
+
`@symbiote-native/local-auth`/`@symbiote-native/sensors` — this package reuses that same wiring
|
|
219
|
+
with zero further app-side changes, since `expo-modules-autolinking` discovers any
|
|
220
|
+
`expo-modules-core` package already present in `node_modules`. Each canary carries its own
|
|
221
|
+
`StoreReviewScreen` demo.
|
package/package.json
CHANGED
|
@@ -1,7 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symbiote-native/store-review",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "expo-store-review wrapped for SymbioteNative — one framework-agnostic core, built once and reachable from the React, Vue, Svelte, Solid, and Angular adapters. Prompts the platform's native in-app review flow, with a caller-supplied store-URL fallback in place of upstream's expo-constants-based lookup (this project doesn't depend on expo-constants).",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"react-native",
|
|
7
|
+
"symbiote-native",
|
|
8
|
+
"react",
|
|
9
|
+
"vue",
|
|
10
|
+
"svelte",
|
|
11
|
+
"solid",
|
|
12
|
+
"angular",
|
|
13
|
+
"app-review",
|
|
14
|
+
"in-app-review"
|
|
15
|
+
],
|
|
5
16
|
"license": "MIT",
|
|
6
17
|
"repository": {
|
|
7
18
|
"type": "git",
|
|
@@ -61,19 +72,19 @@
|
|
|
61
72
|
"expo-modules-core": "57.0.5"
|
|
62
73
|
},
|
|
63
74
|
"peerDependencies": {
|
|
64
|
-
"@symbiote-native/angular": ">=0.6.2",
|
|
65
|
-
"@symbiote-native/engine": ">=0.1.7",
|
|
66
|
-
"@symbiote-native/react": ">=0.2.8",
|
|
67
|
-
"@symbiote-native/solid": ">=0.0.1",
|
|
68
|
-
"@symbiote-native/svelte": ">=0.1.0",
|
|
69
|
-
"@symbiote-native/vue": ">=0.3.8",
|
|
70
75
|
"@angular/core": ">=20",
|
|
71
76
|
"@vue/runtime-core": "^3.5.13",
|
|
72
77
|
"react": ">=19.0.0",
|
|
73
78
|
"react-native": ">=0.86",
|
|
74
79
|
"solid-js": ">=1.9.0",
|
|
75
80
|
"svelte": ">=5.56.0",
|
|
76
|
-
"vue": ">=3.5.0"
|
|
81
|
+
"vue": ">=3.5.0",
|
|
82
|
+
"@symbiote-native/angular": "^1.0.0",
|
|
83
|
+
"@symbiote-native/engine": "^0.4.0",
|
|
84
|
+
"@symbiote-native/react": "^1.0.0",
|
|
85
|
+
"@symbiote-native/solid": "^1.0.0",
|
|
86
|
+
"@symbiote-native/svelte": "^1.0.0",
|
|
87
|
+
"@symbiote-native/vue": "^1.0.0"
|
|
77
88
|
},
|
|
78
89
|
"peerDependenciesMeta": {
|
|
79
90
|
"@symbiote-native/angular": {
|
|
@@ -121,13 +132,13 @@
|
|
|
121
132
|
"solid-js": "^1.9.14",
|
|
122
133
|
"svelte": "^5.56.0",
|
|
123
134
|
"typescript": "~6.0.0",
|
|
124
|
-
"@symbiote-native/angular": "0.
|
|
125
|
-
"@symbiote-native/engine": "0.
|
|
126
|
-
"@symbiote-native/react": "0.
|
|
127
|
-
"@symbiote-native/solid": "
|
|
128
|
-
"@symbiote-native/svelte": "0.
|
|
129
|
-
"@symbiote-native/test-utils": "0.
|
|
130
|
-
"@symbiote-native/vue": "0.
|
|
135
|
+
"@symbiote-native/angular": "1.0.0",
|
|
136
|
+
"@symbiote-native/engine": "0.4.0",
|
|
137
|
+
"@symbiote-native/react": "1.0.0",
|
|
138
|
+
"@symbiote-native/solid": "1.0.0",
|
|
139
|
+
"@symbiote-native/svelte": "1.0.0",
|
|
140
|
+
"@symbiote-native/test-utils": "0.3.0",
|
|
141
|
+
"@symbiote-native/vue": "1.0.0"
|
|
131
142
|
},
|
|
132
143
|
"scripts": {
|
|
133
144
|
"typecheck": "tsc --build",
|