@proappstore/sdk 1.6.0 → 1.6.1
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 +37 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -133,6 +133,43 @@ const license = await app.license.current()
|
|
|
133
133
|
const valid = await app.license.validate('LIC-ABC-123')
|
|
134
134
|
```
|
|
135
135
|
|
|
136
|
+
### Maps (Geocoding + Embeds)
|
|
137
|
+
|
|
138
|
+
Address-to-coordinates and map embeds. Powered by OpenStreetMap/Nominatim. No Google API keys needed.
|
|
139
|
+
|
|
140
|
+
```ts
|
|
141
|
+
// Geocode an address
|
|
142
|
+
const results = await app.maps.geocode('Times Square, New York')
|
|
143
|
+
// [{lat: 40.758, lng: -73.985, displayName: "Times Square...", address: {...}}]
|
|
144
|
+
|
|
145
|
+
// Reverse geocode
|
|
146
|
+
const place = await app.maps.reverseGeocode(40.758, -73.985)
|
|
147
|
+
|
|
148
|
+
// Embed map in iframe
|
|
149
|
+
<iframe src={app.maps.embedUrl(40.758, -73.985)} />
|
|
150
|
+
|
|
151
|
+
// Static tile image
|
|
152
|
+
<img src={app.maps.staticUrl(40.758, -73.985)} />
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### Storage (File Upload)
|
|
156
|
+
|
|
157
|
+
Upload images, videos, documents. Public files get URLs usable in `<img src>` without auth.
|
|
158
|
+
|
|
159
|
+
```ts
|
|
160
|
+
// Private upload (owner-only access)
|
|
161
|
+
await app.storage.upload('docs/resume.pdf', file, 'application/pdf')
|
|
162
|
+
|
|
163
|
+
// Public upload (anyone can view)
|
|
164
|
+
await app.storage.uploadPublic('avatar.jpg', file, 'image/jpeg')
|
|
165
|
+
const url = app.storage.publicUrl('avatar.jpg') // works in <img src>
|
|
166
|
+
|
|
167
|
+
// List, download, delete
|
|
168
|
+
const files = await app.storage.list()
|
|
169
|
+
const response = await app.storage.download('docs/resume.pdf')
|
|
170
|
+
await app.storage.delete('docs/resume.pdf')
|
|
171
|
+
```
|
|
172
|
+
|
|
136
173
|
## ProShell Component
|
|
137
174
|
|
|
138
175
|
A React component that handles auth gates, subscription checks, and renders a platform-level shell with topbar and user menu.
|