@ag2/weave 0.11.0 → 0.13.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.
package/README.md CHANGED
@@ -4,6 +4,21 @@
4
4
 
5
5
  The AG2 Space design system. Forked from [folds](https://github.com/cinnyapp/folds) 2.6.2 (Apache-2.0); `@ag2/weave@0.1.0` is folds@2.6.2 under the new name.
6
6
 
7
+ ## Ambient orb background
8
+
9
+ `OrbBackground` renders the Absorb / Calm / Aura field and is the default background
10
+ of `SplashScreen`. Place it inside an element with the exported `OrbBackgroundHost`
11
+ class so its decorative canvas sits behind content and is clipped at the surface edge.
12
+ The parent supplies its background colour through the normal theme tokens.
13
+
14
+ It follows the resolved `color.Background.Container` token, including nested and custom
15
+ themes. An optional `appearance="light" | "dark"` prop lets a framing host override the
16
+ colour intensity. Reduced motion renders a static field; hidden documents pause animation.
17
+ All animation frames, resize observers, and theme listeners are removed on unmount.
18
+ `Starfield` and `StarfieldHost` remain exported for existing consumers.
19
+
20
+ The field is adapted from [matty-morgs/octo-space](https://github.com/matty-morgs/octo-space/blob/7f5536888eaf0068200e1d339318ba2bc57a5e40/onboarding-aura/index.html).
21
+
7
22
  <!-- original folds README follows -->
8
23
 
9
24
  # Folds
@@ -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";
@@ -4,7 +4,7 @@ declare type AvatarContentProps = {
4
4
  kind?: AvatarKind;
5
5
  };
6
6
  export declare const Avatar: <T extends React.ElementType<any> = "span">(props: Omit<React.PropsWithChildren<React.ComponentPropsWithRef<T>>, "as"> & {
7
- size?: "large" | "inline" | "compact" | "200" | "300" | "400" | "500" | "stack" | "standard" | "hero" | "profile" | undefined;
7
+ size?: "large" | "inline" | "compact" | "200" | "300" | "400" | "500" | "standard" | "stack" | "hero" | "profile" | undefined;
8
8
  radii?: "0" | "300" | "400" | "500" | "Pill" | "Inherit" | undefined;
9
9
  } & import("..").AsProp<T>) => React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
10
10
  export declare const AvatarImage: <T extends React.ElementType<any> = "img">(props: import("..").AsOutProps<T, AvatarContentProps>) => React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
@@ -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" | "standard" | "Inherit" | "50" | undefined;
11
+ size?: "small" | "compact" | "100" | "200" | "300" | "400" | "500" | "600" | "Inherit" | "standard" | "50" | undefined;
12
12
  } & React.RefAttributes<SVGSVGElement>>;
@@ -65,3 +65,5 @@ export * from "./commons-tabs";
65
65
  export * from "./surface-toolbar";
66
66
  export * from "./dock";
67
67
  export * from "./inspector-tabs";
68
+ export * from "./activity-item";
69
+ export * from "./orb-background";
@@ -0,0 +1,3 @@
1
+ /** Isolate the decorative layer behind content and clip the blur at the surface edge. */
2
+ export declare const OrbBackgroundHost: string;
3
+ export declare const OrbBackground: string;
@@ -0,0 +1,7 @@
1
+ export declare type OrbBackgroundProps = {
2
+ className?: string;
3
+ /** Optional framing-host override; otherwise follows the active surface token. */
4
+ appearance?: "light" | "dark";
5
+ };
6
+ /** Calm, blurred orbs with absorb collisions. Place inside an OrbBackgroundHost surface. */
7
+ export declare const OrbBackground: ({ className, appearance }: OrbBackgroundProps) => JSX.Element;
@@ -0,0 +1,2 @@
1
+ export * from "./OrbBackground";
2
+ export { OrbBackgroundHost } from "./OrbBackground.css";
@@ -0,0 +1,2 @@
1
+ /** Infer brightness from the resolved surface token, independent of consumer class names. */
2
+ export declare const orbOpacityForSurface: (surface: string, prefersDark: boolean) => number;
@@ -0,0 +1 @@
1
+ export declare function startOrbField(element: HTMLCanvasElement): () => void;
@@ -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?: "large" | "inline" | "compact" | "200" | "300" | "400" | "500" | "stack" | "standard" | "hero" | "profile" | 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"> & {