@symbiote-native/store-review 0.2.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 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, and
9
- Angular entry points are plain re-exports of the same `core`.
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
 
@@ -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 | `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) |
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,13 @@ 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
- No per-adapter lifecycle wrapper exists because there's nothing to subscribe to or clean up —
53
- each adapter entry is a single-file re-export.
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/`).
54
54
 
55
55
  ## Use it
56
56
 
@@ -66,7 +66,8 @@ function RateAppButton() {
66
66
  onPress={() =>
67
67
  requestReview({
68
68
  iosAppStoreUrl: 'https://apps.apple.com/app/id123456789',
69
- androidPlayStoreUrl: 'https://play.google.com/store/apps/details?id=com.example.app',
69
+ androidPlayStoreUrl:
70
+ 'https://play.google.com/store/apps/details?id=com.example.app',
70
71
  })
71
72
  }
72
73
  />
@@ -83,7 +84,8 @@ import { requestReview } from '@symbiote-native/store-review/vue';
83
84
  function onRatePress() {
84
85
  void requestReview({
85
86
  iosAppStoreUrl: 'https://apps.apple.com/app/id123456789',
86
- androidPlayStoreUrl: 'https://play.google.com/store/apps/details?id=com.example.app',
87
+ androidPlayStoreUrl:
88
+ 'https://play.google.com/store/apps/details?id=com.example.app',
87
89
  });
88
90
  }
89
91
  </script>
@@ -93,6 +95,41 @@ function onRatePress() {
93
95
  </template>
94
96
  ```
95
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
+
96
133
  ```ts
97
134
  // Angular
98
135
  import { Component } from '@angular/core';
@@ -108,7 +145,8 @@ export class RateAppButton {
108
145
  onRatePress(): void {
109
146
  void requestReview({
110
147
  iosAppStoreUrl: 'https://apps.apple.com/app/id123456789',
111
- androidPlayStoreUrl: 'https://play.google.com/store/apps/details?id=com.example.app',
148
+ androidPlayStoreUrl:
149
+ 'https://play.google.com/store/apps/details?id=com.example.app',
112
150
  });
113
151
  }
114
152
  }
@@ -116,6 +154,7 @@ export class RateAppButton {
116
154
 
117
155
  These snippets mirror the real canary demo screens — `examples/expo-react/screens/StoreReviewScreen.tsx`,
118
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`,
119
158
  `examples/expo-angular/src/screens/StoreReviewScreen.ts`.
120
159
 
121
160
  ## API
@@ -132,10 +171,16 @@ hasAction(options?: IStoreReviewUrlOptions): Promise<boolean>
132
171
  ```
133
172
 
134
173
  ```ts
135
- import { requestReview, isAvailableAsync, hasAction } from '@symbiote-native/store-review';
174
+ import {
175
+ requestReview,
176
+ isAvailableAsync,
177
+ hasAction,
178
+ } from '@symbiote-native/store-review';
136
179
  // or the framework-scoped entry points — identical surface, re-exported verbatim:
137
180
  import { requestReview } from '@symbiote-native/store-review/react';
138
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';
139
184
  import { requestReview } from '@symbiote-native/store-review/angular';
140
185
  ```
141
186
 
@@ -167,9 +212,10 @@ view or per-instance state. Tests inject a fake native-module object in place of
167
212
  ViewConfig. Native rendering itself is verified on-device (see the parent
168
213
  [README](../../README.md) for the project's testing model).
169
214
 
170
- Native autolinking wiring for `expo-modules-core` packages is already done in the four Expo
215
+ Native autolinking wiring for `expo-modules-core` packages is already done in all six Expo
171
216
  canary apps (`examples/expo-react`, `examples/expo-vue-sfc`, `examples/expo-vue-tsx`,
172
- `examples/expo-angular`) via `@symbiote-native/local-auth`/`@symbiote-native/sensors` — this
173
- package reuses that same wiring with zero further app-side changes, since
174
- `expo-modules-autolinking` discovers any `expo-modules-core` package already present in
175
- `node_modules`. A dedicated demo screen has not been wired into those canaries yet.
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.
@@ -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,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CAAC,SAAS,EAAE,CAAC;YACf,OAAO,CAAC,IAAI,CAAC,sDAAsD,GAAG,EAAE,CAAC,CAAC;QAC5E,CAAC;aAAM,CAAC;YACN,MAAM,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAC7B,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,18 @@
1
1
  {
2
2
  "name": "@symbiote-native/store-review",
3
- "version": "0.2.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": "1.0.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
+ "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",
@@ -23,16 +34,20 @@
23
34
  "default": "./build/core/index.js"
24
35
  },
25
36
  "./vue": {
26
- "types": "./build/vue/index.d.ts",
27
- "default": "./build/vue/index.js"
37
+ "types": "./build/core/index.d.ts",
38
+ "default": "./build/core/index.js"
28
39
  },
29
40
  "./react": {
30
- "types": "./build/react/index.d.ts",
31
- "default": "./build/react/index.js"
41
+ "types": "./build/core/index.d.ts",
42
+ "default": "./build/core/index.js"
32
43
  },
33
44
  "./svelte": {
34
- "types": "./build/svelte/index.d.ts",
35
- "default": "./build/svelte/index.js"
45
+ "types": "./build/core/index.d.ts",
46
+ "default": "./build/core/index.js"
47
+ },
48
+ "./solid": {
49
+ "types": "./build/core/index.d.ts",
50
+ "default": "./build/core/index.js"
36
51
  },
37
52
  "./angular": {
38
53
  "types": "./build-ngc/angular/index.d.ts",
@@ -57,17 +72,19 @@
57
72
  "expo-modules-core": "57.0.5"
58
73
  },
59
74
  "peerDependencies": {
60
- "@symbiote-native/angular": ">=0.6.2",
61
- "@symbiote-native/engine": ">=0.1.7",
62
- "@symbiote-native/react": ">=0.2.8",
63
- "@symbiote-native/svelte": ">=0.1.0",
64
- "@symbiote-native/vue": ">=0.3.8",
65
75
  "@angular/core": ">=20",
66
76
  "@vue/runtime-core": "^3.5.13",
67
77
  "react": ">=19.0.0",
68
78
  "react-native": ">=0.86",
79
+ "solid-js": ">=1.9.0",
69
80
  "svelte": ">=5.56.0",
70
- "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"
71
88
  },
72
89
  "peerDependenciesMeta": {
73
90
  "@symbiote-native/angular": {
@@ -76,6 +93,9 @@
76
93
  "@symbiote-native/react": {
77
94
  "optional": true
78
95
  },
96
+ "@symbiote-native/solid": {
97
+ "optional": true
98
+ },
79
99
  "@symbiote-native/svelte": {
80
100
  "optional": true
81
101
  },
@@ -91,6 +111,9 @@
91
111
  "react": {
92
112
  "optional": true
93
113
  },
114
+ "solid-js": {
115
+ "optional": true
116
+ },
94
117
  "svelte": {
95
118
  "optional": true
96
119
  },
@@ -106,14 +129,16 @@
106
129
  "@types/react": "^19.2.0",
107
130
  "@vue/runtime-core": "^3.5.13",
108
131
  "react": "19.2.3",
132
+ "solid-js": "^1.9.14",
109
133
  "svelte": "^5.56.0",
110
134
  "typescript": "~6.0.0",
111
- "@symbiote-native/angular": "0.7.0",
112
- "@symbiote-native/engine": "0.2.0",
113
- "@symbiote-native/react": "0.3.0",
114
- "@symbiote-native/svelte": "0.2.0",
115
- "@symbiote-native/test-utils": "0.1.6",
116
- "@symbiote-native/vue": "0.4.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"
117
142
  },
118
143
  "scripts": {
119
144
  "typecheck": "tsc --build",
@@ -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(options?: IStoreReviewUrlOptions): Promise<void> {
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(options?: IStoreReviewUrlOptions): Promise<boolean> {
78
+ export async function hasAction(
79
+ options?: IStoreReviewUrlOptions,
80
+ ): Promise<boolean> {
77
81
  return !!urlFor(options) || (await isAvailableAsync());
78
82
  }
@@ -1 +0,0 @@
1
- export * from '../core';
@@ -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';
@@ -1 +0,0 @@
1
- export * from '../core';
@@ -1,6 +0,0 @@
1
- // @symbiote-native/store-review/svelte: the Svelte 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 rune to wrap, so this is a plain re-export. Svelte's lifecycle bucket is
4
- // `runes/` (adapters/svelte/src/runes — never React's `hooks` or Vue's `composables`), and this
5
- // package has none to fill.
6
- export * from '../core/index.js';
@@ -1 +0,0 @@
1
- export * from '../core';
@@ -1,4 +0,0 @@
1
- // @symbiote-native/store-review/vue: the Vue entry over the framework-agnostic core. Same
2
- // reasoning as the React entry — no per-instance state or event stream to wire onto Vue's
3
- // reactivity, so this is a plain re-export.
4
- export * from '../core/index.js';
@@ -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';
@@ -1,6 +0,0 @@
1
- // @symbiote-native/store-review/svelte: the Svelte 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 rune to wrap, so this is a plain re-export. Svelte's lifecycle bucket is
4
- // `runes/` (adapters/svelte/src/runes — never React's `hooks` or Vue's `composables`), and this
5
- // package has none to fill.
6
- export * from '../core';
package/src/vue/index.ts DELETED
@@ -1,4 +0,0 @@
1
- // @symbiote-native/store-review/vue: the Vue entry over the framework-agnostic core. Same
2
- // reasoning as the React entry — no per-instance state or event stream to wire onto Vue's
3
- // reactivity, so this is a plain re-export.
4
- export * from '../core';