@owlmeans/web-client 0.1.18-rc.64 → 0.1.18-rc.66

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/README.md CHANGED
@@ -11,7 +11,7 @@ is the legacy MUI layer — start nothing new there. React Native apps use the `
11
11
  ## Installation
12
12
 
13
13
  ```bash
14
- bun add @owlmeans/web-client@^0.1.18-rc.64
14
+ bun add @owlmeans/web-client@^0.1.18-rc.66
15
15
  ```
16
16
 
17
17
  ## Concepts
@@ -289,7 +289,7 @@ This package ships embedded agent skills under `agent-meta/`. After installing y
289
289
  your project's skill store (`.agents/skills/`):
290
290
 
291
291
  ```sh
292
- npx @owlmeans/agent-skills@^0.1.18-rc.53
292
+ npx @owlmeans/agent-skills@^0.1.18-rc.55
293
293
  ```
294
294
 
295
295
  The embedded files are version-matched to this package release. Do not edit them
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 2,
3
3
  "package": "@owlmeans/web-client",
4
- "version": "0.1.18-rc.64",
5
- "generatedAt": "2026-10-09T11:30:42.749Z",
4
+ "version": "0.1.18-rc.66",
5
+ "generatedAt": "2026-10-16T22:27:59.064Z",
6
6
  "canonicalRepo": "https://github.com/owlmeans/common",
7
7
  "entries": [
8
8
  {
@@ -6,7 +6,7 @@ description: Bind OwlMeans shared entrypoint protocols in a browser application.
6
6
 
7
7
  # Browser protocol entrypoints
8
8
 
9
- **Install:** `bun add @owlmeans/web-client@^0.1.18-rc.64`
9
+ **Install:** `bun add @owlmeans/web-client@^0.1.18-rc.66`
10
10
 
11
11
  Shared protocol declarations are immutable. Bind a complete protocol tree for callable API routes,
12
12
  then bind frontend declarations to screens.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@owlmeans/web-client",
3
- "version": "0.1.18-rc.64",
3
+ "version": "0.1.18-rc.66",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -22,22 +22,22 @@
22
22
  },
23
23
  "dependencies": {
24
24
  "@owlmeans/auth": "^0.1.18-rc.41",
25
- "@owlmeans/auth-common": "^0.1.18-rc.49",
26
- "@owlmeans/client": "^0.1.18-rc.53",
27
- "@owlmeans/client-auth": "^0.1.18-rc.61",
28
- "@owlmeans/client-context": "^0.1.18-rc.50",
29
- "@owlmeans/client-i18n": "^0.1.18-rc.52",
30
- "@owlmeans/client-entrypoint": "^0.1.18-rc.49",
31
- "@owlmeans/client-resource": "^0.1.18-rc.49",
32
- "@owlmeans/client-route": "^0.1.18-rc.50",
25
+ "@owlmeans/auth-common": "^0.1.18-rc.50",
26
+ "@owlmeans/client": "^0.1.18-rc.55",
27
+ "@owlmeans/client-auth": "^0.1.18-rc.63",
28
+ "@owlmeans/client-context": "^0.1.18-rc.51",
29
+ "@owlmeans/client-i18n": "^0.1.18-rc.54",
30
+ "@owlmeans/client-entrypoint": "^0.1.18-rc.50",
31
+ "@owlmeans/client-resource": "^0.1.18-rc.50",
32
+ "@owlmeans/client-route": "^0.1.18-rc.51",
33
33
  "@owlmeans/config": "^0.1.18-rc.44",
34
34
  "@owlmeans/context": "^0.1.18-rc.34",
35
35
  "@owlmeans/error": "^0.1.18-rc.38",
36
36
  "@owlmeans/i18n": "^0.1.18-rc.39",
37
37
  "@owlmeans/log": "^0.1.18-rc.3",
38
38
  "@owlmeans/route": "^0.1.18-rc.35",
39
- "@owlmeans/web-db": "^0.1.18-rc.50",
40
- "@owlmeans/web-router": "^0.1.18-rc.51",
39
+ "@owlmeans/web-db": "^0.1.18-rc.51",
40
+ "@owlmeans/web-router": "^0.1.18-rc.53",
41
41
  "react-dropzone": "^20.1.2"
42
42
  },
43
43
  "peerDependencies": {
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=surrogate.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"surrogate.spec.d.ts","sourceRoot":"","sources":["surrogate.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,43 @@
1
+ import { describe, test, expect, afterEach } from 'bun:test';
2
+ import { centeredPopupFeatures } from '../src/login/surrogate.js';
3
+ /**
4
+ * A hand-written `window`, not jsdom: the function under test reads exactly four geometry
5
+ * properties, and a real DOM would prove a fixture behaves rather than that the math does.
6
+ */
7
+ const stubWindow = (over) => {
8
+ globalThis.window = {
9
+ screenLeft: 0, screenTop: 0, screenX: 0, screenY: 0,
10
+ outerWidth: 1920, outerHeight: 1080,
11
+ screen: { width: 1920, height: 1080 },
12
+ ...over,
13
+ };
14
+ };
15
+ afterEach(() => {
16
+ delete globalThis.window;
17
+ });
18
+ describe('centeredPopupFeatures', () => {
19
+ test('centers on the browser window, at its current screen position', () => {
20
+ stubWindow({ screenLeft: 100, screenTop: 50, outerWidth: 1200, outerHeight: 800 });
21
+ expect(centeredPopupFeatures(520, 760)).toBe('popup=yes,width=520,height=760,left=440,top=70');
22
+ });
23
+ // A cross-origin iframe: `window.top.innerWidth` would throw, which is exactly why this reads
24
+ // `outerWidth`/`outerHeight` instead — they describe the browser's own chrome, not this
25
+ // document's viewport, and stay readable across the origin boundary.
26
+ test('falls back to screenX/screenY when the legacy aliases are unavailable', () => {
27
+ stubWindow({
28
+ screenLeft: undefined, screenTop: undefined, screenX: 20, screenY: 10,
29
+ outerWidth: 1200, outerHeight: 800,
30
+ });
31
+ expect(centeredPopupFeatures(520, 760)).toBe('popup=yes,width=520,height=760,left=360,top=30');
32
+ });
33
+ test('falls back to window.screen when outerWidth/outerHeight report zero', () => {
34
+ // A headless runner: no chrome geometry to report at all.
35
+ stubWindow({ outerWidth: 0, outerHeight: 0, screen: { width: 1600, height: 900 } });
36
+ expect(centeredPopupFeatures(520, 760)).toBe('popup=yes,width=520,height=760,left=540,top=70');
37
+ });
38
+ test('never places the popup off-screen when it is larger than the window', () => {
39
+ stubWindow({ outerWidth: 400, outerHeight: 400 });
40
+ expect(centeredPopupFeatures(520, 760)).toBe('popup=yes,width=520,height=760,left=0,top=0');
41
+ });
42
+ });
43
+ //# sourceMappingUR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