@symbiote-native/store-review 0.1.0 → 0.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 +20 -14
- package/build-ngc/core/store-review.js.map +1 -1
- package/package.json +46 -18
- package/src/core/store-review.ts +6 -2
- package/build/react/index.d.ts +0 -1
- package/build/react/index.js +0 -5
- package/build/vue/index.d.ts +0 -1
- package/build/vue/index.js +0 -4
- package/src/react/index.ts +0 -5
- package/src/vue/index.ts +0 -4
package/README.md
CHANGED
|
@@ -25,12 +25,12 @@ Unlike a plain RN native module, `expo-store-review`'s native code is discovered
|
|
|
25
25
|
into the native host app **once**, covering this package and every other `expo-modules-core`
|
|
26
26
|
package with zero further changes:
|
|
27
27
|
|
|
28
|
-
| Platform | Touches
|
|
29
|
-
|
|
30
|
-
| iOS
|
|
31
|
-
| iOS
|
|
32
|
-
| Android
|
|
33
|
-
| Android
|
|
28
|
+
| Platform | Touches |
|
|
29
|
+
| -------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
30
|
+
| iOS | `ios/Podfile` — add `use_expo_modules!` |
|
|
31
|
+
| iOS | `AppDelegate.swift` — Expo's runtime-bootstrap hook |
|
|
32
|
+
| Android | `settings.gradle` / `app/build.gradle` — resolve and include the Expo Gradle projects |
|
|
33
|
+
| Android | `MainApplication.kt` — Expo's bootstrap hook, plus a hand-written native-module name map (there's no `expo` meta-package here to auto-generate one) |
|
|
34
34
|
|
|
35
35
|
Full mechanics live in the `symbiote-expo-native-module` project skill. Reference
|
|
36
36
|
implementation: `examples/expo-react/ios/Podfile` and
|
|
@@ -44,13 +44,12 @@ implementation: `examples/expo-react/ios/Podfile` and
|
|
|
44
44
|
src/core/ isAvailableAsync / requestReview / hasAction, plus the IStoreReviewUrlOptions
|
|
45
45
|
type. native-module.ts resolves the native module via expo-modules-core's
|
|
46
46
|
requireNativeModule.
|
|
47
|
-
src/react/ @symbiote-native/store-review/react — export * from '../core'
|
|
48
|
-
src/vue/ @symbiote-native/store-review/vue — export * from '../core'
|
|
49
47
|
src/angular/ @symbiote-native/store-review/angular — export * from '../core'
|
|
50
48
|
```
|
|
51
49
|
|
|
52
|
-
|
|
53
|
-
|
|
50
|
+
`./react`, `./vue`, and `./svelte` are `exports`-map aliases straight onto `src/core/` — no
|
|
51
|
+
physical per-framework file, since there's nothing to subscribe to or clean up. `./angular` stays
|
|
52
|
+
a physical file/subpath since Angular ships through a separate `ngc`/AOT build (`build-ngc/`).
|
|
54
53
|
|
|
55
54
|
## Use it
|
|
56
55
|
|
|
@@ -66,7 +65,8 @@ function RateAppButton() {
|
|
|
66
65
|
onPress={() =>
|
|
67
66
|
requestReview({
|
|
68
67
|
iosAppStoreUrl: 'https://apps.apple.com/app/id123456789',
|
|
69
|
-
androidPlayStoreUrl:
|
|
68
|
+
androidPlayStoreUrl:
|
|
69
|
+
'https://play.google.com/store/apps/details?id=com.example.app',
|
|
70
70
|
})
|
|
71
71
|
}
|
|
72
72
|
/>
|
|
@@ -83,7 +83,8 @@ import { requestReview } from '@symbiote-native/store-review/vue';
|
|
|
83
83
|
function onRatePress() {
|
|
84
84
|
void requestReview({
|
|
85
85
|
iosAppStoreUrl: 'https://apps.apple.com/app/id123456789',
|
|
86
|
-
androidPlayStoreUrl:
|
|
86
|
+
androidPlayStoreUrl:
|
|
87
|
+
'https://play.google.com/store/apps/details?id=com.example.app',
|
|
87
88
|
});
|
|
88
89
|
}
|
|
89
90
|
</script>
|
|
@@ -108,7 +109,8 @@ export class RateAppButton {
|
|
|
108
109
|
onRatePress(): void {
|
|
109
110
|
void requestReview({
|
|
110
111
|
iosAppStoreUrl: 'https://apps.apple.com/app/id123456789',
|
|
111
|
-
androidPlayStoreUrl:
|
|
112
|
+
androidPlayStoreUrl:
|
|
113
|
+
'https://play.google.com/store/apps/details?id=com.example.app',
|
|
112
114
|
});
|
|
113
115
|
}
|
|
114
116
|
}
|
|
@@ -132,7 +134,11 @@ hasAction(options?: IStoreReviewUrlOptions): Promise<boolean>
|
|
|
132
134
|
```
|
|
133
135
|
|
|
134
136
|
```ts
|
|
135
|
-
import {
|
|
137
|
+
import {
|
|
138
|
+
requestReview,
|
|
139
|
+
isAvailableAsync,
|
|
140
|
+
hasAction,
|
|
141
|
+
} from '@symbiote-native/store-review';
|
|
136
142
|
// or the framework-scoped entry points — identical surface, re-exported verbatim:
|
|
137
143
|
import { requestReview } from '@symbiote-native/store-review/react';
|
|
138
144
|
import { requestReview } from '@symbiote-native/store-review/vue';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store-review.js","sourceRoot":"","sources":["../../src/core/store-review.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,0DAA0D;AAC1D,kGAAkG;AAClG,+FAA+F;AAC/F,0FAA0F;AAC1F,gGAAgG;AAChG,yFAAyF;AACzF,wCAAwC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAOlD;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB;IACpC,OAAO,eAAe,CAAC,gBAAgB,EAAE,EAAE,IAAI,KAAK,CAAC;AACvD,CAAC;AAED,SAAS,MAAM,CAAC,OAAgC;IAC9C,IAAI,QAAQ,CAAC,EAAE,KAAK,KAAK,EAAE,CAAC;QAC1B,OAAO,OAAO,EAAE,cAAc,IAAI,IAAI,CAAC;IACzC,CAAC;IACD,IAAI,QAAQ,CAAC,EAAE,KAAK,SAAS,EAAE,CAAC;QAC9B,OAAO,OAAO,EAAE,mBAAmB,IAAI,IAAI,CAAC;IAC9C,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,
|
|
1
|
+
{"version":3,"file":"store-review.js","sourceRoot":"","sources":["../../src/core/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,CAAC;IACH,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,IAAI,CACV,qFAAqF;YACnF,kEAAkE,CACrE,CAAC;IACJ,CAAC;AACH,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,SAAS,CAC7B,OAAgC;IAEhC,OAAO,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,gBAAgB,EAAE,CAAC,CAAC;AACzD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symbiote-native/store-review",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "expo-store-review wrapped for SymbioteNative — one framework-agnostic core, built once and reachable from the React, Vue, 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).",
|
|
3
|
+
"version": "0.3.0",
|
|
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
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -23,12 +23,20 @@
|
|
|
23
23
|
"default": "./build/core/index.js"
|
|
24
24
|
},
|
|
25
25
|
"./vue": {
|
|
26
|
-
"types": "./build/
|
|
27
|
-
"default": "./build/
|
|
26
|
+
"types": "./build/core/index.d.ts",
|
|
27
|
+
"default": "./build/core/index.js"
|
|
28
28
|
},
|
|
29
29
|
"./react": {
|
|
30
|
-
"types": "./build/
|
|
31
|
-
"default": "./build/
|
|
30
|
+
"types": "./build/core/index.d.ts",
|
|
31
|
+
"default": "./build/core/index.js"
|
|
32
|
+
},
|
|
33
|
+
"./svelte": {
|
|
34
|
+
"types": "./build/core/index.d.ts",
|
|
35
|
+
"default": "./build/core/index.js"
|
|
36
|
+
},
|
|
37
|
+
"./solid": {
|
|
38
|
+
"types": "./build/core/index.d.ts",
|
|
39
|
+
"default": "./build/core/index.js"
|
|
32
40
|
},
|
|
33
41
|
"./angular": {
|
|
34
42
|
"types": "./build-ngc/angular/index.d.ts",
|
|
@@ -53,15 +61,19 @@
|
|
|
53
61
|
"expo-modules-core": "57.0.5"
|
|
54
62
|
},
|
|
55
63
|
"peerDependencies": {
|
|
64
|
+
"@symbiote-native/angular": ">=0.6.2",
|
|
56
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",
|
|
57
70
|
"@angular/core": ">=20",
|
|
58
71
|
"@vue/runtime-core": "^3.5.13",
|
|
59
72
|
"react": ">=19.0.0",
|
|
60
73
|
"react-native": ">=0.86",
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"@symbiote-native/vue": "0.3.8"
|
|
74
|
+
"solid-js": ">=1.9.0",
|
|
75
|
+
"svelte": ">=5.56.0",
|
|
76
|
+
"vue": ">=3.5.0"
|
|
65
77
|
},
|
|
66
78
|
"peerDependenciesMeta": {
|
|
67
79
|
"@symbiote-native/angular": {
|
|
@@ -70,6 +82,12 @@
|
|
|
70
82
|
"@symbiote-native/react": {
|
|
71
83
|
"optional": true
|
|
72
84
|
},
|
|
85
|
+
"@symbiote-native/solid": {
|
|
86
|
+
"optional": true
|
|
87
|
+
},
|
|
88
|
+
"@symbiote-native/svelte": {
|
|
89
|
+
"optional": true
|
|
90
|
+
},
|
|
73
91
|
"@symbiote-native/vue": {
|
|
74
92
|
"optional": true
|
|
75
93
|
},
|
|
@@ -82,24 +100,34 @@
|
|
|
82
100
|
"react": {
|
|
83
101
|
"optional": true
|
|
84
102
|
},
|
|
103
|
+
"solid-js": {
|
|
104
|
+
"optional": true
|
|
105
|
+
},
|
|
106
|
+
"svelte": {
|
|
107
|
+
"optional": true
|
|
108
|
+
},
|
|
85
109
|
"vue": {
|
|
86
110
|
"optional": true
|
|
87
111
|
}
|
|
88
112
|
},
|
|
89
113
|
"devDependencies": {
|
|
90
|
-
"@angular/compiler": "
|
|
91
|
-
"@angular/compiler-cli": "
|
|
92
|
-
"@angular/core": "
|
|
114
|
+
"@angular/compiler": "~22.0.8",
|
|
115
|
+
"@angular/compiler-cli": "~22.0.8",
|
|
116
|
+
"@angular/core": "~22.0.8",
|
|
93
117
|
"@types/node": "^26.0.0",
|
|
94
118
|
"@types/react": "^19.2.0",
|
|
95
119
|
"@vue/runtime-core": "^3.5.13",
|
|
96
120
|
"react": "19.2.3",
|
|
121
|
+
"solid-js": "^1.9.14",
|
|
122
|
+
"svelte": "^5.56.0",
|
|
97
123
|
"typescript": "~6.0.0",
|
|
98
|
-
"@symbiote-native/angular": "0.
|
|
99
|
-
"@symbiote-native/engine": "0.
|
|
100
|
-
"@symbiote-native/react": "0.
|
|
101
|
-
"@symbiote-native/
|
|
102
|
-
"@symbiote-native/
|
|
124
|
+
"@symbiote-native/angular": "0.8.0",
|
|
125
|
+
"@symbiote-native/engine": "0.3.0",
|
|
126
|
+
"@symbiote-native/react": "0.4.0",
|
|
127
|
+
"@symbiote-native/solid": "0.1.0",
|
|
128
|
+
"@symbiote-native/svelte": "0.3.0",
|
|
129
|
+
"@symbiote-native/test-utils": "0.2.0",
|
|
130
|
+
"@symbiote-native/vue": "0.5.0"
|
|
103
131
|
},
|
|
104
132
|
"scripts": {
|
|
105
133
|
"typecheck": "tsc --build",
|
package/src/core/store-review.ts
CHANGED
|
@@ -49,7 +49,9 @@ function urlFor(options?: IStoreReviewUrlOptions): string | null {
|
|
|
49
49
|
* Play; a sideloaded build runs the whole Play Core flow and displays nothing. Both stores also
|
|
50
50
|
* enforce a quota.
|
|
51
51
|
*/
|
|
52
|
-
export async function requestReview(
|
|
52
|
+
export async function requestReview(
|
|
53
|
+
options?: IStoreReviewUrlOptions,
|
|
54
|
+
): Promise<void> {
|
|
53
55
|
if (expoStoreReview.requestReview) {
|
|
54
56
|
return expoStoreReview.requestReview();
|
|
55
57
|
}
|
|
@@ -73,6 +75,8 @@ export async function requestReview(options?: IStoreReviewUrlOptions): Promise<v
|
|
|
73
75
|
* @return `true` if `requestReview()` is capable of directing the user to some kind of store
|
|
74
76
|
* review flow — either the native flow is available, or a store URL was supplied via `options`.
|
|
75
77
|
*/
|
|
76
|
-
export async function hasAction(
|
|
78
|
+
export async function hasAction(
|
|
79
|
+
options?: IStoreReviewUrlOptions,
|
|
80
|
+
): Promise<boolean> {
|
|
77
81
|
return !!urlFor(options) || (await isAvailableAsync());
|
|
78
82
|
}
|
package/build/react/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '../core';
|
package/build/react/index.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
// @symbiote-native/store-review/react: the React entry over the framework-agnostic core.
|
|
2
|
-
// Upstream ships free async functions, no per-instance state and no event stream — there is
|
|
3
|
-
// nothing for a hook to wrap, so this is a plain re-export, mirroring
|
|
4
|
-
// @symbiote-native/device's/@symbiote-native/local-auth's React entry.
|
|
5
|
-
export * from '../core/index.js';
|
package/build/vue/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '../core';
|
package/build/vue/index.js
DELETED
package/src/react/index.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
// @symbiote-native/store-review/react: the React entry over the framework-agnostic core.
|
|
2
|
-
// Upstream ships free async functions, no per-instance state and no event stream — there is
|
|
3
|
-
// nothing for a hook to wrap, so this is a plain re-export, mirroring
|
|
4
|
-
// @symbiote-native/device's/@symbiote-native/local-auth's React entry.
|
|
5
|
-
export * from '../core';
|
package/src/vue/index.ts
DELETED