@pebble-software/bonsai 0.1.2 → 0.2.1
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 +31 -3
- package/dist/ast.js +1 -1
- package/dist/chunks/{builder.meta-WpXc5VBB.js → builder.meta-B7Y9M7Ab.js} +128 -122
- package/dist/chunks/builder.meta-B7Y9M7Ab.js.map +1 -0
- package/dist/chunks/create-renderer-C4nV9RV6.js +282 -0
- package/dist/chunks/create-renderer-C4nV9RV6.js.map +1 -0
- package/dist/chunks/index-CD5pykpk.js +367 -0
- package/dist/chunks/index-CD5pykpk.js.map +1 -0
- package/dist/chunks/{render-shared-Ci28BpkI.js → render-shared-Cwb527d4.js} +487 -445
- package/dist/chunks/render-shared-Cwb527d4.js.map +1 -0
- package/dist/components/core/render-shared.d.ts +25 -15
- package/dist/components/core/render-tree-client.d.ts +1 -1
- package/dist/components/ui/accordion.d.ts +1 -1
- package/dist/core.d.ts +1 -1
- package/dist/core.js +3 -3
- package/dist/core.js.map +1 -1
- package/dist/index.css +8 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +14 -10
- package/dist/index.js.map +1 -1
- package/dist/lib/ast/evaluator.d.ts +1 -1
- package/dist/lib/ast/helpers.d.ts +3 -1
- package/dist/lib/ast/index.d.ts +1 -1
- package/dist/lib/ast/types.d.ts +4 -1
- package/dist/lib/ast/utils.d.ts +1 -1
- package/dist/lib/registry/json-schema-to-zod.d.ts +2 -2
- package/dist/lib/renderer/compile-template.d.ts +10 -2
- package/dist/lib/renderer/safe-props.d.ts +4 -0
- package/dist/library/schemas/src/bonsai.schema.d.ts +1 -2
- package/dist/presets/calendar.js.map +1 -1
- package/dist/presets/signature.js +1 -1
- package/dist/presets/signature.js.map +1 -1
- package/dist/renderer/core-registry.d.ts +1 -1
- package/dist/schemas.js +1 -1
- package/dist/styles/css/theme.css +8 -0
- package/dist/types.d.ts +8 -1
- package/package.json +7 -12
- package/dist/chunks/builder.meta-WpXc5VBB.js.map +0 -1
- package/dist/chunks/create-renderer-DHneTPd-.js +0 -280
- package/dist/chunks/create-renderer-DHneTPd-.js.map +0 -1
- package/dist/chunks/index-DzpRdatr.js +0 -359
- package/dist/chunks/index-DzpRdatr.js.map +0 -1
- package/dist/chunks/render-shared-Ci28BpkI.js.map +0 -1
- package/dist/components/ui/alert-dialog.d.ts +0 -23
- package/dist/components/ui/breadcrumb.d.ts +0 -10
- package/dist/components/ui/combobox.d.ts +0 -31
- package/dist/components/ui/command.d.ts +0 -23
- package/dist/components/ui/dialog.d.ts +0 -23
- package/dist/components/ui/drawer.d.ts +0 -22
- package/dist/components/ui/dropdown-menu.d.ts +0 -29
- package/dist/components/ui/form.d.ts +0 -24
- package/dist/components/ui/popover.d.ts +0 -9
- package/dist/components/ui/scroll-area.d.ts +0 -13
- package/dist/components/ui/sidebar.d.ts +0 -70
- package/dist/components/ui/toast.d.ts +0 -46
- package/dist/components/ui/tooltip.d.ts +0 -15
- package/dist/hooks/haptics.d.ts +0 -8
- package/dist/hooks/use-mobile.d.ts +0 -1
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ScrollArea as ScrollAreaPrimitive } from '@base-ui/react/scroll-area';
|
|
2
|
-
import { VariantProps } from 'class-variance-authority';
|
|
3
|
-
declare const scrollAreaVariants: (props?: ({
|
|
4
|
-
variant?: "default" | "ghost" | "solid" | "accent" | null | undefined;
|
|
5
|
-
orientation?: "auto" | "horizontal" | "vertical" | null | undefined;
|
|
6
|
-
size?: "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
7
|
-
rounded?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
8
|
-
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
9
|
-
interface ScrollAreaProps extends ScrollAreaPrimitive.Root.Props, VariantProps<typeof scrollAreaVariants> {
|
|
10
|
-
}
|
|
11
|
-
declare function ScrollArea({ className, variant, size, rounded, orientation, children, ...props }: ScrollAreaProps): import("react").JSX.Element;
|
|
12
|
-
declare function ScrollBar({ className, ...props }: ScrollAreaPrimitive.Scrollbar.Props): import("react").JSX.Element;
|
|
13
|
-
export { ScrollArea, ScrollBar, scrollAreaVariants };
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { useRender } from '@base-ui/react/use-render';
|
|
2
|
-
import { Button } from './button.js';
|
|
3
|
-
import { Input } from './input.js';
|
|
4
|
-
import { Separator } from './separator.js';
|
|
5
|
-
import { TooltipContent } from './tooltip.js';
|
|
6
|
-
import { VariantProps } from 'class-variance-authority';
|
|
7
|
-
import * as React from "react";
|
|
8
|
-
export declare const SIDEBAR_COOKIE_NAME = "__pb_ui_sbs";
|
|
9
|
-
type SidebarContextProps = {
|
|
10
|
-
state: "expanded" | "collapsed";
|
|
11
|
-
open: boolean;
|
|
12
|
-
setOpen: (open: boolean) => void;
|
|
13
|
-
openMobile: boolean;
|
|
14
|
-
setOpenMobile: (open: boolean) => void;
|
|
15
|
-
isMobile: boolean;
|
|
16
|
-
toggleSidebar: () => void;
|
|
17
|
-
side: "left" | "right";
|
|
18
|
-
shadow: boolean;
|
|
19
|
-
variant: "default" | "floating" | "inset";
|
|
20
|
-
};
|
|
21
|
-
declare function useSidebar(): SidebarContextProps;
|
|
22
|
-
declare function SidebarProvider({ defaultOpen, open: openProp, onOpenChange: setOpenProp, className, side, withShadow, variant, style, children, ...props }: React.ComponentProps<"div"> & {
|
|
23
|
-
side: "left" | "right";
|
|
24
|
-
withShadow: boolean;
|
|
25
|
-
defaultOpen?: boolean;
|
|
26
|
-
variant?: "default" | "floating" | "inset";
|
|
27
|
-
open?: boolean;
|
|
28
|
-
onOpenChange?: (open: boolean) => void;
|
|
29
|
-
}): React.JSX.Element;
|
|
30
|
-
declare const sidebarVariants: (props?: ({
|
|
31
|
-
variant?: "default" | "inset" | "floating" | null | undefined;
|
|
32
|
-
collapsible?: "none" | "icon" | "totalCollapse" | null | undefined;
|
|
33
|
-
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
34
|
-
interface SidebarProps extends React.ComponentProps<"div">, VariantProps<typeof sidebarVariants> {
|
|
35
|
-
side?: "left" | "right";
|
|
36
|
-
}
|
|
37
|
-
declare function Sidebar({ collapsible, className, children, ...props }: SidebarProps): React.JSX.Element;
|
|
38
|
-
declare function SidebarTrigger({ className, onClick, ...props }: React.ComponentProps<typeof Button>): React.JSX.Element;
|
|
39
|
-
declare function SidebarRail({ children, className, ...props }: React.ComponentProps<"button">): React.JSX.Element;
|
|
40
|
-
declare function SidebarInset({ className, ...props }: React.ComponentProps<"main">): React.JSX.Element;
|
|
41
|
-
declare function SidebarInput({ className, ...props }: React.ComponentProps<typeof Input>): React.JSX.Element;
|
|
42
|
-
declare function SidebarHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
43
|
-
declare function SidebarFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
44
|
-
declare function SidebarSeparator({ className, ...props }: React.ComponentProps<typeof Separator>): React.JSX.Element;
|
|
45
|
-
declare function SidebarContent({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
46
|
-
declare function SidebarGroup({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
47
|
-
declare function SidebarGroupLabel({ className, render, ...props }: useRender.ComponentProps<"div"> & React.ComponentProps<"div">): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
48
|
-
declare function SidebarGroupAction({ className, render, ...props }: useRender.ComponentProps<"button"> & React.ComponentProps<"button">): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
49
|
-
declare function SidebarGroupContent({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
50
|
-
declare function SidebarMenu({ className, ...props }: React.ComponentProps<"ul">): React.JSX.Element;
|
|
51
|
-
declare function SidebarMenuItem({ className, ...props }: React.ComponentProps<"li">): React.JSX.Element;
|
|
52
|
-
declare function SidebarMenuButton({ render, isActive, size, tooltip, className, children, ...props }: useRender.ComponentProps<"button"> & React.ComponentProps<"button"> & {
|
|
53
|
-
isActive?: boolean;
|
|
54
|
-
size?: "sm" | "md" | "lg";
|
|
55
|
-
tooltip?: string | React.ComponentProps<typeof TooltipContent>;
|
|
56
|
-
}): React.JSX.Element;
|
|
57
|
-
declare function SidebarMenuAction({ className, render, showOnHover, ...props }: useRender.ComponentProps<"button"> & React.ComponentProps<"button"> & {
|
|
58
|
-
showOnHover?: boolean;
|
|
59
|
-
}): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
60
|
-
declare function SidebarMenuBadge({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
61
|
-
declare function SidebarMenuSkeleton({ className, showIcon, ...props }: React.ComponentProps<"div"> & {
|
|
62
|
-
showIcon?: boolean;
|
|
63
|
-
}): React.JSX.Element;
|
|
64
|
-
declare function SidebarMenuSub({ className, ...props }: React.ComponentProps<"ul">): React.JSX.Element;
|
|
65
|
-
declare function SidebarMenuSubItem({ className, ...props }: React.ComponentProps<"li">): React.JSX.Element;
|
|
66
|
-
declare function SidebarMenuSubButton({ render, size, isActive, className, ...props }: useRender.ComponentProps<"a"> & React.ComponentProps<"a"> & {
|
|
67
|
-
size?: "sm" | "md";
|
|
68
|
-
isActive?: boolean;
|
|
69
|
-
}): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
70
|
-
export { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar, };
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { IconProps } from '@tabler/icons-react';
|
|
2
|
-
import { VariantProps } from 'class-variance-authority';
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
declare const toastVariants: (props?: ({
|
|
5
|
-
variant?: "default" | "error" | "success" | "warning" | "loading" | "promise" | "info" | null | undefined;
|
|
6
|
-
size?: "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
7
|
-
raised?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
8
|
-
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
9
|
-
interface ToastActions {
|
|
10
|
-
label: React.ReactNode;
|
|
11
|
-
onClick: () => void;
|
|
12
|
-
}
|
|
13
|
-
interface ToastOptions extends VariantProps<typeof toastVariants> {
|
|
14
|
-
description?: React.ReactNode;
|
|
15
|
-
icon?: React.ElementType<IconProps> | undefined;
|
|
16
|
-
duration?: number;
|
|
17
|
-
action?: ToastActions;
|
|
18
|
-
cancel?: ToastActions;
|
|
19
|
-
className?: string;
|
|
20
|
-
}
|
|
21
|
-
interface PromiseToastOptions extends ToastOptions {
|
|
22
|
-
loadingOptions?: ToastOptions;
|
|
23
|
-
successOptions?: ToastOptions;
|
|
24
|
-
errorOptions?: ToastOptions;
|
|
25
|
-
}
|
|
26
|
-
declare const toast: ((message: React.ReactNode, options?: ToastOptions) => string) & {
|
|
27
|
-
success: (message: React.ReactNode, options?: ToastOptions) => string;
|
|
28
|
-
error: (message: React.ReactNode, options?: ToastOptions) => string;
|
|
29
|
-
warning: (message: React.ReactNode, options?: ToastOptions) => string;
|
|
30
|
-
info: (message: React.ReactNode, options?: ToastOptions) => string;
|
|
31
|
-
loading: (message: React.ReactNode, options?: ToastOptions) => string;
|
|
32
|
-
promise: <T>(promise: Promise<T> | (() => Promise<T>), messages: {
|
|
33
|
-
loading: React.ReactNode;
|
|
34
|
-
success: React.ReactNode | ((data: T) => React.ReactNode);
|
|
35
|
-
error: React.ReactNode | ((error: unknown) => React.ReactNode);
|
|
36
|
-
}, options?: PromiseToastOptions) => Promise<T>;
|
|
37
|
-
};
|
|
38
|
-
declare function ToastList({ className, style, }: {
|
|
39
|
-
className?: string;
|
|
40
|
-
style?: React.CSSProperties;
|
|
41
|
-
}): React.JSX.Element;
|
|
42
|
-
declare const Toaster: {
|
|
43
|
-
({ className, style, ...props }: React.ComponentProps<typeof ToastList>): React.JSX.Element;
|
|
44
|
-
displayName: string;
|
|
45
|
-
};
|
|
46
|
-
export { Toaster, ToastList, toast };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Tooltip as TooltipPrimitive } from '@base-ui/react/tooltip';
|
|
2
|
-
declare function TooltipProvider({ delay, closeDelay, ...props }: TooltipPrimitive.Provider.Props): import("react").JSX.Element;
|
|
3
|
-
declare function Tooltip({ delay, closeDelay, ...props }: TooltipPrimitive.Root.Props & {
|
|
4
|
-
delay?: number;
|
|
5
|
-
closeDelay?: number;
|
|
6
|
-
}): import("react").JSX.Element;
|
|
7
|
-
declare function TooltipTrigger({ ...props }: TooltipPrimitive.Trigger.Props): import("react").JSX.Element;
|
|
8
|
-
declare const tooltipVariants: (props?: ({
|
|
9
|
-
align?: "center" | "end" | "start" | null | undefined;
|
|
10
|
-
side?: "inline-start" | "inline-end" | "left" | "right" | "top" | "bottom" | null | undefined;
|
|
11
|
-
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
12
|
-
declare function TooltipContent({ className, side, sideOffset, align, alignOffset, withArrow, children, ...props }: TooltipPrimitive.Popup.Props & Pick<TooltipPrimitive.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset"> & {
|
|
13
|
-
withArrow?: boolean;
|
|
14
|
-
}): import("react").JSX.Element;
|
|
15
|
-
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider, tooltipVariants, };
|
package/dist/hooks/haptics.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { HapticInput } from 'web-haptics';
|
|
2
|
-
export { useWebHaptics as useHaptics } from 'web-haptics/react';
|
|
3
|
-
export declare const HAPTIC_BUTTON: HapticInput;
|
|
4
|
-
export declare const HAPTIC_TAB: HapticInput;
|
|
5
|
-
export declare const HAPTIC_SWITCH: HapticInput;
|
|
6
|
-
export declare const HAPTIC_CHECKBOX: HapticInput;
|
|
7
|
-
export declare const HAPTIC_ACCORDION: HapticInput;
|
|
8
|
-
export declare const HAPTIC_MENU_ITEM: HapticInput;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function useIsMobile(): boolean;
|