@kitlangton/knobs 0.4.0-next.11 → 0.4.0-next.12

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,6 +1,7 @@
1
1
  import { type CSSProperties, type ReactNode } from "react";
2
2
  import { type Activity as ActivityHandle, type ActivityOptions } from "./activity.js";
3
3
  import { type Bento as BentoHandle, type BentoOptions } from "./bento.js";
4
+ import { type Canvas as CanvasHandle, type CanvasOptions } from "./canvas.js";
4
5
  import { type CodeDiff as CodeDiffHandle, type CodeDiffOptions, type DiffReview as DiffReviewHandle, type DiffReviewOptions } from "./diff.js";
5
6
  import { type OptionPicker as OptionPickerHandle, type OptionPickerOptions, type PickerOption } from "./picker.js";
6
7
  import { type Split as SplitHandle, type SplitOptions } from "./split.js";
@@ -86,6 +87,17 @@ export type BentoProps = BentoOptions & {
86
87
  * prop; callbacks always call the latest props.
87
88
  */
88
89
  export declare function Bento(props: BentoProps): import("react").JSX.Element;
90
+ export type CanvasProps = CanvasOptions & {
91
+ className?: string;
92
+ style?: CSSProperties;
93
+ onReady?: (canvas: CanvasHandle) => void;
94
+ };
95
+ /**
96
+ * `canvas()` as a component. New `items` update it in place (items that stay keep their content
97
+ * and glide); `onView` always calls the latest prop. Keep `items` (and their `render`s) stable
98
+ * across renders, or each render redraws the cards.
99
+ */
100
+ export declare function Canvas(props: CanvasProps): import("react").JSX.Element;
89
101
  export type ActivityProps = ActivityOptions & {
90
102
  className?: string;
91
103
  style?: CSSProperties;
@@ -1,6 +1,7 @@
1
1
  import { type JSX } from "solid-js";
2
2
  import { type Activity as ActivityHandle, type ActivityOptions } from "./activity.js";
3
3
  import { type Bento as BentoHandle, type BentoOptions } from "./bento.js";
4
+ import { type Canvas as CanvasHandle, type CanvasOptions } from "./canvas.js";
4
5
  import { type CodeDiff as CodeDiffHandle, type CodeDiffOptions, type DiffReview as DiffReviewHandle, type DiffReviewOptions } from "./diff.js";
5
6
  import { type OptionPicker as OptionPickerHandle, type OptionPickerOptions, type PickerOption } from "./picker.js";
6
7
  import { type Split as SplitHandle, type SplitOptions } from "./split.js";
@@ -73,6 +74,14 @@ export type BentoProps = BentoOptions & {
73
74
  * prop; callbacks always call the latest props.
74
75
  */
75
76
  export declare function Bento(props: BentoProps): JSX.Element;
77
+ export type CanvasProps = CanvasOptions & {
78
+ onReady?: (canvas: CanvasHandle) => void;
79
+ };
80
+ /**
81
+ * `canvas()` as a component. New `items` update it in place (items that stay keep their content
82
+ * and glide); `onView` always calls the latest prop.
83
+ */
84
+ export declare function Canvas(props: CanvasProps): JSX.Element;
76
85
  export type ActivityProps = ActivityOptions & {
77
86
  onReady?: (activity: ActivityHandle) => void;
78
87
  };