@activecollab/components 2.0.372 → 2.0.373

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.
Files changed (46) hide show
  1. package/dist/cjs/components/StackedCard/StackedCard.js +103 -19
  2. package/dist/cjs/components/StackedCard/StackedCard.js.map +1 -1
  3. package/dist/cjs/components/StackedCard/Styles.js +22 -17
  4. package/dist/cjs/components/StackedCard/Styles.js.map +1 -1
  5. package/dist/cjs/components/StackedCard/index.js +22 -0
  6. package/dist/cjs/components/StackedCard/index.js.map +1 -1
  7. package/dist/cjs/components/StackedCard/resizePolicy.js +238 -0
  8. package/dist/cjs/components/StackedCard/resizePolicy.js.map +1 -0
  9. package/dist/cjs/components/StackedCard/resizePolicy.test.js +474 -0
  10. package/dist/cjs/components/StackedCard/resizePolicy.test.js.map +1 -0
  11. package/dist/cjs/components/StackedCard/useStackedCardResize.js +145 -0
  12. package/dist/cjs/components/StackedCard/useStackedCardResize.js.map +1 -0
  13. package/dist/esm/components/StackedCard/StackedCard.d.ts +44 -3
  14. package/dist/esm/components/StackedCard/StackedCard.d.ts.map +1 -1
  15. package/dist/esm/components/StackedCard/StackedCard.js +102 -19
  16. package/dist/esm/components/StackedCard/StackedCard.js.map +1 -1
  17. package/dist/esm/components/StackedCard/Styles.d.ts +4 -1
  18. package/dist/esm/components/StackedCard/Styles.d.ts.map +1 -1
  19. package/dist/esm/components/StackedCard/Styles.js +22 -17
  20. package/dist/esm/components/StackedCard/Styles.js.map +1 -1
  21. package/dist/esm/components/StackedCard/index.d.ts +2 -0
  22. package/dist/esm/components/StackedCard/index.d.ts.map +1 -1
  23. package/dist/esm/components/StackedCard/index.js +2 -0
  24. package/dist/esm/components/StackedCard/index.js.map +1 -1
  25. package/dist/esm/components/StackedCard/resizePolicy.d.ts +111 -0
  26. package/dist/esm/components/StackedCard/resizePolicy.d.ts.map +1 -0
  27. package/dist/esm/{presentation/stackedCard → components/StackedCard}/resizePolicy.js +93 -48
  28. package/dist/esm/components/StackedCard/resizePolicy.js.map +1 -0
  29. package/dist/esm/components/StackedCard/resizePolicy.test.d.ts +2 -0
  30. package/dist/esm/components/StackedCard/resizePolicy.test.d.ts.map +1 -0
  31. package/dist/esm/components/StackedCard/resizePolicy.test.js +470 -0
  32. package/dist/esm/components/StackedCard/resizePolicy.test.js.map +1 -0
  33. package/dist/esm/components/StackedCard/useStackedCardResize.d.ts +62 -0
  34. package/dist/esm/components/StackedCard/useStackedCardResize.d.ts.map +1 -0
  35. package/dist/esm/components/StackedCard/useStackedCardResize.js +137 -0
  36. package/dist/esm/components/StackedCard/useStackedCardResize.js.map +1 -0
  37. package/dist/index.js +500 -36
  38. package/dist/index.js.map +1 -1
  39. package/dist/index.min.js +1 -1
  40. package/dist/index.min.js.map +1 -1
  41. package/package.json +1 -1
  42. package/dist/cjs/presentation/stackedCard/resizePolicy.js +0 -183
  43. package/dist/cjs/presentation/stackedCard/resizePolicy.js.map +0 -1
  44. package/dist/esm/presentation/stackedCard/resizePolicy.d.ts +0 -97
  45. package/dist/esm/presentation/stackedCard/resizePolicy.d.ts.map +0 -1
  46. package/dist/esm/presentation/stackedCard/resizePolicy.js.map +0 -1
