@wallarm-org/design-system 4.6.2 → 4.7.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/dist/components/AgentAvatar/AgentAvatar.d.ts +45 -0
- package/dist/components/AgentAvatar/AgentAvatar.js +544 -0
- package/dist/components/AgentAvatar/AgentAvatarGroup.d.ts +12 -0
- package/dist/components/AgentAvatar/AgentAvatarGroup.js +25 -0
- package/dist/components/AgentAvatar/index.d.ts +4 -0
- package/dist/components/AgentAvatar/index.js +3 -0
- package/dist/components/AgentAvatar/useBakedLayers.d.ts +9 -0
- package/dist/components/AgentAvatar/useBakedLayers.js +75 -0
- package/dist/components/AgentAvatar/useCharacter.d.ts +39 -0
- package/dist/components/AgentAvatar/useCharacter.js +251 -0
- package/dist/components/AgentGlyph/AgentGlyph.d.ts +30 -0
- package/dist/components/AgentGlyph/AgentGlyph.js +192 -0
- package/dist/components/AgentGlyph/index.d.ts +4 -0
- package/dist/components/AgentGlyph/index.js +2 -0
- package/dist/components/AgentLookBuilder/index.d.ts +3 -0
- package/dist/components/AgentLookBuilder/index.js +2 -0
- package/dist/components/AgentLookBuilder/kit.d.ts +36 -0
- package/dist/components/AgentLookBuilder/kit.js +30 -0
- package/dist/components/Chat/ChatGreeting.d.ts +1 -1
- package/dist/components/Chat/ChatGreeting.js +95 -44
- package/dist/components/Chat/ChatHeaderTitle.d.ts +1 -1
- package/dist/components/Chat/ChatHeaderTitle.js +32 -29
- package/dist/components/WallySkeleton/WallySkeleton.js +92 -71
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/lib/agent-characters/bake.d.ts +40 -0
- package/dist/lib/agent-characters/bake.js +220 -0
- package/dist/lib/agent-characters/canvas.d.ts +7 -0
- package/dist/lib/agent-characters/canvas.js +22 -0
- package/dist/lib/agent-characters/char.d.ts +32 -0
- package/dist/lib/agent-characters/char.js +375 -0
- package/dist/lib/agent-characters/color.d.ts +6 -0
- package/dist/lib/agent-characters/color.js +20 -0
- package/dist/lib/agent-characters/data.gen.d.ts +106 -0
- package/dist/lib/agent-characters/data.gen.js +3854 -0
- package/dist/lib/agent-characters/engine.d.ts +206 -0
- package/dist/lib/agent-characters/engine.js +1241 -0
- package/dist/lib/agent-characters/eyes.d.ts +18 -0
- package/dist/lib/agent-characters/eyes.js +132 -0
- package/dist/lib/agent-characters/geom.d.ts +23 -0
- package/dist/lib/agent-characters/geom.js +109 -0
- package/dist/lib/agent-characters/glyph.d.ts +21 -0
- package/dist/lib/agent-characters/glyph.js +126 -0
- package/dist/lib/agent-characters/look.d.ts +24 -0
- package/dist/lib/agent-characters/look.js +68 -0
- package/dist/lib/agent-characters/motion.d.ts +73 -0
- package/dist/lib/agent-characters/motion.js +1215 -0
- package/dist/lib/agent-characters/paths.d.ts +13 -0
- package/dist/lib/agent-characters/paths.js +118 -0
- package/dist/lib/agent-characters/places.d.ts +76 -0
- package/dist/lib/agent-characters/places.js +64 -0
- package/dist/lib/agent-characters/propOf.d.ts +7 -0
- package/dist/lib/agent-characters/propOf.js +20 -0
- package/dist/lib/agent-characters/props.d.ts +4 -0
- package/dist/lib/agent-characters/props.js +337 -0
- package/dist/lib/agent-characters/queue.d.ts +23 -0
- package/dist/lib/agent-characters/queue.js +73 -0
- package/dist/lib/agent-characters/runtime.d.ts +69 -0
- package/dist/lib/agent-characters/runtime.js +178 -0
- package/dist/lib/agent-characters/svg.d.ts +6 -0
- package/dist/lib/agent-characters/svg.js +6 -0
- package/dist/lib/agent-characters/worker.d.ts +6 -0
- package/dist/lib/agent-characters/worker.js +94 -0
- package/dist/metadata/components.json +689 -276
- package/dist/theme/components/agent-avatar.css +42 -0
- package/dist/theme/index.css +1 -0
- package/dist/utils/renderSvgNode.d.ts +4 -0
- package/dist/utils/renderSvgNode.js +12 -0
- package/package.json +2 -1
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { c } from "react/compiler-runtime";
|
|
3
|
+
import { useEffect, useRef } from "react";
|
|
4
|
+
import { getRuntime } from "../../lib/agent-characters/runtime.js";
|
|
3
5
|
import { cn } from "../../utils/cn.js";
|
|
4
6
|
import { useTestId } from "../../utils/testId.js";
|
|
7
|
+
import { AgentAvatar } from "../AgentAvatar/index.js";
|
|
5
8
|
import { Text } from "../Text/index.js";
|
|
6
|
-
import { WallyIcon } from "../WallyIcon/index.js";
|
|
7
9
|
import { chatGreetingVariants } from "./classes.js";
|
|
8
10
|
const ChatGreeting = (t0)=>{
|
|
9
|
-
const $ = c(
|
|
11
|
+
const $ = c(25);
|
|
10
12
|
let children;
|
|
11
13
|
let className;
|
|
12
14
|
let props;
|
|
@@ -31,64 +33,113 @@ const ChatGreeting = (t0)=>{
|
|
|
31
33
|
title = $[6];
|
|
32
34
|
}
|
|
33
35
|
const testId = useTestId("greeting", testIdProp);
|
|
36
|
+
const wally = useRef(null);
|
|
37
|
+
const handle = useRef(null);
|
|
34
38
|
let t1;
|
|
35
|
-
if ($[7] !== className) {
|
|
36
|
-
t1 = cn(chatGreetingVariants(), className);
|
|
37
|
-
$[7] = className;
|
|
38
|
-
$[8] = t1;
|
|
39
|
-
} else t1 = $[8];
|
|
40
39
|
let t2;
|
|
41
|
-
if ($[
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
|
|
41
|
+
t1 = ()=>{
|
|
42
|
+
const el = wally.current;
|
|
43
|
+
if (!el || "u" < typeof IntersectionObserver) return;
|
|
44
|
+
let timer;
|
|
45
|
+
const io = new IntersectionObserver((entries)=>{
|
|
46
|
+
if (!entries.some(_temp)) return;
|
|
47
|
+
io.disconnect();
|
|
48
|
+
timer = setTimeout(()=>{
|
|
49
|
+
if (getRuntime().motionOn()) handle.current?.play("hello");
|
|
50
|
+
}, 250);
|
|
51
|
+
}, {
|
|
52
|
+
threshold: 0.6
|
|
53
|
+
});
|
|
54
|
+
io.observe(el);
|
|
55
|
+
return ()=>{
|
|
56
|
+
io.disconnect();
|
|
57
|
+
clearTimeout(timer);
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
t2 = [];
|
|
61
|
+
$[7] = t1;
|
|
62
|
+
$[8] = t2;
|
|
63
|
+
} else {
|
|
64
|
+
t1 = $[7];
|
|
65
|
+
t2 = $[8];
|
|
66
|
+
}
|
|
67
|
+
useEffect(t1, t2);
|
|
68
|
+
let t3;
|
|
69
|
+
if ($[9] !== className) {
|
|
70
|
+
t3 = cn(chatGreetingVariants(), className);
|
|
71
|
+
$[9] = className;
|
|
72
|
+
$[10] = t3;
|
|
73
|
+
} else t3 = $[10];
|
|
74
|
+
const t4 = testId && `${testId}--wally`;
|
|
75
|
+
let t5;
|
|
76
|
+
if ($[11] !== t4) {
|
|
77
|
+
t5 = /*#__PURE__*/ jsx(AgentAvatar, {
|
|
78
|
+
ref: wally,
|
|
79
|
+
handleRef: handle,
|
|
80
|
+
agent: "wally",
|
|
81
|
+
seed: "wally",
|
|
82
|
+
size: 120,
|
|
83
|
+
live: true,
|
|
84
|
+
shadow: true,
|
|
85
|
+
"data-testid": t4
|
|
86
|
+
});
|
|
87
|
+
$[11] = t4;
|
|
88
|
+
$[12] = t5;
|
|
89
|
+
} else t5 = $[12];
|
|
90
|
+
let t6;
|
|
91
|
+
if ($[13] !== title) {
|
|
92
|
+
t6 = /*#__PURE__*/ jsx(Text, {
|
|
93
|
+
asChild: true,
|
|
44
94
|
size: "xl",
|
|
45
|
-
"
|
|
95
|
+
weight: "medium",
|
|
96
|
+
color: "primary",
|
|
97
|
+
align: "center",
|
|
98
|
+
children: /*#__PURE__*/ jsx("h2", {
|
|
99
|
+
children: title
|
|
100
|
+
})
|
|
46
101
|
});
|
|
47
|
-
$[
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
102
|
+
$[13] = title;
|
|
103
|
+
$[14] = t6;
|
|
104
|
+
} else t6 = $[14];
|
|
105
|
+
let t7;
|
|
106
|
+
if ($[15] !== t5 || $[16] !== t6) {
|
|
107
|
+
t7 = /*#__PURE__*/ jsxs("div", {
|
|
52
108
|
className: "flex flex-col items-center gap-12",
|
|
53
109
|
children: [
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
asChild: true,
|
|
57
|
-
size: "xl",
|
|
58
|
-
weight: "medium",
|
|
59
|
-
color: "primary",
|
|
60
|
-
align: "center",
|
|
61
|
-
children: /*#__PURE__*/ jsx("h2", {
|
|
62
|
-
children: title
|
|
63
|
-
})
|
|
64
|
-
})
|
|
110
|
+
t5,
|
|
111
|
+
t6
|
|
65
112
|
]
|
|
66
113
|
});
|
|
67
|
-
$[
|
|
68
|
-
$[
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
114
|
+
$[15] = t5;
|
|
115
|
+
$[16] = t6;
|
|
116
|
+
$[17] = t7;
|
|
117
|
+
} else t7 = $[17];
|
|
118
|
+
let t8;
|
|
119
|
+
if ($[18] !== children || $[19] !== props || $[20] !== ref || $[21] !== t3 || $[22] !== t7 || $[23] !== testId) {
|
|
120
|
+
t8 = /*#__PURE__*/ jsxs("div", {
|
|
73
121
|
...props,
|
|
74
122
|
ref: ref,
|
|
75
123
|
"data-slot": "chat-greeting",
|
|
76
124
|
"data-testid": testId,
|
|
77
|
-
className:
|
|
125
|
+
className: t3,
|
|
78
126
|
children: [
|
|
79
|
-
|
|
127
|
+
t7,
|
|
80
128
|
children
|
|
81
129
|
]
|
|
82
130
|
});
|
|
83
|
-
$[
|
|
84
|
-
$[
|
|
85
|
-
$[
|
|
86
|
-
$[
|
|
87
|
-
$[
|
|
88
|
-
$[
|
|
89
|
-
$[
|
|
90
|
-
} else
|
|
91
|
-
return
|
|
131
|
+
$[18] = children;
|
|
132
|
+
$[19] = props;
|
|
133
|
+
$[20] = ref;
|
|
134
|
+
$[21] = t3;
|
|
135
|
+
$[22] = t7;
|
|
136
|
+
$[23] = testId;
|
|
137
|
+
$[24] = t8;
|
|
138
|
+
} else t8 = $[24];
|
|
139
|
+
return t8;
|
|
92
140
|
};
|
|
93
141
|
ChatGreeting.displayName = "ChatGreeting";
|
|
142
|
+
function _temp(e) {
|
|
143
|
+
return e.isIntersecting;
|
|
144
|
+
}
|
|
94
145
|
export { ChatGreeting };
|
|
@@ -2,7 +2,7 @@ import type { FC, HTMLAttributes, ReactNode, Ref } from 'react';
|
|
|
2
2
|
import { type TestableProps } from '../../utils/testId.js';
|
|
3
3
|
/**
|
|
4
4
|
* Without children: the Figma Default title, "Ask Wally". With children (e.g. a thread `Select`):
|
|
5
|
-
* Figma Variant2, the Wally
|
|
5
|
+
* Figma Variant2, the Wally glyph, a "/" joint, then the children.
|
|
6
6
|
*/
|
|
7
7
|
export interface ChatHeaderTitleProps extends HTMLAttributes<HTMLDivElement>, TestableProps {
|
|
8
8
|
ref?: Ref<HTMLDivElement>;
|
|
@@ -2,10 +2,10 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { c } from "react/compiler-runtime";
|
|
3
3
|
import { cn } from "../../utils/cn.js";
|
|
4
4
|
import { useTestId } from "../../utils/testId.js";
|
|
5
|
-
import {
|
|
5
|
+
import { AgentGlyph } from "../AgentGlyph/index.js";
|
|
6
6
|
import { chatHeaderTitleVariants } from "./classes.js";
|
|
7
7
|
const ChatHeaderTitle = (t0)=>{
|
|
8
|
-
const $ = c(
|
|
8
|
+
const $ = c(21);
|
|
9
9
|
let children;
|
|
10
10
|
let className;
|
|
11
11
|
let label;
|
|
@@ -36,19 +36,21 @@ const ChatHeaderTitle = (t0)=>{
|
|
|
36
36
|
$[7] = className;
|
|
37
37
|
$[8] = t1;
|
|
38
38
|
} else t1 = $[8];
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
39
|
+
const t2 = testId && `${testId}--wally`;
|
|
40
|
+
let t3;
|
|
41
|
+
if ($[9] !== t2) {
|
|
42
|
+
t3 = /*#__PURE__*/ jsx(AgentGlyph, {
|
|
43
|
+
agent: "wally",
|
|
44
|
+
size: 24,
|
|
45
|
+
align: "optical",
|
|
46
|
+
"data-testid": t2
|
|
46
47
|
});
|
|
47
48
|
$[9] = t2;
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
$[10] = t3;
|
|
50
|
+
} else t3 = $[10];
|
|
51
|
+
let t4;
|
|
52
|
+
if ($[11] !== children || $[12] !== label) {
|
|
53
|
+
t4 = null == children ? /*#__PURE__*/ jsx("span", {
|
|
52
54
|
className: "ml-8 truncate text-sm text-text-primary",
|
|
53
55
|
children: label ?? /*#__PURE__*/ jsxs(Fragment, {
|
|
54
56
|
children: [
|
|
@@ -69,31 +71,32 @@ const ChatHeaderTitle = (t0)=>{
|
|
|
69
71
|
children
|
|
70
72
|
]
|
|
71
73
|
});
|
|
72
|
-
$[
|
|
73
|
-
$[
|
|
74
|
-
$[
|
|
75
|
-
} else
|
|
76
|
-
let
|
|
77
|
-
if ($[
|
|
78
|
-
|
|
74
|
+
$[11] = children;
|
|
75
|
+
$[12] = label;
|
|
76
|
+
$[13] = t4;
|
|
77
|
+
} else t4 = $[13];
|
|
78
|
+
let t5;
|
|
79
|
+
if ($[14] !== props || $[15] !== ref || $[16] !== t1 || $[17] !== t3 || $[18] !== t4 || $[19] !== testId) {
|
|
80
|
+
t5 = /*#__PURE__*/ jsxs("div", {
|
|
79
81
|
...props,
|
|
80
82
|
ref: ref,
|
|
81
83
|
"data-slot": "chat-header-title",
|
|
82
84
|
"data-testid": testId,
|
|
83
85
|
className: t1,
|
|
84
86
|
children: [
|
|
85
|
-
|
|
86
|
-
|
|
87
|
+
t3,
|
|
88
|
+
t4
|
|
87
89
|
]
|
|
88
90
|
});
|
|
89
|
-
$[
|
|
90
|
-
$[
|
|
91
|
-
$[
|
|
92
|
-
$[
|
|
93
|
-
$[17] = testId;
|
|
91
|
+
$[14] = props;
|
|
92
|
+
$[15] = ref;
|
|
93
|
+
$[16] = t1;
|
|
94
|
+
$[17] = t3;
|
|
94
95
|
$[18] = t4;
|
|
95
|
-
|
|
96
|
-
|
|
96
|
+
$[19] = testId;
|
|
97
|
+
$[20] = t5;
|
|
98
|
+
} else t5 = $[20];
|
|
99
|
+
return t5;
|
|
97
100
|
};
|
|
98
101
|
ChatHeaderTitle.displayName = "ChatHeaderTitle";
|
|
99
102
|
export { ChatHeaderTitle };
|
|
@@ -4,7 +4,7 @@ import { cn } from "../../utils/cn.js";
|
|
|
4
4
|
import { Chat, ChatBody, ChatFooter, ChatHeader, ChatHeaderActions, ChatHeaderTitle } from "../Chat/index.js";
|
|
5
5
|
import { Skeleton } from "../Skeleton/index.js";
|
|
6
6
|
const WallySkeleton = (t0)=>{
|
|
7
|
-
const $ = c(
|
|
7
|
+
const $ = c(28);
|
|
8
8
|
let className;
|
|
9
9
|
let props;
|
|
10
10
|
let ref;
|
|
@@ -64,74 +64,94 @@ const WallySkeleton = (t0)=>{
|
|
|
64
64
|
});
|
|
65
65
|
$[8] = t4;
|
|
66
66
|
} else t4 = $[8];
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
const t5 = testId && `${testId}--wally`;
|
|
68
|
+
let t6;
|
|
69
|
+
if ($[9] !== t5) {
|
|
70
|
+
t6 = /*#__PURE__*/ jsx(Skeleton, {
|
|
71
|
+
width: "120px",
|
|
72
|
+
height: "113px",
|
|
73
|
+
rounded: 24,
|
|
74
|
+
"data-testid": t5
|
|
75
|
+
});
|
|
76
|
+
$[9] = t5;
|
|
77
|
+
$[10] = t6;
|
|
78
|
+
} else t6 = $[10];
|
|
79
|
+
let t7;
|
|
80
|
+
if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
|
|
81
|
+
t7 = /*#__PURE__*/ jsx(Skeleton, {
|
|
82
|
+
className: "max-w-[90%]",
|
|
83
|
+
width: "280px",
|
|
84
|
+
height: "24px"
|
|
85
|
+
});
|
|
86
|
+
$[11] = t7;
|
|
87
|
+
} else t7 = $[11];
|
|
88
|
+
let t8;
|
|
89
|
+
if ($[12] !== t6) {
|
|
90
|
+
t8 = /*#__PURE__*/ jsxs("div", {
|
|
91
|
+
className: "flex w-full flex-col items-center gap-12",
|
|
92
|
+
children: [
|
|
93
|
+
t6,
|
|
94
|
+
t7
|
|
95
|
+
]
|
|
96
|
+
});
|
|
97
|
+
$[12] = t6;
|
|
98
|
+
$[13] = t8;
|
|
99
|
+
} else t8 = $[13];
|
|
100
|
+
let t9;
|
|
101
|
+
if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
|
|
102
|
+
t9 = /*#__PURE__*/ jsxs("div", {
|
|
70
103
|
className: "flex w-full flex-col items-center gap-12",
|
|
71
104
|
children: [
|
|
72
105
|
/*#__PURE__*/ jsx(Skeleton, {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
106
|
+
className: "max-w-[85%]",
|
|
107
|
+
width: "240px",
|
|
108
|
+
height: "28px",
|
|
109
|
+
rounded: 12
|
|
76
110
|
}),
|
|
77
111
|
/*#__PURE__*/ jsx(Skeleton, {
|
|
78
|
-
className: "max-w-[
|
|
112
|
+
className: "max-w-[95%]",
|
|
79
113
|
width: "280px",
|
|
80
|
-
height: "
|
|
114
|
+
height: "28px",
|
|
115
|
+
rounded: 12
|
|
116
|
+
}),
|
|
117
|
+
/*#__PURE__*/ jsx(Skeleton, {
|
|
118
|
+
className: "max-w-[80%]",
|
|
119
|
+
width: "220px",
|
|
120
|
+
height: "28px",
|
|
121
|
+
rounded: 12
|
|
81
122
|
})
|
|
82
123
|
]
|
|
83
124
|
});
|
|
84
|
-
$[
|
|
85
|
-
} else
|
|
86
|
-
let
|
|
87
|
-
if ($[
|
|
88
|
-
|
|
125
|
+
$[14] = t9;
|
|
126
|
+
} else t9 = $[14];
|
|
127
|
+
let t10;
|
|
128
|
+
if ($[15] !== t8) {
|
|
129
|
+
t10 = /*#__PURE__*/ jsx(ChatBody, {
|
|
89
130
|
children: /*#__PURE__*/ jsxs("div", {
|
|
90
131
|
className: "flex flex-col items-center gap-24 pt-103",
|
|
91
132
|
children: [
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
className: "flex w-full flex-col items-center gap-12",
|
|
95
|
-
children: [
|
|
96
|
-
/*#__PURE__*/ jsx(Skeleton, {
|
|
97
|
-
className: "max-w-[85%]",
|
|
98
|
-
width: "240px",
|
|
99
|
-
height: "28px",
|
|
100
|
-
rounded: 12
|
|
101
|
-
}),
|
|
102
|
-
/*#__PURE__*/ jsx(Skeleton, {
|
|
103
|
-
className: "max-w-[95%]",
|
|
104
|
-
width: "280px",
|
|
105
|
-
height: "28px",
|
|
106
|
-
rounded: 12
|
|
107
|
-
}),
|
|
108
|
-
/*#__PURE__*/ jsx(Skeleton, {
|
|
109
|
-
className: "max-w-[80%]",
|
|
110
|
-
width: "220px",
|
|
111
|
-
height: "28px",
|
|
112
|
-
rounded: 12
|
|
113
|
-
})
|
|
114
|
-
]
|
|
115
|
-
})
|
|
133
|
+
t8,
|
|
134
|
+
t9
|
|
116
135
|
]
|
|
117
136
|
})
|
|
118
137
|
});
|
|
119
|
-
$[
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
138
|
+
$[15] = t8;
|
|
139
|
+
$[16] = t10;
|
|
140
|
+
} else t10 = $[16];
|
|
141
|
+
let t11;
|
|
142
|
+
if ($[17] === Symbol.for("react.memo_cache_sentinel")) {
|
|
143
|
+
t11 = /*#__PURE__*/ jsx(Skeleton, {
|
|
124
144
|
width: "100%",
|
|
125
145
|
height: "92px",
|
|
126
146
|
rounded: 16
|
|
127
147
|
});
|
|
128
|
-
$[
|
|
129
|
-
} else
|
|
130
|
-
let
|
|
131
|
-
if ($[
|
|
132
|
-
|
|
148
|
+
$[17] = t11;
|
|
149
|
+
} else t11 = $[17];
|
|
150
|
+
let t12;
|
|
151
|
+
if ($[18] === Symbol.for("react.memo_cache_sentinel")) {
|
|
152
|
+
t12 = /*#__PURE__*/ jsxs(ChatFooter, {
|
|
133
153
|
children: [
|
|
134
|
-
|
|
154
|
+
t11,
|
|
135
155
|
/*#__PURE__*/ jsx("div", {
|
|
136
156
|
className: "flex justify-center pb-8",
|
|
137
157
|
children: /*#__PURE__*/ jsx(Skeleton, {
|
|
@@ -142,27 +162,28 @@ const WallySkeleton = (t0)=>{
|
|
|
142
162
|
})
|
|
143
163
|
]
|
|
144
164
|
});
|
|
145
|
-
$[
|
|
146
|
-
} else
|
|
147
|
-
let
|
|
148
|
-
if ($[
|
|
149
|
-
|
|
165
|
+
$[18] = t12;
|
|
166
|
+
} else t12 = $[18];
|
|
167
|
+
let t13;
|
|
168
|
+
if ($[19] !== t10 || $[20] !== t2) {
|
|
169
|
+
t13 = /*#__PURE__*/ jsxs(Chat, {
|
|
150
170
|
background: "strong",
|
|
151
171
|
"aria-hidden": "true",
|
|
152
172
|
"data-testid": t2,
|
|
153
173
|
className: "[&_*]:animate-none! [&_[data-slot=skeleton]]:bg-bg-primary",
|
|
154
174
|
children: [
|
|
155
175
|
t4,
|
|
156
|
-
|
|
157
|
-
|
|
176
|
+
t10,
|
|
177
|
+
t12
|
|
158
178
|
]
|
|
159
179
|
});
|
|
160
|
-
$[
|
|
161
|
-
$[
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
180
|
+
$[19] = t10;
|
|
181
|
+
$[20] = t2;
|
|
182
|
+
$[21] = t13;
|
|
183
|
+
} else t13 = $[21];
|
|
184
|
+
let t14;
|
|
185
|
+
if ($[22] !== props || $[23] !== ref || $[24] !== t1 || $[25] !== t13 || $[26] !== testId) {
|
|
186
|
+
t14 = /*#__PURE__*/ jsx("div", {
|
|
166
187
|
role: "status",
|
|
167
188
|
"aria-label": "Loading Wally",
|
|
168
189
|
"aria-busy": "true",
|
|
@@ -171,16 +192,16 @@ const WallySkeleton = (t0)=>{
|
|
|
171
192
|
"data-slot": "wally-skeleton",
|
|
172
193
|
"data-testid": testId,
|
|
173
194
|
className: t1,
|
|
174
|
-
children:
|
|
195
|
+
children: t13
|
|
175
196
|
});
|
|
176
|
-
$[
|
|
177
|
-
$[
|
|
178
|
-
$[
|
|
179
|
-
$[
|
|
180
|
-
$[
|
|
181
|
-
$[
|
|
182
|
-
} else
|
|
183
|
-
return
|
|
197
|
+
$[22] = props;
|
|
198
|
+
$[23] = ref;
|
|
199
|
+
$[24] = t1;
|
|
200
|
+
$[25] = t13;
|
|
201
|
+
$[26] = testId;
|
|
202
|
+
$[27] = t14;
|
|
203
|
+
} else t14 = $[27];
|
|
204
|
+
return t14;
|
|
184
205
|
};
|
|
185
206
|
WallySkeleton.displayName = "WallySkeleton";
|
|
186
207
|
export { WallySkeleton };
|
package/dist/index.d.ts
CHANGED
|
@@ -13,6 +13,8 @@ export { useGroupRef, usePanelRef, } from 'react-resizable-panels';
|
|
|
13
13
|
export { usePagination, usePaginationContext } from '@ark-ui/react/pagination';
|
|
14
14
|
export { CalendarDate, CalendarDateTime, getLocalTimeZone, parseDate, parseDateTime, parseTime, parseZonedDateTime, Time, today, ZonedDateTime, } from '@internationalized/date';
|
|
15
15
|
export { Accordion, AccordionActions, type AccordionActionsProps, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, type AccordionValueChangeDetails, type AccordionVariant, } from './components/Accordion/index.js';
|
|
16
|
+
export { AgentAvatar, type AgentAvatarBeat, AgentAvatarGroup, type AgentAvatarGroupProps, type AgentAvatarHandle, type AgentAvatarProps, type AgentAvatarSize, type AgentAvatarState, setAgentMotion, useAgentMotion, } from './components/AgentAvatar/index.js';
|
|
17
|
+
export { type AgentCharacterId, type AgentColorId, type AgentEyeStyle, AgentGlyph, type AgentGlyphProps, type AgentGlyphSize, type AgentGlyphState, type AgentLook, type AgentPropId, type AgentShapeId, defaultLook, } from './components/AgentGlyph/index.js';
|
|
16
18
|
export { Alert, AlertClose, type AlertCloseProps, type AlertColor, AlertContent, type AlertContentProps, AlertControls, type AlertControlsProps, AlertDescription, type AlertDescriptionProps, AlertIcon, type AlertIconProps, type AlertProps, AlertTitle, type AlertTitleProps, } from './components/Alert/index.js';
|
|
17
19
|
export { AnimatedBackground, type AnimatedBackgroundProps, } from './components/AnimatedBackground/index.js';
|
|
18
20
|
export { ApprovalCard, ApprovalCardActions, type ApprovalCardActionsProps, ApprovalCardContent, type ApprovalCardContentProps, type ApprovalCardProps, type ApprovalCardStatus, } from './components/ApprovalCard/index.js';
|
package/dist/index.js
CHANGED
|
@@ -2,6 +2,8 @@ export { useGroupRef, usePanelRef } from "react-resizable-panels";
|
|
|
2
2
|
export { usePagination, usePaginationContext } from "@ark-ui/react/pagination";
|
|
3
3
|
export { CalendarDate, CalendarDateTime, Time, ZonedDateTime, getLocalTimeZone, parseDate, parseDateTime, parseTime, parseZonedDateTime, today } from "@internationalized/date";
|
|
4
4
|
export { Accordion, AccordionActions, AccordionContent, AccordionItem, AccordionTrigger } from "./components/Accordion/index.js";
|
|
5
|
+
export { AgentAvatar, AgentAvatarGroup, setAgentMotion, useAgentMotion } from "./components/AgentAvatar/index.js";
|
|
6
|
+
export { AgentGlyph, defaultLook } from "./components/AgentGlyph/index.js";
|
|
5
7
|
export { Alert, AlertClose, AlertContent, AlertControls, AlertDescription, AlertIcon, AlertTitle } from "./components/Alert/index.js";
|
|
6
8
|
export { AnimatedBackground } from "./components/AnimatedBackground/index.js";
|
|
7
9
|
export { ApprovalCard, ApprovalCardActions, ApprovalCardContent } from "./components/ApprovalCard/index.js";
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export type Material = 'felt' | 'vinyl';
|
|
2
|
+
/** Coverage alpha (0–255), N × N, of the path over its square region. */
|
|
3
|
+
export type MaskAt = (N: number) => Uint8Array | Uint8ClampedArray;
|
|
4
|
+
/** Height field on a 128 × 128 grid: coarse-to-fine SOR at 32, 64 and 128 (80, 80, 120 iterations). */
|
|
5
|
+
export declare function solveField(maskAt: MaskAt, R: number): Float32Array;
|
|
6
|
+
/** RGBA pixels of one layer: P × P over the region (y0, R), lit as felt or vinyl, with the page's grain (seed 7). */
|
|
7
|
+
export declare function shade(u: Float32Array, alpha: Uint8Array | Uint8ClampedArray, hex: string, P: number, mat: Material, y0: number, R: number): Uint8ClampedArray;
|
|
8
|
+
/** Square region around the path's bbox, 2 units of padding, as on the page (SVG getBBox, main thread only). */
|
|
9
|
+
export declare function region(d: string): [number, number, number];
|
|
10
|
+
/** Coverage alpha of the path over the region at N × N (canvas fill, the page's rmask). */
|
|
11
|
+
export declare function rmaskAlpha(d: string, x0: number, y0: number, R: number, N: number): Uint8ClampedArray<ArrayBuffer>;
|
|
12
|
+
export interface Baked {
|
|
13
|
+
/** cache key: retain it while an <image> shows this url */
|
|
14
|
+
key: string;
|
|
15
|
+
url: string;
|
|
16
|
+
x0: number;
|
|
17
|
+
y0: number;
|
|
18
|
+
R: number;
|
|
19
|
+
}
|
|
20
|
+
/** Marks a bake as shown: its object URL is not revoked until every retain is released. */
|
|
21
|
+
export declare const retain: (key: string) => void;
|
|
22
|
+
export declare const release: (key: string) => void;
|
|
23
|
+
export declare const isRetained: (key: string) => boolean;
|
|
24
|
+
export declare const retainedCount: () => number;
|
|
25
|
+
/** Bump with any change to the shading or the shapes, so copies with different shading never share bitmaps. */
|
|
26
|
+
export declare const LOOK_VERSION = "v14.1";
|
|
27
|
+
export declare const bakeKey: (d: string, col: string, P: number, mat: Material) => string;
|
|
28
|
+
export declare function solveCached(d: string, x0: number, y0: number, R: number): Float32Array<ArrayBufferLike>;
|
|
29
|
+
export type BakeRunner = (job: {
|
|
30
|
+
d: string;
|
|
31
|
+
col: string;
|
|
32
|
+
P: number;
|
|
33
|
+
mat: Material;
|
|
34
|
+
region: [number, number, number];
|
|
35
|
+
}) => Promise<Blob>;
|
|
36
|
+
/** Main-thread runner: the page's bake, encoded to a PNG blob instead of a data URL (same pixels). */
|
|
37
|
+
export declare const bakeOnMain: BakeRunner;
|
|
38
|
+
/** One layer, cached by look version, path, colour, pixel size and material. Overlapping calls share one bake;
|
|
39
|
+
* a failed bake is forgotten so the next call retries. */
|
|
40
|
+
export declare function bake(d: string, col: string, P: number, mat: Material, run?: BakeRunner): Promise<Baked>;
|