@umriss-ui/schedule 0.7.1 → 0.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/docs/llms-full.md CHANGED
@@ -1,4 +1,4 @@
1
- # @umriss-ui/schedule 0.7.1
1
+ # @umriss-ui/schedule 0.34.0
2
2
 
3
3
  > React Gantt-style schedule for data-dense applications - work on lanes over time, with dependencies, blocked time, findings and controlled editing.
4
4
 
@@ -1028,7 +1028,7 @@ From `ScheduleOptions` — the full table stands on [View](#/view/type-ScheduleO
1028
1028
 
1029
1029
  | Prop | Type | Default | Description |
1030
1030
  |---|---|---|---|
1031
- | [`initialView`](#/view/ScheduleOptions-initialView) | [`ScheduleView`](#/view/type-ScheduleView) | — | The view to start from, and to go to whenever one differing in content from the last is handed in - the same view again changes nothing, and what it leaves out is reset; one the schedule reported itself, handed back late, is its own state coming back and not gone to. The schedule remembers none: where a view is kept is the application's decision. |
1031
+ | [`initialView`](#/view/ScheduleOptions-initialView) | [`ScheduleView`](#/view/type-ScheduleView) | — | The view to start from, read once when the hook first runs; a different value on a later render is ignored, as React ignores a changed `defaultValue`. To go to a view later, call `setView`. The schedule remembers none: where a view is kept is the application's decision. |
1032
1032
 
1033
1033
  From `ScheduleView` — the full table stands on [View](#/view/type-ScheduleView).
1034
1034
 
@@ -1358,9 +1358,9 @@ type IntentKind = Intent["kind"];
1358
1358
 
1359
1359
  ###### `PlacingItem`
1360
1360
 
1361
- What the application says it is dragging in, while it drags it
1362
- (schedule-refinement 07): the browser hands over the dragged data only on
1363
- the drop, so the ghost before the drop can only come from the caller.
1361
+ What the application says it is dragging in, while it drags it: the
1362
+ browser hands over the dragged data only on the drop, so the ghost before
1363
+ the drop can only come from the caller.
1364
1364
 
1365
1365
  | Prop | Type | Default | Description |
1366
1366
  |---|---|---|---|
@@ -1498,7 +1498,7 @@ Put the subtask on another lane.
1498
1498
  ###### `PlaceIntent`
1499
1499
 
1500
1500
  Put work on the plan that was not on it: the answer to a drag from outside
1501
- the schedule (schedule-refinement 07). It carries no subtask id - there is
1501
+ the schedule. It carries no subtask id - there is
1502
1502
  no subtask yet; the caller creates one, with its own identity, from
1503
1503
  `subtaskFromPlace`.
1504
1504
 
@@ -1671,7 +1671,7 @@ A group is structure, never a lane: nothing sits on it, no finding is reported f
1671
1671
 
1672
1672
  Folded, a group shows a miniature: every lane in it as a thin strip with its work in the tasks' colours. Dependencies still arrive at the right strip, findings are marked on the row, and a strip can be hovered and selected. Labels, appearances and grips need room and wait for the group to open.
1673
1673
 
1674
- Folding is part of the schedule's view and never an intent: `folded` in `initialView` starts with groups folded, `toggleGroup`, `foldAll` and `unfoldAll` fold from outside, and `onViewChange` reports every fold - see [View](#/view).
1674
+ Folding is part of the schedule's view and never an intent: `folded` in `initialView` starts with groups folded, `toggleGroup`, `foldAll` and `unfoldAll` fold from outside, and `onViewChange` reports every fold the planner makes - see [View](#/view).
1675
1675
 
1676
1676
  #### Examples
1677
1677
 
@@ -1765,7 +1765,7 @@ export default function Nesting() {
1765
1765
 
1766
1766
  ##### Fold groups from outside
1767
1767
 
1768
- `foldAll`, `unfoldAll` and `toggleGroup` fold from outside, and `view.folded` says what is folded - start from `initialView`, keep what `onViewChange` reports.
1768
+ `foldAll`, `unfoldAll` and `toggleGroup` fold from outside, and `view.folded` says what is folded - start from `initialView`, go to a whole view with `setView`, keep what `onViewChange` reports.
1769
1769
 
1770
1770
  ```tsx
1771
1771
  import { Button, Stack, Text } from "@umriss-ui/core";
@@ -1910,8 +1910,8 @@ import { useSchedule } from "@umriss-ui/schedule";
1910
1910
  import type { Subtask, Task } from "@umriss-ui/schedule";
1911
1911
 
1912
1912
  /* The schedule keeps the fold from here on. To store it, keep what
1913
- `onViewChange` reports; to steer it, use the setters `useSchedule` hands
1914
- back. */
1913
+ `onViewChange` reports; to steer it, use `setView` and the setters
1914
+ `useSchedule` hands back. `initialView` is read once. */
1915
1915
 
1916
1916
  const at = (hours: number, minutes = 0) => new Date(2026, 2, 17, hours, minutes).getTime();
1917
1917
 
@@ -2328,7 +2328,7 @@ From `ScheduleOptions` — the full table stands on [View](#/view/type-ScheduleO
2328
2328
 
2329
2329
  | Prop | Type | Default | Description |
2330
2330
  |---|---|---|---|
2331
- | [`initialView`](#/view/ScheduleOptions-initialView) | [`ScheduleView`](#/view/type-ScheduleView) | — | The view to start from, and to go to whenever one differing in content from the last is handed in - the same view again changes nothing, and what it leaves out is reset; one the schedule reported itself, handed back late, is its own state coming back and not gone to. The schedule remembers none: where a view is kept is the application's decision. |
2331
+ | [`initialView`](#/view/ScheduleOptions-initialView) | [`ScheduleView`](#/view/type-ScheduleView) | — | The view to start from, read once when the hook first runs; a different value on a later render is ignored, as React ignores a changed `defaultValue`. To go to a view later, call `setView`. The schedule remembers none: where a view is kept is the application's decision. |
2332
2332
 
2333
2333
  From `ScheduleView` — the full table stands on [View](#/view/type-ScheduleView).
2334
2334
 
@@ -2642,7 +2642,7 @@ From `ScheduleOptions` — the full table stands on [View](#/view/type-ScheduleO
2642
2642
 
2643
2643
  | Prop | Type | Default | Description |
2644
2644
  |---|---|---|---|
2645
- | [`initialView`](#/view/ScheduleOptions-initialView) | [`ScheduleView`](#/view/type-ScheduleView) | — | The view to start from, and to go to whenever one differing in content from the last is handed in - the same view again changes nothing, and what it leaves out is reset; one the schedule reported itself, handed back late, is its own state coming back and not gone to. The schedule remembers none: where a view is kept is the application's decision. |
2645
+ | [`initialView`](#/view/ScheduleOptions-initialView) | [`ScheduleView`](#/view/type-ScheduleView) | — | The view to start from, read once when the hook first runs; a different value on a later render is ignored, as React ignores a changed `defaultValue`. To go to a view later, call `setView`. The schedule remembers none: where a view is kept is the application's decision. |
2646
2646
 
2647
2647
  From `ScheduleView` — the full table stands on [View](#/view/type-ScheduleView).
2648
2648
 
@@ -2825,7 +2825,7 @@ From `ScheduleOptions` — the full table stands on [View](#/view/type-ScheduleO
2825
2825
 
2826
2826
  | Prop | Type | Default | Description |
2827
2827
  |---|---|---|---|
2828
- | [`initialView`](#/view/ScheduleOptions-initialView) | [`ScheduleView`](#/view/type-ScheduleView) | — | The view to start from, and to go to whenever one differing in content from the last is handed in - the same view again changes nothing, and what it leaves out is reset; one the schedule reported itself, handed back late, is its own state coming back and not gone to. The schedule remembers none: where a view is kept is the application's decision. |
2828
+ | [`initialView`](#/view/ScheduleOptions-initialView) | [`ScheduleView`](#/view/type-ScheduleView) | — | The view to start from, read once when the hook first runs; a different value on a later render is ignored, as React ignores a changed `defaultValue`. To go to a view later, call `setView`. The schedule remembers none: where a view is kept is the application's decision. |
2829
2829
 
2830
2830
  From `ScheduleView` — the full table stands on [View](#/view/type-ScheduleView).
2831
2831
 
@@ -3460,7 +3460,7 @@ From `ScheduleOptions` — the full table stands on [View](#/view/type-ScheduleO
3460
3460
 
3461
3461
  | Prop | Type | Default | Description |
3462
3462
  |---|---|---|---|
3463
- | [`initialView`](#/view/ScheduleOptions-initialView) | [`ScheduleView`](#/view/type-ScheduleView) | — | The view to start from, and to go to whenever one differing in content from the last is handed in - the same view again changes nothing, and what it leaves out is reset; one the schedule reported itself, handed back late, is its own state coming back and not gone to. The schedule remembers none: where a view is kept is the application's decision. |
3463
+ | [`initialView`](#/view/ScheduleOptions-initialView) | [`ScheduleView`](#/view/type-ScheduleView) | — | The view to start from, read once when the hook first runs; a different value on a later render is ignored, as React ignores a changed `defaultValue`. To go to a view later, call `setView`. The schedule remembers none: where a view is kept is the application's decision. |
3464
3464
 
3465
3465
  From `ScheduleView` — the full table stands on [View](#/view/type-ScheduleView).
3466
3466
 
@@ -3803,7 +3803,7 @@ From `ScheduleOptions` — the full table stands on [View](#/view/type-ScheduleO
3803
3803
 
3804
3804
  | Prop | Type | Default | Description |
3805
3805
  |---|---|---|---|
3806
- | [`initialView`](#/view/ScheduleOptions-initialView) | [`ScheduleView`](#/view/type-ScheduleView) | — | The view to start from, and to go to whenever one differing in content from the last is handed in - the same view again changes nothing, and what it leaves out is reset; one the schedule reported itself, handed back late, is its own state coming back and not gone to. The schedule remembers none: where a view is kept is the application's decision. |
3806
+ | [`initialView`](#/view/ScheduleOptions-initialView) | [`ScheduleView`](#/view/type-ScheduleView) | — | The view to start from, read once when the hook first runs; a different value on a later render is ignored, as React ignores a changed `defaultValue`. To go to a view later, call `setView`. The schedule remembers none: where a view is kept is the application's decision. |
3807
3807
 
3808
3808
  From `ScheduleView` — the full table stands on [View](#/view/type-ScheduleView).
3809
3809
 
@@ -4545,7 +4545,7 @@ From `ScheduleOptions` — the full table stands on [View](#/view/type-ScheduleO
4545
4545
 
4546
4546
  | Prop | Type | Default | Description |
4547
4547
  |---|---|---|---|
4548
- | [`initialView`](#/view/ScheduleOptions-initialView) | [`ScheduleView`](#/view/type-ScheduleView) | — | The view to start from, and to go to whenever one differing in content from the last is handed in - the same view again changes nothing, and what it leaves out is reset; one the schedule reported itself, handed back late, is its own state coming back and not gone to. The schedule remembers none: where a view is kept is the application's decision. |
4548
+ | [`initialView`](#/view/ScheduleOptions-initialView) | [`ScheduleView`](#/view/type-ScheduleView) | — | The view to start from, read once when the hook first runs; a different value on a later render is ignored, as React ignores a changed `defaultValue`. To go to a view later, call `setView`. The schedule remembers none: where a view is kept is the application's decision. |
4549
4549
 
4550
4550
  From `ScheduleView` — the full table stands on [View](#/view/type-ScheduleView).
4551
4551
 
@@ -4681,7 +4681,7 @@ From `ScheduleOptions` — the full table stands on [View](#/view/type-ScheduleO
4681
4681
 
4682
4682
  | Prop | Type | Default | Description |
4683
4683
  |---|---|---|---|
4684
- | [`initialView`](#/view/ScheduleOptions-initialView) | [`ScheduleView`](#/view/type-ScheduleView) | — | The view to start from, and to go to whenever one differing in content from the last is handed in - the same view again changes nothing, and what it leaves out is reset; one the schedule reported itself, handed back late, is its own state coming back and not gone to. The schedule remembers none: where a view is kept is the application's decision. |
4684
+ | [`initialView`](#/view/ScheduleOptions-initialView) | [`ScheduleView`](#/view/type-ScheduleView) | — | The view to start from, read once when the hook first runs; a different value on a later render is ignored, as React ignores a changed `defaultValue`. To go to a view later, call `setView`. The schedule remembers none: where a view is kept is the application's decision. |
4685
4685
 
4686
4686
  From `ScheduleView` — the full table stands on [View](#/view/type-ScheduleView).
4687
4687
 
@@ -4916,7 +4916,7 @@ From `ScheduleOptions` — the full table stands on [View](#/view/type-ScheduleO
4916
4916
 
4917
4917
  | Prop | Type | Default | Description |
4918
4918
  |---|---|---|---|
4919
- | [`initialView`](#/view/ScheduleOptions-initialView) | [`ScheduleView`](#/view/type-ScheduleView) | — | The view to start from, and to go to whenever one differing in content from the last is handed in - the same view again changes nothing, and what it leaves out is reset; one the schedule reported itself, handed back late, is its own state coming back and not gone to. The schedule remembers none: where a view is kept is the application's decision. |
4919
+ | [`initialView`](#/view/ScheduleOptions-initialView) | [`ScheduleView`](#/view/type-ScheduleView) | — | The view to start from, read once when the hook first runs; a different value on a later render is ignored, as React ignores a changed `defaultValue`. To go to a view later, call `setView`. The schedule remembers none: where a view is kept is the application's decision. |
4920
4920
 
4921
4921
  From `ScheduleView` — the full table stands on [View](#/view/type-ScheduleView).
4922
4922
 
@@ -5556,9 +5556,9 @@ import { useSchedule } from "@umriss-ui/schedule";
5556
5556
 
5557
5557
  Demo page: https://romanhaendler.github.io/umriss-ui/schedule/view/
5558
5558
 
5559
- The schedule keeps its view itself and puts it nowhere, not in the address and not in any storage. `view` on what [`useSchedule`](#/api/useSchedule) hands back holds it, and `onViewChange` reports every change of it - a pan or zoom at most once per frame; keep it where the application keeps things and hand it back through `initialView`.
5559
+ The schedule keeps its view itself and puts it nowhere, not in the address and not in any storage. `view` on what [`useSchedule`](#/api/useSchedule) hands back holds it, and `onViewChange` reports every change the planner makes to it - a pan or zoom at most once per frame; keep it where the application keeps things and go back to it with `setView`.
5560
5560
 
5561
- A view that differs in content from the last one handed in applies at once, and what it leaves out goes back to its default; the same one again changes nothing. Without a span the schedule shows the extent of its subtasks, within `zoomLimits`. A group no `LaneGroup` declares falls out.
5561
+ `initialView` is the start, read once: a different value on a later render is ignored. `setView(view)` goes to a whole view at once, and what it leaves out goes back to its default; the same view again changes nothing, and `onViewChange` does not hear it. Without a span the schedule shows the extent of its subtasks, within `zoomLimits`. A group no `LaneGroup` declares falls out.
5562
5562
 
5563
5563
  `setDomain`, `toggleGroup`, `foldAll` and `unfoldAll` change the view from outside - a button of the application's own that shows the whole plan or folds every team. The selection is not part of the view (`selectedTask`).
5564
5564
 
@@ -5566,7 +5566,7 @@ A view that differs in content from the last one handed in applies at once, and
5566
5566
 
5567
5567
  ##### Keep and restore a view
5568
5568
 
5569
- `onViewChange` reports the span and the folded groups as one view; keep it - here in the browser's storage, so it outlives a reload - and hand it back through `initialView`. Pan, zoom, fold, keep, reload, restore.
5569
+ `onViewChange` reports the span and the folded groups as one view; keep it - here in the browser's storage, so it outlives a reload - and go back to it with `setView`. Pan, zoom, fold, keep, reload, restore.
5570
5570
 
5571
5571
  ```tsx
5572
5572
  import { useState } from "react";
@@ -5612,11 +5612,10 @@ const WORK: Subtask[] = [
5612
5612
  ];
5613
5613
 
5614
5614
  export default function KeepAndRestore() {
5615
- /* The application holds the view the schedule reports; handing it another
5616
- one is all it takes to restore. */
5617
- const [view, setView] = useState<ScheduleView>(START);
5615
+ /* The schedule holds its view; `view` is what it shows now, and `setView`
5616
+ restores a kept one. */
5618
5617
  const [kept, setKept] = useState<ScheduleView | null>(readKept);
5619
- const { Schedule, Lane, LaneGroup, Subtasks, setDomain } = useSchedule({ initialView: view, onViewChange: setView });
5618
+ const { Schedule, Lane, LaneGroup, Subtasks, view, setView, setDomain } = useSchedule({ initialView: START });
5620
5619
 
5621
5620
  return (
5622
5621
  <Stack gap={3}>
@@ -5677,19 +5676,19 @@ The keys of [First schedule](#/schedule/keyboard-schedule) apply here.
5677
5676
 
5678
5677
  | Prop | Type | Default | Description |
5679
5678
  |---|---|---|---|
5680
- | `initialView` | [`ScheduleView`](#type-ScheduleView) | — | The view to start from, and to go to whenever one differing in content from the last is handed in - the same view again changes nothing, and what it leaves out is reset; one the schedule reported itself, handed back late, is its own state coming back and not gone to. The schedule remembers none: where a view is kept is the application's decision.<br>Shown in: [Keep and restore a view](#/view/keep-and-restore), [The smallest schedule (Installation)](#/installation/smallest-schedule), [A day of tours (First schedule)](#/schedule/first-schedule) and 77 more |
5679
+ | `initialView` | [`ScheduleView`](#type-ScheduleView) | — | The view to start from, read once when the hook first runs; a different value on a later render is ignored, as React ignores a changed `defaultValue`. To go to a view later, call `setView`. The schedule remembers none: where a view is kept is the application's decision.<br>Shown in: [Keep and restore a view](#/view/keep-and-restore), [The smallest schedule (Installation)](#/installation/smallest-schedule), [A day of tours (First schedule)](#/schedule/first-schedule) and 77 more |
5681
5680
 
5682
5681
  ###### Events
5683
5682
 
5684
5683
  | Prop | Type | Default | Description |
5685
5684
  |---|---|---|---|
5686
- | `onViewChange` | `(view: `[`ScheduleView`](#type-ScheduleView)`) => void` | — | Every change of the view, once, always the whole view - the one to keep, or to hand another schedule as its `initialView`. A pan or zoom is reported at most once per frame. Not called for the view the schedule starts with.<br>Shown in: [Keep and restore a view](#/view/keep-and-restore), [Keep two schedules in step (Linked schedules)](#/linked-schedules/in-step), [Read a rota beside the incidents (Linked schedules)](#/linked-schedules/rota-beside-incidents) |
5685
+ | `onViewChange` | `(view: `[`ScheduleView`](#type-ScheduleView)`) => void` | — | Every change the planner makes, once, always the whole view - the one to keep, or to hand another schedule's `setView`. A pan or zoom is reported at most once per frame. Not called for the view the schedule starts with, nor for one `setView` applies.<br>Shown in: [Keep two schedules in step (Linked schedules)](#/linked-schedules/in-step), [Read a rota beside the incidents (Linked schedules)](#/linked-schedules/rota-beside-incidents) |
5687
5686
 
5688
5687
  ##### `ScheduleView`
5689
5688
 
5690
5689
  | Prop | Type | Default | Description |
5691
5690
  |---|---|---|---|
5692
- | `domain` | `readonly [number, number]` | — | The span in view, as two wall-clock instants. Absent, the schedule shows the extent of its subtasks, within `zoomLimits`.<br>Shown in: [Keep and restore a view](#/view/keep-and-restore), [The smallest schedule (Installation)](#/installation/smallest-schedule), [A day of tours (First schedule)](#/schedule/first-schedule) and 77 more |
5691
+ | `domain` | `readonly [number, number]` | — | The span in view, as two wall-clock instants. Absent, the schedule shows the extent of its subtasks, within `zoomLimits`.<br>Shown in: [Keep and restore a view](#/view/keep-and-restore), [The smallest schedule (Installation)](#/installation/smallest-schedule), [A day of tours (First schedule)](#/schedule/first-schedule) and 76 more |
5693
5692
  | `folded` | `readonly string[]` | — | The **Lane group**s that are folded, by id. An id no group carries falls out. A folded outer group hides the inner ones without their ids leaving the list, so unfolding it gives back the view that was there.<br>Shown in: [Fold groups from outside (Lane groups)](#/lane-groups/fold-from-outside), [Read a folded group (Lane groups)](#/lane-groups/the-miniature), [Start with groups folded (Lane groups)](#/lane-groups/start-with-groups-folded) |
5694
5693
 
5695
5694
  ### Linked schedules
@@ -5702,7 +5701,7 @@ import { useSchedule } from "@umriss-ui/schedule";
5702
5701
 
5703
5702
  Demo page: https://romanhaendler.github.io/umriss-ui/schedule/linked-schedules/
5704
5703
 
5705
- Each schedule has its own [`useSchedule`](#/api/useSchedule). Hand both the view one of them reports, through `initialView`: a view that differs from the last one handed in applies at once, without a remount, and the same one again changes nothing, so the two never feed each other.
5704
+ Each schedule has its own [`useSchedule`](#/api/useSchedule). Send what one reports to the other's `setView`, in both directions: the other goes there at once, without a remount, and `setView` is not reported, so the two never answer each other.
5706
5705
 
5707
5706
  While a drag is in flight the two can stand a frame apart; they settle as soon as it ends.
5708
5707
 
@@ -5710,13 +5709,12 @@ While a drag is in flight the two can stand a frame apart; they settle as soon a
5710
5709
 
5711
5710
  ##### Keep two schedules in step
5712
5711
 
5713
- Hand the view `onViewChange` reports to both schedules' `initialView`: pan or zoom either one and the other follows - no `key`, no remount.
5712
+ Send what `onViewChange` reports to the other schedule's `setView`: pan or zoom either one and the other follows - no `key`, no remount.
5714
5713
 
5715
5714
  ```tsx
5716
- import { useState } from "react";
5717
5715
  import { Stack, Text } from "@umriss-ui/core";
5718
5716
  import { useSchedule } from "@umriss-ui/schedule";
5719
- import type { ScheduleView, Subtask, Task } from "@umriss-ui/schedule";
5717
+ import type { ScheduleParts, Subtask, Task } from "@umriss-ui/schedule";
5720
5718
 
5721
5719
  const at = (hours: number, minutes = 0) => new Date(2026, 2, 17, hours, minutes).getTime();
5722
5720
  const min = (n: number) => n * 60_000;
@@ -5757,12 +5755,12 @@ const ELECTRIC_LEGS = on(ELECTRIC);
5757
5755
  const time = (instant: number) => new Date(instant).toLocaleTimeString("en-GB", { hour: "2-digit", minute: "2-digit" });
5758
5756
 
5759
5757
  export default function InStep() {
5760
- /* One view for both: each schedule reports its own, and goes to the other's
5761
- because it differs from the last one handed in. */
5762
- const [view, setView] = useState<ScheduleView>({ domain: [at(5, 30), at(18)] });
5763
- const diesel = useSchedule({ initialView: view, onViewChange: setView });
5764
- const electric = useSchedule({ initialView: view, onViewChange: setView });
5765
- const span = view.domain ?? [at(5, 30), at(18)];
5758
+ /* Both start on the same span; each reports what the reader does to it and
5759
+ the other goes there by `setView`, which is not reported in turn. */
5760
+ const start = { domain: [at(5, 30), at(18)] } as const;
5761
+ const diesel: ScheduleParts = useSchedule({ initialView: start, onViewChange: (v) => electric.setView(v) });
5762
+ const electric: ScheduleParts = useSchedule({ initialView: start, onViewChange: (v) => diesel.setView(v) });
5763
+ const span = diesel.view.domain ?? start.domain;
5766
5764
  return (
5767
5765
  <Stack gap={2}>
5768
5766
  <diesel.Schedule ariaLabel="Diesel vehicles on Tuesday, 17 March" height={240}>
@@ -5790,10 +5788,9 @@ export default function InStep() {
5790
5788
  Two schedules with different lanes over one span: who was on call, above the incidents they were paged for.
5791
5789
 
5792
5790
  ```tsx
5793
- import { useState } from "react";
5794
5791
  import { Stack } from "@umriss-ui/core";
5795
5792
  import { useSchedule } from "@umriss-ui/schedule";
5796
- import type { ScheduleView, Subtask, Task } from "@umriss-ui/schedule";
5793
+ import type { ScheduleParts, Subtask, Task } from "@umriss-ui/schedule";
5797
5794
 
5798
5795
  /* Data from the operations world, written out here so the example runs on its own. */
5799
5796
 
@@ -5920,9 +5917,9 @@ const PAGED: readonly Subtask[] = INCIDENTS.map((incident) => ({
5920
5917
  const HIT = SERVICES.filter((service) => PAGED.some((incident) => incident.lane === service.id));
5921
5918
 
5922
5919
  export default function RotaBesideIncidents() {
5923
- const [view, setView] = useState<ScheduleView>({ domain: [day(16, 6), day(17, 14)] });
5924
- const rota = useSchedule({ initialView: view, onViewChange: setView });
5925
- const incidents = useSchedule({ initialView: view, onViewChange: setView });
5920
+ const start = { domain: [day(16, 6), day(17, 14)] } as const;
5921
+ const rota: ScheduleParts = useSchedule({ initialView: start, onViewChange: (v) => incidents.setView(v) });
5922
+ const incidents: ScheduleParts = useSchedule({ initialView: start, onViewChange: (v) => rota.setView(v) });
5926
5923
  return (
5927
5924
  <Stack gap={2}>
5928
5925
  <rota.Schedule ariaLabel="Who was on call" height={140}>
@@ -6003,13 +6000,13 @@ From `ScheduleOptions` — the full table stands on [View](#/view/type-ScheduleO
6003
6000
 
6004
6001
  | Prop | Type | Default | Description |
6005
6002
  |---|---|---|---|
6006
- | [`initialView`](#/view/ScheduleOptions-initialView) | [`ScheduleView`](#/view/type-ScheduleView) | — | The view to start from, and to go to whenever one differing in content from the last is handed in - the same view again changes nothing, and what it leaves out is reset; one the schedule reported itself, handed back late, is its own state coming back and not gone to. The schedule remembers none: where a view is kept is the application's decision. |
6003
+ | [`initialView`](#/view/ScheduleOptions-initialView) | [`ScheduleView`](#/view/type-ScheduleView) | — | The view to start from, read once when the hook first runs; a different value on a later render is ignored, as React ignores a changed `defaultValue`. To go to a view later, call `setView`. The schedule remembers none: where a view is kept is the application's decision. |
6007
6004
 
6008
6005
  ###### Events
6009
6006
 
6010
6007
  | Prop | Type | Default | Description |
6011
6008
  |---|---|---|---|
6012
- | [`onViewChange`](#/view/ScheduleOptions-onViewChange) | `(view: `[`ScheduleView`](#/view/type-ScheduleView)`) => void` | — | Every change of the view, once, always the whole view - the one to keep, or to hand another schedule as its `initialView`. A pan or zoom is reported at most once per frame. Not called for the view the schedule starts with. |
6009
+ | [`onViewChange`](#/view/ScheduleOptions-onViewChange) | `(view: `[`ScheduleView`](#/view/type-ScheduleView)`) => void` | — | Every change the planner makes, once, always the whole view - the one to keep, or to hand another schedule's `setView`. A pan or zoom is reported at most once per frame. Not called for the view the schedule starts with, nor for one `setView` applies. |
6013
6010
 
6014
6011
  From `ScheduleView` — the full table stands on [View](#/view/type-ScheduleView).
6015
6012
 
@@ -6196,7 +6193,7 @@ From `ScheduleOptions` — the full table stands on [View](#/view/type-ScheduleO
6196
6193
 
6197
6194
  | Prop | Type | Default | Description |
6198
6195
  |---|---|---|---|
6199
- | [`initialView`](#/view/ScheduleOptions-initialView) | [`ScheduleView`](#/view/type-ScheduleView) | — | The view to start from, and to go to whenever one differing in content from the last is handed in - the same view again changes nothing, and what it leaves out is reset; one the schedule reported itself, handed back late, is its own state coming back and not gone to. The schedule remembers none: where a view is kept is the application's decision. |
6196
+ | [`initialView`](#/view/ScheduleOptions-initialView) | [`ScheduleView`](#/view/type-ScheduleView) | — | The view to start from, read once when the hook first runs; a different value on a later render is ignored, as React ignores a changed `defaultValue`. To go to a view later, call `setView`. The schedule remembers none: where a view is kept is the application's decision. |
6200
6197
 
6201
6198
  From `ScheduleView` — the full table stands on [View](#/view/type-ScheduleView).
6202
6199
 
@@ -6779,7 +6776,7 @@ From `ScheduleOptions` — the full table stands on [View](#/view/type-ScheduleO
6779
6776
 
6780
6777
  | Prop | Type | Default | Description |
6781
6778
  |---|---|---|---|
6782
- | [`initialView`](#/view/ScheduleOptions-initialView) | [`ScheduleView`](#/view/type-ScheduleView) | — | The view to start from, and to go to whenever one differing in content from the last is handed in - the same view again changes nothing, and what it leaves out is reset; one the schedule reported itself, handed back late, is its own state coming back and not gone to. The schedule remembers none: where a view is kept is the application's decision. |
6779
+ | [`initialView`](#/view/ScheduleOptions-initialView) | [`ScheduleView`](#/view/type-ScheduleView) | — | The view to start from, read once when the hook first runs; a different value on a later render is ignored, as React ignores a changed `defaultValue`. To go to a view later, call `setView`. The schedule remembers none: where a view is kept is the application's decision. |
6783
6780
 
6784
6781
  From `ScheduleView` — the full table stands on [View](#/view/type-ScheduleView).
6785
6782
 
@@ -6962,7 +6959,7 @@ From `ScheduleOptions` — the full table stands on [View](#/view/type-ScheduleO
6962
6959
 
6963
6960
  | Prop | Type | Default | Description |
6964
6961
  |---|---|---|---|
6965
- | [`initialView`](#/view/ScheduleOptions-initialView) | [`ScheduleView`](#/view/type-ScheduleView) | — | The view to start from, and to go to whenever one differing in content from the last is handed in - the same view again changes nothing, and what it leaves out is reset; one the schedule reported itself, handed back late, is its own state coming back and not gone to. The schedule remembers none: where a view is kept is the application's decision. |
6962
+ | [`initialView`](#/view/ScheduleOptions-initialView) | [`ScheduleView`](#/view/type-ScheduleView) | — | The view to start from, read once when the hook first runs; a different value on a later render is ignored, as React ignores a changed `defaultValue`. To go to a view later, call `setView`. The schedule remembers none: where a view is kept is the application's decision. |
6966
6963
 
6967
6964
  From `ScheduleView` — the full table stands on [View](#/view/type-ScheduleView).
6968
6965
 
@@ -7196,7 +7193,7 @@ From `ScheduleOptions` — the full table stands on [View](#/view/type-ScheduleO
7196
7193
 
7197
7194
  | Prop | Type | Default | Description |
7198
7195
  |---|---|---|---|
7199
- | [`initialView`](#/view/ScheduleOptions-initialView) | [`ScheduleView`](#/view/type-ScheduleView) | — | The view to start from, and to go to whenever one differing in content from the last is handed in - the same view again changes nothing, and what it leaves out is reset; one the schedule reported itself, handed back late, is its own state coming back and not gone to. The schedule remembers none: where a view is kept is the application's decision. |
7196
+ | [`initialView`](#/view/ScheduleOptions-initialView) | [`ScheduleView`](#/view/type-ScheduleView) | — | The view to start from, read once when the hook first runs; a different value on a later render is ignored, as React ignores a changed `defaultValue`. To go to a view later, call `setView`. The schedule remembers none: where a view is kept is the application's decision. |
7200
7197
 
7201
7198
  From `ScheduleView` — the full table stands on [View](#/view/type-ScheduleView).
7202
7199
 
@@ -7406,7 +7403,7 @@ From `ScheduleOptions` — the full table stands on [View](#/view/type-ScheduleO
7406
7403
 
7407
7404
  | Prop | Type | Default | Description |
7408
7405
  |---|---|---|---|
7409
- | [`initialView`](#/view/ScheduleOptions-initialView) | [`ScheduleView`](#/view/type-ScheduleView) | — | The view to start from, and to go to whenever one differing in content from the last is handed in - the same view again changes nothing, and what it leaves out is reset; one the schedule reported itself, handed back late, is its own state coming back and not gone to. The schedule remembers none: where a view is kept is the application's decision. |
7406
+ | [`initialView`](#/view/ScheduleOptions-initialView) | [`ScheduleView`](#/view/type-ScheduleView) | — | The view to start from, read once when the hook first runs; a different value on a later render is ignored, as React ignores a changed `defaultValue`. To go to a view later, call `setView`. The schedule remembers none: where a view is kept is the application's decision. |
7410
7407
 
7411
7408
  From `ScheduleView` — the full table stands on [View](#/view/type-ScheduleView).
7412
7409
 
@@ -7827,7 +7824,7 @@ From `ScheduleOptions` — the full table stands on [View](#/view/type-ScheduleO
7827
7824
 
7828
7825
  | Prop | Type | Default | Description |
7829
7826
  |---|---|---|---|
7830
- | [`initialView`](#/view/ScheduleOptions-initialView) | [`ScheduleView`](#/view/type-ScheduleView) | — | The view to start from, and to go to whenever one differing in content from the last is handed in - the same view again changes nothing, and what it leaves out is reset; one the schedule reported itself, handed back late, is its own state coming back and not gone to. The schedule remembers none: where a view is kept is the application's decision. |
7827
+ | [`initialView`](#/view/ScheduleOptions-initialView) | [`ScheduleView`](#/view/type-ScheduleView) | — | The view to start from, read once when the hook first runs; a different value on a later render is ignored, as React ignores a changed `defaultValue`. To go to a view later, call `setView`. The schedule remembers none: where a view is kept is the application's decision. |
7831
7828
 
7832
7829
  From `ScheduleView` — the full table stands on [View](#/view/type-ScheduleView).
7833
7830
 
@@ -8116,7 +8113,7 @@ From `ScheduleOptions` — the full table stands on [View](#/view/type-ScheduleO
8116
8113
 
8117
8114
  | Prop | Type | Default | Description |
8118
8115
  |---|---|---|---|
8119
- | [`initialView`](#/view/ScheduleOptions-initialView) | [`ScheduleView`](#/view/type-ScheduleView) | — | The view to start from, and to go to whenever one differing in content from the last is handed in - the same view again changes nothing, and what it leaves out is reset; one the schedule reported itself, handed back late, is its own state coming back and not gone to. The schedule remembers none: where a view is kept is the application's decision. |
8116
+ | [`initialView`](#/view/ScheduleOptions-initialView) | [`ScheduleView`](#/view/type-ScheduleView) | — | The view to start from, read once when the hook first runs; a different value on a later render is ignored, as React ignores a changed `defaultValue`. To go to a view later, call `setView`. The schedule remembers none: where a view is kept is the application's decision. |
8120
8117
 
8121
8118
  From `ScheduleView` — the full table stands on [View](#/view/type-ScheduleView).
8122
8119
 
@@ -8147,7 +8144,7 @@ Demo page: https://romanhaendler.github.io/umriss-ui/schedule/api/
8147
8144
 
8148
8145
  Declares a schedule: hands back `Schedule` and the parts declared inside it
8149
8146
  - `Lane`, `LaneGroup`, `Subtasks`, `Dependencies`, `BlockedTimes`, `Milestones` -, its
8150
- `view` and the setters `setDomain`, `toggleGroup`, `foldAll` and
8147
+ `view` and the setters `setView`, `setDomain`, `toggleGroup`, `foldAll` and
8151
8148
  `unfoldAll`. A ref on `Schedule` still gives the `ScheduleHandle`.
8152
8149
 
8153
8150
  ```ts
@@ -8475,7 +8472,7 @@ Its table stands on [Findings as data](#/findings/type-Overlap).
8475
8472
  ##### `PlaceIntent`
8476
8473
 
8477
8474
  Put work on the plan that was not on it: the answer to a drag from outside
8478
- the schedule (schedule-refinement 07). It carries no subtask id - there is
8475
+ the schedule. It carries no subtask id - there is
8479
8476
  no subtask yet; the caller creates one, with its own identity, from
8480
8477
  `subtaskFromPlace`.
8481
8478
 
@@ -8492,9 +8489,9 @@ no subtask yet; the caller creates one, with its own identity, from
8492
8489
 
8493
8490
  ##### `PlacingItem`
8494
8491
 
8495
- What the application says it is dragging in, while it drags it
8496
- (schedule-refinement 07): the browser hands over the dragged data only on
8497
- the drop, so the ghost before the drop can only come from the caller.
8492
+ What the application says it is dragging in, while it drags it: the
8493
+ browser hands over the dragged data only on the drop, so the ghost before
8494
+ the drop can only come from the caller.
8498
8495
 
8499
8496
  | Prop | Type | Default | Description |
8500
8497
  |---|---|---|---|
@@ -8510,15 +8507,13 @@ Used on [Placing from outside](#/placing) and [Where a subtask may go](#/where-i
8510
8507
 
8511
8508
  What the drawing needs to know, with the contradiction already settled.
8512
8509
 
8513
- The four names are the ones this module was born with, and they are kept so
8514
- that a caller's code does not change because a picture did. Two of them are
8515
- now named after a drawing they no longer use, and the channel each one
8516
- really owns stands beside it.
8510
+ Two of the field names (`dashed`, `hatched`) are older than the drawing;
8511
+ the channel each one owns stands beside it.
8517
8512
 
8518
8513
  | Prop | Type | Default | Description |
8519
8514
  |---|---|---|---|
8520
8515
  | `dashed` *required* | `boolean` | — | `provisional`: the FILL - none at all, so the surface shows through, with a dashed outline in the task colour. Planned, not released. |
8521
- | `hatched` *required* | `boolean` | — | `fixed`: the ENDS - a cap at each end of the main time. Not a hatch any more; a hatch now says "not available" of a refused lane, and the name is kept only so that this type did not change with the picture. |
8516
+ | `hatched` *required* | `boolean` | — | `fixed`: the ENDS - a cap at each end of the main time. Not a hatch: a hatch says "not available" of a refused lane. The field keeps the name `hatched`. |
8522
8517
  | `muted` *required* | `boolean` | — | `muted`: the SATURATION - the task colour mixed half into the surface, opaque and at full height. Another team's, another crew's. |
8523
8518
  | `open` *required* | `boolean` | — | `open`: the FADE, where the bar passes the edge of the view. It goes on past what is drawn. |
8524
8519
 
@@ -8572,12 +8567,15 @@ it, its view and the setters that change it.
8572
8567
  | `Dependencies` *required* | `typeof Dependencies` | — | <br>Shown in: [The smallest schedule (Installation)](#/installation/smallest-schedule), [A day of tours (First schedule)](#/schedule/first-schedule), [Plan a day in the machine shop (First schedule)](#/schedule/machine-plan) and 27 more |
8573
8568
  | `BlockedTimes` *required* | `typeof BlockedTimes` | — | <br>Shown in: [Block out leave and maintenance (Blocked time)](#/blocked-time/leave), [Plan work around someone's leave (Blocked time)](#/blocked-time/drag-around), [Check a sprint against the leave calendar (Blocked time)](#/blocked-time/team-leave) and 5 more |
8574
8569
  | `Milestones` *required* | `typeof Milestones` | — | <br>Shown in: [Mark a handover and a release (Milestones)](#/milestones/handovers-and-releases), [Say what a milestone is in your own tooltip (Milestones)](#/milestones/say-what-a-milestone-is) |
8575
- | `view` *required* | [`ScheduleView`](#/view/type-ScheduleView) | — | How the planner is looking at the plan: the span and the folded groups.<br>Shown in: [Fold groups from outside (Lane groups)](#/lane-groups/fold-from-outside), [Place a mark of your own (The handle)](#/handle/place-a-mark) |
8570
+ | `view` *required* | [`ScheduleView`](#/view/type-ScheduleView) | — | How the planner is looking at the plan: the span and the folded groups.<br>Shown in: [Fold groups from outside (Lane groups)](#/lane-groups/fold-from-outside), [Keep and restore a view (View)](#/view/keep-and-restore), [Keep two schedules in step (Linked schedules)](#/linked-schedules/in-step) and 1 more |
8571
+ | `setView` *required* | `(view: `[`ScheduleView`](#/view/type-ScheduleView)`) => void` | — | Goes to a whole view; what it leaves out is shown whole again. Not reported through `onViewChange`: two schedules kept in step by `onViewChange: (v) => other.setView(v)` in both directions do not answer each other. A view with the content already shown changes nothing.<br>Shown in: [Keep and restore a view (View)](#/view/keep-and-restore), [Keep two schedules in step (Linked schedules)](#/linked-schedules/in-step), [Read a rota beside the incidents (Linked schedules)](#/linked-schedules/rota-beside-incidents) |
8576
8572
  | `setDomain` *required* | `(span: readonly [number, number] \| null) => void` | — | Puts a span of two wall-clock instants in view; `null` shows the subtasks' extent.<br>Shown in: [Keep and restore a view (View)](#/view/keep-and-restore) |
8577
8573
  | `toggleGroup` *required* | `(id: string) => void` | — | Folds or unfolds one **Lane group**. |
8578
8574
  | `foldAll` *required* | `() => void` | — | Folds every group.<br>Shown in: [Fold groups from outside (Lane groups)](#/lane-groups/fold-from-outside) |
8579
8575
  | `unfoldAll` *required* | `() => void` | — | Unfolds every group.<br>Shown in: [Fold groups from outside (Lane groups)](#/lane-groups/fold-from-outside) |
8580
8576
 
8577
+ Used on [Linked schedules](#/linked-schedules).
8578
+
8581
8579
  ##### `ScheduleProps`
8582
8580
 
8583
8581
  Its table stands on [First schedule](#/schedule/type-ScheduleProps).
@@ -8592,7 +8590,7 @@ Used on [Milestones](#/milestones) and [Tooltip](#/tooltip).
8592
8590
 
8593
8591
  Its table stands on [View](#/view/type-ScheduleView).
8594
8592
 
8595
- Used on [View](#/view) and [Linked schedules](#/linked-schedules).
8593
+ Used on [View](#/view).
8596
8594
 
8597
8595
  ##### `SnapRaster`
8598
8596
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umriss-ui/schedule",
3
- "version": "0.7.1",
3
+ "version": "0.34.0",
4
4
  "description": "React Gantt-style schedule for data-dense applications - work on lanes over time, with dependencies, blocked time, findings and controlled editing.",
5
5
  "license": "MIT",
6
6
  "author": "Roman Händler",
@@ -50,8 +50,8 @@
50
50
  "peerDependencies": {
51
51
  "react": ">=18",
52
52
  "react-dom": ">=18",
53
- "@umriss-ui/charts": "^0.16.0",
54
- "@umriss-ui/core": "^0.33.0"
53
+ "@umriss-ui/charts": "^0.34.0",
54
+ "@umriss-ui/core": "^0.34.0"
55
55
  },
56
56
  "devDependencies": {
57
57
  "@fontsource/geist-mono": "^5.3.0",
@@ -65,8 +65,8 @@
65
65
  "typescript": "^5.6.3",
66
66
  "vite": "^6.0.0",
67
67
  "vite-plugin-dts": "^4.3.0",
68
- "@umriss-ui/charts": "0.16.0",
69
- "@umriss-ui/core": "0.33.0",
68
+ "@umriss-ui/charts": "0.34.0",
69
+ "@umriss-ui/core": "0.34.0",
70
70
  "@umriss-ui/demo": "0.0.0"
71
71
  },
72
72
  "scripts": {
@@ -76,8 +76,9 @@
76
76
  "build": "vite build",
77
77
  "prebuild:demo": "pnpm run props",
78
78
  "build:demo": "vite build --config vite.demo.config.ts",
79
- "pretypecheck": "pnpm run props",
80
79
  "typecheck": "tsc --noEmit",
80
+ "typecheck:demo": "pnpm run props && tsc --noEmit -p tsconfig.demo.json",
81
+ "check:site": "pnpm run props -- --check",
81
82
  "preview:demo": "vite preview --config vite.demo.config.ts --port 4176 --strictPort",
82
83
  "test:unit": "vitest run",
83
84
  "check:dist": "node --disable-warning=ExperimentalWarning --experimental-strip-types ../../scripts/check-dist.ts schedule.js schedule.css"