stickyflow 0.9.0 → 0.9.1

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/CHANGELOG.md CHANGED
@@ -17,6 +17,12 @@ Two things count as breaking here that are easy to overlook:
17
17
 
18
18
  ## [Unreleased]
19
19
 
20
+ ## [0.9.1] - 2026-10-28
21
+
22
+ ### Fixed
23
+
24
+ - The view of a document that fits to its content no longer counts what a frame with `clip` cuts off. A poster in a clipping frame, with a scene that runs past its edge, was shown very small because the view was fitted to the whole scene. It is now fitted to the frame. A frame that is turned is not yet taken into account.
25
+
20
26
  ## [0.9.0] - 2026-10-28
21
27
 
22
28
  ### Added
@@ -1,34 +1,34 @@
1
1
  'use strict';
2
2
 
3
- var chunkB3YRZVMR_cjs = require('../chunk-B3YRZVMR.cjs');
4
- require('../chunk-YSXD5IVZ.cjs');
3
+ var chunkBL5NCXS4_cjs = require('../chunk-BL5NCXS4.cjs');
4
+ require('../chunk-5EY7EK5V.cjs');
5
5
  require('../chunk-QL7MNEMT.cjs');
6
6
 
7
7
 
8
8
 
9
9
  Object.defineProperty(exports, "buildBindingGraph", {
10
10
  enumerable: true,
11
- get: function () { return chunkB3YRZVMR_cjs.buildBindingGraph; }
11
+ get: function () { return chunkBL5NCXS4_cjs.buildBindingGraph; }
12
12
  });
13
13
  Object.defineProperty(exports, "collectContracts", {
14
14
  enumerable: true,
15
- get: function () { return chunkB3YRZVMR_cjs.collectContracts; }
15
+ get: function () { return chunkBL5NCXS4_cjs.collectContracts; }
16
16
  });
17
17
  Object.defineProperty(exports, "createBindingRuntime", {
18
18
  enumerable: true,
19
- get: function () { return chunkB3YRZVMR_cjs.createBindingRuntime; }
19
+ get: function () { return chunkBL5NCXS4_cjs.createBindingRuntime; }
20
20
  });
21
21
  Object.defineProperty(exports, "createDataSource", {
22
22
  enumerable: true,
23
- get: function () { return chunkB3YRZVMR_cjs.createDataSource; }
23
+ get: function () { return chunkBL5NCXS4_cjs.createDataSource; }
24
24
  });
25
25
  Object.defineProperty(exports, "interactiveElements", {
26
26
  enumerable: true,
27
- get: function () { return chunkB3YRZVMR_cjs.interactiveElements; }
27
+ get: function () { return chunkBL5NCXS4_cjs.interactiveElements; }
28
28
  });
29
29
  Object.defineProperty(exports, "renderBound", {
30
30
  enumerable: true,
31
- get: function () { return chunkB3YRZVMR_cjs.renderBound; }
31
+ get: function () { return chunkBL5NCXS4_cjs.renderBound; }
32
32
  });
33
33
  //# sourceMappingURL=index.cjs.map
34
34
  //# sourceMappingURL=index.cjs.map
@@ -1,5 +1,5 @@
1
- export { buildBindingGraph, collectContracts, createBindingRuntime, createDataSource, interactiveElements, renderBound } from '../chunk-BUVUJMWT.js';
2
- import '../chunk-FS6L462E.js';
1
+ export { buildBindingGraph, collectContracts, createBindingRuntime, createDataSource, interactiveElements, renderBound } from '../chunk-IKTSCLIK.js';
2
+ import '../chunk-TH2HFMEL.js';
3
3
  import '../chunk-D2266VBZ.js';
4
4
  //# sourceMappingURL=index.js.map
5
5
  //# sourceMappingURL=index.js.map
@@ -9580,15 +9580,30 @@ function applyFrameClips(nodes, frames) {
9580
9580
  }
9581
9581
 
9582
9582
  // src/renderScene/scene/build.ts
9583
+ function visibleBounds(node) {
9584
+ let { minX, minY, maxX, maxY } = node.bounds;
9585
+ let clip = "style" in node ? node.style?.clip : void 0;
9586
+ while (clip) {
9587
+ if (clip.type === "rect") {
9588
+ minX = Math.max(minX, clip.x);
9589
+ minY = Math.max(minY, clip.y);
9590
+ maxX = Math.min(maxX, clip.x + clip.width);
9591
+ maxY = Math.min(maxY, clip.y + clip.height);
9592
+ }
9593
+ clip = clip.within;
9594
+ }
9595
+ return minX <= maxX && minY <= maxY ? { minX, minY, maxX, maxY } : node.bounds;
9596
+ }
9583
9597
  function sceneBounds(nodes) {
9584
9598
  if (!nodes.length) {
9585
9599
  return chunkQL7MNEMT_cjs.EMPTY_BOUNDS;
9586
9600
  }
9601
+ const all = nodes.map(visibleBounds);
9587
9602
  return {
9588
- minX: Math.min(...nodes.map((n) => n.bounds.minX)),
9589
- minY: Math.min(...nodes.map((n) => n.bounds.minY)),
9590
- maxX: Math.max(...nodes.map((n) => n.bounds.maxX)),
9591
- maxY: Math.max(...nodes.map((n) => n.bounds.maxY))
9603
+ minX: Math.min(...all.map((b) => b.minX)),
9604
+ minY: Math.min(...all.map((b) => b.minY)),
9605
+ maxX: Math.max(...all.map((b) => b.maxX)),
9606
+ maxY: Math.max(...all.map((b) => b.maxY))
9592
9607
  };
9593
9608
  }
9594
9609
  function stackingOf(input) {
@@ -10334,5 +10349,5 @@ exports.render = render;
10334
10349
  exports.renderCanvas = renderCanvas;
10335
10350
  exports.sflToRenderInput = sflToRenderInput;
10336
10351
  exports.sliderReach = sliderReach;
10337
- //# sourceMappingURL=chunk-YSXD5IVZ.cjs.map
10338
- //# sourceMappingURL=chunk-YSXD5IVZ.cjs.map
10352
+ //# sourceMappingURL=chunk-5EY7EK5V.cjs.map
10353
+ //# sourceMappingURL=chunk-5EY7EK5V.cjs.map