@taskctrl/canvas-timeline 0.7.0 → 0.8.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.
@@ -12,3 +12,10 @@ export declare function detectEdge(canvasX: number, item: Item, view: ViewState,
12
12
  * than falling through to the global value.
13
13
  */
14
14
  export declare function resolveCanResize(item: Item, globalCanResize: false | 'left' | 'right' | 'both'): false | 'left' | 'right' | 'both';
15
+ /**
16
+ * Resolve the effective `canMove` for an item: a per-item `item.canMove` wins
17
+ * when present, otherwise the timeline-wide `globalCanMove` applies. Uses `??`
18
+ * (not `||`) so an explicit per-item `false` disables moving rather than
19
+ * falling through to the global value.
20
+ */
21
+ export declare function resolveCanMove(item: Item, globalCanMove: boolean): boolean;
package/dist/types.d.ts CHANGED
@@ -17,6 +17,9 @@ export interface Item {
17
17
  /** Per-item override of the timeline-wide `canResize` prop. When set, this
18
18
  * wins for this item; when omitted, the global `canResize` applies. */
19
19
  canResize?: false | 'left' | 'right' | 'both';
20
+ /** Per-item override of the timeline-wide `canMove` prop. When set, this
21
+ * wins for this item; when omitted, the global `canMove` applies. */
22
+ canMove?: boolean;
20
23
  [key: string]: unknown;
21
24
  }
22
25
  export interface ItemBounds {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taskctrl/canvas-timeline",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "description": "High-performance canvas-based timeline component for React",
5
5
  "scripts": {
6
6
  "build": "rimraf ./dist && tsc && vite build",