@flamingo-stack/openframe-frontend-core 0.0.849 → 0.0.851

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 (140) hide show
  1. package/dist/build/export-map.json +1 -1
  2. package/dist/chat-protocol/events.d.ts +4 -1
  3. package/dist/chat-protocol/events.d.ts.map +1 -1
  4. package/dist/chat-protocol/index.cjs +90 -40
  5. package/dist/chat-protocol/nats-decoder.d.ts.map +1 -1
  6. package/dist/chat-protocol/nats-decoder.js +5 -1
  7. package/dist/chat-protocol/policy-review.d.ts +18 -0
  8. package/dist/chat-protocol/policy-review.d.ts.map +1 -0
  9. package/dist/chat-protocol/policy-review.js +55 -0
  10. package/dist/{chunk-C3P7IUTU.cjs → chunk-2NGW73T2.cjs} +5 -4
  11. package/dist/{chunk-SHQY4GOE.cjs → chunk-2WZHNMQY.cjs} +67 -67
  12. package/dist/{chunk-R5JPZ6TY.cjs → chunk-5SEJEBAB.cjs} +8 -8
  13. package/dist/{chunk-TX4NTH22.cjs → chunk-B6D4WWKD.cjs} +36 -36
  14. package/dist/{chunk-FXLROQUT.cjs → chunk-CDW6JTAQ.cjs} +442 -459
  15. package/dist/{chunk-5PIR77V5.cjs → chunk-DN227KZH.cjs} +4 -4
  16. package/dist/{chunk-MC3L525K.cjs → chunk-FGSN5UNY.cjs} +3 -3
  17. package/dist/{chunk-ZGEWT3SF.cjs → chunk-HXURNKXI.cjs} +3 -3
  18. package/dist/{chunk-FRG724DU.cjs → chunk-KRTTH3ET.cjs} +4 -4
  19. package/dist/{chunk-YJZ7R3W5.cjs → chunk-KXFIYO4O.cjs} +8 -8
  20. package/dist/{chunk-4YBS4HIO.cjs → chunk-LM7EL3UQ.cjs} +444 -27
  21. package/dist/{chunk-YYHQY3K6.cjs → chunk-NQEPLUUW.cjs} +21 -21
  22. package/dist/{chunk-KXBZCUDW.cjs → chunk-ODMZSAIY.cjs} +36 -36
  23. package/dist/{chunk-36XWCVSM.cjs → chunk-OUP7L3U5.cjs} +50 -50
  24. package/dist/{chunk-5CBI2ZYV.cjs → chunk-PJNEBSP5.cjs} +5 -5
  25. package/dist/{chunk-6AJYGXXS.cjs → chunk-PPCRLSVR.cjs} +11 -11
  26. package/dist/{chunk-SA2NNWIJ.cjs → chunk-QCSA7GIX.cjs} +17 -62
  27. package/dist/{chunk-PV2XQJ2R.cjs → chunk-SPKAXETT.cjs} +42 -42
  28. package/dist/{chunk-IKOL6NJY.cjs → chunk-U4RTWH5D.cjs} +53 -43
  29. package/dist/{chunk-IHY7E4EX.cjs → chunk-UFGPLXH6.cjs} +4 -4
  30. package/dist/{chunk-TEKN6TJ5.cjs → chunk-UQK6J3ZS.cjs} +13 -13
  31. package/dist/{chunk-S3QXLD4X.cjs → chunk-VCFQHPOO.cjs} +37 -3
  32. package/dist/{chunk-Z5UCDEKZ.cjs → chunk-VU6N3NZS.cjs} +6 -6
  33. package/dist/{chunk-ZY34R37A.cjs → chunk-VXIZCUNZ.cjs} +61 -61
  34. package/dist/{chunk-3W4ASAXN.cjs → chunk-WYROOMUZ.cjs} +2 -2
  35. package/dist/{chunk-YLETC7LP.cjs → chunk-ZEPEFKHA.cjs} +893 -973
  36. package/dist/{cloud-tenants-HKUUEUAY.cjs → cloud-tenants-XH6GV4EI.cjs} +12 -13
  37. package/dist/components/case-studies/index.cjs +24 -25
  38. package/dist/components/chat/approval-batch-message.d.ts +5 -0
  39. package/dist/components/chat/approval-batch-message.d.ts.map +1 -1
  40. package/dist/components/chat/approval-batch-message.js +36 -10
  41. package/dist/components/chat/index.cjs +8 -9
  42. package/dist/components/chat/policy-review.d.ts +27 -0
  43. package/dist/components/chat/policy-review.d.ts.map +1 -0
  44. package/dist/components/chat/policy-review.js +67 -0
  45. package/dist/components/chat/stream/message-mutations.d.ts.map +1 -1
  46. package/dist/components/chat/stream/message-mutations.js +4 -1
  47. package/dist/components/chat/tool-execution-display.d.ts.map +1 -1
  48. package/dist/components/chat/tool-execution-display.js +16 -5
  49. package/dist/components/chat/types/message.types.d.ts +40 -2
  50. package/dist/components/chat/types/message.types.d.ts.map +1 -1
  51. package/dist/components/chat/utils/extract-incomplete-message-state.d.ts.map +1 -1
  52. package/dist/components/chat/utils/extract-incomplete-message-state.js +2 -0
  53. package/dist/components/chat/utils/message-segment-accumulator.d.ts.map +1 -1
  54. package/dist/components/chat/utils/message-segment-accumulator.js +3 -0
  55. package/dist/components/chat/utils/process-historical-messages.d.ts +2 -2
  56. package/dist/components/chat/utils/process-historical-messages.d.ts.map +1 -1
  57. package/dist/components/chat/utils/process-historical-messages.js +7 -1
  58. package/dist/components/contact/index.cjs +13 -14
  59. package/dist/components/docs/index.cjs +16 -17
  60. package/dist/components/embeds/embed-viewer-frame.d.ts +2 -0
  61. package/dist/components/embeds/embed-viewer-frame.d.ts.map +1 -1
  62. package/dist/components/embeds/embed-viewer-frame.js +12 -2
  63. package/dist/components/embeds/index.cjs +13 -14
  64. package/dist/components/embeds/pdf-viewer.d.ts.map +1 -1
  65. package/dist/components/embeds/pdf-viewer.js +2 -1
  66. package/dist/components/faq/index.cjs +14 -15
  67. package/dist/components/features/approval-level.d.ts +6 -12
  68. package/dist/components/features/approval-level.d.ts.map +1 -1
  69. package/dist/components/features/approval-level.js +45 -55
  70. package/dist/components/features/index.cjs +17 -15
  71. package/dist/components/features/notifications/approval-request-notification-tile.d.ts.map +1 -1
  72. package/dist/components/features/notifications/approval-request-notification-tile.js +71 -48
  73. package/dist/components/features/notifications/types.d.ts +2 -0
  74. package/dist/components/features/notifications/types.d.ts.map +1 -1
  75. package/dist/components/features/notifications/types.js +3 -1
  76. package/dist/components/features/policy-configuration-panel.d.ts.map +1 -1
  77. package/dist/components/features/policy-configuration-panel.js +75 -64
  78. package/dist/components/features/software/index.d.ts +1 -1
  79. package/dist/components/features/software/index.d.ts.map +1 -1
  80. package/dist/components/features/software/index.js +2 -0
  81. package/dist/components/features/software/software-action-copy.d.ts.map +1 -1
  82. package/dist/components/features/software/software-action-copy.js +6 -12
  83. package/dist/components/features/software/software-action-form.d.ts +7 -1
  84. package/dist/components/features/software/software-action-form.d.ts.map +1 -1
  85. package/dist/components/features/software/software-action-form.js +11 -3
  86. package/dist/components/features/software/update-settings-fields.d.ts +12 -1
  87. package/dist/components/features/software/update-settings-fields.d.ts.map +1 -1
  88. package/dist/components/features/software/update-settings-fields.js +57 -29
  89. package/dist/components/help-center-pages/index.cjs +78 -79
  90. package/dist/components/index.cjs +58 -58
  91. package/dist/components/meeting-scheduler/index.cjs +61 -61
  92. package/dist/components/navigation/index.cjs +15 -16
  93. package/dist/components/onboarding-guides/index.cjs +14 -15
  94. package/dist/components/product-demo/index.cjs +23 -24
  95. package/dist/components/tickets/index.cjs +17 -18
  96. package/dist/components/ui/file-manager/index.cjs +8 -9
  97. package/dist/components/ui/index.cjs +16 -18
  98. package/dist/components/ui/page-actions.d.ts.map +1 -1
  99. package/dist/components/ui/page-actions.js +11 -1
  100. package/dist/components/ui/radio-group.d.ts.map +1 -1
  101. package/dist/components/ui/radio-group.js +8 -2
  102. package/dist/components/ui/tab-selector.d.ts +7 -1
  103. package/dist/components/ui/tab-selector.d.ts.map +1 -1
  104. package/dist/components/ui/tab-selector.js +22 -3
  105. package/dist/{devices-P7M4Z7VP.cjs → devices-7PT6MPJI.cjs} +13 -14
  106. package/dist/{embeddable-chat-322NDFP5.cjs → embeddable-chat-5NY76K7K.cjs} +84 -85
  107. package/dist/index.cjs +24 -24
  108. package/dist/{knowledge-TC7JLOWI.cjs → knowledge-J6N7IEVI.cjs} +13 -14
  109. package/dist/{logs-GPOYCP4B.cjs → logs-D6KQP2BX.cjs} +19 -20
  110. package/dist/{policies-ZUHOUMDD.cjs → policies-J7MCOL3C.cjs} +16 -17
  111. package/dist/{remote-session-NT4NG7EF.cjs → remote-session-PXHA5KFK.cjs} +8 -9
  112. package/dist/{scripts-FOEVDGTH.cjs → scripts-VURXIHVS.cjs} +19 -20
  113. package/dist/{software-update-XGTMNFST.cjs → software-update-6SHUBDIE.cjs} +16 -17
  114. package/dist/{tickets-board-7FLGQEHF.cjs → tickets-board-NLCN7WNX.cjs} +9 -9
  115. package/package.json +1 -1
  116. package/src/chat-protocol/events.ts +4 -1
  117. package/src/chat-protocol/nats-decoder.ts +4 -0
  118. package/src/chat-protocol/policy-review.ts +71 -0
  119. package/src/components/chat/approval-batch-message.tsx +47 -10
  120. package/src/components/chat/policy-review.tsx +90 -0
  121. package/src/components/chat/stream/message-mutations.ts +4 -0
  122. package/src/components/chat/tool-execution-display.tsx +23 -4
  123. package/src/components/chat/types/message.types.ts +42 -2
  124. package/src/components/chat/utils/extract-incomplete-message-state.ts +2 -0
  125. package/src/components/chat/utils/message-segment-accumulator.ts +3 -0
  126. package/src/components/chat/utils/process-historical-messages.ts +14 -3
  127. package/src/components/embeds/embed-viewer-frame.tsx +10 -2
  128. package/src/components/embeds/pdf-viewer.tsx +4 -1
  129. package/src/components/features/approval-level.tsx +74 -78
  130. package/src/components/features/notifications/approval-request-notification-tile.tsx +75 -50
  131. package/src/components/features/notifications/types.ts +4 -0
  132. package/src/components/features/policy-configuration-panel.tsx +100 -83
  133. package/src/components/features/software/index.ts +1 -0
  134. package/src/components/features/software/software-action-copy.ts +19 -12
  135. package/src/components/features/software/software-action-form.tsx +16 -3
  136. package/src/components/features/software/update-settings-fields.tsx +104 -32
  137. package/src/components/ui/page-actions.tsx +19 -2
  138. package/src/components/ui/radio-group.tsx +20 -2
  139. package/src/components/ui/tab-selector.tsx +26 -3
  140. package/dist/chunk-N3MBQRCQ.cjs +0 -41
