@principal-ai/subsystems-react 0.28.1 → 0.28.3

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/index.d.ts CHANGED
@@ -33,10 +33,12 @@ export { purlRepoKey, purlOwnerName, buildTreePathMapping, buildRepoGroups, repo
33
33
  export type { TreeEntry, TreePathMapping, RepoGroup, } from './subsystem/paths';
34
34
  export { SubsystemFileTree } from './subsystem/SubsystemFileTree';
35
35
  export type { SubsystemFileTreeProps } from './subsystem/SubsystemFileTree';
36
+ export { WalkthroughsPanel, WALKTHROUGH_PLAY_PAUSE_MS } from './subsystem/WalkthroughsPanel';
37
+ export type { WalkthroughsPanelProps } from './subsystem/WalkthroughsPanel';
36
38
  export { GraphLayoutCover } from './subsystem/GraphLayoutCover';
37
39
  export type { GraphLayoutCoverProps } from './subsystem/GraphLayoutCover';
38
40
  export type { SubsystemComponent, SubsystemComponentEdge, SubsystemRelation, SubsystemRelationType, SubsystemWalkthrough, SubsystemWalkthroughStep, SubsystemWalkthroughMechanism, SubsystemModelDocument, SubsystemComponentConstruct, SubsystemComponentRole, SubsystemFramework, SubsystemStereotype, SubsystemEdgeMechanism, SubsystemEdgeView, SubsystemConstructDeclaration, SubsystemDeclarationProvenance, } from './subsystem/model';
39
- export { constructBadgeLabel, constructBadgeColor, rightBadgeLabel, rightBadgeColor, deriveNameFromSymbol, nodeMinWidthForBadges, deriveGraphEdges, isConstructsOnlyModel, derivedGraphEdgeId, walkthroughStepGraphEdgeId, isRelationMechanism, isWalkthroughMechanism, SUBSYSTEM_RELATION_TYPES, SUBSYSTEM_WALKTHROUGH_MECHANISMS, ROLE_COLOR, ROLE_LABEL, FRAMEWORK_BADGE_COLOR, PROPOSED_COLOR, } from './subsystem/model';
41
+ export { constructBadgeLabel, constructBadgeColor, rightBadgeLabel, rightBadgeColor, deriveNameFromSymbol, nodeMinWidthForBadges, deriveGraphEdges, isConstructsOnlyModel, derivedGraphEdgeId, walkthroughStepGraphEdgeId, reorderWalkthroughs, reorderTargetIndex, isRelationMechanism, isWalkthroughMechanism, SUBSYSTEM_RELATION_TYPES, SUBSYSTEM_WALKTHROUGH_MECHANISMS, ROLE_COLOR, ROLE_LABEL, FRAMEWORK_BADGE_COLOR, PROPOSED_COLOR, } from './subsystem/model';
40
42
  export type { SubsystemDeclarationRef, SubsystemOpenFileOptions, DeclarationFreshness, } from './subsystem/declarationRef';
41
43
  export { parseSourceLocation, normalizeDeclarationLine, extractDeclarationLine, DECLARATION_HASH_ALGO, } from './subsystem/declarationRef';
42
44
  export { PierreFileView, PierreSnippetView, PierreWalkthroughCodeView, sliceSnippetWindow, resolvePierreSyntaxThemeName } from './pierre';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EACL,gBAAgB,EAChB,uBAAuB,GACxB,MAAM,6BAA6B,CAAC;AACrC,YAAY,EACV,qBAAqB,EACrB,4BAA4B,EAC5B,mBAAmB,GACpB,MAAM,6BAA6B,CAAC;AAGrC,YAAY,EACV,SAAS,EACT,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,YAAY,EACZ,iBAAiB,EACjB,qBAAqB,EACrB,aAAa,GACd,MAAM,YAAY,CAAC;AACpB,YAAY,EACV,wBAAwB,EACxB,uBAAuB,EACvB,kBAAkB,EAClB,oBAAoB,EACpB,iBAAiB,EACjB,gBAAgB,EAChB,qBAAqB,EACrB,mBAAmB,EACnB,sBAAsB,EACtB,kBAAkB,EAClB,sBAAsB,EACtB,0BAA0B,EAC1B,6BAA6B,EAC7B,uBAAuB,EACvB,eAAe,GAChB,MAAM,YAAY,CAAC;AACpB,YAAY,EACV,qBAAqB,EACrB,yBAAyB,GAC1B,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,sBAAsB,EACtB,0BAA0B,EAC1B,sBAAsB,EACtB,mBAA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mBAAmB,EACnB,eAAe,EACf,eAAe,EACf,oBAAoB,EACpB,qBAAqB,EACrB,gBAAgB,EAChB,qBAAqB,EACrB,kBAAkB,EAClB,0BAA0B,EAC1B,mBAAmB,EACnB,sBAAsB,EACtB,wBAAwB,EACxB,gCAAgC,EAChC,UAAU,EACV,UAAU,EACV,qBAAqB,EACrB,cAAc,GACf,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EACV,uBAAuB,EACvB,wBAAwB,EACxB,oBAAoB,GACrB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,mBAAmB,EACnB,wBAAwB,EACxB,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,4BAA4B,CAAC;AAGpC,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,kBAAkB,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAC1I,YAAY,EACV,mBAAmB,EACnB,sBAAsB,EACtB,8BAA8B,EAC9B,YAAY,EACZ,qBAAqB,GACtB,MAAM,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EACL,gBAAgB,EAChB,uBAAuB,GACxB,MAAM,6BAA6B,CAAC;AACrC,YAAY,EACV,qBAAqB,EACrB,4BAA4B,EAC5B,mBAAmB,GACpB,MAAM,6BAA6B,CAAC;AAGrC,YAAY,EACV,SAAS,EACT,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,YAAY,EACZ,iBAAiB,EACjB,qBAAqB,EACrB,aAAa,GACd,MAAM,YAAY,CAAC;AACpB,YAAY,EACV,wBAAwB,EACxB,uBAAuB,EACvB,kBAAkB,EAClB,oBAAoB,EACpB,iBAAiB,EACjB,gBAAgB,EAChB,qBAAqB,EACrB,mBAAmB,EACnB,sBAAsB,EACtB,kBAAkB,EAClB,sBAAsB,EACtB,0BAA0B,EAC1B,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,CAAC;AAC1E,YAAY,EACV,kBAAkB,EAClB,sBAAsB,EACtB,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,wBAAwB,EACxB,6BAA6B,EAC7B,sBAAsB,EACtB,2BAA2B,EAC3B,sBAAsB,EACtB,kBAAkB,EAClB,mBAAmB,EACnB,sBAAsB,EACtB,iBAAiB,EACjB,6BAA6B,EAC7B,8BAA8B,GAC/B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,eAAe,EACf,eAAe,EACf,oBAAoB,EACpB,qBAAqB,EACrB,gBAAgB,EAChB,qBAAqB,EACrB,kBAAkB,EAClB,0BAA0B,EAC1B,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EACnB,sBAAsB,EACtB,wBAAwB,EACxB,gCAAgC,EAChC,UAAU,EACV,UAAU,EACV,qBAAqB,EACrB,cAAc,GACf,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EACV,uBAAuB,EACvB,wBAAwB,EACxB,oBAAoB,GACrB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,mBAAmB,EACnB,wBAAwB,EACxB,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,4BAA4B,CAAC;AAGpC,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,kBAAkB,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAC1I,YAAY,EACV,mBAAmB,EACnB,sBAAsB,EACtB,8BAA8B,EAC9B,YAAY,EACZ,qBAAqB,GACtB,MAAM,UAAU,CAAC"}
package/dist/index.js CHANGED
@@ -21,8 +21,9 @@ export { MECHANISM_COLOR, MECHANISM_STYLE } from './subsystem/model';
21
21
  export { CONSTRUCT_COLOR, componentColor, constructColorsFromPierreTheme } from './pierre/constructColors';
22
22
  export { purlRepoKey, purlOwnerName, buildTreePathMapping, buildRepoGroups, repoAvatarUrl, } from './subsystem/paths';
23
23
  export { SubsystemFileTree } from './subsystem/SubsystemFileTree';
24
+ export { WalkthroughsPanel, WALKTHROUGH_PLAY_PAUSE_MS } from './subsystem/WalkthroughsPanel';
24
25
  export { GraphLayoutCover } from './subsystem/GraphLayoutCover';
25
- export { constructBadgeLabel, constructBadgeColor, rightBadgeLabel, rightBadgeColor, deriveNameFromSymbol, nodeMinWidthForBadges, deriveGraphEdges, isConstructsOnlyModel, derivedGraphEdgeId, walkthroughStepGraphEdgeId, isRelationMechanism, isWalkthroughMechanism, SUBSYSTEM_RELATION_TYPES, SUBSYSTEM_WALKTHROUGH_MECHANISMS, ROLE_COLOR, ROLE_LABEL, FRAMEWORK_BADGE_COLOR, PROPOSED_COLOR, } from './subsystem/model';
26
+ export { constructBadgeLabel, constructBadgeColor, rightBadgeLabel, rightBadgeColor, deriveNameFromSymbol, nodeMinWidthForBadges, deriveGraphEdges, isConstructsOnlyModel, derivedGraphEdgeId, walkthroughStepGraphEdgeId, reorderWalkthroughs, reorderTargetIndex, isRelationMechanism, isWalkthroughMechanism, SUBSYSTEM_RELATION_TYPES, SUBSYSTEM_WALKTHROUGH_MECHANISMS, ROLE_COLOR, ROLE_LABEL, FRAMEWORK_BADGE_COLOR, PROPOSED_COLOR, } from './subsystem/model';
26
27
  export { parseSourceLocation, normalizeDeclarationLine, extractDeclarationLine, DECLARATION_HASH_ALGO, } from './subsystem/declarationRef';
27
28
  // Pierre code views (@pierre/diffs wrappers)
28
29
  export { PierreFileView, PierreSnippetView, PierreWalkthroughCodeView, sliceSnippetWindow, resolvePierreSyntaxThemeName } from './pierre';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,sEAAsE;AACtE,OAAO,EACL,gBAAgB,EAChB,uBAAuB,GACxB,MAAM,6BAA6B,CAAC;AAyCrC,OAAO,EACL,sBAAsB,EACtB,0BAA0B,EAC1B,sBAAsB,EACtB,mBAAmB,EACnB,cAAc,E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  * graph.
51
51
  */
52
52
  initialWalkthroughId?: string | null;
53
+ /**
54
+ * Called with the next walkthrough order after a drag in the sidebar's
55
+ * flows panel. When set, each row grows a drag grip and a drop emits the
56
+ * reordered array — the host owns persisting it (the graph stays controlled
57
+ * and never reorders its own prop).
58
+ */
59
+ onReorderWalkthroughs?: (next: SubsystemWalkthrough[]) => void;
53
60
  onSelect?: (componentAlias: string) => void;
54
61
  /** Called when an edge is clicked (relationship / mechanism + refs seam). */
55
62
  onEdgeSelect?: (edge: SubsystemComponentEdge) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"SubsystemComponentGraph.d.ts","sourceRoot":"","sources":["../../src/subsystem/SubsystemComponentGraph.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,KAAK,EAAiC,SAAS,EAAE,MAAM,OAAO,CAAC;AAkBtE,OAAO,EAUL,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EAEtB,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EAC1B,MAAM,SAAS,CAAC;AAEjB,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAEjE,OAAO,EAA6B,KAAK,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzF,OAAO,EAAsB,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAKtE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AAYzE,+EAA+E;AAC/E,MAAM,WAAW,wBAAwB;IACvC,WAAW,EAAE,oBAAoB,CAAC;IAClC,0EAA0E;IAC1E,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,2FAA2F;IAC3F,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,wBAAwB,KAAK,IAAI,CAAC;CACrE;AAMD,MAAM,WAAW,4BAA4B;IAC3C,UAAU,EAAE,kBAAkB,EAAE,CAAC;IACjC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AkB,KAAK,SAAS,CAAC;IAC9D;;;OAGG;IACH,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,0EAA0E;IAC1E,iBAAiB,CAAC,EAAE,CAAC,cAAc,EAAE,MAAM,KAAK,IAAI,CAAC;IACrD,2DAA2D;IAC3D,qBAAqB,CAAC,EAAE,0BAA0B,GAAG,IAAI,CAAC;CAC3D;AA87DD,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,4BAA4B,+BA8D1E"}
@@ -18,7 +18,7 @@ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-run
18
18
  import { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react';
19
19
  import { ReactFlow, ReactFlowProvider, useReactFlow, useViewport, applyNodeChanges, } from '@xyflow/react';
20
20
  import { useTheme } from '@principal-ade/industry-theme';
21
- import { FileText, Pause, Play, X } from 'lucide-react';
21
+ import { FileText, X } from 'lucide-react';
22
22
  import { IndustryMarkdownSlide } from 'themed-markdown';
23
23
  import { buildSubsystemGraph, deriveGraphEdges, isConstructsOnlyModel, isRelationMechanism, isWalkthroughMechanism, MECHANISM_COLOR, MECHANISM_DESCRIPTIONS, subsystemGraphLayoutKey, walkthroughStepGraphEdgeId, } from './model';
24
24
  import { ConstructsCatalog } from './ConstructsCatalog';
@@ -31,13 +31,12 @@ import { GRAPH_NAV_PROPS, GraphChrome } from './graphChrome';
31
31
  import { ComponentDeclaration } from './ComponentDeclaration';
32
32
  import { FileDrawer, FILE_DRAWER_HEIGHT_MS } from './FileDrawer';
33
33
  import { buildRepoGroups, repoAvatarUrl } from './paths';
34
+ import { WalkthroughsPanel, WALKTHROUGH_PLAY_PAUSE_MS } from './WalkthroughsPanel';
34
35
  /** Cap screen-space edge labels to this fraction of the edge's on-screen length. */
35
36
  const EDGE_LABEL_MAX_EDGE_FRACTION = 0.55;
36
37
  /** Rough monospace width at fontSize 10 + horizontal padding/border. */
37
38
  const EDGE_LABEL_CHAR_PX = 6.2;
38
39
  const EDGE_LABEL_PAD_PX = 18;
39
- /** Pause (ms) between steps when a walkthrough autoplays. */
40
- const WALKTHROUGH_PLAY_PAUSE_MS = 2500;
41
40
  const nodeTypes = {
42
41
  'subsystem-component': SubsystemComponentNode,
43
42
  'subsystem-group': SubsystemGroupNode,
@@ -76,7 +75,7 @@ function FileOverlayCloseButton({ onClose }) {
76
75
  const WalkthroughDrawerContent = memo(function WalkthroughDrawerContent({ render, walkthrough, stepIndex, onOpenFile, }) {
77
76
  return _jsx(_Fragment, { children: render({ walkthrough, stepIndex, onOpenFile }) });
78
77
  });
79
- function Inner({ components, relations, walkthroughs, initialWalkthroughId, onSelect, onEdgeSelect, measured: _measured, maxNodeWidth, showEdgeLabels, edgeView, title, hideSidebar, walkthroughStepMode = 'focus', autoPlayWalkthroughs = false, walkthroughAutoPlayIntervalMs = WALKTHROUGH_PLAY_PAUSE_MS, zoomOnWalkthroughFocus = true, graphTitle, showWalkthroughTitle = false, description, canvasOverlay, sidebarExtra, sidebarAfterDescription, diagnostic, issues, showIssues, onSelectIssue, onApplyIssueFix, onHoverIssue, renderFileView, renderFileViewer, renderWalkthroughViewer, onFileSelect, onVerifyComponent, componentVerification }) {
78
+ function Inner({ components, relations, walkthroughs, initialWalkthroughId, onReorderWalkthroughs, onSelect, onEdgeSelect, measured: _measured, maxNodeWidth, showEdgeLabels, edgeView, title, hideSidebar, walkthroughStepMode = 'focus', autoPlayWalkthroughs = false, walkthroughAutoPlayIntervalMs = WALKTHROUGH_PLAY_PAUSE_MS, zoomOnWalkthroughFocus = true, graphTitle, showWalkthroughTitle = false, description, canvasOverlay, sidebarExtra, sidebarAfterDescription, diagnostic, issues, showIssues, onSelectIssue, onApplyIssueFix, onHoverIssue, renderFileView, renderFileViewer, renderWalkthroughViewer, onFileSelect, onVerifyComponent, componentVerification }) {
80
79
  const { theme } = useTheme();
81
80
  const { fitView } = useReactFlow();
82
81
  const viewport = useViewport();
@@ -703,6 +702,9 @@ function Inner({ components, relations, walkthroughs, initialWalkthroughId, onSe
703
702
  // own owner-avatar header. Clicking a header collapses that repo's tree.
704
703
  const repoGroups = useMemo(() => buildRepoGroups(components), [components]);
705
704
  const hasWalkthroughs = useMemo(() => (walkthroughs?.length ?? 0) > 0, [walkthroughs]);
705
+ // Aliases of proposed components — the flows panel tints walkthrough titles
706
+ // (and steps) that touch one.
707
+ const proposedAliases = useMemo(() => new Set(components.filter((c) => c.proposed).map((c) => c.alias)), [components]);
706
708
  // Diagnostics view in the sidebar. Uncontrolled unless the host pins
707
709
  // `showIssues`: the title-row chip toggles it, seeded from issues presence.
708
710
  const [diagnosticsOpen, setDiagnosticsOpen] = useState(showIssues ?? (issues?.length ?? 0) > 0);
@@ -1241,16 +1243,7 @@ function Inner({ components, relations, walkthroughs, initialWalkthroughId, onSe
1241
1243
  fontFamily: theme.fonts.monospace,
1242
1244
  textTransform: 'capitalize',
1243
1245
  cursor: 'pointer',
1244
- }, children: view === 'walkthroughs' ? 'Walkthroughs' : 'Files' }, view))) })), sidebarView === 'walkthroughs' && walkthroughs && walkthroughs.length > 0 ? (_jsx("div", { style: {
1245
- flex: 1,
1246
- minHeight: 0,
1247
- overflowY: 'auto',
1248
- padding: '0 0 12px',
1249
- }, children: walkthroughs.map((tl) => (_jsx(WalkthroughFlow, { walkthrough: tl, collapsed: !expandedWalkthroughs.has(tl.id), active: focusedWalkthroughId === tl.id
1250
- ? { stepIndex: focusedStepIndex }
1251
- : hoveredWalkthroughStep?.walkthroughId === tl.id
1252
- ? { stepIndex: hoveredWalkthroughStep.stepIndex }
1253
- : null, onToggleCollapsed: toggleWalkthroughCollapsed, onFocusFlow: focusWalkthroughEdges, onClearFocus: clearWalkthroughFocus, onFocusStep: focusWalkthroughStep, onHoverStep: (tl, i) => setHoveredWalkthroughStep({ walkthroughId: tl.id, stepIndex: i }), onHoverFlow: (tl) => setHoveredWalkthroughStep({ walkthroughId: tl.id, stepIndex: null }), onLeaveStep: () => setHoveredWalkthroughStep(null) }, tl.id))) })) : treeFilePaths.length > 0 ? (_jsx(_Fragment, { children: repoGroups.groups.map((group, i) => {
1246
+ }, children: view === 'walkthroughs' ? 'Walkthroughs' : 'Files' }, view))) })), sidebarView === 'walkthroughs' && walkthroughs && walkthroughs.length > 0 ? (_jsx(WalkthroughsPanel, { walkthroughs: walkthroughs, expandedWalkthroughs: expandedWalkthroughs, focusedWalkthroughId: focusedWalkthroughId, focusedStepIndex: focusedStepIndex, hoveredWalkthroughStep: hoveredWalkthroughStep, onToggleCollapsed: toggleWalkthroughCollapsed, onFocusFlow: focusWalkthroughEdges, onClearFocus: clearWalkthroughFocus, onFocusStep: focusWalkthroughStep, onHoverStep: (tl, i) => setHoveredWalkthroughStep({ walkthroughId: tl.id, stepIndex: i }), onHoverFlow: (tl) => setHoveredWalkthroughStep({ walkthroughId: tl.id, stepIndex: null }), onLeaveStep: () => setHoveredWalkthroughStep(null), onReorder: onReorderWalkthroughs, proposedAliases: proposedAliases })) : treeFilePaths.length > 0 ? (_jsx(_Fragment, { children: repoGroups.groups.map((group, i) => {
1254
1247
  const groupKey = group.repoKey ?? '__no-repo__';
1255
1248
  const collapsed = collapsedRepos.has(groupKey);
1256
1249
  return (_jsxs("div", { style: {
@@ -1498,193 +1491,6 @@ function RepoGroupHeader({ group, collapsed, onToggle, }) {
1498
1491
  whiteSpace: 'nowrap',
1499
1492
  }, children: label })] }));
1500
1493
  }
1501
- /** One collapsible walkthrough in the sidebar's flows panel. Clicking the
1502
- * title: closed → open + select; open and unselected → select; open and
1503
- * selected → close + clear focus. The right-aligned close button collapses
1504
- * without selecting. A step row focuses that step's edge. */
1505
- function WalkthroughFlow({ walkthrough, collapsed, active, onToggleCollapsed, onFocusFlow, onClearFocus, onFocusStep, onHoverStep, onHoverFlow, onLeaveStep, }) {
1506
- const { theme } = useTheme();
1507
- const muted = theme.colors.textMuted ?? theme.colors.textSecondary;
1508
- const hoverBg = theme.colors.background;
1509
- const wholeFlowActive = active !== null && active.stepIndex === null;
1510
- const [headerHover, setHeaderHover] = useState(false);
1511
- const [closeHover, setCloseHover] = useState(false);
1512
- const [playHover, setPlayHover] = useState(false);
1513
- const [hoveredStep, setHoveredStep] = useState(null);
1514
- const stepButtonRefs = useRef([]);
1515
- // Autoplay: stepping through the flow's steps with a pause between each.
1516
- const [playing, setPlaying] = useState(false);
1517
- const playTimerRef = useRef(null);
1518
- const stopPlaying = useCallback(() => {
1519
- if (playTimerRef.current != null) {
1520
- window.clearTimeout(playTimerRef.current);
1521
- playTimerRef.current = null;
1522
- }
1523
- setPlaying(false);
1524
- }, []);
1525
- // Clear any pending timer on unmount.
1526
- // eslint-disable-next-line react-hooks/exhaustive-deps
1527
- useEffect(() => () => stopPlaying(), []);
1528
- const startPlaying = useCallback(() => {
1529
- if (collapsed)
1530
- onToggleCollapsed(walkthrough.id);
1531
- if (active === null || active.stepIndex !== null)
1532
- onFocusFlow(walkthrough);
1533
- const stepCount = walkthrough.steps.length;
1534
- if (stepCount === 0)
1535
- return;
1536
- setPlaying(true);
1537
- let i = 0;
1538
- const tick = () => {
1539
- if (i >= stepCount) {
1540
- playTimerRef.current = null;
1541
- setPlaying(false);
1542
- return;
1543
- }
1544
- onFocusStep(walkthrough, i);
1545
- i += 1;
1546
- playTimerRef.current = window.setTimeout(tick, WALKTHROUGH_PLAY_PAUSE_MS);
1547
- };
1548
- tick();
1549
- }, [collapsed, active, onToggleCollapsed, onFocusFlow, walkthrough, onFocusStep]);
1550
- const togglePlay = useCallback(() => {
1551
- if (playing) {
1552
- stopPlaying();
1553
- }
1554
- else {
1555
- startPlaying();
1556
- }
1557
- }, [playing, stopPlaying, startPlaying]);
1558
- // Keep DOM focus on the active step so the browser focus ring (and
1559
- // subsequent arrow keys) follow arrow navigation, not the originally
1560
- // clicked button.
1561
- useEffect(() => {
1562
- if (active?.stepIndex == null)
1563
- return;
1564
- stepButtonRefs.current[active.stepIndex]?.focus({ preventScroll: true });
1565
- }, [active?.stepIndex]);
1566
- return (_jsxs("div", { children: [_jsxs("div", { onMouseEnter: () => {
1567
- setHeaderHover(true);
1568
- if (collapsed)
1569
- onHoverFlow(walkthrough);
1570
- }, onMouseLeave: () => {
1571
- setHeaderHover(false);
1572
- if (collapsed)
1573
- onLeaveStep();
1574
- }, style: {
1575
- display: 'flex',
1576
- alignItems: 'center',
1577
- gap: 4,
1578
- padding: '0 16px',
1579
- background: wholeFlowActive || headerHover ? hoverBg : 'transparent',
1580
- transition: 'background 120ms ease',
1581
- }, children: [_jsx("button", { type: "button", onClick: () => {
1582
- if (collapsed) {
1583
- onToggleCollapsed(walkthrough.id);
1584
- onFocusFlow(walkthrough);
1585
- }
1586
- else if (active === null) {
1587
- onFocusFlow(walkthrough);
1588
- }
1589
- else {
1590
- onToggleCollapsed(walkthrough.id);
1591
- onClearFocus();
1592
- }
1593
- }, style: {
1594
- flex: 1,
1595
- display: 'flex',
1596
- alignItems: 'center',
1597
- minWidth: 0,
1598
- padding: '10px 0',
1599
- border: 'none',
1600
- background: 'transparent',
1601
- textAlign: 'left',
1602
- cursor: 'pointer',
1603
- }, children: _jsx("span", { style: {
1604
- overflow: 'hidden',
1605
- textOverflow: 'ellipsis',
1606
- whiteSpace: 'nowrap',
1607
- fontSize: theme.fontSizes[1],
1608
- fontFamily: theme.fonts.monospace,
1609
- fontWeight: 600,
1610
- color: theme.colors.text,
1611
- }, children: walkthrough.title }) }), !collapsed && (_jsxs(_Fragment, { children: [_jsx("button", { type: "button", "aria-label": playing ? `Pause ${walkthrough.title} autoplay` : `Play ${walkthrough.title}`, title: playing ? 'Pause' : 'Play through steps', onMouseEnter: () => setPlayHover(true), onMouseLeave: () => setPlayHover(false), onClick: (e) => {
1612
- e.stopPropagation();
1613
- togglePlay();
1614
- }, style: {
1615
- display: 'inline-flex',
1616
- alignItems: 'center',
1617
- justifyContent: 'center',
1618
- flexShrink: 0,
1619
- width: 22,
1620
- height: 22,
1621
- padding: 0,
1622
- border: 'none',
1623
- borderRadius: 4,
1624
- background: playing || playHover ? theme.colors.border : 'transparent',
1625
- color: playing || playHover ? theme.colors.text : muted,
1626
- cursor: 'pointer',
1627
- transition: 'background 120ms ease, color 120ms ease',
1628
- }, children: playing ? _jsx(Pause, { size: 12, strokeWidth: 2 }) : _jsx(Play, { size: 12, strokeWidth: 2 }) }), _jsx("button", { type: "button", "aria-label": `Close ${walkthrough.title}`, onMouseEnter: () => setCloseHover(true), onMouseLeave: () => setCloseHover(false), onClick: (e) => {
1629
- e.stopPropagation();
1630
- onToggleCollapsed(walkthrough.id);
1631
- if (active !== null)
1632
- onClearFocus();
1633
- }, style: {
1634
- display: 'inline-flex',
1635
- alignItems: 'center',
1636
- justifyContent: 'center',
1637
- flexShrink: 0,
1638
- width: 22,
1639
- height: 22,
1640
- padding: 0,
1641
- border: 'none',
1642
- borderRadius: 4,
1643
- background: closeHover ? theme.colors.border : 'transparent',
1644
- color: closeHover ? theme.colors.text : muted,
1645
- cursor: 'pointer',
1646
- transition: 'background 120ms ease, color 120ms ease',
1647
- }, children: _jsx(X, { size: 12, strokeWidth: 2 }) })] }))] }), !collapsed && (_jsx("div", { style: { display: 'flex', flexDirection: 'column' }, onMouseLeave: () => {
1648
- setHoveredStep(null);
1649
- onLeaveStep();
1650
- }, children: walkthrough.steps.map((step, i) => {
1651
- const stepActive = active !== null && active.stepIndex === i;
1652
- return (_jsxs("button", { ref: (el) => {
1653
- stepButtonRefs.current[i] = el;
1654
- }, type: "button", onMouseEnter: () => {
1655
- setHoveredStep(i);
1656
- onHoverStep(walkthrough, i);
1657
- }, onClick: () => onFocusStep(walkthrough, i), style: {
1658
- display: 'flex',
1659
- alignItems: 'center',
1660
- gap: 8,
1661
- minWidth: 0,
1662
- padding: '8px 8px 8px 12px',
1663
- textAlign: 'left',
1664
- borderRadius: 6,
1665
- border: 'none',
1666
- outline: 'none',
1667
- background: stepActive || hoveredStep === i ? hoverBg : 'transparent',
1668
- cursor: 'pointer',
1669
- transition: 'background 120ms ease',
1670
- }, children: [_jsx("span", { style: {
1671
- flexShrink: 0,
1672
- width: 14,
1673
- fontSize: theme.fontSizes[0],
1674
- fontFamily: theme.fonts.monospace,
1675
- color: stepActive ? theme.colors.text : muted,
1676
- }, children: i + 1 }), _jsx("span", { style: {
1677
- flex: 1,
1678
- minWidth: 0,
1679
- overflow: 'hidden',
1680
- textOverflow: 'ellipsis',
1681
- whiteSpace: 'nowrap',
1682
- fontSize: theme.fontSizes[1],
1683
- fontFamily: theme.fonts.monospace,
1684
- color: theme.colors.text,
1685
- }, children: step.symbol })] }, `${walkthroughStepGraphEdgeId(step)}-${i}`));
1686
- }) }))] }));
1687
- }
1688
1494
  export function SubsystemComponentGraph(props) {
1689
1495
  const wrapRef = useRef(null);
1690
1496
  const [size, setSize] = useState(null);