@idosgames/core 0.16.0 → 0.17.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/CHANGELOG.md +25 -0
- package/dist/chunk-DE75YD5H.js +2 -0
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/platform/index.cjs +2 -1
- package/dist/platform/index.d.cts +16 -1
- package/dist/platform/index.d.ts +16 -1
- package/dist/platform/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-MEUEUF7D.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -14,6 +14,31 @@ and this project follows [Semantic Versioning](https://semver.org/spec/v2.0.0.ht
|
|
|
14
14
|
|
|
15
15
|
## [Unreleased]
|
|
16
16
|
|
|
17
|
+
## [0.17.0] - 2026-09-23
|
|
18
|
+
|
|
19
|
+
A game on the SDK can now hand idosgames.com a frame of itself for the site's **Shot** button
|
|
20
|
+
("take a shot and share"). The request comes from the parent page, so the same release gives every
|
|
21
|
+
game↔site bridge ONE list of platform origins instead of a copy per bridge.
|
|
22
|
+
|
|
23
|
+
### Added
|
|
24
|
+
|
|
25
|
+
- **`PLATFORM_ORIGINS`** and **`isPlatformParentOrigin(origin)`** — the origins of the platform's
|
|
26
|
+
own pages, checked by every bridge a game exposes to its parent (push, wallet, the new screenshot
|
|
27
|
+
responder in `@idosgames/app-shell`). The push bridge and the wallet's frame guard used to carry
|
|
28
|
+
their own copies; they now read this one, with unchanged behaviour.
|
|
29
|
+
`isPlatformParentOrigin` also accepts a `localhost` parent, but **only while the game itself is
|
|
30
|
+
served from localhost** — a shipped build on `{id}.idos.games` answers nothing except the real
|
|
31
|
+
site, so a page on the player's own machine cannot ask it for anything. The wallet keeps checking
|
|
32
|
+
`PLATFORM_ORIGINS` directly and does not gain the local allowance.
|
|
33
|
+
|
|
34
|
+
### Removed
|
|
35
|
+
|
|
36
|
+
- **`PlatformBridgeDefinitions.AllowShowTitlesPlayed` / `AllowShowWorkshopWorks`** (config section
|
|
37
|
+
`PlatformBridge`) — the publisher no longer decides what a player may show about themselves on
|
|
38
|
+
idosgames.com. The "Uses" and "Workshop" tabs of a public profile are shown by default; the player
|
|
39
|
+
alone can hide them, in their profile settings on the site. Nothing to do in a game client: these
|
|
40
|
+
fields were never read there, and the server ignores them if an old config still carries them.
|
|
41
|
+
|
|
17
42
|
## [0.16.0] - 2026-09-20
|
|
18
43
|
|
|
19
44
|
The social layer became one subsystem shared by the platform and every title, so the Workshop no
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var o=class{getString(e){if(typeof localStorage>"u")return null;try{return localStorage.getItem(e)}catch{return null}}setString(e,r){if(!(typeof localStorage>"u"))try{localStorage.setItem(e,r);}catch{}}remove(e){if(!(typeof localStorage>"u"))try{localStorage.removeItem(e);}catch{}}},a=class{map=new Map;getString(e){return this.map.get(e)??null}setString(e,r){this.map.set(e,r);}remove(e){this.map.delete(e);}};function n(){return globalThis.Telegram?.WebApp??null}function s(){return crypto.randomUUID()}var g="idos_device_id",i=class{storage;constructor(e=new o){this.storage=e;}getPlatform(){return n()?.platform??"Web"}getFullURL(){return typeof location<"u"?location.href:""}getStartParameter(){let e=n()?.initDataUnsafe?.start_param;return typeof e=="string"?e:null}getReferrer(){if(typeof document>"u")return null;let e=document.referrer;return e&&e.length>0?e:null}getTelegramInitDataRaw(){let e=n()?.initData;return e&&e.length>0?e:null}getDeviceID(){let e=this.storage.getString(g);return e||(e=s(),this.storage.setString(g,e)),e}getDeviceModel(){return typeof navigator<"u"&&navigator.userAgent?navigator.userAgent:"Web"}shareLink(e){let r=n();if(r?.openTelegramLink){r.openTelegramLink(e);return}typeof window<"u"&&window.open(e,"_blank");}openInvoice(e){let r=n();if(r?.openInvoice){r.openInvoice(e);return}typeof window<"u"&&window.open(e,"_blank");}async showAd(e){let r=globalThis;typeof r.showAd=="function"&&await r.showAd(e);}async copyToClipboard(e){typeof navigator<"u"&&navigator.clipboard&&await navigator.clipboard.writeText(e);}};var p="idos_device_id",l=class{storage;constructor(e=new a){this.storage=e;}getPlatform(){return "Web"}getFullURL(){return ""}getStartParameter(){return null}getTelegramInitDataRaw(){return null}getDeviceID(){let e=this.storage.getString(p);return e||(e="noop-device",this.storage.setString(p,e)),e}getDeviceModel(){return "Noop"}shareLink(){}openInvoice(){}async showAd(){}async copyToClipboard(){}};var u=["https://idosgames.com","https://www.idosgames.com"];function m(t){return t==="localhost"||t==="127.0.0.1"||t==="[::1]"||t.endsWith(".localhost")}function f(t){if(u.includes(t))return true;if(typeof window>"u"||!m(window.location.hostname))return false;try{return m(new URL(t).hostname)}catch{return false}}
|
|
2
|
+
export{o as a,a as b,n as c,s as d,i as e,u as f,f as g,l as h};
|