@pictor-sdk/ui 0.2.2 → 0.3.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/dist/index.d.mts +17 -1
- package/dist/index.d.ts +17 -1
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
- package/src/index.ts +1 -1
- package/src/panels/layoutMath.ts +23 -0
package/dist/index.mjs
CHANGED
|
@@ -2888,6 +2888,13 @@ function fitImageToLayoutCell(cell, documentSize, intrinsic, options = {}) {
|
|
|
2888
2888
|
function cellToTransformPatch(cell) {
|
|
2889
2889
|
return { x: cell.x, y: cell.y, scale: cell.scale, rotation: 0 };
|
|
2890
2890
|
}
|
|
2891
|
+
function layoutCellBox(cell, documentSize) {
|
|
2892
|
+
"worklet";
|
|
2893
|
+
return {
|
|
2894
|
+
width: cell.width * documentSize.width,
|
|
2895
|
+
height: cell.height * documentSize.height
|
|
2896
|
+
};
|
|
2897
|
+
}
|
|
2891
2898
|
|
|
2892
2899
|
// src/panels/LayoutPanel.tsx
|
|
2893
2900
|
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
@@ -4741,6 +4748,7 @@ export {
|
|
|
4741
4748
|
defaultTheme,
|
|
4742
4749
|
fitImageToLayoutCell,
|
|
4743
4750
|
layoutCellBounds,
|
|
4751
|
+
layoutCellBox,
|
|
4744
4752
|
layoutCells,
|
|
4745
4753
|
mergeSlots,
|
|
4746
4754
|
mergeTheme,
|