@flamingo-stack/openframe-frontend-core 0.0.717 → 0.0.718

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 (91) hide show
  1. package/dist/{chunk-3MJPCKB6.js → chunk-45F7PXUI.js} +2 -2
  2. package/dist/{chunk-TYVS64YN.js → chunk-67QBMN4R.js} +1 -1
  3. package/dist/{chunk-3RKBJT6K.cjs → chunk-6A43ZDWV.cjs} +2 -2
  4. package/dist/chunk-A6P6DHEZ.cjs +130 -0
  5. package/dist/{chunk-M2A5SC6H.cjs → chunk-BOTM373R.cjs} +2 -2
  6. package/dist/{chunk-X3RVDBXU.cjs → chunk-BWIN42ZA.cjs} +15 -15
  7. package/dist/{chunk-6MZI5SQ4.js → chunk-DCD5WZUF.js} +3 -3
  8. package/dist/{chunk-2EK7PA73.js → chunk-DEZDMTBM.js} +4 -4
  9. package/dist/{chunk-NB6EWUDE.cjs → chunk-DXCBOZVT.cjs} +13 -13
  10. package/dist/{chunk-J3Q53TWW.cjs → chunk-EZC2F5OT.cjs} +22 -22
  11. package/dist/{chunk-2AI2E3O2.cjs → chunk-GN4A7PMB.cjs} +27 -27
  12. package/dist/{chunk-6T3BTD6Q.js → chunk-IWCPXJEE.js} +201 -327
  13. package/dist/{chunk-2X2P3VHF.js → chunk-JIWMBIVZ.js} +4 -4
  14. package/dist/{chunk-NPAQSMRY.js → chunk-LOYPRJWA.js} +1053 -357
  15. package/dist/{chunk-U3TP4UGA.cjs → chunk-MIQLUUVF.cjs} +6 -6
  16. package/dist/{chunk-FGKSAQR3.js → chunk-MM7MCIXL.js} +4 -4
  17. package/dist/{chunk-B5XU6KOA.js → chunk-N2PF5CFX.js} +4836 -5424
  18. package/dist/{chunk-LANNTTKP.cjs → chunk-NDZ5ZXOQ.cjs} +6 -6
  19. package/dist/{chunk-WH5GJSID.js → chunk-PQ6HBLZ7.js} +3 -3
  20. package/dist/{chunk-FROXS52D.cjs → chunk-QBCDSTLE.cjs} +2 -2
  21. package/dist/{chunk-NQWJAOHO.js → chunk-QXZCLQNV.js} +1 -1
  22. package/dist/{chunk-3QAMMWV2.cjs → chunk-S2FUFMLW.cjs} +20 -20
  23. package/dist/{chunk-PD4W2VMH.js → chunk-SGFTTJKO.js} +1 -1
  24. package/dist/{chunk-E6FLX4TX.js → chunk-TBCZCRQ5.js} +5 -5
  25. package/dist/{chunk-OHLBO4LM.cjs → chunk-WALCXC7J.cjs} +3 -3
  26. package/dist/{chunk-VZI5BA4L.js → chunk-XGHGGBM3.js} +1 -1
  27. package/dist/{chunk-VYKFM2NB.cjs → chunk-YC5COB5V.cjs} +32 -32
  28. package/dist/{chunk-47FISYO5.js → chunk-YEMCCYIF.js} +2 -2
  29. package/dist/chunk-YYYVS7CX.js +130 -0
  30. package/dist/{chunk-5MF3NMYC.cjs → chunk-Z3CVSPO3.cjs} +581 -1169
  31. package/dist/{chunk-PPXR22YC.cjs → chunk-Z5UWW3Z2.cjs} +707 -11
  32. package/dist/{chunk-JO5TLJPM.cjs → chunk-ZXCZYMN4.cjs} +37 -163
  33. package/dist/{cloud-tenants-KDWTVHSI.cjs → cloud-tenants-PFDF7O5U.cjs} +5 -4
  34. package/dist/{cloud-tenants-LNC26WY2.js → cloud-tenants-TAKOWXLD.js} +4 -3
  35. package/dist/components/case-studies/index.cjs +13 -12
  36. package/dist/components/case-studies/index.js +5 -4
  37. package/dist/components/contact/index.cjs +6 -5
  38. package/dist/components/contact/index.js +5 -4
  39. package/dist/components/docs/index.cjs +8 -7
  40. package/dist/components/docs/index.js +7 -6
  41. package/dist/components/embeds/index.cjs +6 -5
  42. package/dist/components/embeds/index.js +5 -4
  43. package/dist/components/faq/index.cjs +6 -5
  44. package/dist/components/faq/index.js +5 -4
  45. package/dist/components/features/index.cjs +9 -4
  46. package/dist/components/features/index.js +8 -3
  47. package/dist/components/features/remote-session/index.d.ts +2 -0
  48. package/dist/components/features/remote-session/index.d.ts.map +1 -1
  49. package/dist/components/features/remote-session/remote-session-keep-modals.d.ts +3 -3
  50. package/dist/components/features/remote-session/remote-session-keep-modals.d.ts.map +1 -1
  51. package/dist/components/features/remote-session/remote-session-ticket-modals.d.ts +29 -0
  52. package/dist/components/features/remote-session/remote-session-ticket-modals.d.ts.map +1 -0
  53. package/dist/components/help-center-pages/index.cjs +48 -47
  54. package/dist/components/help-center-pages/index.js +14 -13
  55. package/dist/components/index.cjs +30 -25
  56. package/dist/components/index.js +19 -14
  57. package/dist/components/meeting-scheduler/index.cjs +25 -24
  58. package/dist/components/meeting-scheduler/index.js +4 -3
  59. package/dist/components/navigation/index.cjs +6 -5
  60. package/dist/components/navigation/index.js +5 -4
  61. package/dist/components/onboarding-guides/index.cjs +8 -7
  62. package/dist/components/onboarding-guides/index.js +7 -6
  63. package/dist/components/product-demo/index.cjs +7 -7
  64. package/dist/components/product-demo/index.js +7 -7
  65. package/dist/components/tickets/index.cjs +8 -7
  66. package/dist/components/tickets/index.js +7 -6
  67. package/dist/components/ui/autocomplete.d.ts +6 -0
  68. package/dist/components/ui/autocomplete.d.ts.map +1 -1
  69. package/dist/components/ui/index.cjs +7 -6
  70. package/dist/components/ui/index.js +6 -5
  71. package/dist/{devices-ATHYJUVQ.cjs → devices-KRCGZMGA.cjs} +6 -5
  72. package/dist/{devices-NYCRQ3PG.js → devices-LHEX7O5T.js} +4 -3
  73. package/dist/hooks/index.cjs +6 -4
  74. package/dist/hooks/index.js +5 -3
  75. package/dist/index.cjs +14 -8
  76. package/dist/index.js +15 -9
  77. package/dist/{knowledge-EHNRYT7U.cjs → knowledge-KLVPVEYZ.cjs} +5 -4
  78. package/dist/{knowledge-DEKYJXBS.js → knowledge-RZSFNR33.js} +4 -3
  79. package/dist/{logs-Q7YFIVYI.js → logs-E5DOV5JO.js} +4 -3
  80. package/dist/{logs-3V765P7O.cjs → logs-OX3XTVL2.cjs} +13 -12
  81. package/dist/{policies-TXU5AIXS.cjs → policies-FOSCIZGK.cjs} +9 -8
  82. package/dist/{policies-BTIENK5A.js → policies-MC2S4S5G.js} +4 -3
  83. package/dist/{remote-session-R6VAFESR.cjs → remote-session-DRFE5XZE.cjs} +4 -3
  84. package/dist/{remote-session-GSGZOFDX.js → remote-session-JQ2BPIE3.js} +2 -1
  85. package/dist/{software-update-SW2HOBHW.js → software-update-D4OEIH65.js} +6 -4
  86. package/dist/{software-update-MINTICZY.cjs → software-update-HOBSTWVO.cjs} +11 -9
  87. package/package.json +1 -1
  88. package/src/components/features/remote-session/index.ts +2 -0
  89. package/src/components/features/remote-session/remote-session-keep-modals.tsx +4 -4
  90. package/src/components/features/remote-session/remote-session-ticket-modals.tsx +140 -0
  91. package/src/components/ui/autocomplete.tsx +18 -4
