@shapesos/clay 0.3.1 → 0.4.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/dist/chat.cjs +84 -354
- package/dist/chat.cjs.map +1 -1
- package/dist/chat.d.cts +13 -24
- package/dist/chat.d.ts +13 -24
- package/dist/chat.js +10 -4
- package/dist/chunk-72TJUKMV.js +1 -0
- package/dist/{chunk-P7NISN4V.js → chunk-AEXYOY5H.js} +11 -11
- package/dist/chunk-AEXYOY5H.js.map +1 -0
- package/dist/{chunk-UKM5VQKW.js → chunk-BIATJTD4.js} +5 -5
- package/dist/chunk-BIATJTD4.js.map +1 -0
- package/dist/chunk-EPS4LOOW.js +339 -0
- package/dist/chunk-EPS4LOOW.js.map +1 -0
- package/dist/icon.cjs +12 -12
- package/dist/icon.cjs.map +1 -1
- package/dist/icon.js +2 -2
- package/dist/index.cjs +165 -365
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +20 -2
- package/dist/index.d.ts +20 -2
- package/dist/index.js +80 -7
- package/dist/index.js.map +1 -1
- package/dist/lottie.cjs +5 -5
- package/dist/lottie.cjs.map +1 -1
- package/dist/lottie.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-2GFOESHR.js +0 -613
- package/dist/chunk-2GFOESHR.js.map +0 -1
- package/dist/chunk-7AJSQJQ5.js +0 -1
- package/dist/chunk-P7NISN4V.js.map +0 -1
- package/dist/chunk-UKM5VQKW.js.map +0 -1
- /package/dist/{chunk-7AJSQJQ5.js.map → chunk-72TJUKMV.js.map} +0 -0
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,25 @@
|
|
|
1
1
|
export { ColorToken, TypographyStyle, TypographyType, colors, fontFamilies, typographyMixin, typographyStyles, typographyTypes } from './tokens.cjs';
|
|
2
|
-
export {
|
|
2
|
+
export { ChatContext, ChatContextValue, ChatMessage, ChatMessageType, MessageRole, useChatContext, useCopyToClipboard } from './chat.cjs';
|
|
3
3
|
export { Icon, IconButton, IconButtonProps, IconButtonSize, IconProps } from './icon.cjs';
|
|
4
|
+
import { ComponentType, SVGProps, ReactElement } from 'react';
|
|
4
5
|
export { Lottie, LottieAnimationData, LottieProps, LottieRef } from './lottie.cjs';
|
|
5
6
|
import 'react/jsx-runtime';
|
|
6
|
-
import 'react';
|
|
7
7
|
import 'lottie-web';
|
|
8
|
+
|
|
9
|
+
type KeyIcon = ComponentType<SVGProps<SVGSVGElement>>;
|
|
10
|
+
declare const KEYBOARD_SHORTCUT_VARIANTS: {
|
|
11
|
+
readonly OUTLINED: "outlined";
|
|
12
|
+
readonly FILLED: "filled";
|
|
13
|
+
};
|
|
14
|
+
type KeyboardShortcutVariant = (typeof KEYBOARD_SHORTCUT_VARIANTS)[keyof typeof KEYBOARD_SHORTCUT_VARIANTS];
|
|
15
|
+
interface KeyboardShortcutProps {
|
|
16
|
+
keys: KeyIcon[];
|
|
17
|
+
variant?: KeyboardShortcutVariant;
|
|
18
|
+
className?: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
declare function KeyboardShortcut({ keys, variant, className, }: KeyboardShortcutProps): ReactElement;
|
|
22
|
+
|
|
23
|
+
declare function CtrlIcon(props: SVGProps<SVGSVGElement>): ReactElement;
|
|
24
|
+
|
|
25
|
+
export { CtrlIcon, KEYBOARD_SHORTCUT_VARIANTS, type KeyIcon, KeyboardShortcut, type KeyboardShortcutProps, type KeyboardShortcutVariant };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,25 @@
|
|
|
1
1
|
export { ColorToken, TypographyStyle, TypographyType, colors, fontFamilies, typographyMixin, typographyStyles, typographyTypes } from './tokens.js';
|
|
2
|
-
export {
|
|
2
|
+
export { ChatContext, ChatContextValue, ChatMessage, ChatMessageType, MessageRole, useChatContext, useCopyToClipboard } from './chat.js';
|
|
3
3
|
export { Icon, IconButton, IconButtonProps, IconButtonSize, IconProps } from './icon.js';
|
|
4
|
+
import { ComponentType, SVGProps, ReactElement } from 'react';
|
|
4
5
|
export { Lottie, LottieAnimationData, LottieProps, LottieRef } from './lottie.js';
|
|
5
6
|
import 'react/jsx-runtime';
|
|
6
|
-
import 'react';
|
|
7
7
|
import 'lottie-web';
|
|
8
|
+
|
|
9
|
+
type KeyIcon = ComponentType<SVGProps<SVGSVGElement>>;
|
|
10
|
+
declare const KEYBOARD_SHORTCUT_VARIANTS: {
|
|
11
|
+
readonly OUTLINED: "outlined";
|
|
12
|
+
readonly FILLED: "filled";
|
|
13
|
+
};
|
|
14
|
+
type KeyboardShortcutVariant = (typeof KEYBOARD_SHORTCUT_VARIANTS)[keyof typeof KEYBOARD_SHORTCUT_VARIANTS];
|
|
15
|
+
interface KeyboardShortcutProps {
|
|
16
|
+
keys: KeyIcon[];
|
|
17
|
+
variant?: KeyboardShortcutVariant;
|
|
18
|
+
className?: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
declare function KeyboardShortcut({ keys, variant, className, }: KeyboardShortcutProps): ReactElement;
|
|
22
|
+
|
|
23
|
+
declare function CtrlIcon(props: SVGProps<SVGSVGElement>): ReactElement;
|
|
24
|
+
|
|
25
|
+
export { CtrlIcon, KEYBOARD_SHORTCUT_VARIANTS, type KeyIcon, KeyboardShortcut, type KeyboardShortcutProps, type KeyboardShortcutVariant };
|
package/dist/index.js
CHANGED
|
@@ -1,34 +1,107 @@
|
|
|
1
1
|
import "./chunk-C77QMQNT.js";
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
ChatContext,
|
|
4
|
+
ChatMessage,
|
|
5
|
+
useChatContext,
|
|
6
|
+
useCopyToClipboard
|
|
7
|
+
} from "./chunk-EPS4LOOW.js";
|
|
5
8
|
import {
|
|
6
9
|
fontFamilies,
|
|
7
10
|
typographyMixin,
|
|
8
11
|
typographyStyles,
|
|
9
12
|
typographyTypes
|
|
10
13
|
} from "./chunk-A6DKIFWS.js";
|
|
11
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-72TJUKMV.js";
|
|
12
15
|
import {
|
|
13
16
|
Icon,
|
|
14
17
|
IconButton
|
|
15
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-AEXYOY5H.js";
|
|
16
19
|
import {
|
|
17
20
|
colors
|
|
18
21
|
} from "./chunk-6HNZQ2BF.js";
|
|
19
22
|
import {
|
|
20
23
|
Lottie
|
|
21
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-BIATJTD4.js";
|
|
22
25
|
import "./chunk-5WRI5ZAA.js";
|
|
26
|
+
|
|
27
|
+
// src/components/keyboard-shortcut/keyboard-shortcut-styles.ts
|
|
28
|
+
import styled, { css } from "styled-components";
|
|
29
|
+
|
|
30
|
+
// src/components/keyboard-shortcut/types.ts
|
|
31
|
+
var KEYBOARD_SHORTCUT_VARIANTS = {
|
|
32
|
+
OUTLINED: "outlined",
|
|
33
|
+
FILLED: "filled"
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
// src/components/keyboard-shortcut/keyboard-shortcut-styles.ts
|
|
37
|
+
var variantStyles = {
|
|
38
|
+
[KEYBOARD_SHORTCUT_VARIANTS.OUTLINED]: css`
|
|
39
|
+
border: 1px solid ${colors["brown-70"]};
|
|
40
|
+
color: ${colors["brown-10"]};
|
|
41
|
+
`,
|
|
42
|
+
[KEYBOARD_SHORTCUT_VARIANTS.FILLED]: css`
|
|
43
|
+
background: ${colors["brown-80"]};
|
|
44
|
+
color: ${colors["brown-10"]};
|
|
45
|
+
`
|
|
46
|
+
};
|
|
47
|
+
var Wrapper = styled.div`
|
|
48
|
+
display: inline-flex;
|
|
49
|
+
align-items: center;
|
|
50
|
+
gap: 2px;
|
|
51
|
+
`;
|
|
52
|
+
var Key = styled.kbd`
|
|
53
|
+
display: inline-flex;
|
|
54
|
+
align-items: center;
|
|
55
|
+
justify-content: center;
|
|
56
|
+
padding: 4px;
|
|
57
|
+
border-radius: 6px;
|
|
58
|
+
${({ $variant }) => variantStyles[$variant]};
|
|
59
|
+
`;
|
|
60
|
+
|
|
61
|
+
// src/components/keyboard-shortcut/keyboard-shortcut.tsx
|
|
62
|
+
import { jsx } from "react/jsx-runtime";
|
|
63
|
+
function KeyboardShortcut({
|
|
64
|
+
keys,
|
|
65
|
+
variant = KEYBOARD_SHORTCUT_VARIANTS.OUTLINED,
|
|
66
|
+
className
|
|
67
|
+
}) {
|
|
68
|
+
return /* @__PURE__ */ jsx(Wrapper, { className, children: keys.map((KeyComponent, index) => /* @__PURE__ */ jsx(Key, { $variant: variant, children: /* @__PURE__ */ jsx(Icon, { icon: KeyComponent, size: 12 }) }, index)) });
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// src/components/keyboard-shortcut/icons/ctrl-icon.tsx
|
|
72
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
73
|
+
function CtrlIcon(props) {
|
|
74
|
+
const { width = 24, height = 24, ...rest } = props;
|
|
75
|
+
return /* @__PURE__ */ jsx2("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", width, height, fill: "none", ...rest, children: /* @__PURE__ */ jsx2(
|
|
76
|
+
"text",
|
|
77
|
+
{
|
|
78
|
+
x: "50%",
|
|
79
|
+
y: "50%",
|
|
80
|
+
dominantBaseline: "central",
|
|
81
|
+
textAnchor: "middle",
|
|
82
|
+
fill: "currentColor",
|
|
83
|
+
fontFamily: "Geist, sans-serif",
|
|
84
|
+
fontWeight: 500,
|
|
85
|
+
fontSize: 14,
|
|
86
|
+
children: "Ctrl"
|
|
87
|
+
}
|
|
88
|
+
) });
|
|
89
|
+
}
|
|
23
90
|
export {
|
|
24
|
-
|
|
91
|
+
ChatContext,
|
|
92
|
+
ChatMessage,
|
|
93
|
+
CtrlIcon,
|
|
25
94
|
Icon,
|
|
26
95
|
IconButton,
|
|
96
|
+
KEYBOARD_SHORTCUT_VARIANTS,
|
|
97
|
+
KeyboardShortcut,
|
|
27
98
|
Lottie,
|
|
28
99
|
colors,
|
|
29
100
|
fontFamilies,
|
|
30
101
|
typographyMixin,
|
|
31
102
|
typographyStyles,
|
|
32
|
-
typographyTypes
|
|
103
|
+
typographyTypes,
|
|
104
|
+
useChatContext,
|
|
105
|
+
useCopyToClipboard
|
|
33
106
|
};
|
|
34
107
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/components/keyboard-shortcut/keyboard-shortcut-styles.ts","../src/components/keyboard-shortcut/types.ts","../src/components/keyboard-shortcut/keyboard-shortcut.tsx","../src/components/keyboard-shortcut/icons/ctrl-icon.tsx"],"sourcesContent":["import styled, { css } from \"styled-components\";\n\nimport { colors } from \"../../tokens/colors\";\nimport { KEYBOARD_SHORTCUT_VARIANTS } from \"./types\";\nimport type { KeyboardShortcutVariant } from \"./types\";\n\nconst variantStyles: Record<KeyboardShortcutVariant, ReturnType<typeof css>> = {\n [KEYBOARD_SHORTCUT_VARIANTS.OUTLINED]: css`\n border: 1px solid ${colors[\"brown-70\"]};\n color: ${colors[\"brown-10\"]};\n `,\n [KEYBOARD_SHORTCUT_VARIANTS.FILLED]: css`\n background: ${colors[\"brown-80\"]};\n color: ${colors[\"brown-10\"]};\n `,\n};\n\nexport const Wrapper = styled.div`\n display: inline-flex;\n align-items: center;\n gap: 2px;\n`;\n\nexport const Key = styled.kbd<{ $variant: KeyboardShortcutVariant }>`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n padding: 4px;\n border-radius: 6px;\n ${({ $variant }) => variantStyles[$variant]};\n`;\n","import type { ComponentType, SVGProps } from \"react\";\n\nexport type KeyIcon = ComponentType<SVGProps<SVGSVGElement>>;\n\nexport const KEYBOARD_SHORTCUT_VARIANTS = {\n OUTLINED: \"outlined\",\n FILLED: \"filled\",\n} as const;\n\nexport type KeyboardShortcutVariant = (typeof KEYBOARD_SHORTCUT_VARIANTS)[keyof typeof KEYBOARD_SHORTCUT_VARIANTS];\n\nexport interface KeyboardShortcutProps {\n keys: KeyIcon[];\n variant?: KeyboardShortcutVariant;\n className?: string;\n}\n","import type { ReactElement } from \"react\";\n\nimport { Icon } from \"../icon/icon\";\nimport { Key, Wrapper } from \"./keyboard-shortcut-styles\";\nimport { KEYBOARD_SHORTCUT_VARIANTS } from \"./types\";\nimport type { KeyboardShortcutProps } from \"./types\";\n\nexport function KeyboardShortcut({\n keys,\n variant = KEYBOARD_SHORTCUT_VARIANTS.OUTLINED,\n className,\n}: KeyboardShortcutProps): ReactElement {\n return (\n <Wrapper className={className}>\n {keys.map((KeyComponent, index) => (\n <Key key={index} $variant={variant}>\n <Icon icon={KeyComponent} size={12} />\n </Key>\n ))}\n </Wrapper>\n );\n}\n","import type { ReactElement, SVGProps } from \"react\";\n\nexport function CtrlIcon(props: SVGProps<SVGSVGElement>): ReactElement {\n const { width = 24, height = 24, ...rest } = props;\n\n return (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width={width} height={height} fill=\"none\" {...rest}>\n <text\n x=\"50%\"\n y=\"50%\"\n dominantBaseline=\"central\"\n textAnchor=\"middle\"\n fill=\"currentColor\"\n fontFamily=\"Geist, sans-serif\"\n fontWeight={500}\n fontSize={14}\n >\n Ctrl\n </text>\n </svg>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,UAAU,WAAW;;;ACIrB,IAAM,6BAA6B;AAAA,EACxC,UAAU;AAAA,EACV,QAAQ;AACV;;;ADDA,IAAM,gBAAyE;AAAA,EAC7E,CAAC,2BAA2B,QAAQ,GAAG;AAAA,wBACjB,OAAO,UAAU,CAAC;AAAA,aAC7B,OAAO,UAAU,CAAC;AAAA;AAAA,EAE7B,CAAC,2BAA2B,MAAM,GAAG;AAAA,kBACrB,OAAO,UAAU,CAAC;AAAA,aACvB,OAAO,UAAU,CAAC;AAAA;AAE/B;AAEO,IAAM,UAAU,OAAO;AAAA;AAAA;AAAA;AAAA;AAMvB,IAAM,MAAM,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMtB,CAAC,EAAE,SAAS,MAAM,cAAc,QAAQ,CAAC;AAAA;;;AEbnC;AATH,SAAS,iBAAiB;AAAA,EAC/B;AAAA,EACA,UAAU,2BAA2B;AAAA,EACrC;AACF,GAAwC;AACtC,SACE,oBAAC,WAAQ,WACN,eAAK,IAAI,CAAC,cAAc,UACvB,oBAAC,OAAgB,UAAU,SACzB,8BAAC,QAAK,MAAM,cAAc,MAAM,IAAI,KAD5B,KAEV,CACD,GACH;AAEJ;;;ACdM,gBAAAA,YAAA;AALC,SAAS,SAAS,OAA8C;AACrE,QAAM,EAAE,QAAQ,IAAI,SAAS,IAAI,GAAG,KAAK,IAAI;AAE7C,SACE,gBAAAA,KAAC,SAAI,OAAM,8BAA6B,SAAQ,aAAY,OAAc,QAAgB,MAAK,QAAQ,GAAG,MACxG,0BAAAA;AAAA,IAAC;AAAA;AAAA,MACC,GAAE;AAAA,MACF,GAAE;AAAA,MACF,kBAAiB;AAAA,MACjB,YAAW;AAAA,MACX,MAAK;AAAA,MACL,YAAW;AAAA,MACX,YAAY;AAAA,MACZ,UAAU;AAAA,MACX;AAAA;AAAA,EAED,GACF;AAEJ;","names":["jsx"]}
|
package/dist/lottie.cjs
CHANGED
|
@@ -16339,17 +16339,17 @@ var require_lottie = __commonJS({
|
|
|
16339
16339
|
}
|
|
16340
16340
|
});
|
|
16341
16341
|
|
|
16342
|
-
// src/lottie/index.ts
|
|
16342
|
+
// src/components/lottie/index.ts
|
|
16343
16343
|
var lottie_exports = {};
|
|
16344
16344
|
__export(lottie_exports, {
|
|
16345
16345
|
Lottie: () => Lottie
|
|
16346
16346
|
});
|
|
16347
16347
|
module.exports = __toCommonJS(lottie_exports);
|
|
16348
16348
|
|
|
16349
|
-
// src/lottie/lottie.tsx
|
|
16349
|
+
// src/components/lottie/lottie.tsx
|
|
16350
16350
|
var import_react2 = require("react");
|
|
16351
16351
|
|
|
16352
|
-
// src/lottie/lottie-styles.ts
|
|
16352
|
+
// src/components/lottie/lottie-styles.ts
|
|
16353
16353
|
var import_styled_components = __toESM(require("styled-components"), 1);
|
|
16354
16354
|
var LottieContainer = import_styled_components.default.div`
|
|
16355
16355
|
display: inline-flex;
|
|
@@ -16362,7 +16362,7 @@ var LottieContainer = import_styled_components.default.div`
|
|
|
16362
16362
|
}
|
|
16363
16363
|
`;
|
|
16364
16364
|
|
|
16365
|
-
// src/lottie/use-lottie.ts
|
|
16365
|
+
// src/components/lottie/use-lottie.ts
|
|
16366
16366
|
var import_react = require("react");
|
|
16367
16367
|
var import_lottie_web = __toESM(require_lottie(), 1);
|
|
16368
16368
|
function useLottie({
|
|
@@ -16479,7 +16479,7 @@ function createLottieRef(animationRef) {
|
|
|
16479
16479
|
};
|
|
16480
16480
|
}
|
|
16481
16481
|
|
|
16482
|
-
// src/lottie/lottie.tsx
|
|
16482
|
+
// src/components/lottie/lottie.tsx
|
|
16483
16483
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
16484
16484
|
var Lottie = (0, import_react2.forwardRef)(function Lottie2({
|
|
16485
16485
|
animationData: animationData2,
|