@ag2/weave 0.10.0 → 0.12.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.
Files changed (30) hide show
  1. package/dist/components/activity-item/ActivityHeader.css.d.ts +5 -0
  2. package/dist/components/activity-item/ActivityHeader.d.ts +11 -0
  3. package/dist/components/activity-item/ActivityItem.css.d.ts +18 -0
  4. package/dist/components/activity-item/ActivityItem.d.ts +43 -0
  5. package/dist/components/activity-item/index.d.ts +2 -0
  6. package/dist/components/avatar/Avatar.css.d.ts +36 -0
  7. package/dist/components/avatar/Avatar.d.ts +8 -3
  8. package/dist/components/avatar/index.d.ts +1 -0
  9. package/dist/components/avatar/tokens.d.ts +24 -0
  10. package/dist/components/badge/Badge.css.d.ts +1 -3
  11. package/dist/components/composer/Composer.css.d.ts +7 -0
  12. package/dist/components/composer/Composer.d.ts +13 -0
  13. package/dist/components/composer/index.d.ts +1 -0
  14. package/dist/components/icon/Icon.d.ts +1 -1
  15. package/dist/components/icon-button/IconButton.css.d.ts +12 -0
  16. package/dist/components/icon-button/IconButton.d.ts +1 -1
  17. package/dist/components/index.d.ts +2 -0
  18. package/dist/components/page/Page.d.ts +35 -1
  19. package/dist/components/page/style.css.d.ts +6 -0
  20. package/dist/components/panel-switch/PanelSwitch.d.ts +2 -0
  21. package/dist/components/sidebar/SidebarItem.d.ts +1 -1
  22. package/dist/index.js +379 -100
  23. package/dist/index.js.map +1 -1
  24. package/dist/style.css +1695 -1188
  25. package/dist/theme/color.css.d.ts +6 -0
  26. package/dist/theme/config.css.d.ts +11 -0
  27. package/dist/theme/index.d.ts +1 -0
  28. package/dist/theme/reading.d.ts +8 -0
  29. package/dist/theme/semantic.d.ts +92 -68
  30. package/package.json +1 -1
@@ -0,0 +1,5 @@
1
+ export declare const ActivityHeader: string;
2
+ export declare const TitleRow: string;
3
+ export declare const Title: string;
4
+ export declare const Controls: string;
5
+ export declare const Spacer: string;
@@ -0,0 +1,11 @@
1
+ import React, { ReactNode } from "react";
2
+ export declare type ActivityHeaderProps = {
3
+ title: string;
4
+ /** After the title: the ••• menu and close. */
5
+ actions?: ReactNode;
6
+ /** The filters, left: who (All · You · Agents). */
7
+ filters?: ReactNode;
8
+ /** The filters, right: Unread only. */
9
+ after?: ReactNode;
10
+ };
11
+ export declare const ActivityHeader: <T extends React.ElementType<any> = "div">(props: import("..").AsOutProps<T, ActivityHeaderProps>) => React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
@@ -0,0 +1,18 @@
1
+ export declare const ActivityItem: string;
2
+ export declare const SelectedBar: string;
3
+ export declare const Main: string;
4
+ export declare const Head: string;
5
+ export declare const Face: string;
6
+ export declare const Name: string;
7
+ export declare const What: string;
8
+ export declare const Time: string;
9
+ export declare const UnreadDot: string;
10
+ export declare const Indented: string;
11
+ export declare const Body: string;
12
+ export declare const Replies: string;
13
+ export declare const RepliesUnread: string;
14
+ export declare const ObjectRow: string;
15
+ export declare const Actions: string;
16
+ export declare const Attention: string;
17
+ export declare const AttentionBreathing: string;
18
+ export declare const Action: string;
@@ -0,0 +1,43 @@
1
+ import React, { ReactNode } from "react";
2
+ import { IconSrc } from "../icon";
3
+ export declare type ActivityItemProps = {
4
+ /** The person's or agent's face, 20px. */
5
+ avatar: ReactNode;
6
+ name: string;
7
+ /** What happened, after the name: "mentioned you", "updated a Commons doc". */
8
+ what: string;
9
+ time: string;
10
+ /** The message, three lines at most. */
11
+ body?: ReactNode;
12
+ unread?: boolean;
13
+ /** Read items set their text in a quieter ink. */
14
+ read?: boolean;
15
+ /** Needs you: a still warm dot in the margin; "breathing" on the first one only. */
16
+ attention?: "still" | "breathing";
17
+ /** Its message is the one highlighted in the chat. */
18
+ selected?: boolean;
19
+ /** "2 replies · 1 unread": total and the unread part, which reads in the unread ink. */
20
+ replies?: {
21
+ total: string;
22
+ unread?: string;
23
+ onOpen?: () => void;
24
+ };
25
+ /** A page the action happened on (a Commons chip). */
26
+ object?: ReactNode;
27
+ /** Reply, Jump, Mark read: shown on hover and focus, or always with `actionsShown`. */
28
+ actions?: ReactNode;
29
+ actionsShown?: boolean;
30
+ /** Clicking the item's text: jump to the message in the chat. */
31
+ onOpen?: () => void;
32
+ /** The accessible name of the item's main target; "unread" and "needs you" are appended to it. */
33
+ label?: string;
34
+ };
35
+ export declare const ActivityItem: <T extends React.ElementType<any> = "div">(props: import("..").AsOutProps<T, ActivityItemProps>) => React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
36
+ export declare type ActivityItemActionProps = {
37
+ label: string;
38
+ /** Icon-only actions take a glyph; labelled ones show the label. */
39
+ icon?: IconSrc;
40
+ /** The one always-shown action on the item that needs you first. */
41
+ primary?: boolean;
42
+ };
43
+ export declare const ActivityItemAction: <T extends React.ElementType<any> = "button">(props: import("..").AsOutProps<T, ActivityItemActionProps>) => React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
@@ -0,0 +1,2 @@
1
+ export * from "./ActivityItem";
2
+ export * from "./ActivityHeader";
@@ -1,6 +1,41 @@
1
1
  import { RecipeVariants } from "@vanilla-extract/recipes";
