@flamingo-stack/openframe-frontend-core 0.0.319 → 0.0.321

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.
Files changed (115) hide show
  1. package/dist/{chunk-XAGD3XZV.js → chunk-563D7EB2.js} +4 -4
  2. package/dist/{chunk-B34YGPIB.cjs → chunk-5HQIFRRE.cjs} +7 -7
  3. package/dist/{chunk-B34YGPIB.cjs.map → chunk-5HQIFRRE.cjs.map} +1 -1
  4. package/dist/{chunk-ARQ3R7WZ.js → chunk-6DH2TCRH.js} +2 -2
  5. package/dist/{chunk-ZD5ZDEL5.cjs → chunk-7C5G45KU.cjs} +1502 -1298
  6. package/dist/chunk-7C5G45KU.cjs.map +1 -0
  7. package/dist/{chunk-CGG7EWYG.cjs → chunk-7M3QIYFW.cjs} +56 -56
  8. package/dist/{chunk-CGG7EWYG.cjs.map → chunk-7M3QIYFW.cjs.map} +1 -1
  9. package/dist/{chunk-4YFOBTFE.js → chunk-BRERE4E5.js} +4 -4
  10. package/dist/{chunk-7ZHCRY2V.cjs → chunk-CD56IAXU.cjs} +5 -5
  11. package/dist/{chunk-7ZHCRY2V.cjs.map → chunk-CD56IAXU.cjs.map} +1 -1
  12. package/dist/{chunk-2RQV7JLA.js → chunk-DEEBJBFQ.js} +2 -2
  13. package/dist/{chunk-NG7P653A.js → chunk-FNK67HTC.js} +2 -2
  14. package/dist/{chunk-4XHPUYL7.cjs → chunk-GAQAPTBU.cjs} +37 -37
  15. package/dist/{chunk-4XHPUYL7.cjs.map → chunk-GAQAPTBU.cjs.map} +1 -1
  16. package/dist/{chunk-LF5LDJOP.js → chunk-HALW7FPF.js} +2 -2
  17. package/dist/{chunk-G7CRSNFS.js → chunk-J65CQLX6.js} +2 -2
  18. package/dist/{chunk-5B37J3B5.cjs → chunk-MN2WQYXS.cjs} +15 -15
  19. package/dist/{chunk-5B37J3B5.cjs.map → chunk-MN2WQYXS.cjs.map} +1 -1
  20. package/dist/{chunk-APEJR6DV.cjs → chunk-NEY347ME.cjs} +26 -26
  21. package/dist/{chunk-APEJR6DV.cjs.map → chunk-NEY347ME.cjs.map} +1 -1
  22. package/dist/{chunk-V2OAUUF6.cjs → chunk-PDOTUMJC.cjs} +31 -31
  23. package/dist/{chunk-V2OAUUF6.cjs.map → chunk-PDOTUMJC.cjs.map} +1 -1
  24. package/dist/{chunk-JIU2I6LU.cjs → chunk-TFCGMQPK.cjs} +25 -25
  25. package/dist/{chunk-JIU2I6LU.cjs.map → chunk-TFCGMQPK.cjs.map} +1 -1
  26. package/dist/{chunk-SVPVDSHA.js → chunk-TPJJJ6KC.js} +4152 -3948
  27. package/dist/chunk-TPJJJ6KC.js.map +1 -0
  28. package/dist/{chunk-7FIWPFLE.js → chunk-TV6VD6LP.js} +4 -4
  29. package/dist/{chunk-2D3RINOJ.js → chunk-V4U7ASRM.js} +2 -2
  30. package/dist/{chunk-QJOSQVIR.js → chunk-VNWWOPIY.js} +2 -2
  31. package/dist/{chunk-J4FCWWO6.cjs → chunk-WCCZGPPP.cjs} +62 -62
  32. package/dist/{chunk-J4FCWWO6.cjs.map → chunk-WCCZGPPP.cjs.map} +1 -1
  33. package/dist/{chunk-ODMCD663.js → chunk-WCRJWZUA.js} +4 -4
  34. package/dist/{chunk-7WMHKVV7.cjs → chunk-Y2TJ64S5.cjs} +12 -12
  35. package/dist/{chunk-7WMHKVV7.cjs.map → chunk-Y2TJ64S5.cjs.map} +1 -1
  36. package/dist/{chunk-RXCP4OV4.cjs → chunk-ZFER75HU.cjs} +9 -9
  37. package/dist/{chunk-RXCP4OV4.cjs.map → chunk-ZFER75HU.cjs.map} +1 -1
  38. package/dist/components/case-studies/index.cjs +8 -8
  39. package/dist/components/case-studies/index.js +2 -2
  40. package/dist/components/chat/chat-context-picker.d.ts +11 -1
  41. package/dist/components/chat/chat-context-picker.d.ts.map +1 -1
  42. package/dist/components/chat/chat-input.d.ts.map +1 -1
  43. package/dist/components/chat/chat-message-enhanced.d.ts.map +1 -1
  44. package/dist/components/chat/chat-message-list.d.ts.map +1 -1
  45. package/dist/components/chat/context-items-list.d.ts.map +1 -1
  46. package/dist/components/chat/embeddable-chat.d.ts +11 -1
  47. package/dist/components/chat/embeddable-chat.d.ts.map +1 -1
  48. package/dist/components/chat/index.cjs +2 -2
  49. package/dist/components/chat/index.js +1 -1
  50. package/dist/components/chat/remark-mention-chips.d.ts +11 -5
  51. package/dist/components/chat/remark-mention-chips.d.ts.map +1 -1
  52. package/dist/components/chat/types/component.types.d.ts +30 -7
  53. package/dist/components/chat/types/component.types.d.ts.map +1 -1
  54. package/dist/components/contact/index.cjs +3 -3
  55. package/dist/components/contact/index.js +2 -2
  56. package/dist/components/docs/index.cjs +5 -5
  57. package/dist/components/docs/index.js +4 -4
  58. package/dist/components/embeds/index.cjs +3 -3
  59. package/dist/components/embeds/index.js +2 -2
  60. package/dist/components/faq/index.cjs +3 -3
  61. package/dist/components/faq/index.js +2 -2
  62. package/dist/components/features/index.cjs +8 -2
  63. package/dist/components/features/index.cjs.map +1 -1
  64. package/dist/components/features/index.d.ts +1 -0
  65. package/dist/components/features/index.d.ts.map +1 -1
  66. package/dist/components/features/index.js +7 -1
  67. package/dist/components/features/paths-display.d.ts +16 -1
  68. package/dist/components/features/paths-display.d.ts.map +1 -1
  69. package/dist/components/features/warning-block.d.ts +32 -0
  70. package/dist/components/features/warning-block.d.ts.map +1 -0
  71. package/dist/components/help-center-pages/index.cjs +20 -20
  72. package/dist/components/help-center-pages/index.js +11 -11
  73. package/dist/components/index.cjs +126 -120
  74. package/dist/components/index.cjs.map +1 -1
  75. package/dist/components/index.js +15 -9
  76. package/dist/components/index.js.map +1 -1
  77. package/dist/components/navigation/index.cjs +2 -2
  78. package/dist/components/navigation/index.js +1 -1
  79. package/dist/components/onboarding-guides/index.cjs +5 -5
  80. package/dist/components/onboarding-guides/index.js +4 -4
  81. package/dist/components/related-content/index.cjs +3 -3
  82. package/dist/components/related-content/index.js +2 -2
  83. package/dist/components/tickets/index.cjs +5 -5
  84. package/dist/components/tickets/index.js +4 -4
  85. package/dist/components/ui/index.cjs +2 -2
  86. package/dist/components/ui/index.js +1 -1
  87. package/dist/index.cjs +8 -2
  88. package/dist/index.cjs.map +1 -1
  89. package/dist/index.js +7 -1
  90. package/package.json +1 -1
  91. package/src/components/chat/chat-context-picker.tsx +77 -9
  92. package/src/components/chat/chat-input.tsx +524 -489
  93. package/src/components/chat/chat-message-enhanced.tsx +4 -2
  94. package/src/components/chat/chat-message-list.tsx +2 -0
  95. package/src/components/chat/context-items-list.tsx +9 -1
  96. package/src/components/chat/embeddable-chat.tsx +55 -56
  97. package/src/components/chat/remark-mention-chips.ts +13 -7
  98. package/src/components/chat/types/component.types.ts +31 -7
  99. package/src/components/features/index.ts +1 -0
  100. package/src/components/features/paths-display.tsx +32 -1
  101. package/src/components/features/warning-block.tsx +54 -0
  102. package/src/stories/WarningBlock.stories.tsx +167 -0
  103. package/dist/chunk-SVPVDSHA.js.map +0 -1
  104. package/dist/chunk-ZD5ZDEL5.cjs.map +0 -1
  105. /package/dist/{chunk-XAGD3XZV.js.map → chunk-563D7EB2.js.map} +0 -0
  106. /package/dist/{chunk-ARQ3R7WZ.js.map → chunk-6DH2TCRH.js.map} +0 -0
  107. /package/dist/{chunk-4YFOBTFE.js.map → chunk-BRERE4E5.js.map} +0 -0
  108. /package/dist/{chunk-2RQV7JLA.js.map → chunk-DEEBJBFQ.js.map} +0 -0
  109. /package/dist/{chunk-NG7P653A.js.map → chunk-FNK67HTC.js.map} +0 -0
  110. /package/dist/{chunk-LF5LDJOP.js.map → chunk-HALW7FPF.js.map} +0 -0
  111. /package/dist/{chunk-G7CRSNFS.js.map → chunk-J65CQLX6.js.map} +0 -0
  112. /package/dist/{chunk-7FIWPFLE.js.map → chunk-TV6VD6LP.js.map} +0 -0
  113. /package/dist/{chunk-2D3RINOJ.js.map → chunk-V4U7ASRM.js.map} +0 -0
  114. /package/dist/{chunk-QJOSQVIR.js.map → chunk-VNWWOPIY.js.map} +0 -0
  115. /package/dist/{chunk-ODMCD663.js.map → chunk-WCRJWZUA.js.map} +0 -0
