@flamingo-stack/openframe-frontend-core 0.0.525-1675.4425.1 → 0.0.525

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 (107) hide show
  1. package/dist/{chunk-EJYTNLS3.cjs → chunk-2Y754G2Y.cjs} +4 -4
  2. package/dist/{chunk-EJYTNLS3.cjs.map → chunk-2Y754G2Y.cjs.map} +1 -1
  3. package/dist/{chunk-3TFFD2DF.js → chunk-34ELS3TN.js} +6 -6
  4. package/dist/{chunk-BTO3EDRL.js → chunk-3DMZEWGT.js} +2 -2
  5. package/dist/{chunk-UFXN4XQU.cjs → chunk-4TCZWKNG.cjs} +7 -7
  6. package/dist/{chunk-UFXN4XQU.cjs.map → chunk-4TCZWKNG.cjs.map} +1 -1
  7. package/dist/{chunk-45BJHYMZ.cjs → chunk-5HADK675.cjs} +31 -31
  8. package/dist/{chunk-45BJHYMZ.cjs.map → chunk-5HADK675.cjs.map} +1 -1
  9. package/dist/{chunk-QKQSCSDG.js → chunk-7LXIATGE.js} +2 -2
  10. package/dist/{chunk-H7A76OL4.js → chunk-A7T7F2VK.js} +2 -2
  11. package/dist/{chunk-OPPURTBM.cjs → chunk-B4VDDUDY.cjs} +11 -11
  12. package/dist/{chunk-OPPURTBM.cjs.map → chunk-B4VDDUDY.cjs.map} +1 -1
  13. package/dist/{chunk-IK3EES6I.js → chunk-B62XOPJM.js} +2 -2
  14. package/dist/{chunk-LGXE2AEV.cjs → chunk-BXPXAJVE.cjs} +26 -26
  15. package/dist/{chunk-LGXE2AEV.cjs.map → chunk-BXPXAJVE.cjs.map} +1 -1
  16. package/dist/{chunk-7VBPGRVN.js → chunk-DPA6NYW7.js} +1111 -1097
  17. package/dist/chunk-DPA6NYW7.js.map +1 -0
  18. package/dist/{chunk-4YLOTTXF.js → chunk-FT676E3S.js} +5 -5
  19. package/dist/{chunk-SDO4UX2O.js → chunk-HMO7D6ZU.js} +4 -4
  20. package/dist/{chunk-TZ4DGS4Q.cjs → chunk-N7K7NXT4.cjs} +87 -87
  21. package/dist/{chunk-TZ4DGS4Q.cjs.map → chunk-N7K7NXT4.cjs.map} +1 -1
  22. package/dist/{chunk-I56UVAQU.js → chunk-NHBSU2H4.js} +4 -4
  23. package/dist/{chunk-4MHFBAWI.js → chunk-NQIZYIZX.js} +2 -2
  24. package/dist/{chunk-5WLQP2TA.cjs → chunk-PX7RT53N.cjs} +61 -61
  25. package/dist/{chunk-5WLQP2TA.cjs.map → chunk-PX7RT53N.cjs.map} +1 -1
  26. package/dist/{chunk-JHJR4LW3.cjs → chunk-QDLE4L3G.cjs} +14 -14
  27. package/dist/{chunk-JHJR4LW3.cjs.map → chunk-QDLE4L3G.cjs.map} +1 -1
  28. package/dist/{chunk-YJ4HQMTZ.js → chunk-QJP5ZVQF.js} +2 -2
  29. package/dist/{chunk-AAUR5R54.cjs → chunk-QUQV7MYB.cjs} +9 -9
  30. package/dist/{chunk-AAUR5R54.cjs.map → chunk-QUQV7MYB.cjs.map} +1 -1
  31. package/dist/{chunk-VRZNLFUN.js → chunk-RE7MH2LV.js} +2 -2
  32. package/dist/{chunk-6UQWG5I3.cjs → chunk-VIQNJNS7.cjs} +5 -5
  33. package/dist/{chunk-6UQWG5I3.cjs.map → chunk-VIQNJNS7.cjs.map} +1 -1
  34. package/dist/{chunk-DIPOEVUM.cjs → chunk-W7WF6NZZ.cjs} +3 -3
  35. package/dist/{chunk-DIPOEVUM.cjs.map → chunk-W7WF6NZZ.cjs.map} +1 -1
  36. package/dist/{chunk-4F6PM3PZ.cjs → chunk-YGNMT4EL.cjs} +693 -679
  37. package/dist/chunk-YGNMT4EL.cjs.map +1 -0
  38. package/dist/{chunk-JWZ6BY72.cjs → chunk-YOUDRH3I.cjs} +26 -26
  39. package/dist/{chunk-JWZ6BY72.cjs.map → chunk-YOUDRH3I.cjs.map} +1 -1
  40. package/dist/{chunk-EZRCK5UW.js → chunk-Z54CJ6XW.js} +2 -2
  41. package/dist/{chunk-KPSTBHVJ.js → chunk-ZPGMEA64.js} +2 -2
  42. package/dist/{chunk-YIMLAERD.cjs → chunk-ZZMSUPDY.cjs} +37 -37
  43. package/dist/{chunk-YIMLAERD.cjs.map → chunk-ZZMSUPDY.cjs.map} +1 -1
  44. package/dist/components/case-studies/index.cjs +8 -8
  45. package/dist/components/case-studies/index.js +2 -2
  46. package/dist/components/chat/index.cjs +2 -2
  47. package/dist/components/chat/index.js +1 -1
  48. package/dist/components/contact/index.cjs +3 -3
  49. package/dist/components/contact/index.js +2 -2
  50. package/dist/components/docs/index.cjs +5 -5
  51. package/dist/components/docs/index.js +4 -4
  52. package/dist/components/embeds/index.cjs +3 -3
  53. package/dist/components/embeds/index.js +2 -2
  54. package/dist/components/faq/index.cjs +3 -3
  55. package/dist/components/faq/index.js +2 -2
  56. package/dist/components/features/index.cjs +2 -2
  57. package/dist/components/features/index.js +1 -1
  58. package/dist/components/help-center-pages/index.cjs +22 -22
  59. package/dist/components/help-center-pages/index.js +13 -13
  60. package/dist/components/index.cjs +132 -132
  61. package/dist/components/index.js +11 -11
  62. package/dist/components/meeting-scheduler/index.cjs +34 -34
  63. package/dist/components/meeting-scheduler/index.js +3 -3
  64. package/dist/components/navigation/index.cjs +2 -2
  65. package/dist/components/navigation/index.js +1 -1
  66. package/dist/components/onboarding-guides/index.cjs +5 -5
  67. package/dist/components/onboarding-guides/index.js +4 -4
  68. package/dist/components/related-content/index.cjs +3 -3
  69. package/dist/components/related-content/index.js +2 -2
  70. package/dist/components/tickets/index.cjs +6 -6
  71. package/dist/components/tickets/index.js +5 -5
  72. package/dist/components/ui/dropdown-button.d.ts +7 -6
  73. package/dist/components/ui/dropdown-button.d.ts.map +1 -1
  74. package/dist/components/ui/field.d.ts +7 -6
  75. package/dist/components/ui/field.d.ts.map +1 -1
  76. package/dist/components/ui/index.cjs +2 -2
  77. package/dist/components/ui/index.js +1 -1
  78. package/dist/components/ui/info-hint.d.ts.map +1 -1
  79. package/dist/components/ui/json-detail-list.d.ts.map +1 -1
  80. package/dist/components/ui/modal-guarded-close.d.ts.map +1 -1
  81. package/dist/components/ui/modal-v2.d.ts.map +1 -1
  82. package/dist/index.cjs +2 -2
  83. package/dist/index.js +1 -1
  84. package/package.json +1 -1
  85. package/src/components/ui/dropdown-button.tsx +28 -30
  86. package/src/components/ui/field.tsx +8 -7
  87. package/src/components/ui/info-hint.tsx +3 -1
  88. package/src/components/ui/json-detail-list.tsx +13 -7
  89. package/src/components/ui/modal-guarded-close.tsx +19 -1
  90. package/src/components/ui/modal-v2.tsx +9 -2
  91. package/src/stories/DropdownButton.stories.tsx +1 -1
  92. package/src/stories/InfoHint.stories.tsx +2 -2
  93. package/dist/chunk-4F6PM3PZ.cjs.map +0 -1
  94. package/dist/chunk-7VBPGRVN.js.map +0 -1
  95. /package/dist/{chunk-3TFFD2DF.js.map → chunk-34ELS3TN.js.map} +0 -0
  96. /package/dist/{chunk-BTO3EDRL.js.map → chunk-3DMZEWGT.js.map} +0 -0
  97. /package/dist/{chunk-QKQSCSDG.js.map → chunk-7LXIATGE.js.map} +0 -0
  98. /package/dist/{chunk-H7A76OL4.js.map → chunk-A7T7F2VK.js.map} +0 -0
  99. /package/dist/{chunk-IK3EES6I.js.map → chunk-B62XOPJM.js.map} +0 -0
  100. /package/dist/{chunk-4YLOTTXF.js.map → chunk-FT676E3S.js.map} +0 -0
  101. /package/dist/{chunk-SDO4UX2O.js.map → chunk-HMO7D6ZU.js.map} +0 -0
  102. /package/dist/{chunk-I56UVAQU.js.map → chunk-NHBSU2H4.js.map} +0 -0
  103. /package/dist/{chunk-4MHFBAWI.js.map → chunk-NQIZYIZX.js.map} +0 -0
  104. /package/dist/{chunk-YJ4HQMTZ.js.map → chunk-QJP5ZVQF.js.map} +0 -0
  105. /package/dist/{chunk-VRZNLFUN.js.map → chunk-RE7MH2LV.js.map} +0 -0
  106. /package/dist/{chunk-EZRCK5UW.js.map → chunk-Z54CJ6XW.js.map} +0 -0
  107. /package/dist/{chunk-KPSTBHVJ.js.map → chunk-ZPGMEA64.js.map} +0 -0
