rangeflow 1.0.12 → 1.0.13

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 CHANGED
@@ -110,7 +110,7 @@ Main component. Renders the full picker.
110
110
  | `calendar` | `boolean` | No | `true` | Show the popover calendar on the left of the header. |
111
111
  | `CalendarProps` | `DayPickerProps` from `react-day-picker` | No | `undefined` | Pass through props to the inner calendar (months, locale, modifiers, etc.). |
112
112
  | `Slots` | `Slots` | No | `{}` | Replace any visible part with your own component. |
113
- | `api` | `RangeFlowApi` | No | `undefined` | Hook returned object for external control. See `useRangeflow`. |
113
+ | `api` | `RangeFlowApi` | No | `undefined` | Hook returned object for external control. See `useRangeFlow`. |
114
114
 
115
115
  #### Types
116
116
 
@@ -126,12 +126,12 @@ type DateDisabled =
126
126
  | { before?: Date; after: Date }
127
127
  ```
128
128
 
129
- ### `useRangeflow()`
129
+ ### `useRangeFlow()`
130
130
 
131
131
  Returns an imperative API object. Pass it into `<RangeFlow api={...} />` to control the picker from outside.
132
132
 
133
133
  ```ts
134
- const rangeflow = useRangeflow()
134
+ const rangeflow = useRangeFlow()
135
135
 
136
136
  rangeflow.updateRange({ from, to }) // change the window
137
137
  rangeflow.updateSelectedDates({ from, to }) // change the picked range
@@ -339,16 +339,16 @@ Keep the slider and tabs, drop the popover calendar.
339
339
  />
340
340
  ```
341
341
 
342
- ### 8. External controls with `useRangeflow`
342
+ ### 8. External controls with `useRangeFlow`
343
343
 
344
344
  Drive the picker from buttons, forms, or URL params.
345
345
 
346
346
  ```tsx
347
- import { RangeFlow, useRangeflow } from 'rangeflow'
347
+ import { RangeFlow, useRangeFlow } from 'rangeflow'
348
348
  import dayjs from 'dayjs'
349
349
 
350
350
  export function WithControls() {
351
- const rangeflow = useRangeflow()
351
+ const rangeflow = useRangeFlow()
352
352
 
353
353
  return (
354
354
  <div>
@@ -503,12 +503,12 @@ Use these class names to style parts of the picker without touching the tokens.
503
503
 
504
504
  If you are an AI tool generating code with RangeFlow, keep these facts in mind:
505
505
 
506
- - The package is `rangeflow`. Only two named exports are public: `RangeFlow` (component) and `useRangeflow` (hook). Also a type export `RangeFlowApi`.
506
+ - The package is `rangeflow`. Only two named exports are public: `RangeFlow` (component) and `useRangeFlow` (hook). Also a type export `RangeFlowApi`.
507
507
  - Always import the CSS file once: `import 'rangeflow/style.css'`.
508
508
  - `defaultRange` and `defaultSelected` are required. Both must be `{ from: Date; to: Date }`.
509
509
  - `defaultSelected` must fit inside `defaultRange` or the slider will clamp it.
510
510
  - `onChange` is required and fires with `{ from: Date; to: Date }`.
511
- - To drive the picker from outside, call `useRangeflow()` and pass the result to `<RangeFlow api={...} />`. Then use `updateRange` or `updateSelectedDates`.
511
+ - To drive the picker from outside, call `useRangeFlow()` and pass the result to `<RangeFlow api={...} />`. Then use `updateRange` or `updateSelectedDates`.
512
512
  - Theming is CSS variable based. Set `--rangeflow-accent` on any parent to re-skin the picker.
513
513
  - Dark mode turns on via a `dark` class or `data-theme="dark"` on the picker or any parent.
514
514
  - The picker is 560px wide and 140px tall by default (`w-140 h-35` in Tailwind units).
@@ -1,2 +1,2 @@
1
1
  import { RangeFlowApi } from '../types';
2
- export declare function useRangeflow(): RangeFlowApi;
2
+ export declare function useRangeFlow(): RangeFlowApi;
package/dist/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  export { RangeFlow } from './RangeFlow';
2
- export { useRangeflow } from './hooks/use-rangeflow';
2
+ export { useRangeFlow } from './hooks/use-rangeflow';
3
3
  export type { RangeFlowProps, RangeFlowApi } from './types';
package/dist/index.js CHANGED
@@ -880,4 +880,4 @@ function He() {
880
880
  };
881
881
  }
882
882
  //#endregion
883
- export { Ve as RangeFlow, He as useRangeflow };
883
+ export { Ve as RangeFlow, He as useRangeFlow };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rangeflow",
3
- "version": "1.0.12",
3
+ "version": "1.0.13",
4
4
  "type": "module",
5
5
  "description": "A fancy date range picker built with React and Tailwind.",
6
6
  "license": "MIT",