@flamingo-stack/openframe-frontend-core 0.0.351 → 0.0.352
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/{chunk-DJZ64AF6.js → chunk-3QWEET5C.js} +2 -2
- package/dist/{chunk-VZ7TICMR.cjs → chunk-3SYTPXCP.cjs} +37 -37
- package/dist/{chunk-VZ7TICMR.cjs.map → chunk-3SYTPXCP.cjs.map} +1 -1
- package/dist/{chunk-63ISTNQW.cjs → chunk-42PSJKMY.cjs} +25 -25
- package/dist/{chunk-63ISTNQW.cjs.map → chunk-42PSJKMY.cjs.map} +1 -1
- package/dist/{chunk-YBL3JURC.js → chunk-66D3JL6J.js} +4 -4
- package/dist/{chunk-VY6AAUCK.js → chunk-7CTSKYAV.js} +2 -2
- package/dist/{chunk-QGBJKB6V.cjs → chunk-DY4Y7QQB.cjs} +31 -31
- package/dist/{chunk-QGBJKB6V.cjs.map → chunk-DY4Y7QQB.cjs.map} +1 -1
- package/dist/{chunk-46Z3O6SN.cjs → chunk-ED72ZQV7.cjs} +5 -5
- package/dist/{chunk-46Z3O6SN.cjs.map → chunk-ED72ZQV7.cjs.map} +1 -1
- package/dist/{chunk-MLW25MGY.js → chunk-FQ4VGHPO.js} +2 -2
- package/dist/{chunk-GJZL72ON.cjs → chunk-FU5KF6MA.cjs} +7 -7
- package/dist/{chunk-GJZL72ON.cjs.map → chunk-FU5KF6MA.cjs.map} +1 -1
- package/dist/{chunk-WB2EWYSF.js → chunk-GGCOLMNS.js} +2 -2
- package/dist/{chunk-NEIOYJIE.cjs → chunk-HPVOWKIO.cjs} +15 -15
- package/dist/{chunk-NEIOYJIE.cjs.map → chunk-HPVOWKIO.cjs.map} +1 -1
- package/dist/{chunk-A6YFD2SK.js → chunk-HSZJGPVA.js} +173 -116
- package/dist/chunk-HSZJGPVA.js.map +1 -0
- package/dist/{chunk-NIRMBPFP.cjs → chunk-IHXJKIFM.cjs} +12 -12
- package/dist/{chunk-NIRMBPFP.cjs.map → chunk-IHXJKIFM.cjs.map} +1 -1
- package/dist/{chunk-5F45BY24.js → chunk-IM5HXLFT.js} +2 -2
- package/dist/{chunk-JBWB3U3P.js → chunk-JQGLBAGS.js} +2 -2
- package/dist/{chunk-BMQ5CBFD.cjs → chunk-K2NJ5VHQ.cjs} +62 -62
- package/dist/{chunk-BMQ5CBFD.cjs.map → chunk-K2NJ5VHQ.cjs.map} +1 -1
- package/dist/{chunk-Q3VK7WI2.js → chunk-M247JWGY.js} +4 -4
- package/dist/{chunk-4WVVMKMC.js → chunk-N7BREY67.js} +4 -4
- package/dist/{chunk-YIFJJCFB.js → chunk-ONMA32BY.js} +2 -2
- package/dist/{chunk-HMUIRZ46.cjs → chunk-QP7TLRLH.cjs} +172 -115
- package/dist/chunk-QP7TLRLH.cjs.map +1 -0
- package/dist/{chunk-UQFTSFIF.cjs → chunk-RTKRXPPG.cjs} +26 -26
- package/dist/{chunk-UQFTSFIF.cjs.map → chunk-RTKRXPPG.cjs.map} +1 -1
- package/dist/{chunk-TH3HPNMO.cjs → chunk-T2ARJIH6.cjs} +56 -56
- package/dist/{chunk-TH3HPNMO.cjs.map → chunk-T2ARJIH6.cjs.map} +1 -1
- package/dist/{chunk-EKU6D26E.js → chunk-TM455OW5.js} +4 -4
- package/dist/{chunk-XZVVLO4V.cjs → chunk-ZRLPXSZC.cjs} +9 -9
- package/dist/{chunk-XZVVLO4V.cjs.map → chunk-ZRLPXSZC.cjs.map} +1 -1
- package/dist/components/case-studies/index.cjs +8 -8
- package/dist/components/case-studies/index.js +2 -2
- package/dist/components/chat/approval-batch-message.d.ts +7 -1
- package/dist/components/chat/approval-batch-message.d.ts.map +1 -1
- package/dist/components/chat/approval-request-message.d.ts.map +1 -1
- package/dist/components/chat/chat-message-enhanced.d.ts.map +1 -1
- package/dist/components/chat/index.cjs +2 -2
- package/dist/components/chat/index.js +1 -1
- package/dist/components/chat/tool-call-blocks.d.ts.map +1 -1
- package/dist/components/chat/tool-execution-display.d.ts.map +1 -1
- package/dist/components/chat/types/component.types.d.ts +6 -0
- package/dist/components/chat/types/component.types.d.ts.map +1 -1
- package/dist/components/contact/index.cjs +3 -3
- package/dist/components/contact/index.js +2 -2
- package/dist/components/docs/index.cjs +5 -5
- package/dist/components/docs/index.js +4 -4
- package/dist/components/embeds/index.cjs +3 -3
- package/dist/components/embeds/index.js +2 -2
- package/dist/components/faq/index.cjs +3 -3
- package/dist/components/faq/index.js +2 -2
- package/dist/components/features/index.cjs +2 -2
- package/dist/components/features/index.js +1 -1
- package/dist/components/help-center-pages/index.cjs +20 -20
- package/dist/components/help-center-pages/index.js +11 -11
- package/dist/components/index.cjs +120 -120
- package/dist/components/index.js +9 -9
- package/dist/components/navigation/index.cjs +2 -2
- package/dist/components/navigation/index.js +1 -1
- package/dist/components/onboarding-guides/index.cjs +5 -5
- package/dist/components/onboarding-guides/index.js +4 -4
- package/dist/components/related-content/index.cjs +3 -3
- package/dist/components/related-content/index.js +2 -2
- package/dist/components/tickets/index.cjs +5 -5
- package/dist/components/tickets/index.js +4 -4
- package/dist/components/ui/index.cjs +2 -2
- package/dist/components/ui/index.js +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/components/chat/approval-batch-message.tsx +82 -27
- package/src/components/chat/approval-request-message.tsx +27 -19
- package/src/components/chat/chat-message-enhanced.tsx +3 -0
- package/src/components/chat/tool-call-blocks.tsx +17 -6
- package/src/components/chat/tool-execution-display.tsx +23 -8
- package/src/components/chat/types/component.types.ts +6 -0
- package/src/stories/ApprovalBatchMessage.stories.tsx +169 -0
- package/src/stories/ApprovalBatchMessageClient.stories.tsx +172 -0
- package/src/stories/ApprovalRequestMessage.stories.tsx +95 -0
- package/src/stories/ToolExecutionDisplay.stories.tsx +1 -1
- package/src/stories/ToolExecutionDisplayClient.stories.tsx +64 -0
- package/dist/chunk-A6YFD2SK.js.map +0 -1
- package/dist/chunk-HMUIRZ46.cjs.map +0 -1
- /package/dist/{chunk-DJZ64AF6.js.map → chunk-3QWEET5C.js.map} +0 -0
- /package/dist/{chunk-YBL3JURC.js.map → chunk-66D3JL6J.js.map} +0 -0
- /package/dist/{chunk-VY6AAUCK.js.map → chunk-7CTSKYAV.js.map} +0 -0
- /package/dist/{chunk-MLW25MGY.js.map → chunk-FQ4VGHPO.js.map} +0 -0
- /package/dist/{chunk-WB2EWYSF.js.map → chunk-GGCOLMNS.js.map} +0 -0
- /package/dist/{chunk-5F45BY24.js.map → chunk-IM5HXLFT.js.map} +0 -0
- /package/dist/{chunk-JBWB3U3P.js.map → chunk-JQGLBAGS.js.map} +0 -0
- /package/dist/{chunk-Q3VK7WI2.js.map → chunk-M247JWGY.js.map} +0 -0
- /package/dist/{chunk-4WVVMKMC.js.map → chunk-N7BREY67.js.map} +0 -0
- /package/dist/{chunk-YIFJJCFB.js.map → chunk-ONMA32BY.js.map} +0 -0
- /package/dist/{chunk-EKU6D26E.js.map → chunk-TM455OW5.js.map} +0 -0
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/nextjs-vite";
|
|
2
|
+
import type React from "react";
|
|
3
|
+
|
|
4
|
+
import { ApprovalRequestMessage } from "../components/chat/approval-request-message";
|
|
5
|
+
import type { ApprovalRequestData } from "../components/chat/types";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Single-command approval card (the legacy, non-batch variant of the Figma
|
|
9
|
+
* "Command Block"). Renders a command bar, an optional structured field list
|
|
10
|
+
* or explanation, and an Approve/Reject footer that flips to an
|
|
11
|
+
* Approved/Rejected status tag once resolved.
|
|
12
|
+
*
|
|
13
|
+
* Newer surfaces use `ApprovalBatchMessage` (see the ApprovalBatchMessage
|
|
14
|
+
* story) which additionally tracks per-tool execution + results.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
const LONG_COMMAND = `Get-CimInstance Win32_Process |
|
|
18
|
+
Select-Object ProcessId, Name, Path, CommandLine |
|
|
19
|
+
Where-Object { $_.Path -like 'C:\\Users\\Public\\*' }`;
|
|
20
|
+
|
|
21
|
+
const baseData: ApprovalRequestData = {
|
|
22
|
+
command: LONG_COMMAND,
|
|
23
|
+
requestId: "req-1",
|
|
24
|
+
approvalType: "ADMIN",
|
|
25
|
+
fields: [
|
|
26
|
+
{ label: "Tool", value: "Tactical RMM" },
|
|
27
|
+
{ label: "RunAsUser", value: "False" },
|
|
28
|
+
{ label: "timeoutSeconds", value: "60" },
|
|
29
|
+
],
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
const constrainedDecorator =
|
|
33
|
+
(width?: number) => (Story: React.ComponentType) => (
|
|
34
|
+
<div style={{ maxWidth: width ?? 400, background: "var(--color-bg)" }}>
|
|
35
|
+
<Story />
|
|
36
|
+
</div>
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
const meta = {
|
|
40
|
+
title: "Chat/Admin/ApprovalRequestMessage",
|
|
41
|
+
component: ApprovalRequestMessage,
|
|
42
|
+
tags: ["autodocs"],
|
|
43
|
+
parameters: {
|
|
44
|
+
docs: {
|
|
45
|
+
description: {
|
|
46
|
+
component:
|
|
47
|
+
"Single-command approval card — the legacy variant of the Figma Command Block. Prefer ApprovalBatchMessage for new work.",
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
decorators: [constrainedDecorator()],
|
|
52
|
+
} satisfies Meta<typeof ApprovalRequestMessage>;
|
|
53
|
+
|
|
54
|
+
export default meta;
|
|
55
|
+
type Story = StoryObj<typeof meta>;
|
|
56
|
+
|
|
57
|
+
/** Pending — Approve / Reject buttons shown. */
|
|
58
|
+
export const Pending: Story = {
|
|
59
|
+
args: {
|
|
60
|
+
data: baseData,
|
|
61
|
+
status: "pending",
|
|
62
|
+
onApprove: () => {},
|
|
63
|
+
onReject: () => {},
|
|
64
|
+
},
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
/** Approved — green status tag. */
|
|
68
|
+
export const Approved: Story = {
|
|
69
|
+
args: { data: baseData, status: "approved" },
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
/** Rejected — red status tag. */
|
|
73
|
+
export const Rejected: Story = {
|
|
74
|
+
args: { data: baseData, status: "rejected" },
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
/** Cancelled — grey status tag. */
|
|
78
|
+
export const Cancelled: Story = {
|
|
79
|
+
args: { data: baseData, status: "cancelled" },
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
/** Explanation prose instead of a structured field list. */
|
|
83
|
+
export const WithExplanation: Story = {
|
|
84
|
+
args: {
|
|
85
|
+
data: {
|
|
86
|
+
command: LONG_COMMAND,
|
|
87
|
+
requestId: "req-2",
|
|
88
|
+
explanation:
|
|
89
|
+
"This runs a read-only diagnostic to inspect processes launched from the public folder. It does not modify the endpoint.",
|
|
90
|
+
},
|
|
91
|
+
status: "pending",
|
|
92
|
+
onApprove: () => {},
|
|
93
|
+
onReject: () => {},
|
|
94
|
+
},
|
|
95
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/nextjs-vite";
|
|
2
|
+
import type React from "react";
|
|
3
|
+
|
|
4
|
+
import { ToolExecutionDisplay } from "../components/chat/tool-execution-display";
|
|
5
|
+
import type { ToolExecutionData } from "../components/chat/types";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* CLIENT (Fae) variant of the standalone tool-execution card. Same component
|
|
9
|
+
* and props as the Admin card, gated by `assistantType="fae"` — the only
|
|
10
|
+
* visual difference is that the tool icon next to the command is hidden.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
const executingMessage: ToolExecutionData = {
|
|
14
|
+
type: "EXECUTING_TOOL",
|
|
15
|
+
integratedToolType: "TACTICAL_RMM",
|
|
16
|
+
toolFunction: "run_script",
|
|
17
|
+
parameters: { RunAsUser: "False", timeoutSeconds: 60 },
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const executedSuccessMessage: ToolExecutionData = {
|
|
21
|
+
type: "EXECUTED_TOOL",
|
|
22
|
+
integratedToolType: "TACTICAL_RMM",
|
|
23
|
+
toolFunction: "run_script",
|
|
24
|
+
parameters: { RunAsUser: "False", timeoutSeconds: 60 },
|
|
25
|
+
result: `pid | name | path | cmdline
|
|
26
|
+
4821 | suspicious.exe | C:\\Users\\Public\\suspicious.exe | suspicious.exe --hidden --connect 185.220.101.45`,
|
|
27
|
+
success: true,
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
const constrainedDecorator =
|
|
31
|
+
(width?: number) => (Story: React.ComponentType) => (
|
|
32
|
+
<div style={{ maxWidth: width ?? 400, background: "var(--color-bg)" }}>
|
|
33
|
+
<Story />
|
|
34
|
+
</div>
|
|
35
|
+
);
|
|
36
|
+
|
|
37
|
+
const meta = {
|
|
38
|
+
title: "Chat/Client/ToolExecutionDisplay",
|
|
39
|
+
component: ToolExecutionDisplay,
|
|
40
|
+
tags: ["autodocs"],
|
|
41
|
+
args: { assistantType: "fae" },
|
|
42
|
+
parameters: {
|
|
43
|
+
docs: {
|
|
44
|
+
description: {
|
|
45
|
+
component:
|
|
46
|
+
"CLIENT (Fae) tool-execution card — no tool icon. Same component/props as Admin, gated by assistantType='fae'.",
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
decorators: [constrainedDecorator()],
|
|
51
|
+
} satisfies Meta<typeof ToolExecutionDisplay>;
|
|
52
|
+
|
|
53
|
+
export default meta;
|
|
54
|
+
type Story = StoryObj<typeof meta>;
|
|
55
|
+
|
|
56
|
+
/** Collapsed, executing — spinner + 2-line preview, no tool icon. */
|
|
57
|
+
export const CollapsedExecuting: Story = {
|
|
58
|
+
args: { message: executingMessage },
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
/** Collapsed, success — green check, no tool icon. */
|
|
62
|
+
export const CollapsedSuccess: Story = {
|
|
63
|
+
args: { message: executedSuccessMessage },
|
|
64
|
+
};
|