@@ -70,25 +70,31 @@ export interface JsonDetailListProps {
70
70
  }
71
71
 
72
72
  export function JsonDetailList({ data, depth = 0 }: JsonDetailListProps) {
73
+ let parseFailed = false
73
74
  const obj =
74
75
  typeof data === 'string'
75
76
  ? (() => {
76
77
  try {
77
78
  return JSON.parse(data) as unknown
78
79
  } catch {
80
+ parseFailed = true
79
81
  return null
80
82
  }
81
83
  })()
82
84
  : data
83
85
 
84
86
  if (!obj || typeof obj !== 'object' || Array.isArray(obj)) {
85
- // Not an object — render whatever it is faithfully.
86
- return typeof data === 'string' ? (
87
- <p className="whitespace-pre-wrap text-h6 text-ods-text-primary">{data}</p>
88
- ) : (
89
- <pre className="whitespace-pre-wrap text-code text-ods-text-secondary">
90
- {JSON.stringify(data, null, 2)}
91
- </pre>
87
+ // A string that ISN'T JSON is prose — show it as-is.
88
+ if (typeof data === 'string' && parseFailed) {
89
+ return <p className="whitespace-pre-wrap text-h6 text-ods-text-primary">{data}</p>
90
+ }
91
+ // Everything else is a real (parsed or given) non-object VALUE — an array,
92
+ // scalar, or null. Render the value through `Value`, never the source
93
+ // string: `'["a","b"]'` must render as the array, not as raw JSON text.
94
+ return (
95
+ <div className="text-h6">
96
+ <Value value={obj} depth={depth} />
97
+ </div>
92
98
  )
93
99
  }
94
100
 
@@ -41,6 +41,9 @@ export function useConfirm() {
41
41
  resolve: (ok: boolean) => void
42
42
  } | null>(null)
43
43
  const askingRef = React.useRef(false)
44
+ // Mirror of the active request, so unmount cleanup can settle it without
45
+ // depending on (already-frozen) state.
46
+ const pendingRef = React.useRef<{ resolve: (ok: boolean) => void } | null>(null)
44
47
  const ask = React.useCallback((title: string, body: string) => {
45
48
  return new Promise<boolean>((resolve) => {
46
49
  if (askingRef.current) {
@@ -48,19 +51,34 @@ export function useConfirm() {
48
51
  return
49
52
  }
50
53
  askingRef.current = true
51
- setPending({ title, body, resolve })
54
+ const entry = { title, body, resolve }
55
+ pendingRef.current = entry
56
+ setPending(entry)
52
57
  setOpen(true)
53
58
  })
54
59
  }, [])
55
60
  const decide = React.useCallback(
56
61
  (ok: boolean) => {
57
62
  askingRef.current = false
63
+ // Clear the ref FIRST so a later unmount cleanup can't re-resolve a
64
+ // request the user already decided.
65
+ pendingRef.current = null
58
66
  setOpen(false)
59
67
  pending?.resolve(ok)
60
68
  setPending(null)
61
69
  },
62
70
  [pending]
63
71
  )
72
+ // Host unmounted while the confirmation was open: the decision UI is gone,
73
+ // so settle the promise as "no" — otherwise the caller awaits forever.
74
+ React.useEffect(
75
+ () => () => {
76
+ pendingRef.current?.resolve(false)
77
+ pendingRef.current = null
78
+ askingRef.current = false
79
+ },
80
+ []
81
+ )
64
82
 
65
83
  const dialog = pending ? (
66
84
  <ModalV2 isOpen={open} onClose={() => decide(false)}>
@@ -153,8 +153,15 @@ const Modal = React.forwardRef<HTMLDivElement, ModalProps>(
153
153
  const handleKeyDown = (event: KeyboardEvent) => {
154
154
  // A nested Radix layer (Select, DropdownMenu) preventDefaults the
155
155
  // Escape it consumes — without this check, closing a select inside
156
- // the modal closed the WHOLE modal.
157
- if (event.key === 'Escape' && !event.defaultPrevented) {
156
+ // the modal closed the WHOLE modal. The stack check keeps Escape a
157
+ // topmost-only affair: every open modal registers this listener, so
158
+ // with stacked modals (confirm above a form) one Escape would
159
+ // otherwise close BOTH.
160
+ if (
161
+ event.key === 'Escape' &&
162
+ !event.defaultPrevented &&
163
+ modalStack[modalStack.length - 1] === stackIdRef.current
164
+ ) {
158
165
  onClose()
159
166
  }
160
167
  }
@@ -27,7 +27,7 @@ const meta = {
27
27
  },
28
28
  decorators: [
29
29
  (Story) => (
30
- <div className="flex min-h-[320px] items-start justify-center p-8">
30
+ <div className="flex min-h-80 items-start justify-center p-8">
31
31
  <Story />
32
32
  </div>
33
33
  ),
@@ -31,7 +31,7 @@ export const Default: Story = {
31
31
  children: 'Judged rules are evaluated by an LLM against the diff; deterministic rules run as code.',
32
32
  },
33
33
  render: args => (
34
- <div className="flex min-h-[160px] items-center justify-center">
34
+ <div className="flex min-h-40 items-center justify-center">
35
35
  <span className="inline-flex items-center gap-1.5 text-h6 text-ods-text-primary">
36
36
  Judged rules
37
37
  <InfoHint {...args} />
@@ -49,7 +49,7 @@ export const InALabelRow: Story = {
49
49
  children: 'Placeholder',
50
50
  },
51
51
  render: () => (
52
- <div className="flex min-h-[160px] flex-col items-start justify-center gap-[var(--spacing-system-sf)]">
52
+ <div className="flex min-h-40 flex-col items-start justify-center gap-[var(--spacing-system-sf)]">
53
53
  <span className="inline-flex items-center gap-1.5 text-h6 text-ods-text-primary">
54
54
  Observe
55
55
  <InfoHint label="Observe">Runs the rule and records the outcome without blocking the PR.</InfoHint>