@@ -0,0 +1,111 @@
1
+ /**
2
+ * StackedCard resize policy — pure math.
3
+ *
4
+ * The card reports intent; the HOST applies a resize policy (spec §7). This
5
+ * module is that policy, packaged as pure functions so the SAME code path
6
+ * serves the pointer drag and the keyboard resize. Nothing here touches the
7
+ * DOM, React or the card's content: it takes a start size, a delta and a
8
+ * policy, and returns a clamped size. `useStackedCardResize` wires events to
9
+ * it; the card's intrinsic content minimum is measured by the host and passed
10
+ * in as `contentMin`, so this module knows nothing about heroes or footers.
11
+ *
12
+ * The policy has four parts:
13
+ * - bounds — optional min/max per axis; unset means unbounded.
14
+ * - proportional — lock the aspect ratio captured at the start of the gesture;
15
+ * the scale is clamped by the BINDING axis so the ratio never
16
+ * distorts at a bound.
17
+ * - step — optional grid snap; proportion wins over the grid.
18
+ * - content min — the effective min is max(policyMin, contentMin) per axis,
19
+ * so a card can never be crushed below what its content needs.
20
+ */
21
+ export interface StackedCardSize {
22
+ w: number;
23
+ h: number;
24
+ }
25
+ /** The card's intrinsic minimum, measured from its real content. */
26
+ export interface StackedCardContentMin {
27
+ w: number;
28
+ h: number;
29
+ }
30
+ export interface StackedCardResizePolicy {
31
+ minW?: number;
32
+ maxW?: number;
33
+ minH?: number;
34
+ maxH?: number;
35
+ /** Lock the aspect ratio for the whole gesture. */
36
+ proportional: boolean;
37
+ /** Grid snap increment in px; omitted / 0 means continuous. */
38
+ step?: number;
39
+ }
40
+ /** The size captured at the start of a gesture (pointer down or a key press). */
41
+ export interface StackedCardResizeStart {
42
+ w: number;
43
+ h: number;
44
+ contentMin: StackedCardContentMin;
45
+ }
46
+ export interface StackedCardResizeDelta {
47
+ dx: number;
48
+ dy: number;
49
+ }
50
+ export interface StackedCardResizeBounds {
51
+ wMin: number;
52
+ wMax: number;
53
+ hMin: number;
54
+ hMax: number;
55
+ }
56
+ /**
57
+ * `width` locks the vertical axis: an auto-height card takes a width and lets
58
+ * its rows set the height, so the gesture's vertical component is ignored.
59
+ */
60
+ export type StackedCardResizeAxis = "both" | "width";
61
+ /** Which input drove a resize event. Hosts log undo entries per source. */
62
+ export type StackedCardResizeSource = "pointer" | "keyboard";
63
+ /** Keyboard resize nudges by the policy step, or this when no step is set. */
64
+ export declare const DEFAULT_KEYBOARD_STEP = 8;
65
+ /** Shift + arrow resizes by a larger increment (the familiar coarse nudge). */
66
+ export declare const SHIFT_STEP_MULTIPLIER = 4;
67
+ /** Keys the separator handles; everything else falls through to the browser. */
68
+ export declare const RESIZE_KEYS: ReadonlyArray<string>;
69
+ export declare const isResizeKey: (key: string) => boolean;
70
+ export declare const clamp: (v: number, lo: number, hi?: number) => number;
71
+ export declare const snap: (v: number, step?: number) => number;
72
+ export declare const makeStart: (size: StackedCardSize, contentMin: StackedCardContentMin) => StackedCardResizeStart;
73
+ /**
74
+ * The effective bounds a size is clamped to: the policy min floored by the
75
+ * content min, and the policy max (unbounded when unset). Independent of any
76
+ * live gesture, so a host can also use it for the aria value and Home/End.
77
+ */
78
+ export declare const effectiveBounds: (policy: StackedCardResizePolicy, contentMin: StackedCardContentMin) => StackedCardResizeBounds;
79
+ /**
80
+ * Apply a delta to the start size under the policy — the single path for both
81
+ * inputs.
82
+ *
83
+ * `constrain` is the transient Shift-to-constrain lock: a free-form policy
84
+ * behaves proportionally for that one gesture; a proportional policy is already
85
+ * locked and ignores it. `axis: "width"` drops the gesture's vertical component;
86
+ * the height then holds still in free-form mode, and still follows the ratio in
87
+ * proportional mode (that is what proportional means).
88
+ */
89
+ export declare const applyResize: (start: StackedCardResizeStart, delta: StackedCardResizeDelta, policy: StackedCardResizePolicy, opts?: {
90
+ constrain?: boolean;
91
+ axis?: StackedCardResizeAxis;
92
+ }) => StackedCardSize;
93
+ /**
94
+ * Translate a resize key into the next size, reusing `applyResize` so the
95
+ * keyboard clamps exactly like the pointer. Arrows nudge by the step (Shift ×4);
96
+ * Home/End jump to the min/max of the allowed range, leaving any axis without
97
+ * that bound where it is. Returns null for a key the handle does not own, and
98
+ * for a vertical key on a width-only card.
99
+ */
100
+ export declare const keyboardResize: (key: string, size: StackedCardSize, policy: StackedCardResizePolicy, contentMin: StackedCardContentMin, opts?: {
101
+ shiftKey?: boolean;
102
+ axis?: StackedCardResizeAxis;
103
+ }) => StackedCardSize | null;
104
+ /**
105
+ * The handle's `aria-valuenow`: the current size as a percent (0–100) of its
106
+ * allowed range. The corner resizes both axes, but the value must be a single
107
+ * number, so it reports the WIDTH axis — the one axis the fixed-box and the
108
+ * width-only cards share. Returns 0 when the range isn't finite (no max bound).
109
+ */
110
+ export declare const measurePercent: (size: StackedCardSize, policy: StackedCardResizePolicy, contentMin: StackedCardContentMin) => number;
111
+ //# sourceMappingURL=resizePolicy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resizePolicy.d.ts","sourceRoot":"","sources":["../../../../src/components/Stacked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AAO,MAAM,WAAW,GAAI,KAAK,MAAM,KAAG,OAAoC,CAAC;AAE/E,eAAO,MAAM,KAAK,GAAI,GAAG,MAAM,EAAE,IAAI,MAAM,EAAE,KAAK,MAAM,KAAG,MACA,CAAC;AAE5D,eAAO,MAAM,IAAI,GAAI,GAAG,MAAM,EAAE,OAAO,MAAM,KAAG,MACI,CAAC;AAErD,eAAO,MAAM,SAAS,GACpB,MAAM,eAAe,EACrB,YAAY,qBAAqB,KAChC,sBAID,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,eAAe,GAC1B,QAAQ,uBAAuB,EAC/B,YAAY,qBAAqB,KAChC,uBAKD,CAAC;AAUH;;;;;;;;;GASG;AACH,eAAO,MAAM,WAAW,GACtB,OAAO,sBAAsB,EAC7B,OAAO,sBAAsB,EAC7B,QAAQ,uBAAuB,EAC/B,OAAM;IAAE,SAAS,CAAC,EAAE,OAAO,CAAC;IAAC,IAAI,CAAC,EAAE,qBAAqB,CAAA;CAAO,KAC/D,eAiDF,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,GACzB,KAAK,MAAM,EACX,MAAM,eAAe,EACrB,QAAQ,uBAAuB,EAC/B,YAAY,qBAAqB,EACjC,OAAM;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAC;IAAC,IAAI,CAAC,EAAE,qBAAqB,CAAA;CAAO,KAC9D,eAAe,GAAG,IAgDpB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,cAAc,GACzB,MAAM,eAAe,EACrB,QAAQ,uBAAuB,EAC/B,YAAY,qBAAqB,KAChC,MAIF,CAAC"}
@@ -1,28 +1,36 @@
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
1
2
  /**
2
- * StackedCard resize policy — pure math (story-local, presentation-only).
3
+ * StackedCard resize policy — pure math.
3
4
  *
4
- * The card only reports deltas; the HOST applies a resize policy (note 52097
5
- * §7). This module is that policy, packaged as pure functions so the SAME code
6
- * path serves both the pointer drag and the keyboard resize (task 5/8). Nothing
7
- * here touches the DOM, React, or the content it takes a start size, a delta,
8
- * and a policy, and returns a clamped size. The story wires events to it; the
9
- * card's intrinsic content minimum is measured story-side and passed in as
10
- * `contentMin`, so this module knows nothing about heroes or footers.
5
+ * The card reports intent; the HOST applies a resize policy (spec §7). This
6
+ * module is that policy, packaged as pure functions so the SAME code path
7
+ * serves the pointer drag and the keyboard resize. Nothing here touches the
8
+ * DOM, React or the card's content: it takes a start size, a delta and a
9
+ * policy, and returns a clamped size. `useStackedCardResize` wires events to
10
+ * it; the card's intrinsic content minimum is measured by the host and passed
11
+ * in as `contentMin`, so this module knows nothing about heroes or footers.
11
12
  *
12
- * The policy has four parts, all preserved from the concept:
13
+ * The policy has four parts:
13
14
  * - bounds — optional min/max per axis; unset means unbounded.
14
15
  * - proportional — lock the aspect ratio captured at the start of the gesture;
15
16
  * the scale is clamped by the BINDING axis so the ratio never
16
17
  * distorts at a bound.
17
18
  * - step — optional grid snap; proportion wins over the grid.
18
19
  * - content min — the effective min is max(policyMin, contentMin) per axis,
19
- * so the card can never be crushed below what its content needs.
20
+ * so a card can never be crushed below what its content needs.
20
21
  */
