@ohmygame/plugin-ui 2.35.0 → 2.37.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/index.d.ts CHANGED
@@ -29,8 +29,8 @@ export type PluginUiMethod =
29
29
  | "assistant.clear";
30
30
 
31
31
  /**
32
- * An HTTPS request made by the app, for a project panel whose `panel.json`
33
- * lists the host in `net`. No cookies go along, a redirect comes back as the
32
+ * An HTTPS request made by the app, to a host the plugin's manifest lists in
33
+ * `capabilities.network`. No cookies go along, a redirect comes back as the
34
34
  * answer rather than being followed, and it gives up after 30 seconds.
35
35
  */
36
36
  export interface PluginUiFetch {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ohmygame/plugin-ui",
3
- "version": "2.35.0",
3
+ "version": "2.37.0",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
package/ui/1/floating.js CHANGED
@@ -92,6 +92,11 @@ export class Floating {
92
92
  ? above >= panel.scrollHeight || above > below
93
93
  : below < panel.scrollHeight && above > below;
94
94
  panel.style.maxHeight = `${Math.min(420, up ? above : below)}px`;
95
+ // Measured from the viewport's corner, where it has all the room it may
96
+ // take: where it was last, its text would wrap narrower, then widen once
97
+ // moved, and every move would resize it again.
98
+ panel.style.left = "0px";
99
+ panel.style.top = "0px";
95
100
  const { width, height } = panel.getBoundingClientRect();
96
101
  const left = placement.endsWith("end")
97
102
  ? a.right - width