@allshift/ui 0.5.0 → 0.5.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/dist/index.cjs CHANGED
@@ -1057,6 +1057,17 @@ function CanvasProvider({
1057
1057
  boardRef.current = w;
1058
1058
  boardHRef.current = Math.max(480, window.innerHeight);
1059
1059
  setBoardWidth(w);
1060
+ setBlocks((prev) => {
1061
+ let changed = false;
1062
+ const next = prev.map((b) => {
1063
+ const bw = Math.min(b.w, w);
1064
+ const bx = Math.max(0, Math.min(b.x, w - bw));
1065
+ if (bw === b.w && bx === b.x) return b;
1066
+ changed = true;
1067
+ return { ...b, w: bw, x: bx };
1068
+ });
1069
+ return changed ? next : prev;
1070
+ });
1060
1071
  };
1061
1072
  measure();
1062
1073
  window.addEventListener("resize", measure);
package/dist/index.js CHANGED
@@ -1017,6 +1017,17 @@ function CanvasProvider({
1017
1017
  boardRef.current = w;
1018
1018
  boardHRef.current = Math.max(480, window.innerHeight);
1019
1019
  setBoardWidth(w);
1020
+ setBlocks((prev) => {
1021
+ let changed = false;
1022
+ const next = prev.map((b) => {
1023
+ const bw = Math.min(b.w, w);
1024
+ const bx = Math.max(0, Math.min(b.x, w - bw));
1025
+ if (bw === b.w && bx === b.x) return b;
1026
+ changed = true;
1027
+ return { ...b, w: bw, x: bx };
1028
+ });
1029
+ return changed ? next : prev;
1030
+ });
1020
1031
  };
1021
1032
  measure();
1022
1033
  window.addEventListener("resize", measure);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allshift/ui",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "description": "Shift family shared FEEL layer — glass morphism, 3D tilt physics, holographic shine, scroll-triggered generation, and the living-canvas engine (LiveCard, LiveStat, CanvasTransition, CanvasLauncher). Brand-neutral by design.",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,