@algolia/satellite 2.5.1 → 2.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/cjs/Chat/ChatCodeDisplay/ChatCodeDisplay.d.ts +32 -0
- package/dist/cjs/Chat/ChatCodeDisplay/ChatCodeDisplay.js +105 -0
- package/dist/cjs/Chat/ChatCodeDisplay/ChatCodeDisplay.styles.d.ts +88 -0
- package/dist/cjs/Chat/ChatCodeDisplay/ChatCodeDisplay.styles.js +23 -0
- package/dist/cjs/Chat/ChatCodeDisplay/index.d.ts +1 -0
- package/dist/cjs/Chat/ChatCodeDisplay/index.js +16 -0
- package/dist/cjs/Chat/ChatContextAccordion/ChatContextAccordion.styles.js +1 -1
- package/dist/cjs/Chat/ChatContextContainer/ChatContextContainer.js +2 -5
- package/dist/cjs/Chat/ChatContextContainer/ChatContextContainer.styles.js +1 -1
- package/dist/cjs/Chat/index.d.ts +2 -0
- package/dist/cjs/Chat/index.js +7 -0
- package/dist/cjs/Helpers/MarkdownContent/MarkdownContent.tailwind.js +1 -1
- package/dist/cjs/Icons/index.d.ts +1 -1
- package/dist/cjs/Icons/index.js +6 -0
- package/dist/esm/Chat/ChatCodeDisplay/ChatCodeDisplay.d.ts +32 -0
- package/dist/esm/Chat/ChatCodeDisplay/ChatCodeDisplay.js +93 -0
- package/dist/esm/Chat/ChatCodeDisplay/ChatCodeDisplay.styles.d.ts +88 -0
- package/dist/esm/Chat/ChatCodeDisplay/ChatCodeDisplay.styles.js +16 -0
- package/dist/esm/Chat/ChatCodeDisplay/index.d.ts +1 -0
- package/dist/esm/Chat/ChatCodeDisplay/index.js +1 -0
- package/dist/esm/Chat/ChatContextAccordion/ChatContextAccordion.styles.js +1 -1
- package/dist/esm/Chat/ChatContextContainer/ChatContextContainer.js +2 -5
- package/dist/esm/Chat/ChatContextContainer/ChatContextContainer.styles.js +1 -1
- package/dist/esm/Chat/index.d.ts +2 -0
- package/dist/esm/Chat/index.js +1 -0
- package/dist/esm/Helpers/MarkdownContent/MarkdownContent.tailwind.js +1 -1
- package/dist/esm/Icons/index.d.ts +1 -1
- package/dist/esm/Icons/index.js +1 -1
- package/dist/satellite.min.css +1 -1
- package/package.json +4 -1
- /package/dist/cjs/Chat/{ChatContextContainer → ChatCodeDisplay}/theme.d.ts +0 -0
- /package/dist/cjs/Chat/{ChatContextContainer → ChatCodeDisplay}/theme.js +0 -0
- /package/dist/esm/Chat/{ChatContextContainer → ChatCodeDisplay}/theme.d.ts +0 -0
- /package/dist/esm/Chat/{ChatContextContainer → ChatCodeDisplay}/theme.js +0 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { SyntaxHighlighterProps } from "react-syntax-highlighter";
|
|
2
|
+
export type ChatCodeDisplayProps = {
|
|
3
|
+
/**
|
|
4
|
+
* Class to apply to the root element.
|
|
5
|
+
*/
|
|
6
|
+
className?: string;
|
|
7
|
+
/**
|
|
8
|
+
* The syntax highlighting theme to use.
|
|
9
|
+
*/
|
|
10
|
+
theme?: SyntaxHighlighterProps["style"];
|
|
11
|
+
/**
|
|
12
|
+
* The code language for syntax highlighting.
|
|
13
|
+
* @example "json", "js"
|
|
14
|
+
*/
|
|
15
|
+
language?: SyntaxHighlighterProps["language"];
|
|
16
|
+
/**
|
|
17
|
+
* Custom pre tag component to use for rendering the code block.
|
|
18
|
+
*/
|
|
19
|
+
PreTag?: SyntaxHighlighterProps["PreTag"];
|
|
20
|
+
/**
|
|
21
|
+
* Whether to wrap long lines.
|
|
22
|
+
*/
|
|
23
|
+
wrapLongLines?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* The code to display.
|
|
26
|
+
*/
|
|
27
|
+
children: string;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* The `ChatCodeDisplay` component displays code with syntax highlighting for use within chat context.
|
|
31
|
+
*/
|
|
32
|
+
export declare const ChatCodeDisplay: ({ className, language, theme, wrapLongLines, PreTag, children, }: ChatCodeDisplayProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.ChatCodeDisplay = void 0;
|
|
9
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
10
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
12
|
+
var _react = require("react");
|
|
13
|
+
var _ChatCodeDisplay = require("./ChatCodeDisplay.styles");
|
|
14
|
+
var _theme = require("./theme");
|
|
15
|
+
var _Indicators = require("./../../Indicators");
|
|
16
|
+
var _satellitePrefixer = _interopRequireDefault(require("./../../styles/helpers/satellitePrefixer"));
|
|
17
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
18
|
+
var _templateObject;
|
|
19
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
20
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
21
|
+
/**
|
|
22
|
+
* The `ChatCodeDisplay` component displays code with syntax highlighting for use within chat context.
|
|
23
|
+
*/
|
|
24
|
+
var ChatCodeDisplay = exports.ChatCodeDisplay = function ChatCodeDisplay(_ref) {
|
|
25
|
+
var className = _ref.className,
|
|
26
|
+
language = _ref.language,
|
|
27
|
+
_ref$theme = _ref.theme,
|
|
28
|
+
theme = _ref$theme === void 0 ? _theme.theme : _ref$theme,
|
|
29
|
+
_ref$wrapLongLines = _ref.wrapLongLines,
|
|
30
|
+
wrapLongLines = _ref$wrapLongLines === void 0 ? true : _ref$wrapLongLines,
|
|
31
|
+
_ref$PreTag = _ref.PreTag,
|
|
32
|
+
PreTag = _ref$PreTag === void 0 ? "div" : _ref$PreTag,
|
|
33
|
+
children = _ref.children;
|
|
34
|
+
var styles = (0, _ChatCodeDisplay.chatCodeDisplayStyles)();
|
|
35
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_react.Suspense, {
|
|
36
|
+
fallback: /*#__PURE__*/(0, _jsxRuntime.jsx)(ChatCodeDisplaySkeleton, {
|
|
37
|
+
code: children
|
|
38
|
+
}),
|
|
39
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(LazyPrism, {
|
|
40
|
+
className: styles.base({
|
|
41
|
+
className: className
|
|
42
|
+
}),
|
|
43
|
+
codeTagProps: {
|
|
44
|
+
className: styles.code()
|
|
45
|
+
},
|
|
46
|
+
language: language,
|
|
47
|
+
style: theme,
|
|
48
|
+
wrapLongLines: wrapLongLines,
|
|
49
|
+
PreTag: PreTag,
|
|
50
|
+
children: children
|
|
51
|
+
})
|
|
52
|
+
});
|
|
53
|
+
};
|
|
54
|
+
var ChatCodeDisplaySkeleton = function ChatCodeDisplaySkeleton(_ref2) {
|
|
55
|
+
var code = _ref2.code;
|
|
56
|
+
var styles = (0, _ChatCodeDisplay.chatCodeDisplaySkeletonStyles)();
|
|
57
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
58
|
+
className: styles.base(),
|
|
59
|
+
children: code.split("\n").map(function (line, index) {
|
|
60
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Indicators.Skeleton, {
|
|
61
|
+
className: styles.line(),
|
|
62
|
+
style: {
|
|
63
|
+
width: "".concat(line.length, "ch")
|
|
64
|
+
}
|
|
65
|
+
}, index);
|
|
66
|
+
})
|
|
67
|
+
});
|
|
68
|
+
};
|
|
69
|
+
var LazyPrism = /*#__PURE__*/(0, _react.lazy)( /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
|
70
|
+
var _yield$import, Prism;
|
|
71
|
+
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
72
|
+
while (1) switch (_context.prev = _context.next) {
|
|
73
|
+
case 0:
|
|
74
|
+
_context.prev = 0;
|
|
75
|
+
_context.next = 3;
|
|
76
|
+
return Promise.resolve().then(function () {
|
|
77
|
+
return _interopRequireWildcard(require("react-syntax-highlighter"));
|
|
78
|
+
});
|
|
79
|
+
case 3:
|
|
80
|
+
_yield$import = _context.sent;
|
|
81
|
+
Prism = _yield$import.Prism;
|
|
82
|
+
return _context.abrupt("return", {
|
|
83
|
+
"default": Prism
|
|
84
|
+
});
|
|
85
|
+
case 8:
|
|
86
|
+
_context.prev = 8;
|
|
87
|
+
_context.t0 = _context["catch"](0);
|
|
88
|
+
if (process.env.NODE_ENV !== "production") {
|
|
89
|
+
console.warn("react-syntax-highlighter is not installed. Please install it to enable code syntax highlighting in ChatContextContainer.");
|
|
90
|
+
}
|
|
91
|
+
case 11:
|
|
92
|
+
return _context.abrupt("return", {
|
|
93
|
+
"default": function _default() {
|
|
94
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
95
|
+
className: (0, _satellitePrefixer["default"])(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["p-2 italic"]))),
|
|
96
|
+
children: "react-syntax-highlighter is not installed."
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
case 12:
|
|
101
|
+
case "end":
|
|
102
|
+
return _context.stop();
|
|
103
|
+
}
|
|
104
|
+
}, _callee, null, [[0, 8]]);
|
|
105
|
+
})));
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
export declare const chatCodeDisplayStyles: import("tailwind-variants").TVReturnType<{
|
|
2
|
+
[key: string]: {
|
|
3
|
+
[key: string]: import("tailwind-merge").ClassNameValue | {
|
|
4
|
+
base?: import("tailwind-merge").ClassNameValue;
|
|
5
|
+
code?: import("tailwind-merge").ClassNameValue;
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
} | {
|
|
9
|
+
[x: string]: {
|
|
10
|
+
[x: string]: import("tailwind-merge").ClassNameValue | {
|
|
11
|
+
base?: import("tailwind-merge").ClassNameValue;
|
|
12
|
+
code?: import("tailwind-merge").ClassNameValue;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
} | {}, {
|
|
16
|
+
base: string;
|
|
17
|
+
code: string;
|
|
18
|
+
}, undefined, {
|
|
19
|
+
responsiveVariants?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | {} | undefined;
|
|
20
|
+
} & import("tailwind-variants/dist/config").TWMConfig & {
|
|
21
|
+
twMergeConfig: {
|
|
22
|
+
prefix: string;
|
|
23
|
+
};
|
|
24
|
+
}, {
|
|
25
|
+
[key: string]: {
|
|
26
|
+
[key: string]: import("tailwind-merge").ClassNameValue | {
|
|
27
|
+
base?: import("tailwind-merge").ClassNameValue;
|
|
28
|
+
code?: import("tailwind-merge").ClassNameValue;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
} | {}, {
|
|
32
|
+
base: string;
|
|
33
|
+
code: string;
|
|
34
|
+
}, import("tailwind-variants").TVReturnType<unknown, {
|
|
35
|
+
base: string;
|
|
36
|
+
code: string;
|
|
37
|
+
}, undefined, import("tailwind-variants/dist/config").TVConfig<unknown, {
|
|
38
|
+
[key: string]: {
|
|
39
|
+
[key: string]: import("tailwind-merge").ClassNameValue | {
|
|
40
|
+
base?: import("tailwind-merge").ClassNameValue;
|
|
41
|
+
code?: import("tailwind-merge").ClassNameValue;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
} | {}>, unknown, unknown, undefined>>;
|
|
45
|
+
export declare const chatCodeDisplaySkeletonStyles: import("tailwind-variants").TVReturnType<{
|
|
46
|
+
[key: string]: {
|
|
47
|
+
[key: string]: import("tailwind-merge").ClassNameValue | {
|
|
48
|
+
base?: import("tailwind-merge").ClassNameValue;
|
|
49
|
+
line?: import("tailwind-merge").ClassNameValue;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
} | {
|
|
53
|
+
[x: string]: {
|
|
54
|
+
[x: string]: import("tailwind-merge").ClassNameValue | {
|
|
55
|
+
base?: import("tailwind-merge").ClassNameValue;
|
|
56
|
+
line?: import("tailwind-merge").ClassNameValue;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
} | {}, {
|
|
60
|
+
base: string;
|
|
61
|
+
line: string;
|
|
62
|
+
}, undefined, {
|
|
63
|
+
responsiveVariants?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | {} | undefined;
|
|
64
|
+
} & import("tailwind-variants/dist/config").TWMConfig & {
|
|
65
|
+
twMergeConfig: {
|
|
66
|
+
prefix: string;
|
|
67
|
+
};
|
|
68
|
+
}, {
|
|
69
|
+
[key: string]: {
|
|
70
|
+
[key: string]: import("tailwind-merge").ClassNameValue | {
|
|
71
|
+
base?: import("tailwind-merge").ClassNameValue;
|
|
72
|
+
line?: import("tailwind-merge").ClassNameValue;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
} | {}, {
|
|
76
|
+
base: string;
|
|
77
|
+
line: string;
|
|
78
|
+
}, import("tailwind-variants").TVReturnType<unknown, {
|
|
79
|
+
base: string;
|
|
80
|
+
line: string;
|
|
81
|
+
}, undefined, import("tailwind-variants/dist/config").TVConfig<unknown, {
|
|
82
|
+
[key: string]: {
|
|
83
|
+
[key: string]: import("tailwind-merge").ClassNameValue | {
|
|
84
|
+
base?: import("tailwind-merge").ClassNameValue;
|
|
85
|
+
line?: import("tailwind-merge").ClassNameValue;
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
} | {}>, unknown, unknown, undefined>>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.chatCodeDisplayStyles = exports.chatCodeDisplaySkeletonStyles = void 0;
|
|
8
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
9
|
+
var _satellitePrefixer = _interopRequireDefault(require("./../../styles/helpers/satellitePrefixer"));
|
|
10
|
+
var _tv = require("./../../styles/helpers/tv");
|
|
11
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
12
|
+
var chatCodeDisplayStyles = exports.chatCodeDisplayStyles = (0, _tv.tv)({
|
|
13
|
+
slots: {
|
|
14
|
+
base: (0, _satellitePrefixer["default"])(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["bg-grey-100"]))),
|
|
15
|
+
code: (0, _satellitePrefixer["default"])(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["text-grey-600 text-sm leading-[20px] p-0 m-0"])))
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
var chatCodeDisplaySkeletonStyles = exports.chatCodeDisplaySkeletonStyles = (0, _tv.tv)({
|
|
19
|
+
slots: {
|
|
20
|
+
base: (0, _satellitePrefixer["default"])(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["space-y-1 pt-0.5 overflow-hidden"]))),
|
|
21
|
+
line: (0, _satellitePrefixer["default"])(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["max-w-full h-4"])))
|
|
22
|
+
}
|
|
23
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./ChatCodeDisplay";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _ChatCodeDisplay = require("./ChatCodeDisplay");
|
|
7
|
+
Object.keys(_ChatCodeDisplay).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _ChatCodeDisplay[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function get() {
|
|
13
|
+
return _ChatCodeDisplay[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
@@ -14,7 +14,7 @@ var chatContextAccordionStyles = exports.chatContextAccordionStyles = (0, _tv.tv
|
|
|
14
14
|
base: (0, _satellitePrefixer["default"])(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["w-full"]))),
|
|
15
15
|
item: (0, _satellitePrefixer["default"])(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["border border-grey-200 rounded-[4px] overflow-hidden"]))),
|
|
16
16
|
header: (0, _satellitePrefixer["default"])(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["border-b border-grey-200 transition-colors duration-500 data-[state=closed]:border-b-transparent [&>div]:px-2"]))),
|
|
17
|
-
iconBg: (0, _satellitePrefixer["default"])(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["bg-
|
|
17
|
+
iconBg: (0, _satellitePrefixer["default"])(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["bg-transparent size-auto"]))),
|
|
18
18
|
trigger: (0, _satellitePrefixer["default"])(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["!px-2 !py-0.5"]))),
|
|
19
19
|
titleWrapper: (0, _satellitePrefixer["default"])(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2["default"])(["gap-x-1"]))),
|
|
20
20
|
title: (0, _satellitePrefixer["default"])(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2["default"])(["typo-subdued typo-display-caption"]))),
|
|
@@ -5,9 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.ChatContextContainer = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
|
-
var
|
|
8
|
+
var _ChatCodeDisplay = require("../ChatCodeDisplay");
|
|
9
9
|
var _ChatContextContainer = require("./ChatContextContainer.styles");
|
|
10
|
-
var _theme = require("./theme");
|
|
11
10
|
var _Actions = require("./../../Actions");
|
|
12
11
|
var _Icons = require("./../../Icons");
|
|
13
12
|
var _utils = require("./../../utils");
|
|
@@ -60,10 +59,8 @@ var ChatContextContainer = exports.ChatContextContainer = function ChatContextCo
|
|
|
60
59
|
role: "region",
|
|
61
60
|
"aria-labelledby": titleId,
|
|
62
61
|
className: styles.content(),
|
|
63
|
-
children: code !== undefined && typeof children === "string" ? /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
64
|
-
PreTag: "div",
|
|
62
|
+
children: code !== undefined && typeof children === "string" ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChatCodeDisplay.ChatCodeDisplay, {
|
|
65
63
|
language: code,
|
|
66
|
-
style: _theme.theme,
|
|
67
64
|
children: children
|
|
68
65
|
}) : children
|
|
69
66
|
})]
|
|
@@ -17,6 +17,6 @@ var chatContextContainerStyles = exports.chatContextContainerStyles = (0, _tv.tv
|
|
|
17
17
|
// override markdown-content styles for "p" tags
|
|
18
18
|
title: (0, _satellitePrefixer["default"])(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["!typo-display-caption !typo-subdued !m-0"]))),
|
|
19
19
|
// select "code" to override any selectors added by markdown-content styles
|
|
20
|
-
content: (0, _satellitePrefixer["default"])(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["bg-grey-100
|
|
20
|
+
content: (0, _satellitePrefixer["default"])(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["bg-grey-100 text-grey-600 text-sm leading-[20px] px-3 py-2 overflow-y-auto max-h-80 thin-scrollbar"])))
|
|
21
21
|
}
|
|
22
22
|
});
|
package/dist/cjs/Chat/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export type { ChatCodeDisplayProps as ExperimentalChatCodeDisplayProps } from "./ChatCodeDisplay";
|
|
2
|
+
export { ChatCodeDisplay as ExperimentalChatCodeDisplay } from "./ChatCodeDisplay";
|
|
1
3
|
export type { ChatMessageProps as ExperimentalChatMessageProps } from "./ChatMessage";
|
|
2
4
|
export { ChatMessage as ExperimentalChatMessage } from "./ChatMessage";
|
|
3
5
|
export type { ChatMessagesProps as ExperimentalChatMessagesProps, ChatMessageLocale as ExperimentalChatMessageLocale, } from "./ChatMessages";
|
package/dist/cjs/Chat/index.js
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
Object.defineProperty(exports, "ExperimentalChatCodeDisplay", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _ChatCodeDisplay.ChatCodeDisplay;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
6
12
|
Object.defineProperty(exports, "ExperimentalChatContextAccordion", {
|
|
7
13
|
enumerable: true,
|
|
8
14
|
get: function get() {
|
|
@@ -69,6 +75,7 @@ Object.defineProperty(exports, "experimentalIsAiSdkMessageV5", {
|
|
|
69
75
|
return _helpers.isAiSdkMessageV5;
|
|
70
76
|
}
|
|
71
77
|
});
|
|
78
|
+
var _ChatCodeDisplay = require("./ChatCodeDisplay");
|
|
72
79
|
var _ChatMessage = require("./ChatMessage");
|
|
73
80
|
var _ChatMessages = require("./ChatMessages");
|
|
74
81
|
var _ChatPrompt = require("./ChatPrompt");
|
|
@@ -17,7 +17,7 @@ module.exports = plugin(function (_ref) {
|
|
|
17
17
|
/** @type {any} */
|
|
18
18
|
var mobile = theme("stlTypography.mobile", {});
|
|
19
19
|
addComponents({
|
|
20
|
-
".markdown-content": {
|
|
20
|
+
":where(.markdown-content)": {
|
|
21
21
|
"h1, h2, h3, h4, h5, h6, p, ul, ol, blockquote, table": {
|
|
22
22
|
"&:not(:first-child)": {
|
|
23
23
|
marginTop: theme("spacing.3")
|
|
@@ -17,4 +17,4 @@ export { QueryBreakdownIcon } from "./QueryBreakdownIcon";
|
|
|
17
17
|
export { BulbIcon } from "./BulbIcon";
|
|
18
18
|
export { TestingIcon } from "./TestingIcon";
|
|
19
19
|
export { RocketIcon } from "./RocketIcon";
|
|
20
|
-
export { ActivityIcon, AirplayIcon, AlertCircleIcon, AlertOctagonIcon, AlertTriangleIcon, AlignCenterIcon, AlignJustifyIcon, AlignLeftIcon, AlignRightIcon, AnchorIcon, ApertureIcon, ArchiveIcon, ArrowDownCircleIcon, ArrowDownIcon, ArrowDownLeftIcon, ArrowDownRightIcon, ArrowLeftCircleIcon, ArrowLeftIcon, ArrowRightCircleIcon, ArrowRightIcon, ArrowUpCircleIcon, ArrowUpIcon, ArrowUpLeftIcon, ArrowUpRightIcon, AtSignIcon, AwardIcon, BanIcon, BarChart2Icon, BarChartIcon, BatteryChargingIcon, BatteryIcon, BellIcon, BellOffIcon, BlocksIcon, BluetoothIcon, BoldIcon, BookIcon, BookmarkIcon, BookOpenIcon, BoxIcon, BriefcaseIcon, CalendarIcon, CameraIcon, CameraOffIcon, CastIcon, CheckCircleIcon, CheckIcon, CheckSquareIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronsDownIcon, ChevronsLeftIcon, ChevronsRightIcon, ChevronsUpIcon, ChevronUpIcon, ChromeIcon, CircleIcon, ClipboardIcon, ClockIcon, CloudDrizzleIcon, CloudIcon, CloudLightningIcon, CloudOffIcon, CloudRainIcon, CloudSnowIcon, CodeIcon, CodepenIcon, CodesandboxIcon, CoffeeIcon, ColumnsIcon, CommandIcon, CompassIcon, CopyIcon, CornerDownLeftIcon, CornerDownRightIcon, CornerLeftDownIcon, CornerLeftUpIcon, CornerRightDownIcon, CornerRightUpIcon, CornerUpLeftIcon, CornerUpRightIcon, CpuIcon, CreditCardIcon, CropIcon, CrosshairIcon, DatabaseIcon, DeleteIcon, DiscIcon, DivideCircleIcon, DivideIcon, DivideSquareIcon, DollarSignIcon, DownloadCloudIcon, DownloadIcon, DribbbleIcon, DropletIcon, Edit2Icon, Edit3Icon, EditIcon, ExternalLinkIcon, EyeIcon, EyeOffIcon, FacebookIcon, FastForwardIcon, FeatherIcon, FigmaIcon, FileIcon, FileMinusIcon, FilePlusIcon, FileSearchIcon, FileTextIcon, FilmIcon, FilterIcon, FlagIcon, FlaskConicalIcon, FolderIcon, FolderMinusIcon, FolderPlusIcon, FramerIcon, FrownIcon, GiftIcon, GitBranchIcon, GitCommitIcon, GithubIcon, GitlabIcon, GitMergeIcon, GitPullRequestIcon, GlobeIcon, HardDriveIcon, HashIcon, HeadphonesIcon, HeartIcon, HelpCircleIcon, HexagonIcon, HomeIcon, ImageIcon, ImageOffIcon, InboxIcon, InfoIcon, InstagramIcon, ItalicIcon, KeyIcon, Landmark, LayersIcon, LayoutGridIcon, LayoutIcon, LifeBuoyIcon, Link2Icon, LinkedinIcon, LinkIcon, ListIcon, LoaderIcon, LockIcon, LogInIcon, LogOutIcon, MailIcon, MapIcon, MapPinIcon, Maximize2Icon, MaximizeIcon, MehIcon, MenuIcon, MergeIcon, MessageCircleIcon, MessageSquareIcon, MicIcon, MicOffIcon, Minimize2Icon, MinimizeIcon, MinusCircleIcon, MinusIcon, MinusSquareIcon, MonitorIcon, MoonIcon, MoreHorizontalIcon, MoreVerticalIcon, MousePointerIcon, MoveIcon, MusicIcon, Navigation2Icon, NavigationIcon, OctagonIcon, PackageIcon, PaperclipIcon, PauseCircleIcon, PauseIcon, PenToolIcon, PercentIcon, PhoneCallIcon, PhoneForwardedIcon, PhoneIcon, PhoneIncomingIcon, PhoneMissedIcon, PhoneOffIcon, PhoneOutgoingIcon, PieChartIcon, PlayCircleIcon, PlayIcon, PlusCircleIcon, PlusIcon, PlusSquareIcon, PocketIcon, PowerIcon, PrinterIcon, PuzzleIcon, RadioIcon, RefreshCcwIcon, RefreshCwIcon, RepeatIcon, RewindIcon, RotateCcwIcon, RotateCwIcon, RssIcon, SaveIcon, ScissorsIcon, SearchIcon, SearchXIcon, SendIcon, ServerCogIcon, ServerCrashIcon, ServerIcon, SettingsIcon, Share2Icon, ShareIcon, ShieldIcon, ShieldOffIcon, ShoppingBagIcon, ShoppingCartIcon, ShuffleIcon, SidebarIcon, SkipBackIcon, SkipForwardIcon, SlackIcon, SlidersIcon, SmartphoneIcon, SmileIcon, SparklesIcon, SpeakerIcon, SquareIcon, StarIcon, StopCircleIcon, SunIcon, SunriseIcon, SunsetIcon, TableIcon, TabletIcon, TagIcon, TargetIcon, TerminalIcon, ThermometerIcon, ThumbsDownIcon, ThumbsUpIcon, ToggleLeftIcon, ToggleRightIcon, Trash2Icon, TrashIcon, TrelloIcon, TrendingDownIcon, TrendingUpIcon, TriangleIcon, TrophyIcon, TruckIcon, TvIcon, TwitchIcon, TwitterIcon, TypeIcon, UmbrellaIcon, UnderlineIcon, UnlockIcon, UploadCloudIcon, UploadIcon, UserCheckIcon, UserIcon, UserMinusIcon, UserPlusIcon, UsersIcon, UserXIcon, VideoIcon, VideoOffIcon, VoicemailIcon, Volume1Icon, Volume2Icon, VolumeIcon, VolumeXIcon, WatchIcon, WifiIcon, WifiOffIcon, WindIcon, WrenchIcon, XCircleIcon, XIcon, XOctagonIcon, XSquareIcon, YoutubeIcon, ZapIcon, ZapOffIcon, ZoomInIcon, ZoomOutIcon, } from "lucide-react";
|
|
20
|
+
export { ActivityIcon, AirplayIcon, AlertCircleIcon, AlertOctagonIcon, AlertTriangleIcon, AlignCenterIcon, AlignJustifyIcon, AlignLeftIcon, AlignRightIcon, AnchorIcon, ApertureIcon, ArchiveIcon, ArrowDownCircleIcon, ArrowDownIcon, ArrowDownLeftIcon, ArrowDownRightIcon, ArrowLeftCircleIcon, ArrowLeftIcon, ArrowRightCircleIcon, ArrowRightIcon, ArrowUpCircleIcon, ArrowUpIcon, ArrowUpLeftIcon, ArrowUpRightIcon, AtSignIcon, AwardIcon, BanIcon, BarChart2Icon, BarChartIcon, BatteryChargingIcon, BatteryIcon, BellIcon, BellOffIcon, BlocksIcon, BluetoothIcon, BoldIcon, BookIcon, BookmarkIcon, BookOpenIcon, BoxIcon, BriefcaseIcon, CalendarIcon, CameraIcon, CameraOffIcon, CastIcon, CheckCircleIcon, CheckIcon, CheckSquareIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronsDownIcon, ChevronsLeftIcon, ChevronsRightIcon, ChevronsUpIcon, ChevronUpIcon, ChromeIcon, CircleIcon, ClipboardIcon, ClockIcon, CloudDrizzleIcon, CloudIcon, CloudLightningIcon, CloudOffIcon, CloudRainIcon, CloudSnowIcon, CodeIcon, CodepenIcon, CodesandboxIcon, CoffeeIcon, ColumnsIcon, CommandIcon, CompassIcon, CopyIcon, CopyPlus, CornerDownLeftIcon, CornerDownRightIcon, CornerLeftDownIcon, CornerLeftUpIcon, CornerRightDownIcon, CornerRightUpIcon, CornerUpLeftIcon, CornerUpRightIcon, CpuIcon, CreditCardIcon, CropIcon, CrosshairIcon, DatabaseIcon, DeleteIcon, DiscIcon, DivideCircleIcon, DivideIcon, DivideSquareIcon, DollarSignIcon, DownloadCloudIcon, DownloadIcon, DribbbleIcon, DropletIcon, Edit2Icon, Edit3Icon, EditIcon, ExternalLinkIcon, EyeIcon, EyeOffIcon, FacebookIcon, FastForwardIcon, FeatherIcon, FigmaIcon, FileIcon, FileMinusIcon, FilePlusIcon, FileSearchIcon, FileTextIcon, FilmIcon, FilterIcon, FlagIcon, FlaskConicalIcon, FolderIcon, FolderMinusIcon, FolderPlusIcon, FramerIcon, FrownIcon, GiftIcon, GitBranchIcon, GitCommitIcon, GithubIcon, GitlabIcon, GitMergeIcon, GitPullRequestIcon, GlobeIcon, HardDriveIcon, HashIcon, HeadphonesIcon, HeartIcon, HelpCircleIcon, HexagonIcon, HomeIcon, ImageIcon, ImageOffIcon, InboxIcon, InfoIcon, InstagramIcon, ItalicIcon, KeyIcon, Landmark, LayersIcon, LayoutGridIcon, LayoutIcon, LifeBuoyIcon, Link2Icon, LinkedinIcon, LinkIcon, ListIcon, LoaderIcon, LockIcon, LogInIcon, LogOutIcon, MailIcon, MapIcon, MapPinIcon, Maximize2Icon, MaximizeIcon, MehIcon, MenuIcon, MergeIcon, MessageCircleIcon, MessageSquareIcon, MicIcon, MicOffIcon, Minimize2Icon, MinimizeIcon, MinusCircleIcon, MinusIcon, MinusSquareIcon, MonitorIcon, MoonIcon, MoreHorizontalIcon, MoreVerticalIcon, MousePointerIcon, MoveIcon, MusicIcon, Navigation2Icon, NavigationIcon, OctagonIcon, PackageIcon, PaperclipIcon, PauseCircleIcon, PauseIcon, PenToolIcon, PercentIcon, PhoneCallIcon, PhoneForwardedIcon, PhoneIcon, PhoneIncomingIcon, PhoneMissedIcon, PhoneOffIcon, PhoneOutgoingIcon, PieChartIcon, PlayCircleIcon, PlayIcon, PlusCircleIcon, PlusIcon, PlusSquareIcon, PocketIcon, PowerIcon, PrinterIcon, PuzzleIcon, RadioIcon, RefreshCcwIcon, RefreshCwIcon, RepeatIcon, RewindIcon, RotateCcwIcon, RotateCwIcon, RssIcon, SaveIcon, ScissorsIcon, SearchIcon, SearchXIcon, SendIcon, ServerCogIcon, ServerCrashIcon, ServerIcon, SettingsIcon, Share2Icon, ShareIcon, ShieldIcon, ShieldOffIcon, ShoppingBagIcon, ShoppingCartIcon, ShuffleIcon, SidebarIcon, SkipBackIcon, SkipForwardIcon, SlackIcon, SlidersIcon, SmartphoneIcon, SmileIcon, SparklesIcon, SpeakerIcon, SquareIcon, StarIcon, StopCircleIcon, SunIcon, SunriseIcon, SunsetIcon, TableIcon, TabletIcon, TagIcon, TargetIcon, TerminalIcon, ThermometerIcon, ThumbsDownIcon, ThumbsUpIcon, ToggleLeftIcon, ToggleRightIcon, Trash2Icon, TrashIcon, TrelloIcon, TrendingDownIcon, TrendingUpIcon, TriangleIcon, TrophyIcon, TruckIcon, TvIcon, TwitchIcon, TwitterIcon, TypeIcon, UmbrellaIcon, UnderlineIcon, UnlockIcon, UploadCloudIcon, UploadIcon, UserCheckIcon, UserIcon, UserMinusIcon, UserPlusIcon, UsersIcon, UserXIcon, VideoIcon, VideoOffIcon, VoicemailIcon, Volume1Icon, Volume2Icon, VolumeIcon, VolumeXIcon, WatchIcon, WifiIcon, WifiOffIcon, WindIcon, WrenchIcon, XCircleIcon, XIcon, XOctagonIcon, XSquareIcon, YoutubeIcon, ZapIcon, ZapOffIcon, ZoomInIcon, ZoomOutIcon, } from "lucide-react";
|
package/dist/cjs/Icons/index.js
CHANGED
|
@@ -471,6 +471,12 @@ Object.defineProperty(exports, "CopyIcon", {
|
|
|
471
471
|
return _lucideReact.CopyIcon;
|
|
472
472
|
}
|
|
473
473
|
});
|
|
474
|
+
Object.defineProperty(exports, "CopyPlus", {
|
|
475
|
+
enumerable: true,
|
|
476
|
+
get: function get() {
|
|
477
|
+
return _lucideReact.CopyPlus;
|
|
478
|
+
}
|
|
479
|
+
});
|
|
474
480
|
Object.defineProperty(exports, "CornerDownLeftIcon", {
|
|
475
481
|
enumerable: true,
|
|
476
482
|
get: function get() {
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { SyntaxHighlighterProps } from "react-syntax-highlighter";
|
|
2
|
+
export type ChatCodeDisplayProps = {
|
|
3
|
+
/**
|
|
4
|
+
* Class to apply to the root element.
|
|
5
|
+
*/
|
|
6
|
+
className?: string;
|
|
7
|
+
/**
|
|
8
|
+
* The syntax highlighting theme to use.
|
|
9
|
+
*/
|
|
10
|
+
theme?: SyntaxHighlighterProps["style"];
|
|
11
|
+
/**
|
|
12
|
+
* The code language for syntax highlighting.
|
|
13
|
+
* @example "json", "js"
|
|
14
|
+
*/
|
|
15
|
+
language?: SyntaxHighlighterProps["language"];
|
|
16
|
+
/**
|
|
17
|
+
* Custom pre tag component to use for rendering the code block.
|
|
18
|
+
*/
|
|
19
|
+
PreTag?: SyntaxHighlighterProps["PreTag"];
|
|
20
|
+
/**
|
|
21
|
+
* Whether to wrap long lines.
|
|
22
|
+
*/
|
|
23
|
+
wrapLongLines?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* The code to display.
|
|
26
|
+
*/
|
|
27
|
+
children: string;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* The `ChatCodeDisplay` component displays code with syntax highlighting for use within chat context.
|
|
31
|
+
*/
|
|
32
|
+
export declare const ChatCodeDisplay: ({ className, language, theme, wrapLongLines, PreTag, children, }: ChatCodeDisplayProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
+
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
|
+
var _templateObject;
|
|
4
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
5
|
+
import { lazy, Suspense } from "react";
|
|
6
|
+
import { chatCodeDisplaySkeletonStyles, chatCodeDisplayStyles } from "./ChatCodeDisplay.styles";
|
|
7
|
+
import { theme as defaultTheme } from "./theme";
|
|
8
|
+
import { Skeleton } from "./../../Indicators";
|
|
9
|
+
import stl from "./../../styles/helpers/satellitePrefixer";
|
|
10
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
+
/**
|
|
12
|
+
* The `ChatCodeDisplay` component displays code with syntax highlighting for use within chat context.
|
|
13
|
+
*/
|
|
14
|
+
export var ChatCodeDisplay = function ChatCodeDisplay(_ref) {
|
|
15
|
+
var className = _ref.className,
|
|
16
|
+
language = _ref.language,
|
|
17
|
+
_ref$theme = _ref.theme,
|
|
18
|
+
theme = _ref$theme === void 0 ? defaultTheme : _ref$theme,
|
|
19
|
+
_ref$wrapLongLines = _ref.wrapLongLines,
|
|
20
|
+
wrapLongLines = _ref$wrapLongLines === void 0 ? true : _ref$wrapLongLines,
|
|
21
|
+
_ref$PreTag = _ref.PreTag,
|
|
22
|
+
PreTag = _ref$PreTag === void 0 ? "div" : _ref$PreTag,
|
|
23
|
+
children = _ref.children;
|
|
24
|
+
var styles = chatCodeDisplayStyles();
|
|
25
|
+
return /*#__PURE__*/_jsx(Suspense, {
|
|
26
|
+
fallback: /*#__PURE__*/_jsx(ChatCodeDisplaySkeleton, {
|
|
27
|
+
code: children
|
|
28
|
+
}),
|
|
29
|
+
children: /*#__PURE__*/_jsx(LazyPrism, {
|
|
30
|
+
className: styles.base({
|
|
31
|
+
className: className
|
|
32
|
+
}),
|
|
33
|
+
codeTagProps: {
|
|
34
|
+
className: styles.code()
|
|
35
|
+
},
|
|
36
|
+
language: language,
|
|
37
|
+
style: theme,
|
|
38
|
+
wrapLongLines: wrapLongLines,
|
|
39
|
+
PreTag: PreTag,
|
|
40
|
+
children: children
|
|
41
|
+
})
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
var ChatCodeDisplaySkeleton = function ChatCodeDisplaySkeleton(_ref2) {
|
|
45
|
+
var code = _ref2.code;
|
|
46
|
+
var styles = chatCodeDisplaySkeletonStyles();
|
|
47
|
+
return /*#__PURE__*/_jsx("div", {
|
|
48
|
+
className: styles.base(),
|
|
49
|
+
children: code.split("\n").map(function (line, index) {
|
|
50
|
+
return /*#__PURE__*/_jsx(Skeleton, {
|
|
51
|
+
className: styles.line(),
|
|
52
|
+
style: {
|
|
53
|
+
width: "".concat(line.length, "ch")
|
|
54
|
+
}
|
|
55
|
+
}, index);
|
|
56
|
+
})
|
|
57
|
+
});
|
|
58
|
+
};
|
|
59
|
+
var LazyPrism = /*#__PURE__*/lazy( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
60
|
+
var _yield$import, Prism;
|
|
61
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
62
|
+
while (1) switch (_context.prev = _context.next) {
|
|
63
|
+
case 0:
|
|
64
|
+
_context.prev = 0;
|
|
65
|
+
_context.next = 3;
|
|
66
|
+
return import("react-syntax-highlighter");
|
|
67
|
+
case 3:
|
|
68
|
+
_yield$import = _context.sent;
|
|
69
|
+
Prism = _yield$import.Prism;
|
|
70
|
+
return _context.abrupt("return", {
|
|
71
|
+
"default": Prism
|
|
72
|
+
});
|
|
73
|
+
case 8:
|
|
74
|
+
_context.prev = 8;
|
|
75
|
+
_context.t0 = _context["catch"](0);
|
|
76
|
+
if (process.env.NODE_ENV !== "production") {
|
|
77
|
+
console.warn("react-syntax-highlighter is not installed. Please install it to enable code syntax highlighting in ChatContextContainer.");
|
|
78
|
+
}
|
|
79
|
+
case 11:
|
|
80
|
+
return _context.abrupt("return", {
|
|
81
|
+
"default": function _default() {
|
|
82
|
+
return /*#__PURE__*/_jsx("div", {
|
|
83
|
+
className: stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["p-2 italic"]))),
|
|
84
|
+
children: "react-syntax-highlighter is not installed."
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
case 12:
|
|
89
|
+
case "end":
|
|
90
|
+
return _context.stop();
|
|
91
|
+
}
|
|
92
|
+
}, _callee, null, [[0, 8]]);
|
|
93
|
+
})));
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
export declare const chatCodeDisplayStyles: import("tailwind-variants").TVReturnType<{
|
|
2
|
+
[key: string]: {
|
|
3
|
+
[key: string]: import("tailwind-merge").ClassNameValue | {
|
|
4
|
+
base?: import("tailwind-merge").ClassNameValue;
|
|
5
|
+
code?: import("tailwind-merge").ClassNameValue;
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
} | {
|
|
9
|
+
[x: string]: {
|
|
10
|
+
[x: string]: import("tailwind-merge").ClassNameValue | {
|
|
11
|
+
base?: import("tailwind-merge").ClassNameValue;
|
|
12
|
+
code?: import("tailwind-merge").ClassNameValue;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
} | {}, {
|
|
16
|
+
base: string;
|
|
17
|
+
code: string;
|
|
18
|
+
}, undefined, {
|
|
19
|
+
responsiveVariants?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | {} | undefined;
|
|
20
|
+
} & import("tailwind-variants/dist/config").TWMConfig & {
|
|
21
|
+
twMergeConfig: {
|
|
22
|
+
prefix: string;
|
|
23
|
+
};
|
|
24
|
+
}, {
|
|
25
|
+
[key: string]: {
|
|
26
|
+
[key: string]: import("tailwind-merge").ClassNameValue | {
|
|
27
|
+
base?: import("tailwind-merge").ClassNameValue;
|
|
28
|
+
code?: import("tailwind-merge").ClassNameValue;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
} | {}, {
|
|
32
|
+
base: string;
|
|
33
|
+
code: string;
|
|
34
|
+
}, import("tailwind-variants").TVReturnType<unknown, {
|
|
35
|
+
base: string;
|
|
36
|
+
code: string;
|
|
37
|
+
}, undefined, import("tailwind-variants/dist/config").TVConfig<unknown, {
|
|
38
|
+
[key: string]: {
|
|
39
|
+
[key: string]: import("tailwind-merge").ClassNameValue | {
|
|
40
|
+
base?: import("tailwind-merge").ClassNameValue;
|
|
41
|
+
code?: import("tailwind-merge").ClassNameValue;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
} | {}>, unknown, unknown, undefined>>;
|
|
45
|
+
export declare const chatCodeDisplaySkeletonStyles: import("tailwind-variants").TVReturnType<{
|
|
46
|
+
[key: string]: {
|
|
47
|
+
[key: string]: import("tailwind-merge").ClassNameValue | {
|
|
48
|
+
base?: import("tailwind-merge").ClassNameValue;
|
|
49
|
+
line?: import("tailwind-merge").ClassNameValue;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
} | {
|
|
53
|
+
[x: string]: {
|
|
54
|
+
[x: string]: import("tailwind-merge").ClassNameValue | {
|
|
55
|
+
base?: import("tailwind-merge").ClassNameValue;
|
|
56
|
+
line?: import("tailwind-merge").ClassNameValue;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
} | {}, {
|
|
60
|
+
base: string;
|
|
61
|
+
line: string;
|
|
62
|
+
}, undefined, {
|
|
63
|
+
responsiveVariants?: boolean | ("sm" | "md" | "lg" | "xl" | "2xl")[] | {} | undefined;
|
|
64
|
+
} & import("tailwind-variants/dist/config").TWMConfig & {
|
|
65
|
+
twMergeConfig: {
|
|
66
|
+
prefix: string;
|
|
67
|
+
};
|
|
68
|
+
}, {
|
|
69
|
+
[key: string]: {
|
|
70
|
+
[key: string]: import("tailwind-merge").ClassNameValue | {
|
|
71
|
+
base?: import("tailwind-merge").ClassNameValue;
|
|
72
|
+
line?: import("tailwind-merge").ClassNameValue;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
} | {}, {
|
|
76
|
+
base: string;
|
|
77
|
+
line: string;
|
|
78
|
+
}, import("tailwind-variants").TVReturnType<unknown, {
|
|
79
|
+
base: string;
|
|
80
|
+
line: string;
|
|
81
|
+
}, undefined, import("tailwind-variants/dist/config").TVConfig<unknown, {
|
|
82
|
+
[key: string]: {
|
|
83
|
+
[key: string]: import("tailwind-merge").ClassNameValue | {
|
|
84
|
+
base?: import("tailwind-merge").ClassNameValue;
|
|
85
|
+
line?: import("tailwind-merge").ClassNameValue;
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
} | {}>, unknown, unknown, undefined>>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
3
|
+
import stl from "./../../styles/helpers/satellitePrefixer";
|
|
4
|
+
import { tv } from "./../../styles/helpers/tv";
|
|
5
|
+
export var chatCodeDisplayStyles = tv({
|
|
6
|
+
slots: {
|
|
7
|
+
base: stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["bg-grey-100"]))),
|
|
8
|
+
code: stl(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["text-grey-600 text-sm leading-[20px] p-0 m-0"])))
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
export var chatCodeDisplaySkeletonStyles = tv({
|
|
12
|
+
slots: {
|
|
13
|
+
base: stl(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["space-y-1 pt-0.5 overflow-hidden"]))),
|
|
14
|
+
line: stl(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["max-w-full h-4"])))
|
|
15
|
+
}
|
|
16
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./ChatCodeDisplay";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./ChatCodeDisplay";
|
|
@@ -7,7 +7,7 @@ export var chatContextAccordionStyles = tv({
|
|
|
7
7
|
base: stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["w-full"]))),
|
|
8
8
|
item: stl(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["border border-grey-200 rounded-[4px] overflow-hidden"]))),
|
|
9
9
|
header: stl(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["border-b border-grey-200 transition-colors duration-500 data-[state=closed]:border-b-transparent [&>div]:px-2"]))),
|
|
10
|
-
iconBg: stl(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["bg-
|
|
10
|
+
iconBg: stl(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["bg-transparent size-auto"]))),
|
|
11
11
|
trigger: stl(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["!px-2 !py-0.5"]))),
|
|
12
12
|
titleWrapper: stl(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["gap-x-1"]))),
|
|
13
13
|
title: stl(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["typo-subdued typo-display-caption"]))),
|