@idosgames/core 0.15.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 +67 -0
- package/dist/chunk-DE75YD5H.js +2 -0
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +1055 -118
- package/dist/index.d.ts +1055 -118
- 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,73 @@ 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
|
+
|
|
42
|
+
## [0.16.0] - 2026-09-20
|
|
43
|
+
|
|
44
|
+
The social layer became one subsystem shared by the platform and every title, so the Workshop no
|
|
45
|
+
longer carries its own copy of likes, follows and reports. Timeline was replaced by an inbox.
|
|
46
|
+
|
|
47
|
+
⚠ **Breaking.** A game that calls the removed Workshop methods stops compiling; the replacements
|
|
48
|
+
take an entity type, so the same action now works on any object, not just a publication.
|
|
49
|
+
|
|
50
|
+
### Removed
|
|
51
|
+
|
|
52
|
+
- **`client.workshop.like` / `unlike` / `favorite` / `follow` / `unfollow` / `report`** — moved to
|
|
53
|
+
`client.social`, which addresses an object by type:
|
|
54
|
+
`client.social.like("WorkshopItem", contentID)`, `client.social.follow("User", creatorUserID)`,
|
|
55
|
+
`client.social.report("WorkshopItem", contentID, "Broken")`.
|
|
56
|
+
- Types that belonged to those methods: `WorkshopReactionKind`, `WorkshopReportReason`,
|
|
57
|
+
`WorkshopReactionResponse`, `WorkshopFollowResponse`, `WorkshopReportResponse`. The social
|
|
58
|
+
equivalents are `SocialReactionKind`, `SocialReportReason`, `SocialReactionView`,
|
|
59
|
+
`SocialActorPage`, `SocialReportResponse`.
|
|
60
|
+
- **`TimelineEventType`, `TimelineResponse`, `SocialTimelineEvent`** and the cached
|
|
61
|
+
`UserData.Social.Timeline` — the timeline is now an inbox (below). The event
|
|
62
|
+
`social:timelineLoaded` became `social:inboxLoaded`; `workshop:reacted` is gone.
|
|
63
|
+
|
|
64
|
+
### Added
|
|
65
|
+
|
|
66
|
+
- **Inbox instead of a timeline**: `client.social.getInbox()`, `getInboxUnread()`,
|
|
67
|
+
`markInboxSeen()`. Unread is counted from a "seen up to" mark held by the server, not from a
|
|
68
|
+
counter other people increment in your document. New events: `social:inboxLoaded`,
|
|
69
|
+
`social:inboxBadge`.
|
|
70
|
+
- **Reactions, comments and reports on any object** (`SocialEntityType`: `User`, `Channel`, `Title`,
|
|
71
|
+
`WorkshopItem`, `Post`, `Comment`): `like` / `unlike` / `favorite` / `unfavorite`,
|
|
72
|
+
`addComment` / `editComment` / `deleteComment` / `getComments`, `report`, plus `getMyReactions`
|
|
73
|
+
and `getEntityStates` for showing what the player already did. Events `social:entityStateChanged`,
|
|
74
|
+
`social:commentAdded`, `social:commentEdited`, `social:commentDeleted`, `social:reported`.
|
|
75
|
+
- **Follows and blocks on the same addressing**: `follow` / `unfollow` / `block` / `unblock`,
|
|
76
|
+
`getFollowers` / `getFollowing` / `getBlocked` with a `SocialCursor`.
|
|
77
|
+
- **Platform bridge**: `PlatformBridgeDefinitions` in the title configuration —
|
|
78
|
+
`PlatformProfileMode`, `PlatformFriendsMode`, `FriendSource`, and `FRIENDS_FROM_PLATFORM` (the
|
|
79
|
+
refusal a title returns when friends come from the platform account). `client.social
|
|
80
|
+
.friendRequestsAllowed()` tells the UI whether in-game friend requests exist at all.
|
|
81
|
+
- **`SocialDefinitions`** in the title configuration: comment rules for the UI (on/off, which
|
|
82
|
+
objects, text length, links). Counters, follows and reports work without it.
|
|
83
|
+
|
|
17
84
|
## [0.15.0] - 2026-09-16
|
|
18
85
|
|
|
19
86
|
### Added
|
|
@@ -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};
|