@tasknotes/calendar 0.1.6 → 0.1.8

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/CHANGELOG.md CHANGED
@@ -1,5 +1,35 @@
1
1
  # Changelog
2
2
 
3
+ ## Unreleased
4
+
5
+ ## 0.1.8
6
+
7
+ ### Changed
8
+
9
+ - Collision stacks show a quiet count and a preview of their contents. Tracked-time titles never split words in the side lane, and adjacent timed events retain a visible boundary.
10
+ - Calendar interaction colours and motion expose theme hooks. Keyboard focus, selected hover, touch, drag origin and preview, pending writes and rejected writes have distinct treatments; Escape removes the drag origin without changing data.
11
+ - Dragging near a scroll edge reveals more of the calendar; cancellation restores the original scroll position. Empty agenda ranges retain host-provided filter recovery alongside per-day creation.
12
+ - Agenda drag previews follow the pointer without shifting neighbouring rows. Releasing after Escape does not open the task underneath the cancelled drag.
13
+ - Compact Month shows narrow chips or dots consistently, with a quiet overflow count, and fits narrow grids. Selected dates carry into Day view.
14
+ - Time ranges follow event width rather than duration and stay visible during resize. Narrow Week headers fit dates and today's badge.
15
+ - Year reveals the anchor month when opened or navigated.
16
+ - Toolbars fit narrow widths, the date strip loads its complete window, and strip expansion stays on the labelled month control.
17
+ - A dim source stays at the original position during calendar drags, and linked hover is suppressed while dragging.
18
+
19
+ ## 0.1.7
20
+
21
+ ### Added
22
+
23
+ - Hosts can read collision column counts and the unobscured timed content width, choose views responsively, fill an empty list through a content hook, and translate the stack label with the `appointments` text.
24
+
25
+ ### Fixed
26
+
27
+ - Collision stacks show appointment counts and open only the matching collision group, without unrelated all-day or timed items. Narrow time grids reveal the selected day on entry and view changes, not only after Today.
28
+ - Crowded time-grid days use readable collision stacks without widening the entire week; stack contents retain drag-and-drop, including after moving the calendar into another window.
29
+ - Today reveals the current day horizontally, with persistent day navigation when the grid is wider than its pane.
30
+ - Overflow dialogs clamp to the visible viewport, reposition on resize and scroll, keep Close reachable, and provide touch-sized rows and keyboard navigation.
31
+ - Collision stacks honour `eventMaxStack`, and overflow triggers stay stable across rerenders, so Escape returns focus to them.
32
+
3
33
  ## 0.1.6
4
34
 
5
35
  ### Changed
package/README.md CHANGED
@@ -69,8 +69,18 @@ to 00:00–24:00 in 30-minute slots, initially scrolled to 08:00.
69
69
  `text` supplies translated labels; `itemContent` and related hooks supply
70
70
  custom DOM. The exported `CalendarOptions<D>` type documents the full API.
71
71
 
72
+ `toolbar.viewDisplay` defaults to `"auto"`: full view-name buttons become a
73
+ native select when the toolbar cannot fit them. Use `"buttons"` or `"select"`
74
+ to choose a fixed presentation. The select uses the same translated view names
75
+ and changes views through the same navigation lifecycle as the buttons.
76
+
72
77
  ### Month and list
73
78
 
79
+ - `monthDisplay: "chips"` uses compact filled title strips instead of dots, clipped without ellipses, with a counted overflow row. Set `--tnc-chip-h` to size the rows. Like dots, chips are passive summaries: the whole day cell is the keyboard and pointer target, and the host can open a full selected-day list through `onDateClick`.
80
+ - `gotoDate()` within the displayed month updates the navigation anchor without rebuilding its cells, preserving keyboard focus when a host selects a day. A subsequent view switch uses that selected date.
81
+
82
+ - `listEmptyContent()` may return a host-owned DOM node for an empty list, such as an explanation and recovery action. The default translated empty message remains when omitted. The node is removed when the list gains items.
83
+
74
84
  - `monthDisplay: "dots"` draws every item in a month cell as a small dot (`--tnc-dot-size`, `--tnc-dot-gap`) that wraps across the cell, with "+N" when they do not fit; `dayMaxEvents` caps the dots (`false` lets cells grow). The day cell is the tap target: dots ignore the pointer, are `aria-hidden`, get no content hook, and the cell is labelled "<date>, N items" (`text.itemCount`). Items in dots have `variant: "indicator"`; colour them with `color` or `itemDidMount` setting `--tnc-c`.
75
85
  - **"+N more" height**: day rows (and the time grid's all-day row) make room for the link at its rendered height, so a host may give it a 44px touch target (`--tnc-more-h`, or any min-height) without overflowing the row.
76
86
  - `listStart: "date" | "week"`: the list view starts at the date (default; FullCalendar `duration: { days: n }` lists, as the TaskNotes plugin and app used) or at the start of its week (FullCalendar's stock `listWeek`); week-aligned lists step by whole weeks.
@@ -105,6 +115,30 @@ custom DOM. The exported `CalendarOptions<D>` type documents the full API.
105
115
  Set `--tnc-theme-*` variables on the host (they inherit into the calendar)
106
116
  or on `.tnc`. The stylesheet is scoped to `.tnc` and does not inject CSS.
107
117
 
118
+ Time grids collapse crowded collision groups into labelled, expandable stacks
119
+ instead of widening every day. `--tnc-event-min-width` sets the readable event
120
+ width in pixels (default 128). Keep the day minimum independent of collisions:
121
+
122
+ ```css
123
+ .my-calendar .tnc-tg {
124
+ --tnc-col-min: 128px;
125
+ --tnc-event-min-width: 128px;
126
+ }
127
+ ```
128
+
129
+ When the day minimums exceed a narrow viewport, persistent day buttons reveal
130
+ offscreen dates, and Today reveals the current day. Headers, all-day rows and
131
+ timed columns stay aligned. `--tnc-collision-columns` remains available as
132
+ diagnostic metadata (respecting `eventMaxStack`), not a week-wide width multiplier.
133
+ Overflow dialogs clamp to the visible calendar and viewport, scroll vertically,
134
+ and support Tab, arrow keys, Home, End and Escape. Timed items dragged from
135
+ overflow start at their actual time rather than the slot underneath the dialog.
136
+
137
+ Timed events also expose `--tnc-event-readable-width`, the percentage of their
138
+ width not covered by the next collision column. Hosts can use it as the
139
+ `max-width` of `.tnc-item-main` to keep text readable while preserving the user's
140
+ overlapping event backgrounds. It is `100%` for non-overlapping placements.
141
+
108
142
  ```css
109
143
  .my-calendar {
110
144
  --tnc-theme-bg: #181818;
@@ -123,6 +157,9 @@ or on `.tnc`. The stylesheet is scoped to `.tnc` and does not inject CSS.
123
157
  Additional semantic colours: `--tnc-theme-now`, `--tnc-theme-warn`,
124
158
  `--tnc-theme-ok`, `--tnc-theme-amber`. Item colours come from `color`,
125
159
  `backgroundColor`, `borderColor` and `textColor`.
160
+ Set an item's `timeDisplay: "start"` for deadlines or other point-in-time markers:
161
+ visible and accessible labels show only its exact start time. This presentation
162
+ option does not alter the item's stored dates, layout duration or hit area.
126
163
  Override sizing tokens such as `--tnc-font-size`, `--tnc-small`,
127
164
  `--tnc-radius`, `--tnc-bar-h`, `--tnc-more-h`, `--tnc-dot-size` and
128
165
  `--tnc-dot-gap` directly on `.tnc` (not just its ancestor).