@@ -527,9 +527,26 @@ function CompactPrimaryActions({ actions, loading: loadingProp }: { actions: Pag
527
527
  );
528
528
  }
529
529
 
530
+ const subscribeNothing = () => () => {};
531
+
532
+ /**
533
+ * False on the server and through hydration, true after: what lets a render use a value only the client measures and
534
+ * still hydrate into the server's markup.
535
+ */
536
+ function useHydrated(): boolean {
537
+ return React.useSyncExternalStore(
538
+ subscribeNothing,
539
+ () => true,
540
+ () => false,
541
+ );
542
+ }
543
+
530
544
  function MobileBottomActions({ actions, loading: loadingProp }: { actions: PageActionButton[]; loading?: boolean }) {
531
545
  const loading = useLoadingScope() || loadingProp;
532
- // Over the composer dock where the layout has one.
546
+ // Over the composer dock where the layout has one. `AppLayout` measures the dock after it mounts, and a page hydrates
547
+ // after the layout, so the height is often known by the bar's first client render: drawn then, it would not match the
548
+ // server's markup (no offset). The bar takes it from the render after hydration instead.
549
+ const hydrated = useHydrated();
533
550
  const dockHeight = useComposerDockHeight();
534
551
  // Its height, for the chrome that stays clear of it (`useMobileActionBarHeight`).
535
552
  const barRef = React.useRef<HTMLDivElement>(null);
@@ -543,7 +560,7 @@ function MobileBottomActions({ actions, loading: loadingProp }: { actions: PageA
543
560
  <div
544
561
  ref={barRef}
545
562
  data-testid="mobile-action-bar"
546
- style={dockHeight > 0 ? { bottom: dockHeight } : undefined}
563
+ style={hydrated && dockHeight > 0 ? { bottom: dockHeight } : undefined}
547
564
  className={cn(
548
565
  'fixed bottom-0 left-0 right-0 z-50 md:hidden',
549
566
  'border-t border-ods-border bg-ods-card',
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
 
3
3
  import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
4
- import { type ComponentPropsWithoutRef, type ComponentRef, type ReactNode, forwardRef } from 'react';
4
+ import { type ComponentPropsWithoutRef, type ComponentRef, type ReactNode, forwardRef, useState } from 'react';
5
5
 
6
6
  import { CONTROL_SIZE } from '../../styles/component-sizes';
7
7
  import { cn } from '../../utils/cn';
@@ -126,6 +126,10 @@ const RadioGroupBlock = forwardRef<ComponentRef<typeof RadioGroupPrimitive.Root>
126
126
  loading && options.length === 0 ? Array.from({ length: skeletonCount }, () => null) : options;
127
127
  const isGrouped = variant === 'grouped';
128
128
  const isHorizontal = orientation === 'horizontal';
129
+ // The options the block first showed loaded. One added after that (a row the user's action brought in) fades in, as
130
+ // new rows do across the system; the first options, and the skeleton's swap to them, do not.
131
+ const [firstOptions, setFirstOptions] = useState<ReadonlySet<string> | null>(null);
132
+ if (!loading && firstOptions === null) setFirstOptions(new Set(options.map(option => option.value)));
129
133
  return (
130
134
  <div className={cn('relative flex w-full flex-col', className)}>
131
135
  <RadioGroupPrimitive.Root
@@ -215,7 +219,13 @@ const RadioGroupBlock = forwardRef<ComponentRef<typeof RadioGroupPrimitive.Root>
215
219
  )
216
220
  )}
217
221
  </div>
218
- {option?.trailing && <div className="ml-auto flex shrink-0 items-center">{option.trailing}</div>}
222
+ {/* The row's full height, its content centred whatever the row aligns (a design may top-align the dot with
223
+ the label); a trailing node can still place itself (`self-start`). */}
224
+ {option?.trailing && (
225
+ <div data-radio-trailing className="ml-auto flex shrink-0 items-center self-stretch">
226
+ {option.trailing}
227
+ </div>
228
+ )}
219
229
  </>
220
230
  );
221
231
  return (
@@ -236,6 +246,10 @@ const RadioGroupBlock = forwardRef<ComponentRef<typeof RadioGroupPrimitive.Root>
236
246
  // CheckboxBlock — the border stays put so an unselected row
237
247
  // never flashes "selected" under the cursor.
238
248
  interactive && 'hover:bg-ods-bg-hover active:bg-ods-bg-active',
249
+ // A control in `trailing` (a button, a menu) is its own target: on it, the row is not hovered or
250
+ // pressed, so the row never looks like what the click will do.
251
+ interactive &&
252
+ '[&:has([data-radio-trailing]_:active)]:bg-ods-card [&:has([data-radio-trailing]_:hover)]:bg-ods-card',
239
253
  isGrouped
240
254
  ? cn(
241
255
  'bg-ods-card px-[var(--spacing-system-sf)] py-[var(--spacing-system-xs,8px)]',
@@ -254,6 +268,10 @@ const RadioGroupBlock = forwardRef<ComponentRef<typeof RadioGroupPrimitive.Root>
254
268
  // `Tag`'s label is a span too, and it went invisible against
255
269
  // its own fill.
256
270
  isDisabled && 'bg-ods-bg',
271
+ option &&
272
+ firstOptions !== null &&
273
+ !firstOptions.has(option.value) &&
274
+ 'duration-300 animate-in fade-in slide-in-from-top-2 motion-reduce:animate-none',
257
275
  // With a footer the option stacks: its row, then the footer.
258
276
  hasFooter && 'flex-col items-stretch gap-[var(--spacing-system-sf)]',
259
277
  itemClassName,
@@ -30,6 +30,12 @@ export interface TabSelectorProps {
30
30
  items: TabSelectorItem[];
31
31
  /** Visual variant: primary (accent bg) or secondary (soft grey bg) */
32
32
  variant?: 'primary' | 'secondary';
33
+ /**
34
+ * `compact`: an icon-only strip at its content's width: 44px tall, 36px segments and 20px icons from `content-md`,
35
+ * 40 / 32 / 16px below it (the guardrails level picker, Figma 4365-22670 / 4365-22462). Default: the full-width
36
+ * strip, 48px at `content-md`.
37
+ */
38
+ size?: 'default' | 'compact';
33
39
  /** Optional label displayed above the selector */
34
40
  label?: string;
35
41
  /** Disable the entire selector (overrides per-item enabled state) */
@@ -51,6 +57,7 @@ export function TabSelector({
51
57
  onValueChange,
52
58
  items,
53
59
  variant = 'primary',
60
+ size = 'default',
54
61
  label,
55
62
  disabled,
56
63
  scrollable = false,
@@ -63,6 +70,7 @@ export function TabSelector({
63
70
  // renders in its title bar adapts by context, with no re-styling at the
64
71
  // call site.
65
72
  const flush = useIsInActionsMenuHeader();
73
+ const compact = size === 'compact';
66
74
  return (
67
75
  <div
68
76
  className={cn('flex flex-col gap-[var(--spacing-system-xxs)]', disabled && 'opacity-50', className)}
@@ -79,7 +87,11 @@ export function TabSelector({
79
87
  'flex gap-[var(--spacing-system-xxs)] bg-ods-bg p-[var(--spacing-system-xxs)]',
80
88
  flush
81
89
  ? 'h-10 w-full'
82
- : cn('h-11 rounded-md border border-ods-border content-md:h-12', scrollable ? 'overflow-x-auto' : 'w-full'),
90
+ : cn(
91
+ 'rounded-md border border-ods-border',
92
+ compact ? 'h-10 content-md:h-11' : 'h-11 content-md:h-12',
93
+ scrollable ? 'overflow-x-auto' : compact ? 'w-auto' : 'w-full',
94
+ ),
83
95
  )}
84
96
  >
85
97
  {items.map(item => {
@@ -101,10 +113,21 @@ export function TabSelector({
101
113
  data-tone={variant === 'primary' ? 'accent' : undefined}
102
114
  // scrollable: intrinsic widths must sum past the container or nothing ever overflows (flex-1's basis-0
103
115
  // defeats the scroll).
104
- className={cn('h-full', scrollable ? 'flex-none shrink-0 basis-auto' : 'flex-1')}
116
+ className={cn(
117
+ 'h-full',
118
+ compact ? 'w-8 flex-none content-md:w-9' : scrollable ? 'flex-none shrink-0 basis-auto' : 'flex-1',
119
+ )}
105
120
  >
106
121
  {item.icon && (
107
- <span className="flex size-4 shrink-0 items-center justify-center content-md:size-6">{item.icon}</span>
122
+ <span
123
+ className={cn(
124
+ 'flex shrink-0 items-center justify-center',
125
+ // compact: the box sizes the icon, whatever size the caller drew it at.
126
+ compact ? 'size-4 content-md:size-5 [&>svg]:size-full' : 'size-4 content-md:size-6',
127
+ )}
128
+ >
129
+ {item.icon}
130
+ </span>
108
131
  )}
109
132
  {item.label}
110
133
  {item.badge && item.badge}
@@ -1,41 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }"use client";
2
-
3
-
4
- var _chunk63A4GZMBcjs = require('./chunk-63A4GZMB.cjs');
5
-
6
- // src/components/ui/label.tsx
7
- var _reactlabel = require('@radix-ui/react-label'); var LabelPrimitive = _interopRequireWildcard(_reactlabel);
8
- var _classvarianceauthority = require('class-variance-authority');
9
- var _react = require('react');
10
- var _jsxruntime = require('react/jsx-runtime');
11
- var LABEL_TEXT_CLASS = "block text-ods-text-primary text-h6";
12
- var labelVariants = _classvarianceauthority.cva.call(void 0, "", {
13
- variants: {
14
- variant: {
15
- default: LABEL_TEXT_CLASS,
16
- /** @deprecated alias of `default` — the three small scales converged on text-h6. */
17
- small: LABEL_TEXT_CLASS,
18
- /** @deprecated alias of `default`. */
19
- medium: LABEL_TEXT_CLASS,
20
- large: _chunk63A4GZMBcjs.cn.call(void 0, LABEL_TEXT_CLASS, "text-h4"),
21
- /** A click surface that labels its control: no typography, the site's `className` is its look. */
22
- surface: ""
23
- },
24
- spacing: {
25
- none: "",
26
- tight: "mb-0.5",
27
- normal: "mb-2",
28
- loose: "mb-3"
29
- }
30
- },
31
- defaultVariants: {
32
- variant: "default",
33
- spacing: "none"
34
- }
35
- });
36
- var Label = _react.forwardRef.call(void 0, ({ className, variant, spacing, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, LabelPrimitive.Root, { ref, className: _chunk63A4GZMBcjs.cn.call(void 0, labelVariants({ variant, spacing }), className), ...props }));
37
- Label.displayName = LabelPrimitive.Root.displayName;
38
-
39
-
40
-
41
- exports.Label = Label;