@flapsdk/vault-runtime 0.1.42 → 0.1.44-next.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 +48 -32
- package/{chunk-PZX6PEW4.js → chunk-5DU4W4CK.js} +565 -6
- package/chunk-5DU4W4CK.js.map +1 -0
- package/{chunk-PLIQ3EPB.js → chunk-BIRAO6LU.js} +428 -24
- package/chunk-BIRAO6LU.js.map +1 -0
- package/{chunk-Z5OBYOB2.js → chunk-ZLF6YGWQ.js} +41 -125
- package/chunk-ZLF6YGWQ.js.map +1 -0
- package/host-client.d.mts +6 -3
- package/host-client.js +3 -3
- package/host.d.mts +5 -5
- package/host.js +1 -1
- package/{hostRuntimeConfig-CKjug1-9.d.mts → hostRuntimeConfig-5ZZT8uC7.d.mts} +1 -1
- package/maplibre-gl-KTPWJHIW.js +26453 -0
- package/maplibre-gl-KTPWJHIW.js.map +1 -0
- package/{mpegts-L3KBZN7J.js → mpegts-536UQHCG.js} +6 -6
- package/{mpegts-L3KBZN7J.js.map → mpegts-536UQHCG.js.map} +1 -1
- package/package.json +6 -4
- package/runtime-contract.json +15 -4
- package/runtime-map/LICENSE.maplibre.txt +116 -0
- package/runtime-map/maplibre-6.15.0-worker.mjs +10 -0
- package/sdk.d.mts +33 -6
- package/sdk.js +10 -8
- package/sdk.js.map +1 -1
- package/server.d.mts +3 -3
- package/{txError-CJDsAoqw.d.mts → txError-CjQVWypm.d.mts} +1 -1
- package/{types-BolUPLIE.d.mts → types-kDMLRchJ.d.mts} +148 -2
- package/ui.d.mts +74 -2
- package/ui.js +1 -1
- package/chunk-PLIQ3EPB.js.map +0 -1
- package/chunk-PZX6PEW4.js.map +0 -1
- package/chunk-Z5OBYOB2.js.map +0 -1
package/README.md
CHANGED
|
@@ -4,11 +4,9 @@ Generated from `flap-vault-ui-template`.
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
7
|
This package is the shared runtime surface that local preview, Artifact Workbench, and `flap.sh` should agree on.
|
|
10
8
|
|
|
11
|
-
Package version: `0.1.
|
|
9
|
+
Package version: `0.1.44-next.0`. Source commit: `73389f0d53c53433cfb5ac6cf6c1ec0022e21dde`.
|
|
12
10
|
|
|
13
11
|
## Exports
|
|
14
12
|
|
|
@@ -19,6 +17,13 @@ Package version: `0.1.42`. Source commit: `686934578ec40aec418484e7c1dac1f6782d5
|
|
|
19
17
|
|
|
20
18
|
See `runtime-contract.json` for the machine-readable subpath contract.
|
|
21
19
|
|
|
20
|
+
## Presale quote approvals
|
|
21
|
+
|
|
22
|
+
Standalone Mini Apps can use `sdk.approveQuote({ pool, amount })` with a genuine
|
|
23
|
+
Launcher handle under a reviewed `walletContracts[].presaleApproval` policy.
|
|
24
|
+
The host must provision the policy to resolve and authorize the pool's ERC20 quote
|
|
25
|
+
token. This feature is advertised by `sdkFeatures.presaleApproval = 1`.
|
|
26
|
+
|
|
22
27
|
## Mini App subroutes
|
|
23
28
|
|
|
24
29
|
Standalone Mini Apps use `useMiniAppRouter()` from `./sdk`. It returns
|
|
@@ -33,37 +38,48 @@ identify the feature. Hosts inject a `router` into `MiniAppRuntimeProvider`;
|
|
|
33
38
|
explicitly if the host has not enabled routing. Deploy supporting hosts before
|
|
34
39
|
accepting new route-dependent artifacts; source-package provenance is unchanged.
|
|
35
40
|
|
|
41
|
+
## Street maps
|
|
42
|
+
|
|
43
|
+
The `./ui` export `FlapStreetMap` requires `mapCapabilities: ["street-map-v1"]` and `uiFeatures.streetMap = 1`. Enhanced map artifacts also require the immutable `STREET_MAP_PRESENTATION_V1 = 1` UI export and `uiFeatures.streetMapPresentation = 1`; Workbench records this requirement so older hosts stop before importing an unsupported artifact. Existing basic map artifacts remain compatible. Hosts copy the packaged `runtime-map/maplibre-6.15.0-worker.mjs` to the exact same-origin path `/runtime-map/maplibre-6.15.0-worker.mjs`. The fixed MapLibre 6.15.0 engine is lazy bundled; there is no CDN loader, arbitrary style/URL/Worker/HTML API or automatic GPS request. The component supports four rarity colors (optional bounded hex palette), gray cooldown/expiry states, city bubbles through zoom 7.2, store labels above zoom 10.5, separate event points/countdowns, selection, a React details slot, a pulsing user marker and a range circle in meters. Navigation/metric scale are opt-in. Pass existing GPS coordinates, localized control labels and a list fallback. Timestamps are epoch milliseconds; client distance/range/time are display estimates, never claim authorization. Points are capped at 2000, zoom at 3..18, radius at 100000 meters. Fixed OpenFreeMap dark resources are requested without credentials; the provider sees the client IP and viewport. This direct-resource policy does not isolate redirects or guarantee upstream availability. WebGL2/Worker failure and a 15-second startup timeout show the fallback. Map-owned canvas/listeners/observers/clock are released on unmount; MapLibre retains its page-wide shared pool, capped at two Workers, for reuse. Preserve the package Worker license and fixed attribution links. Old UI remains compatible; deployed 0.1.39 hosts do not gain this testing feature. See template docs/street-map.md and docs/street-map.zh-CN.md.
|
|
44
|
+
|
|
45
|
+
## Location and motion sensors
|
|
46
|
+
|
|
47
|
+
This release adds `useGeolocation()`, `useDeviceMotion()` and
|
|
48
|
+
`useDeviceOrientation()` to `./sdk`, with `DEVICE_SENSORS_VERSION = 1`
|
|
49
|
+
and `sdkFeatures.deviceSensors = 1`. Declare only the channels used in
|
|
50
|
+
`manifest.deviceCapabilities`: `location`, `motion`, `orientation`.
|
|
51
|
+
Vault UI can also use `useFlapSdk().device`; standalone Mini Apps can use
|
|
52
|
+
`useMiniAppSdk().device`. Each channel provides `getSnapshot()`,
|
|
53
|
+
`subscribe(listener)`, `request(options?)` and `stop()`.
|
|
54
|
+
|
|
55
|
+
Call `request()` directly from a user click. Mounting or subscribing never
|
|
56
|
+
requests permission or starts collection. Permission and actual data are
|
|
57
|
+
separate: use readings only after `status === "active"` and non-null data.
|
|
58
|
+
Handle refusal, unsupported/insecure environments, policy restrictions,
|
|
59
|
+
timeout, missing data and background pauses with usable click/touch/manual
|
|
60
|
+
fallbacks. Location is a system estimate; inspect accuracy and timestamp.
|
|
61
|
+
|
|
62
|
+
The `./host` entry exports `createBrowserDeviceSensors` and
|
|
63
|
+
`createMockDeviceSensors`; providers accept a host-owned `deviceSensors`
|
|
64
|
+
adapter and scope it to the declaration. Mock values are explicitly marked.
|
|
65
|
+
Components cannot create adapters or call raw browser permission APIs.
|
|
66
|
+
Old manifests without device declarations retain their behavior and do not
|
|
67
|
+
request permissions. Phone and wallet support still requires real-device tests.
|
|
68
|
+
|
|
69
|
+
This package is an explicit next-channel testing release. Install its exact version; stable latest and deployed hosts are not upgraded by this publication.
|
|
70
|
+
|
|
71
|
+
|
|
36
72
|
## FSI queries
|
|
37
73
|
|
|
38
|
-
Declare
|
|
39
|
-
`sdk.readFsi(relativePath, params)
|
|
40
|
-
`https://
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
and synchronize the Workbench source checker before accepting those packages.
|
|
48
|
-
|
|
49
|
-
## Transaction confirmation
|
|
50
|
-
|
|
51
|
-
`waitForTx(hash)` polls the original transaction hash through the public client selected for that operation. It queries immediately, then every 2 seconds after a pending or transient-error response, with an 8-second deadline per query and a 180-second total deadline. It returns the original success/reverted status; applications must check `status === "success"` before showing success or refreshing as successful. A timeout means the result is unknown: retain the hash and reconcile it before offering another transaction. Polling does not follow sped-up or cancelled replacement transactions; the original hash can time out. The public API and receipt fields remain compatible.
|
|
52
|
-
|
|
53
|
-
## taxed.fun source-checker compatibility
|
|
54
|
-
|
|
55
|
-
The official template source for stable `0.1.40` adds reviewed native-fetch
|
|
56
|
-
queries on every valid strict `taxed.fun` subdomain, including multi-level
|
|
57
|
-
subdomains. Hosts and paths must stay literal, query values must use the global
|
|
58
|
-
`encodeURIComponent`, and manifest endpoint declarations and safe GET options
|
|
59
|
-
remain required. The apex domain, dynamic hosts/paths and unsafe options do not
|
|
60
|
-
gain permission. Existing `sdk.readFsi` routing and the SDK exports are unchanged.
|
|
61
|
-
|
|
62
|
-
The source checker is not shipped in this npm package. Deploy the matching
|
|
63
|
-
template and Workbench checker policies separately; upgrading this package alone
|
|
64
|
-
does not enable the new native-fetch policy or approve an endpoint.
|
|
65
|
-
See the [0.1.40 release guide](https://github.com/flap-sh/flap-vault-component-template/blob/main/docs/releases/0.1.40.md)
|
|
66
|
-
and [request policy](https://github.com/flap-sh/flap-vault-component-template/blob/main/docs/taxed-endpoints.md).
|
|
74
|
+
Declare `https://fsi.taxed.fun/fsi/v1` in `manifest.endpoints` to use
|
|
75
|
+
`sdk.readFsi(relativePath, params)` with the current FSI host. The legacy
|
|
76
|
+
`https://bsc-debug.butterfly.army/fsi/v1` prefix remains supported. Only
|
|
77
|
+
declaring the legacy prefix preserves legacy routing; declaring both selects
|
|
78
|
+
the current host regardless of array order. Failed requests never fall back
|
|
79
|
+
to the other host. Both require an exact reviewed root declaration and retain
|
|
80
|
+
the HTTPS origin, path, GET, credential and redirect restrictions.
|
|
81
|
+
Hosts and Workbench must deploy matching runtime and checker policies before
|
|
82
|
+
accepting source packages that declare the new endpoint.
|
|
67
83
|
|
|
68
84
|
## Shared Vault UI and Mini App v2
|
|
69
85
|
|