@cianfrani/ai-ui 0.1.0-alpha.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/LICENSE +21 -0
- package/README.md +144 -0
- package/dist/ai-ui.js +3218 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/lib/has-slot-controller.d.ts +21 -0
- package/dist/types/lib/tool-tone.d.ts +2 -0
- package/dist/types/native-styles.d.ts +5 -0
- package/dist/types/semantic/ai-conversation.d.ts +28 -0
- package/dist/types/semantic/ai-event.d.ts +91 -0
- package/dist/types/semantic/ai-message.d.ts +45 -0
- package/dist/types/semantic/ai-thinking.d.ts +41 -0
- package/dist/types/semantic/ai-tool-call.d.ts +59 -0
- package/dist/types/semantic/ai-tool-result.d.ts +44 -0
- package/dist/types/semantic/index.d.ts +6 -0
- package/dist/types/visual/avatar.d.ts +34 -0
- package/dist/types/visual/badge.d.ts +32 -0
- package/dist/types/visual/divider.d.ts +26 -0
- package/dist/types/visual/icon.d.ts +24 -0
- package/dist/types/visual/index.d.ts +9 -0
- package/dist/types/visual/markdown.d.ts +52 -0
- package/dist/types/visual/stack.d.ts +32 -0
- package/dist/types/visual/status.d.ts +33 -0
- package/dist/types/visual/surface.d.ts +34 -0
- package/dist/types/visual/text.d.ts +37 -0
- package/package.json +67 -0
- package/src/custom-elements.json +3741 -0
- package/src/index.ts +8 -0
- package/src/lib/has-slot-controller.ts +61 -0
- package/src/lib/tool-tone.ts +18 -0
- package/src/native-styles.ts +29 -0
- package/src/semantic/ai-conversation.ts +84 -0
- package/src/semantic/ai-event.ts +452 -0
- package/src/semantic/ai-message.ts +235 -0
- package/src/semantic/ai-thinking.ts +190 -0
- package/src/semantic/ai-tool-call.ts +513 -0
- package/src/semantic/ai-tool-result.ts +239 -0
- package/src/semantic/index.ts +6 -0
- package/src/visual/avatar.ts +163 -0
- package/src/visual/badge.ts +141 -0
- package/src/visual/divider.ts +97 -0
- package/src/visual/icon.ts +97 -0
- package/src/visual/index.ts +9 -0
- package/src/visual/markdown.ts +888 -0
- package/src/visual/stack.ts +115 -0
- package/src/visual/status.ts +170 -0
- package/src/visual/surface.ts +150 -0
- package/src/visual/text.ts +141 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
/**
|
|
3
|
+
* Typography primitive.
|
|
4
|
+
*
|
|
5
|
+
* @slot - Text/inline content.
|
|
6
|
+
*
|
|
7
|
+
* @cssprop --text-color - Text color.
|
|
8
|
+
* @cssprop --font-family - Font family.
|
|
9
|
+
* @cssprop --font-family-mono - Monospace font family.
|
|
10
|
+
* @cssprop --font-size - Font size.
|
|
11
|
+
* @cssprop --font-weight - Font weight.
|
|
12
|
+
* @cssprop --line-height - Line height.
|
|
13
|
+
* @cssprop --letter-spacing - Letter spacing.
|
|
14
|
+
*/
|
|
15
|
+
export declare class AiText extends LitElement {
|
|
16
|
+
/** Size preset. */
|
|
17
|
+
size: "caption" | "meta" | "ui" | "body" | "title" | "display";
|
|
18
|
+
/** Font weight preset. */
|
|
19
|
+
weight: "normal" | "medium" | "semibold" | "bold";
|
|
20
|
+
/** Semantic color tone. */
|
|
21
|
+
tone: "default" | "muted" | "accent" | "success" | "warning" | "error";
|
|
22
|
+
/** Whether to use monospace font. */
|
|
23
|
+
mono: boolean;
|
|
24
|
+
/** Whether to truncate with ellipsis. */
|
|
25
|
+
truncate: boolean;
|
|
26
|
+
/** Whether to use inline display. */
|
|
27
|
+
inline: boolean;
|
|
28
|
+
static styles: import("lit").CSSResult;
|
|
29
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
30
|
+
protected updated(): void;
|
|
31
|
+
private getToneColor;
|
|
32
|
+
}
|
|
33
|
+
declare global {
|
|
34
|
+
interface HTMLElementTagNameMap {
|
|
35
|
+
"ai-text": AiText;
|
|
36
|
+
}
|
|
37
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@cianfrani/ai-ui",
|
|
3
|
+
"version": "0.1.0-alpha.0",
|
|
4
|
+
"description": "AI conversation web components (ai-message, ai-tool-call, ai-conversation, …) built with Lit.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"ai",
|
|
7
|
+
"conversation",
|
|
8
|
+
"lit",
|
|
9
|
+
"transcript",
|
|
10
|
+
"web-components"
|
|
11
|
+
],
|
|
12
|
+
"homepage": "https://github.com/markacianfrani/ai-ui#readme",
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/markacianfrani/ai-ui/issues"
|
|
15
|
+
},
|
|
16
|
+
"license": "MIT",
|
|
17
|
+
"author": "Mark Cianfrani",
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "git+https://github.com/markacianfrani/ai-ui.git"
|
|
21
|
+
},
|
|
22
|
+
"files": [
|
|
23
|
+
"dist",
|
|
24
|
+
"src",
|
|
25
|
+
"!src/stories",
|
|
26
|
+
"!src/**/*.stories.ts",
|
|
27
|
+
"!src/**/*.test.ts"
|
|
28
|
+
],
|
|
29
|
+
"type": "module",
|
|
30
|
+
"sideEffects": true,
|
|
31
|
+
"main": "./dist/ai-ui.js",
|
|
32
|
+
"types": "./dist/types/index.d.ts",
|
|
33
|
+
"exports": {
|
|
34
|
+
".": {
|
|
35
|
+
"types": "./dist/types/index.d.ts",
|
|
36
|
+
"default": "./dist/ai-ui.js"
|
|
37
|
+
},
|
|
38
|
+
"./source": {
|
|
39
|
+
"types": "./src/index.ts",
|
|
40
|
+
"default": "./src/index.ts"
|
|
41
|
+
},
|
|
42
|
+
"./custom-elements.json": "./src/custom-elements.json",
|
|
43
|
+
"./package.json": "./package.json"
|
|
44
|
+
},
|
|
45
|
+
"publishConfig": {
|
|
46
|
+
"access": "public"
|
|
47
|
+
},
|
|
48
|
+
"scripts": {
|
|
49
|
+
"build": "bun build src/index.ts --outfile=dist/ai-ui.js --target=browser --external=lit --external='lit/*' && tsc -p tsconfig.json",
|
|
50
|
+
"analyze": "cem analyze",
|
|
51
|
+
"test": "bun test src/",
|
|
52
|
+
"changeset": "changeset",
|
|
53
|
+
"version": "changeset version",
|
|
54
|
+
"release": "changeset publish"
|
|
55
|
+
},
|
|
56
|
+
"dependencies": {},
|
|
57
|
+
"devDependencies": {
|
|
58
|
+
"@changesets/cli": "^2.27.0",
|
|
59
|
+
"@custom-elements-manifest/analyzer": "^0.11.0",
|
|
60
|
+
"@types/bun": "latest",
|
|
61
|
+
"typescript": "^5"
|
|
62
|
+
},
|
|
63
|
+
"peerDependencies": {
|
|
64
|
+
"lit": "^3.0.0"
|
|
65
|
+
},
|
|
66
|
+
"customElements": "src/custom-elements.json"
|
|
67
|
+
}
|