@flamingo-stack/openframe-frontend-core 0.0.652-2251.6519.1 → 0.0.652
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-6RJQVSJ3.cjs → chunk-27OZEE3E.cjs} +12 -12
- package/dist/{chunk-6RJQVSJ3.cjs.map → chunk-27OZEE3E.cjs.map} +1 -1
- package/dist/{chunk-Z5DLDFQN.js → chunk-2FWS52HR.js} +5 -5
- package/dist/{chunk-WQJQ734M.js → chunk-3DWDJ54N.js} +2 -7
- package/dist/{chunk-WQJQ734M.js.map → chunk-3DWDJ54N.js.map} +1 -1
- package/dist/{chunk-7CUXXKED.cjs → chunk-4T7E2SWL.cjs} +20 -20
- package/dist/{chunk-7CUXXKED.cjs.map → chunk-4T7E2SWL.cjs.map} +1 -1
- package/dist/{chunk-Y5ULSHXI.js → chunk-74EGKPX3.js} +4 -4
- package/dist/{chunk-4JVFUZWM.cjs → chunk-AAITIXRL.cjs} +28 -28
- package/dist/{chunk-4JVFUZWM.cjs.map → chunk-AAITIXRL.cjs.map} +1 -1
- package/dist/{chunk-NTFCOLBN.js → chunk-ADXTLFG7.js} +5 -5
- package/dist/{chunk-5Q2WO6BM.js → chunk-AGQZRNYV.js} +6 -6
- package/dist/{chunk-7VXLH5OR.js → chunk-BRIJIC6E.js} +6 -6
- package/dist/{chunk-AKG6O27E.cjs → chunk-BXE3DLIC.cjs} +22 -22
- package/dist/{chunk-AKG6O27E.cjs.map → chunk-BXE3DLIC.cjs.map} +1 -1
- package/dist/{chunk-HXZKMQRX.js → chunk-DPXRYIMC.js} +6 -28
- package/dist/{chunk-HXZKMQRX.js.map → chunk-DPXRYIMC.js.map} +1 -1
- package/dist/{chunk-XQBG3YDI.cjs → chunk-DVT5JCLD.cjs} +3 -3
- package/dist/{chunk-XQBG3YDI.cjs.map → chunk-DVT5JCLD.cjs.map} +1 -1
- package/dist/{chunk-EDQDGO7M.cjs → chunk-ERFHLMWM.cjs} +386 -350
- package/dist/chunk-ERFHLMWM.cjs.map +1 -0
- package/dist/{chunk-H5DPPRPE.cjs → chunk-EX5PJGVA.cjs} +2 -7
- package/dist/chunk-EX5PJGVA.cjs.map +1 -0
- package/dist/{chunk-FIB2BVCL.cjs → chunk-EY2OVL3Z.cjs} +15 -15
- package/dist/{chunk-FIB2BVCL.cjs.map → chunk-EY2OVL3Z.cjs.map} +1 -1
- package/dist/{chunk-HUSOLDNQ.cjs → chunk-FBKB4HCZ.cjs} +7 -7
- package/dist/{chunk-HUSOLDNQ.cjs.map → chunk-FBKB4HCZ.cjs.map} +1 -1
- package/dist/{chunk-JGTPRGJK.js → chunk-HM6D2YHS.js} +3 -3
- package/dist/{chunk-PPWZY57I.js → chunk-HSPLCV56.js} +3 -3
- package/dist/{chunk-7DZOKU3K.cjs → chunk-I3KD7T6K.cjs} +59 -59
- package/dist/{chunk-7DZOKU3K.cjs.map → chunk-I3KD7T6K.cjs.map} +1 -1
- package/dist/{chunk-MQLAONRH.cjs → chunk-I5Y6ZALR.cjs} +81 -81
- package/dist/{chunk-MQLAONRH.cjs.map → chunk-I5Y6ZALR.cjs.map} +1 -1
- package/dist/{chunk-QCDQOY2G.cjs → chunk-JCVGQDQV.cjs} +33 -33
- package/dist/{chunk-QCDQOY2G.cjs.map → chunk-JCVGQDQV.cjs.map} +1 -1
- package/dist/{chunk-2556C4VD.cjs → chunk-JWY5ES3H.cjs} +10 -10
- package/dist/{chunk-2556C4VD.cjs.map → chunk-JWY5ES3H.cjs.map} +1 -1
- package/dist/{chunk-F3YAIR6Z.js → chunk-LDC37FG4.js} +3 -3
- package/dist/{chunk-E4R52QDU.js → chunk-LECSFMGM.js} +185 -149
- package/dist/{chunk-E4R52QDU.js.map → chunk-LECSFMGM.js.map} +1 -1
- package/dist/{chunk-EENH7NU2.js → chunk-LUEURQOY.js} +7 -7
- package/dist/{chunk-243ZVXD3.js → chunk-M4AD2PHE.js} +2 -2
- package/dist/{chunk-NBTIWREJ.js → chunk-N4RVPWPM.js} +3 -3
- package/dist/{chunk-JTR4RHTD.js → chunk-NTJUFHX2.js} +2 -2
- package/dist/{chunk-EC5HDDZR.cjs → chunk-OFLGZRJW.cjs} +154 -176
- package/dist/chunk-OFLGZRJW.cjs.map +1 -0
- package/dist/{chunk-OW3QFWPW.js → chunk-QUNY6URW.js} +3 -3
- package/dist/{chunk-QAVM7AAM.js → chunk-QZJ4K7SG.js} +4 -4
- package/dist/{chunk-YEPWMJ56.js → chunk-TGHSQUTD.js} +3 -3
- package/dist/{chunk-VG2HD22L.cjs → chunk-UEFHMMJX.cjs} +29 -29
- package/dist/{chunk-VG2HD22L.cjs.map → chunk-UEFHMMJX.cjs.map} +1 -1
- package/dist/{chunk-LX5I5TAZ.cjs → chunk-VIHX7ADQ.cjs} +5 -5
- package/dist/{chunk-LX5I5TAZ.cjs.map → chunk-VIHX7ADQ.cjs.map} +1 -1
- package/dist/{chunk-SFVK5HWQ.cjs → chunk-XGD6SCHN.cjs} +32 -32
- package/dist/{chunk-SFVK5HWQ.cjs.map → chunk-XGD6SCHN.cjs.map} +1 -1
- package/dist/{chunk-MVRLLLM6.cjs → chunk-ZVLOG2AV.cjs} +6 -6
- package/dist/{chunk-MVRLLLM6.cjs.map → chunk-ZVLOG2AV.cjs.map} +1 -1
- package/dist/components/case-studies/index.cjs +16 -16
- package/dist/components/case-studies/index.js +4 -4
- package/dist/components/chat/entity-cards/dispatch.d.ts.map +1 -1
- package/dist/components/chat/index.cjs +3 -3
- package/dist/components/chat/index.js +2 -2
- package/dist/components/contact/index.cjs +5 -5
- package/dist/components/contact/index.js +4 -4
- package/dist/components/docs/index.cjs +8 -8
- package/dist/components/docs/index.js +7 -7
- package/dist/components/embeds/index.cjs +5 -5
- package/dist/components/embeds/index.js +4 -4
- package/dist/components/faq/index.cjs +5 -5
- package/dist/components/faq/index.js +4 -4
- package/dist/components/features/index.cjs +4 -4
- package/dist/components/features/index.js +3 -3
- package/dist/components/features/section-selector.d.ts +13 -0
- package/dist/components/features/section-selector.d.ts.map +1 -1
- package/dist/components/help-center-pages/index.cjs +24 -24
- package/dist/components/help-center-pages/index.js +15 -15
- package/dist/components/index.cjs +54 -54
- package/dist/components/index.js +15 -15
- package/dist/components/meeting-scheduler/index.cjs +40 -40
- package/dist/components/meeting-scheduler/index.js +3 -3
- package/dist/components/navigation/index.cjs +7 -7
- package/dist/components/navigation/index.js +6 -6
- package/dist/components/onboarding-guides/index.cjs +7 -7
- package/dist/components/onboarding-guides/index.js +6 -6
- package/dist/components/related-content/index.cjs +3 -3
- package/dist/components/related-content/index.js +2 -2
- package/dist/components/tickets/index.cjs +8 -8
- package/dist/components/tickets/index.js +7 -7
- package/dist/components/ui/index.cjs +4 -4
- package/dist/components/ui/index.js +3 -3
- package/dist/index.cjs +9 -9
- package/dist/index.js +7 -7
- package/dist/utils/index.cjs +4 -21
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.js +4 -21
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/list-url.d.ts.map +1 -1
- package/dist/utils/source-icons.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/chat/entity-cards/dispatch.tsx +0 -10
- package/src/components/features/section-selector.tsx +79 -6
- package/src/utils/__tests__/list-url.test.ts +0 -5
- package/src/utils/list-url.ts +0 -5
- package/src/utils/source-icons.ts +0 -15
- package/dist/chunk-EC5HDDZR.cjs.map +0 -1
- package/dist/chunk-EDQDGO7M.cjs.map +0 -1
- package/dist/chunk-H5DPPRPE.cjs.map +0 -1
- /package/dist/{chunk-Z5DLDFQN.js.map → chunk-2FWS52HR.js.map} +0 -0
- /package/dist/{chunk-Y5ULSHXI.js.map → chunk-74EGKPX3.js.map} +0 -0
- /package/dist/{chunk-NTFCOLBN.js.map → chunk-ADXTLFG7.js.map} +0 -0
- /package/dist/{chunk-5Q2WO6BM.js.map → chunk-AGQZRNYV.js.map} +0 -0
- /package/dist/{chunk-7VXLH5OR.js.map → chunk-BRIJIC6E.js.map} +0 -0
- /package/dist/{chunk-JGTPRGJK.js.map → chunk-HM6D2YHS.js.map} +0 -0
- /package/dist/{chunk-PPWZY57I.js.map → chunk-HSPLCV56.js.map} +0 -0
- /package/dist/{chunk-F3YAIR6Z.js.map → chunk-LDC37FG4.js.map} +0 -0
- /package/dist/{chunk-EENH7NU2.js.map → chunk-LUEURQOY.js.map} +0 -0
- /package/dist/{chunk-243ZVXD3.js.map → chunk-M4AD2PHE.js.map} +0 -0
- /package/dist/{chunk-NBTIWREJ.js.map → chunk-N4RVPWPM.js.map} +0 -0
- /package/dist/{chunk-JTR4RHTD.js.map → chunk-NTJUFHX2.js.map} +0 -0
- /package/dist/{chunk-OW3QFWPW.js.map → chunk-QUNY6URW.js.map} +0 -0
- /package/dist/{chunk-QAVM7AAM.js.map → chunk-QZJ4K7SG.js.map} +0 -0
- /package/dist/{chunk-YEPWMJ56.js.map → chunk-TGHSQUTD.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-url.d.ts","sourceRoot":"","sources":["../../src/utils/list-url.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAWH;;;;iEAIiE;AACjE,wBAAgB,uBAAuB,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,CAKtE;
|
|
1
|
+
{"version":3,"file":"list-url.d.ts","sourceRoot":"","sources":["../../src/utils/list-url.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAWH;;;;iEAIiE;AACjE,wBAAgB,uBAAuB,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,CAKtE;AAqED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,YAAY,CAAC,cAAc,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,IAAI,SAAK,GAAG,MAAM,GAAG,IAAI,CAa5F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"source-icons.d.ts","sourceRoot":"","sources":["../../src/utils/source-icons.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,6EAA6E;AAC7E,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"source-icons.d.ts","sourceRoot":"","sources":["../../src/utils/source-icons.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,6EAA6E;AAC7E,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAsDpD,CAAC;AAEF;;6DAE6D;AAC7D,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAGxF;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA4DzD,CAAC;AAEF;;kEAEkE;AAClE,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,iCAAiC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAsDpE,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAEjF;AAED;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAK5E"}
|
package/package.json
CHANGED
|
@@ -46,12 +46,9 @@ import { ChartBar01VerIcon } from '../../icons-v2-generated/charts/chart-bar-01-
|
|
|
46
46
|
import { ChartPieIcon } from '../../icons-v2-generated/charts/chart-pie-icon';
|
|
47
47
|
import { PresentationBarIcon } from '../../icons-v2-generated/charts/presentation-bar-icon';
|
|
48
48
|
import { PresentationLineIcon } from '../../icons-v2-generated/charts/presentation-line-icon';
|
|
49
|
-
import { BracketCurlyCheckIcon } from '../../icons-v2-generated/coding/bracket-curly-check-icon';
|
|
50
49
|
import { CodeIcon } from '../../icons-v2-generated/coding/code-icon';
|
|
51
|
-
import { CodingBranchIcon } from '../../icons-v2-generated/coding/coding-branch-icon';
|
|
52
50
|
import { CodingCommitIcon } from '../../icons-v2-generated/coding/coding-commit-icon';
|
|
53
51
|
import { CodingPullRequestIcon } from '../../icons-v2-generated/coding/coding-pull-request-icon';
|
|
54
|
-
import { PackageIcon } from '../../icons-v2-generated/coding/package-icon';
|
|
55
52
|
import { CallIcon } from '../../icons-v2-generated/communication/call-icon';
|
|
56
53
|
import { ChatQuoteIcon } from '../../icons-v2-generated/communication/chat-quote-icon';
|
|
57
54
|
import { CalendarIcon } from '../../icons-v2-generated/date-and-time/calendar-icon';
|
|
@@ -1351,13 +1348,6 @@ const REF_GLYPH_CARD_CONFIGS: Record<string, GlyphCardConfig> = {
|
|
|
1351
1348
|
design_doc: { label: 'Design doc', icon: () => <FileContentIcon size={24} /> },
|
|
1352
1349
|
openframe_tenant: { label: 'OpenFrame tenant', icon: () => <OpenFrameGlyph size={24} /> },
|
|
1353
1350
|
prospect_call: { label: 'Prospect call', icon: () => <CallIcon size={24} />, media: true },
|
|
1354
|
-
// Code intelligence (product-hub internal): the review rules a repository is
|
|
1355
|
-
// held to, the repositories themselves, and one row per deployment
|
|
1356
|
-
// environment. Glyph cards like their siblings — none of the three has a
|
|
1357
|
-
// cover image, and a rule is read in the admin screen it links to.
|
|
1358
|
-
code_rule: { label: 'Review rule', icon: () => <BracketCurlyCheckIcon size={24} /> },
|
|
1359
|
-
code_repo: { label: 'Repository', icon: () => <CodingBranchIcon size={24} /> },
|
|
1360
|
-
code_deployment: { label: 'Deployment', icon: () => <PackageIcon size={24} /> },
|
|
1361
1351
|
};
|
|
1362
1352
|
function refGlyphRegistryEntries(): Record<string, ChatCardRegistryEntry> {
|
|
1363
1353
|
return registryEntries(REF_GLYPH_CARD_CONFIGS, (cfg, docType) =>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import type React from 'react';
|
|
4
|
+
import { useEffect, useRef } from 'react';
|
|
4
5
|
import { cn } from '../../utils/cn';
|
|
5
6
|
import { Button } from '../ui/button';
|
|
6
7
|
import { StatusBadge } from '../ui/status-badge';
|
|
@@ -25,6 +26,19 @@ export interface SectionItem {
|
|
|
25
26
|
}[];
|
|
26
27
|
}
|
|
27
28
|
|
|
29
|
+
/**
|
|
30
|
+
* A section picker: ONE active section, the rest a click away.
|
|
31
|
+
*
|
|
32
|
+
* `vertical` is a side list on wide screens and, below `lg`, a single horizontally
|
|
33
|
+
* SCROLLABLE strip. A side list stacked above its content on a phone is a screen
|
|
34
|
+
* of navigation before the first pixel of content, and a consumer that made it
|
|
35
|
+
* `sticky` had it cover the content it navigates. When a tab set does not fit,
|
|
36
|
+
* Material's guidance is scrollable tabs, which is what the strip is: no wrapping,
|
|
37
|
+
* no description, the active tab kept in view.
|
|
38
|
+
*
|
|
39
|
+
* Both layouts are a WAI-ARIA `tablist`: `aria-selected`, roving tabindex (Tab
|
|
40
|
+
* lands on the active section, then leaves the list), arrow keys / Home / End.
|
|
41
|
+
*/
|
|
28
42
|
export interface SectionSelectorProps {
|
|
29
43
|
sections: SectionItem[];
|
|
30
44
|
activeSection: string;
|
|
@@ -51,11 +65,14 @@ const SectionButton: React.FC<{
|
|
|
51
65
|
activeButtonClassName?: string;
|
|
52
66
|
minHeight?: string;
|
|
53
67
|
showDescription?: boolean;
|
|
68
|
+
/** Roving tabindex: the one section Tab lands on. */
|
|
69
|
+
isTabStop: boolean;
|
|
54
70
|
}> = ({
|
|
55
71
|
section,
|
|
56
72
|
isActive,
|
|
57
73
|
disabled,
|
|
58
74
|
onClick,
|
|
75
|
+
isTabStop,
|
|
59
76
|
layout,
|
|
60
77
|
widthClasses,
|
|
61
78
|
buttonClassName,
|
|
@@ -74,6 +91,9 @@ const SectionButton: React.FC<{
|
|
|
74
91
|
onClick={onClick}
|
|
75
92
|
disabled={isDisabled}
|
|
76
93
|
variant="outline"
|
|
94
|
+
role="tab"
|
|
95
|
+
aria-selected={isActive}
|
|
96
|
+
tabIndex={isTabStop ? 0 : -1}
|
|
77
97
|
className={cn(
|
|
78
98
|
'!items-start !justify-start bg-ods-card !text-left shadow-ods-card hover:bg-ods-card-hover',
|
|
79
99
|
isActive && 'border-ods-accent',
|
|
@@ -81,11 +101,14 @@ const SectionButton: React.FC<{
|
|
|
81
101
|
buttonClassName,
|
|
82
102
|
isActive && activeButtonClassName,
|
|
83
103
|
layout === 'vertical'
|
|
84
|
-
?
|
|
104
|
+
? // Strip below lg: a compact, non-shrinking tab. Side list from lg: the full card.
|
|
105
|
+
'!h-auto !min-h-12 shrink-0 !px-[var(--spacing-system-mf)] !py-[var(--spacing-system-sf)] lg:!min-h-[var(--section-min-height)] lg:shrink lg:!py-[var(--spacing-system-mf)]'
|
|
85
106
|
: '!h-auto !min-h-[76px] !whitespace-normal !text-left',
|
|
86
107
|
)}
|
|
87
108
|
style={{
|
|
88
|
-
|
|
109
|
+
// The side list's height is a CSS variable so the strip can ignore it; an
|
|
110
|
+
// inline `minHeight` would make every strip tab as tall as a side card.
|
|
111
|
+
...(layout === 'vertical' ? ({ '--section-min-height': minHeight } as React.CSSProperties) : { minHeight }),
|
|
89
112
|
touchAction: 'manipulation',
|
|
90
113
|
WebkitTapHighlightColor: 'transparent',
|
|
91
114
|
textAlign: 'left',
|
|
@@ -102,7 +125,9 @@ const SectionButton: React.FC<{
|
|
|
102
125
|
{section.number && <span className={cn(numberClasses, 'shrink-0 text-h3')}>{section.number}</span>}
|
|
103
126
|
<div className="min-w-0 flex-1 text-left">
|
|
104
127
|
<div className="flex flex-wrap items-center gap-2">
|
|
105
|
-
<p className={cn(titleClasses, 'whitespace-normal break-words
|
|
128
|
+
<p className={cn(titleClasses, 'whitespace-nowrap text-h4 lg:whitespace-normal lg:break-words')}>
|
|
129
|
+
{section.title}
|
|
130
|
+
</p>
|
|
106
131
|
{section.badge && (
|
|
107
132
|
<StatusBadge
|
|
108
133
|
text={section.badge.text}
|
|
@@ -112,7 +137,9 @@ const SectionButton: React.FC<{
|
|
|
112
137
|
)}
|
|
113
138
|
</div>
|
|
114
139
|
{section.description && showDescription && (
|
|
115
|
-
<p className={cn(subtitleClasses, 'mt-1 whitespace-normal break-words text-h6')}>
|
|
140
|
+
<p className={cn(subtitleClasses, 'mt-1 hidden whitespace-normal break-words text-h6 lg:block')}>
|
|
141
|
+
{section.description}
|
|
142
|
+
</p>
|
|
116
143
|
)}
|
|
117
144
|
</div>
|
|
118
145
|
</div>
|
|
@@ -161,10 +188,55 @@ export const SectionSelector: React.FC<SectionSelectorProps> = ({
|
|
|
161
188
|
showDescription = true,
|
|
162
189
|
}) => {
|
|
163
190
|
const containerClasses = cn(
|
|
164
|
-
layout === 'wrap'
|
|
191
|
+
layout === 'wrap'
|
|
192
|
+
? 'flex flex-wrap gap-2 md:gap-4 lg:gap-6'
|
|
193
|
+
: 'flex flex-row gap-[var(--spacing-system-xsf)] overflow-x-auto [scrollbar-width:none] lg:flex-col lg:overflow-visible [&::-webkit-scrollbar]:hidden',
|
|
165
194
|
className,
|
|
166
195
|
);
|
|
167
196
|
|
|
197
|
+
const listRef = useRef<HTMLDivElement>(null);
|
|
198
|
+
|
|
199
|
+
// Keep the active tab in view in the strip. Scrolls the LIST only, never the
|
|
200
|
+
// page: `scrollIntoView` would also move every scrollable ancestor.
|
|
201
|
+
useEffect(() => {
|
|
202
|
+
const list = listRef.current;
|
|
203
|
+
const active = list?.querySelector<HTMLElement>('[role="tab"][aria-selected="true"]');
|
|
204
|
+
if (!list || !active || list.scrollWidth <= list.clientWidth) return;
|
|
205
|
+
const offset = active.getBoundingClientRect().left - list.getBoundingClientRect().left;
|
|
206
|
+
// Instant on purpose: a smooth scroll is driven by animation frames, which a
|
|
207
|
+
// background tab or an embedded preview does not run, so it never arrived.
|
|
208
|
+
list.scrollLeft += offset - (list.clientWidth - active.clientWidth) / 2;
|
|
209
|
+
}, [activeSection]);
|
|
210
|
+
|
|
211
|
+
const enabled = sections.filter(section => !section.disabled && !disabled);
|
|
212
|
+
const tabStopId = enabled.some(section => section.id === activeSection) ? activeSection : enabled[0]?.id;
|
|
213
|
+
|
|
214
|
+
const onKeyDown = (event: React.KeyboardEvent<HTMLDivElement>) => {
|
|
215
|
+
const step =
|
|
216
|
+
event.key === 'ArrowRight' || event.key === 'ArrowDown'
|
|
217
|
+
? 1
|
|
218
|
+
: event.key === 'ArrowLeft' || event.key === 'ArrowUp'
|
|
219
|
+
? -1
|
|
220
|
+
: 0;
|
|
221
|
+
if (!step && event.key !== 'Home' && event.key !== 'End') return;
|
|
222
|
+
if (enabled.length === 0) return;
|
|
223
|
+
event.preventDefault();
|
|
224
|
+
const at = Math.max(
|
|
225
|
+
0,
|
|
226
|
+
enabled.findIndex(section => section.id === activeSection),
|
|
227
|
+
);
|
|
228
|
+
const next =
|
|
229
|
+
event.key === 'Home'
|
|
230
|
+
? enabled[0]
|
|
231
|
+
: event.key === 'End'
|
|
232
|
+
? enabled[enabled.length - 1]
|
|
233
|
+
: enabled[(at + step + enabled.length) % enabled.length];
|
|
234
|
+
onSectionChange(next.id);
|
|
235
|
+
requestAnimationFrame(() =>
|
|
236
|
+
listRef.current?.querySelector<HTMLElement>('[role="tab"][aria-selected="true"]')?.focus(),
|
|
237
|
+
);
|
|
238
|
+
};
|
|
239
|
+
|
|
168
240
|
const getButtonWidthClasses = () => {
|
|
169
241
|
switch (buttonWidth) {
|
|
170
242
|
case 'full':
|
|
@@ -179,7 +251,7 @@ export const SectionSelector: React.FC<SectionSelectorProps> = ({
|
|
|
179
251
|
const widthClasses = getButtonWidthClasses();
|
|
180
252
|
|
|
181
253
|
return (
|
|
182
|
-
<div className={containerClasses}>
|
|
254
|
+
<div ref={listRef} role="tablist" onKeyDown={onKeyDown} className={containerClasses}>
|
|
183
255
|
{sections.map(section => (
|
|
184
256
|
<SectionButton
|
|
185
257
|
key={section.id}
|
|
@@ -193,6 +265,7 @@ export const SectionSelector: React.FC<SectionSelectorProps> = ({
|
|
|
193
265
|
activeButtonClassName={activeButtonClassName}
|
|
194
266
|
minHeight={minHeight}
|
|
195
267
|
showDescription={showDescription}
|
|
268
|
+
isTabStop={section.id === tabStopId}
|
|
196
269
|
/>
|
|
197
270
|
))}
|
|
198
271
|
</div>
|
|
@@ -56,11 +56,6 @@ const BASELINE: Record<string, string> = {
|
|
|
56
56
|
design_doc: '/api/design-docs?ids=a,b',
|
|
57
57
|
openframe_tenant: '/api/openframe-tenants?ids=a,b',
|
|
58
58
|
prospect_call: '/api/prospect-calls?ids=a,b',
|
|
59
|
-
// 2026-09: code intelligence — the review rules and the code graph as chat
|
|
60
|
-
// sources on product-hub.
|
|
61
|
-
code_rule: '/api/code-review/rules/cards?ids=a,b',
|
|
62
|
-
code_repo: '/api/code-graph/repos?ids=a,b',
|
|
63
|
-
code_deployment: '/api/code-graph/deployments?ids=a,b',
|
|
64
59
|
};
|
|
65
60
|
|
|
66
61
|
describe('buildListUrl — byte parity with the hub mappers', () => {
|
package/src/utils/list-url.ts
CHANGED
|
@@ -114,11 +114,6 @@ const BUILDERS: Record<string, (ids: string[], base: string) => string> = {
|
|
|
114
114
|
design_doc: (ids, b) => `${b}/api/design-docs?ids=${ids.join(',')}`,
|
|
115
115
|
openframe_tenant: (ids, b) => `${b}/api/openframe-tenants?ids=${ids.join(',')}`,
|
|
116
116
|
prospect_call: (ids, b) => `${b}/api/prospect-calls?ids=${ids.join(',')}`,
|
|
117
|
-
// Code intelligence — per-object card hydration, same `handleEntityCardList`
|
|
118
|
-
// shape as the internal objects above.
|
|
119
|
-
code_rule: (ids, b) => `${b}/api/code-review/rules/cards?ids=${ids.join(',')}`,
|
|
120
|
-
code_repo: (ids, b) => `${b}/api/code-graph/repos?ids=${ids.join(',')}`,
|
|
121
|
-
code_deployment: (ids, b) => `${b}/api/code-graph/deployments?ids=${ids.join(',')}`,
|
|
122
117
|
};
|
|
123
118
|
|
|
124
119
|
/**
|
|
@@ -79,11 +79,6 @@ export const SOURCE_ICON_NAMES: Record<string, string> = {
|
|
|
79
79
|
'design-docs': 'file-text',
|
|
80
80
|
'openframe-tenants': 'openframe',
|
|
81
81
|
'prospect-calls': 'phone',
|
|
82
|
-
|
|
83
|
-
// Code intelligence
|
|
84
|
-
'code-review-rules': 'check-square',
|
|
85
|
-
'code-graph-repos': 'github',
|
|
86
|
-
'code-graph-deployments': 'package',
|
|
87
82
|
};
|
|
88
83
|
|
|
89
84
|
/** Lookup an icon name by RagTableConfig.id. Returns undefined when
|
|
@@ -166,11 +161,6 @@ export const SOURCE_LABELS_BY_TABLE: Record<string, string> = {
|
|
|
166
161
|
'design-docs': 'Design Docs',
|
|
167
162
|
'openframe-tenants': 'OpenFrame Tenants',
|
|
168
163
|
'prospect-calls': 'Prospect calls',
|
|
169
|
-
|
|
170
|
-
// Code intelligence
|
|
171
|
-
'code-review-rules': 'Code Review Rules',
|
|
172
|
-
'code-graph-repos': 'Repositories',
|
|
173
|
-
'code-graph-deployments': 'Deployments',
|
|
174
164
|
};
|
|
175
165
|
|
|
176
166
|
/** Lookup a human-readable label by RagTableConfig.id. Falls back
|
|
@@ -255,11 +245,6 @@ export const DEFAULT_DOCUMENT_TYPE_TO_TABLE_ID: Record<string, string> = {
|
|
|
255
245
|
design_doc: 'design-docs',
|
|
256
246
|
openframe_tenant: 'openframe-tenants',
|
|
257
247
|
prospect_call: 'prospect-calls',
|
|
258
|
-
|
|
259
|
-
// Code intelligence
|
|
260
|
-
code_rule: 'code-review-rules',
|
|
261
|
-
code_repo: 'code-graph-repos',
|
|
262
|
-
code_deployment: 'code-graph-deployments',
|
|
263
248
|
};
|
|
264
249
|
|
|
265
250
|
/**
|