@wvdsh/api 0.1.35 → 0.1.37

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.
@@ -24,7 +24,7 @@ export type DeviceFingerprint = {
24
24
  };
25
25
  /**
26
26
  * Default values used by Game SDKs
27
- * These values are used externally, any changes need to be reflected in the Wavedash SDKs
27
+ * Published externally in the @wvdsh/api package
28
28
  *
29
29
  * We use int values here rather than strings to speed up data marshalling in SDK calls
30
30
  */
@@ -105,6 +105,7 @@ export declare const IFRAME_MESSAGE_TYPE: {
105
105
  readonly SET_MUTE: "SetMute";
106
106
  readonly TOGGLE_MUTE: "ToggleMute";
107
107
  readonly MUTE_CHANGED: "MuteChanged";
108
+ readonly OVERLAY_CHANGED: "OverlayChanged";
108
109
  readonly GAMEPLAY_JWT_READY: "GameplayJwtReady";
109
110
  readonly END_SESSION: "EndSession";
110
111
  readonly TRIGGER_PAYWALL: "TriggerPaywall";
@@ -147,6 +148,9 @@ export type IFrameEventPayloadMap = {
147
148
  [IFRAME_MESSAGE_TYPE.MUTE_CHANGED]: {
148
149
  isMuted: boolean;
149
150
  };
151
+ [IFRAME_MESSAGE_TYPE.OVERLAY_CHANGED]: {
152
+ isOpen: boolean;
153
+ };
150
154
  [IFRAME_MESSAGE_TYPE.TAKE_FOCUS]: void;
151
155
  [IFRAME_MESSAGE_TYPE.GET_LOBBY_INVITE_LINK]: string;
152
156
  [IFRAME_MESSAGE_TYPE.GET_DEVICE_FINGERPRINT]: DeviceFingerprint;
@@ -82,6 +82,7 @@ export const IFRAME_MESSAGE_TYPE = {
82
82
  SET_MUTE: 'SetMute',
83
83
  TOGGLE_MUTE: 'ToggleMute',
84
84
  MUTE_CHANGED: 'MuteChanged',
85
+ OVERLAY_CHANGED: 'OverlayChanged',
85
86
  GAMEPLAY_JWT_READY: 'GameplayJwtReady',
86
87
  END_SESSION: 'EndSession',
87
88
  TRIGGER_PAYWALL: 'TriggerPaywall'
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Helper functions shared with external consumers via the @wvdsh/api package
3
+ */
4
+ /**
5
+ * Match `levels/level2.dat` (literal) or `skins/*` (single-segment wildcard).
6
+ * `**` matches across segments. Patterns are case-sensitive, no leading slash.
7
+ */
8
+ export declare function matchesPaidContentPattern(pattern: string, path: string): boolean;
@@ -0,0 +1,22 @@
1
+ // THIS FILE IS AUTOGENERATED — DO NOT EDIT
2
+ // Source: wavedash/src/lib/utils/sharedHelpers.ts
3
+ /**
4
+ * Helper functions shared with external consumers via the @wvdsh/api package
5
+ */
6
+ /**
7
+ * Match `levels/level2.dat` (literal) or `skins/*` (single-segment wildcard).
8
+ * `**` matches across segments. Patterns are case-sensitive, no leading slash.
9
+ */
10
+ export function matchesPaidContentPattern(pattern, path) {
11
+ if (!pattern)
12
+ return false;
13
+ if (pattern === path)
14
+ return true;
15
+ // Build a regex: escape regex chars, then expand `**` → `.*` and `*` → `[^/]*`.
16
+ const escaped = pattern.replace(/[.+^${}()|[\]\\]/g, '\\$&');
17
+ const regexSrc = escaped
18
+ .replace(/\*\*/g, '__DOUBLE_STAR__')
19
+ .replace(/\*/g, '[^/]*')
20
+ .replace(/__DOUBLE_STAR__/g, '.*');
21
+ return new RegExp(`^${regexSrc}$`).test(path);
22
+ }
package/dist/index.d.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  export * from './_generated/constants';
2
2
  export * from './_generated/convex_api';
3
+ export * from './_generated/helpers';
package/dist/index.js CHANGED
@@ -1,2 +1,3 @@
1
1
  export * from './_generated/constants';
2
2
  export * from './_generated/convex_api';
3
+ export * from './_generated/helpers';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wvdsh/api",
3
- "version": "0.1.35",
3
+ "version": "0.1.37",
4
4
  "description": "Public API types and shared constants for the Wavedash platform",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",