react-native-roster 0.4.3 → 0.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -190,6 +190,8 @@ The caller owns clock updates. Only instants inside the end-exclusive window are
190
190
  Props ending in `Component` accept component types; props ending in `Zone`
191
191
  accept React nodes. Define slot components at module scope to preserve state.
192
192
  Use exported defaults inside replacements to retain geometry and interaction.
193
+ On web, translated header and lane-label regions use non-scrolling clips, so focusable
194
+ custom content cannot move them out of alignment with the roster body.
193
195
  The [slot tables and examples](./docs/customization.md#roster-zones) cover every region.
194
196
 
195
197
  ### Selection
@@ -0,0 +1,4 @@
1
+ export declare const focusSafeClip: {
2
+ overflow: "hidden";
3
+ };
4
+ //# sourceMappingURL=focus-safe-clip.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"focus-safe-clip.d.ts","sourceRoot":"","sources":["../../../../src/components/roster/focus-safe-clip.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa;;CAA6C,CAAC"}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.focusSafeClip = void 0;
4
+ exports.focusSafeClip = { overflow: 'hidden' };
5
+ //# sourceMappingURL=focus-safe-clip.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"focus-safe-clip.js","sourceRoot":"","sources":["../../../../src/components/roster/focus-safe-clip.ts"],"names":[],"mappings":";;;AAEa,QAAA,aAAa,GAAG,EAAE,QAAQ,EAAE,QAAQ,EAAsB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { ViewStyle } from 'react-native';
2
+ export declare const focusSafeClip: ViewStyle;
3
+ //# sourceMappingURL=focus-safe-clip.web.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"focus-safe-clip.web.d.ts","sourceRoot":"","sources":["../../../../src/components/roster/focus-safe-clip.web.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,eAAO,MAAM,aAAa,EAAsC,SAAS,CAAC"}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.focusSafeClip = void 0;
4
+ exports.focusSafeClip = { overflow: 'clip' };
5
+ //# sourceMappingURL=focus-safe-clip.web.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"focus-safe-clip.web.js","sourceRoot":"","sources":["../../../../src/components/roster/focus-safe-clip.web.ts"],"names":[],"mappings":";;;AAEa,QAAA,aAAa,GAAG,EAAE,QAAQ,EAAE,MAAM,EAA0B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../../src/components/roster/layout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAGtD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAEvD,KAAK,iBAAiB,GAAG,IAAI,CAAC,gBAAgB,EAAE,GAAG,MAAM,WAAW,GAAG,WAAW,CAAC,GAAG;IACpF,qDAAqD;IACrD,UAAU,EAAE,SAAS,CAAC;IACtB,mEAAmE;IACnE,UAAU,EAAE,SAAS,CAAC;IACtB,+FAA+F;IAC/F,mBAAmB,EAAE,SAAS,CAAC;IAC/B,kFAAkF;IAClF,QAAQ,EAAE,SAAS,CAAC;IACpB,QAAQ,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC;CAC9C,CAAC;AAEF,wBAAgB,YAAY,CAAC,EAC3B,UAAU,EACV,UAAU,EACV,mBAAmB,EACnB,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,WAAW,EACX,oBAAoB,EACpB,SAAS,EACT,cAAoB,GACrB,EAAE,iBAAiB,2CAuBnB"}
1
+ {"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../../src/components/roster/layout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAItD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAEvD,KAAK,iBAAiB,GAAG,IAAI,CAAC,gBAAgB,EAAE,GAAG,MAAM,WAAW,GAAG,WAAW,CAAC,GAAG;IACpF,qDAAqD;IACrD,UAAU,EAAE,SAAS,CAAC;IACtB,mEAAmE;IACnE,UAAU,EAAE,SAAS,CAAC;IACtB,+FAA+F;IAC/F,mBAAmB,EAAE,SAAS,CAAC;IAC/B,kFAAkF;IAClF,QAAQ,EAAE,SAAS,CAAC;IACpB,QAAQ,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC;CAC9C,CAAC;AAEF,wBAAgB,YAAY,CAAC,EAC3B,UAAU,EACV,UAAU,EACV,mBAAmB,EACnB,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,WAAW,EACX,oBAAoB,EACpB,SAAS,EACT,cAAoB,GACrB,EAAE,iBAAiB,2CAuBnB"}
@@ -4,15 +4,16 @@ exports.RosterLayout = RosterLayout;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_native_1 = require("react-native");
6
6
  const region_style_1 = require("../primitives/region-style");
7
+ const focus_safe_clip_1 = require("./focus-safe-clip");
7
8
  function RosterLayout({ cornerZone, headerZone, laneLabelColumnZone, bodyZone, onLayout, style, headerStyle, laneLabelColumnStyle, bodyStyle, laneLabelWidth = 180, }) {
8
9
  return ((0, jsx_runtime_1.jsxs)(react_native_1.View, { style: (0, region_style_1.regionStyle)(structure.root, paint.root, style), children: [(0, jsx_runtime_1.jsxs)(react_native_1.View, { style: (0, region_style_1.regionStyle)(structure.header, paint.header, headerStyle), children: [(0, jsx_runtime_1.jsx)(react_native_1.View, { style: { width: laneLabelWidth }, children: cornerZone }), (0, jsx_runtime_1.jsx)(react_native_1.View, { style: structure.headerStrip, children: headerZone })] }), (0, jsx_runtime_1.jsxs)(react_native_1.View, { style: structure.content, children: [(0, jsx_runtime_1.jsx)(react_native_1.View, { style: (0, region_style_1.regionStyle)({ ...structure.labels, width: laneLabelWidth }, paint.labels, laneLabelColumnStyle), children: laneLabelColumnZone }), (0, jsx_runtime_1.jsx)(react_native_1.View, { onLayout: onLayout, style: (0, region_style_1.regionStyle)(structure.body, {}, bodyStyle), children: bodyZone })] })] }));
9
10
  }
10
11
  const structure = {
11
12
  root: { flex: 1, minHeight: 0, overflow: 'hidden' },
12
13
  header: { flexDirection: 'row', height: 40, overflow: 'hidden' },
13
- headerStrip: { flex: 1, minWidth: 0, overflow: 'hidden' },
14
+ headerStrip: { flex: 1, minWidth: 0, ...focus_safe_clip_1.focusSafeClip },
14
15
  content: { flex: 1, minHeight: 0, flexDirection: 'row' },
15
- labels: { overflow: 'hidden' },
16
+ labels: focus_safe_clip_1.focusSafeClip,
16
17
  body: { flex: 1, minWidth: 0, overflow: 'hidden' },
17
18
  };
18
19
  // Paint is what a class replaces; see regionStyle.
@@ -1 +1 @@
1
- {"version":3,"file":"layout.js","sourceRoot":"","sources":["../../../../src/components/roster/layout.tsx"],"names":[],"mappings":";;;;AAEA,+CAAoC;AACpC,6DAAyD;AAezD,sBAA6B,EAC3B,UAAU,EACV,UAAU,EACV,mBAAmB,EACnB,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,WAAW,EACX,oBAAoB,EACpB,SAAS,EACT,cAAc,GAAG,GAAG,GACF;IAClB,OAAO,CACL,wBAAC,mBAAI,IAAC,KAAK,EAAE,IAAA,0BAAW,EAAC,SAAS,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,aACzD,wBAAC,mBAAI,IAAC,KAAK,EAAE,IAAA,0BAAW,EAAC,SAAS,CAAC,MAAM,EAAE,KAAK,CAA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C,SAAS,CAAC,IAAI,EAAE,EAAE,EAAE,SAAS,CAAC,YACxE,QAAQ,GACJ,IACF,IACF,CACR,CAAC;AACJ,CAAC;AAED,MAAM,SAAS,GAAG;IAChB,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE;IACnD,MAAM,EAAE,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE;IAChE,WAAW,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,GAAG,+BAAa,EAAE;IACvD,OAAO,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,aAAa,EAAE,KAAK,EAAE;IACxD,MAAM,EAAE,+BAAa;IACrB,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE;CAC1C,CAAC;AACX,mDAAmD;AACnD,MAAM,KAAK,GAAG;IACZ,IAAI,EAAE,EAAE,eAAe,EAAE,MAAM,EAAE;IACjC,MAAM,EAAE,EAAE,iBAAiB,EAAE,CAAC,EAAE,iBAAiB,EAAE,SAAS,EAAE;IAC9D,MAAM,EAAE,EAAE,gBAAgB,EAAE,CAAC,EAAE,gBAAgB,EAAE,SAAS,EAAE;CACpD,CAAC"}
package/llms.txt CHANGED
@@ -200,6 +200,8 @@ Native Web renders object styles inline where they would beat any class. Labels
200
200
  be incomplete". Supply a bounded height; Roster waits for viewport measurement
201
201
  before mounting LegendList. Reanimated keeps horizontal and vertical offsets
202
202
  outside React state.
203
+ On web, translated header and lane-label regions use non-scrolling clips, so browser
204
+ focus scrolling cannot move custom content independently of the roster body.
203
205
 
204
206
  useRoster returns window, projection, orderedLanes, coverage, laneState,
205
207
  geometryFor(lane), scroll, press(lane,x,y), ticks, contentWidth, viewport,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-roster",
3
- "version": "0.4.3",
3
+ "version": "0.4.4",
4
4
  "description": "Resource timeline and schedule components for React Native and web, with layered intervals, coverage, provenance, and explicit daylight-saving handling.",
5
5
  "keywords": [
6
6
  "react-native",
@@ -41,6 +41,7 @@
41
41
  "types": "./dist/src/index.d.ts",
42
42
  "browser": {
43
43
  "./dist/src/components/primitives/press-point.js": "./dist/src/components/primitives/press-point.web.js",
44
+ "./dist/src/components/roster/focus-safe-clip.js": "./dist/src/components/roster/focus-safe-clip.web.js",
44
45
  "./dist/src/components/roster/lanes/interval-hover.js": "./dist/src/components/roster/lanes/interval-hover.web.js",
45
46
  "./dist/src/components/roster/selection/selection-layout.js": "./dist/src/components/roster/selection/selection-layout.web.js"
46
47
  },
@@ -30,6 +30,9 @@ gallery, not a supported customization point. Production Profiler callbacks are
30
30
  Input-bearing slots accept component types and mount in the data-owning parts.
31
31
  The chassis binds defaults once; emptyZone and cornerZone accept nodes. The body
32
32
  content key tracks interval and gap component identity, including class components.
33
+ The layout uses non-scrolling web clips around translated header and lane-label
34
+ content, preventing focus from offsetting either region independently. Native keeps
35
+ overflow clipping on the same regions.
33
36
 
34
37
  `now` is a controlled epoch millisecond value, default null. `useRoster` derives
35
38
  `nowLine` (`{ x, now }`) during render via `xAtTime` using the fitted horizontal
@@ -0,0 +1,3 @@
1
+ import type { ViewStyle } from 'react-native';
2
+
3
+ export const focusSafeClip = { overflow: 'hidden' } satisfies ViewStyle;
@@ -0,0 +1,3 @@
1
+ import type { ViewStyle } from 'react-native';
2
+
3
+ export const focusSafeClip = { overflow: 'clip' } as unknown as ViewStyle;
@@ -2,6 +2,7 @@ import type { ReactNode } from 'react';
2
2
  import type { LayoutChangeEvent } from 'react-native';
3
3
  import { View } from 'react-native';
4
4
  import { regionStyle } from '../primitives/region-style';
5
+ import { focusSafeClip } from './focus-safe-clip';
5
6
  import type { RosterStyleProps } from './roster.types';
6
7
 
7
8
  type RosterLayoutProps = Omit<RosterStyleProps, `${string}ClassName` | 'className'> & {
@@ -55,9 +56,9 @@ export function RosterLayout({
55
56
  const structure = {
56
57
  root: { flex: 1, minHeight: 0, overflow: 'hidden' },
57
58
  header: { flexDirection: 'row', height: 40, overflow: 'hidden' },
58
- headerStrip: { flex: 1, minWidth: 0, overflow: 'hidden' },
59
+ headerStrip: { flex: 1, minWidth: 0, ...focusSafeClip },
59
60
  content: { flex: 1, minHeight: 0, flexDirection: 'row' },
60
- labels: { overflow: 'hidden' },
61
+ labels: focusSafeClip,
61
62
  body: { flex: 1, minWidth: 0, overflow: 'hidden' },
62
63
  } as const;
63
64
  // Paint is what a class replaces; see regionStyle.