@dimina-kit/view-anchor 0.1.0-dev.20260707070110 → 0.1.0-dev.20260710085051
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.
|
@@ -14,7 +14,8 @@ import type { SizeAdvertiserOptions, SizeAdvertiserHandle } from './types.js';
|
|
|
14
14
|
* loop (advertise → host resizes view → remeasure) never converges (it
|
|
15
15
|
* oscillates or stays "stable but wrong"). Measuring `<body>`/`<html>` is the
|
|
16
16
|
* classic mistake — their size *is* the view size. See
|
|
17
|
-
* `docs/bidirectional-design.md`
|
|
17
|
+
* `docs/bidirectional-design.md`'s single-axis-ownership and trust-boundary
|
|
18
|
+
* sections.
|
|
18
19
|
*/
|
|
19
20
|
export declare function createSizeAdvertiser(target: HTMLElement, opts: SizeAdvertiserOptions): SizeAdvertiserHandle;
|
|
20
21
|
//# sourceMappingURL=size-advertiser.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"size-advertiser.d.ts","sourceRoot":"","sources":["../src/size-advertiser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,qBAAqB,EACrB,oBAAoB,EACrB,MAAM,YAAY,CAAA;AAGnB
|
|
1
|
+
{"version":3,"file":"size-advertiser.d.ts","sourceRoot":"","sources":["../src/size-advertiser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,qBAAqB,EACrB,oBAAoB,EACrB,MAAM,YAAY,CAAA;AAGnB;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,WAAW,EACnB,IAAI,EAAE,qBAAqB,GAC1B,oBAAoB,CAkEtB"}
|
package/dist/size-advertiser.js
CHANGED
|
@@ -14,7 +14,8 @@ import { createMeasureLoop } from './measure-loop.js';
|
|
|
14
14
|
* loop (advertise → host resizes view → remeasure) never converges (it
|
|
15
15
|
* oscillates or stays "stable but wrong"). Measuring `<body>`/`<html>` is the
|
|
16
16
|
* classic mistake — their size *is* the view size. See
|
|
17
|
-
* `docs/bidirectional-design.md`
|
|
17
|
+
* `docs/bidirectional-design.md`'s single-axis-ownership and trust-boundary
|
|
18
|
+
* sections.
|
|
18
19
|
*/
|
|
19
20
|
export function createSizeAdvertiser(target, opts) {
|
|
20
21
|
const axis = opts.axis; // immutable for the advertiser's life
|
|
@@ -50,7 +51,7 @@ export function createSizeAdvertiser(target, opts) {
|
|
|
50
51
|
console.warn(`[view-anchor] size-advertiser: <${target === doc.body ? 'body' : 'html'}>'s ` +
|
|
51
52
|
`${axis} size is the host-given view size, not the content size — the ` +
|
|
52
53
|
`advertiser will never shrink to content. Measure a shrink-to-fit wrapper. ` +
|
|
53
|
-
`See bidirectional-design.md
|
|
54
|
+
`See bidirectional-design.md's single-axis-ownership section.`);
|
|
54
55
|
}
|
|
55
56
|
loop.setActive(true);
|
|
56
57
|
observer = new ResizeObserver(onResize);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dimina-kit/view-anchor",
|
|
3
|
-
"version": "0.1.0-dev.
|
|
3
|
+
"version": "0.1.0-dev.20260710085051",
|
|
4
4
|
"description": "Engine-agnostic primitive that keeps a main-process native view (Electron WebContentsView) aligned to a DOM element's geometry.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dimina",
|
package/src/size-advertiser.ts
CHANGED
|
@@ -20,7 +20,8 @@ import { createMeasureLoop } from './measure-loop.js'
|
|
|
20
20
|
* loop (advertise → host resizes view → remeasure) never converges (it
|
|
21
21
|
* oscillates or stays "stable but wrong"). Measuring `<body>`/`<html>` is the
|
|
22
22
|
* classic mistake — their size *is* the view size. See
|
|
23
|
-
* `docs/bidirectional-design.md`
|
|
23
|
+
* `docs/bidirectional-design.md`'s single-axis-ownership and trust-boundary
|
|
24
|
+
* sections.
|
|
24
25
|
*/
|
|
25
26
|
export function createSizeAdvertiser(
|
|
26
27
|
target: HTMLElement,
|
|
@@ -62,7 +63,7 @@ export function createSizeAdvertiser(
|
|
|
62
63
|
`[view-anchor] size-advertiser: <${target === doc.body ? 'body' : 'html'}>'s ` +
|
|
63
64
|
`${axis} size is the host-given view size, not the content size — the ` +
|
|
64
65
|
`advertiser will never shrink to content. Measure a shrink-to-fit wrapper. ` +
|
|
65
|
-
`See bidirectional-design.md
|
|
66
|
+
`See bidirectional-design.md's single-axis-ownership section.`,
|
|
66
67
|
)
|
|
67
68
|
}
|
|
68
69
|
|