@indiegems/gem-web-sdk 16.2.0 → 16.3.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.
@@ -2,7 +2,7 @@
2
2
  "schema_version": 2,
3
3
  "source": {
4
4
  "repo": "IndieGems/gem-web-sdk",
5
- "version": "16.2.0"
5
+ "version": "16.3.1"
6
6
  },
7
7
  "entries": [
8
8
  {
@@ -77,6 +77,10 @@
77
77
  "key": "store",
78
78
  "title": "The Arcade Store, for real money"
79
79
  },
80
+ {
81
+ "key": "branding",
82
+ "title": "The platform branding: logo, wordmark, currency marks"
83
+ },
80
84
  {
81
85
  "key": "vibration",
82
86
  "title": "Vibrating the device"
@@ -5508,7 +5512,7 @@
5508
5512
  "group": "store",
5509
5513
  "signature": "interface StoreApi",
5510
5514
  "documented": true,
5511
- "summary": "**Real money.** The Arcade Store's own Gem packs, Boosts, passes and bundles,\nbought with the player's money through the arcade's own purchase sheet.\n`gem.store` is one of these. To spend Gems or Coins on your game's own items,\nuse `gem.purchases`.",
5515
+ "summary": "**Real money.** The Arcade Store's own Gem packs, Boosts, passes and bundles,\nbought with the player's money through the Arcade Store's own checkout.\n`gem.store` is one of these. To spend Gems or Coins on your game's own items,\nuse `gem.purchases`.",
5512
5516
  "deprecated": null,
5513
5517
  "params": [],
5514
5518
  "returns": null,
@@ -5556,7 +5560,7 @@
5556
5560
  "group": "store",
5557
5561
  "signature": "purchase(skuId: string): Promise<ArcadeOutcome>",
5558
5562
  "documented": true,
5559
- "summary": "Ask the arcade to open its store's purchase sheet for one SKU from\n[StoreApi.offers](api-reference-game.md#storeapi-offers). **Call it from the player's press handler** — the\narcade refuses an ask no person pressed for, `declined` / `busy`.\n\n- `ok` — the player paid. Re-read balances and inventory through `gem.me`;\n nothing here carries an amount. With `reason: 'pending'`, the provider\n has not settled yet: [StoreApi.onSettled](api-reference-game.md#storeapi-onsettled) hears when it does.\n- `declined` — nothing was bought: `cancelled` (the player said no) or\n `busy`. Return to your screen silently, and do not ask again unprompted.\n- `unavailable` with `store_off`, `sign_in_required`, `not_found`,\n `unsupported`, `invalid_argument` or a payment provider's failure code —\n nothing was bought.\n- `unavailable` / `error` — **the outcome is unknown, and the player may\n have paid.** It is what you get when the bridge closes while the sheet\n is open, or the arcade has no reliable answer. Never tell the player\n nothing was bought: re-read balances and inventory through `gem.me`,\n and keep listening with [StoreApi.onSettled](api-reference-game.md#storeapi-onsettled).\n\nNO TIMEOUT: it waits for as long as the arcade is connected, because a\npayment takes as long as it takes.",
5563
+ "summary": "Ask the arcade to open checkout for one SKU from [StoreApi.offers](api-reference-game.md#storeapi-offers):\nthe payment provider's page on the web, the app store's purchase sheet in\nthe Arcade's apps, straight away, with no confirmation screen of the\narcade's own first. **Call it from the player's press handler** — the\narcade refuses an ask no person pressed for, `declined` / `busy`.\n\n- `ok` — the player paid. Re-read balances and inventory through `gem.me`;\n nothing here carries an amount. With `reason: 'pending'`, the provider\n has not settled yet: [StoreApi.onSettled](api-reference-game.md#storeapi-onsettled) hears when it does.\n- `declined` — nothing was bought: `cancelled` (the player closed the\n checkout, or the offer cannot be bought again yet) or `busy` (after a\n closed checkout the arcade refuses the next ask for a while). Return to\n your screen silently, and do not ask again unprompted.\n- `unavailable` with `store_off`, `sign_in_required`, `not_found`,\n `unsupported`, `invalid_argument` or a payment provider's failure code —\n nothing was bought.\n- `unavailable` / `error` — **the outcome is unknown, and the player may\n have paid.** It is what you get when the bridge closes while checkout\n is open, or the arcade has no reliable answer. Never tell the player\n nothing was bought: re-read balances and inventory through `gem.me`,\n and keep listening with [StoreApi.onSettled](api-reference-game.md#storeapi-onsettled).\n\nNO TIMEOUT: it waits for as long as the arcade is connected, because a\npayment takes as long as it takes.",
5560
5564
  "deprecated": null,
5561
5565
  "params": [
5562
5566
  {
@@ -6626,6 +6630,597 @@
6626
6630
  "defaultValue": null,
6627
6631
  "guides": []
6628
6632
  },
6633
+ {
6634
+ "id": "BrandingTheme",
6635
+ "name": "BrandingTheme",
6636
+ "anchor": "brandingtheme",
6637
+ "group": "branding",
6638
+ "signature": "type BrandingTheme = \"light\" | \"dark\"",
6639
+ "documented": true,
6640
+ "summary": "A theme a variant is drawn for.",
6641
+ "deprecated": null,
6642
+ "params": [],
6643
+ "returns": null,
6644
+ "throws": null,
6645
+ "example": null,
6646
+ "defaultValue": null,
6647
+ "guides": []
6648
+ },
6649
+ {
6650
+ "id": "BrandingVariant",
6651
+ "name": "BrandingVariant",
6652
+ "anchor": "brandingvariant",
6653
+ "group": "branding",
6654
+ "signature": "interface BrandingVariant",
6655
+ "documented": true,
6656
+ "summary": "One file of a [BrandingAsset](api-reference-game.md#brandingasset): a render at one size and density, a\nscalable image, or the one file of a sound or a font.",
6657
+ "deprecated": null,
6658
+ "params": [],
6659
+ "returns": null,
6660
+ "throws": null,
6661
+ "example": null,
6662
+ "defaultValue": null,
6663
+ "guides": []
6664
+ },
6665
+ {
6666
+ "id": "BrandingVariant.url",
6667
+ "name": "url",
6668
+ "anchor": "brandingvariant-url",
6669
+ "group": "branding",
6670
+ "signature": "readonly url: string",
6671
+ "documented": true,
6672
+ "summary": "The file's URL, absolute and on the platform's own host. Content-hashed,\nso a re-render is a new URL: look it up each session rather than storing\none in a save or your build.",
6673
+ "deprecated": null,
6674
+ "params": [],
6675
+ "returns": null,
6676
+ "throws": null,
6677
+ "example": null,
6678
+ "defaultValue": null,
6679
+ "guides": []
6680
+ },
6681
+ {
6682
+ "id": "BrandingVariant.type",
6683
+ "name": "type",
6684
+ "anchor": "brandingvariant-type",
6685
+ "group": "branding",
6686
+ "signature": "readonly type: string",
6687
+ "documented": true,
6688
+ "summary": "Its MIME type, such as `image/png` or `image/svg+xml`.",
6689
+ "deprecated": null,
6690
+ "params": [],
6691
+ "returns": null,
6692
+ "throws": null,
6693
+ "example": null,
6694
+ "defaultValue": null,
6695
+ "guides": []
6696
+ },
6697
+ {
6698
+ "id": "BrandingVariant.bytes",
6699
+ "name": "bytes",
6700
+ "anchor": "brandingvariant-bytes",
6701
+ "group": "branding",
6702
+ "signature": "readonly bytes: number",
6703
+ "documented": true,
6704
+ "summary": "Its size in bytes.",
6705
+ "deprecated": null,
6706
+ "params": [],
6707
+ "returns": null,
6708
+ "throws": null,
6709
+ "example": null,
6710
+ "defaultValue": null,
6711
+ "guides": []
6712
+ },
6713
+ {
6714
+ "id": "BrandingVariant.width",
6715
+ "name": "width",
6716
+ "anchor": "brandingvariant-width",
6717
+ "group": "branding",
6718
+ "signature": "readonly width?: number",
6719
+ "documented": true,
6720
+ "summary": "An image's width in pixels (an SVG's in its viewBox units).",
6721
+ "deprecated": null,
6722
+ "params": [],
6723
+ "returns": null,
6724
+ "throws": null,
6725
+ "example": null,
6726
+ "defaultValue": null,
6727
+ "guides": []
6728
+ },
6729
+ {
6730
+ "id": "BrandingVariant.height",
6731
+ "name": "height",
6732
+ "anchor": "brandingvariant-height",
6733
+ "group": "branding",
6734
+ "signature": "readonly height?: number",
6735
+ "documented": true,
6736
+ "summary": "An image's height in pixels (an SVG's in its viewBox units).",
6737
+ "deprecated": null,
6738
+ "params": [],
6739
+ "returns": null,
6740
+ "throws": null,
6741
+ "example": null,
6742
+ "defaultValue": null,
6743
+ "guides": []
6744
+ },
6745
+ {
6746
+ "id": "BrandingVariant.size",
6747
+ "name": "size",
6748
+ "anchor": "brandingvariant-size",
6749
+ "group": "branding",
6750
+ "signature": "readonly size?: number",
6751
+ "documented": true,
6752
+ "summary": "The CSS px box this render was made for, with [BrandingVariant.density](api-reference-game.md#brandingvariant-density).\nAbsent on a render meant for any box up to its width.",
6753
+ "deprecated": null,
6754
+ "params": [],
6755
+ "returns": null,
6756
+ "throws": null,
6757
+ "example": null,
6758
+ "defaultValue": null,
6759
+ "guides": []
6760
+ },
6761
+ {
6762
+ "id": "BrandingVariant.density",
6763
+ "name": "density",
6764
+ "anchor": "brandingvariant-density",
6765
+ "group": "branding",
6766
+ "signature": "readonly density?: number",
6767
+ "documented": true,
6768
+ "summary": "Device pixels per CSS px of a render made for [BrandingVariant.size](api-reference-game.md#brandingvariant-size).",
6769
+ "deprecated": null,
6770
+ "params": [],
6771
+ "returns": null,
6772
+ "throws": null,
6773
+ "example": null,
6774
+ "defaultValue": null,
6775
+ "guides": []
6776
+ },
6777
+ {
6778
+ "id": "BrandingVariant.vector",
6779
+ "name": "vector",
6780
+ "anchor": "brandingvariant-vector",
6781
+ "group": "branding",
6782
+ "signature": "readonly vector?: true",
6783
+ "documented": true,
6784
+ "summary": "`true` on a scalable image: it draws crisply at any size.",
6785
+ "deprecated": null,
6786
+ "params": [],
6787
+ "returns": null,
6788
+ "throws": null,
6789
+ "example": null,
6790
+ "defaultValue": null,
6791
+ "guides": []
6792
+ },
6793
+ {
6794
+ "id": "BrandingVariant.theme",
6795
+ "name": "theme",
6796
+ "anchor": "brandingvariant-theme",
6797
+ "group": "branding",
6798
+ "signature": "readonly theme?: BrandingTheme",
6799
+ "documented": true,
6800
+ "summary": "The one theme the file is for. Absent: either theme.",
6801
+ "deprecated": null,
6802
+ "params": [],
6803
+ "returns": null,
6804
+ "throws": null,
6805
+ "example": null,
6806
+ "defaultValue": null,
6807
+ "guides": []
6808
+ },
6809
+ {
6810
+ "id": "BrandingAsset",
6811
+ "name": "BrandingAsset",
6812
+ "anchor": "brandingasset",
6813
+ "group": "branding",
6814
+ "signature": "interface BrandingAsset",
6815
+ "documented": true,
6816
+ "summary": "One asset in the platform's branding manifest.",
6817
+ "deprecated": null,
6818
+ "params": [],
6819
+ "returns": null,
6820
+ "throws": null,
6821
+ "example": null,
6822
+ "defaultValue": null,
6823
+ "guides": []
6824
+ },
6825
+ {
6826
+ "id": "BrandingAsset.id",
6827
+ "name": "id",
6828
+ "anchor": "brandingasset-id",
6829
+ "group": "branding",
6830
+ "signature": "readonly id: string",
6831
+ "documented": true,
6832
+ "summary": "What a game asks for: `'gem-logo'`, `'gems-mark'`. Never renamed.",
6833
+ "deprecated": null,
6834
+ "params": [],
6835
+ "returns": null,
6836
+ "throws": null,
6837
+ "example": null,
6838
+ "defaultValue": null,
6839
+ "guides": []
6840
+ },
6841
+ {
6842
+ "id": "BrandingAsset.kind",
6843
+ "name": "kind",
6844
+ "anchor": "brandingasset-kind",
6845
+ "group": "branding",
6846
+ "signature": "readonly kind: string",
6847
+ "documented": true,
6848
+ "summary": "`'image'`, `'audio'` or `'font'` today. The platform may add more, so\ncompare it rather than switching on it exhaustively.",
6849
+ "deprecated": null,
6850
+ "params": [],
6851
+ "returns": null,
6852
+ "throws": null,
6853
+ "example": null,
6854
+ "defaultValue": null,
6855
+ "guides": []
6856
+ },
6857
+ {
6858
+ "id": "BrandingAsset.variants",
6859
+ "name": "variants",
6860
+ "anchor": "brandingasset-variants",
6861
+ "group": "branding",
6862
+ "signature": "readonly variants: readonly BrandingVariant[]",
6863
+ "documented": true,
6864
+ "summary": "Every file of it, smallest first. Never empty.",
6865
+ "deprecated": null,
6866
+ "params": [],
6867
+ "returns": null,
6868
+ "throws": null,
6869
+ "example": null,
6870
+ "defaultValue": null,
6871
+ "guides": []
6872
+ },
6873
+ {
6874
+ "id": "BrandingLookup",
6875
+ "name": "BrandingLookup",
6876
+ "anchor": "brandinglookup",
6877
+ "group": "branding",
6878
+ "signature": "type BrandingLookup = { outcome: \"ok\"; url: string; variant: BrandingVariant; asset: BrandingAsset } | { outcome: \"not_found\" | \"unavailable\" }",
6879
+ "documented": true,
6880
+ "summary": "What a branding lookup resolves with. Only `ok` carries a URL.\n\n- `ok`: the platform has it, and `url` is the file picked for what you asked.\n- `not_found`: the manifest was read and has no asset with that id and kind,\n or none of its files fits the theme you asked for. Draw nothing for it.\n- `unavailable`: the manifest could not be read — offline, a network error,\n a Content-Security-Policy that leaves out `https://gemarcade.com`. Draw the\n copy you bundled from the package's `brand/` folder, if there is one.",
6881
+ "deprecated": null,
6882
+ "params": [],
6883
+ "returns": null,
6884
+ "throws": null,
6885
+ "example": null,
6886
+ "defaultValue": null,
6887
+ "guides": []
6888
+ },
6889
+ {
6890
+ "id": "BrandingList",
6891
+ "name": "BrandingList",
6892
+ "anchor": "brandinglist",
6893
+ "group": "branding",
6894
+ "signature": "type BrandingList = { outcome: \"ok\"; assets: readonly BrandingAsset[] } | { outcome: \"unavailable\" }",
6895
+ "documented": true,
6896
+ "summary": "What [BrandingApi.list](api-reference-game.md#brandingapi-list) resolves with.",
6897
+ "deprecated": null,
6898
+ "params": [],
6899
+ "returns": null,
6900
+ "throws": null,
6901
+ "example": null,
6902
+ "defaultValue": null,
6903
+ "guides": []
6904
+ },
6905
+ {
6906
+ "id": "BrandingImageOptions",
6907
+ "name": "BrandingImageOptions",
6908
+ "anchor": "brandingimageoptions",
6909
+ "group": "branding",
6910
+ "signature": "interface BrandingImageOptions",
6911
+ "documented": true,
6912
+ "summary": "How to pick one image from an asset's variants.",
6913
+ "deprecated": null,
6914
+ "params": [],
6915
+ "returns": null,
6916
+ "throws": null,
6917
+ "example": null,
6918
+ "defaultValue": null,
6919
+ "guides": []
6920
+ },
6921
+ {
6922
+ "id": "BrandingImageOptions.size",
6923
+ "name": "size",
6924
+ "anchor": "brandingimageoptions-size",
6925
+ "group": "branding",
6926
+ "signature": "readonly size?: number",
6927
+ "documented": true,
6928
+ "summary": "The CSS px box you draw it in. A render made for exactly that box wins;\nthen a scalable image; then the narrowest render wide enough for\n`size × density`. Leave it out for the largest: the scalable image, or\nelse the widest render.",
6929
+ "deprecated": null,
6930
+ "params": [],
6931
+ "returns": null,
6932
+ "throws": null,
6933
+ "example": null,
6934
+ "defaultValue": null,
6935
+ "guides": []
6936
+ },
6937
+ {
6938
+ "id": "BrandingImageOptions.density",
6939
+ "name": "density",
6940
+ "anchor": "brandingimageoptions-density",
6941
+ "group": "branding",
6942
+ "signature": "readonly density?: number",
6943
+ "documented": true,
6944
+ "summary": "Device pixels per CSS px. Defaults to the screen's `devicePixelRatio`;\npass `3` for a canvas or texture you scale down yourself.",
6945
+ "deprecated": null,
6946
+ "params": [],
6947
+ "returns": null,
6948
+ "throws": null,
6949
+ "example": null,
6950
+ "defaultValue": null,
6951
+ "guides": []
6952
+ },
6953
+ {
6954
+ "id": "BrandingImageOptions.theme",
6955
+ "name": "theme",
6956
+ "anchor": "brandingimageoptions-theme",
6957
+ "group": "branding",
6958
+ "signature": "readonly theme?: BrandingTheme",
6959
+ "documented": true,
6960
+ "summary": "Prefer a file drawn for this theme. Files for the other theme are never picked.",
6961
+ "deprecated": null,
6962
+ "params": [],
6963
+ "returns": null,
6964
+ "throws": null,
6965
+ "example": null,
6966
+ "defaultValue": null,
6967
+ "guides": []
6968
+ },
6969
+ {
6970
+ "id": "BrandingAssetOptions",
6971
+ "name": "BrandingAssetOptions",
6972
+ "anchor": "brandingassetoptions",
6973
+ "group": "branding",
6974
+ "signature": "interface BrandingAssetOptions",
6975
+ "documented": true,
6976
+ "summary": "What [BrandingApi.get](api-reference-game.md#brandingapi-get) takes: the asset's kind, and how to pick a file.",
6977
+ "deprecated": null,
6978
+ "params": [],
6979
+ "returns": null,
6980
+ "throws": null,
6981
+ "example": null,
6982
+ "defaultValue": null,
6983
+ "guides": []
6984
+ },
6985
+ {
6986
+ "id": "BrandingAssetOptions.size",
6987
+ "name": "size",
6988
+ "anchor": "brandingassetoptions-size",
6989
+ "group": "branding",
6990
+ "signature": "readonly size?: number",
6991
+ "documented": true,
6992
+ "summary": "The CSS px box you draw it in. A render made for exactly that box wins;\nthen a scalable image; then the narrowest render wide enough for\n`size × density`. Leave it out for the largest: the scalable image, or\nelse the widest render.",
6993
+ "deprecated": null,
6994
+ "params": [],
6995
+ "returns": null,
6996
+ "throws": null,
6997
+ "example": null,
6998
+ "defaultValue": null,
6999
+ "guides": []
7000
+ },
7001
+ {
7002
+ "id": "BrandingAssetOptions.density",
7003
+ "name": "density",
7004
+ "anchor": "brandingassetoptions-density",
7005
+ "group": "branding",
7006
+ "signature": "readonly density?: number",
7007
+ "documented": true,
7008
+ "summary": "Device pixels per CSS px. Defaults to the screen's `devicePixelRatio`;\npass `3` for a canvas or texture you scale down yourself.",
7009
+ "deprecated": null,
7010
+ "params": [],
7011
+ "returns": null,
7012
+ "throws": null,
7013
+ "example": null,
7014
+ "defaultValue": null,
7015
+ "guides": []
7016
+ },
7017
+ {
7018
+ "id": "BrandingAssetOptions.theme",
7019
+ "name": "theme",
7020
+ "anchor": "brandingassetoptions-theme",
7021
+ "group": "branding",
7022
+ "signature": "readonly theme?: BrandingTheme",
7023
+ "documented": true,
7024
+ "summary": "Prefer a file drawn for this theme. Files for the other theme are never picked.",
7025
+ "deprecated": null,
7026
+ "params": [],
7027
+ "returns": null,
7028
+ "throws": null,
7029
+ "example": null,
7030
+ "defaultValue": null,
7031
+ "guides": []
7032
+ },
7033
+ {
7034
+ "id": "BrandingAssetOptions.kind",
7035
+ "name": "kind",
7036
+ "anchor": "brandingassetoptions-kind",
7037
+ "group": "branding",
7038
+ "signature": "readonly kind: string",
7039
+ "documented": true,
7040
+ "summary": "The kind you expect: `'image'`, `'audio'` or `'font'`. An asset of another\nkind answers `not_found`. `size` and `density` apply to images only; for\nany other kind the first file wins.",
7041
+ "deprecated": null,
7042
+ "params": [],
7043
+ "returns": null,
7044
+ "throws": null,
7045
+ "example": null,
7046
+ "defaultValue": null,
7047
+ "guides": []
7048
+ },
7049
+ {
7050
+ "id": "BrandingCurrency",
7051
+ "name": "BrandingCurrency",
7052
+ "anchor": "brandingcurrency",
7053
+ "group": "branding",
7054
+ "signature": "type BrandingCurrency = \"GEMS\" | \"ARCADE_TICKETS\"",
7055
+ "documented": true,
7056
+ "summary": "The platform currencies with a mark: Gems and Coins.",
7057
+ "deprecated": null,
7058
+ "params": [],
7059
+ "returns": null,
7060
+ "throws": null,
7061
+ "example": null,
7062
+ "defaultValue": null,
7063
+ "guides": []
7064
+ },
7065
+ {
7066
+ "id": "BrandingApi",
7067
+ "name": "BrandingApi",
7068
+ "anchor": "brandingapi",
7069
+ "group": "branding",
7070
+ "signature": "interface BrandingApi",
7071
+ "documented": true,
7072
+ "summary": "The platform's branding, as the platform serves it now. `gem.branding` is\none of these. Nothing here rejects but a bad argument.",
7073
+ "deprecated": null,
7074
+ "params": [],
7075
+ "returns": null,
7076
+ "throws": null,
7077
+ "example": null,
7078
+ "defaultValue": null,
7079
+ "guides": []
7080
+ },
7081
+ {
7082
+ "id": "BrandingApi.get",
7083
+ "name": "get",
7084
+ "anchor": "brandingapi-get",
7085
+ "group": "branding",
7086
+ "signature": "get(id: string, options: BrandingAssetOptions): Promise<BrandingLookup>",
7087
+ "documented": true,
7088
+ "summary": "Any asset in the platform's branding manifest, by id and kind — including\nones added after this SDK was released.\n\n```js\nconst logo = await gem.branding.get('gem-logo', { kind: 'image', size: 64 });\nif (logo.outcome === 'ok') img.src = logo.url;\n```",
7089
+ "deprecated": null,
7090
+ "params": [
7091
+ {
7092
+ "name": "id",
7093
+ "type": "string",
7094
+ "optional": false,
7095
+ "summary": null
7096
+ },
7097
+ {
7098
+ "name": "options",
7099
+ "type": "BrandingAssetOptions",
7100
+ "optional": false,
7101
+ "summary": null
7102
+ }
7103
+ ],
7104
+ "returns": "Resolves `ok`, `not_found` or `unavailable`. Rejects only for an\n argument that is not one (an empty id, a size that is not a positive\n number).",
7105
+ "throws": null,
7106
+ "example": null,
7107
+ "defaultValue": null,
7108
+ "guides": []
7109
+ },
7110
+ {
7111
+ "id": "BrandingApi.logo",
7112
+ "name": "logo",
7113
+ "anchor": "brandingapi-logo",
7114
+ "group": "branding",
7115
+ "signature": "logo(options?: BrandingImageOptions): Promise<BrandingLookup>",
7116
+ "documented": true,
7117
+ "summary": "The Indie Gems logo, the brand gem. Scalable: draw it at 32 CSS px or more,\nas served (`docs/branding.md` has the usage rules).",
7118
+ "deprecated": null,
7119
+ "params": [
7120
+ {
7121
+ "name": "options",
7122
+ "type": "BrandingImageOptions",
7123
+ "optional": true,
7124
+ "summary": null
7125
+ }
7126
+ ],
7127
+ "returns": null,
7128
+ "throws": null,
7129
+ "example": null,
7130
+ "defaultValue": null,
7131
+ "guides": []
7132
+ },
7133
+ {
7134
+ "id": "BrandingApi.wordmark",
7135
+ "name": "wordmark",
7136
+ "anchor": "brandingapi-wordmark",
7137
+ "group": "branding",
7138
+ "signature": "wordmark(options?: BrandingImageOptions): Promise<BrandingLookup>",
7139
+ "documented": true,
7140
+ "summary": "The Gem Arcade wordmark. Draw it at 60 CSS px wide or more, as served.",
7141
+ "deprecated": null,
7142
+ "params": [
7143
+ {
7144
+ "name": "options",
7145
+ "type": "BrandingImageOptions",
7146
+ "optional": true,
7147
+ "summary": null
7148
+ }
7149
+ ],
7150
+ "returns": null,
7151
+ "throws": null,
7152
+ "example": null,
7153
+ "defaultValue": null,
7154
+ "guides": []
7155
+ },
7156
+ {
7157
+ "id": "BrandingApi.currencyMark",
7158
+ "name": "currencyMark",
7159
+ "anchor": "brandingapi-currencymark",
7160
+ "group": "branding",
7161
+ "signature": "currencyMark(currency: BrandingCurrency, options?: BrandingImageOptions): Promise<BrandingLookup>",
7162
+ "documented": true,
7163
+ "summary": "The mark of a platform currency, by its slug: `'GEMS'` or\n`'ARCADE_TICKETS'` (Coins). Pass `size: 20` or `32` for the inline icon\nbeside an amount, or leave it out for the hero art of a reward screen.\n`docs/brand-art.md` says where each may be drawn.",
7164
+ "deprecated": null,
7165
+ "params": [
7166
+ {
7167
+ "name": "currency",
7168
+ "type": "BrandingCurrency",
7169
+ "optional": false,
7170
+ "summary": null
7171
+ },
7172
+ {
7173
+ "name": "options",
7174
+ "type": "BrandingImageOptions",
7175
+ "optional": true,
7176
+ "summary": null
7177
+ }
7178
+ ],
7179
+ "returns": null,
7180
+ "throws": null,
7181
+ "example": null,
7182
+ "defaultValue": null,
7183
+ "guides": []
7184
+ },
7185
+ {
7186
+ "id": "BrandingApi.trophy",
7187
+ "name": "trophy",
7188
+ "anchor": "brandingapi-trophy",
7189
+ "group": "branding",
7190
+ "signature": "trophy(options?: BrandingImageOptions): Promise<BrandingLookup>",
7191
+ "documented": true,
7192
+ "summary": "The trophy, for where your game shows what a player has achieved.",
7193
+ "deprecated": null,
7194
+ "params": [
7195
+ {
7196
+ "name": "options",
7197
+ "type": "BrandingImageOptions",
7198
+ "optional": true,
7199
+ "summary": null
7200
+ }
7201
+ ],
7202
+ "returns": null,
7203
+ "throws": null,
7204
+ "example": null,
7205
+ "defaultValue": null,
7206
+ "guides": []
7207
+ },
7208
+ {
7209
+ "id": "BrandingApi.list",
7210
+ "name": "list",
7211
+ "anchor": "brandingapi-list",
7212
+ "group": "branding",
7213
+ "signature": "list(): Promise<BrandingList>",
7214
+ "documented": true,
7215
+ "summary": "Every asset the platform serves, or `unavailable` when the manifest could\nnot be read.",
7216
+ "deprecated": null,
7217
+ "params": [],
7218
+ "returns": null,
7219
+ "throws": null,
7220
+ "example": null,
7221
+ "defaultValue": null,
7222
+ "guides": []
7223
+ },
6629
7224
  {
6630
7225
  "id": "ListChallengesOptions",
6631
7226
  "name": "ListChallengesOptions",
@@ -11432,7 +12027,7 @@
11432
12027
  "group": "player",
11433
12028
  "signature": "readonly reserved: readonly GemReservedArea[]",
11434
12029
  "documented": true,
11435
- "summary": "Rectangles of your frame the arcade's own controls cover — in the Gem\nArcade, its Gem button in whichever corner it sits, and the frame-rate readout\nbeside it while the player shows it; an embedder that draws wallets over\nyour game adds theirs (see `setWalletVisible`). Keep essential UI and touch\ntargets out of them. Empty when the arcade covers nothing.\n\nEach is a keep-out area, grown out to the frame edges it sits nearest — not\nthe control's own box, and not something to line anything up with. Where\nthe arcade says, `control` on each is the control itself.\n\nA stylesheet reads the per-corner custom properties the SDK stamps from\nthese instead — `--gem-reserved-tl-height` and friends, and\n`--gem-reserved-tl-center-y` to line a top bar up with the Gem.",
12030
+ "summary": "Rectangles of your frame the arcade's own controls cover — in the Gem\nArcade, its Gem button in whichever corner it sits, the frame-rate readout\nbeside it while the player shows it, and the wallets beside it while your\ngame asks for them (see `setWalletVisible`). Keep essential UI and touch\ntargets out of them. Empty when the arcade covers nothing.\n\nEach is a keep-out area, grown out to the frame edges it sits nearest — not\nthe control's own box, and not something to line anything up with. Where\nthe arcade says, `control` on each is the control itself.\n\nA stylesheet reads the per-corner custom properties the SDK stamps from\nthese instead — `--gem-reserved-tl-height` and friends, and\n`--gem-reserved-tl-center-y` to line a top bar up with the Gem.",
11436
12031
  "deprecated": null,
11437
12032
  "params": [],
11438
12033
  "returns": null,
@@ -11640,7 +12235,7 @@
11640
12235
  "group": "platform",
11641
12236
  "signature": "readonly only?: readonly string[]",
11642
12237
  "documented": true,
11643
- "summary": "While shown, show ONLY these: platform currency slugs as\n`gem.platform.currencies.get()` lists them (`GEMS`, `ARCADE_TICKETS`),\nmatched exactly, and the literal `'score'` for the achievement score. Only\nfor a screen about one currency, such as a Coins store; leave it out and\nevery wallet shows, which is always safe. The Gem Arcade draws no wallet\nover a game, so it has nothing to narrow and ignores it.",
12238
+ "summary": "While shown, show ONLY these: platform currency slugs as\n`gem.platform.currencies.get()` lists them (`GEMS`, `ARCADE_TICKETS`),\nmatched exactly, and the literal `'score'` for the achievement score. Leave\nit out and every wallet shows, the achievement score's included. The Gem\nArcade honours it: `{ only: ['GEMS', 'ARCADE_TICKETS'] }` shows those two\nand no achievement score; a slug the platform does not serve names nothing.",
11644
12239
  "deprecated": null,
11645
12240
  "params": [],
11646
12241
  "returns": null,
@@ -11720,7 +12315,7 @@
11720
12315
  "group": "frame",
11721
12316
  "signature": "interface GameMenu",
11722
12317
  "documented": true,
11723
- "summary": "What your game adds to the arcade's menu — see `gem.setMenu`. Your settings\nare not part of it: they open from your own settings button.",
12318
+ "summary": "What your game adds to the arcade's menu — see `gem.setMenu`. Your settings\nscreen is not part of it: it opens from your own settings button. An action\non that screen (Replay the tutorial, How to play) may also be an entry here.",
11724
12319
  "deprecated": null,
11725
12320
  "params": [],
11726
12321
  "returns": null,
@@ -12209,6 +12804,27 @@
12209
12804
  }
12210
12805
  ]
12211
12806
  },
12807
+ {
12808
+ "id": "Gem.branding",
12809
+ "name": "branding",
12810
+ "anchor": "gem-branding",
12811
+ "group": "start",
12812
+ "signature": "readonly branding: BrandingApi",
12813
+ "documented": true,
12814
+ "summary": "The platform's branding — the Indie Gems logo, the Gem Arcade wordmark,\nthe Gems and Coins marks and the trophy — as the platform serves it now,\nso a changed mark reaches your game with no republish.\n\nLook up any asset by id and kind with `get`, or use `logo`, `wordmark`,\n`currencyMark` and `trophy`. Every URL is on the platform's own host.\nNothing rejects but a bad argument: an asset the platform does not list is\n`not_found`, and a manifest that could not be read is `unavailable`, when\nyou draw the copy you bundled from `brand/` instead.\n\n```js\nconst logo = await gem.branding.logo();\nif (logo.outcome === 'ok') menuLogo.src = logo.url;\n```",
12815
+ "deprecated": null,
12816
+ "params": [],
12817
+ "returns": null,
12818
+ "throws": null,
12819
+ "example": null,
12820
+ "defaultValue": null,
12821
+ "guides": [
12822
+ {
12823
+ "slug": "branding",
12824
+ "anchor": null
12825
+ }
12826
+ ]
12827
+ },
12212
12828
  {
12213
12829
  "id": "Gem.avatarPickerAvailable",
12214
12830
  "name": "avatarPickerAvailable",
@@ -12618,7 +13234,7 @@
12618
13234
  "group": "start",
12619
13235
  "signature": "cueReward(cue: RewardCue): boolean",
12620
13236
  "documented": true,
12621
- "summary": "Tell the arcade a platform-currency reward is on its way, so it **shows it\nlanding**: in the Gem Arcade the currency flies from `origin` into the Gem\nbutton, wherever on your frame it sits, which pops as each mark lands, and\nthe player's total moves once the platform confirms the grant. The Gem\nArcade draws no wallet over your game: the player sees their Gems and\nCoins in the Gem menu. A payout you do not cue still flies, from the\nmiddle of your frame, so cue the ones the player earns on screen.\n\nCall it the moment your game decides to award — when your server has moved\n(or is about to move) the progression mapped onto a platform currency —\nand pass the centre of that currency's icon (or hero) on your screen, so\nthe flight starts from the mark the player is looking at:\n\n```js\nconst { x, y, width, height } = rewardGem.getBoundingClientRect(); // the gem's own box\ngem.cueReward({\n currencySlug: 'GEMS', // or 'ARCADE_TICKETS', from the coin\n expected: 15,\n origin: { x: x + width / 2, y: y + height / 2 },\n});\n```\n\n**This is the platform-currency animation, and the only one.** The display\nof every platform currency — Gems and Coins alike — belongs to the\narcade: a game draws no flight or celebration of its own for one and keeps\nno counter of one. **If this returns `false`, do nothing** — there is no\nfallback celebration.\n\n**The arcade never takes your word for the amount.** What lands, and the\nplayer's new total, come from the platform itself; `expected` is drawn as\nprovisional, and a cue the platform never confirms fades on its own — a\ngrant clamped to zero, say, or one the receipt reports `suppressed`. So\nthe cue can only ever make the wallet move for a reward that really\nlanded — which it does on every channel, dev and test included.",
13237
+ "summary": "Tell the arcade a platform-currency reward is on its way, so it **shows it\nlanding**: in the Gem Arcade the currency flies from `origin` into the Gem\nbutton, wherever on your frame it sits, which pops as each mark lands, and\nthe player's total moves once the platform confirms the grant. The Gem\nArcade draws no wallet over your game unless you ask (`setWalletVisible`):\nthe player sees their Gems and Coins in the Gem menu. A payout you do not\ncue still flies, from the middle of your frame, so cue the ones the player\nearns on screen.\n\nCall it the moment your game decides to award — when your server has moved\n(or is about to move) the progression mapped onto a platform currency —\nand pass the centre of that currency's icon (or hero) on your screen, so\nthe flight starts from the mark the player is looking at:\n\n```js\nconst { x, y, width, height } = rewardGem.getBoundingClientRect(); // the gem's own box\ngem.cueReward({\n currencySlug: 'GEMS', // or 'ARCADE_TICKETS', from the coin\n expected: 15,\n origin: { x: x + width / 2, y: y + height / 2 },\n});\n```\n\n**This is the platform-currency animation, and the only one.** The display\nof every platform currency — Gems and Coins alike — belongs to the\narcade: a game draws no flight or celebration of its own for one and keeps\nno counter of one. **If this returns `false`, do nothing** — there is no\nfallback celebration.\n\n**The arcade never takes your word for the amount.** What lands, and the\nplayer's new total, come from the platform itself; `expected` is drawn as\nprovisional, and a cue the platform never confirms fades on its own — a\ngrant clamped to zero, say, or one the receipt reports `suppressed`. So\nthe cue can only ever make the wallet move for a reward that really\nlanded — which it does on every channel, dev and test included.",
12622
13238
  "deprecated": null,
12623
13239
  "params": [
12624
13240
  {
@@ -12641,7 +13257,7 @@
12641
13257
  "group": "start",
12642
13258
  "signature": "setWalletVisible(visible: boolean, options?: WalletVisibleOptions): boolean",
12643
13259
  "documented": true,
12644
- "summary": "Show or hide the player's wallets — Gems, Coins, the achievement score —\nthat an embedder draws over your game.\n\n**The Gem Arcade draws no wallet over a game** (since 2026-10-11): the\nplayer sees their balances in the Gem menu, and payouts fly into the Gem\nbutton. So under the Gem Arcade this changes nothing on screen — it is\naccepted and harmless, and a game that already calls it keeps working.\nCall it for an embedder that does draw wallets over your game: hide them\nwhile you play, show them on your menus.\n\n```js\nlevel.onStart = () => gem.setWalletVisible(false);\nmenu.onOpen = () => gem.setWalletVisible(true);\n```\n\n**It is screen state, not a toggle.** Each call is the whole answer and\nreplaces the last. Where an embedder draws wallets, shown ones arrive as\nrectangles in `gem.viewport.reserved` and hiding them gives that space\nback; the Gem Arcade sends none for wallets. `only` narrows what shows,\nwhere an embedder honours it; the Gem Arcade does not.\n\n**Never draw a platform balance yourself**, and never show a pending state\nfor one: the arcade takes every figure from the platform. If this returns\n`false`, do nothing in its place.",
13260
+ "summary": "Ask the arcade to show, or stop showing, the player's wallets — Gems,\nCoins, the achievement score — over your game.\n\n**The Gem Arcade draws them on request** (the owner, 2026-10-29): a game\nthat says nothing gets no wallet over it, as since 2026-10-11, and the\nplayer sees their balances in the Gem menu; a game that asks gets them\ndrawn beside the Gem, from the platform's own figures. An Arcade from\nbefore that ignores the call, harmlessly.\n\n```js\ngem.setWalletVisible(true, { only: ['GEMS', 'ARCADE_TICKETS'] }); // every screen\nlevel.onStart = () => gem.setWalletVisible(false); // or put them away during play\n```\n\n**It is screen state, not a toggle.** Each call is the whole answer and\nreplaces the last. Shown wallets arrive as rectangles in\n`gem.viewport.reserved` (and widen the Gem's corner in the\n`--gem-reserved-*` variables), and hiding them gives that space back.\n`only` narrows what shows.\n\n**Never draw a platform balance yourself**, and never show a pending state\nfor one: the arcade takes every figure from the platform. If this returns\n`false`, do nothing in its place.",
12645
13261
  "deprecated": null,
12646
13262
  "params": [
12647
13263
  {
@@ -12670,7 +13286,7 @@
12670
13286
  "group": "start",
12671
13287
  "signature": "setMenu(menu: GameMenu): boolean",
12672
13288
  "documented": true,
12673
- "summary": "Put up to four entries of your own in the arcade's menu. The arcade keeps\none menu button over your game: it is how a player leaves, mutes, goes\nfullscreen, reports a problem and changes their Arcade-wide settings.\n\n```js\ngem.setMenu({\n items: [{ id: 'how-to-play', label: t('How to play'), onSelect: () => help.open() }],\n});\n```\n\n**Your settings are not in it: draw your own settings button, always** —\ntop-right, with your Back button just to its left, clear of\n`gem.viewport.reserved`. The Arcade's menu never opens your settings\nscreen.\n\n**It is screen state, not a toggle.** Each call is the whole answer and\nreplaces the last, so call it again when the entries change — a new\nlanguage, a screen with different options. `gem.setMenu({})` takes\neverything of yours back out. The arcade's own entries are not yours to\nchange, and Return to the Arcade is always among them.\n\n**The arcade pauses your game while its menu is open** (`onPause`), and\nresumes it before a handler of yours runs. A handler opens a screen; it\nshould not assume the game was paused by you.",
13289
+ "summary": "Put up to four entries of your own in the arcade's menu. The arcade keeps\none menu button over your game: it is how a player leaves, mutes, goes\nfullscreen, reports a problem and changes their Arcade-wide settings.\n\n```js\ngem.setMenu({\n items: [{ id: 'how-to-play', label: t('How to play'), onSelect: () => help.open() }],\n});\n```\n\n**Your settings screen is not in it: draw your own settings button** —\ntop-right, with your Back button just to its left, clear of\n`gem.viewport.reserved`. The Arcade's menu never opens your settings\nscreen. Inside the Gem Arcade you may leave the button out while this\nreturns `true`, when every setting on your screen is declared with\n`gem.settings` and every action on it is one of these entries; it returns\n`false` before the bridge is up and under an embedder with no menu, and the\nbutton stays there.\n\n**It is screen state, not a toggle.** Each call is the whole answer and\nreplaces the last, so call it again when the entries change — a new\nlanguage, a screen with different options. `gem.setMenu({})` takes\neverything of yours back out. The arcade's own entries are not yours to\nchange, and Return to the Arcade is always among them.\n\n**The arcade pauses your game while its menu is open** (`onPause`), and\nresumes it before a handler of yours runs. A handler opens a screen; it\nshould not assume the game was paused by you.",
12674
13290
  "deprecated": null,
12675
13291
  "params": [
12676
13292
  {