@@ -0,0 +1,130 @@
1
+ "use client";
2
+
3
+ // src/hooks/ui/use-auto-limit-tags.ts
4
+ import { useCallback, useEffect, useRef, useState } from "react";
5
+ function useAutoLimitTags({
6
+ count,
7
+ limitTags = "auto",
8
+ placeholder = "",
9
+ reserveInputWidth = true
10
+ }) {
11
+ const middleRef = useRef(null);
12
+ const measureRef = useRef(null);
13
+ const textMeasureRef = useRef(null);
14
+ const badgeRef = useRef(null);
15
+ const inputRef = useRef(null);
16
+ const [measuredCount, setMeasuredCount] = useState(null);
17
+ const recalculate = useCallback(() => {
18
+ const middle = middleRef.current;
19
+ const measure2 = measureRef.current;
20
+ if (!middle || !measure2) {
21
+ setMeasuredCount(null);
22
+ return;
23
+ }
24
+ if (count === 0) {
25
+ setMeasuredCount(0);
26
+ return;
27
+ }
28
+ const cs = getComputedStyle(middle);
29
+ const padL = parseFloat(cs.paddingLeft) || 0;
30
+ const padR = parseFloat(cs.paddingRight) || 0;
31
+ const gap = parseFloat(cs.gap) || 0;
32
+ const middleW = middle.clientWidth;
33
+ let inputReservedW = 0;
34
+ let trailingGap = 0;
35
+ if (reserveInputWidth) {
36
+ const textW = textMeasureRef.current?.offsetWidth ?? 60;
37
+ const inputMinW = inputRef.current ? parseFloat(getComputedStyle(inputRef.current).minWidth) || 60 : 60;
38
+ inputReservedW = Math.max(textW + 8, inputMinW);
39
+ trailingGap = gap;
40
+ }
41
+ const available = middleW - padL - padR - inputReservedW - trailingGap;
42
+ const tagEls = Array.from(measure2.children);
43
+ const widths = tagEls.map((el) => el.offsetWidth);
44
+ let total = 0;
45
+ for (let i = 0; i < widths.length; i++) {
46
+ total += widths[i] + (i > 0 ? gap : 0);
47
+ }
48
+ if (total <= available) {
49
+ setMeasuredCount(count);
50
+ return;
51
+ }
52
+ const badgeW = badgeRef.current?.offsetWidth ?? 40;
53
+ const spaceWithBadge = available - badgeW - gap;
54
+ let used = 0;
55
+ let fitCount = 0;
56
+ for (let i = 0; i < widths.length; i++) {
57
+ const need = widths[i] + (i > 0 ? gap : 0);
58
+ if (used + need > spaceWithBadge) break;
59
+ used += need;
60
+ fitCount++;
61
+ }
62
+ setMeasuredCount(Math.max(0, fitCount));
63
+ }, [count, placeholder, reserveInputWidth]);
64
+ useEffect(() => {
65
+ if (limitTags !== "auto") return void 0;
66
+ const el = middleRef.current;
67
+ if (!el) return void 0;
68
+ const ro = new ResizeObserver(recalculate);
69
+ ro.observe(el);
70
+ return () => ro.disconnect();
71
+ }, [recalculate, limitTags]);
72
+ const visibleCount = limitTags !== "auto" ? Math.min(limitTags, count) : measuredCount === null ? count : Math.min(measuredCount, count);
73
+ return { visibleCount, middleRef, measureRef, textMeasureRef, badgeRef, inputRef };
74
+ }
75
+
76
+ // src/hooks/ui/use-keyboard-collision-padding.ts
77
+ import { useSyncExternalStore } from "react";
78
+ var KEYBOARD_INSET_VAR = "--of-keyboard-inset";
79
+ function measure() {
80
+ if (typeof document === "undefined") return 0;
81
+ const inset = Number.parseFloat(getComputedStyle(document.documentElement).getPropertyValue(KEYBOARD_INSET_VAR));
82
+ if (!(inset > 0)) return 0;
83
+ const layoutHeight = document.documentElement.clientHeight;
84
+ const viewport = window.visualViewport;
85
+ const viewportBottom = viewport ? viewport.offsetTop + viewport.height : layoutHeight;
86
+ return Math.max(0, Math.round(viewportBottom - (layoutHeight - inset)));
87
+ }
88
+ var listeners = /* @__PURE__ */ new Set();
89
+ var padding = 0;
90
+ var teardown = null;
91
+ function sync() {
92
+ const next = measure();
93
+ if (next === padding) return;
94
+ padding = next;
95
+ for (const notify of listeners) notify();
96
+ }
97
+ function subscribe(onStoreChange) {
98
+ listeners.add(onStoreChange);
99
+ if (listeners.size === 1) {
100
+ padding = measure();
101
+ const observer = new MutationObserver(sync);
102
+ observer.observe(document.documentElement, { attributes: true, attributeFilter: ["style"] });
103
+ const viewport = window.visualViewport;
104
+ viewport?.addEventListener("resize", sync);
105
+ viewport?.addEventListener("scroll", sync);
106
+ teardown = () => {
107
+ observer.disconnect();
108
+ viewport?.removeEventListener("resize", sync);
109
+ viewport?.removeEventListener("scroll", sync);
110
+ };
111
+ }
112
+ return () => {
113
+ listeners.delete(onStoreChange);
114
+ if (listeners.size > 0) return;
115
+ teardown?.();
116
+ teardown = null;
117
+ };
118
+ }
119
+ function useKeyboardCollisionPadding() {
120
+ return useSyncExternalStore(
121
+ subscribe,
122
+ () => padding,
123
+ () => 0
124
+ );
125
+ }
126
+
127
+ export {
128
+ useAutoLimitTags,
129
+ useKeyboardCollisionPadding
130
+ };