21
22
 
22
23
  /** The card's intrinsic minimum, measured from its real content. */
23
24
 
24
25
  /** The size captured at the start of a gesture (pointer down or a key press). */
25
26
 
27
+ /**
28
+ * `width` locks the vertical axis: an auto-height card takes a width and lets
29
+ * its rows set the height, so the gesture's vertical component is ignored.
30
+ */
31
+
32
+ /** Which input drove a resize event. Hosts log undo entries per source. */
33
+
26
34
  /** Keyboard resize nudges by the policy step, or this when no step is set. */
27
35
  export const DEFAULT_KEYBOARD_STEP = 8;
28
36
 
@@ -43,7 +51,7 @@ export const makeStart = (size, contentMin) => ({
43
51
  /**
44
52
  * The effective bounds a size is clamped to: the policy min floored by the
45
53
  * content min, and the policy max (unbounded when unset). Independent of any
46
- * live gesture, so the story can also use it for the aria value and Home/End.
54
+ * live gesture, so a host can also use it for the aria value and Home/End.
47
55
  */
48
56
  export const effectiveBounds = (policy, contentMin) => {
49
57
  var _policy$minW, _policy$minH, _policy$maxW, _policy$maxH;
@@ -55,11 +63,22 @@ export const effectiveBounds = (policy, contentMin) => {
55
63
  };
56
64
  };
57
65
 
66
+ /**
67
+ * Whether an axis has a floor anyone asked for. `effectiveBounds` reports 0 for
68
+ * an unset minimum — correct as a clamp, but not something Home should jump to:
69
+ * an axis nobody gave a minimum must not collapse to nothing.
70
+ */
71
+ const hasFloor = (policyMin, contentMin) => policyMin !== undefined || contentMin > 0;
72
+
58
73
  /**
59
74
  * Apply a delta to the start size under the policy — the single path for both
60
- * inputs. `constrain` is the transient Shift-to-constrain lock: a free-form
61
- * policy behaves proportionally for that one gesture; a proportional policy is
62
- * already locked and ignores it.
75
+ * inputs.
76
+ *
77
+ * `constrain` is the transient Shift-to-constrain lock: a free-form policy
78
+ * behaves proportionally for that one gesture; a proportional policy is already
79
+ * locked and ignores it. `axis: "width"` drops the gesture's vertical component;
80
+ * the height then holds still in free-form mode, and still follows the ratio in
81
+ * proportional mode (that is what proportional means).
63
82
  */
64
83
  export const applyResize = function (start, delta, policy, opts) {
65
84
  if (opts === void 0) {
@@ -70,34 +89,42 @@ export const applyResize = function (start, delta, policy, opts) {
70
89
  hMin = _effectiveBounds.hMin,
71
90
  wMax = _effectiveBounds.wMax,
72
91
  hMax = _effectiveBounds.hMax;
73
- const proportional = policy.proportional || opts.constrain === true;
92
+ const widthOnly = opts.axis === "width";
93
+ const dx = delta.dx;
94
+ const dy = widthOnly ? 0 : delta.dy;
95
+
96
+ // A ratio needs two non-zero sides to be a ratio at all; a width-only card
97
+ // parks a placeholder height, so fall back to free-form rather than dividing
98
+ // by zero.
99
+ const proportional = (policy.proportional || opts.constrain === true) && start.w > 0 && start.h > 0;
74
100
  let w;
75
101
  let h;
76
102
  if (proportional) {
77
103
  // one scale drives both axes; the corner's dominant direction wins, so a
78
104
  // vertical drag is as effective as a horizontal one
79
- const sW = (start.w + delta.dx) / start.w;
80
- const sH = (start.h + delta.dy) / start.h;
105
+ const sW = (start.w + dx) / start.w;
106
+ const sH = (start.h + dy) / start.h;
81
107
  let scale = Math.abs(sW - 1) >= Math.abs(sH - 1) ? sW : sH;
82
108
 
83
- // clamp the SCALE so both axes stay in bounds (binding constraint): the
84
- // ratio can never break at a bound whichever edge is limiting stops both
109
+ // step: proportion wins over the grid. Snap through the SCALE (driven off
110
+ // the width edge) so both axes move together and the ratio survives; the
111
+ // grid yields whenever honouring it would cost the ratio.
112
+ if (policy.step) {
113
+ scale = snap(start.w * scale, policy.step) / start.w;
114
+ }
115
+
116
+ // Then clamp the scale so both axes stay in bounds (the binding constraint):
117
+ // the ratio can never break at a bound — whichever edge is limiting stops
118
+ // both. The clamp comes last on purpose: a bound is a hard stop, so the card
119
+ // sits exactly on it rather than at the nearest grid line inside it.
85
120
  const scaleMin = Math.max(wMin / start.w, hMin / start.h);
86
121
  const scaleMax = Math.min(wMax / start.w, hMax / start.h);
87
122
  scale = clamp(scale, scaleMin, Math.max(scaleMin, scaleMax));
88
-
89
- // step: proportion wins. Snap via the scale (driven off the width edge) and
90
- // re-clamp, so ratio and bounds always hold; the grid yields when honoring
91
- // it would cost the ratio
92
- if (policy.step) {
93
- const snappedScale = snap(start.w * scale, policy.step) / start.w;
94
- scale = clamp(snappedScale, scaleMin, Math.max(scaleMin, scaleMax));
95
- }
96
123
  w = start.w * scale;
97
124
  h = start.h * scale;
98
125
  } else {
99
- w = clamp(snap(start.w + delta.dx, policy.step), wMin, wMax);
100
- h = clamp(snap(start.h + delta.dy, policy.step), hMin, hMax);
126
+ w = clamp(snap(start.w + dx, policy.step), wMin, wMax);
127
+ h = widthOnly ? start.h : clamp(snap(start.h + dy, policy.step), hMin, hMax);
101
128
  }
102
129
  return {
103
130
  w: Math.round(w),
@@ -108,50 +135,68 @@ export const applyResize = function (start, delta, policy, opts) {
108
135
  /**
109
136
  * Translate a resize key into the next size, reusing `applyResize` so the
110
137
  * keyboard clamps exactly like the pointer. Arrows nudge by the step (Shift ×4);
111
- * Home/End jump to the min/max of the allowed range. Returns null for any key
112
- * the handle does not own.
138
+ * Home/End jump to the min/max of the allowed range, leaving any axis without
139
+ * that bound where it is. Returns null for a key the handle does not own, and
140
+ * for a vertical key on a width-only card.
113
141
  */
114
142
  export const keyboardResize = function (key, size, policy, contentMin, opts) {
115
143
  if (opts === void 0) {
116
144
  opts = {};
117
145
  }
146
+ const widthOnly = opts.axis === "width";
147
+ if (widthOnly && (key === "ArrowUp" || key === "ArrowDown")) return null;
118
148
  const base = policy.step && policy.step > 0 ? policy.step : DEFAULT_KEYBOARD_STEP;
119
149
  const step = base * (opts.shiftKey ? SHIFT_STEP_MULTIPLIER : 1);
120
150
  const start = makeStart(size, contentMin);
121
151
  const b = effectiveBounds(policy, contentMin);
152
+ const apply = delta => applyResize(start, delta, policy, {
153
+ axis: opts.axis
154
+ });
155
+
156
+ /**
157
+ * Home and End are absolute jumps to a bound, not nudges, so they ignore the
158
+ * grid: landing 4px off the minimum because that is where the nearest grid
159
+ * line fell would mean the keyboard could never reach the bound the pointer
160
+ * stops at.
161
+ */
162
+ const jump = delta => applyResize(start, delta, _extends({}, policy, {
163
+ step: 0
164
+ }), {
165
+ axis: opts.axis
166
+ });
122
167
  switch (key) {
123
168
  case "ArrowRight":
124
- return applyResize(start, {
169
+ return apply({
125
170
  dx: step,
126
171
  dy: 0
127
- }, policy);
172
+ });
128
173
  case "ArrowLeft":
129
- return applyResize(start, {
174
+ return apply({
130
175
  dx: -step,
131
176
  dy: 0
132
- }, policy);
177
+ });
133
178
  case "ArrowDown":
134
- return applyResize(start, {
179
+ return apply({
135
180
  dx: 0,
136
181
  dy: step
137
- }, policy);
182
+ });
138
183
  case "ArrowUp":
139
- return applyResize(start, {
184
+ return apply({
140
185
  dx: 0,
141
186
  dy: -step
142
- }, policy);
187
+ });
143
188
  case "Home":
144
- // jump to the min corner (a huge negative delta clamps to the floor)
145
- return applyResize(start, {
146
- dx: b.wMin - size.w,
147
- dy: b.hMin - size.h
148
- }, policy);
189
+ // jump to the min corner; an axis with no floor of its own stays put
190
+ return jump({
191
+ dx: hasFloor(policy.minW, contentMin.w) ? b.wMin - size.w : 0,
192
+ dy: !widthOnly && hasFloor(policy.minH, contentMin.h) ? b.hMin - size.h : 0
193
+ });
149
194
  case "End":
150
195
  // jump to the max corner; an unbounded axis simply doesn't move
151
- return applyResize(start, {
196
+ return jump({
152
197
  dx: Number.isFinite(b.wMax) ? b.wMax - size.w : 0,
153
- dy: Number.isFinite(b.hMax) ? b.hMax - size.h : 0
154
- }, policy);
198
+ dy: !widthOnly && Number.isFinite(b.hMax) ? b.hMax - size.h : 0
199
+ });
155
200
  default:
156
201
  return null;
157
202
  }
@@ -160,7 +205,7 @@ export const keyboardResize = function (key, size, policy, contentMin, opts) {
160
205
  /**
161
206
  * The handle's `aria-valuenow`: the current size as a percent (0–100) of its
162
207
  * allowed range. The corner resizes both axes, but the value must be a single
163
- * number, so it reports the WIDTH axis — the one axis both the fixed-box and the
208
+ * number, so it reports the WIDTH axis — the one axis the fixed-box and the
164
209
  * width-only cards share. Returns 0 when the range isn't finite (no max bound).
165
210
  */
166
211
  export const measurePercent = (size, policy, contentMin) => {
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resizePolicy.js","names":["DEFAULT_KEYBOARD_STEP","SHIFT_STEP_MULTIPLIER","RESIZE_KEYS","isResizeKey","key","includes","clamp","v","lo","hi","Math","min","Number","POSITIVE_INFINITY","max","snap","step","round","makeStart","size","contentMin","w","h","effectiveBounds","policy","_policy$minW","_policy$minH","_policy$maxW","_policy$maxH","wMin","minW","hMin","minH","wMax","maxW","hMax","maxH","hasFloor","policyMin","undefined","applyResize","start","delta","opts","_effectiveBounds","widthOnly","axis","dx","dy","proportional","constrain","sW","sH","scale","abs","scaleMin","scaleMax","keyboardResize","base","shiftKey","b","apply","jump","_extends","isFinite","measurePercent","_effectiveBounds2"],"sources":["../../../../src/components/StackedCard/resizePolicy.ts"],"sourcesContent":["/**\n * StackedCard resize policy — pure math.\n *\n * The card reports intent; the HOST applies a resize policy (spec §7). This\n * module is that policy, packaged as pure functions so the SAME code path\n * serves the pointer drag and the keyboard resize. Nothing here touches the\n * DOM, React or the card's content: it takes a start size, a delta and a\n * policy, and returns a clamped size. `useStackedCardResize` wires events to\n * it; the card's intrinsic content minimum is measured by the host and passed\n * in as `contentMin`, so this module knows nothing about heroes or footers.\n *\n * The policy has four parts:\n * - bounds — optional min/max per axis; unset means unbounded.\n * - proportional — lock the aspect ratio captured at the start of the gesture;\n * the scale is clamped by the BINDING axis so the ratio never\n * distorts at a bound.\n * - step — optional grid snap; proportion wins over the grid.\n * - content min — the effective min is max(policyMin, contentMin) per axis,\n * so a card can never be crushed below what its content needs.\n */\n\nexport interface StackedCardSize {\n w: number;\n h: number;\n}\n\n/** The card's intrinsic minimum, measured from its real content. */\nexport interface StackedCardContentMin {\n w: number;\n h: number;\n}\n\nexport interface StackedCardResizePolicy {\n minW?: number;\n maxW?: number;\n minH?: number;\n maxH?: number;\n /** Lock the aspect ratio for the whole gesture. */\n proportional: boolean;\n /** Grid snap increment in px; omitted / 0 means continuous. */\n step?: number;\n}\n\n/** The size captured at the start of a gesture (pointer down or a key press). */\nexport interface StackedCardResizeStart {\n w: number;\n h: number;\n contentMin: StackedCardContentMin;\n}\n\nexport interface StackedCardResizeDelta {\n dx: number;\n dy: number;\n}\n\nexport interface StackedCardResizeBounds {\n wMin: number;\n wMax: number;\n hMin: number;\n hMax: number;\n}\n\n/**\n * `width` locks the vertical axis: an auto-height card takes a width and lets\n * its rows set the height, so the gesture's vertical component is ignored.\n */\nexport type StackedCardResizeAxis = \"both\" | \"width\";\n\n/** Which input drove a resize event. Hosts log undo entries per source. */\nexport type StackedCardResizeSource = \"pointer\" | \"keyboard\";\n\n/** Keyboard resize nudges by the policy step, or this when no step is set. */\nexport const DEFAULT_KEYBOARD_STEP = 8;\n\n/** Shift + arrow resizes by a larger increment (the familiar coarse nudge). */\nexport const SHIFT_STEP_MULTIPLIER = 4;\n\n/** Keys the separator handles; everything else falls through to the browser. */\nexport const RESIZE_KEYS: ReadonlyArray<string> = [\n \"ArrowLeft\",\n \"ArrowRight\",\n \"ArrowUp\",\n \"ArrowDown\",\n \"Home\",\n \"End\",\n];\n\nexport const isResizeKey = (key: string): boolean => RESIZE_KEYS.includes(key);\n\nexport const clamp = (v: number, lo: number, hi?: number): number =>\n Math.min(hi ?? Number.POSITIVE_INFINITY, Math.max(lo, v));\n\nexport const snap = (v: number, step?: number): number =>\n step && step > 0 ? Math.round(v / step) * step : v;\n\nexport const makeStart = (\n size: StackedCardSize,\n contentMin: StackedCardContentMin\n): StackedCardResizeStart => ({\n w: size.w,\n h: size.h,\n contentMin,\n});\n\n/**\n * The effective bounds a size is clamped to: the policy min floored by the\n * content min, and the policy max (unbounded when unset). Independent of any\n * live gesture, so a host can also use it for the aria value and Home/End.\n */\nexport const effectiveBounds = (\n policy: StackedCardResizePolicy,\n contentMin: StackedCardContentMin\n): StackedCardResizeBounds => ({\n wMin: Math.max(policy.minW ?? 0, contentMin.w),\n hMin: Math.max(policy.minH ?? 0, contentMin.h),\n wMax: policy.maxW ?? Number.POSITIVE_INFINITY,\n hMax: policy.maxH ?? Number.POSITIVE_INFINITY,\n});\n\n/**\n * Whether an axis has a floor anyone asked for. `effectiveBounds` reports 0 for\n * an unset minimum — correct as a clamp, but not something Home should jump to:\n * an axis nobody gave a minimum must not collapse to nothing.\n */\nconst hasFloor = (policyMin: number | undefined, contentMin: number): boolean =>\n policyMin !== undefined || contentMin > 0;\n\n/**\n * Apply a delta to the start size under the policy — the single path for both\n * inputs.\n *\n * `constrain` is the transient Shift-to-constrain lock: a free-form policy\n * behaves proportionally for that one gesture; a proportional policy is already\n * locked and ignores it. `axis: \"width\"` drops the gesture's vertical component;\n * the height then holds still in free-form mode, and still follows the ratio in\n * proportional mode (that is what proportional means).\n */\nexport const applyResize = (\n start: StackedCardResizeStart,\n delta: StackedCardResizeDelta,\n policy: StackedCardResizePolicy,\n opts: { constrain?: boolean; axis?: StackedCardResizeAxis } = {}\n): StackedCardSize => {\n const { wMin, hMin, wMax, hMax } = effectiveBounds(policy, start.contentMin);\n const widthOnly = opts.axis === \"width\";\n const dx = delta.dx;\n const dy = widthOnly ? 0 : delta.dy;\n\n // A ratio needs two non-zero sides to be a ratio at all; a width-only card\n // parks a placeholder height, so fall back to free-form rather than dividing\n // by zero.\n const proportional =\n (policy.proportional || opts.constrain === true) &&\n start.w > 0 &&\n start.h > 0;\n\n let w: number;\n let h: number;\n\n if (proportional) {\n // one scale drives both axes; the corner's dominant direction wins, so a\n // vertical drag is as effective as a horizontal one\n const sW = (start.w + dx) / start.w;\n const sH = (start.h + dy) / start.h;\n let scale = Math.abs(sW - 1) >= Math.abs(sH - 1) ? sW : sH;\n\n // step: proportion wins over the grid. Snap through the SCALE (driven off\n // the width edge) so both axes move together and the ratio survives; the\n // grid yields whenever honouring it would cost the ratio.\n if (policy.step) {\n scale = snap(start.w * scale, policy.step) / start.w;\n }\n\n // Then clamp the scale so both axes stay in bounds (the binding constraint):\n // the ratio can never break at a bound — whichever edge is limiting stops\n // both. The clamp comes last on purpose: a bound is a hard stop, so the card\n // sits exactly on it rather than at the nearest grid line inside it.\n const scaleMin = Math.max(wMin / start.w, hMin / start.h);\n const scaleMax = Math.min(wMax / start.w, hMax / start.h);\n scale = clamp(scale, scaleMin, Math.max(scaleMin, scaleMax));\n\n w = start.w * scale;\n h = start.h * scale;\n } else {\n w = clamp(snap(start.w + dx, policy.step), wMin, wMax);\n h = widthOnly\n ? start.h\n : clamp(snap(start.h + dy, policy.step), hMin, hMax);\n }\n\n return { w: Math.round(w), h: Math.round(h) };\n};\n\n/**\n * Translate a resize key into the next size, reusing `applyResize` so the\n * keyboard clamps exactly like the pointer. Arrows nudge by the step (Shift ×4);\n * Home/End jump to the min/max of the allowed range, leaving any axis without\n * that bound where it is. Returns null for a key the handle does not own, and\n * for a vertical key on a width-only card.\n */\nexport const keyboardResize = (\n key: string,\n size: StackedCardSize,\n policy: StackedCardResizePolicy,\n contentMin: StackedCardContentMin,\n opts: { shiftKey?: boolean; axis?: StackedCardResizeAxis } = {}\n): StackedCardSize | null => {\n const widthOnly = opts.axis === \"width\";\n if (widthOnly && (key === \"ArrowUp\" || key === \"ArrowDown\")) return null;\n\n const base =\n policy.step && policy.step > 0 ? policy.step : DEFAULT_KEYBOARD_STEP;\n const step = base * (opts.shiftKey ? SHIFT_STEP_MULTIPLIER : 1);\n const start = makeStart(size, contentMin);\n const b = effectiveBounds(policy, contentMin);\n const apply = (delta: StackedCardResizeDelta): StackedCardSize =>\n applyResize(start, delta, policy, { axis: opts.axis });\n\n /**\n * Home and End are absolute jumps to a bound, not nudges, so they ignore the\n * grid: landing 4px off the minimum because that is where the nearest grid\n * line fell would mean the keyboard could never reach the bound the pointer\n * stops at.\n */\n const jump = (delta: StackedCardResizeDelta): StackedCardSize =>\n applyResize(start, delta, { ...policy, step: 0 }, { axis: opts.axis });\n\n switch (key) {\n case \"ArrowRight\":\n return apply({ dx: step, dy: 0 });\n case \"ArrowLeft\":\n return apply({ dx: -step, dy: 0 });\n case \"ArrowDown\":\n return apply({ dx: 0, dy: step });\n case \"ArrowUp\":\n return apply({ dx: 0, dy: -step });\n case \"Home\":\n // jump to the min corner; an axis with no floor of its own stays put\n return jump({\n dx: hasFloor(policy.minW, contentMin.w) ? b.wMin - size.w : 0,\n dy:\n !widthOnly && hasFloor(policy.minH, contentMin.h)\n ? b.hMin - size.h\n : 0,\n });\n case \"End\":\n // jump to the max corner; an unbounded axis simply doesn't move\n return jump({\n dx: Number.isFinite(b.wMax) ? b.wMax - size.w : 0,\n dy: !widthOnly && Number.isFinite(b.hMax) ? b.hMax - size.h : 0,\n });\n default:\n return null;\n }\n};\n\n/**\n * The handle's `aria-valuenow`: the current size as a percent (0–100) of its\n * allowed range. The corner resizes both axes, but the value must be a single\n * number, so it reports the WIDTH axis — the one axis the fixed-box and the\n * width-only cards share. Returns 0 when the range isn't finite (no max bound).\n */\nexport const measurePercent = (\n size: StackedCardSize,\n policy: StackedCardResizePolicy,\n contentMin: StackedCardContentMin\n): number => {\n const { wMin, wMax } = effectiveBounds(policy, contentMin);\n if (!Number.isFinite(wMax) || wMax <= wMin) return 0;\n return Math.round(clamp(((size.w - wMin) / (wMax - wMin)) * 100, 0, 100));\n};\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAOA;;AAiBA;;AAmBA;AACA;AACA;AACA;;AAGA;;AAGA;AACA,OAAO,MAAMA,qBAAqB,GAAG,CAAC;;AAEtC;AACA,OAAO,MAAMC,qBAAqB,GAAG,CAAC;;AAEtC;AACA,OAAO,MAAMC,WAAkC,GAAG,CAChD,WAAW,EACX,YAAY,EACZ,SAAS,EACT,WAAW,EACX,MAAM,EACN,KAAK,CACN;AAED,OAAO,MAAMC,WAAW,GAAIC,GAAW,IAAcF,WAAW,CAACG,QAAQ,CAACD,GAAG,CAAC;AAE9E,OAAO,MAAME,KAAK,GAAGA,CAACC,CAAS,EAAEC,EAAU,EAAEC,EAAW,KACtDC,IAAI,CAACC,GAAG,CAACF,EAAE,WAAFA,EAAE,GAAIG,MAAM,CAACC,iBAAiB,EAAEH,IAAI,CAACI,GAAG,CAACN,EAAE,EAAED,CAAC,CAAC,CAAC;AAE3D,OAAO,MAAMQ,IAAI,GAAGA,CAACR,CAAS,EAAES,IAAa,KAC3CA,IAAI,IAAIA,IAAI,GAAG,CAAC,GAAGN,IAAI,CAACO,KAAK,CAACV,CAAC,GAAGS,IAAI,CAAC,GAAGA,IAAI,GAAGT,CAAC;AAEpD,OAAO,MAAMW,SAAS,GAAGA,CACvBC,IAAqB,EACrBC,UAAiC,MACL;EAC5BC,CAAC,EAAEF,IAAI,CAACE,CAAC;EACTC,CAAC,EAAEH,IAAI,CAACG,CAAC;EACTF;AACF,CAAC,CAAC;;AAEF;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMG,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ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resizePolicy.test.d.ts","sourceRoot":"","sources":["../../../../src/components/StackedCard/resizePolicy.test.ts"],"names":[],"mappings":""}