@devvit/public-api 0.11.19-next-2025-07-21-15-41-14-f32293e0f.0 → 0.11.19-next-2025-07-21-19-03-19-96e5c7104.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.
@@ -1 +1 @@
1
- {"version":3,"file":"useWebView.d.ts","sourceRoot":"","sources":["../../../../../src/devvit/internals/blocks/handler/useWebView.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAG9D,OAAO,KAAK,EAEV,iBAAiB,EACjB,gBAAgB,EACjB,MAAM,sBAAsB,CAAC;AAmI9B;;KAEK;AACL,wBAAgB,UAAU,CAAC,IAAI,SAAS,SAAS,GAAG,SAAS,EAAE,EAAE,SAAS,SAAS,GAAG,SAAS,EAC7F,OAAO,EAAE,iBAAiB,CAAC,IAAI,EAAE,EAAE,CAAC,GACnC,gBAAgB,CAAC,EAAE,CAAC,CAUtB"}
1
+ {"version":3,"file":"useWebView.d.ts","sourceRoot":"","sources":["../../../../../src/devvit/internals/blocks/handler/useWebView.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAG9D,OAAO,KAAK,EAEV,iBAAiB,EACjB,gBAAgB,EACjB,MAAM,sBAAsB,CAAC;AAwI9B;;KAEK;AACL,wBAAgB,UAAU,CAAC,IAAI,SAAS,SAAS,GAAG,SAAS,EAAE,EAAE,SAAS,SAAS,GAAG,SAAS,EAC7F,OAAO,EAAE,iBAAiB,CAAC,IAAI,EAAE,EAAE,CAAC,GACnC,gBAAgB,CAAC,EAAE,CAAC,CAUtB"}
@@ -12,6 +12,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
12
12
  var _WebViewHook_hookId, _WebViewHook_url, _WebViewHook_onMessage, _WebViewHook_onUnmount, _WebViewHook_renderContext, _WebViewHook_invalidate, _WebViewHook_emitFullscreenEffect;
13
13
  import { EffectType } from '@devvit/protos';
14
14
  import { WebViewVisibility } from '@devvit/protos';
15
+ import { apiPathPrefix } from '@devvit/shared-types/constants.js';
15
16
  import { StringUtil } from '@devvit/shared-types/StringUtil.js';
16
17
  import { webViewMessageIsInternalAndClientScope } from '../../helpers/devvitInternalMessage.js';
17
18
  import { registerHook } from './BlocksHandler.js';
@@ -63,8 +64,14 @@ class WebViewHook {
63
64
  return;
64
65
  }
65
66
  const assets = __classPrivateFieldGet(this, _WebViewHook_renderContext, "f")?.devvitContext?.assets;
67
+ let url;
68
+ if (__classPrivateFieldGet(this, _WebViewHook_url, "f").startsWith(apiPathPrefix))
69
+ url = __classPrivateFieldGet(this, _WebViewHook_url, "f");
66
70
  // Get the public URL for the asset. Returns an empty string if the asset is not found.
67
- const url = assets.getURL(__classPrivateFieldGet(this, _WebViewHook_url, "f"), { webView: true });
71
+ else {
72
+ const asset = __classPrivateFieldGet(this, _WebViewHook_url, "f").replace(/[#?].*/, '');
73
+ url = `${assets.getURL(asset, { webView: true })}${__classPrivateFieldGet(this, _WebViewHook_url, "f").slice(asset.length)}`;
74
+ }
68
75
  if (!url) {
69
76
  throw Error(`useWebView fullscreen request failed; web view asset could not be found`);
70
77
  }
package/meta.min.json CHANGED
@@ -2444,13 +2444,18 @@
2444
2444
  ],
2445
2445
  "format": "esm"
2446
2446
  },
2447
+ "../shared-types/dist/constants.js": {
2448
+ "bytes": 1203,
2449
+ "imports": [],
2450
+ "format": "esm"
2451
+ },
2447
2452
  "src/devvit/internals/helpers/devvitInternalMessage.ts": {
2448
2453
  "bytes": 931,
2449
2454
  "imports": [],
2450
2455
  "format": "esm"
2451
2456
  },
2452
2457
  "src/devvit/internals/blocks/handler/useWebView.ts": {
2453
- "bytes": 5566,
2458
+ "bytes": 5807,
2454
2459
  "imports": [
2455
2460
  {
2456
2461
  "path": "@devvit/protos",
@@ -2462,6 +2467,11 @@
2462
2467
  "kind": "import-statement",
2463
2468
  "external": true
2464
2469
  },
2470
+ {
2471
+ "path": "../shared-types/dist/constants.js",
2472
+ "kind": "import-statement",
2473
+ "original": "@devvit/shared-types/constants.js"
2474
+ },
2465
2475
  {
2466
2476
  "path": "../shared-types/dist/StringUtil.js",
2467
2477
  "kind": "import-statement",
@@ -2567,7 +2577,7 @@
2567
2577
  "imports": [],
2568
2578
  "exports": [],
2569
2579
  "inputs": {},
2570
- "bytes": 1078294
2580
+ "bytes": 1080076
2571
2581
  },
2572
2582
  "dist/public-api.min.js": {
2573
2583
  "imports": [
@@ -3127,13 +3137,16 @@
3127
3137
  "bytesInOutput": 178
3128
3138
  },
3129
3139
  "src/devvit/internals/blocks/handler/useWebView.ts": {
3130
- "bytesInOutput": 1871
3140
+ "bytesInOutput": 1985
3141
+ },
3142
+ "../shared-types/dist/constants.js": {
3143
+ "bytesInOutput": 15
3131
3144
  },
3132
3145
  "src/devvit/internals/helpers/devvitInternalMessage.ts": {
3133
3146
  "bytesInOutput": 107
3134
3147
  }
3135
3148
  },
3136
- "bytes": 222697
3149
+ "bytes": 222826
3137
3150
  }
3138
3151
  }
3139
3152
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devvit/public-api",
3
- "version": "0.11.19-next-2025-07-21-15-41-14-f32293e0f.0",
3
+ "version": "0.11.19-next-2025-07-21-19-03-19-96e5c7104.0",
4
4
  "license": "BSD-3-Clause",
5
5
  "repository": {
6
6
  "type": "git",
@@ -28,18 +28,18 @@
28
28
  },
29
29
  "types": "./index.d.ts",
30
30
  "dependencies": {
31
- "@devvit/metrics": "0.11.19-next-2025-07-21-15-41-14-f32293e0f.0",
32
- "@devvit/protos": "0.11.19-next-2025-07-21-15-41-14-f32293e0f.0",
33
- "@devvit/shared": "0.11.19-next-2025-07-21-15-41-14-f32293e0f.0",
34
- "@devvit/shared-types": "0.11.19-next-2025-07-21-15-41-14-f32293e0f.0",
31
+ "@devvit/metrics": "0.11.19-next-2025-07-21-19-03-19-96e5c7104.0",
32
+ "@devvit/protos": "0.11.19-next-2025-07-21-19-03-19-96e5c7104.0",
33
+ "@devvit/shared": "0.11.19-next-2025-07-21-19-03-19-96e5c7104.0",
34
+ "@devvit/shared-types": "0.11.19-next-2025-07-21-19-03-19-96e5c7104.0",
35
35
  "base64-js": "1.5.1",
36
36
  "clone-deep": "4.0.1",
37
37
  "moderndash": "4.0.0"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@ampproject/filesize": "4.3.0",
41
- "@devvit/repo-tools": "0.11.19-next-2025-07-21-15-41-14-f32293e0f.0",
42
- "@devvit/tsconfig": "0.11.19-next-2025-07-21-15-41-14-f32293e0f.0",
41
+ "@devvit/repo-tools": "0.11.19-next-2025-07-21-19-03-19-96e5c7104.0",
42
+ "@devvit/tsconfig": "0.11.19-next-2025-07-21-19-03-19-96e5c7104.0",
43
43
  "@reddit/faceplate-ui": "18.0.1",
44
44
  "@types/clone-deep": "4.0.1",
45
45
  "@vitest/coverage-c8": "0.32.0",
@@ -59,5 +59,5 @@
59
59
  }
60
60
  },
61
61
  "source": "./src/index.ts",
62
- "gitHead": "d427871aa25f64664aef96eacd4ae9e0339093f8"
62
+ "gitHead": "888b544c6dca3126822beb814be900a2bcf51cf4"
63
63
  }