@g9tm/lynxcontrols 1.6.1 → 1.7.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.
@@ -40,6 +40,13 @@
40
40
  right: 0;
41
41
  }
42
42
 
43
+ .g9-slider__band {
44
+ border-radius: 4px;
45
+ height: 8px;
46
+ position: absolute;
47
+ top: 10px;
48
+ }
49
+
43
50
  .g9-slider__thumb {
44
51
  width: 28px;
45
52
  height: 28px;
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack://./src/range-slider/range-slider.css"],"names":[],"mappings":"AAAA;EACE,sBAAsB;EACtB,uBAAuB;EACvB,kBAAkB;EAClB,mBAAmB;EACnB,aAAa;EACb,kBAAkB;AACpB;;AAKA;EAFE,2BAA2B;EAC3B,iBAAiB;AACnB;;AAKA;EAFE,YAAY;AACd;;AAKA;EAFE,uBAAuB;EACvB,YAAY;EACZ,aAAa;AACf;;AAOA;EAJE,2CAA2C;EAC3C,kBAAkB;EAClB,OAAO;EACP,WAAW;EACX,kBAAkB;AACpB;;AAOA;EAJE,mCAAmC;EACnC,kBAAkB;EAClB,WAAW;EACX,kBAAkB;EAClB,SAAS;EACT,OAAO;EACP,QAAQ;AACV;;AAQA;EALE,WAAW;EACX,YAAY;AACd;;AAQA;EALE,mBAAmB;EACnB,mBAAmB;EACnB,+BAA+B;EAC/B,mCAAmC;EACnC,mBAAmB;EACnB,WAAW;EACX,YAAY;AACd;;AAQA;EALE,iBAAiB;AACnB;;AAQA;EALE,2CAA2C;EAC3C,mBAAmB;EACnB,uBAAuB;EACvB,mBAAmB;EACnB,eAAe;EACf,YAAY;EACZ,kBAAkB;EAClB,iBAAiB;EACjB,kBAAkB;EAClB,aAAa;EACb,kBAAkB;EAClB,QAAQ;AACV;;AAQA;EALE,mCAAmC;EACnC,eAAe;AACjB;;AAUA;EAPE,uBAAuB;EACvB,qBAAqB;EACrB,YAAY;EACZ,YAAY;EACZ,kBAAkB;EAClB,aAAa;EACb,kBAAkB;EAClB,QAAQ;AACV;;AAUA;EAPE,kBAAkB;EAClB,+BAA+B;EAC/B,eAAe;AACjB;;AAUA;EAPE,mBAAmB;EACnB,8BAA8B;EAC9B,gBAAgB;EAChB,aAAa;AACf;;AAUA;EAPE,+BAA+B;EAC/B,eAAe;AACjB","sourcesContent":[".g9-slider {\n position: relative;\n display: flex;\n flex-direction: column;\n justify-content: center;\n padding-left: 16px;\n padding-right: 16px;\n}\n\n/* MAUI G9RangeSliderDrawable with labels: the track's centre at SliderTrackY (52) of the 104 dp canvas — the room above\n is the drag tooltip's — and the end labels SliderLabelGap (18) under the thumb. Centring the column put the track at\n ~34 dp, 18 dp higher than MAUI's. */\n.g9-slider--labels {\n justify-content: flex-start;\n padding-top: 38px;\n}\n\n.g9-slider--disabled {\n opacity: 0.38;\n}\n\n.g9-slider__root {\n height: 28px;\n display: flex;\n justify-content: center;\n}\n\n/* lynx-ui SliderTrack: a 28 px flex row holding this view (the visible track) next to the fill and the thumbs, which\n position against the 28 px row. The track takes the row's width; the fill is the 8 px band at its centre. */\n.g9-slider__track {\n position: relative;\n flex: 1;\n height: 8px;\n border-radius: 4px;\n background-color: var(--g9-surface-variant);\n}\n\n.g9-slider__fill {\n position: absolute;\n top: 10px;\n left: 0px;\n right: 0px;\n height: 8px;\n border-radius: 4px;\n background-color: var(--g9-primary);\n}\n\n/* lynx-ui SliderThumb centres this view on the value (top 50 %, translate -50 %). */\n.g9-slider__thumb {\n width: 28px;\n height: 28px;\n}\n\n.g9-slider__thumb-dot {\n width: 28px;\n height: 28px;\n border-radius: 14px;\n border-width: 2.5px;\n border-style: solid;\n border-color: var(--g9-primary);\n background-color: var(--g9-surface);\n}\n\n.g9-slider__thumb-dot--active {\n border-width: 3px;\n}\n\n.g9-slider__tooltip {\n position: absolute;\n top: 4px;\n height: 26px;\n margin-left: -21px;\n min-width: 42px;\n padding-left: 8px;\n padding-right: 8px;\n border-radius: 13px;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: var(--g9-inverse-surface);\n}\n\n.g9-slider__tooltip-text {\n font-size: 12px;\n color: var(--g9-inverse-on-surface);\n}\n\n/* MAUI 1.4.9 ShowThumbValues: each value above its thumb, always — a 100 px box centred on the thumb, its text at the\n box's bottom 18 px above the thumb (track 52 − radius 14 − gap 18 − 18 = 2 from the top), 12 px TextSecondary. */\n.g9-slider__thumb-value {\n position: absolute;\n top: 2px;\n width: 100px;\n height: 18px;\n margin-left: -50px;\n display: flex;\n align-items: flex-end;\n justify-content: center;\n}\n\n.g9-slider__thumb-value-text {\n font-size: 12px;\n text-align: center;\n color: var(--g9-text-secondary);\n}\n\n.g9-slider__labels {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n margin-top: 18px;\n}\n\n.g9-slider__label {\n font-size: 12px;\n color: var(--g9-text-secondary);\n}\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack://./src/range-slider/range-slider.css"],"names":[],"mappings":"AAAA;EACE,sBAAsB;EACtB,uBAAuB;EACvB,kBAAkB;EAClB,mBAAmB;EACnB,aAAa;EACb,kBAAkB;AACpB;;AAKA;EAFE,2BAA2B;EAC3B,iBAAiB;AACnB;;AAKA;EAFE,YAAY;AACd;;AAKA;EAFE,uBAAuB;EACvB,YAAY;EACZ,aAAa;AACf;;AAOA;EAJE,2CAA2C;EAC3C,kBAAkB;EAClB,OAAO;EACP,WAAW;EACX,kBAAkB;AACpB;;AAOA;EAJE,mCAAmC;EACnC,kBAAkB;EAClB,WAAW;EACX,kBAAkB;EAClB,SAAS;EACT,OAAO;EACP,QAAQ;AACV;;AAQA;EALE,kBAAkB;EAClB,WAAW;EACX,kBAAkB;EAClB,SAAS;AACX;;AASA;EANE,WAAW;EACX,YAAY;AACd;;AASA;EANE,mBAAmB;EACnB,mBAAmB;EACnB,+BAA+B;EAC/B,mCAAmC;EACnC,mBAAmB;EACnB,WAAW;EACX,YAAY;AACd;;AASA;EANE,iBAAiB;AACnB;;AASA;EANE,2CAA2C;EAC3C,mBAAmB;EACnB,uBAAuB;EACvB,mBAAmB;EACnB,eAAe;EACf,YAAY;EACZ,kBAAkB;EAClB,iBAAiB;EACjB,kBAAkB;EAClB,aAAa;EACb,kBAAkB;EAClB,QAAQ;AACV;;AASA;EANE,mCAAmC;EACnC,eAAe;AACjB;;AAWA;EARE,uBAAuB;EACvB,qBAAqB;EACrB,YAAY;EACZ,YAAY;EACZ,kBAAkB;EAClB,aAAa;EACb,kBAAkB;EAClB,QAAQ;AACV;;AAWA;EARE,kBAAkB;EAClB,+BAA+B;EAC/B,eAAe;AACjB;;AAWA;EARE,mBAAmB;EACnB,8BAA8B;EAC9B,gBAAgB;EAChB,aAAa;AACf;;AAWA;EARE,+BAA+B;EAC/B,eAAe;AACjB","sourcesContent":[".g9-slider {\n position: relative;\n display: flex;\n flex-direction: column;\n justify-content: center;\n padding-left: 16px;\n padding-right: 16px;\n}\n\n/* MAUI G9RangeSliderDrawable with labels: the track's centre at SliderTrackY (52) of the 104 dp canvas — the room above\n is the drag tooltip's — and the end labels SliderLabelGap (18) under the thumb. Centring the column put the track at\n ~34 dp, 18 dp higher than MAUI's. */\n.g9-slider--labels {\n justify-content: flex-start;\n padding-top: 38px;\n}\n\n.g9-slider--disabled {\n opacity: 0.38;\n}\n\n.g9-slider__root {\n height: 28px;\n display: flex;\n justify-content: center;\n}\n\n/* lynx-ui SliderTrack: a 28 px flex row holding this view (the visible track) next to the fill and the thumbs, which\n position against the 28 px row. The track takes the row's width; the fill is the 8 px band at its centre. */\n.g9-slider__track {\n position: relative;\n flex: 1;\n height: 8px;\n border-radius: 4px;\n background-color: var(--g9-surface-variant);\n}\n\n.g9-slider__fill {\n position: absolute;\n top: 10px;\n left: 0px;\n right: 0px;\n height: 8px;\n border-radius: 4px;\n background-color: var(--g9-primary);\n}\n\n/* A `bands` stretch: the fill's band, under it. */\n.g9-slider__band {\n position: absolute;\n top: 10px;\n height: 8px;\n border-radius: 4px;\n}\n\n/* lynx-ui SliderThumb centres this view on the value (top 50 %, translate -50 %). */\n.g9-slider__thumb {\n width: 28px;\n height: 28px;\n}\n\n.g9-slider__thumb-dot {\n width: 28px;\n height: 28px;\n border-radius: 14px;\n border-width: 2.5px;\n border-style: solid;\n border-color: var(--g9-primary);\n background-color: var(--g9-surface);\n}\n\n.g9-slider__thumb-dot--active {\n border-width: 3px;\n}\n\n.g9-slider__tooltip {\n position: absolute;\n top: 4px;\n height: 26px;\n margin-left: -21px;\n min-width: 42px;\n padding-left: 8px;\n padding-right: 8px;\n border-radius: 13px;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: var(--g9-inverse-surface);\n}\n\n.g9-slider__tooltip-text {\n font-size: 12px;\n color: var(--g9-inverse-on-surface);\n}\n\n/* MAUI 1.4.9 ShowThumbValues: each value above its thumb, always — a 100 px box centred on the thumb, its text at the\n box's bottom 18 px above the thumb (track 52 − radius 14 − gap 18 − 18 = 2 from the top), 12 px TextSecondary. */\n.g9-slider__thumb-value {\n position: absolute;\n top: 2px;\n width: 100px;\n height: 18px;\n margin-left: -50px;\n display: flex;\n align-items: flex-end;\n justify-content: center;\n}\n\n.g9-slider__thumb-value-text {\n font-size: 12px;\n text-align: center;\n color: var(--g9-text-secondary);\n}\n\n.g9-slider__labels {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n margin-top: 18px;\n}\n\n.g9-slider__label {\n font-size: 12px;\n color: var(--g9-text-secondary);\n}\n"],"sourceRoot":""}
@@ -49,6 +49,23 @@ export interface G9RangeSliderProps {
49
49
  readonly onValueChanged?: (value: number) => void;
50
50
  readonly accessibilityLabel?: string;
51
51
  readonly className?: string;
52
+ /**
53
+ * Coloured stretches of the track, drawn under the fill (since 1.6.2): a part of the scale that already means
54
+ * something — AgriPad's drone levels already stored on the device. Each from/to is clamped to the track.
55
+ */
56
+ readonly bands?: readonly G9SliderBand[];
57
+ /**
58
+ * Range mode: the lowest value the START thumb may take, the track keeping its whole scale (since 1.6.2). A drag below
59
+ * it stops there — the stored part of a range is shown but not chosen again.
60
+ */
61
+ readonly minimumStart?: number;
62
+ }
63
+ /** A coloured stretch of a {@link G9RangeSlider}'s track (`bands`). */
64
+ export interface G9SliderBand {
65
+ readonly from: number;
66
+ readonly to: number;
67
+ /** A colour or a theme variable (`var(--g9-…)`). */
68
+ readonly color: string;
52
69
  }
53
70
  /** Arrow/Home/End handling of the desktop keyboard: the new value, or `null` for another key. */
54
71
  export declare function sliderKeyStep(key: string, value: number, min: number, max: number, step: number, rtl: boolean): number | null;
@@ -1 +1 @@
1
- {"version":3,"file":"range-slider.d.ts","sourceRoot":"","sources":["../../src/range-slider/range-slider.tsx"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAC;AAC5B,OAAO,EAAe,iBAAiB,EAAW,MAAM,+BAA+B,CAAC;AAExF,OAAO,EAAE,KAAK,SAAS,EAAoB,MAAM,gBAAgB,CAAC;AAclE,gDAAgD;AAChD,eAAO,MAAM,eAAe;;;;;;EAM1B,CAAC;AAEH,sCAAsC;AACtC,MAAM,WAAW,kBAAkB;IACjC,iBAAiB;IACjB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,mBAAmB;IACnB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,6GAA6G;IAC7G,QAAQ,CAAC,IAAI,CAAC,EAAE,iBAAiB,CAAC;IAClC,wCAAwC;IACxC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACjD,wDAAwD;IACxD,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IACpC,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;IA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MAAM,KAAK,IAAI,CAAC;IAClD,QAAQ,CAAC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IACrC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B;;;OAGG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,YAAY,EAAE,CAAC;IACzC;;;OAGG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;CAChC;AAED,uEAAuE;AACvE,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,oDAAoD;IACpD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED,iGAAiG;AACjG,wBAAgB,aAAa,CAC3B,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,EACb,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,OAAO,GACX,MAAM,GAAG,IAAI,CAUf;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,GAAG,SAAS,CAuJlE"}
@@ -24,7 +24,7 @@ function sliderKeyStep(key, value, min, max, step, rtl) {
24
24
  return null;
25
25
  }
26
26
  function G9RangeSlider(props) {
27
- var _props_minimum, _props_maximum, _props_step, _props_defaultValue, _props_defaultRangeStart, _props_defaultRangeEnd, _ref, _props_accessibilityLabel;
27
+ var _props_minimum, _props_maximum, _props_step, _props_defaultValue, _props_defaultRangeStart, _props_defaultRangeEnd, _ref, _props_accessibilityLabel, _props_bands;
28
28
  const culture = useG9Culture();
29
29
  const rtl = 'rtl' === useG9Direction();
30
30
  const primary = useG9Theme().palette.Primary;
@@ -69,6 +69,7 @@ function G9RangeSlider(props) {
69
69
  equals: (a, b)=>a[0] === b[0] && a[1] === b[1]
70
70
  });
71
71
  const [dragging, setDragging] = useState(null);
72
+ const [, setResync] = useState(0);
72
73
  const shown = single ? snap(value) : null;
73
74
  const shownRange = log ? ordered(snap(range[0]), snap(range[1])) : coerceSliderRange(range[0], range[1], min, max, step);
74
75
  const latest = useRef({
@@ -91,10 +92,18 @@ function G9RangeSlider(props) {
91
92
  setValue(next);
92
93
  null == (_latest_current_props_onValueChanged = (_latest_current_props = latest.current.props).onValueChanged) || _latest_current_props_onValueChanged.call(_latest_current_props, next);
93
94
  };
94
- const applyRange = (next)=>{
95
+ const applyRange = (asked)=>{
95
96
  var _latest_current_props_onValueChanged, _latest_current_props;
97
+ const floor = latest.current.props.minimumStart;
98
+ const next = void 0 !== floor && asked[0] < floor ? [
99
+ floor,
100
+ Math.max(floor, asked[1])
101
+ ] : asked;
96
102
  const [s, e] = latest.current.shownRange;
97
- if (next[0] === s && next[1] === e) return;
103
+ if (next[0] === s && next[1] === e) {
104
+ if (next !== asked) setResync((n)=>n + 1);
105
+ return;
106
+ }
98
107
  next[0] !== s ? setDragging((d)=>d ? {
99
108
  index: 0
100
109
  } : d) : setDragging((d)=>d ? {
@@ -161,6 +170,15 @@ function G9RangeSlider(props) {
161
170
  step: step / (bounds.max - bounds.min)
162
171
  } : {}} disabled={true === props.disabled} enableRTL={rtl} onValueChange={onValueChange} onDragging={onDragging} onValueCommit={onCommit}>
163
172
  <SliderTrack className="g9-slider__track">
173
+ {(null != (_props_bands = props.bands) ? _props_bands : []).map((b, i)=>{
174
+ const from = Math.max(0, Math.min(1, ratioOf(Math.min(b.from, b.to))));
175
+ const to = Math.max(0, Math.min(1, ratioOf(Math.max(b.from, b.to))));
176
+ return <view key={`band${i}`} className="g9-slider__band" style={{
177
+ left: at(rtl ? to : from),
178
+ width: `${(to - from) * 100}%`,
179
+ backgroundColor: b.color
180
+ }}/>;
181
+ })}
164
182
  <SliderIndicator className="g9-slider__fill" style={{
165
183
  background: fill
166
184
  }}/>
@@ -1 +1 @@
1
- {"version":3,"file":"range-slider/range-slider.jsx","sources":["../../src/range-slider/range-slider.tsx"],"sourcesContent":["import './range-slider.css';\nimport { formatColor, G9RangeSliderMode, lighten } from '@g9tm/lynxcontrols-foundation';\nimport { SliderIndicator, SliderRoot, SliderThumb, SliderTrack } from '@lynx-js/lynx-ui-slider';\nimport { type ReactNode, useRef, useState } from '@lynx-js/react';\nimport { useControllableState } from '../base/use-controllable-state';\nimport { useG9Culture, useG9Direction, useG9Theme } from '../provider/hooks';\nimport {\n coerceSliderRange,\n formatSliderValue,\n isLogTrack,\n sliderBounds,\n sliderRatio,\n sliderValueAt,\n snapLogValue,\n snapSliderValue,\n} from './math';\n\n/** Layout tokens (MAUI `G9Metrics.Slider*`). */\nexport const g9SliderMetrics = Object.freeze({\n height: 104,\n heightCompact: 36,\n trackHeight: 8,\n thumbRadius: 14,\n horizontalInset: 16,\n});\n\n/** Props of {@link G9RangeSlider}. */\nexport interface G9RangeSliderProps {\n /** Default 0. */\n readonly minimum?: number;\n /** Default 100. */\n readonly maximum?: number;\n /** `'single'` (one thumb, `value`) or `'range'` (two thumbs, `rangeStart`/`rangeEnd`). Default `'range'`. */\n readonly mode?: G9RangeSliderMode;\n /** Single mode value (MAUI `Value`). */\n readonly value?: number;\n readonly defaultValue?: number;\n readonly onValueChange?: (value: number) => void;\n /** Range mode thumbs (MAUI `RangeStart`/`RangeEnd`). */\n readonly rangeStart?: number;\n readonly rangeEnd?: number;\n readonly defaultRangeStart?: number;\n readonly defaultRangeEnd?: number;\n readonly onRangeChange?: (start: number, end: number) => void;\n /** Snap interval; 0 = continuous. Default 1. */\n readonly step?: number;\n /** Min/max edge labels and the drag tooltip (false = compact 36 px). Default true. */\n readonly showLabels?: boolean;\n /** .NET-style number format of labels and tooltip (`\"0\"`, `\"0.0\"`, `\"0°\"`). Default `\"0\"`. */\n readonly valueFormat?: string | null;\n /**\n * A LOGARITHMIC track (MAUI 1.4.9): equal distances are equal ratios, so a range over orders of magnitude (site areas\n * 787 to 56,475 ha, AgriPad's site filter) is usable at both ends. Needs `minimum > 0` (else linear); the value then\n * snaps to two significant figures instead of `step`. Default false.\n */\n readonly logarithmic?: boolean;\n /**\n * Each thumb's value drawn ABOVE it at all times, following it (MAUI 1.4.9, the design's «مساحت (هکتار)» readout); the\n * min / max edge labels and the drag tooltip are then not drawn. Needs `showLabels` (it uses their room). Default false.\n */\n readonly showThumbValues?: boolean;\n readonly disabled?: boolean;\n /** After the user changed a value: the single value, or the range end (MAUI `ValueChanged`). */\n readonly onValueChanged?: (value: number) => void;\n readonly accessibilityLabel?: string;\n readonly className?: string;\n}\n\n/** Arrow/Home/End handling of the desktop keyboard: the new value, or `null` for another key. */\nexport function sliderKeyStep(\n key: string,\n value: number,\n min: number,\n max: number,\n step: number,\n rtl: boolean,\n): number | null {\n const b = sliderBounds(min, max);\n const delta = step > 0 ? step : (b.max - b.min) / 100;\n const forward = rtl ? 'ArrowLeft' : 'ArrowRight';\n const back = rtl ? 'ArrowRight' : 'ArrowLeft';\n if (key === forward || key === 'ArrowUp') return snapSliderValue(value + delta, min, max, step);\n if (key === back || key === 'ArrowDown') return snapSliderValue(value - delta, min, max, step);\n if (key === 'Home') return b.min;\n if (key === 'End') return b.max;\n return null;\n}\n\n/**\n * One- or two-thumb slider (MAUI `G9RangeSlider`) on lynx-ui `SliderRoot`: lynx-ui owns the gesture (main-thread\n * drag, thumbs that meet but never cross); G9 maps minimum/maximum/step onto its normalized value, snaps with the\n * MAUI formula, keeps the stored values as given until the user moves them (display is always coerced; MAUI's\n * deferred write-back), paints the fill between the thumbs, shows min/max labels (swapped in RTL) and a tooltip\n * while dragging, and moves with the arrow keys on desktop.\n */\nexport function G9RangeSlider(props: G9RangeSliderProps): ReactNode {\n const culture = useG9Culture();\n const rtl = useG9Direction() === 'rtl';\n const primary = useG9Theme().palette.Primary;\n // MAUI G9RangeSliderDrawable: saturated at the minimum end, 22 % lighter towards the value, in reading direction.\n const fill = `linear-gradient(to ${rtl ? 'left' : 'right'}, ${formatColor(primary)}, ${formatColor(lighten(primary, 0.22))})`;\n const min = props.minimum ?? 0;\n const max = props.maximum ?? 100;\n const step = props.step ?? 1;\n const single = props.mode === G9RangeSliderMode.Single;\n const labels = props.showLabels !== false;\n const bounds = sliderBounds(min, max);\n const log = isLogTrack(props.logarithmic, bounds.min, bounds.max);\n const thumbValues = labels && props.showThumbValues === true;\n // MAUI Snap: a logarithmic track with a step snaps to two significant figures, a linear one to `step`; `step <= 0` is\n // continuous on both (clamped only).\n const snap = (v: number) => (log && step > 0 ? snapLogValue(v, min, max) : snapSliderValue(v, min, max, step));\n const ordered = (a: number, b: number): readonly [number, number] => (a <= b ? [a, b] : [b, a]);\n const ratioOf = (v: number) => sliderRatio(v, min, max, log);\n const [value, setValue] = useControllableState<number>({\n value: props.value,\n defaultValue: props.defaultValue ?? 0,\n onChange: props.onValueChange,\n name: 'G9RangeSlider.value',\n });\n const [range, setRange] = useControllableState<readonly [number, number], []>({\n value:\n props.rangeStart !== undefined && props.rangeEnd !== undefined ? [props.rangeStart, props.rangeEnd] : undefined,\n defaultValue: [props.defaultRangeStart ?? 0, props.defaultRangeEnd ?? 100],\n onChange: (r) => props.onRangeChange?.(r[0], r[1]),\n name: 'G9RangeSlider.range',\n equals: (a, b) => a[0] === b[0] && a[1] === b[1],\n });\n const [dragging, setDragging] = useState<{ index: 0 | 1 } | null>(null);\n const shown = single ? snap(value) : null;\n const shownRange = log\n ? ordered(snap(range[0]), snap(range[1]))\n : coerceSliderRange(range[0], range[1], min, max, step);\n const latest = useRef({ props, shownRange, shown });\n latest.current = { props, shownRange, shown };\n const fmt = (v: number) => formatSliderValue(v, props.valueFormat ?? '0', culture);\n\n const applySingle = (next: number) => {\n if (next === latest.current.shown) return;\n setValue(next);\n latest.current.props.onValueChanged?.(next);\n };\n const applyRange = (next: readonly [number, number]) => {\n const [s, e] = latest.current.shownRange;\n if (next[0] === s && next[1] === e) return;\n if (next[0] !== s) setDragging((d) => (d ? { index: 0 } : d));\n else setDragging((d) => (d ? { index: 1 } : d));\n setRange(next);\n latest.current.props.onValueChanged?.(next[1]);\n };\n const onValueChange = (v: number | readonly [number, number], source: 'external' | 'drag') => {\n if (source !== 'drag' || props.disabled) return;\n if (typeof v === 'number') applySingle(snap(sliderValueAt(v, min, max, log)));\n else applyRange(ordered(snap(sliderValueAt(v[0], min, max, log)), snap(sliderValueAt(v[1], min, max, log))));\n };\n // lynx-ui reports the drag start and end through `onDragging`; the commit closes it for sure.\n const onDragging = () => setDragging((d) => (d ? null : { index: 1 }));\n const onCommit = () => setDragging(null);\n const onKey = (e: { detail?: { key?: string } }) => {\n if (props.disabled) return;\n const key = e.detail?.key ?? '';\n if (single) {\n const next = sliderKeyStep(key, shown as number, min, max, step, rtl);\n if (next !== null) applySingle(next);\n return;\n }\n // Keys move the end thumb, never past the start (and vice versa with Shift-less Home).\n const [s, end] = shownRange;\n const next = sliderKeyStep(key, end, min, max, step, rtl);\n if (next !== null) applyRange([Math.min(s, next), Math.max(s, next)]);\n };\n\n const sliderValue = single ? ratioOf(shown as number) : ([ratioOf(shownRange[0]), ratioOf(shownRange[1])] as const);\n const tooltipValue = single ? (shown as number) : shownRange[dragging?.index ?? 1];\n const tooltipRatio = ratioOf(tooltipValue);\n const at = (ratio: number) => `${(rtl ? 1 - ratio : ratio) * 100}%`;\n const thumb = (index: 0 | 1) => (\n <SliderThumb key={index} index={index} className=\"g9-slider__thumb\">\n <view\n className={`g9-slider__thumb-dot${dragging && dragging.index === index ? ' g9-slider__thumb-dot--active' : ''}`}\n />\n </SliderThumb>\n );\n return (\n <view\n className={`g9-slider${labels ? ' g9-slider--labels' : ' g9-slider--compact'}${props.disabled ? ' g9-slider--disabled' : ''}${props.className ? ` ${props.className}` : ''}`}\n style={{ height: `${labels ? g9SliderMetrics.height : g9SliderMetrics.heightCompact}px` }}\n accessibility-element={true}\n accessibility-label={props.accessibilityLabel ?? ''}\n accessibility-value={single ? fmt(shown as number) : `${fmt(shownRange[0])} – ${fmt(shownRange[1])}`}\n bindkeydown={onKey}\n >\n {labels && dragging && !thumbValues ? (\n <view className=\"g9-slider__tooltip\" style={{ left: at(tooltipRatio) }}>\n <text className=\"g9-slider__tooltip-text\">{fmt(tooltipValue)}</text>\n </view>\n ) : null}\n {thumbValues\n ? (single ? [shown as number] : [shownRange[0], shownRange[1]]).map((v, i) => (\n <view key={`v${i}`} className=\"g9-slider__thumb-value\" style={{ left: at(ratioOf(v)) }}>\n <text className=\"g9-slider__thumb-value-text\">{fmt(v)}</text>\n </view>\n ))\n : null}\n <SliderRoot\n className=\"g9-slider__root\"\n value={sliderValue as number}\n {...(step > 0 && !log ? { step: step / (bounds.max - bounds.min) } : {})}\n disabled={props.disabled === true}\n enableRTL={rtl}\n onValueChange={onValueChange as (v: number, s: 'external' | 'drag') => void}\n onDragging={onDragging}\n onValueCommit={onCommit}\n >\n <SliderTrack className=\"g9-slider__track\">\n <SliderIndicator className=\"g9-slider__fill\" style={{ background: fill }} />\n {single ? thumb(0) : [thumb(0), thumb(1)]}\n </SliderTrack>\n </SliderRoot>\n {labels && !thumbValues ? (\n <view className=\"g9-slider__labels\">\n <text className=\"g9-slider__label\">{fmt(rtl ? bounds.max : bounds.min)}</text>\n <text className=\"g9-slider__label\">{fmt(rtl ? bounds.min : bounds.max)}</text>\n </view>\n ) : null}\n </view>\n );\n}\n"],"names":["g9SliderMetrics","Object","sliderKeyStep","key","value","min","max","step","rtl","b","sliderBounds","delta","forward","back","snapSliderValue","G9RangeSlider","props","_props_minimum","_props_maximum","_props_step","_props_defaultValue","_props_defaultRangeStart","_props_defaultRangeEnd","_props_accessibilityLabel","culture","useG9Culture","useG9Direction","primary","useG9Theme","fill","formatColor","lighten","single","G9RangeSliderMode","labels","bounds","log","isLogTrack","thumbValues","snap","v","snapLogValue","ordered","a","ratioOf","sliderRatio","setValue","useControllableState","range","setRange","undefined","r","dragging","setDragging","useState","shown","shownRange","coerceSliderRange","latest","useRef","fmt","_props_valueFormat","formatSliderValue","applySingle","next","_latest_current_props","applyRange","s","e","d","onValueChange","source","sliderValueAt","onDragging","onCommit","onKey","_e_detail","end","Math","sliderValue","tooltipValue","tooltipRatio","at","ratio","thumb","index","SliderThumb","view","text","i","SliderRoot","SliderTrack","SliderIndicator"],"mappings":";;;;;;;AAkBO,MAAMA,kBAAkBC,OAAO,MAAM,CAAC;IAC3C,QAAQ;IACR,eAAe;IACf,aAAa;IACb,aAAa;IACb,iBAAiB;AACnB;AA6CO,SAASC,cACdC,GAAW,EACXC,KAAa,EACbC,GAAW,EACXC,GAAW,EACXC,IAAY,EACZC,GAAY;IAEZ,MAAMC,IAAIC,aAAaL,KAAKC;IAC5B,MAAMK,QAAQJ,OAAO,IAAIA,OAAQE,AAAAA,CAAAA,EAAE,GAAG,GAAGA,EAAE,GAAE,IAAK;IAClD,MAAMG,UAAUJ,MAAM,cAAc;IACpC,MAAMK,OAAOL,MAAM,eAAe;IAClC,IAAIL,QAAQS,WAAWT,AAAQ,cAARA,KAAmB,OAAOW,gBAAgBV,QAAQO,OAAON,KAAKC,KAAKC;IAC1F,IAAIJ,QAAQU,QAAQV,AAAQ,gBAARA,KAAqB,OAAOW,gBAAgBV,QAAQO,OAAON,KAAKC,KAAKC;IACzF,IAAIJ,AAAQ,WAARA,KAAgB,OAAOM,EAAE,GAAG;IAChC,IAAIN,AAAQ,UAARA,KAAe,OAAOM,EAAE,GAAG;IAC/B,OAAO;AACT;AASO,SAASM,cAAcC,KAAyB;QAMzCC,gBACAC,gBACCC,aAaGC,qBAOCC,0BAA8BC,wBAAAA,MAiEtBC;IA5FzB,MAAMC,UAAUC;IAChB,MAAMjB,MAAMkB,AAAqB,UAArBA;IACZ,MAAMC,UAAUC,aAAa,OAAO,CAAC,OAAO;IAE5C,MAAMC,OAAO,CAAC,mBAAmB,EAAErB,MAAM,SAAS,QAAQ,EAAE,EAAEsB,YAAYH,SAAS,EAAE,EAAEG,YAAYC,QAAQJ,SAAS,OAAO,CAAC,CAAC;IAC7H,MAAMtB,MAAM,QAAAY,CAAAA,iBAAAA,MAAM,OAAO,AAAD,IAAZA,iBAAiB;I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OAAO,GAAG,IAAIqD,KAAK;QAChF,EAAED,QACA,KAAK;IACX,EAAEA;AAEN"}
1
+ {"version":3,"file":"range-slider/range-slider.jsx","sources":["../../src/range-slider/range-slider.tsx"],"sourcesContent":["import './range-slider.css';\nimport { formatColor, G9RangeSliderMode, lighten } from '@g9tm/lynxcontrols-foundation';\nimport { SliderIndicator, SliderRoot, SliderThumb, SliderTrack } from '@lynx-js/lynx-ui-slider';\nimport { type ReactNode, useRef, useState } from '@lynx-js/react';\nimport { useControllableState } from '../base/use-controllable-state';\nimport { useG9Culture, useG9Direction, useG9Theme } from '../provider/hooks';\nimport {\n coerceSliderRange,\n formatSliderValue,\n isLogTrack,\n sliderBounds,\n sliderRatio,\n sliderValueAt,\n snapLogValue,\n snapSliderValue,\n} from './math';\n\n/** Layout tokens (MAUI `G9Metrics.Slider*`). */\nexport const g9SliderMetrics = Object.freeze({\n height: 104,\n heightCompact: 36,\n trackHeight: 8,\n thumbRadius: 14,\n horizontalInset: 16,\n});\n\n/** Props of {@link G9RangeSlider}. */\nexport interface G9RangeSliderProps {\n /** Default 0. */\n readonly minimum?: number;\n /** Default 100. */\n readonly maximum?: number;\n /** `'single'` (one thumb, `value`) or `'range'` (two thumbs, `rangeStart`/`rangeEnd`). Default `'range'`. */\n readonly mode?: G9RangeSliderMode;\n /** Single mode value (MAUI `Value`). */\n readonly value?: number;\n readonly defaultValue?: number;\n readonly onValueChange?: (value: number) => void;\n /** Range mode thumbs (MAUI `RangeStart`/`RangeEnd`). */\n readonly rangeStart?: number;\n readonly rangeEnd?: number;\n readonly defaultRangeStart?: number;\n readonly defaultRangeEnd?: number;\n readonly onRangeChange?: (start: number, end: number) => void;\n /** Snap interval; 0 = continuous. Default 1. */\n readonly step?: number;\n /** Min/max edge labels and the drag tooltip (false = compact 36 px). Default true. */\n readonly showLabels?: boolean;\n /** .NET-style number format of labels and tooltip (`\"0\"`, `\"0.0\"`, `\"0°\"`). Default `\"0\"`. */\n readonly valueFormat?: string | null;\n /**\n * A LOGARITHMIC track (MAUI 1.4.9): equal distances are equal ratios, so a range over orders of magnitude (site areas\n * 787 to 56,475 ha, AgriPad's site filter) is usable at both ends. Needs `minimum > 0` (else linear); the value then\n * snaps to two significant figures instead of `step`. Default false.\n */\n readonly logarithmic?: boolean;\n /**\n * Each thumb's value drawn ABOVE it at all times, following it (MAUI 1.4.9, the design's «مساحت (هکتار)» readout); the\n * min / max edge labels and the drag tooltip are then not drawn. Needs `showLabels` (it uses their room). Default false.\n */\n readonly showThumbValues?: boolean;\n readonly disabled?: boolean;\n /** After the user changed a value: the single value, or the range end (MAUI `ValueChanged`). */\n readonly onValueChanged?: (value: number) => void;\n readonly accessibilityLabel?: string;\n readonly className?: string;\n /**\n * Coloured stretches of the track, drawn under the fill (since 1.6.2): a part of the scale that already means\n * something — AgriPad's drone levels already stored on the device. Each from/to is clamped to the track.\n */\n readonly bands?: readonly G9SliderBand[];\n /**\n * Range mode: the lowest value the START thumb may take, the track keeping its whole scale (since 1.6.2). A drag below\n * it stops there — the stored part of a range is shown but not chosen again.\n */\n readonly minimumStart?: number;\n}\n\n/** A coloured stretch of a {@link G9RangeSlider}'s track (`bands`). */\nexport interface G9SliderBand {\n readonly from: number;\n readonly to: number;\n /** A colour or a theme variable (`var(--g9-…)`). */\n readonly color: string;\n}\n\n/** Arrow/Home/End handling of the desktop keyboard: the new value, or `null` for another key. */\nexport function sliderKeyStep(\n key: string,\n value: number,\n min: number,\n max: number,\n step: number,\n rtl: boolean,\n): number | null {\n const b = sliderBounds(min, max);\n const delta = step > 0 ? step : (b.max - b.min) / 100;\n const forward = rtl ? 'ArrowLeft' : 'ArrowRight';\n const back = rtl ? 'ArrowRight' : 'ArrowLeft';\n if (key === forward || key === 'ArrowUp') return snapSliderValue(value + delta, min, max, step);\n if (key === back || key === 'ArrowDown') return snapSliderValue(value - delta, min, max, step);\n if (key === 'Home') return b.min;\n if (key === 'End') return b.max;\n return null;\n}\n\n/**\n * One- or two-thumb slider (MAUI `G9RangeSlider`) on lynx-ui `SliderRoot`: lynx-ui owns the gesture (main-thread\n * drag, thumbs that meet but never cross); G9 maps minimum/maximum/step onto its normalized value, snaps with the\n * MAUI formula, keeps the stored values as given until the user moves them (display is always coerced; MAUI's\n * deferred write-back), paints the fill between the thumbs, shows min/max labels (swapped in RTL) and a tooltip\n * while dragging, and moves with the arrow keys on desktop.\n */\nexport function G9RangeSlider(props: G9RangeSliderProps): ReactNode {\n const culture = useG9Culture();\n const rtl = useG9Direction() === 'rtl';\n const primary = useG9Theme().palette.Primary;\n // MAUI G9RangeSliderDrawable: saturated at the minimum end, 22 % lighter towards the value, in reading direction.\n const fill = `linear-gradient(to ${rtl ? 'left' : 'right'}, ${formatColor(primary)}, ${formatColor(lighten(primary, 0.22))})`;\n const min = props.minimum ?? 0;\n const max = props.maximum ?? 100;\n const step = props.step ?? 1;\n const single = props.mode === G9RangeSliderMode.Single;\n const labels = props.showLabels !== false;\n const bounds = sliderBounds(min, max);\n const log = isLogTrack(props.logarithmic, bounds.min, bounds.max);\n const thumbValues = labels && props.showThumbValues === true;\n // MAUI Snap: a logarithmic track with a step snaps to two significant figures, a linear one to `step`; `step <= 0` is\n // continuous on both (clamped only).\n const snap = (v: number) => (log && step > 0 ? snapLogValue(v, min, max) : snapSliderValue(v, min, max, step));\n const ordered = (a: number, b: number): readonly [number, number] => (a <= b ? [a, b] : [b, a]);\n const ratioOf = (v: number) => sliderRatio(v, min, max, log);\n const [value, setValue] = useControllableState<number>({\n value: props.value,\n defaultValue: props.defaultValue ?? 0,\n onChange: props.onValueChange,\n name: 'G9RangeSlider.value',\n });\n const [range, setRange] = useControllableState<readonly [number, number], []>({\n value:\n props.rangeStart !== undefined && props.rangeEnd !== undefined ? [props.rangeStart, props.rangeEnd] : undefined,\n defaultValue: [props.defaultRangeStart ?? 0, props.defaultRangeEnd ?? 100],\n onChange: (r) => props.onRangeChange?.(r[0], r[1]),\n name: 'G9RangeSlider.range',\n equals: (a, b) => a[0] === b[0] && a[1] === b[1],\n });\n const [dragging, setDragging] = useState<{ index: 0 | 1 } | null>(null);\n // A drag stopped at `minimumStart` changes no value; a render hands lynx-ui the clamped value back for its thumb.\n const [, setResync] = useState(0);\n const shown = single ? snap(value) : null;\n const shownRange = log\n ? ordered(snap(range[0]), snap(range[1]))\n : coerceSliderRange(range[0], range[1], min, max, step);\n const latest = useRef({ props, shownRange, shown });\n latest.current = { props, shownRange, shown };\n const fmt = (v: number) => formatSliderValue(v, props.valueFormat ?? '0', culture);\n\n const applySingle = (next: number) => {\n if (next === latest.current.shown) return;\n setValue(next);\n latest.current.props.onValueChanged?.(next);\n };\n const applyRange = (asked: readonly [number, number]) => {\n const floor = latest.current.props.minimumStart;\n const next: readonly [number, number] =\n floor !== undefined && asked[0] < floor ? [floor, Math.max(floor, asked[1])] : asked;\n const [s, e] = latest.current.shownRange;\n if (next[0] === s && next[1] === e) {\n if (next !== asked) setResync((n) => n + 1);\n return;\n }\n if (next[0] !== s) setDragging((d) => (d ? { index: 0 } : d));\n else setDragging((d) => (d ? { index: 1 } : d));\n setRange(next);\n latest.current.props.onValueChanged?.(next[1]);\n };\n const onValueChange = (v: number | readonly [number, number], source: 'external' | 'drag') => {\n if (source !== 'drag' || props.disabled) return;\n if (typeof v === 'number') applySingle(snap(sliderValueAt(v, min, max, log)));\n else applyRange(ordered(snap(sliderValueAt(v[0], min, max, log)), snap(sliderValueAt(v[1], min, max, log))));\n };\n // lynx-ui reports the drag start and end through `onDragging`; the commit closes it for sure.\n const onDragging = () => setDragging((d) => (d ? null : { index: 1 }));\n const onCommit = () => setDragging(null);\n const onKey = (e: { detail?: { key?: string } }) => {\n if (props.disabled) return;\n const key = e.detail?.key ?? '';\n if (single) {\n const next = sliderKeyStep(key, shown as number, min, max, step, rtl);\n if (next !== null) applySingle(next);\n return;\n }\n // Keys move the end thumb, never past the start (and vice versa with Shift-less Home).\n const [s, end] = shownRange;\n const next = sliderKeyStep(key, end, min, max, step, rtl);\n if (next !== null) applyRange([Math.min(s, next), Math.max(s, next)]);\n };\n\n const sliderValue = single ? ratioOf(shown as number) : ([ratioOf(shownRange[0]), ratioOf(shownRange[1])] as const);\n const tooltipValue = single ? (shown as number) : shownRange[dragging?.index ?? 1];\n const tooltipRatio = ratioOf(tooltipValue);\n const at = (ratio: number) => `${(rtl ? 1 - ratio : ratio) * 100}%`;\n const thumb = (index: 0 | 1) => (\n <SliderThumb key={index} index={index} className=\"g9-slider__thumb\">\n <view\n className={`g9-slider__thumb-dot${dragging && dragging.index === index ? ' g9-slider__thumb-dot--active' : ''}`}\n />\n </SliderThumb>\n );\n return (\n <view\n className={`g9-slider${labels ? ' g9-slider--labels' : ' g9-slider--compact'}${props.disabled ? ' g9-slider--disabled' : ''}${props.className ? ` ${props.className}` : ''}`}\n style={{ height: `${labels ? g9SliderMetrics.height : g9SliderMetrics.heightCompact}px` }}\n accessibility-element={true}\n accessibility-label={props.accessibilityLabel ?? ''}\n accessibility-value={single ? fmt(shown as number) : `${fmt(shownRange[0])} – ${fmt(shownRange[1])}`}\n bindkeydown={onKey}\n >\n {labels && dragging && !thumbValues ? (\n <view className=\"g9-slider__tooltip\" style={{ left: at(tooltipRatio) }}>\n <text className=\"g9-slider__tooltip-text\">{fmt(tooltipValue)}</text>\n </view>\n ) : null}\n {thumbValues\n ? (single ? [shown as number] : [shownRange[0], shownRange[1]]).map((v, i) => (\n <view key={`v${i}`} className=\"g9-slider__thumb-value\" style={{ left: at(ratioOf(v)) }}>\n <text className=\"g9-slider__thumb-value-text\">{fmt(v)}</text>\n </view>\n ))\n : null}\n <SliderRoot\n className=\"g9-slider__root\"\n value={sliderValue as number}\n {...(step > 0 && !log ? { step: step / (bounds.max - bounds.min) } : {})}\n disabled={props.disabled === true}\n enableRTL={rtl}\n onValueChange={onValueChange as (v: number, s: 'external' | 'drag') => void}\n onDragging={onDragging}\n onValueCommit={onCommit}\n >\n <SliderTrack className=\"g9-slider__track\">\n {(props.bands ?? []).map((b, i) => {\n const from = Math.max(0, Math.min(1, ratioOf(Math.min(b.from, b.to))));\n const to = Math.max(0, Math.min(1, ratioOf(Math.max(b.from, b.to))));\n return (\n <view\n key={`band${i}`}\n className=\"g9-slider__band\"\n style={{ left: at(rtl ? to : from), width: `${(to - from) * 100}%`, backgroundColor: b.color }}\n />\n );\n })}\n <SliderIndicator className=\"g9-slider__fill\" style={{ background: fill }} />\n {single ? thumb(0) : [thumb(0), thumb(1)]}\n </SliderTrack>\n </SliderRoot>\n {labels && !thumbValues ? (\n <view className=\"g9-slider__labels\">\n <text className=\"g9-slider__label\">{fmt(rtl ? bounds.max : bounds.min)}</text>\n <text className=\"g9-slider__label\">{fmt(rtl ? bounds.min : bounds.max)}</text>\n </view>\n ) : null}\n </view>\n );\n}\n"],"names":["g9SliderMetrics","Object","sliderKeyStep","key","value","min","max","step","rtl","b","sliderBounds","delta","forward","back","snapSliderValue","G9RangeSlider","props","_props_minimum","_props_maximum","_props_step","_props_defaultValue","_props_defaultRangeStart","_props_defaultRangeEnd","_props_accessibilityLabel","_props_bands","culture","useG9Culture","useG9Direction","primary","useG9Theme","fill","formatColor","lighten","single","G9RangeSliderMode","labels","bounds","log","isLogTrack","thumbValues","snap","v","snapLogValue","ordered","a","ratioOf","sliderRatio","setValue","useControllableState","range","setRange","undefined","r","dragging","setDragging","useState","setResync","shown","shownRange","coerceSliderRange","latest","useRef","fmt","_props_valueFormat","formatSliderValue","applySingle","next","_latest_current_props","applyRange","asked","floor","Math","s","e","n","d","onValueChange","source","sliderValueAt","onDragging","onCommit","onKey","_e_detail","end","sliderValue","tooltipValue","tooltipRatio","at","ratio","thumb","index","SliderThumb","view","text","i","SliderRoot","SliderTrack","from","to","SliderIndicator"],"mappings":";;;;;;;AAkBO,MAAMA,kBAAkBC,OAAO,MAAM,CAAC;IAC3C,QAAQ;IACR,eAAe;IACf,aAAa;IACb,aAAa;IACb,iBAAiB;AACnB;AA+DO,SAASC,cACdC,GAAW,EACXC,KAAa,EACbC,GAAW,EACXC,GAAW,EACXC,IAA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Q,CAAC,QAAQ,EAAE,QAAQ,CAAC,eAAe,CAAC,CAAC;IAC7C,QAAQ,CAAC,IAAI,EAAE,iBAAiB,GAAG,IAAI,CAAC;IACxC,mCAAmC;IACnC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,gEAAgE;IAChE,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,qFAAqF;IACrF,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;CAC9C;AAwBD,wHAAwH;AACxH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,aAAa,GAAG,KAAK,EAC9B,GAAG,EAAE,OAAO,EACZ,OAAO,EAAE,SAAS,aAAa,EAAE,GAChC,MAAM,CAGR;AAUD;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,SAAS,CAybhE"}
@@ -1,6 +1,6 @@
1
1
  import "./sheet.css";
2
2
  import { createAbortController, formatColor, g9Ms, resolveThemeColor, tryParseColor, withAlpha } from "@g9tm/lynxcontrols-foundation";
3
- import { SheetContent, SheetRoot, SheetView } from "@lynx-js/lynx-ui-sheet";
3
+ import { SheetBackdrop, SheetContent, SheetRoot, SheetView } from "@lynx-js/lynx-ui-sheet";
4
4
  import { createContext, useContext, useEffect, useMemo, useRef, useState } from "@lynx-js/react";
5
5
  import { G9AnchorLayerContext } from "../anchor/context.jsx";
6
6
  import { g9IdProps } from "../base/control.jsx";
@@ -19,6 +19,7 @@ const SheetContext = createContext(null);
19
19
  function useG9SheetContext() {
20
20
  return useContext(SheetContext);
21
21
  }
22
+ const noop = ()=>{};
22
23
  function scrimColor(entry, settings, opacity) {
23
24
  const explicit = entry.options.windowBackgroundColor;
24
25
  const parsed = tryParseColor(null != explicit ? explicit : settings.modalOverlayColor);
@@ -266,13 +267,30 @@ function G9SheetFrame(props) {
266
267
  <SheetView className={`g9-sheet__view${modal ? '' : ' g9-sheet__view--passthrough'}`} nativeProps={{
267
268
  'event-through': modal
268
269
  }}>
269
- {modal ? <view event-through={false} flatten={false} className={`g9-sheet__scrim${props.isTop && !closing ? '' : ' g9-sheet__scrim--covered'}`} style={{
270
+ {modal && entry.inheritsDim && 'opening' === entry.status ? <view className="g9-sheet__scrim" style={{
271
+ backgroundColor: scrimColor(entry, settings, opacity)
272
+ }} bindtap={noop}>
273
+ <view className="g9-sheet__scrim-catch" flatten={false} event-through={false} consume-slide-event={[
274
+ [
275
+ -180,
276
+ 180
277
+ ]
278
+ ]} catchtouchmove={noop}/>
279
+ </view> : modal ? <SheetBackdrop clickToClose={false} className={`g9-sheet__scrim${props.isTop && !closing ? '' : ' g9-sheet__scrim--covered'}`} style={{
270
280
  backgroundColor: scrimColor(entry, settings, opacity),
271
- transition: 'ios' === platform && false === o.animateOverlayToColorOnIos ? 'none' : `background-color ${closing ? closeMs : openMs}ms`
272
- }} bindtap={()=>{
281
+ transition: entry.handingOff || 'ios' === platform && false === o.animateOverlayToColorOnIos ? 'none' : `background-color ${closing ? closeMs : openMs}ms`
282
+ }} onClick={()=>{
273
283
  if (!layout.closeOnOverlayTap || 'open' !== entry.status) return;
274
284
  stack.requestBack(entry.id, 'overlayTap');
275
- }}/> : null}
285
+ }}>
286
+ {}
287
+ <view className="g9-sheet__scrim-catch" flatten={false} event-through={false} consume-slide-event={[
288
+ [
289
+ -180,
290
+ 180
291
+ ]
292
+ ]} catchtouchmove={noop}/>
293
+ </SheetBackdrop> : null}
276
294
  {}
277
295
  <SheetContent className={`g9-sheet g9-sheet--${entry.status}${layout.fit ? ' g9-sheet--fit' : ''}`} style={platformSheetConstraints(o)} innerStyle={sheetInnerStyle} {...motion}>
278
296
  <G9SheetGestureFrame refs={gesture} canDrag={!layout.dragDisabled} bodyDrags={false !== o.scrollingExpandsSheet} className="g9-sheet__frame" style={{
@@ -1 +1 @@
1
- {"version":3,"file":"sheet/frame.jsx","sources":["../../src/sheet/frame.tsx"],"sourcesContent":["import './sheet.css';\nimport {\n createAbortController,\n formatColor,\n type G9AbortController,\n type G9AbortSignal,\n g9Ms,\n resolveThemeColor,\n tryParseColor,\n withAlpha,\n} from '@g9tm/lynxcontrols-foundation';\nimport { SheetContent, SheetRoot, type SheetRootRef, SheetView } from '@lynx-js/lynx-ui-sheet';\nimport { createContext, type ReactNode, useContext, useEffect, useMemo, useRef, useState } from '@lynx-js/react';\nimport { G9AnchorLayerContext } from '../anchor/context';\nimport { g9IdProps } from '../base/control';\nimport { type G9TimerHandle, startTimer, stopTimer } from '../base/timers';\nimport { G9ActivityIndicator } from '../display/activity-indicator';\nimport { G9SheetSkeleton } from '../display/shimmer';\nimport { g9FieldNotchStyle } from '../fields/notch';\nimport { useG9Theme } from '../provider/hooks';\nimport { sheetSegmentOf, useG9Place } from '../route/hooks';\nimport { G9SheetGestureFrame, useSheetBodyGesture, useSheetGestureRefs } from './gesture';\nimport { G9SheetFooter, G9SheetHeader } from './header';\nimport type { G9SheetHeightMemo } from './height-memo';\nimport { resolveSheetMotion } from './motion';\nimport type { G9SheetDetent, G9SheetSettings } from './options';\nimport { G9SheetScrollIndicator, G9SheetScrollModel } from './scroll-indicator';\nimport {\n clampFitHeight,\n currentPlatform,\n g9SheetDragCloseThreshold,\n g9SheetFitLoadingMinHeight,\n g9SheetFitMinHeight,\n g9SheetScrollToEndThreshold,\n parentRecedeOffset,\n platformSheetConstraints,\n resolveSheetLayout,\n sheetOverlayOpacity,\n sheetSurfaceBottomPadding,\n sheetSurfaceTopPadding,\n} from './sizing';\nimport type { G9SheetEntry, G9SheetHandle, G9SheetStack } from './stack';\n\n/** What content inside a sheet can read (MAUI `IG9BottomSheetAwareView` + deferred load signals). */\nexport interface G9SheetContextValue {\n /** The sheet-scoped handle: `close()` closes only this sheet. */\n readonly handle: G9SheetHandle;\n /** Aborted when the sheet starts closing (cancel loads with it). */\n readonly signal: G9AbortSignal;\n /** The open motion has finished. */\n readonly opened: boolean;\n /** The sheet is closing. */\n readonly closing: boolean;\n /** Resting body cap of a fit sheet (px), else `null`. */\n readonly maxBodyHeight: number | null;\n}\n\nconst SheetContext = createContext<G9SheetContextValue | null>(null);\n\n/** The enclosing sheet, or `null` outside one. */\nexport function useG9SheetContext(): G9SheetContextValue | null {\n return useContext(SheetContext);\n}\n\n/** Props of {@link G9SheetFrame}. */\nexport interface G9SheetFrameProps {\n readonly entry: G9SheetEntry;\n readonly stack: G9SheetStack;\n /** Host height (px): percentage detents and caps resolve against it. */\n readonly hostHeight: number;\n readonly hostWidth: number;\n readonly topInset: number;\n /** The host's bottom safe inset (a visible navigation bar); the surface pads by it. Default 0. */\n readonly bottomInset?: number;\n readonly settings: Required<G9SheetSettings>;\n readonly memo: G9SheetHeightMemo | null;\n /** Culture tag of the memo key. */\n readonly culture: string;\n /** The sheet is the top of the stack (receives scrim input). */\n readonly isTop: boolean;\n /** The sheet came to rest at a new height (px); drives the page recede threshold. */\n readonly onRest?: (heightPx: number) => void;\n}\n\nfunction scrimColor(entry: G9SheetEntry, settings: Required<G9SheetSettings>, opacity: number): string {\n const explicit = entry.options.windowBackgroundColor;\n const parsed = tryParseColor(explicit ?? settings.modalOverlayColor);\n if (!parsed) return explicit ?? settings.modalOverlayColor;\n return formatColor(withAlpha(parsed, explicit ? parsed.a : opacity));\n}\n\n/** lynx-ui's inner view lays G9's frame out as a column (its default `linear` layout ignores `flex`). */\nconst sheetInnerStyle = { display: 'flex', flexDirection: 'column' } as const;\n\n/** The receded parent sinks and fades over 220 ms (MAUI `StackParentRecedeDurationMs`, CubicOut). */\nconst g9SheetRecedeTransition = (): string => `transform ${g9Ms(220)}ms ease-out, opacity ${g9Ms(220)}ms ease-out`;\n\n/** The sheet's detents, small to large (the order of lynx-ui's snap points). */\nfunction orderedDetents(o: G9SheetEntry['options']): G9SheetDetent[] {\n const requested = o.states && o.states.length > 0 ? o.states : (['medium', 'large'] as const);\n return (['peek', 'medium', 'large'] as const).filter((d) => requested.includes(d));\n}\n\n/** The lynx-ui snap index of where a sheet rests: 0 for a fit sheet, else its detent's place (0 when it is unknown). */\nexport function restingSnapIndex(\n resting: G9SheetDetent | 'fit',\n fit: boolean,\n detents: readonly G9SheetDetent[],\n): number {\n if (fit || resting === 'fit') return 0;\n return Math.max(0, detents.indexOf(resting));\n}\n\n/** The detent a sheet opens at (`'fit'` for fit-to-content). */\nfunction initialDetent(o: G9SheetEntry['options'], fit: boolean): G9SheetDetent | 'fit' {\n if (fit) return 'fit';\n const ordered = orderedDetents(o);\n const current = o.currentState ?? 'medium';\n return ordered.includes(current) ? current : (ordered[0] ?? 'medium');\n}\n\n/**\n * One sheet of the stack on lynx-ui `SheetRoot` (motion, drag, snap points from lynx-ui; G9 adds detent mapping,\n * scrim, header/footer, deferred content, recede and results). Rendered by the sheet service in the host's sheets\n * layer; use `useG9Sheets()` to open sheets.\n */\nexport function G9SheetFrame(props: G9SheetFrameProps): ReactNode {\n const { entry, stack, settings } = props;\n const palette = useG9Theme().palette;\n\n const gesture = useSheetGestureRefs();\n const bodyGesture = useSheetBodyGesture(gesture);\n const o = entry.options;\n // The sheet's place in the navigation: declared from the moment it opens until it starts closing.\n const placeOpen = entry.status === 'opening' || entry.status === 'open';\n useG9Place(\n {\n ...(o.route ?? {}),\n segment: o.route?.segment ?? sheetSegmentOf(o.automationId),\n layer: 'sheet',\n order: entry.id,\n ...(o.route?.title\n ? {}\n : typeof o.title === 'string' && o.title.trim()\n ? { title: () => (typeof o.title === 'string' ? o.title : null) }\n : {}),\n close: () => {\n stack.close(entry.id);\n },\n },\n { active: placeOpen },\n );\n const layout = resolveSheetLayout(o, props.hostHeight);\n const showing = entry.status === 'opening' || entry.status === 'open';\n const closing = entry.status === 'closing';\n const handle = stack.handleOf(entry.id) as G9SheetHandle;\n\n const controller = useRef<G9AbortController | null>(null);\n if (controller.current === null) controller.current = createAbortController();\n useEffect(() => {\n if (closing || entry.status === 'closed') controller.current?.abort();\n }, [closing, entry.status]);\n useEffect(() => () => controller.current?.abort(), []);\n\n // Deferred (factory) content: placeholder until the open motion ended + loadDelayMs, then the body.\n const factory = typeof entry.content === 'function';\n const deferred = (factory || settings.deferPrebuiltContent) && o.deferContent !== false;\n const [revealed, setRevealed] = useState(!deferred);\n const [covering, setCovering] = useState(false);\n const timer = useRef<G9TimerHandle | null>(null);\n const coverTimer = useRef<G9TimerHandle | null>(null);\n useEffect(\n () => () => {\n if (coverTimer.current !== null) stopTimer(coverTimer.current);\n },\n [],\n );\n useEffect(() => {\n if (!deferred || revealed || entry.status !== 'open') return;\n const delay = layout.fullScreen\n ? Math.max(o.loadDelayMs ?? 369, settings.openAnimationDurationMs + 32)\n : (o.loadDelayMs ?? 369);\n timer.current = startTimer(() => {\n setRevealed(true);\n if (o.fadeDeferredContentIn !== false) {\n setCovering(true);\n coverTimer.current = startTimer(() => setCovering(false), g9Ms(220));\n }\n }, delay);\n return () => {\n if (timer.current !== null) stopTimer(timer.current);\n };\n }, [deferred, revealed, entry.status]);\n\n const memoKey = o.heightMemoKey ? `${o.heightMemoKey}|w${Math.round(props.hostWidth)}|${props.culture}|fs1` : null;\n const placeholderHeight = o.useFullScreenLoadingPlaceholder\n ? props.hostHeight\n : (o.deferredLoadingPlaceholderHeight ??\n (memoKey ? props.memo?.lookup(memoKey) : undefined) ??\n g9SheetFitLoadingMinHeight);\n\n const [bodyHeight, setBodyHeight] = useState(0);\n // The footer can come and go after the open (a `footerBand` whose buttons wait for data): it counts for the fit too.\n const [footerHeight, setFooterHeight] = useState(0);\n // The grabber, header and body gap above the body: part of the chrome a fit sheet's cap includes.\n const [chromeTopHeight, setChromeTopHeight] = useState(0);\n const onChromeTopLayout = (e: { detail?: { height?: number } }) =>\n setChromeTopHeight(Math.max(0, e.detail?.height ?? 0));\n const onFooterLayout = (e: { detail?: { height?: number } }) => setFooterHeight(Math.max(0, e.detail?.height ?? 0));\n // `scrollIndicator: 'always'` (./scroll-indicator.tsx): the thumb's own store, fed by the body and its content.\n const indicator = useRef<G9SheetScrollModel | null>(null);\n if (o.scrollIndicator === 'always' && o.scrollBody !== false && !indicator.current)\n indicator.current = new G9SheetScrollModel();\n const onBodyLayout = (e: { detail?: { height?: number } }) => {\n const h = e.detail?.height ?? 0;\n // The scroller's range is the content plus the body's padding on both sides.\n indicator.current?.setContent(h > 0 ? h + 2 * (o.padding ?? 0) : 0);\n if (h <= 0) return;\n setBodyHeight(h);\n if (memoKey && revealed && !covering) props.memo?.record(memoKey, h);\n };\n\n const placeholder =\n o.loadingSkeleton && o.loadingSkeleton !== 'none' ? (\n <view className=\"g9-sheet__placeholder\" style={{ height: `${placeholderHeight}px` }}>\n <G9SheetSkeleton skeleton={o.loadingSkeleton} rowCount={o.loadingSkeletonRowCount ?? 0} />\n </view>\n ) : (\n <view\n className=\"g9-sheet__placeholder g9-sheet__placeholder--spinner\"\n style={{ height: `${placeholderHeight}px` }}\n >\n <G9ActivityIndicator running size={32} />\n </view>\n );\n const body = revealed ? (factory ? (entry.content as () => ReactNode)() : (entry.content as ReactNode)) : null;\n\n // Scrim: the resting dim of the detent (one detent → max; several → interpolated at the initial detent). A fit sheet\n // ranges from its content height to full screen (MAUI ResolveModalOverlayOpacity), so at rest it dims at the\n // MINIMUM — unless its content fills the screen (MAUI's single-state range).\n const ratios = layout.snapPoints.map((p) =>\n typeof p === 'number' ? p / Math.max(1, props.hostHeight) : p === 'fit' ? 0.5 : Number.parseFloat(p) / 100,\n );\n const restingRatio = ratios[layout.initialSnap] ?? 1;\n // The share of the screen the sheet SHOWS: a fit sheet stops at its cap, so content taller than the cap (a long list\n // scrolling inside it) does not \"fill the screen\" — measured on the full content height, AgriPad's block sheet dimmed\n // at the maximum once its harvest list grew (0.69 where MAUI keeps 0.3).\n const shown = layout.fitMaxHeight !== null ? Math.min(bodyHeight, layout.fitMaxHeight) : bodyHeight;\n const contentRatio = bodyHeight > 0 ? Math.min(1, shown / Math.max(1, props.hostHeight)) : 0.5;\n const opacity = entry.handingOff\n ? 0\n : layout.fit\n ? contentRatio >= 0.99\n ? settings.modalOverlayMaximumOpacity\n : settings.modalOverlayMinimumOpacity\n : sheetOverlayOpacity(\n restingRatio,\n ratios,\n settings.modalOverlayMinimumOpacity,\n settings.modalOverlayMaximumOpacity,\n );\n const modal = o.isModal !== false;\n // The receded parent sinks and fades (MAUI stack recede). This runs on G9's own frame view, never on lynx-ui's\n // SheetContent view: lynx-ui moves that one from a main-thread worklet, and an inline style written over it from\n // here put the parent back at its closed offset when the child closed (the parent vanished, its scrim stayed).\n const recede = entry.receded\n ? { transform: `translateY(${parentRecedeOffset(bodyHeight || props.hostHeight * 0.5)}px)`, opacity: 0 }\n : { transform: 'translateY(0px)', opacity: 1 };\n const [resting, setResting] = useState<G9SheetDetent | 'fit'>(() => initialDetent(o, layout.fit));\n\n // A fit sheet whose body grows or shrinks AFTER it opened (rows that load later, a spinner replaced by content):\n // lynx-ui re-measures the 'fit' snap point on layout but leaves the sheet where it was, so a taller body ran off the\n // bottom of the screen (its footer unreachable). Re-snap to the new fit while the sheet rests there.\n const rootRef = useRef<SheetRootRef | null>(null);\n const lastFitBody = useRef(0);\n useEffect(() => {\n if (!layout.fit || bodyHeight <= 0 || entry.status !== 'open' || resting !== 'fit') return;\n // Also right after the open motion: the body may have grown while the sheet was still sliding in.\n const fitHeight = bodyHeight + footerHeight;\n if (Math.abs(lastFitBody.current - fitHeight) < 1) return;\n lastFitBody.current = fitHeight;\n rootRef.current?.snapTo(0, { animate: true });\n }, [bodyHeight, footerHeight, entry.status, resting, layout.fit]);\n // The host's height changed while the sheet was up — the soft keyboard on a host that pads the page by its inset (AgriPad\n // Android, 2026-11-12): lynx-ui keeps the open offset it computed for the OLD height, so a full-screen sheet opened at\n // 760 and squeezed to 463 stood 297 above the screen's top, its footer mid-screen and a band of page under it. Snap\n // again to where it rests, without motion, so the offset is computed for the new height.\n const lastHostHeight = useRef(props.hostHeight);\n useEffect(() => {\n if (Math.abs(lastHostHeight.current - props.hostHeight) < 1) return;\n lastHostHeight.current = props.hostHeight;\n if (entry.status !== 'open') return;\n rootRef.current?.snapTo(restingSnapIndex(resting, layout.fit, orderedDetents(o)), { animate: false });\n }, [props.hostHeight, entry.status]);\n const topPadding = sheetSurfaceTopPadding(o, layout, resting, props.topInset, props.hostHeight);\n const bottomPadding = sheetSurfaceBottomPadding(o, props.bottomInset ?? 0);\n // MAUI caps the WHOLE fit sheet at MaxFitToContentHeightRatio of the screen (the helper's chrome — header band, body\n // gap, footer — is part of the natural height it clamps); the body gets what is left. Capping only the body let a long\n // fit sheet stand ~65 dp taller than MAUI's (its header and gap on top of a 75 % body).\n const maxBody =\n layout.fitMaxHeight === null\n ? null\n : Math.max(\n g9SheetFitMinHeight,\n layout.fitMaxHeight - chromeTopHeight - footerHeight - topPadding - bottomPadding,\n );\n const anchorLayer = useMemo(() => ({ layer: 'sheet' as const, sheetId: props.entry.id }), [props.entry.id]);\n const contextValue: G9SheetContextValue = {\n handle,\n signal: (controller.current as G9AbortController).signal,\n opened: entry.status === 'open',\n closing,\n maxBodyHeight: maxBody,\n };\n const platform = currentPlatform();\n // The body reports its scroll offset to the gesture routing on the main thread (./gesture.tsx) on the phones only:\n // Lynxtron (desktop) drops the WHOLE sheet, no element of it is created, when the body's scroll-view carries\n // `main-thread:bindscroll` (the gallery smoke, Azure build 614). On the desktop a wheel scrolls the body.\n const phone = platform === 'android' || platform === 'ios';\n // A body that renders a window of a long list grows it when the scroll nears the end (options.onScrollToEnd).\n const endProps = o.onScrollToEnd\n ? { 'lower-threshold': o.scrollToEndThreshold ?? g9SheetScrollToEndThreshold, bindscrolltolower: o.onScrollToEnd }\n : {};\n const openMs = o.openAnimationDurationMs ?? settings.openAnimationDurationMs;\n const closeMs = o.closeAnimationDurationMs ?? settings.closeAnimationDurationMs;\n const corner =\n platform === 'android' && o.androidShouldRemoveExpandedCorners === true && layout.fullScreen\n ? 0\n : (o.cornerRadius ?? 12);\n const surface = o.backgroundColor ?? 'var(--g9-surface-container)';\n // Fields in the sheet hide their outline under a floated label with the sheet's colour, not the page's.\n const notch = g9FieldNotchStyle(resolveThemeColor(surface, palette));\n // Motion (MAUI G9SheetMotionModel, ./motion.ts): Material's settle on Android, the UIKit spring on iOS, or the timed\n // cubic; the travel is the share of the host the sheet covers where it rests (a fit sheet: its measured body).\n const detents = orderedDetents(o);\n const restIndex = layout.fit ? 0 : Math.max(0, detents.indexOf(resting as G9SheetDetent));\n const fitRatio =\n bodyHeight > 0 ? Math.min(1, (bodyHeight + topPadding + bottomPadding) / Math.max(1, props.hostHeight)) : 0.4;\n const openRatio = layout.fit ? fitRatio : (ratios[restIndex] ?? restingRatio);\n const motion = resolveSheetMotion({\n style: settings.motionStyle,\n platform,\n openRatio,\n snapRatio: ratios.length > 1 ? Math.max(...ratios) - Math.min(...ratios) : openRatio,\n openMs,\n closeMs,\n perSheetOpen: o.openAnimationDurationMs != null,\n perSheetClose: o.closeAnimationDurationMs != null,\n sizeScaled: settings.sizeScaledAnimationDuration,\n });\n // The body's content; inside a scroller by default, or filling a static body (`scrollBody: false`).\n const content = (\n <view\n className={`g9-sheet__content${o.scrollBody === false ? ' g9-sheet__content--fill' : ''}`}\n key={entry.version}\n bindlayoutchange={onBodyLayout}\n >\n {body}\n {!revealed ? placeholder : null}\n {covering ? (\n <view\n className=\"g9-sheet__cover\"\n style={{ height: `${clampFitHeight(placeholderHeight, props.hostHeight, true)}px` }}\n >\n {placeholder}\n </view>\n ) : null}\n </view>\n );\n return (\n <SheetRoot\n ref={rootRef}\n show={showing}\n snapPoints={layout.snapPoints}\n initialSnap={layout.initialSnap}\n screenHeight={props.hostHeight}\n dragDisabled={layout.dragDisabled}\n enableDragToClose={layout.enableDragToClose}\n dismissThreshold={g9SheetDragCloseThreshold}\n // G9 routes every touch itself (./gesture.tsx: drag vs. body scroll, N-028); lynx-ui's content handlers stay off.\n handleOnly\n onShowChange={(open) => {\n if (!open) void stack.requestBack(entry.id, 'drag');\n }}\n onSnapChange={(index, value) => {\n const detent = layout.fit ? 'fit' : (detents[index] ?? 'large');\n setResting(detent);\n props.onRest?.(value);\n o.onStateChanged?.(detent, value);\n }}\n onOpen={() => stack.markOpened(entry.id)}\n onClose={() => stack.markClosed(entry.id)}\n >\n {/* The view is `position: fixed` without a size; lynx-ui places the sheet at its `top: 100%` and the backdrop at\n its 100 %. Unsized it is 0 × 0 (Lynxtron), so the sheet slid in above the screen: give it the viewport.\n event-through lets taps reach the page around a modal sheet's scrim-less parts; the scrim and the sheet take theirs.\n A non-modal sheet's view is also `pointer-events: none`: with event-through alone the Lynx view handed a tap\n on it to what lies under the whole Lynx view, so a NATIVE element of the page under the sheet (a map's own\n MotionEvents) never got it. (A native window `container` would do it too, but needs the overlay XElement.) */}\n <SheetView\n className={`g9-sheet__view${modal ? '' : ' g9-sheet__view--passthrough'}`}\n nativeProps={{ 'event-through': modal }}\n >\n {modal ? (\n <view\n event-through={false}\n // Never flattened: a flattened view is painted on the Lynx root canvas, which a native SurfaceView (a map)\n // covers — the dim vanished over AgriPad's map while the sheet itself, a native view, still showed.\n flatten={false}\n className={`g9-sheet__scrim${props.isTop && !closing ? '' : ' g9-sheet__scrim--covered'}`}\n style={{\n backgroundColor: scrimColor(entry, settings, opacity),\n transition:\n platform === 'ios' && o.animateOverlayToColorOnIos === false\n ? 'none'\n : `background-color ${closing ? closeMs : openMs}ms`,\n }}\n bindtap={() => {\n // A tap on the dim closes a cancelable sheet only once it has OPENED: a tap while it rises belongs to the\n // burst that opened it — nine taps on a secret target, where a tenth landed on the rising sheet's dim,\n // closed AgriPad's Admin Diagnostics before it was up (a real phone, 2026-11-12).\n if (!layout.closeOnOverlayTap || entry.status !== 'open') return;\n void stack.requestBack(entry.id, 'overlayTap');\n }}\n />\n ) : null}\n {/* SheetContent's own view is lynx-ui's: a worklet writes its transform every motion frame, so its style is\n set once and never changes (a later inline-style write replaces the worklet's transform). Everything that\n changes (recede, paddings, colour) lives on G9's frame and surface inside it. */}\n <SheetContent\n className={`g9-sheet g9-sheet--${entry.status}${layout.fit ? ' g9-sheet--fit' : ''}`}\n style={platformSheetConstraints(o)}\n innerStyle={sheetInnerStyle}\n {...motion}\n >\n <G9SheetGestureFrame\n refs={gesture}\n canDrag={!layout.dragDisabled}\n bodyDrags={o.scrollingExpandsSheet !== false}\n className=\"g9-sheet__frame\"\n style={{ ...recede, transition: g9SheetRecedeTransition() }}\n >\n <view\n className=\"g9-sheet__surface\"\n {...g9IdProps(o.automationId)}\n style={{\n backgroundColor: surface,\n borderTopLeftRadius: `${corner}px`,\n borderTopRightRadius: `${corner}px`,\n paddingTop: `${topPadding}px`,\n paddingBottom: `${bottomPadding}px`,\n ...notch,\n }}\n >\n <SheetContext.Provider value={contextValue}>\n <G9AnchorLayerContext.Provider value={anchorLayer}>\n <view className=\"g9-sheet__chrome-top\" bindlayoutchange={onChromeTopLayout}>\n {layout.showHandle ||\n (layout.fullScreen &&\n o.showToolbar &&\n o.showFullScreenDragHandle !== false &&\n !layout.dragDisabled) ? (\n <view className=\"g9-sheet__grabber-area\">\n <view className=\"g9-sheet__grabber\" />\n </view>\n ) : null}\n <G9SheetHeader options={o} onBack={() => void stack.requestBack(entry.id, 'toolbarButton')} />\n {o.showToolbar && o.useStandardBodyTopGap !== false ? (\n // MAUI UseStandardBodyTopGap: G9LayoutMetrics.SheetHeaderVerticalGap, which an app scales (AgriPad ×\n // 1.3 = 13) — read from the app's --g9-layout-* variable; g9SheetHeaderMetrics.bodyTopGap is the default.\n <view className=\"g9-sheet__body-gap\" />\n ) : null}\n </view>\n {o.scrollBody === false ? (\n <view\n className={`g9-sheet__body g9-sheet__body--static${layout.fillBody ? ' g9-sheet__body--fill' : ''}`}\n style={{ padding: `${o.padding ?? 0}px` }}\n >\n {content}\n </view>\n ) : indicator.current ? (\n // The thumb's frame: the scroller and the thumb over its inline end (only with scrollIndicator).\n <view className={`g9-sheet__body-frame${layout.fillBody ? ' g9-sheet__body--fill' : ''}`}>\n <scroll-view\n className={`g9-sheet__body${layout.fillBody ? ' g9-sheet__body--fill' : ''}`}\n scroll-orientation=\"vertical\"\n main-thread:ref={gesture.body}\n main-thread:bindscroll={phone ? bodyGesture.onScrollMT : undefined}\n main-thread:bindtouchstart={bodyGesture.onTouchStartMT}\n scroll-event-throttle={16}\n {...endProps}\n bindscroll={(e: { detail?: { scrollTop?: number } }) =>\n indicator.current?.setTop(e.detail?.scrollTop ?? 0)\n }\n bindlayoutchange={(e: { detail?: { height?: number } }) =>\n indicator.current?.setViewport(e.detail?.height ?? 0)\n }\n style={{\n padding: `${o.padding ?? 0}px`,\n ...(maxBody !== null ? { maxHeight: `${maxBody}px` } : {}),\n }}\n >\n {content}\n </scroll-view>\n <G9SheetScrollIndicator model={indicator.current} />\n </view>\n ) : (\n <scroll-view\n className={`g9-sheet__body${layout.fillBody ? ' g9-sheet__body--fill' : ''}`}\n scroll-orientation=\"vertical\"\n main-thread:ref={gesture.body}\n main-thread:bindscroll={phone ? bodyGesture.onScrollMT : undefined}\n main-thread:bindtouchstart={bodyGesture.onTouchStartMT}\n {...endProps}\n style={{\n padding: `${o.padding ?? 0}px`,\n ...(maxBody !== null ? { maxHeight: `${maxBody}px` } : {}),\n }}\n >\n {content}\n </scroll-view>\n )}\n <view className=\"g9-sheet__footer-slot\" bindlayoutchange={onFooterLayout}>\n <G9SheetFooter options={o} />\n </view>\n </G9AnchorLayerContext.Provider>\n </SheetContext.Provider>\n </view>\n {/* Below the surface, so a drag past the top detent (rubber band) never shows the page under it. */}\n <view className=\"g9-sheet__skirt\" style={{ backgroundColor: surface }} />\n </G9SheetGestureFrame>\n </SheetContent>\n </SheetView>\n </SheetRoot>\n );\n}\n"],"names":["SheetContext","createContext","useG9SheetContext","useContext","scrimColor","entry","settings","opacity","explicit","parsed","tryParseColor","formatColor","withAlpha","sheetInnerStyle","g9SheetRecedeTransition","g9Ms","orderedDetents","o","requested","d","restingSnapIndex","resting","fit","detents","Math","initialDetent","_o_currentState","_ordered_","ordered","current","G9SheetFrame","props","_o_route","_ref1","_o_loadingSkeletonRowCount","_ratios_layout_initialSnap","_props_bottomInset","_o_scrollToEndThreshold","_o_openAnimationDurationMs","_o_closeAnimationDurationMs","_o_cornerRadius","_o_backgroundColor","_ratios_restIndex","_o_padding","_o_padding1","_o_padding2","_o_route1","_o_route2","_props_memo","stack","palette","useG9Theme","gesture","useSheetGestureRefs","bodyGesture","useSheetBodyGesture","placeOpen","useG9Place","sheetSegmentOf","layout","resolveSheetLayout","showing","closing","handle","controller","useRef","createAbortController","useEffect","_controller_current","factory","deferred","revealed","setRevealed","useState","covering","setCovering","timer","coverTimer","stopTimer","_o_loadDelayMs","_o_loadDelayMs1","delay","startTimer","memoKey","placeholderHeight","undefined","g9SheetFitLoadingMinHeight","bodyHeight","setBodyHeight","footerHeight","setFooterHeight","chromeTopHeight","setChromeTopHeight","onChromeTopLayout","e","_e_detail","onFooterLayout","indicator","G9SheetScrollModel","onBodyLayout","_indicator_current","h","placeholder","view","G9SheetSkeleton","G9ActivityIndicator","body","ratios","p","Number","restingRatio","shown","contentRatio","sheetOverlayOpacity","modal","recede","parentRecedeOffset","setResting","rootRef","lastFitBody","_rootRef_current","fitHeight","lastHostHeight","topPadding","sheetSurfaceTopPadding","bottomPadding","sheetSurfaceBottomPadding","maxBody","g9SheetFitMinHeight","anchorLayer","useMemo","contextValue","platform","currentPlatform","phone","endProps","g9SheetScrollToEndThreshold","openMs","closeMs","corner","surface","notch","g9FieldNotchStyle","resolveThemeColor","restIndex","fitRatio","openRatio","motion","resolveSheetMotion","content","clampFitHeight","SheetRoot","g9SheetDragCloseThreshold","open","index","value","_detents_index","detent","SheetView","SheetContent","platformSheetConstraints","G9SheetGestureFrame","g9IdProps","G9AnchorLayerContext","G9SheetHeader","scroll-view","G9SheetScrollIndicator","G9SheetFooter"],"mappings":";;;;;;;;;;;;;;;;;AAyDA,MAAMA,eAAeC,cAA0C;AAGxD,SAASC;IACd,OAAOC,WAAWH;AACpB;AAsBA,SAASI,WAAWC,KAAmB,EAAEC,QAAmC,EAAEC,OAAe;IAC3F,MAAMC,WAAWH,MAAM,OAAO,CAAC,qBAAqB;IACpD,M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,SAAStJ,IAAK;kBAC/B,EAAEsF,KAAK;gBACT,EAAE4D,qBAAqB,SAAS;cAClC,EAAEnK,aAAa,SAAS;YAC1B,EAAEuG,KAAK;YACP,EAAqG;YACrG,CAACA,KAAK,UAAU,kBAAkB,OAAO;QAAE,iBAAiBqC;IAAQ,IAAK;UAC3E,EAAEqB,oBAAoB;QACxB,EAAEF,aAAa;MACjB,EAAED,UAAU;IACd,EAAEP;AAEN"}
1
+ {"version":3,"file":"sheet/frame.jsx","sources":["../../src/sheet/frame.tsx"],"sourcesContent":["import './sheet.css';\nimport {\n createAbortController,\n formatColor,\n type G9AbortController,\n type G9AbortSignal,\n g9Ms,\n resolveThemeColor,\n tryParseColor,\n withAlpha,\n} from '@g9tm/lynxcontrols-foundation';\nimport { SheetBackdrop, SheetContent, SheetRoot, type SheetRootRef, SheetView } from '@lynx-js/lynx-ui-sheet';\nimport { createContext, type ReactNode, useContext, useEffect, useMemo, useRef, useState } from '@lynx-js/react';\nimport { G9AnchorLayerContext } from '../anchor/context';\nimport { g9IdProps } from '../base/control';\nimport { type G9TimerHandle, startTimer, stopTimer } from '../base/timers';\nimport { G9ActivityIndicator } from '../display/activity-indicator';\nimport { G9SheetSkeleton } from '../display/shimmer';\nimport { g9FieldNotchStyle } from '../fields/notch';\nimport { useG9Theme } from '../provider/hooks';\nimport { sheetSegmentOf, useG9Place } from '../route/hooks';\nimport { G9SheetGestureFrame, useSheetBodyGesture, useSheetGestureRefs } from './gesture';\nimport { G9SheetFooter, G9SheetHeader } from './header';\nimport type { G9SheetHeightMemo } from './height-memo';\nimport { resolveSheetMotion } from './motion';\nimport type { G9SheetDetent, G9SheetSettings } from './options';\nimport { G9SheetScrollIndicator, G9SheetScrollModel } from './scroll-indicator';\nimport {\n clampFitHeight,\n currentPlatform,\n g9SheetDragCloseThreshold,\n g9SheetFitLoadingMinHeight,\n g9SheetFitMinHeight,\n g9SheetScrollToEndThreshold,\n parentRecedeOffset,\n platformSheetConstraints,\n resolveSheetLayout,\n sheetOverlayOpacity,\n sheetSurfaceBottomPadding,\n sheetSurfaceTopPadding,\n} from './sizing';\nimport type { G9SheetEntry, G9SheetHandle, G9SheetStack } from './stack';\n\n/** What content inside a sheet can read (MAUI `IG9BottomSheetAwareView` + deferred load signals). */\nexport interface G9SheetContextValue {\n /** The sheet-scoped handle: `close()` closes only this sheet. */\n readonly handle: G9SheetHandle;\n /** Aborted when the sheet starts closing (cancel loads with it). */\n readonly signal: G9AbortSignal;\n /** The open motion has finished. */\n readonly opened: boolean;\n /** The sheet is closing. */\n readonly closing: boolean;\n /** Resting body cap of a fit sheet (px), else `null`. */\n readonly maxBodyHeight: number | null;\n}\n\nconst SheetContext = createContext<G9SheetContextValue | null>(null);\n\n/** The enclosing sheet, or `null` outside one. */\nexport function useG9SheetContext(): G9SheetContextValue | null {\n return useContext(SheetContext);\n}\n\n/** Props of {@link G9SheetFrame}. */\nexport interface G9SheetFrameProps {\n readonly entry: G9SheetEntry;\n readonly stack: G9SheetStack;\n /** Host height (px): percentage detents and caps resolve against it. */\n readonly hostHeight: number;\n readonly hostWidth: number;\n readonly topInset: number;\n /** The host's bottom safe inset (a visible navigation bar); the surface pads by it. Default 0. */\n readonly bottomInset?: number;\n readonly settings: Required<G9SheetSettings>;\n readonly memo: G9SheetHeightMemo | null;\n /** Culture tag of the memo key. */\n readonly culture: string;\n /** The sheet is the top of the stack (receives scrim input). */\n readonly isTop: boolean;\n /** The sheet came to rest at a new height (px); drives the page recede threshold. */\n readonly onRest?: (heightPx: number) => void;\n}\n\n/** Takes a touch-move so it does not bubble to the page under a modal sheet's dim. */\nconst noop = (): void => {};\n\nfunction scrimColor(entry: G9SheetEntry, settings: Required<G9SheetSettings>, opacity: number): string {\n const explicit = entry.options.windowBackgroundColor;\n const parsed = tryParseColor(explicit ?? settings.modalOverlayColor);\n if (!parsed) return explicit ?? settings.modalOverlayColor;\n return formatColor(withAlpha(parsed, explicit ? parsed.a : opacity));\n}\n\n/** lynx-ui's inner view lays G9's frame out as a column (its default `linear` layout ignores `flex`). */\nconst sheetInnerStyle = { display: 'flex', flexDirection: 'column' } as const;\n\n/** The receded parent sinks and fades over 220 ms (MAUI `StackParentRecedeDurationMs`, CubicOut). */\nconst g9SheetRecedeTransition = (): string => `transform ${g9Ms(220)}ms ease-out, opacity ${g9Ms(220)}ms ease-out`;\n\n/** The sheet's detents, small to large (the order of lynx-ui's snap points). */\nfunction orderedDetents(o: G9SheetEntry['options']): G9SheetDetent[] {\n const requested = o.states && o.states.length > 0 ? o.states : (['medium', 'large'] as const);\n return (['peek', 'medium', 'large'] as const).filter((d) => requested.includes(d));\n}\n\n/** The lynx-ui snap index of where a sheet rests: 0 for a fit sheet, else its detent's place (0 when it is unknown). */\nexport function restingSnapIndex(\n resting: G9SheetDetent | 'fit',\n fit: boolean,\n detents: readonly G9SheetDetent[],\n): number {\n if (fit || resting === 'fit') return 0;\n return Math.max(0, detents.indexOf(resting));\n}\n\n/** The detent a sheet opens at (`'fit'` for fit-to-content). */\nfunction initialDetent(o: G9SheetEntry['options'], fit: boolean): G9SheetDetent | 'fit' {\n if (fit) return 'fit';\n const ordered = orderedDetents(o);\n const current = o.currentState ?? 'medium';\n return ordered.includes(current) ? current : (ordered[0] ?? 'medium');\n}\n\n/**\n * One sheet of the stack on lynx-ui `SheetRoot` (motion, drag, snap points from lynx-ui; G9 adds detent mapping,\n * scrim, header/footer, deferred content, recede and results). Rendered by the sheet service in the host's sheets\n * layer; use `useG9Sheets()` to open sheets.\n */\nexport function G9SheetFrame(props: G9SheetFrameProps): ReactNode {\n const { entry, stack, settings } = props;\n const palette = useG9Theme().palette;\n\n const gesture = useSheetGestureRefs();\n const bodyGesture = useSheetBodyGesture(gesture);\n const o = entry.options;\n // The sheet's place in the navigation: declared from the moment it opens until it starts closing.\n const placeOpen = entry.status === 'opening' || entry.status === 'open';\n useG9Place(\n {\n ...(o.route ?? {}),\n segment: o.route?.segment ?? sheetSegmentOf(o.automationId),\n layer: 'sheet',\n order: entry.id,\n ...(o.route?.title\n ? {}\n : typeof o.title === 'string' && o.title.trim()\n ? { title: () => (typeof o.title === 'string' ? o.title : null) }\n : {}),\n close: () => {\n stack.close(entry.id);\n },\n },\n { active: placeOpen },\n );\n const layout = resolveSheetLayout(o, props.hostHeight);\n const showing = entry.status === 'opening' || entry.status === 'open';\n const closing = entry.status === 'closing';\n const handle = stack.handleOf(entry.id) as G9SheetHandle;\n\n const controller = useRef<G9AbortController | null>(null);\n if (controller.current === null) controller.current = createAbortController();\n useEffect(() => {\n if (closing || entry.status === 'closed') controller.current?.abort();\n }, [closing, entry.status]);\n useEffect(() => () => controller.current?.abort(), []);\n\n // Deferred (factory) content: placeholder until the open motion ended + loadDelayMs, then the body.\n const factory = typeof entry.content === 'function';\n const deferred = (factory || settings.deferPrebuiltContent) && o.deferContent !== false;\n const [revealed, setRevealed] = useState(!deferred);\n const [covering, setCovering] = useState(false);\n const timer = useRef<G9TimerHandle | null>(null);\n const coverTimer = useRef<G9TimerHandle | null>(null);\n useEffect(\n () => () => {\n if (coverTimer.current !== null) stopTimer(coverTimer.current);\n },\n [],\n );\n useEffect(() => {\n if (!deferred || revealed || entry.status !== 'open') return;\n const delay = layout.fullScreen\n ? Math.max(o.loadDelayMs ?? 369, settings.openAnimationDurationMs + 32)\n : (o.loadDelayMs ?? 369);\n timer.current = startTimer(() => {\n setRevealed(true);\n if (o.fadeDeferredContentIn !== false) {\n setCovering(true);\n coverTimer.current = startTimer(() => setCovering(false), g9Ms(220));\n }\n }, delay);\n return () => {\n if (timer.current !== null) stopTimer(timer.current);\n };\n }, [deferred, revealed, entry.status]);\n\n const memoKey = o.heightMemoKey ? `${o.heightMemoKey}|w${Math.round(props.hostWidth)}|${props.culture}|fs1` : null;\n const placeholderHeight = o.useFullScreenLoadingPlaceholder\n ? props.hostHeight\n : (o.deferredLoadingPlaceholderHeight ??\n (memoKey ? props.memo?.lookup(memoKey) : undefined) ??\n g9SheetFitLoadingMinHeight);\n\n const [bodyHeight, setBodyHeight] = useState(0);\n // The footer can come and go after the open (a `footerBand` whose buttons wait for data): it counts for the fit too.\n const [footerHeight, setFooterHeight] = useState(0);\n // The grabber, header and body gap above the body: part of the chrome a fit sheet's cap includes.\n const [chromeTopHeight, setChromeTopHeight] = useState(0);\n const onChromeTopLayout = (e: { detail?: { height?: number } }) =>\n setChromeTopHeight(Math.max(0, e.detail?.height ?? 0));\n const onFooterLayout = (e: { detail?: { height?: number } }) => setFooterHeight(Math.max(0, e.detail?.height ?? 0));\n // `scrollIndicator: 'always'` (./scroll-indicator.tsx): the thumb's own store, fed by the body and its content.\n const indicator = useRef<G9SheetScrollModel | null>(null);\n if (o.scrollIndicator === 'always' && o.scrollBody !== false && !indicator.current)\n indicator.current = new G9SheetScrollModel();\n const onBodyLayout = (e: { detail?: { height?: number } }) => {\n const h = e.detail?.height ?? 0;\n // The scroller's range is the content plus the body's padding on both sides.\n indicator.current?.setContent(h > 0 ? h + 2 * (o.padding ?? 0) : 0);\n if (h <= 0) return;\n setBodyHeight(h);\n if (memoKey && revealed && !covering) props.memo?.record(memoKey, h);\n };\n\n const placeholder =\n o.loadingSkeleton && o.loadingSkeleton !== 'none' ? (\n <view className=\"g9-sheet__placeholder\" style={{ height: `${placeholderHeight}px` }}>\n <G9SheetSkeleton skeleton={o.loadingSkeleton} rowCount={o.loadingSkeletonRowCount ?? 0} />\n </view>\n ) : (\n <view\n className=\"g9-sheet__placeholder g9-sheet__placeholder--spinner\"\n style={{ height: `${placeholderHeight}px` }}\n >\n <G9ActivityIndicator running size={32} />\n </view>\n );\n const body = revealed ? (factory ? (entry.content as () => ReactNode)() : (entry.content as ReactNode)) : null;\n\n // Scrim: the resting dim of the detent (one detent → max; several → interpolated at the initial detent). A fit sheet\n // ranges from its content height to full screen (MAUI ResolveModalOverlayOpacity), so at rest it dims at the\n // MINIMUM — unless its content fills the screen (MAUI's single-state range).\n const ratios = layout.snapPoints.map((p) =>\n typeof p === 'number' ? p / Math.max(1, props.hostHeight) : p === 'fit' ? 0.5 : Number.parseFloat(p) / 100,\n );\n const restingRatio = ratios[layout.initialSnap] ?? 1;\n // The share of the screen the sheet SHOWS: a fit sheet stops at its cap, so content taller than the cap (a long list\n // scrolling inside it) does not \"fill the screen\" — measured on the full content height, AgriPad's block sheet dimmed\n // at the maximum once its harvest list grew (0.69 where MAUI keeps 0.3).\n const shown = layout.fitMaxHeight !== null ? Math.min(bodyHeight, layout.fitMaxHeight) : bodyHeight;\n const contentRatio = bodyHeight > 0 ? Math.min(1, shown / Math.max(1, props.hostHeight)) : 0.5;\n const opacity = entry.handingOff\n ? 0\n : layout.fit\n ? contentRatio >= 0.99\n ? settings.modalOverlayMaximumOpacity\n : settings.modalOverlayMinimumOpacity\n : sheetOverlayOpacity(\n restingRatio,\n ratios,\n settings.modalOverlayMinimumOpacity,\n settings.modalOverlayMaximumOpacity,\n );\n const modal = o.isModal !== false;\n // The receded parent sinks and fades (MAUI stack recede). This runs on G9's own frame view, never on lynx-ui's\n // SheetContent view: lynx-ui moves that one from a main-thread worklet, and an inline style written over it from\n // here put the parent back at its closed offset when the child closed (the parent vanished, its scrim stayed).\n const recede = entry.receded\n ? { transform: `translateY(${parentRecedeOffset(bodyHeight || props.hostHeight * 0.5)}px)`, opacity: 0 }\n : { transform: 'translateY(0px)', opacity: 1 };\n const [resting, setResting] = useState<G9SheetDetent | 'fit'>(() => initialDetent(o, layout.fit));\n\n // A fit sheet whose body grows or shrinks AFTER it opened (rows that load later, a spinner replaced by content):\n // lynx-ui re-measures the 'fit' snap point on layout but leaves the sheet where it was, so a taller body ran off the\n // bottom of the screen (its footer unreachable). Re-snap to the new fit while the sheet rests there.\n const rootRef = useRef<SheetRootRef | null>(null);\n const lastFitBody = useRef(0);\n useEffect(() => {\n if (!layout.fit || bodyHeight <= 0 || entry.status !== 'open' || resting !== 'fit') return;\n // Also right after the open motion: the body may have grown while the sheet was still sliding in.\n const fitHeight = bodyHeight + footerHeight;\n if (Math.abs(lastFitBody.current - fitHeight) < 1) return;\n lastFitBody.current = fitHeight;\n rootRef.current?.snapTo(0, { animate: true });\n }, [bodyHeight, footerHeight, entry.status, resting, layout.fit]);\n // The host's height changed while the sheet was up — the soft keyboard on a host that pads the page by its inset (AgriPad\n // Android, 2026-11-12): lynx-ui keeps the open offset it computed for the OLD height, so a full-screen sheet opened at\n // 760 and squeezed to 463 stood 297 above the screen's top, its footer mid-screen and a band of page under it. Snap\n // again to where it rests, without motion, so the offset is computed for the new height.\n const lastHostHeight = useRef(props.hostHeight);\n useEffect(() => {\n if (Math.abs(lastHostHeight.current - props.hostHeight) < 1) return;\n lastHostHeight.current = props.hostHeight;\n if (entry.status !== 'open') return;\n rootRef.current?.snapTo(restingSnapIndex(resting, layout.fit, orderedDetents(o)), { animate: false });\n }, [props.hostHeight, entry.status]);\n const topPadding = sheetSurfaceTopPadding(o, layout, resting, props.topInset, props.hostHeight);\n const bottomPadding = sheetSurfaceBottomPadding(o, props.bottomInset ?? 0);\n // MAUI caps the WHOLE fit sheet at MaxFitToContentHeightRatio of the screen (the helper's chrome — header band, body\n // gap, footer — is part of the natural height it clamps); the body gets what is left. Capping only the body let a long\n // fit sheet stand ~65 dp taller than MAUI's (its header and gap on top of a 75 % body).\n const maxBody =\n layout.fitMaxHeight === null\n ? null\n : Math.max(\n g9SheetFitMinHeight,\n layout.fitMaxHeight - chromeTopHeight - footerHeight - topPadding - bottomPadding,\n );\n const anchorLayer = useMemo(() => ({ layer: 'sheet' as const, sheetId: props.entry.id }), [props.entry.id]);\n const contextValue: G9SheetContextValue = {\n handle,\n signal: (controller.current as G9AbortController).signal,\n opened: entry.status === 'open',\n closing,\n maxBodyHeight: maxBody,\n };\n const platform = currentPlatform();\n // The body reports its scroll offset to the gesture routing on the main thread (./gesture.tsx) on the phones only:\n // Lynxtron (desktop) drops the WHOLE sheet, no element of it is created, when the body's scroll-view carries\n // `main-thread:bindscroll` (the gallery smoke, Azure build 614). On the desktop a wheel scrolls the body.\n const phone = platform === 'android' || platform === 'ios';\n // A body that renders a window of a long list grows it when the scroll nears the end (options.onScrollToEnd).\n const endProps = o.onScrollToEnd\n ? { 'lower-threshold': o.scrollToEndThreshold ?? g9SheetScrollToEndThreshold, bindscrolltolower: o.onScrollToEnd }\n : {};\n const openMs = o.openAnimationDurationMs ?? settings.openAnimationDurationMs;\n const closeMs = o.closeAnimationDurationMs ?? settings.closeAnimationDurationMs;\n const corner =\n platform === 'android' && o.androidShouldRemoveExpandedCorners === true && layout.fullScreen\n ? 0\n : (o.cornerRadius ?? 12);\n const surface = o.backgroundColor ?? 'var(--g9-surface-container)';\n // Fields in the sheet hide their outline under a floated label with the sheet's colour, not the page's.\n const notch = g9FieldNotchStyle(resolveThemeColor(surface, palette));\n // Motion (MAUI G9SheetMotionModel, ./motion.ts): Material's settle on Android, the UIKit spring on iOS, or the timed\n // cubic; the travel is the share of the host the sheet covers where it rests (a fit sheet: its measured body).\n const detents = orderedDetents(o);\n const restIndex = layout.fit ? 0 : Math.max(0, detents.indexOf(resting as G9SheetDetent));\n const fitRatio =\n bodyHeight > 0 ? Math.min(1, (bodyHeight + topPadding + bottomPadding) / Math.max(1, props.hostHeight)) : 0.4;\n const openRatio = layout.fit ? fitRatio : (ratios[restIndex] ?? restingRatio);\n const motion = resolveSheetMotion({\n style: settings.motionStyle,\n platform,\n openRatio,\n snapRatio: ratios.length > 1 ? Math.max(...ratios) - Math.min(...ratios) : openRatio,\n openMs,\n closeMs,\n perSheetOpen: o.openAnimationDurationMs != null,\n perSheetClose: o.closeAnimationDurationMs != null,\n sizeScaled: settings.sizeScaledAnimationDuration,\n });\n // The body's content; inside a scroller by default, or filling a static body (`scrollBody: false`).\n const content = (\n <view\n className={`g9-sheet__content${o.scrollBody === false ? ' g9-sheet__content--fill' : ''}`}\n key={entry.version}\n bindlayoutchange={onBodyLayout}\n >\n {body}\n {!revealed ? placeholder : null}\n {covering ? (\n <view\n className=\"g9-sheet__cover\"\n style={{ height: `${clampFitHeight(placeholderHeight, props.hostHeight, true)}px` }}\n >\n {placeholder}\n </view>\n ) : null}\n </view>\n );\n return (\n <SheetRoot\n ref={rootRef}\n show={showing}\n snapPoints={layout.snapPoints}\n initialSnap={layout.initialSnap}\n screenHeight={props.hostHeight}\n dragDisabled={layout.dragDisabled}\n enableDragToClose={layout.enableDragToClose}\n dismissThreshold={g9SheetDragCloseThreshold}\n // G9 routes every touch itself (./gesture.tsx: drag vs. body scroll, N-028); lynx-ui's content handlers stay off.\n handleOnly\n onShowChange={(open) => {\n if (!open) void stack.requestBack(entry.id, 'drag');\n }}\n onSnapChange={(index, value) => {\n const detent = layout.fit ? 'fit' : (detents[index] ?? 'large');\n setResting(detent);\n props.onRest?.(value);\n o.onStateChanged?.(detent, value);\n }}\n onOpen={() => stack.markOpened(entry.id)}\n onClose={() => stack.markClosed(entry.id)}\n >\n {/* The view is `position: fixed` without a size; lynx-ui places the sheet at its `top: 100%` and the backdrop at\n its 100 %. Unsized it is 0 × 0 (Lynxtron), so the sheet slid in above the screen: give it the viewport.\n event-through lets taps reach the page around a modal sheet's scrim-less parts; the scrim and the sheet take theirs.\n A non-modal sheet's view is also `pointer-events: none`: with event-through alone the Lynx view handed a tap\n on it to what lies under the whole Lynx view, so a NATIVE element of the page under the sheet (a map's own\n MotionEvents) never got it. (A native window `container` would do it too, but needs the overlay XElement.) */}\n <SheetView\n className={`g9-sheet__view${modal ? '' : ' g9-sheet__view--passthrough'}`}\n nativeProps={{ 'event-through': modal }}\n >\n {modal && entry.inheritsDim && entry.status === 'opening' ? (\n // A successor's dim while it opens (TR-0062): already at full strength, a plain view — lynx-ui's backdrop would\n // fade it in from nothing under a page that was dimmed a frame ago. Once open, the backdrop takes over at the\n // same strength (its progress is then 1) and follows a drag and the close as every other sheet's does.\n <view\n className=\"g9-sheet__scrim\"\n style={{ backgroundColor: scrimColor(entry, settings, opacity) }}\n bindtap={noop}\n >\n <view\n className=\"g9-sheet__scrim-catch\"\n flatten={false}\n event-through={false}\n consume-slide-event={[[-180, 180]]}\n catchtouchmove={noop}\n />\n </view>\n ) : modal ? (\n // The dim is lynx-ui's backdrop (since 1.7.0, AgriPad TR-0052): its opacity is the sheet's PROGRESS, written on the\n // main thread every frame of the open, the close and a drag — it fades in with the sheet, out as it leaves, and\n // follows a finger — instead of a fixed colour that appeared and vanished at once. The colour carries the\n // resting dim (`opacity` below); the backdrop multiplies it by the progress.\n <SheetBackdrop\n clickToClose={false}\n className={`g9-sheet__scrim${props.isTop && !closing ? '' : ' g9-sheet__scrim--covered'}`}\n style={{\n backgroundColor: scrimColor(entry, settings, opacity),\n // A sheet handing off drops its dim at once: the successor's scrim, a newer fixed view at the same place,\n // already covers the page, so a fade here only stacked two dims for its length (TR-0062).\n transition:\n entry.handingOff || (platform === 'ios' && o.animateOverlayToColorOnIos === false)\n ? 'none'\n : `background-color ${closing ? closeMs : openMs}ms`,\n }}\n onClick={() => {\n // A tap on the dim closes a cancelable sheet only once it has OPENED: a tap while it rises belongs to the\n // burst that opened it — nine taps on a secret target, where a tenth landed on the rising sheet's dim,\n // closed AgriPad's Admin Diagnostics before it was up (a real phone, 2026-11-12).\n if (!layout.closeOnOverlayTap || entry.status !== 'open') return;\n void stack.requestBack(entry.id, 'overlayTap');\n }}\n >\n {/* The dim is modal for a DRAG too (TR-0052): a slide that starts on it moved the page behind (the profile list\n scrolled under an open sheet) because only a tap was taken. `consume-slide-event` stops the platform's\n slide gestures at any angle here; never flattened — a flattened view is painted on the Lynx root canvas,\n which a native SurfaceView (a map) covers. */}\n <view\n className=\"g9-sheet__scrim-catch\"\n flatten={false}\n event-through={false}\n consume-slide-event={[[-180, 180]]}\n catchtouchmove={noop}\n />\n </SheetBackdrop>\n ) : null}\n {/* SheetContent's own view is lynx-ui's: a worklet writes its transform every motion frame, so its style is\n set once and never changes (a later inline-style write replaces the worklet's transform). Everything that\n changes (recede, paddings, colour) lives on G9's frame and surface inside it. */}\n <SheetContent\n className={`g9-sheet g9-sheet--${entry.status}${layout.fit ? ' g9-sheet--fit' : ''}`}\n style={platformSheetConstraints(o)}\n innerStyle={sheetInnerStyle}\n {...motion}\n >\n <G9SheetGestureFrame\n refs={gesture}\n canDrag={!layout.dragDisabled}\n bodyDrags={o.scrollingExpandsSheet !== false}\n className=\"g9-sheet__frame\"\n style={{ ...recede, transition: g9SheetRecedeTransition() }}\n >\n <view\n className=\"g9-sheet__surface\"\n {...g9IdProps(o.automationId)}\n style={{\n backgroundColor: surface,\n borderTopLeftRadius: `${corner}px`,\n borderTopRightRadius: `${corner}px`,\n paddingTop: `${topPadding}px`,\n paddingBottom: `${bottomPadding}px`,\n ...notch,\n }}\n >\n <SheetContext.Provider value={contextValue}>\n <G9AnchorLayerContext.Provider value={anchorLayer}>\n <view className=\"g9-sheet__chrome-top\" bindlayoutchange={onChromeTopLayout}>\n {layout.showHandle ||\n (layout.fullScreen &&\n o.showToolbar &&\n o.showFullScreenDragHandle !== false &&\n !layout.dragDisabled) ? (\n <view className=\"g9-sheet__grabber-area\">\n <view className=\"g9-sheet__grabber\" />\n </view>\n ) : null}\n <G9SheetHeader options={o} onBack={() => void stack.requestBack(entry.id, 'toolbarButton')} />\n {o.showToolbar && o.useStandardBodyTopGap !== false ? (\n // MAUI UseStandardBodyTopGap: G9LayoutMetrics.SheetHeaderVerticalGap, which an app scales (AgriPad ×\n // 1.3 = 13) — read from the app's --g9-layout-* variable; g9SheetHeaderMetrics.bodyTopGap is the default.\n <view className=\"g9-sheet__body-gap\" />\n ) : null}\n </view>\n {o.scrollBody === false ? (\n <view\n className={`g9-sheet__body g9-sheet__body--static${layout.fillBody ? ' g9-sheet__body--fill' : ''}`}\n style={{ padding: `${o.padding ?? 0}px` }}\n >\n {content}\n </view>\n ) : indicator.current ? (\n // The thumb's frame: the scroller and the thumb over its inline end (only with scrollIndicator).\n <view className={`g9-sheet__body-frame${layout.fillBody ? ' g9-sheet__body--fill' : ''}`}>\n <scroll-view\n className={`g9-sheet__body${layout.fillBody ? ' g9-sheet__body--fill' : ''}`}\n scroll-orientation=\"vertical\"\n main-thread:ref={gesture.body}\n main-thread:bindscroll={phone ? bodyGesture.onScrollMT : undefined}\n main-thread:bindtouchstart={bodyGesture.onTouchStartMT}\n scroll-event-throttle={16}\n {...endProps}\n bindscroll={(e: { detail?: { scrollTop?: number } }) =>\n indicator.current?.setTop(e.detail?.scrollTop ?? 0)\n }\n bindlayoutchange={(e: { detail?: { height?: number } }) =>\n indicator.current?.setViewport(e.detail?.height ?? 0)\n }\n style={{\n padding: `${o.padding ?? 0}px`,\n ...(maxBody !== null ? { maxHeight: `${maxBody}px` } : {}),\n }}\n >\n {content}\n </scroll-view>\n <G9SheetScrollIndicator model={indicator.current} />\n </view>\n ) : (\n <scroll-view\n className={`g9-sheet__body${layout.fillBody ? ' g9-sheet__body--fill' : ''}`}\n scroll-orientation=\"vertical\"\n main-thread:ref={gesture.body}\n main-thread:bindscroll={phone ? bodyGesture.onScrollMT : undefined}\n main-thread:bindtouchstart={bodyGesture.onTouchStartMT}\n {...endProps}\n style={{\n padding: `${o.padding ?? 0}px`,\n ...(maxBody !== null ? { maxHeight: `${maxBody}px` } : {}),\n }}\n >\n {content}\n </scroll-view>\n )}\n <view className=\"g9-sheet__footer-slot\" bindlayoutchange={onFooterLayout}>\n <G9SheetFooter options={o} />\n </view>\n </G9AnchorLayerContext.Provider>\n </SheetContext.Provider>\n </view>\n {/* Below the surface, so a drag past the top detent (rubber band) never shows the page under it. */}\n <view className=\"g9-sheet__skirt\" style={{ backgroundColor: surface }} />\n </G9SheetGestureFrame>\n </SheetContent>\n </SheetView>\n </SheetRoot>\n );\n}\n"],"names":["SheetContext","createContext","useG9SheetContext","useContext","noop","scrimColor","entry","settings","opacity","explicit","parsed","tryParseColor","formatColor","withAlpha","sheetInnerStyle","g9SheetRecedeTransition","g9Ms","orderedDetents","o","requested","d","restingSnapIndex","resting","fit","detents","Math","initialDetent","_o_currentState","_ordered_","ordered","current","G9SheetFrame","props","_o_route","_ref1","_o_loadingSkeletonRowCount","_ratios_layout_initialSnap","_props_bottomInset","_o_scrollToEndThreshold","_o_openAnimationDurationMs","_o_closeAnimationDurationMs","_o_cornerRadius","_o_backgroundColor","_ratios_restIndex","_o_padding","_o_padding1","_o_padding2","_o_route1","_o_route2","_props_memo","stack","palette","useG9Theme","gesture","useSheetGestureRefs","bodyGesture","useSheetBodyGesture","placeOpen","useG9Place","sheetSegmentOf","layout","resolveSheetLayout","showing","closing","handle","controller","useRef","createAbortController","useEffect","_controller_current","factory","deferred","revealed","setRevealed","useState","covering","setCovering","timer","coverTimer","stopTimer","_o_loadDelayMs","_o_loadDelayMs1","delay","startTimer","memoKey","placeholderHeight","undefined","g9SheetFitLoadingMinHeight","bodyHeight","setBodyHeight","footerHeight","setFooterHeight","chromeTopHeight","setChromeTopHeight","onChromeTopLayout","e","_e_detail","onFooterLayout","indicator","G9SheetScrollModel","onBodyLayout","_indicator_current","h","placeholder","view","G9SheetSkeleton","G9ActivityIndicator","body","ratios","p","Number","restingRatio","shown","contentRatio","sheetOverlayOpacity","modal","recede","parentRecedeOffset","setResting","rootRef","lastFitBody","_rootRef_current","fitHeight","lastHostHeight","topPadding","sheetSurfaceTopPadding","bottomPadding","sheetSurfaceBottomPadding","maxBody","g9SheetFitMinHeight","anchorLayer","useMemo","contextValue","platform","currentPlatform","phone","endProps","g9SheetScrollToEndThreshold","openMs","closeMs","corner","surface","notch","g9FieldNotchStyle","resolveThemeColor","restIndex","fitRatio","openRatio","motion","resolveSheetMotion","content","clampFitHeight","SheetRoot","g9SheetDragCloseThreshold","open","index","value","_detents_index","detent","SheetView","SheetBackdrop","SheetContent","platformSheetConstraints","G9SheetGestureFrame","g9IdProps","G9AnchorLayerContext","G9SheetHeader","scroll-view","G9SheetScrollIndicator","G9SheetFooter"],"mappings":";;;;;;;;;;;;;;;;;AAyDA,MAAMA,eAAeC,cAA0C;AAGxD,SAASC;IACd,OAAOC,WAAWH;AACpB;AAuBA,MAAMI,OAAO,KAAa;AAE1B,SAASC,WAAWC,KAAmB,EAAEC,QAAmC,EAAEC,OAA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G,0BAA0B,IAAI,EAC5E,mBAAmB,WACnB,YAAY,KAAKP,QAAQ,IAAI,EAC7B,YAAY,YAAYkF,QAAQhF,YAAY,UAAU,GAAG+B,QACzD,YAAY,gBAAgB/B,YAAY,cAAc,GACrD,GAAGiF,QAAQ,EACZ,OAAO;QACL,SAAS,GAAG,QAAA1F,CAAAA,cAAAA,EAAE,OAAO,AAAD,IAARA,cAAa,EAAE,EAAE,CAAC;QAC9B,GAAIkF,AAAY,SAAZA,UAAmB;YAAE,WAAW,GAAGA,QAAQ,EAAE,CAAC;QAAC,IAAI,CAAC,CAAC;IAC3D,GACD;sBACC,CAACsB,QAAQ;oBACX,EAAEiB,aACF;kBACF,CAAC/D,KAAK,UAAU,wBAAwB,kBAAkBP,gBAAgB;oBACxE,CAACwE,cAAc,SAASvJ,IAAK;kBAC/B,EAAEsF,KAAK;gBACT,EAAE6D,qBAAqB,SAAS;cAClC,EAAErK,aAAa,SAAS;YAC1B,EAAEwG,KAAK;YACP,EAAqG;YACrG,CAACA,KAAK,UAAU,kBAAkB,OAAO;QAAE,iBAAiBqC;IAAQ,IAAK;UAC3E,EAAEsB,oBAAoB;QACxB,EAAEF,aAAa;MACjB,EAAEF,UAAU;IACd,EAAEP;AAEN"}
@@ -34,7 +34,7 @@ export interface G9SheetMotion {
34
34
  }
35
35
  /** What {@link resolveSheetMotion} needs; ratios are shares of the host height (0–1). */
36
36
  export interface G9SheetMotionInput {
37
- readonly style: 'platformNative' | 'timed';
37
+ readonly style: 'platformNative' | 'cupertino' | 'timed';
38
38
  readonly platform: ReturnType<typeof currentPlatform>;
39
39
  /** Share of the host the sheet covers where it opens and from where it closes. */
40
40
  readonly openRatio: number;
@@ -1 +1 @@
1
- {"version":3,"file":"motion.d.ts","sourceRoot":"","sources":["../../src/sheet/motion.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD,kDAAkD;AAClD,eAAO,MAAM,sBAAsB,MAA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a,CAW3E"}
@@ -49,7 +49,7 @@ function resolveDesignedSheetMotion(input) {
49
49
  exitAnimation: tween(scaled(input.closeMs, input.openRatio, input.sizeScaled), easeOutCubicMT),
50
50
  snapAnimation: tween(input.openMs, easeOutCubicMT)
51
51
  };
52
- if ('ios' === input.platform || 'macos' === input.platform) {
52
+ if ('cupertino' === input.style || 'ios' === input.platform || 'macos' === input.platform) {
53
53
  const spring = {
54
54
  type: 'spring',
55
55
  stiffness: g9CupertinoOmega * g9CupertinoOmega,