2
2
  export declare const Avatar: import("@vanilla-extract/recipes").RuntimeFn<{
3
3
  size: {
4
+ inline: {
5
+ vars: {
6
+ [x: string]: string;
7
+ };
8
+ };
9
+ stack: {
10
+ vars: {
11
+ [x: string]: string;
12
+ };
13
+ };
14
+ compact: {
15
+ vars: {
16
+ [x: string]: string;
17
+ };
18
+ };
19
+ standard: {
20
+ vars: {
21
+ [x: string]: string;
22
+ };
23
+ };
24
+ large: {
25
+ vars: {
26
+ [x: string]: string;
27
+ };
28
+ };
29
+ hero: {
30
+ vars: {
31
+ [x: string]: string;
32
+ };
33
+ };
34
+ profile: {
35
+ vars: {
36
+ [x: string]: string;
37
+ };
38
+ };
4
39
  "200": {
5
40
  vars: {
6
41
  [x: string]: string;
@@ -34,3 +69,4 @@ export declare const Avatar: import("@vanilla-extract/recipes").RuntimeFn<{
34
69
  export declare type AvatarVariants = RecipeVariants<typeof Avatar>;
35
70
  export declare const AvatarImage: string;
36
71
  export declare const AvatarFallback: string;
72
+ export declare const AvatarInitials: string;
@@ -1,7 +1,12 @@
1
1
  import React from "react";
2
+ export declare type AvatarKind = "person" | "agent" | "room";
3
+ declare type AvatarContentProps = {
4
+ kind?: AvatarKind;
5
+ };
2
6
  export declare const Avatar: <T extends React.ElementType<any> = "span">(props: Omit<React.PropsWithChildren<React.ComponentPropsWithRef<T>>, "as"> & {
3
- size?: "200" | "300" | "400" | "500" | undefined;
7
+ size?: "large" | "inline" | "compact" | "200" | "300" | "400" | "500" | "standard" | "stack" | "hero" | "profile" | undefined;
4
8
  radii?: "0" | "300" | "400" | "500" | "Pill" | "Inherit" | undefined;
5
9
  } & import("..").AsProp<T>) => React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
6
- export declare const AvatarImage: <T extends React.ElementType<any> = "img">(props: import("..").AsOutProps<T, object>) => React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
7
- export declare const AvatarFallback: <T extends React.ElementType<any> = "span">(props: import("..").AsOutProps<T, object>) => React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
10
+ export declare const AvatarImage: <T extends React.ElementType<any> = "img">(props: import("..").AsOutProps<T, AvatarContentProps>) => React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
11
+ export declare const AvatarFallback: <T extends React.ElementType<any> = "span">(props: import("..").AsOutProps<T, AvatarContentProps>) => React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
12
+ export {};
@@ -1 +1,2 @@
1
1
  export * from "./Avatar";
2
+ export * from "./tokens";
@@ -0,0 +1,24 @@
1
+ export declare const avatarSizes: {
2
+ readonly inline: 16;
3
+ readonly stack: 20;
4
+ readonly compact: 24;
5
+ readonly standard: 32;
6
+ readonly large: 40;
7
+ readonly hero: 56;
8
+ readonly profile: 80;
9
+ };
10
+ export declare const avatarRadii: {
11
+ readonly person: "50%";
12
+ readonly agent: "50%";
13
+ readonly room: "20%";
14
+ };
15
+ /** Figma People / Fallback: unchanged identity fills in light and dark themes. */
16
+ export declare const personAvatarTones: {
17
+ readonly Mint: "oklch(0.857770418 0.084263041 161.517741975)";
18
+ readonly Peach: "oklch(0.861424801 0.062583788 43.322761008)";
19
+ readonly Sky: "oklch(0.873307324 0.069002135 240.773146555)";
20
+ readonly Pink: "oklch(0.903800376 0.079694210 323.525249668)";
21
+ readonly Lemon: "oklch(0.957225457 0.076968671 109.359087060)";
22
+ readonly Orange: "oklch(0.787009699 0.136442307 59.826136225)";
23
+ };
24
+ export declare const personAvatarInk: "oklch(0.215703550 0.003145551 17.400595087)";
@@ -3,9 +3,7 @@ import { RecipeVariants } from "@vanilla-extract/recipes";
3
3
  export declare const Badge: import("@vanilla-extract/recipes").RuntimeFn<{
4
4
  kind: {
5
5
  Tag: string;
6
- Count: {
7
- fontVariantNumeric: "tabular-nums";
8
- };
6
+ Count: string;
9
7
  };
10
8
  size: {
11
9
  "500": {
@@ -0,0 +1,7 @@
1
+ export declare const Composer: string;
2
+ export declare const Surface: string;
3
+ export declare const Content: string;
4
+ export declare const Actions: string;
5
+ export declare const ActionsBefore: string;
6
+ export declare const ActionsAfter: string;
7
+ export declare const Footer: string;
@@ -0,0 +1,13 @@
1
+ import React, { ReactNode } from "react";
2
+ export declare type ComposerProps = {
3
+ /** Reply context and staged attachments, above the editable content. */
4
+ context?: ReactNode;
5
+ actionsBefore?: ReactNode;
6
+ actionsAfter?: ReactNode;
7
+ /** Optional formatting toolbar inside the surface. */
8
+ bottom?: ReactNode;
9
+ /** Keyboard hints or delivery feedback below the surface. */
10
+ footer?: ReactNode;
11
+ };
12
+ /** Layout only: the caller retains its editor, draft, upload and send behavior. */
13
+ export declare const Composer: <T extends React.ElementType<any> = "div">(props: import("..").AsOutProps<T, ComposerProps>) => React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
@@ -0,0 +1 @@
1
+ export * from "./Composer";
@@ -8,5 +8,5 @@ export declare const Icon: React.ForwardRefExoticComponent<React.SVGAttributes<S
8
8
  filled?: boolean | undefined;
9
9
  src: IconSrc;
10
10
  } & {
11
- size?: "small" | "compact" | "100" | "200" | "300" | "400" | "500" | "600" | "Inherit" | "50" | "standard" | undefined;
11
+ size?: "small" | "compact" | "100" | "200" | "300" | "400" | "500" | "600" | "Inherit" | "standard" | "50" | undefined;
12
12
  } & React.RefAttributes<SVGSVGElement>>;
@@ -23,6 +23,18 @@ export declare const IconButton: import("@vanilla-extract/recipes").RuntimeFn<{
23
23
  Soft: {
24
24
  backgroundColor: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
25
25
  };
26
+ Solid: {
27
+ backgroundColor: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
28
+ color: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
29
+ selectors: {
30
+ "&:hover, &:focus-visible": {
31
+ backgroundColor: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
32
+ };
33
+ "&:active, &[aria-pressed=true]": {
34
+ backgroundColor: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
35
+ };
36
+ };
37
+ };
26
38
  None: {
27
39
  backgroundColor: "transparent";
28
40
  };
@@ -2,7 +2,7 @@ import React from "react";
2
2
  export declare const IconButton: <T extends React.ElementType<any> = "button">(props: Omit<React.PropsWithChildren<React.ComponentPropsWithRef<T>>, "as"> & {
3
3
  size?: "compact" | "300" | "400" | "500" | "600" | "standard" | undefined;
4
4
  variant?: "Background" | "Success" | "Warning" | "Critical" | "Surface" | "SurfaceVariant" | "Primary" | "Secondary" | undefined;
5
- fill?: "Soft" | "None" | undefined;
5
+ fill?: "Solid" | "Soft" | "None" | undefined;
6
6
  outlined?: boolean | undefined;
7
7
  radii?: "0" | "300" | "400" | "500" | "Pill" | "Inherit" | undefined;
8
8
  } & import("..").AsProp<T>) => React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
@@ -59,8 +59,10 @@ export * from "./empty-state";
59
59
  export * from "./panel-switch";
60
60
  export * from "./people-line";
61
61
  export * from "./room-header";
62
+ export * from "./composer";
62
63
  export * from "./type-tile";
63
64
  export * from "./commons-tabs";
64
65
  export * from "./surface-toolbar";
65
66
  export * from "./dock";
66
67
  export * from "./inspector-tabs";
68
+ export * from "./activity-item";
@@ -12,7 +12,11 @@ export declare type RoomNavToggleOptions = {
12
12
  animate?: boolean;
13
13
  };
14
14
  export declare function useRoomNavCollapsed(): [boolean, (options?: RoomNavToggleOptions) => void];
15
- export declare const PageNav: ({ size, children }: ClientDrawerLayoutProps & css.PageNavVariants) => JSX.Element;
15
+ declare type PageNavProps = ClientDrawerLayoutProps & css.PageNavVariants & {
16
+ /** Decorative brand mark shown in the collapsed rail until hover or keyboard focus. */
17
+ collapsedMark?: ReactNode;
18
+ };
19
+ export declare const PageNav: ({ size, children, collapsedMark }: PageNavProps) => JSX.Element;
16
20
  export declare const PageNavHeader: <T extends React.ElementType<any> = "header">(props: Omit<React.PropsWithChildren<React.ComponentPropsWithRef<T>>, "as"> & {
17
21
  outlined?: boolean | undefined;
18
22
  } & import("..").AsProp<T>) => React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
@@ -21,6 +25,36 @@ export declare const PageNavContent: ({ scrollRef, children, }: {
21
25
  scrollRef?: React.MutableRefObject<HTMLDivElement | null> | undefined;
22
26
  }) => JSX.Element;
23
27
  export declare const Page: <T extends React.ElementType<any> = "div">(props: import("..").AsOutProps<T, object>) => React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
28
+ export declare const PageCanvas: <T extends React.ElementType<any> = "div">(props: import("..").AsOutProps<T, Omit<any, "as"> & {
29
+ display?: "Flex" | "InlineFlex" | undefined;
30
+ direction?: "Inherit" | "Row" | "RowReverse" | "Column" | "ColumnReverse" | undefined;
31
+ wrap?: "Inherit" | "NoWrap" | "Wrap" | "WrapReverse" | undefined;
32
+ justifyContent?: "End" | "Start" | "Center" | "Inherit" | "Stretch" | "Baseline" | "SpaceBetween" | "SpaceAround" | "SpaceEvenly" | undefined;
33
+ justifyItems?: "End" | "Start" | "Center" | "Inherit" | "Stretch" | "Baseline" | undefined;
34
+ justifySelf?: "End" | "Start" | "Center" | "Inherit" | "Stretch" | "Baseline" | undefined;
35
+ alignContent?: "End" | "Start" | "Center" | "Inherit" | "Stretch" | "Baseline" | "SpaceBetween" | "SpaceAround" | "SpaceEvenly" | undefined;
36
+ alignItems?: "End" | "Start" | "Center" | "Inherit" | "Stretch" | "Baseline" | undefined;
37
+ alignSelf?: "End" | "Start" | "Center" | "Inherit" | "Stretch" | "Baseline" | undefined;
38
+ gap?: "0" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "Inherit" | undefined;
39
+ grow?: "No" | "Yes" | undefined;
40
+ shrink?: "No" | "Yes" | undefined;
41
+ basis?: "No" | "Yes" | undefined;
42
+ } & import("..").AsProp<React.ElementType<any>>>) => React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
43
+ export declare const PagePanel: <T extends React.ElementType<any> = "div">(props: import("..").AsOutProps<T, Omit<any, "as"> & {
44
+ display?: "Flex" | "InlineFlex" | undefined;
45
+ direction?: "Inherit" | "Row" | "RowReverse" | "Column" | "ColumnReverse" | undefined;
46
+ wrap?: "Inherit" | "NoWrap" | "Wrap" | "WrapReverse" | undefined;
47
+ justifyContent?: "End" | "Start" | "Center" | "Inherit" | "Stretch" | "Baseline" | "SpaceBetween" | "SpaceAround" | "SpaceEvenly" | undefined;
48
+ justifyItems?: "End" | "Start" | "Center" | "Inherit" | "Stretch" | "Baseline" | undefined;
49
+ justifySelf?: "End" | "Start" | "Center" | "Inherit" | "Stretch" | "Baseline" | undefined;
50
+ alignContent?: "End" | "Start" | "Center" | "Inherit" | "Stretch" | "Baseline" | "SpaceBetween" | "SpaceAround" | "SpaceEvenly" | undefined;
51
+ alignItems?: "End" | "Start" | "Center" | "Inherit" | "Stretch" | "Baseline" | undefined;
52
+ alignSelf?: "End" | "Start" | "Center" | "Inherit" | "Stretch" | "Baseline" | undefined;
53
+ gap?: "0" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "Inherit" | undefined;
54
+ grow?: "No" | "Yes" | undefined;
55
+ shrink?: "No" | "Yes" | undefined;
56
+ basis?: "No" | "Yes" | undefined;
57
+ } & import("..").AsProp<React.ElementType<any>>>) => React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
24
58
  export declare const PageHeader: <T extends React.ElementType<any> = "div">(props: Omit<React.PropsWithChildren<React.ComponentPropsWithRef<T>>, "as"> & {
25
59
  compact?: boolean | undefined;
26
60
  balance?: boolean | undefined;
@@ -1,4 +1,7 @@
1
1
  import { RecipeVariants } from "@vanilla-extract/recipes";
2
+ export declare const PageRoot: string;
3
+ export declare const PageCanvas: string;
4
+ export declare const PagePanel: string;
2
5
  export declare const PageNav: import("@vanilla-extract/recipes").RuntimeFn<{
3
6
  size: {
4
7
  "400": {
@@ -51,3 +54,6 @@ export declare const PageNavRoot: string;
51
54
  export declare const PageNavViewport: string;
52
55
  export declare const PageNavDrawer: string;
53
56
  export declare const PageNavRail: string;
57
+ export declare const PageNavRestore: string;
58
+ export declare const PageNavBrand: string;
59
+ export declare const PageNavRestoreIcon: string;
@@ -10,6 +10,8 @@ export declare type PanelSwitchProps = {
10
10
  countStyle?: "Plain" | "Pill";
11
11
  /** Keep the name visible while closed (Commons). */
12
12
  labelled?: boolean;
13
+ /** Never show the name, even when open: a narrow header. The pressed fill shows it is open. */
14
+ iconOnly?: boolean;
13
15
  /** Something in this panel needs you; shown while closed. */
14
16
  attention?: boolean;
15
17
  };
@@ -13,7 +13,7 @@ export declare const SidebarAvatar: <T extends React.ElementType<any> = "div">(p
13
13
  size?: "200" | "300" | "400" | undefined;
14
14
  outlined?: boolean | undefined;
15
15
  } & Omit<any, "as"> & {
16
- size?: "200" | "300" | "400" | "500" | undefined;
16
+ size?: "large" | "inline" | "compact" | "200" | "300" | "400" | "500" | "standard" | "stack" | "hero" | "profile" | undefined;
17
17
  radii?: "0" | "300" | "400" | "500" | "Pill" | "Inherit" | undefined;
18
18
  } & import("..").AsProp<React.ElementType<any>>>) => React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
19
19
  export declare const SidebarFolder: <T extends React.ElementType<any> = "div">(props: Omit<React.PropsWithChildren<React.ComponentPropsWithRef<T>>, "as"> & {