@flamingo-stack/openframe-frontend-core 0.0.467-snapshot.20260723125044 → 0.0.467
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-VYUEOKI6.js → chunk-25YYEVSE.js} +2 -2
- package/dist/{chunk-IUMPVRSH.js → chunk-3L44PPMF.js} +2 -2
- package/dist/{chunk-3TU6QURP.js → chunk-4DFPQKKJ.js} +2 -2
- package/dist/{chunk-J6CE6HZS.cjs → chunk-6DZ5QOUM.cjs} +11 -11
- package/dist/{chunk-J6CE6HZS.cjs.map → chunk-6DZ5QOUM.cjs.map} +1 -1
- package/dist/{chunk-L3BWGFHT.cjs → chunk-72NEN4G4.cjs} +15 -15
- package/dist/{chunk-L3BWGFHT.cjs.map → chunk-72NEN4G4.cjs.map} +1 -1
- package/dist/{chunk-EZESVVIM.js → chunk-ABU37QSG.js} +4 -4
- package/dist/{chunk-AEM7ADDG.js → chunk-BIDOIPIT.js} +2 -2
- package/dist/{chunk-P5SLNM3C.js → chunk-CZFPPNYV.js} +5104 -5230
- package/dist/chunk-CZFPPNYV.js.map +1 -0
- package/dist/{chunk-3I34MUEG.cjs → chunk-G2H4AKL3.cjs} +62 -62
- package/dist/{chunk-3I34MUEG.cjs.map → chunk-G2H4AKL3.cjs.map} +1 -1
- package/dist/{chunk-ELIY4AO2.cjs → chunk-G5D7NRH5.cjs} +26 -26
- package/dist/{chunk-ELIY4AO2.cjs.map → chunk-G5D7NRH5.cjs.map} +1 -1
- package/dist/{chunk-JW3UNHGW.js → chunk-GXXLJHQX.js} +2 -2
- package/dist/{chunk-CLW2S55N.js → chunk-ILZ66CS6.js} +4 -4
- package/dist/{chunk-QZJN5OHK.js → chunk-LOWJWKM5.js} +4 -4
- package/dist/{chunk-HTSWLPMU.js → chunk-NYOQNYSI.js} +2 -2
- package/dist/{chunk-HVLMAT4T.cjs → chunk-O7LQYYUA.cjs} +5 -5
- package/dist/{chunk-HVLMAT4T.cjs.map → chunk-O7LQYYUA.cjs.map} +1 -1
- package/dist/{chunk-TISXEAGH.cjs → chunk-QITN43HN.cjs} +7 -7
- package/dist/{chunk-TISXEAGH.cjs.map → chunk-QITN43HN.cjs.map} +1 -1
- package/dist/{chunk-O2QOC5FA.js → chunk-QJ7NIL6A.js} +4 -4
- package/dist/{chunk-MULVIGIN.cjs → chunk-SGDXS7VT.cjs} +59 -59
- package/dist/{chunk-MULVIGIN.cjs.map → chunk-SGDXS7VT.cjs.map} +1 -1
- package/dist/{chunk-QTGYQ2U7.js → chunk-TZSPLSDU.js} +2 -2
- package/dist/{chunk-VRJXY6TM.cjs → chunk-UWW4PQQS.cjs} +26 -26
- package/dist/{chunk-VRJXY6TM.cjs.map → chunk-UWW4PQQS.cjs.map} +1 -1
- package/dist/{chunk-2WZAR2MB.cjs → chunk-VERK32MO.cjs} +37 -37
- package/dist/{chunk-2WZAR2MB.cjs.map → chunk-VERK32MO.cjs.map} +1 -1
- package/dist/{chunk-3PLQWO4H.cjs → chunk-WWC75D3J.cjs} +732 -858
- package/dist/chunk-WWC75D3J.cjs.map +1 -0
- package/dist/{chunk-VHFH3BG6.cjs → chunk-YGW7T57C.cjs} +31 -31
- package/dist/{chunk-VHFH3BG6.cjs.map → chunk-YGW7T57C.cjs.map} +1 -1
- package/dist/{chunk-X77X3RKH.cjs → chunk-ZYPHZ3R3.cjs} +9 -9
- package/dist/{chunk-X77X3RKH.cjs.map → chunk-ZYPHZ3R3.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/chat-composer.d.ts +1 -8
- package/dist/components/chat/chat-composer.d.ts.map +1 -1
- package/dist/components/chat/embeddable-chat.d.ts +6 -14
- package/dist/components/chat/embeddable-chat.d.ts.map +1 -1
- package/dist/components/chat/index.cjs +2 -4
- package/dist/components/chat/index.cjs.map +1 -1
- package/dist/components/chat/index.d.ts +0 -1
- package/dist/components/chat/index.d.ts.map +1 -1
- package/dist/components/chat/index.js +1 -3
- 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 +130 -132
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.js +9 -11
- package/dist/components/index.js.map +1 -1
- 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 -4
- package/dist/components/ui/index.cjs.map +1 -1
- package/dist/components/ui/index.js +1 -3
- package/dist/index.cjs +2 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -3
- package/package.json +1 -1
- package/src/components/chat/chat-composer.tsx +5 -32
- package/src/components/chat/embeddable-chat.tsx +15 -17
- package/src/components/chat/index.ts +0 -1
- package/src/components/ui/tab-selector.tsx +8 -8
- package/dist/chunk-3PLQWO4H.cjs.map +0 -1
- package/dist/chunk-P5SLNM3C.js.map +0 -1
- package/dist/components/chat/chat-context-memory-bar.d.ts +0 -37
- package/dist/components/chat/chat-context-memory-bar.d.ts.map +0 -1
- package/src/components/chat/chat-context-memory-bar.tsx +0 -159
- /package/dist/{chunk-VYUEOKI6.js.map → chunk-25YYEVSE.js.map} +0 -0
- /package/dist/{chunk-IUMPVRSH.js.map → chunk-3L44PPMF.js.map} +0 -0
- /package/dist/{chunk-3TU6QURP.js.map → chunk-4DFPQKKJ.js.map} +0 -0
- /package/dist/{chunk-EZESVVIM.js.map → chunk-ABU37QSG.js.map} +0 -0
- /package/dist/{chunk-AEM7ADDG.js.map → chunk-BIDOIPIT.js.map} +0 -0
- /package/dist/{chunk-JW3UNHGW.js.map → chunk-GXXLJHQX.js.map} +0 -0
- /package/dist/{chunk-CLW2S55N.js.map → chunk-ILZ66CS6.js.map} +0 -0
- /package/dist/{chunk-QZJN5OHK.js.map → chunk-LOWJWKM5.js.map} +0 -0
- /package/dist/{chunk-HTSWLPMU.js.map → chunk-NYOQNYSI.js.map} +0 -0
- /package/dist/{chunk-O2QOC5FA.js.map → chunk-QJ7NIL6A.js.map} +0 -0
- /package/dist/{chunk-QTGYQ2U7.js.map → chunk-TZSPLSDU.js.map} +0 -0
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `<ChatContextMemoryBar>` — the composer's CONTEXT MEMORY strip
|
|
3
|
-
* (Figma node 271:38656).
|
|
4
|
-
*
|
|
5
|
-
* A one-line summary row pinned to the top of the composer card ("5 recently
|
|
6
|
-
* viewed items in context") with a `⋯` trigger that opens a dropdown listing
|
|
7
|
-
* every remembered entity, each removable via its `×`.
|
|
8
|
-
*
|
|
9
|
-
* This is the AMBIENT half of the composer's context UI — the entities the host
|
|
10
|
-
* accumulated from the user's navigation history and sends along with every
|
|
11
|
-
* message — as opposed to `<ChatContextChipStrip>`, which shows the items the
|
|
12
|
-
* user ASSIGNED to the message they're typing. Both sit above the input; memory
|
|
13
|
-
* on top (passive, always the same items), assigned chips closest to the
|
|
14
|
-
* textarea (active selection for this message).
|
|
15
|
-
*
|
|
16
|
-
* The lib owns only the chrome: items and removal are host-fed
|
|
17
|
-
* (`EmbeddableChat`'s `contextMemory` prop), and lead glyphs come from the
|
|
18
|
-
* picker's entity-type icon map via `resolveIcon`. Renders `null` when the host
|
|
19
|
-
* has nothing remembered, so it has no permanent footprint.
|
|
20
|
-
*/
|
|
21
|
-
import type * as React from 'react';
|
|
22
|
-
import type { ChatContextItem } from './types/context-item.types';
|
|
23
|
-
export interface ChatContextMemoryBarProps {
|
|
24
|
-
/** Remembered entities, most-recent-first. Empty → the bar renders nothing. */
|
|
25
|
-
items: ChatContextItem[];
|
|
26
|
-
/** Drop one entity from the host's memory (dropdown row `×`). When omitted the
|
|
27
|
-
* list is read-only. */
|
|
28
|
-
onRemove?: (item: ChatContextItem) => void;
|
|
29
|
-
/** Lead-glyph resolver — the composer passes its entity-type icon map, so the
|
|
30
|
-
* rows match the picker and the assigned chips. */
|
|
31
|
-
resolveIcon?: (item: ChatContextItem) => React.ReactNode;
|
|
32
|
-
/** External disable (e.g. while a message is streaming). */
|
|
33
|
-
disabled?: boolean;
|
|
34
|
-
className?: string;
|
|
35
|
-
}
|
|
36
|
-
export declare function ChatContextMemoryBar({ items, onRemove, resolveIcon, disabled, className, }: ChatContextMemoryBarProps): React.JSX.Element | null;
|
|
37
|
-
//# sourceMappingURL=chat-context-memory-bar.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"chat-context-memory-bar.d.ts","sourceRoot":"","sources":["../../../src/components/chat/chat-context-memory-bar.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAA;AAMnC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAIjE,MAAM,WAAW,yBAAyB;IACxC,+EAA+E;IAC/E,KAAK,EAAE,eAAe,EAAE,CAAA;IACxB;6BACyB;IACzB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,eAAe,KAAK,IAAI,CAAA;IAC1C;wDACoD;IACpD,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,eAAe,KAAK,KAAK,CAAC,SAAS,CAAA;IACxD,4DAA4D;IAC5D,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,oBAAoB,CAAC,EACnC,KAAK,EACL,QAAQ,EACR,WAAW,EACX,QAAgB,EAChB,SAAS,GACV,EAAE,yBAAyB,4BAyG3B"}
|
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* `<ChatContextMemoryBar>` — the composer's CONTEXT MEMORY strip
|
|
5
|
-
* (Figma node 271:38656).
|
|
6
|
-
*
|
|
7
|
-
* A one-line summary row pinned to the top of the composer card ("5 recently
|
|
8
|
-
* viewed items in context") with a `⋯` trigger that opens a dropdown listing
|
|
9
|
-
* every remembered entity, each removable via its `×`.
|
|
10
|
-
*
|
|
11
|
-
* This is the AMBIENT half of the composer's context UI — the entities the host
|
|
12
|
-
* accumulated from the user's navigation history and sends along with every
|
|
13
|
-
* message — as opposed to `<ChatContextChipStrip>`, which shows the items the
|
|
14
|
-
* user ASSIGNED to the message they're typing. Both sit above the input; memory
|
|
15
|
-
* on top (passive, always the same items), assigned chips closest to the
|
|
16
|
-
* textarea (active selection for this message).
|
|
17
|
-
*
|
|
18
|
-
* The lib owns only the chrome: items and removal are host-fed
|
|
19
|
-
* (`EmbeddableChat`'s `contextMemory` prop), and lead glyphs come from the
|
|
20
|
-
* picker's entity-type icon map via `resolveIcon`. Renders `null` when the host
|
|
21
|
-
* has nothing remembered, so it has no permanent footprint.
|
|
22
|
-
*/
|
|
23
|
-
|
|
24
|
-
import type * as React from 'react'
|
|
25
|
-
import { useEffect, useRef, useState } from 'react'
|
|
26
|
-
import { Ellipsis01Icon } from '../icons-v2-generated/interface/ellipsis-01-icon'
|
|
27
|
-
import { XmarkCircleIcon } from '../icons-v2-generated/signs-and-symbols/xmark-circle-icon'
|
|
28
|
-
import { cn } from '../../utils/cn'
|
|
29
|
-
import { CONTEXT_ICON_CLASS, CONTEXT_LABEL_CLASS, CONTEXT_ROW_CLASS } from './context-items-list'
|
|
30
|
-
import type { ChatContextItem } from './types/context-item.types'
|
|
31
|
-
|
|
32
|
-
const itemKey = (item: { type: string; id: string }) => `${item.type}:${item.id}`
|
|
33
|
-
|
|
34
|
-
export interface ChatContextMemoryBarProps {
|
|
35
|
-
/** Remembered entities, most-recent-first. Empty → the bar renders nothing. */
|
|
36
|
-
items: ChatContextItem[]
|
|
37
|
-
/** Drop one entity from the host's memory (dropdown row `×`). When omitted the
|
|
38
|
-
* list is read-only. */
|
|
39
|
-
onRemove?: (item: ChatContextItem) => void
|
|
40
|
-
/** Lead-glyph resolver — the composer passes its entity-type icon map, so the
|
|
41
|
-
* rows match the picker and the assigned chips. */
|
|
42
|
-
resolveIcon?: (item: ChatContextItem) => React.ReactNode
|
|
43
|
-
/** External disable (e.g. while a message is streaming). */
|
|
44
|
-
disabled?: boolean
|
|
45
|
-
className?: string
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export function ChatContextMemoryBar({
|
|
49
|
-
items,
|
|
50
|
-
onRemove,
|
|
51
|
-
resolveIcon,
|
|
52
|
-
disabled = false,
|
|
53
|
-
className,
|
|
54
|
-
}: ChatContextMemoryBarProps) {
|
|
55
|
-
const [open, setOpen] = useState(false)
|
|
56
|
-
const rootRef = useRef<HTMLDivElement>(null)
|
|
57
|
-
|
|
58
|
-
// Removing the last remembered entity unmounts the bar; close first so a
|
|
59
|
-
// stale popover can't outlive its trigger.
|
|
60
|
-
useEffect(() => {
|
|
61
|
-
if (items.length === 0) setOpen(false)
|
|
62
|
-
}, [items.length])
|
|
63
|
-
|
|
64
|
-
// Outside-press close. Registered only while open. The root wraps BOTH the
|
|
65
|
-
// trigger and the popover, so a press on the `⋯` (inside root) is ignored here
|
|
66
|
-
// and handled by the button's own toggle.
|
|
67
|
-
//
|
|
68
|
-
// CAPTURE phase (the `true` 3rd arg): the chat lives inside a resizable drawer
|
|
69
|
-
// whose panel captures pointer events and whose composer sits on a
|
|
70
|
-
// `contentEditable`; a bubble-phase `document` listener can be pre-empted by
|
|
71
|
-
// an ancestor's `stopPropagation`, which is why a press outside the popover
|
|
72
|
-
// wasn't closing it. Capture runs top-down before any of that, so the handler
|
|
73
|
-
// always fires. `touchstart` covers tap-to-dismiss on touch devices.
|
|
74
|
-
useEffect(() => {
|
|
75
|
-
if (!open) return
|
|
76
|
-
const onOutside = (e: Event) => {
|
|
77
|
-
if (rootRef.current?.contains(e.target as Node)) return
|
|
78
|
-
setOpen(false)
|
|
79
|
-
}
|
|
80
|
-
document.addEventListener('mousedown', onOutside, true)
|
|
81
|
-
document.addEventListener('touchstart', onOutside, true)
|
|
82
|
-
return () => {
|
|
83
|
-
document.removeEventListener('mousedown', onOutside, true)
|
|
84
|
-
document.removeEventListener('touchstart', onOutside, true)
|
|
85
|
-
}
|
|
86
|
-
}, [open])
|
|
87
|
-
|
|
88
|
-
if (items.length === 0) return null
|
|
89
|
-
|
|
90
|
-
return (
|
|
91
|
-
// `relative` anchors the popover to this strip; `bottom-full` floats it
|
|
92
|
-
// above, matching the context picker's placement over the input.
|
|
93
|
-
<div
|
|
94
|
-
ref={rootRef}
|
|
95
|
-
className={cn(
|
|
96
|
-
'relative flex items-center gap-[var(--spacing-system-xs)] border-b border-ods-border bg-ods-bg p-[var(--spacing-system-xs)]',
|
|
97
|
-
className,
|
|
98
|
-
)}
|
|
99
|
-
onKeyDown={e => {
|
|
100
|
-
if (e.key === 'Escape' && open) {
|
|
101
|
-
e.preventDefault()
|
|
102
|
-
setOpen(false)
|
|
103
|
-
}
|
|
104
|
-
}}
|
|
105
|
-
>
|
|
106
|
-
<p className="min-w-0 flex-1 truncate text-h6 text-ods-text-secondary">
|
|
107
|
-
{items.length} recently viewed {items.length === 1 ? 'item' : 'items'} in context
|
|
108
|
-
</p>
|
|
109
|
-
|
|
110
|
-
<button
|
|
111
|
-
type="button"
|
|
112
|
-
aria-label="Show remembered context"
|
|
113
|
-
aria-expanded={open}
|
|
114
|
-
title="Show remembered context"
|
|
115
|
-
onClick={() => setOpen(o => !o)}
|
|
116
|
-
className={cn(
|
|
117
|
-
'flex size-4 shrink-0 items-center justify-center rounded outline-none transition-colors [&_svg]:size-4',
|
|
118
|
-
open ? 'text-ods-text-primary' : 'text-ods-text-secondary hover:text-ods-text-primary',
|
|
119
|
-
'focus-visible:text-ods-text-primary',
|
|
120
|
-
)}
|
|
121
|
-
>
|
|
122
|
-
<Ellipsis01Icon size={16} />
|
|
123
|
-
</button>
|
|
124
|
-
|
|
125
|
-
{open && (
|
|
126
|
-
<div
|
|
127
|
-
role="list"
|
|
128
|
-
aria-label="Remembered context"
|
|
129
|
-
// Mirrors `ChatContextPicker`'s popover chrome (border / card bg /
|
|
130
|
-
// shadow-md) and its scroll cap, so both dropdowns over the composer
|
|
131
|
-
// read as one component family.
|
|
132
|
-
className="absolute bottom-full right-0 z-50 mb-1 max-h-[min(340px,45vh)] w-[320px] max-w-[90vw] overflow-y-auto overscroll-contain rounded-md border border-ods-border bg-ods-card text-ods-text-primary shadow-md"
|
|
133
|
-
>
|
|
134
|
-
{items.map(item => (
|
|
135
|
-
// Not a `<button>`: the row itself is inert (only the `×` acts), so
|
|
136
|
-
// the remove control isn't nested inside another button.
|
|
137
|
-
<div key={itemKey(item)} role="listitem" className={CONTEXT_ROW_CLASS}>
|
|
138
|
-
{resolveIcon && <span className={CONTEXT_ICON_CLASS}>{resolveIcon(item)}</span>}
|
|
139
|
-
<span className={CONTEXT_LABEL_CLASS} title={item.label}>
|
|
140
|
-
{item.label}
|
|
141
|
-
</span>
|
|
142
|
-
{onRemove && (
|
|
143
|
-
<button
|
|
144
|
-
type="button"
|
|
145
|
-
onClick={() => onRemove(item)}
|
|
146
|
-
disabled={disabled}
|
|
147
|
-
aria-label={`Remove ${item.label} from context`}
|
|
148
|
-
className="flex size-4 shrink-0 items-center justify-center text-ods-text-secondary outline-none transition-colors hover:text-ods-text-primary focus-visible:text-ods-text-primary disabled:cursor-not-allowed disabled:opacity-40 md:size-6"
|
|
149
|
-
>
|
|
150
|
-
<XmarkCircleIcon className="size-4 shrink-0 md:size-6" />
|
|
151
|
-
</button>
|
|
152
|
-
)}
|
|
153
|
-
</div>
|
|
154
|
-
))}
|
|
155
|
-
</div>
|
|
156
|
-
)}
|
|
157
|
-
</div>
|
|
158
|
-
)
|
|
159
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|