@flamingo-stack/openframe-frontend-core 0.0.291 → 0.0.292
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-EL5GCMPU.cjs → chunk-2BMVBPC7.cjs} +9 -9
- package/dist/{chunk-EL5GCMPU.cjs.map → chunk-2BMVBPC7.cjs.map} +1 -1
- package/dist/{chunk-ZYBUFVQV.cjs → chunk-2NJ44RTT.cjs} +27 -27
- package/dist/{chunk-ZYBUFVQV.cjs.map → chunk-2NJ44RTT.cjs.map} +1 -1
- package/dist/{chunk-Z2EOXZBW.js → chunk-5FK7X3EE.js} +258 -159
- package/dist/chunk-5FK7X3EE.js.map +1 -0
- package/dist/{chunk-3SDBXXDP.cjs → chunk-5PELVUFT.cjs} +26 -26
- package/dist/{chunk-3SDBXXDP.cjs.map → chunk-5PELVUFT.cjs.map} +1 -1
- package/dist/{chunk-BVNYQDZE.cjs → chunk-5R5OODNE.cjs} +40 -40
- package/dist/{chunk-BVNYQDZE.cjs.map → chunk-5R5OODNE.cjs.map} +1 -1
- package/dist/{chunk-ODR6A6FC.js → chunk-6FHO73AP.js} +22 -10
- package/dist/{chunk-ODR6A6FC.js.map → chunk-6FHO73AP.js.map} +1 -1
- package/dist/{chunk-EGSAB76W.js → chunk-B2U6INNO.js} +3 -3
- package/dist/{chunk-RSIFEDZX.js → chunk-C667P6LZ.js} +5 -5
- package/dist/{chunk-VMRPM24G.cjs → chunk-CDJOKNCS.cjs} +17 -17
- package/dist/{chunk-VMRPM24G.cjs.map → chunk-CDJOKNCS.cjs.map} +1 -1
- package/dist/{chunk-7NM7DEUK.js → chunk-CUQH4SHH.js} +2 -2
- package/dist/{chunk-ZLN6SM2U.js → chunk-DUIWR7RQ.js} +3 -3
- package/dist/{chunk-AGRSALEN.js → chunk-E2YXRSDG.js} +5 -5
- package/dist/{chunk-Z4GAFSNM.cjs → chunk-FFP2A77V.cjs} +10 -10
- package/dist/{chunk-Z4GAFSNM.cjs.map → chunk-FFP2A77V.cjs.map} +1 -1
- package/dist/{chunk-D4R2MUPA.js → chunk-HTYUZXQP.js} +5 -5
- package/dist/{chunk-CSL3ECOF.js → chunk-IXDTNQF4.js} +3 -3
- package/dist/{chunk-I6ZPGKZ2.cjs → chunk-JC5RN7ZS.cjs} +6 -6
- package/dist/{chunk-I6ZPGKZ2.cjs.map → chunk-JC5RN7ZS.cjs.map} +1 -1
- package/dist/{chunk-2YSC3API.cjs → chunk-MDLWEJAV.cjs} +1060 -961
- package/dist/chunk-MDLWEJAV.cjs.map +1 -0
- package/dist/{chunk-R2KT5GDD.js → chunk-N45M3TK3.js} +14 -4
- package/dist/chunk-N45M3TK3.js.map +1 -0
- package/dist/{chunk-EI4WALN2.cjs → chunk-OXOTKEYY.cjs} +39 -29
- package/dist/chunk-OXOTKEYY.cjs.map +1 -0
- package/dist/{chunk-6BWZFRUG.cjs → chunk-PZZGDS5I.cjs} +17 -17
- package/dist/{chunk-6BWZFRUG.cjs.map → chunk-PZZGDS5I.cjs.map} +1 -1
- package/dist/{chunk-VRSXJ5QJ.js → chunk-SLP4KXP6.js} +3 -2
- package/dist/chunk-SLP4KXP6.js.map +1 -0
- package/dist/{chunk-7EYWERFT.js → chunk-VK4B6UGU.js} +4 -4
- package/dist/{chunk-D6RK5YXX.cjs → chunk-Z6BK4XHH.cjs} +22 -10
- package/dist/chunk-Z6BK4XHH.cjs.map +1 -0
- package/dist/{chunk-Y4JNA4W6.cjs → chunk-ZHNL2IPK.cjs} +3 -2
- package/dist/chunk-ZHNL2IPK.cjs.map +1 -0
- package/dist/components/chat/chat-message-enhanced.d.ts.map +1 -1
- package/dist/components/chat/chat-message-list.d.ts.map +1 -1
- package/dist/components/chat/embeddable-chat.d.ts +15 -0
- package/dist/components/chat/embeddable-chat.d.ts.map +1 -1
- package/dist/components/chat/hooks/use-realtime-chunk-processor.d.ts.map +1 -1
- package/dist/components/chat/index.cjs +7 -5
- package/dist/components/chat/index.cjs.map +1 -1
- 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 +6 -4
- package/dist/components/chat/remark-mention-chips.d.ts +30 -0
- package/dist/components/chat/remark-mention-chips.d.ts.map +1 -0
- package/dist/components/chat/types/api.types.d.ts +4 -0
- package/dist/components/chat/types/api.types.d.ts.map +1 -1
- package/dist/components/chat/types/component.types.d.ts +24 -0
- package/dist/components/chat/types/component.types.d.ts.map +1 -1
- package/dist/components/chat/types/context-item.types.d.ts +5 -0
- package/dist/components/chat/types/context-item.types.d.ts.map +1 -1
- package/dist/components/chat/types/processing.types.d.ts +4 -0
- package/dist/components/chat/types/processing.types.d.ts.map +1 -1
- package/dist/components/chat/utils/chunk-parser.d.ts.map +1 -1
- package/dist/components/chat/utils/nav-anchor-props.d.ts +8 -3
- package/dist/components/chat/utils/nav-anchor-props.d.ts.map +1 -1
- package/dist/components/chat/utils/process-historical-messages.d.ts.map +1 -1
- package/dist/components/contact/index.cjs +6 -6
- package/dist/components/contact/index.js +5 -5
- package/dist/components/docs/index.cjs +5 -5
- package/dist/components/docs/index.js +4 -4
- package/dist/components/embeds/index.cjs +6 -6
- package/dist/components/embeds/index.js +5 -5
- package/dist/components/faq/index.cjs +6 -6
- package/dist/components/faq/index.js +5 -5
- package/dist/components/features/index.cjs +5 -5
- package/dist/components/features/index.js +4 -4
- package/dist/components/index.cjs +178 -176
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.js +13 -11
- package/dist/components/index.js.map +1 -1
- package/dist/components/navigation/index.cjs +5 -5
- package/dist/components/navigation/index.js +4 -4
- package/dist/components/onboarding-guides/index.cjs +24 -24
- package/dist/components/onboarding-guides/index.js +4 -4
- package/dist/components/related-content/index.cjs +6 -6
- package/dist/components/related-content/index.js +5 -5
- package/dist/components/tickets/index.cjs +63 -63
- package/dist/components/tickets/index.js +6 -6
- package/dist/components/ui/index.cjs +7 -5
- package/dist/components/ui/index.cjs.map +1 -1
- package/dist/components/ui/index.js +6 -4
- package/dist/components/ui/simple-markdown-renderer.d.ts.map +1 -1
- package/dist/components/ui/tag.d.ts +10 -1
- package/dist/components/ui/tag.d.ts.map +1 -1
- package/dist/index.cjs +7 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -4
- package/dist/utils/index.cjs +21 -9
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.js +21 -9
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/scroll-into-view.d.ts +12 -0
- package/dist/utils/scroll-into-view.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/chat/chat-message-enhanced.tsx +71 -9
- package/src/components/chat/chat-message-list.tsx +2 -0
- package/src/components/chat/embeddable-chat.tsx +50 -6
- package/src/components/chat/hooks/use-realtime-chunk-processor.ts +1 -0
- package/src/components/chat/index.ts +1 -0
- package/src/components/chat/remark-mention-chips.ts +72 -0
- package/src/components/chat/types/api.types.ts +1 -1
- package/src/components/chat/types/component.types.ts +18 -0
- package/src/components/chat/types/context-item.types.ts +5 -0
- package/src/components/chat/types/processing.types.ts +8 -1
- package/src/components/chat/utils/chunk-parser.ts +11 -0
- package/src/components/chat/utils/nav-anchor-props.ts +22 -4
- package/src/components/chat/utils/process-historical-messages.ts +22 -0
- package/src/components/ui/simple-markdown-renderer.tsx +14 -11
- package/src/components/ui/tag.tsx +12 -2
- package/src/utils/scroll-into-view.ts +51 -9
- package/dist/chunk-2YSC3API.cjs.map +0 -1
- package/dist/chunk-D6RK5YXX.cjs.map +0 -1
- package/dist/chunk-EI4WALN2.cjs.map +0 -1
- package/dist/chunk-R2KT5GDD.js.map +0 -1
- package/dist/chunk-VRSXJ5QJ.js.map +0 -1
- package/dist/chunk-Y4JNA4W6.cjs.map +0 -1
- package/dist/chunk-Z2EOXZBW.js.map +0 -1
- /package/dist/{chunk-EGSAB76W.js.map → chunk-B2U6INNO.js.map} +0 -0
- /package/dist/{chunk-RSIFEDZX.js.map → chunk-C667P6LZ.js.map} +0 -0
- /package/dist/{chunk-7NM7DEUK.js.map → chunk-CUQH4SHH.js.map} +0 -0
- /package/dist/{chunk-ZLN6SM2U.js.map → chunk-DUIWR7RQ.js.map} +0 -0
- /package/dist/{chunk-AGRSALEN.js.map → chunk-E2YXRSDG.js.map} +0 -0
- /package/dist/{chunk-D4R2MUPA.js.map → chunk-HTYUZXQP.js.map} +0 -0
- /package/dist/{chunk-CSL3ECOF.js.map → chunk-IXDTNQF4.js.map} +0 -0
- /package/dist/{chunk-7EYWERFT.js.map → chunk-VK4B6UGU.js.map} +0 -0
package/dist/utils/index.js
CHANGED
|
@@ -3302,22 +3302,34 @@ function cancelActiveScroll() {
|
|
|
3302
3302
|
}
|
|
3303
3303
|
}
|
|
3304
3304
|
var easeOutCubic = (t) => 1 - Math.pow(1 - t, 3);
|
|
3305
|
+
function getScrollableAncestor(el) {
|
|
3306
|
+
for (let node = el.parentElement; node; node = node.parentElement) {
|
|
3307
|
+
const overflowY = getComputedStyle(node).overflowY;
|
|
3308
|
+
if ((overflowY === "auto" || overflowY === "scroll" || overflowY === "overlay") && node.scrollHeight > node.clientHeight) {
|
|
3309
|
+
return node;
|
|
3310
|
+
}
|
|
3311
|
+
}
|
|
3312
|
+
return null;
|
|
3313
|
+
}
|
|
3305
3314
|
function scrollElementIntoView(target, options = {}) {
|
|
3306
3315
|
if (typeof window === "undefined" || !target) return;
|
|
3307
3316
|
const { headerOffset = 0, behavior = "smooth", adjustTargetY, durationMs = 320 } = options;
|
|
3317
|
+
const container = getScrollableAncestor(target);
|
|
3318
|
+
const readCurrent = () => container ? container.scrollTop : window.scrollY;
|
|
3319
|
+
const writeTo = (y) => {
|
|
3320
|
+
if (container) container.scrollTop = y;
|
|
3321
|
+
else window.scrollTo(0, y);
|
|
3322
|
+
};
|
|
3308
3323
|
const computeTarget = () => {
|
|
3309
|
-
const raw = target.getBoundingClientRect().top + window.scrollY - headerOffset;
|
|
3324
|
+
const raw = container ? container.scrollTop + (target.getBoundingClientRect().top - container.getBoundingClientRect().top) - headerOffset : target.getBoundingClientRect().top + window.scrollY - headerOffset;
|
|
3310
3325
|
const adjusted = adjustTargetY ? adjustTargetY(raw) : raw;
|
|
3311
|
-
const maxScroll = Math.max(
|
|
3312
|
-
0,
|
|
3313
|
-
document.documentElement.scrollHeight - window.innerHeight
|
|
3314
|
-
);
|
|
3326
|
+
const maxScroll = container ? Math.max(0, container.scrollHeight - container.clientHeight) : Math.max(0, document.documentElement.scrollHeight - window.innerHeight);
|
|
3315
3327
|
return Math.min(Math.max(0, adjusted), maxScroll);
|
|
3316
3328
|
};
|
|
3317
3329
|
cancelActiveScroll();
|
|
3318
3330
|
const prefersReduced = typeof window.matchMedia === "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
3319
3331
|
if (behavior === "instant" || behavior === "auto" || prefersReduced) {
|
|
3320
|
-
|
|
3332
|
+
writeTo(computeTarget());
|
|
3321
3333
|
return;
|
|
3322
3334
|
}
|
|
3323
3335
|
let startY = null;
|
|
@@ -3331,17 +3343,17 @@ function scrollElementIntoView(target, options = {}) {
|
|
|
3331
3343
|
};
|
|
3332
3344
|
const step = (now) => {
|
|
3333
3345
|
if (startY === null) {
|
|
3334
|
-
startY =
|
|
3346
|
+
startY = readCurrent();
|
|
3335
3347
|
startTime = now;
|
|
3336
3348
|
}
|
|
3337
3349
|
const targetY = computeTarget();
|
|
3338
3350
|
const t = Math.min(1, (now - startTime) / durationMs);
|
|
3339
3351
|
const y = startY + (targetY - startY) * easeOutCubic(t);
|
|
3340
|
-
|
|
3352
|
+
writeTo(y);
|
|
3341
3353
|
if (t < 1) {
|
|
3342
3354
|
activeRaf = requestAnimationFrame(step);
|
|
3343
3355
|
} else {
|
|
3344
|
-
|
|
3356
|
+
writeTo(computeTarget());
|
|
3345
3357
|
activeRaf = 0;
|
|
3346
3358
|
if (teardownActive) {
|
|
3347
3359
|
teardownActive();
|