react-smart-scheduler 0.1.2 → 0.1.3

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/dist/index.d.ts CHANGED
@@ -1,5 +1,7 @@
1
1
  import { default as default_2 } from 'react';
2
2
 
3
+ export declare type Breakpoint = 'mobile' | 'tablet' | 'desktop';
4
+
3
5
  /**
4
6
  * The shape of a single calendar event.
5
7
  *
@@ -44,6 +46,12 @@ export declare function pickColor(id: string): string;
44
46
  * 4. Resize is handled entirely in EventItem via Pointer Capture API,
45
47
  * completely independent of dnd-kit. EventItem calls onEventResizeEnd
46
48
  * after commit; Scheduler forwards to onEventChange.
49
+ *
50
+ * 5. Responsive: uses useBreakpoint() to set the initial default view
51
+ * when no `view` prop is provided (uncontrolled mode).
52
+ * mobile → 'day', tablet/desktop → 'week'.
53
+ * Both PointerSensor and TouchSensor are active so drag & drop works
54
+ * on touch devices out of the box.
47
55
  */
48
56
  export declare const Scheduler: default_2.FC<SchedulerProps>;
49
57
 
@@ -79,8 +87,23 @@ export declare interface SchedulerProps {
79
87
  className?: string;
80
88
  }
81
89
 
90
+ /**
91
+ * Returns the current responsive breakpoint and re-renders whenever the
92
+ * window is resized across a threshold.
93
+ *
94
+ * Breakpoints:
95
+ * mobile — < 640 px (phones, small screens)
96
+ * tablet — 640–1023 px (tablets, small laptops)
97
+ * desktop — ≥ 1024 px (standard laptop / desktop)
98
+ *
99
+ * Usage:
100
+ * const bp = useBreakpoint();
101
+ * const isMobile = bp === 'mobile';
102
+ */
103
+ export declare function useBreakpoint(): Breakpoint;
104
+
82
105
  /** Library version — matches package.json version field. */
83
- export declare const VERSION: "0.1.2";
106
+ export declare const VERSION: "0.1.3";
84
107
 
85
108
  export declare type ViewType = 'day' | 'week' | 'month';
86
109