@lattice-php/lattice 0.50.0 → 0.52.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/index.d.ts +0 -4
- package/dist/index.js +1 -3
- package/dist/registry.d.ts +3 -3
- package/dist/registry.js +1 -2
- package/dist/registry.js.map +1 -1
- package/dist/runtime.d.ts +2 -0
- package/dist/runtime.js +3 -3
- package/dist/types/generated.d.ts +3 -42
- package/dist-standalone/chunks/{chart-view-7uSaRy0z.js → chart-view-R1KaYiz7.js} +6 -6
- package/dist-standalone/chunks/{date-picker-field-BhEHDCJ1.js → date-picker-field-DMXrmpRX.js} +1 -1
- package/dist-standalone/chunks/{field-HgRGTmPZ.js → field-CWEzgjj4.js} +1 -1
- package/dist-standalone/chunks/{rich-editor-field-D76kQ6Fe.js → rich-editor-field-Byr29WU6.js} +2 -2
- package/dist-standalone/chunks/{runtime-BxB5Ladg.js → runtime-C4ZndQk5.js} +8 -9
- package/dist-standalone/chunks/{subscriptions-Cr5l3mYJ.js → subscriptions-CEmSNfBN.js} +1 -1
- package/dist-standalone/lattice.js +1 -1
- package/dist-standalone/manifest.json +1 -1
- package/dist-standalone/runtime.js +1 -1
- package/package.json +6 -10
- package/dist/chat/components/chat-box.d.ts +0 -3
- package/dist/chat/components/chat-box.js +0 -72
- package/dist/chat/components/chat-box.js.map +0 -1
- package/dist/chat/components/message-list.d.ts +0 -5
- package/dist/chat/components/message-list.js +0 -22
- package/dist/chat/components/message-list.js.map +0 -1
- package/dist/chat/components/message.d.ts +0 -5
- package/dist/chat/components/message.js +0 -20
- package/dist/chat/components/message.js.map +0 -1
- package/dist/chat/components/prompt-input.d.ts +0 -8
- package/dist/chat/components/prompt-input.js +0 -49
- package/dist/chat/components/prompt-input.js.map +0 -1
- package/dist/chat/hooks/use-chat.d.ts +0 -15
- package/dist/chat/hooks/use-chat.js +0 -162
- package/dist/chat/hooks/use-chat.js.map +0 -1
- package/dist/chat/index.d.ts +0 -4
- package/dist/chat/index.js +0 -3
- package/dist/chat/lib/transport.d.ts +0 -4
- package/dist/chat/lib/transport.js +0 -66
- package/dist/chat/lib/transport.js.map +0 -1
- package/dist/chat/parts/text.d.ts +0 -3
- package/dist/chat/parts/text.js +0 -12
- package/dist/chat/parts/text.js.map +0 -1
- package/dist/chat/parts/tool-call.d.ts +0 -3
- package/dist/chat/parts/tool-call.js +0 -20
- package/dist/chat/parts/tool-call.js.map +0 -1
- package/dist/chat/plugin.d.ts +0 -2
- package/dist/chat/plugin.js +0 -17
- package/dist/chat/plugin.js.map +0 -1
- package/dist/chat/types.d.ts +0 -31
- package/dist/chat/types.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"text.js","names":[],"sources":["../../../resources/js/chat/parts/text.tsx"],"sourcesContent":["import type { RendererComponent } from \"@lattice-php/core/types\";\n\nexport const TextPart: RendererComponent<\"chat.part.text\"> = ({ node }) => {\n return <div className=\"whitespace-pre-wrap text-sm\">{node.props.text}</div>;\n};\n\nexport default TextPart;\n"],"mappings":";;AAEA,IAAa,YAAiD,EAAE,WAAW;CACzE,OAAO,oBAAC,OAAD;EAAK,WAAU;EAA+B,UAAA,KAAK,MAAM;CAAU,CAAA;AAC5E"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { testIdentity } from "@lattice-php/core/test-id";
|
|
3
|
-
//#region resources/js/chat/parts/tool-call.tsx
|
|
4
|
-
var ToolCallPart = ({ node }) => {
|
|
5
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
6
|
-
className: "mt-1 inline-flex items-center gap-1 rounded-lt-sm bg-lt-muted px-2 py-0.5 font-mono text-xs text-lt-muted-fg",
|
|
7
|
-
"data-test": testIdentity("chat-tool-call"),
|
|
8
|
-
children: [
|
|
9
|
-
"🔧 ",
|
|
10
|
-
node.props.name,
|
|
11
|
-
"(",
|
|
12
|
-
JSON.stringify(node.props.args),
|
|
13
|
-
")"
|
|
14
|
-
]
|
|
15
|
-
});
|
|
16
|
-
};
|
|
17
|
-
//#endregion
|
|
18
|
-
export { ToolCallPart, ToolCallPart as default };
|
|
19
|
-
|
|
20
|
-
//# sourceMappingURL=tool-call.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tool-call.js","names":[],"sources":["../../../resources/js/chat/parts/tool-call.tsx"],"sourcesContent":["import { testIdentity } from \"@lattice-php/core/test-id\";\nimport type { RendererComponent } from \"@lattice-php/core/types\";\n\nexport const ToolCallPart: RendererComponent<\"chat.part.tool-call\"> = ({ node }) => {\n return (\n <div\n className=\"mt-1 inline-flex items-center gap-1 rounded-lt-sm bg-lt-muted px-2 py-0.5 font-mono text-xs text-lt-muted-fg\"\n data-test={testIdentity(\"chat-tool-call\")}\n >\n 🔧 {node.props.name}({JSON.stringify(node.props.args)})\n </div>\n );\n};\n\nexport default ToolCallPart;\n"],"mappings":";;;AAGA,IAAa,gBAA0D,EAAE,WAAW;CAClF,OACE,qBAAC,OAAD;EACE,WAAU;EACV,aAAW,aAAa,gBAAgB;EAF1C,UAAA;GAGC;GACK,KAAK,MAAM;GAAK;GAAE,KAAK,UAAU,KAAK,MAAM,IAAI;GAAE;EACnD;;AAET"}
|
package/dist/chat/plugin.d.ts
DELETED
package/dist/chat/plugin.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { ChatBox } from "./components/chat-box.js";
|
|
2
|
-
import { TextPart } from "./parts/text.js";
|
|
3
|
-
import { ToolCallPart } from "./parts/tool-call.js";
|
|
4
|
-
import { eagerComponent } from "@lattice-php/core/registry";
|
|
5
|
-
//#region resources/js/chat/plugin.ts
|
|
6
|
-
var chatComponents = {
|
|
7
|
-
name: "lattice/chat",
|
|
8
|
-
components: {
|
|
9
|
-
"chat.box": eagerComponent(ChatBox),
|
|
10
|
-
"chat.part.text": eagerComponent(TextPart),
|
|
11
|
-
"chat.part.tool-call": eagerComponent(ToolCallPart)
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
|
-
//#endregion
|
|
15
|
-
export { chatComponents };
|
|
16
|
-
|
|
17
|
-
//# sourceMappingURL=plugin.js.map
|
package/dist/chat/plugin.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.js","names":[],"sources":["../../resources/js/chat/plugin.ts"],"sourcesContent":["import { eagerComponent, type ComponentRegistryFor, type Plugin } from \"@lattice-php/core/registry\";\nimport ChatBoxComponent from \"./components/chat-box\";\nimport { TextPart } from \"./parts/text\";\nimport type { ChatNodeType } from \"@lattice-php/lattice/types/generated\";\nimport { ToolCallPart } from \"./parts/tool-call\";\n\nexport const chatComponents: Plugin = {\n name: \"lattice/chat\",\n components: {\n \"chat.box\": eagerComponent(ChatBoxComponent),\n \"chat.part.text\": eagerComponent(TextPart),\n \"chat.part.tool-call\": eagerComponent(ToolCallPart),\n } satisfies ComponentRegistryFor<ChatNodeType>,\n};\n"],"mappings":";;;;;AAMA,IAAa,iBAAyB;CACpC,MAAM;CACN,YAAY;EACV,YAAY,eAAe,OAAgB;EAC3C,kBAAkB,eAAe,QAAQ;EACzC,uBAAuB,eAAe,YAAY;CACpD;AACF"}
|
package/dist/chat/types.d.ts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { Node } from '@lattice-php/core/types';
|
|
2
|
-
import { ChatMessage, ChatRole } from '../types/generated.js';
|
|
3
|
-
export type { ChatMessage, ChatRole };
|
|
4
|
-
export type ChatStatus = "idle" | "submitted" | "streaming" | "error";
|
|
5
|
-
export type ChatFrame = {
|
|
6
|
-
type: "text";
|
|
7
|
-
value: string;
|
|
8
|
-
} | {
|
|
9
|
-
type: "part";
|
|
10
|
-
part: Node;
|
|
11
|
-
} | {
|
|
12
|
-
type: "done";
|
|
13
|
-
} | {
|
|
14
|
-
type: "error";
|
|
15
|
-
message?: string;
|
|
16
|
-
};
|
|
17
|
-
export type ChatTransportRequest = {
|
|
18
|
-
url: string;
|
|
19
|
-
body: unknown;
|
|
20
|
-
signal: AbortSignal;
|
|
21
|
-
};
|
|
22
|
-
export type ChatTransport = (request: ChatTransportRequest) => AsyncGenerator<ChatFrame>;
|
|
23
|
-
export type UseChatReturn = {
|
|
24
|
-
messages: ChatMessage[];
|
|
25
|
-
status: ChatStatus;
|
|
26
|
-
error: string | null;
|
|
27
|
-
sendMessage: (text: string) => void;
|
|
28
|
-
setMessages: (messages: ChatMessage[]) => void;
|
|
29
|
-
stop: () => void;
|
|
30
|
-
regenerate: () => void;
|
|
31
|
-
};
|
package/dist/chat/types.js
DELETED
|
File without changes
|