@flamingo-stack/openframe-frontend-core 0.0.813 → 0.0.814
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/build/export-map.json +1 -1
- package/dist/{chunk-GTOT4ZQV.cjs → chunk-2H7XPKKT.cjs} +2 -2
- package/dist/{chunk-5RBL7A2Y.cjs → chunk-7ERD34HQ.cjs} +539 -291
- package/dist/{chunk-JFA3VHXC.cjs → chunk-AYMKG55T.cjs} +19 -19
- package/dist/{chunk-7BJ22OH2.cjs → chunk-CVPHODOE.cjs} +32 -32
- package/dist/{chunk-PXR27MXW.cjs → chunk-D23VVC3K.cjs} +11 -11
- package/dist/{chunk-TOBROYSJ.cjs → chunk-E5VF3IXO.cjs} +4 -4
- package/dist/{chunk-EJQRX6S5.cjs → chunk-G2B6EA4J.cjs} +39 -39
- package/dist/{chunk-XWCZSEW7.cjs → chunk-G5CCYMCU.cjs} +3 -3
- package/dist/{chunk-MUH7X7ZA.cjs → chunk-IBYT5I7K.cjs} +3 -3
- package/dist/{chunk-MBU45QUB.cjs → chunk-IDEOLXY6.cjs} +109 -142
- package/dist/{chunk-FTGXZHLO.cjs → chunk-ILV243HM.cjs} +7 -7
- package/dist/{chunk-5V3CNLCB.cjs → chunk-KINBPFAC.cjs} +18 -18
- package/dist/{chunk-WKODIG3L.cjs → chunk-KNGULKOU.cjs} +10 -10
- package/dist/{chunk-2WD7XGWA.cjs → chunk-LUR2ED43.cjs} +4 -4
- package/dist/{chunk-GNGXHIBC.cjs → chunk-M6VLEXN3.cjs} +48 -48
- package/dist/{chunk-G2AN67DP.cjs → chunk-UTRRECPV.cjs} +53 -53
- package/dist/{chunk-5M5JVVSL.cjs → chunk-WJPEDREU.cjs} +6 -6
- package/dist/{chunk-OGHG6REG.cjs → chunk-ZNZ6453J.cjs} +9 -9
- package/dist/{cloud-tenants-ODZVCP5X.cjs → cloud-tenants-JSH6AQMZ.cjs} +4 -4
- package/dist/components/case-studies/index.cjs +16 -16
- package/dist/components/chat/chat-message-enhanced.d.ts.map +1 -1
- package/dist/components/chat/chat-message-enhanced.js +8 -1
- package/dist/components/chat/embeddable-chat.d.ts.map +1 -1
- package/dist/components/chat/embeddable-chat.js +34 -2
- package/dist/components/chat/entity-cards/chat-card-disclosure.d.ts +93 -0
- package/dist/components/chat/entity-cards/chat-card-disclosure.d.ts.map +1 -0
- package/dist/components/chat/entity-cards/chat-card-disclosure.js +126 -0
- package/dist/components/chat/entity-cards/dispatch.d.ts +5 -0
- package/dist/components/chat/entity-cards/dispatch.d.ts.map +1 -1
- package/dist/components/chat/entity-cards/dispatch.js +82 -55
- package/dist/components/chat/entity-cards/index.d.ts +1 -0
- package/dist/components/chat/entity-cards/index.d.ts.map +1 -1
- package/dist/components/chat/entity-cards/index.js +14 -0
- package/dist/components/chat/index.cjs +19 -3
- package/dist/components/chat/index.d.ts +1 -0
- package/dist/components/chat/index.d.ts.map +1 -1
- package/dist/components/chat/index.js +3 -0
- package/dist/components/chat/inline-app-link-chip.d.ts +35 -0
- package/dist/components/chat/inline-app-link-chip.d.ts.map +1 -0
- package/dist/components/chat/inline-app-link-chip.js +37 -0
- package/dist/components/chat/source-action-button.d.ts +15 -1
- package/dist/components/chat/source-action-button.d.ts.map +1 -1
- package/dist/components/chat/source-action-button.js +40 -2
- package/dist/components/contact/index.cjs +5 -5
- package/dist/components/docs/index.cjs +8 -8
- package/dist/components/embeds/index.cjs +5 -5
- package/dist/components/faq/index.cjs +6 -6
- package/dist/components/features/index.cjs +4 -4
- package/dist/components/help-center-pages/index.cjs +61 -61
- package/dist/components/index.cjs +56 -40
- package/dist/components/meeting-scheduler/index.cjs +29 -29
- package/dist/components/navigation/index.cjs +7 -7
- package/dist/components/onboarding-guides/index.cjs +6 -6
- package/dist/components/product-demo/index.cjs +13 -13
- package/dist/components/tickets/index.cjs +9 -9
- package/dist/components/ui/index.cjs +22 -6
- package/dist/{devices-GWBR7MJD.cjs → devices-OCEOO6OW.cjs} +5 -5
- package/dist/{embeddable-chat-4RLUXHDH.cjs → embeddable-chat-YRKMPFDY.cjs} +95 -62
- package/dist/index.cjs +26 -10
- package/dist/{knowledge-ZNRITHW5.cjs → knowledge-3GEE4LPY.cjs} +5 -5
- package/dist/{logs-QN5H5JT6.cjs → logs-7GGUZSDB.cjs} +12 -12
- package/dist/{policies-SCUYEYGJ.cjs → policies-S74WTNL4.cjs} +8 -8
- package/dist/{scripts-BP7UTAG5.cjs → scripts-G4QAT4NZ.cjs} +9 -9
- package/dist/{software-update-O4BQJCJ4.cjs → software-update-IYHJABLP.cjs} +7 -7
- package/package.json +1 -1
- package/src/components/chat/chat-message-enhanced.tsx +24 -1
- package/src/components/chat/embeddable-chat.tsx +61 -1
- package/src/components/chat/entity-cards/chat-card-disclosure.tsx +233 -0
- package/src/components/chat/entity-cards/dispatch.tsx +104 -63
- package/src/components/chat/entity-cards/index.ts +9 -0
- package/src/components/chat/index.ts +1 -0
- package/src/components/chat/inline-app-link-chip.tsx +79 -0
- package/src/components/chat/source-action-button.tsx +53 -2
|
@@ -20,7 +20,10 @@
|
|
|
20
20
|
|
|
21
21
|
import { MessageSquare, FileText } from 'lucide-react';
|
|
22
22
|
import type React from 'react';
|
|
23
|
+
import { cn } from '../../utils/cn';
|
|
23
24
|
import { Button } from '../ui/button';
|
|
25
|
+
import { TextHold } from '../ui/layout-hold';
|
|
26
|
+
import { SKELETON_SURFACE_CLASS } from '../ui/skeleton-surface';
|
|
24
27
|
import type { ChatRef } from './chat-ref.types';
|
|
25
28
|
|
|
26
29
|
export type SourceActionDensity = 'inline' | 'card' | 'list-row';
|
|
@@ -41,8 +44,14 @@ export interface SourceActionButtonProps {
|
|
|
41
44
|
* the icon only — the label is used for aria-label / title even when
|
|
42
45
|
* it doesn't render visibly. */
|
|
43
46
|
label?: string;
|
|
47
|
+
/** Draw the action's loading form: the same box, its icon and label as skeleton bars. */
|
|
48
|
+
loading?: boolean;
|
|
44
49
|
}
|
|
45
50
|
|
|
51
|
+
/** A chat card's footer action (Ask, Display, Watch video): one look for every action in that row. */
|
|
52
|
+
export const CARD_FOOTER_ACTION_CLASS =
|
|
53
|
+
'!h-auto !p-0 text-h6 font-normal text-ods-text-secondary opacity-60 hover:bg-transparent hover:opacity-100 hover:text-ods-text-primary';
|
|
54
|
+
|
|
46
55
|
// Per-density styling lives in one map so the three call sites share the
|
|
47
56
|
// SAME hover/opacity/transition rules. Adding a fourth density means
|
|
48
57
|
// adding one entry here, not touching the render path.
|
|
@@ -66,8 +75,7 @@ const DENSITY_STYLES: Record<
|
|
|
66
75
|
size: 'small',
|
|
67
76
|
showLabel: true,
|
|
68
77
|
iconSize: '!h-3 !w-3',
|
|
69
|
-
className:
|
|
70
|
-
'!h-auto !p-0 text-h6 font-normal text-ods-text-secondary opacity-60 hover:bg-transparent hover:opacity-100 hover:text-ods-text-primary',
|
|
78
|
+
className: CARD_FOOTER_ACTION_CLASS,
|
|
71
79
|
},
|
|
72
80
|
'list-row': {
|
|
73
81
|
size: 'small',
|
|
@@ -78,14 +86,57 @@ const DENSITY_STYLES: Record<
|
|
|
78
86
|
},
|
|
79
87
|
};
|
|
80
88
|
|
|
89
|
+
/**
|
|
90
|
+
* A footer action's loading form: the real button, inert and unread, with its icon and label drawn as skeleton
|
|
91
|
+
* bars, so the box is exactly the loaded action's (same paddings, same line height, same label width).
|
|
92
|
+
*/
|
|
93
|
+
export function FooterActionSkeleton({
|
|
94
|
+
label,
|
|
95
|
+
className,
|
|
96
|
+
showLabel = true,
|
|
97
|
+
size = 'small',
|
|
98
|
+
}: {
|
|
99
|
+
label: string;
|
|
100
|
+
className: string;
|
|
101
|
+
showLabel?: boolean;
|
|
102
|
+
size?: 'small' | 'icon';
|
|
103
|
+
}): React.ReactElement {
|
|
104
|
+
const icon = <span className={cn(SKELETON_SURFACE_CLASS, 'inline-block h-3 w-3 rounded-sm')} />;
|
|
105
|
+
return (
|
|
106
|
+
<span aria-hidden inert className="contents">
|
|
107
|
+
<Button
|
|
108
|
+
variant="transparent"
|
|
109
|
+
size={size}
|
|
110
|
+
tabIndex={-1}
|
|
111
|
+
leftIcon={showLabel ? icon : undefined}
|
|
112
|
+
className={cn(className, 'pointer-events-none')}
|
|
113
|
+
>
|
|
114
|
+
{showLabel ? <TextHold>{label}</TextHold> : icon}
|
|
115
|
+
</Button>
|
|
116
|
+
</span>
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
|
|
81
120
|
export function SourceActionButton({
|
|
82
121
|
chatRef,
|
|
83
122
|
onDiscuss,
|
|
84
123
|
density = 'inline',
|
|
85
124
|
className,
|
|
86
125
|
label = 'Ask',
|
|
126
|
+
loading,
|
|
87
127
|
}: SourceActionButtonProps): React.ReactElement | null {
|
|
88
128
|
if (!chatRef || !onDiscuss) return null;
|
|
129
|
+
if (loading) {
|
|
130
|
+
const s = DENSITY_STYLES[density];
|
|
131
|
+
return (
|
|
132
|
+
<FooterActionSkeleton
|
|
133
|
+
label={label}
|
|
134
|
+
size={s.size}
|
|
135
|
+
showLabel={s.showLabel}
|
|
136
|
+
className={`${s.className}${className ? ` ${className}` : ''}`}
|
|
137
|
+
/>
|
|
138
|
+
);
|
|
139
|
+
}
|
|
89
140
|
|
|
90
141
|
// Label-driven icon. "Display" reads as a verbatim-content action so a
|
|
91
142
|
// FileText icon reinforces "show me the body" semantics; the default
|