@@ -20,7 +20,7 @@
20
20
  */
21
21
 
22
22
  import { QueryErrorResetBoundary } from '@tanstack/react-query'
23
- import { Suspense, useCallback, useEffect, useMemo, useRef, useState } from 'react'
23
+ import { Fragment, Suspense, useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react'
24
24
  import { Chevron02LeftIcon } from '../icons-v2-generated/arrows/chevron-02-left-icon'
25
25
  import { PlusIcon } from '../icons-v2-generated/signs-and-symbols/plus-icon'
26
26
  import { XmarkCircleIcon } from '../icons-v2-generated/signs-and-symbols/xmark-circle-icon'
@@ -205,6 +205,47 @@ export function ChatContextPicker({
205
205
  return () => clearTimeout(handle)
206
206
  }, [query])
207
207
 
208
+ // Cap the popover to the space ACTUALLY visible above the `+` button. The
209
+ // popover is `bottom-full`-anchored, so its bounding-rect bottom equals the
210
+ // button top. The usable TOP is NOT the viewport top — the chat lives inside a
211
+ // panel/drawer whose body clips overflow below its header — so we measure to the
212
+ // nearest scroll/clip ancestor's top, not the window. Height = (button top) −
213
+ // (clip-container top) − gap; the popover then scrolls within that slice.
214
+ // Re-measured on open, view change, resize, and once after the Drawer open
215
+ // animation settles (rAF + delayed pass) so we don't lock a mid-animation value.
216
+ const [availMaxH, setAvailMaxH] = useState<number | undefined>(undefined)
217
+ useLayoutEffect(() => {
218
+ if (!open) {
219
+ setAvailMaxH(undefined)
220
+ return
221
+ }
222
+ const measure = () => {
223
+ const el = rootRef.current
224
+ if (!el) return
225
+ const bottom = el.getBoundingClientRect().bottom
226
+ // Find the nearest ancestor that clips overflow — that top edge, not the
227
+ // window's, is where the popover starts getting hidden.
228
+ let clipTop = 0
229
+ for (let p = el.parentElement; p; p = p.parentElement) {
230
+ const oy = getComputedStyle(p).overflowY
231
+ if (oy === 'auto' || oy === 'scroll' || oy === 'hidden') {
232
+ clipTop = p.getBoundingClientRect().top
233
+ break
234
+ }
235
+ }
236
+ setAvailMaxH(Math.max(180, Math.floor(bottom - clipTop - 12)))
237
+ }
238
+ measure()
239
+ const raf = requestAnimationFrame(measure)
240
+ const settle = setTimeout(measure, 320)
241
+ window.addEventListener('resize', measure)
242
+ return () => {
243
+ cancelAnimationFrame(raf)
244
+ clearTimeout(settle)
245
+ window.removeEventListener('resize', measure)
246
+ }
247
+ }, [open, view])
248
+
208
249
  const openType = useCallback((type: ChatContextEntityType) => {
209
250
  setActiveType(type)
210
251
  setQuery('')
@@ -236,12 +277,15 @@ export function ChatContextPicker({
236
277
  ref={rootRef}
237
278
  role="dialog"
238
279
  aria-label="Add context"
280
+ // `maxHeight` is measured to the real gap above the `+` button (see effect),
281
+ // so the popover always fits the available slice; `max-h-[70vh]` is the
282
+ // pre-measurement fallback. The popover itself scrolls (`overflow-y-auto`)
283
+ // when its content can't fit that height — no fragile flex-1 chains.
284
+ style={{ maxHeight: availMaxH }}
239
285
  className={cn(
240
286
  // Anchored to the `+` button (its `relative` parent): left edge aligns
241
287
  // to the button, `bottom-full` floats it just above with a 4px gap.
242
- // No height cap here the root menu and the full entity-type list show
243
- // in full; only the search RESULTS list is capped + scrolled (below).
244
- 'absolute bottom-full left-0 z-50 mb-1 flex w-[320px] max-w-[90vw] flex-col overflow-hidden',
288
+ 'absolute bottom-full left-0 z-50 mb-1 flex max-h-[70vh] w-[320px] max-w-[90vw] flex-col overflow-y-auto overflow-x-hidden',
245
289
  // Mirror `DropdownMenuContent` chrome (border / card bg / shadow-md).
246
290
  'rounded-md border border-ods-border bg-ods-card text-ods-text-primary shadow-md',
247
291
  className,
@@ -268,9 +312,16 @@ export function ChatContextPicker({
268
312
  <ContextMenuRow icon={<PackagePlusIcon size={24} />} label="Assign Item" onClick={() => setView('types')} />
269
313
  </div>
270
314
  ) : view === 'types' ? (
271
- /* Level 1 — Back + entity-type list (Figma 31:28708). Shown in full. */
315
+ /* Level 1 — Back + entity-type list (Figma 31:28708). Back stays pinned;
316
+ the type list scrolls if it can't fit the capped popover height. */
272
317
  <div role="menu" aria-label="Context types" className="flex flex-col">
273
- <button type="button" onClick={() => setView('root')} className={CONTEXT_BACK_CLASS}>
318
+ <button
319
+ type="button"
320
+ onClick={() => setView('root')}
321
+ // Pinned while the popover body scrolls (the root is the scroll
322
+ // container) — `bg-ods-bg` keeps rows from showing through.
323
+ className={cn(CONTEXT_BACK_CLASS, 'sticky top-0 z-10')}
324
+ >
274
325
  <Chevron02LeftIcon size={24} className="shrink-0" />
275
326
  <span className="truncate">Back</span>
276
327
  </button>
@@ -285,7 +336,7 @@ export function ChatContextPicker({
285
336
  ) : activeType ? (
286
337
  /* Level 2 — Back + search + HOST-rendered items (Figma 31:29102). */
287
338
  <>
288
- <button type="button" onClick={backToTypes} className={CONTEXT_BACK_CLASS}>
339
+ <button type="button" onClick={backToTypes} className={cn(CONTEXT_BACK_CLASS, 'sticky top-0 z-10')}>
289
340
  <Chevron02LeftIcon size={24} className="shrink-0" />
290
341
  <span className="truncate">Back</span>
291
342
  </button>
@@ -360,6 +411,16 @@ export interface ChatContextChipStripProps {
360
411
  onRemove?: (item: ChatContextItem) => void
361
412
  /** Lead icon resolver, e.g. the entity-type icon. Optional. */
362
413
  resolveIcon?: (item: ChatContextItem) => React.ReactNode
414
+ /**
415
+ * Optional host renderer that REPLACES the default label-only pill for an
416
+ * item — e.g. a self-fetching entity chip that resolves its own live display
417
+ * name by id, identical to an inline `@marker:id` mention. Return
418
+ * `null`/`undefined` for an item to fall back to the default pill. The lib
419
+ * owns no entity knowledge, so the host node owns its full chrome (the
420
+ * `onRemove` affordance is NOT wrapped around host-rendered items — this is
421
+ * meant for the read-only message bubble, mirroring `renderMention`).
422
+ */
423
+ renderItem?: (item: ChatContextItem) => React.ReactNode
363
424
  disabled?: boolean
364
425
  className?: string
365
426
  }
@@ -373,6 +434,7 @@ export function ChatContextChipStrip({
373
434
  items,
374
435
  onRemove,
375
436
  resolveIcon,
437
+ renderItem,
376
438
  disabled = false,
377
439
  className,
378
440
  }: ChatContextChipStripProps) {
@@ -381,7 +443,12 @@ export function ChatContextChipStrip({
381
443
  // `tag` pills (Figma 1:6073): 32px tall, card surface, bordered, mono-
382
444
  // uppercase label, 16px lead icon + xmark-circle remove. Wraps to new rows.
383
445
  <div className={cn('flex flex-wrap content-center items-center gap-2', className)}>
384
- {items.map((item) => (
446
+ {items.map((item) => {
447
+ // Host-rendered chip (self-fetching mention analogue) takes over the
448
+ // whole pill when provided and non-null; otherwise the default pill.
449
+ const hostNode = renderItem?.(item)
450
+ if (hostNode != null) return <Fragment key={itemKey(item)}>{hostNode}</Fragment>
451
+ return (
385
452
  <div
386
453
  key={itemKey(item)}
387
454
  className="flex h-8 shrink-0 items-center gap-2 rounded-md border border-ods-border bg-ods-card px-2"
@@ -411,7 +478,8 @@ export function ChatContextChipStrip({
411
478
  </button>
412
479
  )}
413
480
  </div>
414
- ))}
481
+ )
482
+ })}
415
483
  </div>
416
484
  )
417
485
  }