@arun-dev/headless 4.16.0 → 4.17.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.
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  fold
3
3
  } from "../chunk-ETNICT5M.js";
4
- import {
5
- byDocumentOrder,
6
- rovingIndex
7
- } from "../chunk-2S4XG4VD.js";
8
4
  import {
9
5
  anchorNameFor,
10
6
  anchoredDataAttributes,
11
7
  anchoredPopupStyle
12
8
  } from "../chunk-HCOCPQXS.js";
9
+ import {
10
+ byDocumentOrder,
11
+ rovingIndex
12
+ } from "../chunk-2S4XG4VD.js";
13
13
  import {
14
14
  useControlled
15
15
  } from "../chunk-UEIB3I3T.js";
package/dist/index.d.cts CHANGED
@@ -50,9 +50,7 @@ declare function mergeProps(...objects: (UnknownProps | undefined)[]): UnknownPr
50
50
  * default element and the props it wants; the consumer can replace the element
51
51
  * entirely via `render` without losing any of it.
52
52
  *
53
- * Currently uses no hooks. The `use` prefix matches the API it will grow into
54
- * (memoised merging, so parts stop re-rendering their children needlessly) and keeps
55
- * call sites stable when that lands.
53
+ * Uses no hooks; the `use` prefix keeps its call sites those of a hook.
56
54
  */
57
55
  interface UseRenderParams {
58
56
  /**
package/dist/index.d.ts CHANGED
@@ -50,9 +50,7 @@ declare function mergeProps(...objects: (UnknownProps | undefined)[]): UnknownPr
50
50
  * default element and the props it wants; the consumer can replace the element
51
51
  * entirely via `render` without losing any of it.
52
52
  *
53
- * Currently uses no hooks. The `use` prefix matches the API it will grow into
54
- * (memoised merging, so parts stop re-rendering their children needlessly) and keeps
55
- * call sites stable when that lands.
53
+ * Uses no hooks; the `use` prefix keeps its call sites those of a hook.
56
54
  */
57
55
  interface UseRenderParams {
58
56
  /**
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  fold
3
3
  } from "../chunk-ETNICT5M.js";
4
- import {
5
- byDocumentOrder,
6
- rovingIndex
7
- } from "../chunk-2S4XG4VD.js";
8
4
  import {
9
5
  anchorNameFor,
10
6
  anchoredDataAttributes,
11
7
  anchoredPopupStyle
12
8
  } from "../chunk-HCOCPQXS.js";
9
+ import {
10
+ byDocumentOrder,
11
+ rovingIndex
12
+ } from "../chunk-2S4XG4VD.js";
13
13
  import {
14
14
  useControlled
15
15
  } from "../chunk-UEIB3I3T.js";
@@ -27,6 +27,11 @@ type ToastOptions<Data = unknown> = {
27
27
  /** Milliseconds before it closes on its own. `0` keeps it until closed. Defaults to the Provider's. */
28
28
  timeout?: number;
29
29
  priority?: ToastPriority;
30
+ /**
31
+ * Where this toast shows, for the ui's default rendering, overriding its Viewport's
32
+ * `position`. Headless keeps it and does nothing with it: your own layout places toasts.
33
+ */
34
+ position?: string;
30
35
  /** A button on the toast, for the ui's default rendering. The headless `Action` part is yours to place. */
31
36
  action?: {
32
37
  label: ReactNode;
@@ -27,6 +27,11 @@ type ToastOptions<Data = unknown> = {
27
27
  /** Milliseconds before it closes on its own. `0` keeps it until closed. Defaults to the Provider's. */
28
28
  timeout?: number;
29
29
  priority?: ToastPriority;
30
+ /**
31
+ * Where this toast shows, for the ui's default rendering, overriding its Viewport's
32
+ * `position`. Headless keeps it and does nothing with it: your own layout places toasts.
33
+ */
34
+ position?: string;
30
35
  /** A button on the toast, for the ui's default rendering. The headless `Action` part is yours to place. */
31
36
  action?: {
32
37
  label: ReactNode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arun-dev/headless",
3
- "version": "4.16.0",
3
+ "version": "4.17.0",
4
4
  "description": "Unstyled React behaviour primitives — render engine, controlled/uncontrolled state, and data-* state projection. Ships no CSS and no class names.",
5
5
  "license": "MIT",
6
6
  "type": "module",