awesome-timeline-react 0.10.0 → 0.11.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/README.md +7 -1
- package/dist/_tsup-dts-rollup.d.mts +57 -12
- package/dist/_tsup-dts-rollup.d.ts +57 -12
- package/dist/index.css +22 -0
- package/dist/index.css.map +1 -1
- package/dist/index.js +183 -62
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +185 -64
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -108,6 +108,12 @@ The following properties for Timeline component are available:
|
|
|
108
108
|
|
|
109
109
|
- `timeBar` – configure the two-row time bar (see Time bar rows). Defaults to a day row over an hour row.
|
|
110
110
|
|
|
111
|
+
- `showPointerLine` – a dashed vertical line follows the pointer over the rows, with its time shown in the time bar (default `false`). Colors come from `theme.pointerLineColor` / `theme.pointerLabelColor`.
|
|
112
|
+
|
|
113
|
+
- `formatPointerTime` – `(time: number) => string`, the pointer line's label for a unix-seconds time (default: the browser's locale date and time).
|
|
114
|
+
|
|
115
|
+
- `onPointerTime` – `(time: number | null) => void`, fires as the pointer moves over the rows with the time under it, and `null` when it leaves. Feed it to a linked timeline's `setPointerTime` handle method so one line runs through both.
|
|
116
|
+
|
|
111
117
|
- `animations` – layout animations when events re-stack (rows growing, events changing lanes). `true` (default), `false` to disable, or `{ layoutMs?: number, fadeMs?: number }` to tune (defaults 200/120; `layoutMs` is the stacking tween, `fadeMs` the resize-handle fade). A dropped event always lands instantly — only the events re-stacking around it animate.
|
|
112
118
|
|
|
113
119
|
## Theming
|
|
@@ -321,7 +327,7 @@ ref.current?.updateEvents([
|
|
|
321
327
|
]);
|
|
322
328
|
```
|
|
323
329
|
|
|
324
|
-
The full handle: `setEvents`, `updateEvents`, `getEvent`, `scrollToRow`, `scrollToTime`, `setWindow`, `getVisibleRange`, `redraw`.
|
|
330
|
+
The full handle: `setEvents`, `updateEvents`, `getEvent`, `scrollToRow`, `scrollToTime`, `setWindow`, `getVisibleRange`, `setPointerTime`, `redraw`.
|
|
325
331
|
|
|
326
332
|
**Reconciliation rule:** the `events` prop is authoritative whenever its reference changes — a new array fully resets the store and discards imperative state. Pick one mode: declarative (swap the prop) or imperative (stable prop + handle calls).
|
|
327
333
|
|
|
@@ -123,6 +123,11 @@ export declare const computeZoom: (windowTime: [number, number], tick: number, c
|
|
|
123
123
|
cellWidth: number;
|
|
124
124
|
};
|
|
125
125
|
|
|
126
|
+
/** Rescales on a width change. The window is read when the callback fires, never captured: the first
|
|
127
|
+
* callback lands a frame after mount, by when a consumer may already have called `setWindow`, and a
|
|
128
|
+
* captured window would overwrite that window's scale with the one the timeline mounted on. */
|
|
129
|
+
export declare const createWidthObserver: (getWindow: () => number[], onScale: (tick: number, cellWidth: number) => void) => ResizeObserver;
|
|
130
|
+
|
|
126
131
|
/**
|
|
127
132
|
* Returns the window-visible slice of a startTime-sorted event array.
|
|
128
133
|
* Binary search cuts the tail (startTime > windowEnd) in O(log n); the head
|
|
@@ -146,6 +151,13 @@ export declare const default_alias: {
|
|
|
146
151
|
*/
|
|
147
152
|
export declare const default_alias_1: React_2.ForwardRefExoticComponent<CanvasBoardProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
148
153
|
|
|
154
|
+
export declare const default_alias_10: ({ windowTimeRef, setTick, setCellWidth, contentRef, }: {
|
|
155
|
+
windowTimeRef: React.MutableRefObject<number[]>;
|
|
156
|
+
setTick: React.Dispatch<React.SetStateAction<number | null>>;
|
|
157
|
+
setCellWidth: React.Dispatch<React.SetStateAction<number>>;
|
|
158
|
+
contentRef: React.MutableRefObject<HTMLDivElement | null>;
|
|
159
|
+
}) => void;
|
|
160
|
+
|
|
149
161
|
export declare const default_alias_2: ({ windowTime, tick, contentWidth, scrollWidth, theme, timeBar, }: {
|
|
150
162
|
windowTime: number[];
|
|
151
163
|
tick: number | null;
|
|
@@ -163,16 +175,27 @@ export declare const default_alias_2: ({ windowTime, tick, contentWidth, scrollW
|
|
|
163
175
|
*/
|
|
164
176
|
export declare const default_alias_3: React_2.ForwardRefExoticComponent<EventPromptType & React_2.RefAttributes<EventPromptActionsType>>;
|
|
165
177
|
|
|
166
|
-
|
|
178
|
+
/** A dashed vertical line under the pointer, with its time in the time bar. Moved imperatively, so a
|
|
179
|
+
* pointer move costs one transform rather than a React render or a canvas redraw. */
|
|
180
|
+
export declare const default_alias_4: React_2.ForwardRefExoticComponent<{
|
|
181
|
+
contentRef: React_2.MutableRefObject<HTMLDivElement | null>;
|
|
182
|
+
mainRef: React_2.MutableRefObject<HTMLDivElement | null>;
|
|
183
|
+
top: number;
|
|
184
|
+
color: string;
|
|
185
|
+
labelColor: string;
|
|
186
|
+
font?: string;
|
|
187
|
+
} & React_2.RefAttributes<PointerLineActions>>;
|
|
188
|
+
|
|
189
|
+
export declare const default_alias_5: ({ tick, windowTime, }: {
|
|
167
190
|
tick: number | null;
|
|
168
191
|
windowTime: number[];
|
|
169
192
|
}) => React_2.JSX.Element;
|
|
170
193
|
|
|
171
|
-
export declare const
|
|
194
|
+
export declare const default_alias_6: (monthIndex: number) => string;
|
|
172
195
|
|
|
173
|
-
export declare const
|
|
196
|
+
export declare const default_alias_7: (dayIndex: number) => string;
|
|
174
197
|
|
|
175
|
-
export declare const
|
|
198
|
+
export declare const default_alias_8: (eventA: EventType, eventB: EventType) => 1 | -1;
|
|
176
199
|
|
|
177
200
|
/**
|
|
178
201
|
* Pointer-event state machine for the canvas board: pan the time window,
|
|
@@ -180,7 +203,7 @@ export declare const default_alias_7: (eventA: EventType, eventB: EventType) =>
|
|
|
180
203
|
* change grid granularity (middle-click mode or ctrl+wheel). Event mutations
|
|
181
204
|
* are applied straight to the SceneStore — no React state on the hot path.
|
|
182
205
|
*/
|
|
183
|
-
export declare const
|
|
206
|
+
export declare const default_alias_9: ({ scene, rendererRef, dynamicCanvasRef, bodyRef, ghostRef, eventPromptRef, setWindowTime, setCellWidth, setTick, onDrop, onResize, onEventClick, onEventHover, eventsResize, panZoom, selectable, applySelection, getSelection, }: UseCanvasInteractionsArgs) => {
|
|
184
207
|
handlePointerDown: (pointerEvent: React_2.PointerEvent<HTMLCanvasElement>) => void;
|
|
185
208
|
handlePointerMove: (pointerEvent: React_2.PointerEvent<HTMLCanvasElement>) => void;
|
|
186
209
|
handlePointerUp: (pointerEvent: React_2.PointerEvent<HTMLCanvasElement>) => void;
|
|
@@ -189,13 +212,6 @@ export declare const default_alias_8: ({ scene, rendererRef, dynamicCanvasRef, b
|
|
|
189
212
|
handleAuxClick: (pointerEvent: React_2.MouseEvent<HTMLCanvasElement>) => void;
|
|
190
213
|
};
|
|
191
214
|
|
|
192
|
-
export declare const default_alias_9: ({ windowTime, setTick, setCellWidth, contentRef, }: {
|
|
193
|
-
windowTime: number[];
|
|
194
|
-
setTick: React.Dispatch<React.SetStateAction<number | null>>;
|
|
195
|
-
setCellWidth: React.Dispatch<React.SetStateAction<number>>;
|
|
196
|
-
contentRef: React.MutableRefObject<HTMLDivElement | null>;
|
|
197
|
-
}) => void;
|
|
198
|
-
|
|
199
215
|
export declare const DEFAULT_FADE_DURATION_MS = 120;
|
|
200
216
|
|
|
201
217
|
/** Defaults mirror the pre-0.2.x constants (20px bars, 22px lanes, 10px pad). */
|
|
@@ -624,6 +640,12 @@ export { PanZoomConfig as PanZoomConfig_alias_1 }
|
|
|
624
640
|
|
|
625
641
|
export declare type PartialRecord<K extends keyof any, T> = Partial<Record<K, T>>;
|
|
626
642
|
|
|
643
|
+
export declare type PointerLineActions = {
|
|
644
|
+
/** draw the line `x` px into the content column; `label` null draws it without a time label */
|
|
645
|
+
show: (x: number, label: string | null) => void;
|
|
646
|
+
hide: () => void;
|
|
647
|
+
};
|
|
648
|
+
|
|
627
649
|
declare type Rect = {
|
|
628
650
|
x: number;
|
|
629
651
|
y: number;
|
|
@@ -862,10 +884,16 @@ declare type Theme = {
|
|
|
862
884
|
headerShadow?: string;
|
|
863
885
|
/** the frame around the rows; unset, the stylesheet's black applies */
|
|
864
886
|
borderColor?: string;
|
|
887
|
+
/** the pointer line and its time label's background (default "rgba(15,23,42,0.7)") */
|
|
888
|
+
pointerLineColor?: string;
|
|
889
|
+
/** the pointer time label's text (default "#ffffff") */
|
|
890
|
+
pointerLabelColor?: string;
|
|
865
891
|
};
|
|
866
892
|
export { Theme }
|
|
867
893
|
export { Theme as Theme_alias_1 }
|
|
868
894
|
|
|
895
|
+
export declare const TIME_BAR_HEIGHT = 50;
|
|
896
|
+
|
|
869
897
|
/** Per-row configuration for the two-row time bar. */
|
|
870
898
|
export declare type TimeBarConfig = {
|
|
871
899
|
topRow?: TimeBarRowConfig;
|
|
@@ -955,6 +983,9 @@ declare type TimelineHandle = {
|
|
|
955
983
|
startTime: number;
|
|
956
984
|
endTime: number;
|
|
957
985
|
};
|
|
986
|
+
/** draw the pointer line at this time (unix seconds) from outside, e.g. where the pointer is on a
|
|
987
|
+
* linked timeline; null hides it. Labelled only when this timeline shows its time bar. */
|
|
988
|
+
setPointerTime(time: number | null): void;
|
|
958
989
|
/** replace the current selection with these event ids. No `groupId`-tag
|
|
959
990
|
* expansion (that's Cmd/Ctrl+click only), but a group-parent id still pulls
|
|
960
991
|
* in its child events (parent → children). Requires `selectable`; fires
|
|
@@ -1006,6 +1037,8 @@ export declare const TimelineLongRowLabels: () => React_2.JSX.Element;
|
|
|
1006
1037
|
*/
|
|
1007
1038
|
export declare const TimelineNarrowWindow: () => React_2.JSX.Element;
|
|
1008
1039
|
|
|
1040
|
+
export declare const TimelinePointerLine: () => React_2.JSX.Element;
|
|
1041
|
+
|
|
1009
1042
|
export declare const TimelinePrimary: () => React_2.JSX.Element;
|
|
1010
1043
|
|
|
1011
1044
|
declare type TimelineProps = {
|
|
@@ -1066,6 +1099,14 @@ declare type TimelineProps = {
|
|
|
1066
1099
|
/** draw the two-row time bar above the rows (default true). Off, the timeline is just its rows —
|
|
1067
1100
|
* e.g. a secondary strip kept in step with a main timeline through `onWindowChange`/`setWindow`. */
|
|
1068
1101
|
showTimeBar?: boolean;
|
|
1102
|
+
/** a dashed vertical line follows the pointer over the rows, its time shown in the time bar
|
|
1103
|
+
* (default false) */
|
|
1104
|
+
showPointerLine?: boolean;
|
|
1105
|
+
/** the pointer line's label for a time in unix seconds (default: the browser's locale date and time) */
|
|
1106
|
+
formatPointerTime?: (time: number) => string;
|
|
1107
|
+
/** fires as the pointer moves over the rows with the time under it, and null when it leaves —
|
|
1108
|
+
* feed it to a linked timeline's `setPointerTime` */
|
|
1109
|
+
onPointerTime?: (time: number | null) => void;
|
|
1069
1110
|
/** layout animations: true (default), false to disable, or durations */
|
|
1070
1111
|
animations?: AnimationConfig;
|
|
1071
1112
|
};
|
|
@@ -1146,6 +1187,10 @@ export declare const TimelineStreaming10k: () => React_2.JSX.Element;
|
|
|
1146
1187
|
*/
|
|
1147
1188
|
export declare const TimelineStripedOverlap: () => React_2.JSX.Element;
|
|
1148
1189
|
|
|
1190
|
+
/** The strip mounts on its own three weeks and is moved to the main timeline's three days at once —
|
|
1191
|
+
* the first resize callback, a frame later, must not put it back on the three-week scale. */
|
|
1192
|
+
export declare const TimelineStripMountedLate: () => React_2.JSX.Element;
|
|
1193
|
+
|
|
1149
1194
|
/**
|
|
1150
1195
|
* Themeable bar geometry: chunky 32px bars with a 6px lane gap, wide row
|
|
1151
1196
|
* padding, and a larger corner radius. Verifies stacking, hit-testing
|
|
@@ -123,6 +123,11 @@ export declare const computeZoom: (windowTime: [number, number], tick: number, c
|
|
|
123
123
|
cellWidth: number;
|
|
124
124
|
};
|
|
125
125
|
|
|
126
|
+
/** Rescales on a width change. The window is read when the callback fires, never captured: the first
|
|
127
|
+
* callback lands a frame after mount, by when a consumer may already have called `setWindow`, and a
|
|
128
|
+
* captured window would overwrite that window's scale with the one the timeline mounted on. */
|
|
129
|
+
export declare const createWidthObserver: (getWindow: () => number[], onScale: (tick: number, cellWidth: number) => void) => ResizeObserver;
|
|
130
|
+
|
|
126
131
|
/**
|
|
127
132
|
* Returns the window-visible slice of a startTime-sorted event array.
|
|
128
133
|
* Binary search cuts the tail (startTime > windowEnd) in O(log n); the head
|
|
@@ -146,6 +151,13 @@ export declare const default_alias: {
|
|
|
146
151
|
*/
|
|
147
152
|
export declare const default_alias_1: React_2.ForwardRefExoticComponent<CanvasBoardProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
148
153
|
|
|
154
|
+
export declare const default_alias_10: ({ windowTimeRef, setTick, setCellWidth, contentRef, }: {
|
|
155
|
+
windowTimeRef: React.MutableRefObject<number[]>;
|
|
156
|
+
setTick: React.Dispatch<React.SetStateAction<number | null>>;
|
|
157
|
+
setCellWidth: React.Dispatch<React.SetStateAction<number>>;
|
|
158
|
+
contentRef: React.MutableRefObject<HTMLDivElement | null>;
|
|
159
|
+
}) => void;
|
|
160
|
+
|
|
149
161
|
export declare const default_alias_2: ({ windowTime, tick, contentWidth, scrollWidth, theme, timeBar, }: {
|
|
150
162
|
windowTime: number[];
|
|
151
163
|
tick: number | null;
|
|
@@ -163,16 +175,27 @@ export declare const default_alias_2: ({ windowTime, tick, contentWidth, scrollW
|
|
|
163
175
|
*/
|
|
164
176
|
export declare const default_alias_3: React_2.ForwardRefExoticComponent<EventPromptType & React_2.RefAttributes<EventPromptActionsType>>;
|
|
165
177
|
|
|
166
|
-
|
|
178
|
+
/** A dashed vertical line under the pointer, with its time in the time bar. Moved imperatively, so a
|
|
179
|
+
* pointer move costs one transform rather than a React render or a canvas redraw. */
|
|
180
|
+
export declare const default_alias_4: React_2.ForwardRefExoticComponent<{
|
|
181
|
+
contentRef: React_2.MutableRefObject<HTMLDivElement | null>;
|
|
182
|
+
mainRef: React_2.MutableRefObject<HTMLDivElement | null>;
|
|
183
|
+
top: number;
|
|
184
|
+
color: string;
|
|
185
|
+
labelColor: string;
|
|
186
|
+
font?: string;
|
|
187
|
+
} & React_2.RefAttributes<PointerLineActions>>;
|
|
188
|
+
|
|
189
|
+
export declare const default_alias_5: ({ tick, windowTime, }: {
|
|
167
190
|
tick: number | null;
|
|
168
191
|
windowTime: number[];
|
|
169
192
|
}) => React_2.JSX.Element;
|
|
170
193
|
|
|
171
|
-
export declare const
|
|
194
|
+
export declare const default_alias_6: (monthIndex: number) => string;
|
|
172
195
|
|
|
173
|
-
export declare const
|
|
196
|
+
export declare const default_alias_7: (dayIndex: number) => string;
|
|
174
197
|
|
|
175
|
-
export declare const
|
|
198
|
+
export declare const default_alias_8: (eventA: EventType, eventB: EventType) => 1 | -1;
|
|
176
199
|
|
|
177
200
|
/**
|
|
178
201
|
* Pointer-event state machine for the canvas board: pan the time window,
|
|
@@ -180,7 +203,7 @@ export declare const default_alias_7: (eventA: EventType, eventB: EventType) =>
|
|
|
180
203
|
* change grid granularity (middle-click mode or ctrl+wheel). Event mutations
|
|
181
204
|
* are applied straight to the SceneStore — no React state on the hot path.
|
|
182
205
|
*/
|
|
183
|
-
export declare const
|
|
206
|
+
export declare const default_alias_9: ({ scene, rendererRef, dynamicCanvasRef, bodyRef, ghostRef, eventPromptRef, setWindowTime, setCellWidth, setTick, onDrop, onResize, onEventClick, onEventHover, eventsResize, panZoom, selectable, applySelection, getSelection, }: UseCanvasInteractionsArgs) => {
|
|
184
207
|
handlePointerDown: (pointerEvent: React_2.PointerEvent<HTMLCanvasElement>) => void;
|
|
185
208
|
handlePointerMove: (pointerEvent: React_2.PointerEvent<HTMLCanvasElement>) => void;
|
|
186
209
|
handlePointerUp: (pointerEvent: React_2.PointerEvent<HTMLCanvasElement>) => void;
|
|
@@ -189,13 +212,6 @@ export declare const default_alias_8: ({ scene, rendererRef, dynamicCanvasRef, b
|
|
|
189
212
|
handleAuxClick: (pointerEvent: React_2.MouseEvent<HTMLCanvasElement>) => void;
|
|
190
213
|
};
|
|
191
214
|
|
|
192
|
-
export declare const default_alias_9: ({ windowTime, setTick, setCellWidth, contentRef, }: {
|
|
193
|
-
windowTime: number[];
|
|
194
|
-
setTick: React.Dispatch<React.SetStateAction<number | null>>;
|
|
195
|
-
setCellWidth: React.Dispatch<React.SetStateAction<number>>;
|
|
196
|
-
contentRef: React.MutableRefObject<HTMLDivElement | null>;
|
|
197
|
-
}) => void;
|
|
198
|
-
|
|
199
215
|
export declare const DEFAULT_FADE_DURATION_MS = 120;
|
|
200
216
|
|
|
201
217
|
/** Defaults mirror the pre-0.2.x constants (20px bars, 22px lanes, 10px pad). */
|
|
@@ -624,6 +640,12 @@ export { PanZoomConfig as PanZoomConfig_alias_1 }
|
|
|
624
640
|
|
|
625
641
|
export declare type PartialRecord<K extends keyof any, T> = Partial<Record<K, T>>;
|
|
626
642
|
|
|
643
|
+
export declare type PointerLineActions = {
|
|
644
|
+
/** draw the line `x` px into the content column; `label` null draws it without a time label */
|
|
645
|
+
show: (x: number, label: string | null) => void;
|
|
646
|
+
hide: () => void;
|
|
647
|
+
};
|
|
648
|
+
|
|
627
649
|
declare type Rect = {
|
|
628
650
|
x: number;
|
|
629
651
|
y: number;
|
|
@@ -862,10 +884,16 @@ declare type Theme = {
|
|
|
862
884
|
headerShadow?: string;
|
|
863
885
|
/** the frame around the rows; unset, the stylesheet's black applies */
|
|
864
886
|
borderColor?: string;
|
|
887
|
+
/** the pointer line and its time label's background (default "rgba(15,23,42,0.7)") */
|
|
888
|
+
pointerLineColor?: string;
|
|
889
|
+
/** the pointer time label's text (default "#ffffff") */
|
|
890
|
+
pointerLabelColor?: string;
|
|
865
891
|
};
|
|
866
892
|
export { Theme }
|
|
867
893
|
export { Theme as Theme_alias_1 }
|
|
868
894
|
|
|
895
|
+
export declare const TIME_BAR_HEIGHT = 50;
|
|
896
|
+
|
|
869
897
|
/** Per-row configuration for the two-row time bar. */
|
|
870
898
|
export declare type TimeBarConfig = {
|
|
871
899
|
topRow?: TimeBarRowConfig;
|
|
@@ -955,6 +983,9 @@ declare type TimelineHandle = {
|
|
|
955
983
|
startTime: number;
|
|
956
984
|
endTime: number;
|
|
957
985
|
};
|
|
986
|
+
/** draw the pointer line at this time (unix seconds) from outside, e.g. where the pointer is on a
|
|
987
|
+
* linked timeline; null hides it. Labelled only when this timeline shows its time bar. */
|
|
988
|
+
setPointerTime(time: number | null): void;
|
|
958
989
|
/** replace the current selection with these event ids. No `groupId`-tag
|
|
959
990
|
* expansion (that's Cmd/Ctrl+click only), but a group-parent id still pulls
|
|
960
991
|
* in its child events (parent → children). Requires `selectable`; fires
|
|
@@ -1006,6 +1037,8 @@ export declare const TimelineLongRowLabels: () => React_2.JSX.Element;
|
|
|
1006
1037
|
*/
|
|
1007
1038
|
export declare const TimelineNarrowWindow: () => React_2.JSX.Element;
|
|
1008
1039
|
|
|
1040
|
+
export declare const TimelinePointerLine: () => React_2.JSX.Element;
|
|
1041
|
+
|
|
1009
1042
|
export declare const TimelinePrimary: () => React_2.JSX.Element;
|
|
1010
1043
|
|
|
1011
1044
|
declare type TimelineProps = {
|
|
@@ -1066,6 +1099,14 @@ declare type TimelineProps = {
|
|
|
1066
1099
|
/** draw the two-row time bar above the rows (default true). Off, the timeline is just its rows —
|
|
1067
1100
|
* e.g. a secondary strip kept in step with a main timeline through `onWindowChange`/`setWindow`. */
|
|
1068
1101
|
showTimeBar?: boolean;
|
|
1102
|
+
/** a dashed vertical line follows the pointer over the rows, its time shown in the time bar
|
|
1103
|
+
* (default false) */
|
|
1104
|
+
showPointerLine?: boolean;
|
|
1105
|
+
/** the pointer line's label for a time in unix seconds (default: the browser's locale date and time) */
|
|
1106
|
+
formatPointerTime?: (time: number) => string;
|
|
1107
|
+
/** fires as the pointer moves over the rows with the time under it, and null when it leaves —
|
|
1108
|
+
* feed it to a linked timeline's `setPointerTime` */
|
|
1109
|
+
onPointerTime?: (time: number | null) => void;
|
|
1069
1110
|
/** layout animations: true (default), false to disable, or durations */
|
|
1070
1111
|
animations?: AnimationConfig;
|
|
1071
1112
|
};
|
|
@@ -1146,6 +1187,10 @@ export declare const TimelineStreaming10k: () => React_2.JSX.Element;
|
|
|
1146
1187
|
*/
|
|
1147
1188
|
export declare const TimelineStripedOverlap: () => React_2.JSX.Element;
|
|
1148
1189
|
|
|
1190
|
+
/** The strip mounts on its own three weeks and is moved to the main timeline's three days at once —
|
|
1191
|
+
* the first resize callback, a frame later, must not put it back on the three-week scale. */
|
|
1192
|
+
export declare const TimelineStripMountedLate: () => React_2.JSX.Element;
|
|
1193
|
+
|
|
1149
1194
|
/**
|
|
1150
1195
|
* Themeable bar geometry: chunky 32px bars with a 6px lane gap, wide row
|
|
1151
1196
|
* padding, and a larger corner radius. Verifies stacking, hit-testing
|
package/dist/index.css
CHANGED
|
@@ -150,4 +150,26 @@
|
|
|
150
150
|
pointer-events: none;
|
|
151
151
|
z-index: 2;
|
|
152
152
|
}
|
|
153
|
+
.pointer-line {
|
|
154
|
+
display: none;
|
|
155
|
+
position: absolute;
|
|
156
|
+
left: 0;
|
|
157
|
+
width: 0;
|
|
158
|
+
border-left: 1px dashed;
|
|
159
|
+
pointer-events: none;
|
|
160
|
+
z-index: 2;
|
|
161
|
+
}
|
|
162
|
+
.pointer-label {
|
|
163
|
+
display: none;
|
|
164
|
+
position: absolute;
|
|
165
|
+
top: 26px;
|
|
166
|
+
left: 0;
|
|
167
|
+
padding: 0 6px;
|
|
168
|
+
border-radius: 4px;
|
|
169
|
+
line-height: 18px;
|
|
170
|
+
font-size: 11px;
|
|
171
|
+
white-space: nowrap;
|
|
172
|
+
pointer-events: none;
|
|
173
|
+
z-index: 4;
|
|
174
|
+
}
|
|
153
175
|
/*# sourceMappingURL=index.css.map */
|
package/dist/index.css.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/style.css","../src/components/style.css"],"sourcesContent":[".rows-header-wrapper {\n width: 100px;\n height: fit-content;\n border-right: 1px solid yellow;\n background-color: rgb(39, 36, 36);\n color: white;\n box-sizing: border-box;\n box-shadow: 4px 0px 20px black;\n /* above the canvas, so bars panned under the header slide beneath its shadow */\n position: relative;\n z-index: 2;\n}\n\n.main-wrapper {\n position: relative;\n display: flex;\n flex-direction: column;\n height: 100%;\n width: 100%;\n}\n\n.body-wrapper {\n display: flex;\n flex-direction: row;\n border-left: 1px solid black;\n border-bottom: 1px solid black;\n border-right: 1px solid black;\n width: 100%;\n overflow: auto;\n box-sizing: border-box;\n}\n",".row-header {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100px;\n box-sizing: border-box;\n overflow: hidden;\n}\n\n/* The label wraps to as many lines as it needs; the row height is grown to\n fit it (see SceneStore.setLabelMinHeights) so wrapped labels stay vertically\n centered instead of overflowing into the next row. */\n.row-header-label {\n width: 100%;\n text-align: center;\n white-space: normal;\n overflow-wrap: break-word;\n word-break: break-word;\n}\n\n/* Custom row-header content (the `renderRowLabel` slot). Fills the fixed-width cell and the row's\n (dynamic) height so the content can size itself to the space it's given. */\n.row-header-custom {\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n min-width: 0;\n}\n\n/* base look of an event pill — used by the drag ghost */\n.event {\n position: absolute;\n height: 20px;\n border: 1px solid black;\n z-index: 1;\n box-sizing: border-box;\n display: flex;\n justify-content: space-between;\n border-radius: 5px;\n box-shadow: inset 0px 0px 5px gray;\n}\n\n.event-prompt {\n position: absolute;\n display: none;\n z-index: 3;\n}\n\n.time-bar {\n display: flex;\n flex-direction: row;\n width: 100%;\n height: 50px;\n min-height: 50px;\n border: 1px solid yellow;\n background-color: rgb(39, 36, 36);\n color: white;\n box-sizing: border-box;\n /* its shadow falls over the canvas below rather than under the bars */\n position: relative;\n z-index: 2;\n}\n\n.empty-block {\n width: 100px;\n min-width: 100px;\n border-right: 1px solid yellow;\n box-sizing: border-box;\n}\n\n.rt-line {\n position: absolute;\n z-index: 3;\n height: calc(100% - 24px);\n top: 24px;\n width: 2px;\n box-sizing: border-box;\n border-right: dotted 2px red;\n}\n\n.rt-arrow {\n position: absolute;\n z-index: 3;\n top: 0px;\n width: 0;\n height: 0;\n border-left: 15px solid transparent;\n border-right: 15px solid transparent;\n\n border-top: 26px solid red;\n}\n\n.canvas-time-bar {\n height: 100%;\n /* replicates the legacy .hour-row drop shadow onto the content below */\n box-shadow: 0px 4px 20px black;\n}\n\n.canvas-rows-header {\n position: relative;\n flex-shrink: 0;\n}\n\n.canvas-row-header {\n position: absolute;\n width: 100%;\n box-sizing: border-box;\n /* transition is set inline from the `animations` prop */\n}\n\n.canvas-content-column {\n position: relative;\n flex: 1;\n min-width: 0;\n /* the body-wrapper is a flex row; without this the column is stretched to\n the viewport height, the scroll spacer overflows it, and the sticky\n canvas has no room to stick */\n align-self: flex-start;\n}\n\n.canvas-sticky {\n position: sticky;\n top: 0;\n height: 0;\n overflow: visible;\n z-index: 1;\n /* Isolate the sticky's internal layout. The viewport-sized canvases live\n inside it (absolutely positioned); without containment their height leaks\n into the content-sized body-wrapper's size, leaving it taller than its\n rows after a re-stack (a stale gap below the last row). `layout` keeps the\n canvases visible (unlike overflow:hidden) while stopping the leak. */\n contain: layout;\n}\n\n.canvas-sticky canvas {\n position: absolute;\n top: 0;\n left: 0;\n}\n\n.canvas-sticky canvas:last-of-type {\n cursor: grab;\n touch-action: none;\n}\n\n.canvas-drag-ghost {\n display: none;\n height: 20px;\n opacity: 50%;\n background-color: white;\n pointer-events: none;\n z-index: 2;\n}\n"],"mappings":";AAAA,CAAC;AACC,SAAO;AACP,UAAQ;AACR,gBAAc,IAAI,MAAM;AACxB,oBAAkB,IAAI,EAAE,EAAE,EAAE,EAAE;AAC9B,SAAO;AACP,cAAY;AACZ,cAAY,IAAI,IAAI,KAAK;AAEzB,YAAU;AACV,WAAS;AACX;AAEA,CAAC;AACC,YAAU;AACV,WAAS;AACT,kBAAgB;AAChB,UAAQ;AACR,SAAO;AACT;AAEA,CAAC;AACC,WAAS;AACT,kBAAgB;AAChB,eAAa,IAAI,MAAM;AACvB,iBAAe,IAAI,MAAM;AACzB,gBAAc,IAAI,MAAM;AACxB,SAAO;AACP,YAAU;AACV,cAAY;AACd;;;AC9BA,CAAC;AACC,WAAS;AACT,mBAAiB;AACjB,eAAa;AACb,SAAO;AACP,cAAY;AACZ,YAAU;AACZ;AAKA,CAAC;AACC,SAA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L,QAAM;AACR;AAEA,CApBC,cAoBc,MAAM;AACnB,UAAQ;AACR,gBAAc;AAChB;AAEA,CAAC;AACC,WAAS;AACT,UAAQ;AACR,WAAS;AACT,oBAAkB;AAClB,kBAAgB;AAChB,WAAS;AACX;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/style.css","../src/components/style.css"],"sourcesContent":[".rows-header-wrapper {\n width: 100px;\n height: fit-content;\n border-right: 1px solid yellow;\n background-color: rgb(39, 36, 36);\n color: white;\n box-sizing: border-box;\n box-shadow: 4px 0px 20px black;\n /* above the canvas, so bars panned under the header slide beneath its shadow */\n position: relative;\n z-index: 2;\n}\n\n.main-wrapper {\n position: relative;\n display: flex;\n flex-direction: column;\n height: 100%;\n width: 100%;\n}\n\n.body-wrapper {\n display: flex;\n flex-direction: row;\n border-left: 1px solid black;\n border-bottom: 1px solid black;\n border-right: 1px solid black;\n width: 100%;\n overflow: auto;\n box-sizing: border-box;\n}\n",".row-header {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100px;\n box-sizing: border-box;\n overflow: hidden;\n}\n\n/* The label wraps to as many lines as it needs; the row height is grown to\n fit it (see SceneStore.setLabelMinHeights) so wrapped labels stay vertically\n centered instead of overflowing into the next row. */\n.row-header-label {\n width: 100%;\n text-align: center;\n white-space: normal;\n overflow-wrap: break-word;\n word-break: break-word;\n}\n\n/* Custom row-header content (the `renderRowLabel` slot). Fills the fixed-width cell and the row's\n (dynamic) height so the content can size itself to the space it's given. */\n.row-header-custom {\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n min-width: 0;\n}\n\n/* base look of an event pill — used by the drag ghost */\n.event {\n position: absolute;\n height: 20px;\n border: 1px solid black;\n z-index: 1;\n box-sizing: border-box;\n display: flex;\n justify-content: space-between;\n border-radius: 5px;\n box-shadow: inset 0px 0px 5px gray;\n}\n\n.event-prompt {\n position: absolute;\n display: none;\n z-index: 3;\n}\n\n.time-bar {\n display: flex;\n flex-direction: row;\n width: 100%;\n height: 50px;\n min-height: 50px;\n border: 1px solid yellow;\n background-color: rgb(39, 36, 36);\n color: white;\n box-sizing: border-box;\n /* its shadow falls over the canvas below rather than under the bars */\n position: relative;\n z-index: 2;\n}\n\n.empty-block {\n width: 100px;\n min-width: 100px;\n border-right: 1px solid yellow;\n box-sizing: border-box;\n}\n\n.rt-line {\n position: absolute;\n z-index: 3;\n height: calc(100% - 24px);\n top: 24px;\n width: 2px;\n box-sizing: border-box;\n border-right: dotted 2px red;\n}\n\n.rt-arrow {\n position: absolute;\n z-index: 3;\n top: 0px;\n width: 0;\n height: 0;\n border-left: 15px solid transparent;\n border-right: 15px solid transparent;\n\n border-top: 26px solid red;\n}\n\n.canvas-time-bar {\n height: 100%;\n /* replicates the legacy .hour-row drop shadow onto the content below */\n box-shadow: 0px 4px 20px black;\n}\n\n.canvas-rows-header {\n position: relative;\n flex-shrink: 0;\n}\n\n.canvas-row-header {\n position: absolute;\n width: 100%;\n box-sizing: border-box;\n /* transition is set inline from the `animations` prop */\n}\n\n.canvas-content-column {\n position: relative;\n flex: 1;\n min-width: 0;\n /* the body-wrapper is a flex row; without this the column is stretched to\n the viewport height, the scroll spacer overflows it, and the sticky\n canvas has no room to stick */\n align-self: flex-start;\n}\n\n.canvas-sticky {\n position: sticky;\n top: 0;\n height: 0;\n overflow: visible;\n z-index: 1;\n /* Isolate the sticky's internal layout. The viewport-sized canvases live\n inside it (absolutely positioned); without containment their height leaks\n into the content-sized body-wrapper's size, leaving it taller than its\n rows after a re-stack (a stale gap below the last row). `layout` keeps the\n canvases visible (unlike overflow:hidden) while stopping the leak. */\n contain: layout;\n}\n\n.canvas-sticky canvas {\n position: absolute;\n top: 0;\n left: 0;\n}\n\n.canvas-sticky canvas:last-of-type {\n cursor: grab;\n touch-action: none;\n}\n\n.canvas-drag-ghost {\n display: none;\n height: 20px;\n opacity: 50%;\n background-color: white;\n pointer-events: none;\n z-index: 2;\n}\n\n.pointer-line {\n display: none;\n position: absolute;\n left: 0;\n width: 0;\n border-left: 1px dashed;\n pointer-events: none;\n z-index: 2;\n}\n\n.pointer-label {\n display: none;\n position: absolute;\n top: 26px;\n left: 0;\n padding: 0 6px;\n border-radius: 4px;\n line-height: 18px;\n font-size: 11px;\n white-space: nowrap;\n pointer-events: none;\n z-index: 4;\n}\n"],"mappings":";AAAA,CAAC;AACC,SAAO;AACP,UAAQ;AACR,gBAAc,IAAI,MAAM;AACxB,oBAAkB,IAAI,EAAE,EAAE,EAAE,EAAE;AAC9B,SAAO;AACP,cAAY;AACZ,cAAY,IAAI,IAAI,KAAK;AAEzB,YAAU;AACV,WAAS;AACX;AAEA,CAAC;AACC,YAAU;AACV,WAAS;AACT,kBAAgB;AAChB,UAAQ;AACR,SAAO;AACT;AAEA,CAAC;AACC,WAAS;AACT,kBAAgB;AAChB,eAAa,IAAI,MAAM;AACvB,iBAAe,IAAI,MAAM;AACzB,gBAAc,IAAI,MAAM;AACxB,SAAO;AACP,YAAU;AACV,cAAY;AACd;;;AC9BA,CAAC;AACC,WAAS;AACT,mBAAiB;AACjB,eAAa;AACb,SAAO;AACP,cAAY;AACZ,YAAU;AACZ;AAKA,CAAC;AACC,SAAO;AACP,cAAY;AACZ,eAAa;AACb,iBAAe;AACf,cAAY;AACd;AAIA,CAAC;AACC,SAAO;AACP,UAAQ;AACR,WAAS;AACT,eAAa;AACb,mBAAiB;AACjB,aAAW;AACb;AAGA,CAAC;AACC,YAAU;AACV,UAAQ;AACR,UAAQ,IAAI,MAAM;AAClB,WAAS;AACT,cAAY;AACZ,WAAS;AACT,mBAAiB;AACjB,iBAAe;AACf,cAAY,MAAM,IAAI,IAAI,IAAI;AAChC;AAEA,CAAC;AACC,YAAU;AACV,WAAS;AACT,WAAS;AACX;AAEA,CAAC;AACC,WAAS;AACT,kBAAgB;AAChB,SAAO;AACP,UAAQ;AACR,cAAY;AACZ,UAAQ,IAAI,MAAM;AAClB,oBAAkB,IAAI,EAAE,EAAE,EAAE,EAAE;AAC9B,SAAO;AACP,cA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