@industry-theme/principal-view-panels 0.3.0 → 0.3.2
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 +6 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/mocks/panelContext.d.ts +1 -0
- package/dist/mocks/panelContext.d.ts.map +1 -1
- package/dist/panels/AgentMonitoringGapExplainerPanel.d.ts +6 -0
- package/dist/panels/AgentMonitoringGapExplainerPanel.d.ts.map +1 -0
- package/dist/panels/AgentMonitoringGapExplainerPanel.stories.d.ts +12 -0
- package/dist/panels/AgentMonitoringGapExplainerPanel.stories.d.ts.map +1 -0
- package/dist/panels/CanvasDetailPanel.d.ts.map +1 -1
- package/dist/panels/CanvasListPanel.d.ts.map +1 -1
- package/dist/panels/CanvasListPanel.stories.d.ts +5 -0
- package/dist/panels/CanvasListPanel.stories.d.ts.map +1 -1
- package/dist/panels/SystemStoriesSolutionExplainerPanel.d.ts +6 -0
- package/dist/panels/SystemStoriesSolutionExplainerPanel.d.ts.map +1 -0
- package/dist/panels/SystemStoriesSolutionExplainerPanel.stories.d.ts +12 -0
- package/dist/panels/SystemStoriesSolutionExplainerPanel.stories.d.ts.map +1 -0
- package/dist/panels/WhyNowAgentRevolutionExplainerPanel.d.ts +6 -0
- package/dist/panels/WhyNowAgentRevolutionExplainerPanel.d.ts.map +1 -0
- package/dist/panels/WhyNowAgentRevolutionExplainerPanel.stories.d.ts +12 -0
- package/dist/panels/WhyNowAgentRevolutionExplainerPanel.stories.d.ts.map +1 -0
- package/dist/panels/execution-viewer/EventNodeMapper.d.ts +2 -1
- package/dist/panels/execution-viewer/EventNodeMapper.d.ts.map +1 -1
- package/dist/panels/execution-viewer/ExecutionLoader.d.ts +11 -2
- package/dist/panels/execution-viewer/ExecutionLoader.d.ts.map +1 -1
- package/dist/panels/execution-viewer/NarrativeTemplatePanel.d.ts.map +1 -1
- package/dist/panels/execution-viewer/TestEventPanel.d.ts +2 -1
- package/dist/panels/execution-viewer/TestEventPanel.d.ts.map +1 -1
- package/dist/panels/execution-viewer/narrative-converter.d.ts +3 -2
- package/dist/panels/execution-viewer/narrative-converter.d.ts.map +1 -1
- package/dist/panels.bundle.js +3088 -720
- package/dist/panels.bundle.js.map +1 -1
- package/package.json +1 -1
- package/dist/panels/TraceViewerPanel.d.ts +0 -10
- package/dist/panels/TraceViewerPanel.d.ts.map +0 -1
- package/dist/panels/TraceViewerPanel.stories.d.ts +0 -55
- package/dist/panels/TraceViewerPanel.stories.d.ts.map +0 -1
- package/dist/panels/trace-viewer/TraceLoader.d.ts +0 -45
- package/dist/panels/trace-viewer/TraceLoader.d.ts.map +0 -1
- package/dist/panels/trace-viewer/TraceStats.d.ts +0 -17
- package/dist/panels/trace-viewer/TraceStats.d.ts.map +0 -1
package/dist/panels.bundle.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
try {
|
|
4
4
|
if (typeof document != "undefined") {
|
|
5
5
|
var elementStyle = document.createElement("style");
|
|
6
|
-
elementStyle.appendChild(document.createTextNode("/* this gets exported as style.css and can be used for the default theming */\n/* these are the necessary styles for React/Svelte Flow, they get used by base.css and style.css */\n.react-flow {\n direction: ltr;\n\n --xy-edge-stroke-default: #b1b1b7;\n --xy-edge-stroke-width-default: 1;\n --xy-edge-stroke-selected-default: #555;\n\n --xy-connectionline-stroke-default: #b1b1b7;\n --xy-connectionline-stroke-width-default: 1;\n\n --xy-attribution-background-color-default: rgba(255, 255, 255, 0.5);\n\n --xy-minimap-background-color-default: #fff;\n --xy-minimap-mask-background-color-default: rgb(240, 240, 240, 0.6);\n --xy-minimap-mask-stroke-color-default: transparent;\n --xy-minimap-mask-stroke-width-default: 1;\n --xy-minimap-node-background-color-default: #e2e2e2;\n --xy-minimap-node-stroke-color-default: transparent;\n --xy-minimap-node-stroke-width-default: 2;\n\n --xy-background-color-default: transparent;\n --xy-background-pattern-dots-color-default: #91919a;\n --xy-background-pattern-lines-color-default: #eee;\n --xy-background-pattern-cross-color-default: #e2e2e2;\n background-color: var(--xy-background-color, var(--xy-background-color-default));\n --xy-node-color-default: inherit;\n --xy-node-border-default: 1px solid #1a192b;\n --xy-node-background-color-default: #fff;\n --xy-node-group-background-color-default: rgba(240, 240, 240, 0.25);\n --xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(0, 0, 0, 0.08);\n --xy-node-boxshadow-selected-default: 0 0 0 0.5px #1a192b;\n --xy-node-border-radius-default: 3px;\n\n --xy-handle-background-color-default: #1a192b;\n --xy-handle-border-color-default: #fff;\n\n --xy-selection-background-color-default: rgba(0, 89, 220, 0.08);\n --xy-selection-border-default: 1px dotted rgba(0, 89, 220, 0.8);\n\n --xy-controls-button-background-color-default: #fefefe;\n --xy-controls-button-background-color-hover-default: #f4f4f4;\n --xy-controls-button-color-default: inherit;\n --xy-controls-button-color-hover-default: inherit;\n --xy-controls-button-border-color-default: #eee;\n --xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, 0.08);\n\n --xy-edge-label-background-color-default: #ffffff;\n --xy-edge-label-color-default: inherit;\n --xy-resize-background-color-default: #3367d9;\n}\n.react-flow.dark {\n --xy-edge-stroke-default: #3e3e3e;\n --xy-edge-stroke-width-default: 1;\n --xy-edge-stroke-selected-default: #727272;\n\n --xy-connectionline-stroke-default: #b1b1b7;\n --xy-connectionline-stroke-width-default: 1;\n\n --xy-attribution-background-color-default: rgba(150, 150, 150, 0.25);\n\n --xy-minimap-background-color-default: #141414;\n --xy-minimap-mask-background-color-default: rgb(60, 60, 60, 0.6);\n --xy-minimap-mask-stroke-color-default: transparent;\n --xy-minimap-mask-stroke-width-default: 1;\n --xy-minimap-node-background-color-default: #2b2b2b;\n --xy-minimap-node-stroke-color-default: transparent;\n --xy-minimap-node-stroke-width-default: 2;\n\n --xy-background-color-default: #141414;\n --xy-background-pattern-dots-color-default: #777;\n --xy-background-pattern-lines-color-default: #777;\n --xy-background-pattern-cross-color-default: #777;\n --xy-node-color-default: #f8f8f8;\n --xy-node-border-default: 1px solid #3c3c3c;\n --xy-node-background-color-default: #1e1e1e;\n --xy-node-group-background-color-default: rgba(240, 240, 240, 0.25);\n --xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(255, 255, 255, 0.08);\n --xy-node-boxshadow-selected-default: 0 0 0 0.5px #999;\n\n --xy-handle-background-color-default: #bebebe;\n --xy-handle-border-color-default: #1e1e1e;\n\n --xy-selection-background-color-default: rgba(200, 200, 220, 0.08);\n --xy-selection-border-default: 1px dotted rgba(200, 200, 220, 0.8);\n\n --xy-controls-button-background-color-default: #2b2b2b;\n --xy-controls-button-background-color-hover-default: #3e3e3e;\n --xy-controls-button-color-default: #f8f8f8;\n --xy-controls-button-color-hover-default: #fff;\n --xy-controls-button-border-color-default: #5b5b5b;\n --xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, 0.08);\n\n --xy-edge-label-background-color-default: #141414;\n --xy-edge-label-color-default: #f8f8f8;\n}\n.react-flow__background {\n background-color: var(--xy-background-color, var(--xy-background-color-props, var(--xy-background-color-default)));\n pointer-events: none;\n z-index: -1;\n}\n.react-flow__container {\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n}\n.react-flow__pane {\n z-index: 1;\n}\n.react-flow__pane.selection {\n cursor: pointer;\n }\n.react-flow__pane.draggable {\n cursor: grab;\n }\n.react-flow__pane.draggable.dragging {\n cursor: grabbing;\n }\n.react-flow__viewport {\n transform-origin: 0 0;\n z-index: 2;\n pointer-events: none;\n}\n.react-flow__renderer {\n z-index: 4;\n}\n.react-flow__selection {\n z-index: 6;\n}\n.react-flow__nodesselection-rect:focus,\n.react-flow__nodesselection-rect:focus-visible {\n outline: none;\n}\n.react-flow__edge-path {\n stroke: var(--xy-edge-stroke, var(--xy-edge-stroke-default));\n stroke-width: var(--xy-edge-stroke-width, var(--xy-edge-stroke-width-default));\n fill: none;\n}\n.react-flow__connection-path {\n stroke: var(--xy-connectionline-stroke, var(--xy-connectionline-stroke-default));\n stroke-width: var(--xy-connectionline-stroke-width, var(--xy-connectionline-stroke-width-default));\n fill: none;\n}\n.react-flow__edges {\n position: absolute;\n}\n.react-flow__edges svg {\n overflow: visible;\n position: absolute;\n pointer-events: none;\n }\n.react-flow__edge {\n pointer-events: visibleStroke;\n}\n.react-flow__edge.selectable {\n cursor: pointer;\n }\n.react-flow__edge.animated path {\n stroke-dasharray: 5;\n animation: dashdraw 0.5s linear infinite;\n }\n.react-flow__edge.animated path.react-flow__edge-interaction {\n stroke-dasharray: none;\n animation: none;\n }\n.react-flow__edge.inactive {\n pointer-events: none;\n }\n.react-flow__edge.selected,\n .react-flow__edge:focus,\n .react-flow__edge:focus-visible {\n outline: none;\n }\n.react-flow__edge.selected .react-flow__edge-path,\n .react-flow__edge.selectable:focus .react-flow__edge-path,\n .react-flow__edge.selectable:focus-visible .react-flow__edge-path {\n stroke: var(--xy-edge-stroke-selected, var(--xy-edge-stroke-selected-default));\n }\n.react-flow__edge-textwrapper {\n pointer-events: all;\n }\n.react-flow__edge .react-flow__edge-text {\n pointer-events: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n }\n.react-flow__connection {\n pointer-events: none;\n}\n.react-flow__connection .animated {\n stroke-dasharray: 5;\n animation: dashdraw 0.5s linear infinite;\n }\nsvg.react-flow__connectionline {\n z-index: 1001;\n overflow: visible;\n position: absolute;\n}\n.react-flow__nodes {\n pointer-events: none;\n transform-origin: 0 0;\n}\n.react-flow__node {\n position: absolute;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n pointer-events: all;\n transform-origin: 0 0;\n box-sizing: border-box;\n cursor: default;\n}\n.react-flow__node.selectable {\n cursor: pointer;\n }\n.react-flow__node.draggable {\n cursor: grab;\n pointer-events: all;\n }\n.react-flow__node.draggable.dragging {\n cursor: grabbing;\n }\n.react-flow__nodesselection {\n z-index: 3;\n transform-origin: left top;\n pointer-events: none;\n}\n.react-flow__nodesselection-rect {\n position: absolute;\n pointer-events: all;\n cursor: grab;\n }\n.react-flow__handle {\n position: absolute;\n pointer-events: none;\n min-width: 5px;\n min-height: 5px;\n width: 6px;\n height: 6px;\n background-color: var(--xy-handle-background-color, var(--xy-handle-background-color-default));\n border: 1px solid var(--xy-handle-border-color, var(--xy-handle-border-color-default));\n border-radius: 100%;\n}\n.react-flow__handle.connectingfrom {\n pointer-events: all;\n }\n.react-flow__handle.connectionindicator {\n pointer-events: all;\n cursor: crosshair;\n }\n.react-flow__handle-bottom {\n top: auto;\n left: 50%;\n bottom: 0;\n transform: translate(-50%, 50%);\n }\n.react-flow__handle-top {\n top: 0;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n.react-flow__handle-left {\n top: 50%;\n left: 0;\n transform: translate(-50%, -50%);\n }\n.react-flow__handle-right {\n top: 50%;\n right: 0;\n transform: translate(50%, -50%);\n }\n.react-flow__edgeupdater {\n cursor: move;\n pointer-events: all;\n}\n.react-flow__panel {\n position: absolute;\n z-index: 5;\n margin: 15px;\n}\n.react-flow__panel.top {\n top: 0;\n }\n.react-flow__panel.bottom {\n bottom: 0;\n }\n.react-flow__panel.left {\n left: 0;\n }\n.react-flow__panel.right {\n right: 0;\n }\n.react-flow__panel.center {\n left: 50%;\n transform: translateX(-50%);\n }\n.react-flow__attribution {\n font-size: 10px;\n background: var(--xy-attribution-background-color, var(--xy-attribution-background-color-default));\n padding: 2px 3px;\n margin: 0;\n}\n.react-flow__attribution a {\n text-decoration: none;\n color: #999;\n }\n@keyframes dashdraw {\n from {\n stroke-dashoffset: 10;\n }\n}\n.react-flow__edgelabel-renderer {\n position: absolute;\n width: 100%;\n height: 100%;\n pointer-events: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n left: 0;\n top: 0;\n}\n.react-flow__viewport-portal {\n position: absolute;\n width: 100%;\n height: 100%;\n left: 0;\n top: 0;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n}\n.react-flow__minimap {\n background: var(\n --xy-minimap-background-color-props,\n var(--xy-minimap-background-color, var(--xy-minimap-background-color-default))\n );\n}\n.react-flow__minimap-svg {\n display: block;\n }\n.react-flow__minimap-mask {\n fill: var(\n --xy-minimap-mask-background-color-props,\n var(--xy-minimap-mask-background-color, var(--xy-minimap-mask-background-color-default))\n );\n stroke: var(\n --xy-minimap-mask-stroke-color-props,\n var(--xy-minimap-mask-stroke-color, var(--xy-minimap-mask-stroke-color-default))\n );\n stroke-width: var(\n --xy-minimap-mask-stroke-width-props,\n var(--xy-minimap-mask-stroke-width, var(--xy-minimap-mask-stroke-width-default))\n );\n }\n.react-flow__minimap-node {\n fill: var(\n --xy-minimap-node-background-color-props,\n var(--xy-minimap-node-background-color, var(--xy-minimap-node-background-color-default))\n );\n stroke: var(\n --xy-minimap-node-stroke-color-props,\n var(--xy-minimap-node-stroke-color, var(--xy-minimap-node-stroke-color-default))\n );\n stroke-width: var(\n --xy-minimap-node-stroke-width-props,\n var(--xy-minimap-node-stroke-width, var(--xy-minimap-node-stroke-width-default))\n );\n }\n.react-flow__background-pattern.dots {\n fill: var(\n --xy-background-pattern-color-props,\n var(--xy-background-pattern-color, var(--xy-background-pattern-dots-color-default))\n );\n }\n.react-flow__background-pattern.lines {\n stroke: var(\n --xy-background-pattern-color-props,\n var(--xy-background-pattern-color, var(--xy-background-pattern-lines-color-default))\n );\n }\n.react-flow__background-pattern.cross {\n stroke: var(\n --xy-background-pattern-color-props,\n var(--xy-background-pattern-color, var(--xy-background-pattern-cross-color-default))\n );\n }\n.react-flow__controls {\n display: flex;\n flex-direction: column;\n box-shadow: var(--xy-controls-box-shadow, var(--xy-controls-box-shadow-default));\n}\n.react-flow__controls.horizontal {\n flex-direction: row;\n }\n.react-flow__controls-button {\n display: flex;\n justify-content: center;\n align-items: center;\n height: 26px;\n width: 26px;\n padding: 4px;\n border: none;\n background: var(--xy-controls-button-background-color, var(--xy-controls-button-background-color-default));\n border-bottom: 1px solid\n var(\n --xy-controls-button-border-color-props,\n var(--xy-controls-button-border-color, var(--xy-controls-button-border-color-default))\n );\n color: var(\n --xy-controls-button-color-props,\n var(--xy-controls-button-color, var(--xy-controls-button-color-default))\n );\n cursor: pointer;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n }\n.react-flow__controls-button svg {\n width: 100%;\n max-width: 12px;\n max-height: 12px;\n fill: currentColor;\n }\n.react-flow__edge.updating .react-flow__edge-path {\n stroke: #777;\n }\n.react-flow__edge-text {\n font-size: 10px;\n }\n.react-flow__node.selectable:focus,\n .react-flow__node.selectable:focus-visible {\n outline: none;\n }\n.react-flow__node-input,\n.react-flow__node-default,\n.react-flow__node-output,\n.react-flow__node-group {\n padding: 10px;\n border-radius: var(--xy-node-border-radius, var(--xy-node-border-radius-default));\n width: 150px;\n font-size: 12px;\n color: var(--xy-node-color, var(--xy-node-color-default));\n text-align: center;\n border: var(--xy-node-border, var(--xy-node-border-default));\n background-color: var(--xy-node-background-color, var(--xy-node-background-color-default));\n}\n.react-flow__node-input.selectable:hover, .react-flow__node-default.selectable:hover, .react-flow__node-output.selectable:hover, .react-flow__node-group.selectable:hover {\n box-shadow: var(--xy-node-boxshadow-hover, var(--xy-node-boxshadow-hover-default));\n }\n.react-flow__node-input.selectable.selected,\n .react-flow__node-input.selectable:focus,\n .react-flow__node-input.selectable:focus-visible,\n .react-flow__node-default.selectable.selected,\n .react-flow__node-default.selectable:focus,\n .react-flow__node-default.selectable:focus-visible,\n .react-flow__node-output.selectable.selected,\n .react-flow__node-output.selectable:focus,\n .react-flow__node-output.selectable:focus-visible,\n .react-flow__node-group.selectable.selected,\n .react-flow__node-group.selectable:focus,\n .react-flow__node-group.selectable:focus-visible {\n box-shadow: var(--xy-node-boxshadow-selected, var(--xy-node-boxshadow-selected-default));\n }\n.react-flow__node-group {\n background-color: var(--xy-node-group-background-color, var(--xy-node-group-background-color-default));\n}\n.react-flow__nodesselection-rect,\n.react-flow__selection {\n background: var(--xy-selection-background-color, var(--xy-selection-background-color-default));\n border: var(--xy-selection-border, var(--xy-selection-border-default));\n}\n.react-flow__nodesselection-rect:focus,\n .react-flow__nodesselection-rect:focus-visible,\n .react-flow__selection:focus,\n .react-flow__selection:focus-visible {\n outline: none;\n }\n.react-flow__controls-button:hover {\n background: var(\n --xy-controls-button-background-color-hover-props,\n var(--xy-controls-button-background-color-hover, var(--xy-controls-button-background-color-hover-default))\n );\n color: var(\n --xy-controls-button-color-hover-props,\n var(--xy-controls-button-color-hover, var(--xy-controls-button-color-hover-default))\n );\n }\n.react-flow__controls-button:disabled {\n pointer-events: none;\n }\n.react-flow__controls-button:disabled svg {\n fill-opacity: 0.4;\n }\n.react-flow__controls-button:last-child {\n border-bottom: none;\n }\n.react-flow__resize-control {\n position: absolute;\n}\n.react-flow__resize-control.left,\n.react-flow__resize-control.right {\n cursor: ew-resize;\n}\n.react-flow__resize-control.top,\n.react-flow__resize-control.bottom {\n cursor: ns-resize;\n}\n.react-flow__resize-control.top.left,\n.react-flow__resize-control.bottom.right {\n cursor: nwse-resize;\n}\n.react-flow__resize-control.bottom.left,\n.react-flow__resize-control.top.right {\n cursor: nesw-resize;\n}\n/* handle styles */\n.react-flow__resize-control.handle {\n width: 4px;\n height: 4px;\n border: 1px solid #fff;\n border-radius: 1px;\n background-color: var(--xy-resize-background-color, var(--xy-resize-background-color-default));\n transform: translate(-50%, -50%);\n}\n.react-flow__resize-control.handle.left {\n left: 0;\n top: 50%;\n}\n.react-flow__resize-control.handle.right {\n left: 100%;\n top: 50%;\n}\n.react-flow__resize-control.handle.top {\n left: 50%;\n top: 0;\n}\n.react-flow__resize-control.handle.bottom {\n left: 50%;\n top: 100%;\n}\n.react-flow__resize-control.handle.top.left {\n left: 0;\n}\n.react-flow__resize-control.handle.bottom.left {\n left: 0;\n}\n.react-flow__resize-control.handle.top.right {\n left: 100%;\n}\n.react-flow__resize-control.handle.bottom.right {\n left: 100%;\n}\n/* line styles */\n.react-flow__resize-control.line {\n border-color: var(--xy-resize-background-color, var(--xy-resize-background-color-default));\n border-width: 0;\n border-style: solid;\n}\n.react-flow__resize-control.line.left,\n.react-flow__resize-control.line.right {\n width: 1px;\n transform: translate(-50%, 0);\n top: 0;\n height: 100%;\n}\n.react-flow__resize-control.line.left {\n left: 0;\n border-left-width: 1px;\n}\n.react-flow__resize-control.line.right {\n left: 100%;\n border-right-width: 1px;\n}\n.react-flow__resize-control.line.top,\n.react-flow__resize-control.line.bottom {\n height: 1px;\n transform: translate(0, -50%);\n left: 0;\n width: 100%;\n}\n.react-flow__resize-control.line.top {\n top: 0;\n border-top-width: 1px;\n}\n.react-flow__resize-control.line.bottom {\n border-bottom-width: 1px;\n top: 100%;\n}\n.react-flow__edge-textbg {\n fill: var(--xy-edge-label-background-color, var(--xy-edge-label-background-color-default));\n}\n.react-flow__edge-text {\n fill: var(--xy-edge-label-color, var(--xy-edge-label-color-default));\n}"));
|
|
6
|
+
elementStyle.appendChild(document.createTextNode('/* this gets exported as style.css and can be used for the default theming */\n/* these are the necessary styles for React/Svelte Flow, they get used by base.css and style.css */\n.react-flow {\n direction: ltr;\n\n --xy-edge-stroke-default: #b1b1b7;\n --xy-edge-stroke-width-default: 1;\n --xy-edge-stroke-selected-default: #555;\n\n --xy-connectionline-stroke-default: #b1b1b7;\n --xy-connectionline-stroke-width-default: 1;\n\n --xy-attribution-background-color-default: rgba(255, 255, 255, 0.5);\n\n --xy-minimap-background-color-default: #fff;\n --xy-minimap-mask-background-color-default: rgb(240, 240, 240, 0.6);\n --xy-minimap-mask-stroke-color-default: transparent;\n --xy-minimap-mask-stroke-width-default: 1;\n --xy-minimap-node-background-color-default: #e2e2e2;\n --xy-minimap-node-stroke-color-default: transparent;\n --xy-minimap-node-stroke-width-default: 2;\n\n --xy-background-color-default: transparent;\n --xy-background-pattern-dots-color-default: #91919a;\n --xy-background-pattern-lines-color-default: #eee;\n --xy-background-pattern-cross-color-default: #e2e2e2;\n background-color: var(--xy-background-color, var(--xy-background-color-default));\n --xy-node-color-default: inherit;\n --xy-node-border-default: 1px solid #1a192b;\n --xy-node-background-color-default: #fff;\n --xy-node-group-background-color-default: rgba(240, 240, 240, 0.25);\n --xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(0, 0, 0, 0.08);\n --xy-node-boxshadow-selected-default: 0 0 0 0.5px #1a192b;\n --xy-node-border-radius-default: 3px;\n\n --xy-handle-background-color-default: #1a192b;\n --xy-handle-border-color-default: #fff;\n\n --xy-selection-background-color-default: rgba(0, 89, 220, 0.08);\n --xy-selection-border-default: 1px dotted rgba(0, 89, 220, 0.8);\n\n --xy-controls-button-background-color-default: #fefefe;\n --xy-controls-button-background-color-hover-default: #f4f4f4;\n --xy-controls-button-color-default: inherit;\n --xy-controls-button-color-hover-default: inherit;\n --xy-controls-button-border-color-default: #eee;\n --xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, 0.08);\n\n --xy-edge-label-background-color-default: #ffffff;\n --xy-edge-label-color-default: inherit;\n --xy-resize-background-color-default: #3367d9;\n}\n.react-flow.dark {\n --xy-edge-stroke-default: #3e3e3e;\n --xy-edge-stroke-width-default: 1;\n --xy-edge-stroke-selected-default: #727272;\n\n --xy-connectionline-stroke-default: #b1b1b7;\n --xy-connectionline-stroke-width-default: 1;\n\n --xy-attribution-background-color-default: rgba(150, 150, 150, 0.25);\n\n --xy-minimap-background-color-default: #141414;\n --xy-minimap-mask-background-color-default: rgb(60, 60, 60, 0.6);\n --xy-minimap-mask-stroke-color-default: transparent;\n --xy-minimap-mask-stroke-width-default: 1;\n --xy-minimap-node-background-color-default: #2b2b2b;\n --xy-minimap-node-stroke-color-default: transparent;\n --xy-minimap-node-stroke-width-default: 2;\n\n --xy-background-color-default: #141414;\n --xy-background-pattern-dots-color-default: #777;\n --xy-background-pattern-lines-color-default: #777;\n --xy-background-pattern-cross-color-default: #777;\n --xy-node-color-default: #f8f8f8;\n --xy-node-border-default: 1px solid #3c3c3c;\n --xy-node-background-color-default: #1e1e1e;\n --xy-node-group-background-color-default: rgba(240, 240, 240, 0.25);\n --xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(255, 255, 255, 0.08);\n --xy-node-boxshadow-selected-default: 0 0 0 0.5px #999;\n\n --xy-handle-background-color-default: #bebebe;\n --xy-handle-border-color-default: #1e1e1e;\n\n --xy-selection-background-color-default: rgba(200, 200, 220, 0.08);\n --xy-selection-border-default: 1px dotted rgba(200, 200, 220, 0.8);\n\n --xy-controls-button-background-color-default: #2b2b2b;\n --xy-controls-button-background-color-hover-default: #3e3e3e;\n --xy-controls-button-color-default: #f8f8f8;\n --xy-controls-button-color-hover-default: #fff;\n --xy-controls-button-border-color-default: #5b5b5b;\n --xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, 0.08);\n\n --xy-edge-label-background-color-default: #141414;\n --xy-edge-label-color-default: #f8f8f8;\n}\n.react-flow__background {\n background-color: var(--xy-background-color, var(--xy-background-color-props, var(--xy-background-color-default)));\n pointer-events: none;\n z-index: -1;\n}\n.react-flow__container {\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n}\n.react-flow__pane {\n z-index: 1;\n}\n.react-flow__pane.selection {\n cursor: pointer;\n }\n.react-flow__pane.draggable {\n cursor: grab;\n }\n.react-flow__pane.draggable.dragging {\n cursor: grabbing;\n }\n.react-flow__viewport {\n transform-origin: 0 0;\n z-index: 2;\n pointer-events: none;\n}\n.react-flow__renderer {\n z-index: 4;\n}\n.react-flow__selection {\n z-index: 6;\n}\n.react-flow__nodesselection-rect:focus,\n.react-flow__nodesselection-rect:focus-visible {\n outline: none;\n}\n.react-flow__edge-path {\n stroke: var(--xy-edge-stroke, var(--xy-edge-stroke-default));\n stroke-width: var(--xy-edge-stroke-width, var(--xy-edge-stroke-width-default));\n fill: none;\n}\n.react-flow__connection-path {\n stroke: var(--xy-connectionline-stroke, var(--xy-connectionline-stroke-default));\n stroke-width: var(--xy-connectionline-stroke-width, var(--xy-connectionline-stroke-width-default));\n fill: none;\n}\n.react-flow__edges {\n position: absolute;\n}\n.react-flow__edges svg {\n overflow: visible;\n position: absolute;\n pointer-events: none;\n }\n.react-flow__edge {\n pointer-events: visibleStroke;\n}\n.react-flow__edge.selectable {\n cursor: pointer;\n }\n.react-flow__edge.animated path {\n stroke-dasharray: 5;\n animation: dashdraw 0.5s linear infinite;\n }\n.react-flow__edge.animated path.react-flow__edge-interaction {\n stroke-dasharray: none;\n animation: none;\n }\n.react-flow__edge.inactive {\n pointer-events: none;\n }\n.react-flow__edge.selected,\n .react-flow__edge:focus,\n .react-flow__edge:focus-visible {\n outline: none;\n }\n.react-flow__edge.selected .react-flow__edge-path,\n .react-flow__edge.selectable:focus .react-flow__edge-path,\n .react-flow__edge.selectable:focus-visible .react-flow__edge-path {\n stroke: var(--xy-edge-stroke-selected, var(--xy-edge-stroke-selected-default));\n }\n.react-flow__edge-textwrapper {\n pointer-events: all;\n }\n.react-flow__edge .react-flow__edge-text {\n pointer-events: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n }\n.react-flow__connection {\n pointer-events: none;\n}\n.react-flow__connection .animated {\n stroke-dasharray: 5;\n animation: dashdraw 0.5s linear infinite;\n }\nsvg.react-flow__connectionline {\n z-index: 1001;\n overflow: visible;\n position: absolute;\n}\n.react-flow__nodes {\n pointer-events: none;\n transform-origin: 0 0;\n}\n.react-flow__node {\n position: absolute;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n pointer-events: all;\n transform-origin: 0 0;\n box-sizing: border-box;\n cursor: default;\n}\n.react-flow__node.selectable {\n cursor: pointer;\n }\n.react-flow__node.draggable {\n cursor: grab;\n pointer-events: all;\n }\n.react-flow__node.draggable.dragging {\n cursor: grabbing;\n }\n.react-flow__nodesselection {\n z-index: 3;\n transform-origin: left top;\n pointer-events: none;\n}\n.react-flow__nodesselection-rect {\n position: absolute;\n pointer-events: all;\n cursor: grab;\n }\n.react-flow__handle {\n position: absolute;\n pointer-events: none;\n min-width: 5px;\n min-height: 5px;\n width: 6px;\n height: 6px;\n background-color: var(--xy-handle-background-color, var(--xy-handle-background-color-default));\n border: 1px solid var(--xy-handle-border-color, var(--xy-handle-border-color-default));\n border-radius: 100%;\n}\n.react-flow__handle.connectingfrom {\n pointer-events: all;\n }\n.react-flow__handle.connectionindicator {\n pointer-events: all;\n cursor: crosshair;\n }\n.react-flow__handle-bottom {\n top: auto;\n left: 50%;\n bottom: 0;\n transform: translate(-50%, 50%);\n }\n.react-flow__handle-top {\n top: 0;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n.react-flow__handle-left {\n top: 50%;\n left: 0;\n transform: translate(-50%, -50%);\n }\n.react-flow__handle-right {\n top: 50%;\n right: 0;\n transform: translate(50%, -50%);\n }\n.react-flow__edgeupdater {\n cursor: move;\n pointer-events: all;\n}\n.react-flow__panel {\n position: absolute;\n z-index: 5;\n margin: 15px;\n}\n.react-flow__panel.top {\n top: 0;\n }\n.react-flow__panel.bottom {\n bottom: 0;\n }\n.react-flow__panel.left {\n left: 0;\n }\n.react-flow__panel.right {\n right: 0;\n }\n.react-flow__panel.center {\n left: 50%;\n transform: translateX(-50%);\n }\n.react-flow__attribution {\n font-size: 10px;\n background: var(--xy-attribution-background-color, var(--xy-attribution-background-color-default));\n padding: 2px 3px;\n margin: 0;\n}\n.react-flow__attribution a {\n text-decoration: none;\n color: #999;\n }\n@keyframes dashdraw {\n from {\n stroke-dashoffset: 10;\n }\n}\n.react-flow__edgelabel-renderer {\n position: absolute;\n width: 100%;\n height: 100%;\n pointer-events: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n left: 0;\n top: 0;\n}\n.react-flow__viewport-portal {\n position: absolute;\n width: 100%;\n height: 100%;\n left: 0;\n top: 0;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n}\n.react-flow__minimap {\n background: var(\n --xy-minimap-background-color-props,\n var(--xy-minimap-background-color, var(--xy-minimap-background-color-default))\n );\n}\n.react-flow__minimap-svg {\n display: block;\n }\n.react-flow__minimap-mask {\n fill: var(\n --xy-minimap-mask-background-color-props,\n var(--xy-minimap-mask-background-color, var(--xy-minimap-mask-background-color-default))\n );\n stroke: var(\n --xy-minimap-mask-stroke-color-props,\n var(--xy-minimap-mask-stroke-color, var(--xy-minimap-mask-stroke-color-default))\n );\n stroke-width: var(\n --xy-minimap-mask-stroke-width-props,\n var(--xy-minimap-mask-stroke-width, var(--xy-minimap-mask-stroke-width-default))\n );\n }\n.react-flow__minimap-node {\n fill: var(\n --xy-minimap-node-background-color-props,\n var(--xy-minimap-node-background-color, var(--xy-minimap-node-background-color-default))\n );\n stroke: var(\n --xy-minimap-node-stroke-color-props,\n var(--xy-minimap-node-stroke-color, var(--xy-minimap-node-stroke-color-default))\n );\n stroke-width: var(\n --xy-minimap-node-stroke-width-props,\n var(--xy-minimap-node-stroke-width, var(--xy-minimap-node-stroke-width-default))\n );\n }\n.react-flow__background-pattern.dots {\n fill: var(\n --xy-background-pattern-color-props,\n var(--xy-background-pattern-color, var(--xy-background-pattern-dots-color-default))\n );\n }\n.react-flow__background-pattern.lines {\n stroke: var(\n --xy-background-pattern-color-props,\n var(--xy-background-pattern-color, var(--xy-background-pattern-lines-color-default))\n );\n }\n.react-flow__background-pattern.cross {\n stroke: var(\n --xy-background-pattern-color-props,\n var(--xy-background-pattern-color, var(--xy-background-pattern-cross-color-default))\n );\n }\n.react-flow__controls {\n display: flex;\n flex-direction: column;\n box-shadow: var(--xy-controls-box-shadow, var(--xy-controls-box-shadow-default));\n}\n.react-flow__controls.horizontal {\n flex-direction: row;\n }\n.react-flow__controls-button {\n display: flex;\n justify-content: center;\n align-items: center;\n height: 26px;\n width: 26px;\n padding: 4px;\n border: none;\n background: var(--xy-controls-button-background-color, var(--xy-controls-button-background-color-default));\n border-bottom: 1px solid\n var(\n --xy-controls-button-border-color-props,\n var(--xy-controls-button-border-color, var(--xy-controls-button-border-color-default))\n );\n color: var(\n --xy-controls-button-color-props,\n var(--xy-controls-button-color, var(--xy-controls-button-color-default))\n );\n cursor: pointer;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n }\n.react-flow__controls-button svg {\n width: 100%;\n max-width: 12px;\n max-height: 12px;\n fill: currentColor;\n }\n.react-flow__edge.updating .react-flow__edge-path {\n stroke: #777;\n }\n.react-flow__edge-text {\n font-size: 10px;\n }\n.react-flow__node.selectable:focus,\n .react-flow__node.selectable:focus-visible {\n outline: none;\n }\n.react-flow__node-input,\n.react-flow__node-default,\n.react-flow__node-output,\n.react-flow__node-group {\n padding: 10px;\n border-radius: var(--xy-node-border-radius, var(--xy-node-border-radius-default));\n width: 150px;\n font-size: 12px;\n color: var(--xy-node-color, var(--xy-node-color-default));\n text-align: center;\n border: var(--xy-node-border, var(--xy-node-border-default));\n background-color: var(--xy-node-background-color, var(--xy-node-background-color-default));\n}\n.react-flow__node-input.selectable:hover, .react-flow__node-default.selectable:hover, .react-flow__node-output.selectable:hover, .react-flow__node-group.selectable:hover {\n box-shadow: var(--xy-node-boxshadow-hover, var(--xy-node-boxshadow-hover-default));\n }\n.react-flow__node-input.selectable.selected,\n .react-flow__node-input.selectable:focus,\n .react-flow__node-input.selectable:focus-visible,\n .react-flow__node-default.selectable.selected,\n .react-flow__node-default.selectable:focus,\n .react-flow__node-default.selectable:focus-visible,\n .react-flow__node-output.selectable.selected,\n .react-flow__node-output.selectable:focus,\n .react-flow__node-output.selectable:focus-visible,\n .react-flow__node-group.selectable.selected,\n .react-flow__node-group.selectable:focus,\n .react-flow__node-group.selectable:focus-visible {\n box-shadow: var(--xy-node-boxshadow-selected, var(--xy-node-boxshadow-selected-default));\n }\n.react-flow__node-group {\n background-color: var(--xy-node-group-background-color, var(--xy-node-group-background-color-default));\n}\n.react-flow__nodesselection-rect,\n.react-flow__selection {\n background: var(--xy-selection-background-color, var(--xy-selection-background-color-default));\n border: var(--xy-selection-border, var(--xy-selection-border-default));\n}\n.react-flow__nodesselection-rect:focus,\n .react-flow__nodesselection-rect:focus-visible,\n .react-flow__selection:focus,\n .react-flow__selection:focus-visible {\n outline: none;\n }\n.react-flow__controls-button:hover {\n background: var(\n --xy-controls-button-background-color-hover-props,\n var(--xy-controls-button-background-color-hover, var(--xy-controls-button-background-color-hover-default))\n );\n color: var(\n --xy-controls-button-color-hover-props,\n var(--xy-controls-button-color-hover, var(--xy-controls-button-color-hover-default))\n );\n }\n.react-flow__controls-button:disabled {\n pointer-events: none;\n }\n.react-flow__controls-button:disabled svg {\n fill-opacity: 0.4;\n }\n.react-flow__controls-button:last-child {\n border-bottom: none;\n }\n.react-flow__resize-control {\n position: absolute;\n}\n.react-flow__resize-control.left,\n.react-flow__resize-control.right {\n cursor: ew-resize;\n}\n.react-flow__resize-control.top,\n.react-flow__resize-control.bottom {\n cursor: ns-resize;\n}\n.react-flow__resize-control.top.left,\n.react-flow__resize-control.bottom.right {\n cursor: nwse-resize;\n}\n.react-flow__resize-control.bottom.left,\n.react-flow__resize-control.top.right {\n cursor: nesw-resize;\n}\n/* handle styles */\n.react-flow__resize-control.handle {\n width: 4px;\n height: 4px;\n border: 1px solid #fff;\n border-radius: 1px;\n background-color: var(--xy-resize-background-color, var(--xy-resize-background-color-default));\n transform: translate(-50%, -50%);\n}\n.react-flow__resize-control.handle.left {\n left: 0;\n top: 50%;\n}\n.react-flow__resize-control.handle.right {\n left: 100%;\n top: 50%;\n}\n.react-flow__resize-control.handle.top {\n left: 50%;\n top: 0;\n}\n.react-flow__resize-control.handle.bottom {\n left: 50%;\n top: 100%;\n}\n.react-flow__resize-control.handle.top.left {\n left: 0;\n}\n.react-flow__resize-control.handle.bottom.left {\n left: 0;\n}\n.react-flow__resize-control.handle.top.right {\n left: 100%;\n}\n.react-flow__resize-control.handle.bottom.right {\n left: 100%;\n}\n/* line styles */\n.react-flow__resize-control.line {\n border-color: var(--xy-resize-background-color, var(--xy-resize-background-color-default));\n border-width: 0;\n border-style: solid;\n}\n.react-flow__resize-control.line.left,\n.react-flow__resize-control.line.right {\n width: 1px;\n transform: translate(-50%, 0);\n top: 0;\n height: 100%;\n}\n.react-flow__resize-control.line.left {\n left: 0;\n border-left-width: 1px;\n}\n.react-flow__resize-control.line.right {\n left: 100%;\n border-right-width: 1px;\n}\n.react-flow__resize-control.line.top,\n.react-flow__resize-control.line.bottom {\n height: 1px;\n transform: translate(0, -50%);\n left: 0;\n width: 100%;\n}\n.react-flow__resize-control.line.top {\n top: 0;\n border-top-width: 1px;\n}\n.react-flow__resize-control.line.bottom {\n border-bottom-width: 1px;\n top: 100%;\n}\n.react-flow__edge-textbg {\n fill: var(--xy-edge-label-background-color, var(--xy-edge-label-background-color-default));\n}\n.react-flow__edge-text {\n fill: var(--xy-edge-label-color, var(--xy-edge-label-color-default));\n}\n.animated-resizable-layout{width:100%;height:100%;position:relative;background-color:var(--panel-background)}.hybrid-panel{overflow:auto;height:100%;background-color:var(--panel-background)}.resize-handle{width:8px;background-color:var(--panel-handle);display:flex;justify-content:center;align-items:center;cursor:col-resize;position:relative;transition:background-color .2s,opacity .3s,width .3s}.resize-handle.collapsed{opacity:0;pointer-events:none}.resize-handle:hover{background-color:var(--panel-handle-hover)}.resize-handle:active{background-color:var(--panel-handle-active)}.handle-bar{height:100%;width:100%;display:flex;align-items:center;justify-content:center;position:relative}.collapse-toggle{position:absolute;background:var(--panel-button-bg);border:1px solid var(--panel-button-border);padding:4px 8px;cursor:pointer;color:var(--panel-button-icon);font-size:14px;outline:none;display:flex;align-items:center;justify-content:center;border-radius:4px;z-index:10;transition:all .2s;box-shadow:0 2px 4px #0000001a}.animated-vertical-layout{width:100%;height:100%;position:relative;background-color:var(--panel-background)}.vertical-panel{overflow:auto;width:100%;background-color:var(--panel-background)}.panel-content-wrapper{width:100%;height:100%;overflow:auto}.vertical-resize-handle{height:8px;background-color:var(--panel-handle);display:flex;justify-content:center;align-items:center;cursor:row-resize;position:relative;transition:background-color .2s,opacity .3s,height .3s}.vertical-resize-handle.collapsed{opacity:0;pointer-events:none}.vertical-resize-handle:hover{background-color:var(--panel-handle-hover)}.vertical-resize-handle:active{background-color:var(--panel-handle-active)}.handle-bar{width:100%;height:100%;display:flex;align-items:center;justify-content:center;gap:8px;position:relative}.collapse-toggle{background:var(--panel-button-bg);border:1px solid var(--panel-button-border);padding:4px 8px;cursor:pointer;color:var(--panel-button-icon);font-size:14px;outline:none;display:flex;align-items:center;justify-content:center;border-radius:4px;z-index:10;transition:all .2s;box-shadow:0 2px 4px #0000001a}.collapse-toggle:hover:not(:disabled){background-color:var(--panel-button-hover);box-shadow:0 2px 6px #00000026}.collapse-toggle:active:not(:disabled){opacity:.8}.three-panel-item.collapsible-panel.collapsed{flex:0!important;min-width:0!important}.panel-content-wrapper{flex:1;overflow:auto;will-change:opacity;box-sizing:border-box}.resize-handle.collapsed{width:0!important}.tab-group{display:flex;height:100%;width:100%;overflow:hidden}.tab-group.tab-position-top,.tab-group.tab-position-bottom{flex-direction:column}.tab-group.tab-position-left,.tab-group.tab-position-right{flex-direction:row}.tab-list{display:flex;background:var(--tab-list-bg, #f5f5f5);border-bottom:1px solid var(--tab-border, #ddd);gap:0;padding:0;flex-shrink:0;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;-ms-overflow-style:none}.tab-list::-webkit-scrollbar{display:none}.tab-position-top .tab-list,.tab-position-bottom .tab-list{width:100%}.tab-list.centered{justify-content:flex-start}@media (min-width:0){.tab-list.centered{justify-content:center}.tab-list.centered:has(.tab-button:nth-child(n)){justify-content:flex-start}}.tab-position-bottom .tab-list{border-bottom:none;border-top:none}.tab-position-left .tab-list,.tab-position-right .tab-list{flex-direction:column;border-bottom:none;border-right:none;width:auto;min-width:120px}.tab-position-top .tab-button,.tab-position-bottom .tab-button{flex:1 1 0;min-width:40px;max-width:100%}.tab-button{background:var(--tab-bg, #fff);border:1px solid var(--tab-border, #ddd);border-radius:0;padding:8px 16px;cursor:pointer;font-size:14px;font-weight:500;color:var(--tab-text, #333);transition:all .2s ease;white-space:nowrap;display:flex;align-items:center;justify-content:center;gap:6px;height:39px;line-height:1;box-sizing:border-box;container-type:inline-size}.tab-position-top .tab-button{border-bottom:none;border-top:none;border-left:none}.tab-position-top .tab-button:last-child{border-right:none}.tab-position-bottom .tab-button{border-top:none;border-bottom:none;border-left:none}.tab-position-bottom .tab-button:last-child{border-right:none}.tab-position-left .tab-button{border-right:none;border-bottom:none}.tab-position-left .tab-button:last-child{border-bottom:1px solid var(--tab-border, #ddd)}.tab-position-right .tab-button{border-left:none;border-bottom:none}.tab-position-right .tab-button:last-child{border-bottom:1px solid var(--tab-border, #ddd)}.tab-icon{display:inline-flex;align-items:center;justify-content:center}.tab-label{display:none}@container (min-width: 250px){.tab-label{display:inline}.tab-icon{display:none}}.tab-button:hover{background:var(--tab-bg-hover, #f9f9f9)}.tab-button.active{background:var(--tab-bg-active, #007bff);color:var(--tab-text-active, #fff);border-color:var(--tab-border-active, #007bff)}.tab-button:focus-visible{outline:2px solid var(--tab-focus, #007bff);outline-offset:2px}.tab-content{flex:1;overflow:auto;background:var(--tab-content-bg, #fff)}.tab-group-empty{display:flex;align-items:center;justify-content:center;height:100%;color:var(--tab-empty-text, #999);font-style:italic}.three-panel-layout{height:100%;width:100%;display:flex;flex-direction:column;position:relative;background-color:var(--panel-background);box-sizing:border-box}.three-panel-item{display:flex;flex-direction:column;overflow:hidden;position:relative;background-color:var(--panel-background);box-sizing:border-box}.three-panel-item[data-edit-mode=true]{background-color:var(--panel-accent-bg);border-radius:12px}.three-panel-item.collapsible-panel{will-change:flex}.three-panel-item.collapsible-panel.animating{pointer-events:none}.three-panel-item.collapsible-panel.collapsed{flex:0!important;min-width:0!important;max-width:0!important;width:0!important;overflow:hidden!important;visibility:hidden}.three-panel-item.middle-panel{flex:1;min-width:200px}.panel-content-wrapper{flex:1;overflow-x:hidden;overflow-y:auto;will-change:opacity;box-sizing:border-box}.resize-handle{position:relative;display:flex;align-items:center;justify-content:center;width:1px!important;cursor:col-resize;background:var(--panel-border);overflow:visible!important}.resize-handle:before{content:"";position:absolute;top:0;right:-10px;bottom:0;left:-10px;background:transparent}.resize-handle:after{content:"";position:absolute;top:0;right:-10px;bottom:0;left:-10px;background:var(--panel-handle);opacity:0;transition:opacity .2s ease;z-index:-1}.resize-handle:hover:after{opacity:1}.resize-handle:hover{background:var(--panel-handle-hover)}.resize-handle:active:after{opacity:1;background:var(--panel-handle-active)}.resize-handle:active{background:var(--panel-handle-active)}.resize-handle.collapsed{width:0!important;visibility:hidden}.resize-handle.left-handle.collapsed{margin-right:-1px}.resize-handle.right-handle.collapsed{margin-left:-1px}.handle-bar{position:relative;width:100%;height:100%;display:flex;align-items:center;justify-content:center;z-index:2}.collapse-toggle{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:20px;height:40px;background:var(--panel-button-bg);border:1px solid var(--panel-button-border);border-radius:4px;display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:12px;color:var(--panel-button-icon);transition:all .2s ease;z-index:10;padding:0;line-height:1}.collapse-toggle:hover{background:var(--panel-button-hover)}.collapse-toggle:active{opacity:.8}.collapse-toggle:disabled{opacity:.5;cursor:not-allowed}@media (max-width:768px){.resize-handle:before{left:-8px;right:-8px}.resize-handle:after{left:-8px;right:-8px}.collapse-toggle{width:24px;height:48px;font-size:14px}}.snap-carousel-container{display:flex;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;scroll-behavior:smooth;gap:var(--snap-carousel-gap, 0px);padding:0;margin:0;width:100%;height:100%;background-color:var(--panel-background);box-sizing:border-box;position:relative;left:0;transform:none;container-type:inline-size;-ms-overflow-style:none;scrollbar-width:none}.snap-carousel-container::-webkit-scrollbar{display:none}.snap-carousel-panel{flex:0 0 auto;scroll-snap-align:start;scroll-snap-stop:always;width:var(--snap-carousel-panel-width, 33.33%);height:100%;box-sizing:border-box;overflow:hidden}@media (max-width:540px){.snap-carousel-panel{min-width:280px}}@keyframes wiggle{0%{transform:rotate(0)}25%{transform:rotate(1deg)}50%{transform:rotate(0)}75%{transform:rotate(-1deg)}to{transform:rotate(0)}}@keyframes scaleIn{0%{transform:scale(.95);opacity:0}to{transform:scale(1);opacity:1}}@keyframes pulse{0%,to{box-shadow:0 0 #3b82f666}50%{box-shadow:0 0 0 8px #3b82f600}}.editable-panel-layout{position:relative;width:100%;height:100%}.editable-panel-layout.edit-mode-active{background:#0000000d}[data-slot][data-edit-mode=true]{transform:scale(.95);transform-origin:center center;cursor:grab;will-change:transform;transition:transform .3s cubic-bezier(.4,0,.2,1)}[data-slot][data-edit-mode=true]:active{cursor:grabbing}[data-slot][data-dragging=true]{cursor:grabbing!important;transform:scale(.95)!important;transition:none!important}.edit-mode-active [data-slot][data-edit-mode=true]{transform-origin:center center}.slot-with-overlay{position:relative;width:100%;height:100%}.slot-with-overlay.dragging{opacity:0;pointer-events:none}.slot-edit-overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;border:none;pointer-events:auto;cursor:grab;z-index:100;display:flex;flex-direction:column;align-items:center;justify-content:center}.slot-edit-overlay:hover{background:#3b82f608}.slot-edit-overlay:active{cursor:grabbing}.drag-indicator,.slot-position-label{display:none}.edit-mode-toggle{position:absolute;top:16px;right:16px;z-index:1000;padding:8px 16px;border-radius:8px;border:1px solid #e5e7eb;background:#fff;color:#374151;font-size:14px;font-weight:500;cursor:pointer;transition:all .2s ease;box-shadow:0 2px 4px #0000001a}.edit-mode-toggle:hover{background:#f9fafb;box-shadow:0 4px 6px #0000001a}.edit-mode-toggle.active{background:#3b82f6;color:#fff;border-color:#2563eb}.edit-mode-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#0000004d;z-index:998;animation:fadeIn .2s ease}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.edit-mode-configurator{position:relative;z-index:999;padding:20px;animation:scaleIn .3s ease}.panel-slot{position:relative;min-height:120px;border:2px dashed transparent;border-radius:12px;transition:all .3s ease;padding:12px}.panel-slot.edit-mode{border-color:#d1d5db;background:#ffffff80}.panel-slot.drag-over{border-color:#3b82f6;background:#3b82f61a;box-shadow:0 0 0 4px #3b82f61a}.panel-slot.empty{display:flex;align-items:center;justify-content:center;color:#9ca3af;font-size:14px}.draggable-panel{position:relative;padding:12px 16px;margin:8px 0;border-radius:8px;background:#fff;border:1px solid #e5e7eb;cursor:grab;transition:all .2s ease;-webkit-user-select:none;user-select:none}.draggable-panel:hover{border-color:#3b82f6;box-shadow:0 2px 8px #0000001a}.draggable-panel.dragging{opacity:.5;cursor:grabbing}.draggable-panel.edit-mode{animation:wiggle .4s ease-in-out infinite;transform-origin:center}.draggable-panel.edit-mode:nth-child(odd){animation-delay:.1s}.draggable-panel.edit-mode:nth-child(2n){animation-delay:.2s}.remove-button{position:absolute;top:-6px;right:-6px;width:20px;height:20px;border-radius:50%;background:#ef4444;color:#fff;border:2px solid white;display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:12px;font-weight:700;opacity:0;transform:scale(0);transition:all .2s ease;z-index:10;box-shadow:0 2px 4px #0003}.draggable-panel.edit-mode .remove-button{opacity:1;transform:scale(1);animation:pulse 2s infinite}.remove-button:hover{background:#dc2626;transform:scale(1.1)}.panel-label{display:flex;align-items:center;gap:8px;font-size:14px;font-weight:500;color:#374151}.panel-icon{width:20px;height:20px;display:flex;align-items:center;justify-content:center}.drag-handle{display:none;width:24px;height:24px;opacity:.4;cursor:grab}.edit-mode .drag-handle{display:flex;align-items:center;justify-content:center}.drag-overlay{padding:12px 16px;border-radius:8px;background:#fff;border:2px solid #3b82f6;box-shadow:0 8px 16px #0003;cursor:grabbing;opacity:.9}.panel-group{border:2px solid #e5e7eb;border-radius:12px;padding:8px;background:#fff}.panel-group.edit-mode{animation:wiggle .5s ease-in-out infinite;border-color:#3b82f6}.panel-group-header{display:flex;justify-content:space-between;align-items:center;padding:8px;border-bottom:1px solid #e5e7eb;margin-bottom:8px}.panel-group-title{font-size:12px;font-weight:600;color:#6b7280;text-transform:uppercase}.available-panels{background:#fff;border-radius:12px;padding:16px;box-shadow:0 4px 6px #0000001a}.available-panels-title{font-size:16px;font-weight:600;color:#374151;margin-bottom:12px}.available-panels-list{display:flex;flex-direction:column;gap:8px}.slot-label{font-size:12px;font-weight:600;color:#6b7280;text-transform:uppercase;margin-bottom:8px;display:flex;align-items:center;gap:8px}.slot-indicator{width:8px;height:8px;border-radius:50%;background:#d1d5db}.slot-indicator.active{background:#3b82f6}.action-buttons{position:fixed;bottom:24px;left:50%;transform:translate(-50%);z-index:1001;display:flex;gap:12px;padding:12px 24px;background:#fff;border-radius:12px;box-shadow:0 8px 16px #00000026;animation:scaleIn .3s ease}.action-button{padding:10px 20px;border-radius:8px;border:1px solid #e5e7eb;background:#fff;color:#374151;font-size:14px;font-weight:500;cursor:pointer;transition:all .2s ease}.action-button:hover{background:#f9fafb}.action-button.primary{background:#3b82f6;color:#fff;border-color:#2563eb}.action-button.primary:hover{background:#2563eb}@media (max-width:768px){.edit-mode-toggle{top:8px;right:8px;padding:6px 12px;font-size:12px}.action-buttons{bottom:16px;padding:10px 16px}.action-button{padding:8px 16px;font-size:13px}}@media (prefers-color-scheme:dark){.edit-mode-toggle{background:#1f2937;color:#f9fafb;border-color:#374151}.edit-mode-toggle:hover{background:#374151}.draggable-panel{background:#1f2937;color:#f9fafb;border-color:#374151}.available-panels{background:#1f2937}.panel-label{color:#f9fafb}.action-buttons{background:#1f2937}.action-button{background:#1f2937;color:#f9fafb;border-color:#374151}.action-button:hover{background:#374151}}.panel-configurator{display:flex;flex-direction:column;gap:2rem;padding:1.5rem;background:var(--configurator-bg);border-radius:8px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif}.configurator-section{display:flex;flex-direction:column;gap:1rem}.section-title{margin:0;font-size:.875rem;font-weight:600;color:var(--configurator-title);text-transform:uppercase;letter-spacing:.05em;text-align:center}.slots-container{display:grid;grid-template-columns:repeat(3,1fr);gap:1rem;width:75%;margin:0 auto;align-items:start}.slot{position:relative;aspect-ratio:1 / 1.3;width:100%;padding:2.5rem 1rem 1rem;background:var(--slot-bg);border:2px solid var(--slot-border);border-radius:6px;cursor:pointer;transition:all .2s ease;display:flex;flex-direction:column;gap:.5rem;overflow:hidden;box-sizing:border-box}.slot:hover{border-color:var(--slot-border-hover);box-shadow:0 2px 4px #0000000d}.slot.selected{border-color:var(--slot-border-selected);background:var(--slot-bg-selected);box-shadow:0 0 0 3px var(--slot-bg-selected)}.slot.empty{border-style:dashed}.slot-label{font-size:.75rem;font-weight:600;color:var(--slot-label);text-transform:capitalize;text-align:left}.slot[data-position=middle] .slot-label,.slot[data-position=middle] .slot-panel-name,.slot[data-position=middle] .slot-empty-state{text-align:center}.slot[data-position=right] .slot-label,.slot[data-position=right] .slot-panel-name,.slot[data-position=right] .slot-empty-state{text-align:right}.slot-content{flex:1;display:flex;flex-direction:column;gap:.5rem;overflow-y:auto;min-height:0}.slot-panel-name{font-weight:600;color:var(--slot-content-text);font-size:.875rem}.slot-preview{flex:1;display:flex;align-items:center;justify-content:center;padding:.5rem;background:var(--slot-preview-bg);border-radius:4px;border:1px solid var(--slot-preview-border);font-size:.75rem;color:var(--slot-preview-text)}.slot-empty-state{flex:1;display:flex;align-items:center;justify-content:center;color:var(--slot-empty-text);font-size:.875rem;font-style:italic;min-height:0}.slot-clear-btn{position:absolute;top:.25rem;right:.25rem;width:24px;height:24px;padding:0;background:var(--clear-btn-bg);color:var(--clear-btn-text);border:none;border-radius:4px;cursor:pointer;font-size:1.25rem;line-height:1;display:flex;align-items:center;justify-content:center;opacity:0;transition:opacity .2s ease}.slot:hover .slot-clear-btn{opacity:1}.slot-clear-btn:hover{background:var(--clear-btn-hover);transform:scale(1.1)}.available-panels{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:.75rem;width:75%;margin:0 auto}.available-panel{min-height:80px;padding:.75rem;background:var(--panel-bg);border:2px solid var(--panel-border);border-radius:6px;cursor:pointer;transition:all .2s ease;display:flex;flex-direction:column;gap:.5rem}.available-panel:hover{border-color:var(--panel-border-hover);box-shadow:0 2px 4px #0000000d;transform:translateY(-2px)}.available-panel.selected{border-color:var(--panel-border-selected);background:var(--panel-bg-selected);box-shadow:0 0 0 3px var(--panel-bg-selected)}.available-panel.in-use{opacity:.5;border-style:dashed}.available-panel.in-use:hover{transform:translateY(0);opacity:.6}.panel-label{font-weight:600;color:var(--panel-label-text);font-size:.875rem}.panel-preview{flex:1;display:flex;align-items:center;justify-content:center;padding:.5rem;background:var(--panel-preview-bg);border-radius:4px;font-size:.75rem;color:var(--panel-preview-text)}.selection-hint{padding:.75rem 1rem;background:var(--hint-bg);border:1px solid var(--hint-border);border-radius:6px;color:var(--hint-text);font-size:.875rem;text-align:center}.available-panel.multi-selected{border-color:var(--panel-border-selected);background:var(--panel-bg-selected);box-shadow:0 0 0 2px var(--panel-bg-selected)}.multi-select-badge{margin-left:.5rem;padding:.25rem .5rem;background:var(--panel-border-selected);color:#fff;font-size:.75rem;border-radius:12px;font-weight:400}.multi-select-hint{background:var(--panel-bg-selected);border-color:var(--panel-border-selected)}.slot.tab-group{border-style:solid}.group-content{position:relative;overflow-y:auto;min-height:0}.group-badge{font-size:.75rem;font-weight:600;color:var(--panel-border-selected);margin-bottom:.5rem}.group-panels{display:flex;flex-direction:column;gap:.25rem;flex:1;overflow-y:auto;min-height:0}.group-panel-label{font-size:.75rem;color:var(--slot-content-text);padding:.25rem .5rem;background:var(--slot-preview-bg);border-radius:3px;border-left:3px solid var(--panel-border-selected)}.slot-panel-label{font-weight:600;color:var(--slot-content-text);font-size:.875rem;text-align:center}.create-tab-group-btn{margin-top:.5rem;padding:.5rem .75rem;background:var(--panel-border-selected);color:#fff;border:none;border-radius:4px;font-size:.75rem;font-weight:600;cursor:pointer;transition:all .2s ease}.create-tab-group-btn:hover{transform:scale(1.05);box-shadow:0 2px 4px #0000001a}.tab-mode-toggle{position:absolute;top:.5rem;left:.5rem;padding:.25rem .5rem;background:var(--slot-bg);border:1px solid var(--slot-border);border-radius:4px;font-size:.85rem;cursor:pointer;transition:all .2s ease;z-index:10;opacity:.7;color:var(--slot-content-text)}.tab-mode-toggle svg{display:block}.tab-mode-toggle:hover{opacity:1;border-color:var(--slot-border-hover);background:var(--slot-preview-bg)}.tab-mode-toggle.active{opacity:1;background:var(--panel-border-selected);color:#fff;border-color:var(--panel-border-selected)}.tab-config-controls{margin-bottom:.5rem}.tab-config-label{display:flex;align-items:center;gap:.5rem;font-size:.75rem;color:var(--slot-label)}.tab-config-label select{padding:.25rem .5rem;border:1px solid var(--slot-border);border-radius:3px;background:var(--slot-bg);color:var(--slot-content-text);font-size:.7rem;cursor:pointer}.group-panel-item{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:.25rem .5rem;background:var(--slot-preview-bg);border-radius:3px;border-left:3px solid var(--panel-border-selected)}.group-panel-label{flex:1;font-size:.75rem;color:var(--slot-content-text);display:flex;align-items:center;gap:.25rem}.default-badge{color:var(--panel-border-selected);font-size:.9em}.remove-from-group-btn{width:18px;height:18px;padding:0;background:var(--clear-btn-bg);color:var(--clear-btn-text);border:none;border-radius:3px;cursor:pointer;font-size:1rem;line-height:1;display:flex;align-items:center;justify-content:center;opacity:.7;transition:all .2s ease}.remove-from-group-btn:hover{opacity:1;transform:scale(1.1)}.usage-hint{padding:.75rem 1rem;background:var(--slot-preview-bg);border:1px solid var(--slot-border);border-radius:6px;color:var(--hint-text);font-size:.875rem;text-align:center}'));
|
|
7
7
|
document.head.appendChild(elementStyle);
|
|
8
8
|
}
|
|
9
9
|
} catch (e) {
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
}
|
|
12
12
|
})();
|
|
13
13
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
14
|
-
import
|
|
14
|
+
import * as React2 from "react";
|
|
15
|
+
import React2__default, { createContext, useContext, useState, memo, useCallback, useMemo, forwardRef, useLayoutEffect, useEffect, useRef, createElement, useImperativeHandle } from "react";
|
|
15
16
|
import { createPortal } from "react-dom";
|
|
16
17
|
import { PackageLayerModule } from "@principal-ai/codebase-composition";
|
|
17
18
|
var ThemeContext$1;
|
|
@@ -1561,21 +1562,21 @@ function tanh(x) {
|
|
|
1561
1562
|
}
|
|
1562
1563
|
const interpolateZoom = (function zoomRho(rho, rho2, rho4) {
|
|
1563
1564
|
function zoom2(p0, p1) {
|
|
1564
|
-
var ux0 = p0[0], uy0 = p0[1], w0 = p0[2], ux1 = p1[0], uy1 = p1[1], w1 = p1[2], dx = ux1 - ux0, dy = uy1 - uy0, d2 = dx * dx + dy * dy, i,
|
|
1565
|
+
var ux0 = p0[0], uy0 = p0[1], w0 = p0[2], ux1 = p1[0], uy1 = p1[1], w1 = p1[2], dx = ux1 - ux0, dy = uy1 - uy0, d2 = dx * dx + dy * dy, i, S2;
|
|
1565
1566
|
if (d2 < epsilon2) {
|
|
1566
|
-
|
|
1567
|
+
S2 = Math.log(w1 / w0) / rho;
|
|
1567
1568
|
i = function(t) {
|
|
1568
1569
|
return [
|
|
1569
1570
|
ux0 + t * dx,
|
|
1570
1571
|
uy0 + t * dy,
|
|
1571
|
-
w0 * Math.exp(rho * t *
|
|
1572
|
+
w0 * Math.exp(rho * t * S2)
|
|
1572
1573
|
];
|
|
1573
1574
|
};
|
|
1574
1575
|
} else {
|
|
1575
1576
|
var d1 = Math.sqrt(d2), b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1), b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1), r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0), r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1);
|
|
1576
|
-
|
|
1577
|
+
S2 = (r1 - r0) / rho;
|
|
1577
1578
|
i = function(t) {
|
|
1578
|
-
var s = t *
|
|
1579
|
+
var s = t * S2, coshr0 = cosh(r0), u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0));
|
|
1579
1580
|
return [
|
|
1580
1581
|
ux0 + u * dx,
|
|
1581
1582
|
uy0 + u * dy,
|
|
@@ -1583,7 +1584,7 @@ const interpolateZoom = (function zoomRho(rho, rho2, rho4) {
|
|
|
1583
1584
|
];
|
|
1584
1585
|
};
|
|
1585
1586
|
}
|
|
1586
|
-
i.duration =
|
|
1587
|
+
i.duration = S2 * 1e3 * rho / Math.SQRT2;
|
|
1587
1588
|
return i;
|
|
1588
1589
|
}
|
|
1589
1590
|
zoom2.rho = function(_) {
|
|
@@ -3094,10 +3095,10 @@ function isInputDOMNode(event) {
|
|
|
3094
3095
|
const isInput = inputTags.includes(target == null ? void 0 : target.nodeName) || (target == null ? void 0 : target.hasAttribute("contenteditable"));
|
|
3095
3096
|
return isInput || !!(target == null ? void 0 : target.closest(".nokey"));
|
|
3096
3097
|
}
|
|
3097
|
-
const isMouseEvent = (event) => "clientX" in event;
|
|
3098
|
+
const isMouseEvent$1 = (event) => "clientX" in event;
|
|
3098
3099
|
const getEventPosition = (event, bounds) => {
|
|
3099
3100
|
var _a, _b;
|
|
3100
|
-
const isMouse = isMouseEvent(event);
|
|
3101
|
+
const isMouse = isMouseEvent$1(event);
|
|
3101
3102
|
const evtX = isMouse ? event.clientX : (_a = event.touches) == null ? void 0 : _a[0].clientX;
|
|
3102
3103
|
const evtY = isMouse ? event.clientY : (_b = event.touches) == null ? void 0 : _b[0].clientY;
|
|
3103
3104
|
return {
|
|
@@ -3562,14 +3563,14 @@ function updateChildPosition(node, nodeLookup, parentLookup, options) {
|
|
|
3562
3563
|
parentLookup.set(parentId, /* @__PURE__ */ new Map([[node.id, node]]));
|
|
3563
3564
|
}
|
|
3564
3565
|
const selectedNodeZ = (options == null ? void 0 : options.elevateNodesOnSelect) ? 1e3 : 0;
|
|
3565
|
-
const { x, y, z } = calculateChildXYZ(node, parentNode, _options.nodeOrigin, selectedNodeZ);
|
|
3566
|
+
const { x, y, z: z2 } = calculateChildXYZ(node, parentNode, _options.nodeOrigin, selectedNodeZ);
|
|
3566
3567
|
const currPosition = node.internals.positionAbsolute;
|
|
3567
3568
|
const positionChanged = x !== currPosition.x || y !== currPosition.y;
|
|
3568
|
-
if (positionChanged ||
|
|
3569
|
+
if (positionChanged || z2 !== node.internals.z) {
|
|
3569
3570
|
node.internals = {
|
|
3570
3571
|
...node.internals,
|
|
3571
3572
|
positionAbsolute: positionChanged ? { x, y } : currPosition,
|
|
3572
|
-
z
|
|
3573
|
+
z: z2
|
|
3573
3574
|
};
|
|
3574
3575
|
}
|
|
3575
3576
|
}
|
|
@@ -4988,7 +4989,7 @@ var hasRequiredUseSyncExternalStoreShim_production;
|
|
|
4988
4989
|
function requireUseSyncExternalStoreShim_production() {
|
|
4989
4990
|
if (hasRequiredUseSyncExternalStoreShim_production) return useSyncExternalStoreShim_production;
|
|
4990
4991
|
hasRequiredUseSyncExternalStoreShim_production = 1;
|
|
4991
|
-
var React =
|
|
4992
|
+
var React = React2__default;
|
|
4992
4993
|
function is(x, y) {
|
|
4993
4994
|
return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
|
|
4994
4995
|
}
|
|
@@ -5054,7 +5055,7 @@ var hasRequiredWithSelector_production;
|
|
|
5054
5055
|
function requireWithSelector_production() {
|
|
5055
5056
|
if (hasRequiredWithSelector_production) return withSelector_production;
|
|
5056
5057
|
hasRequiredWithSelector_production = 1;
|
|
5057
|
-
var React =
|
|
5058
|
+
var React = React2__default, shim2 = requireShim();
|
|
5058
5059
|
function is(x, y) {
|
|
5059
5060
|
return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
|
|
5060
5061
|
}
|
|
@@ -5154,7 +5155,7 @@ const createStoreImpl = (createState) => {
|
|
|
5154
5155
|
return api;
|
|
5155
5156
|
};
|
|
5156
5157
|
const createStore$1 = (createState) => createState ? createStoreImpl(createState) : createStoreImpl;
|
|
5157
|
-
const { useDebugValue } =
|
|
5158
|
+
const { useDebugValue } = React2__default;
|
|
5158
5159
|
const { useSyncExternalStoreWithSelector } = useSyncExternalStoreExports;
|
|
5159
5160
|
const identity = (arg) => arg;
|
|
5160
5161
|
function useStoreWithEqualityFn(api, selector2 = identity, equalityFn) {
|
|
@@ -5256,7 +5257,7 @@ function A11yDescriptions({ rfId, disableKeyboardA11y }) {
|
|
|
5256
5257
|
return jsxs(Fragment, { children: [jsxs("div", { id: `${ARIA_NODE_DESC_KEY}-${rfId}`, style, children: ["Press enter or space to select a node.", !disableKeyboardA11y && "You can then use the arrow keys to move the node around.", " Press delete to remove it and escape to cancel.", " "] }), jsx("div", { id: `${ARIA_EDGE_DESC_KEY}-${rfId}`, style, children: "Press enter or space to select an edge. You can then press delete to remove it or escape to cancel." }), !disableKeyboardA11y && jsx(AriaLiveMessage, { rfId })] });
|
|
5257
5258
|
}
|
|
5258
5259
|
const selector$o = (s) => s.userSelectionActive ? "none" : "all";
|
|
5259
|
-
function Panel({ position = "top-left", children: children2, className, style: style2, ...rest }) {
|
|
5260
|
+
function Panel$1({ position = "top-left", children: children2, className, style: style2, ...rest }) {
|
|
5260
5261
|
const pointerEvents = useStore(selector$o);
|
|
5261
5262
|
const positionClasses = `${position}`.split("-");
|
|
5262
5263
|
return jsx("div", { className: cc(["react-flow__panel", className, ...positionClasses]), style: { ...style2, pointerEvents }, ...rest, children: children2 });
|
|
@@ -5265,7 +5266,7 @@ function Attribution({ proOptions, position = "bottom-right" }) {
|
|
|
5265
5266
|
if (proOptions == null ? void 0 : proOptions.hideAttribution) {
|
|
5266
5267
|
return null;
|
|
5267
5268
|
}
|
|
5268
|
-
return jsx(Panel, { position, className: "react-flow__attribution", "data-message": "Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev", children: jsx("a", { href: "https://reactflow.dev", target: "_blank", rel: "noopener noreferrer", "aria-label": "React Flow attribution", children: "React Flow" }) });
|
|
5269
|
+
return jsx(Panel$1, { position, className: "react-flow__attribution", "data-message": "Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev", children: jsx("a", { href: "https://reactflow.dev", target: "_blank", rel: "noopener noreferrer", "aria-label": "React Flow attribution", children: "React Flow" }) });
|
|
5269
5270
|
}
|
|
5270
5271
|
const selector$n = (s) => {
|
|
5271
5272
|
const selectedNodes = [];
|
|
@@ -5283,12 +5284,12 @@ const selector$n = (s) => {
|
|
|
5283
5284
|
return { selectedNodes, selectedEdges };
|
|
5284
5285
|
};
|
|
5285
5286
|
const selectId = (obj) => obj.id;
|
|
5286
|
-
function areEqual(a, b) {
|
|
5287
|
+
function areEqual$1(a, b) {
|
|
5287
5288
|
return shallow$1(a.selectedNodes.map(selectId), b.selectedNodes.map(selectId)) && shallow$1(a.selectedEdges.map(selectId), b.selectedEdges.map(selectId));
|
|
5288
5289
|
}
|
|
5289
5290
|
function SelectionListenerInner({ onSelectionChange }) {
|
|
5290
5291
|
const store = useStoreApi();
|
|
5291
|
-
const { selectedNodes, selectedEdges } = useStore(selector$n, areEqual);
|
|
5292
|
+
const { selectedNodes, selectedEdges } = useStore(selector$n, areEqual$1);
|
|
5292
5293
|
useEffect(() => {
|
|
5293
5294
|
const params = { nodes: selectedNodes, edges: selectedEdges };
|
|
5294
5295
|
onSelectionChange == null ? void 0 : onSelectionChange(params);
|
|
@@ -5757,11 +5758,11 @@ const isEdge = (element) => isEdgeBase(element);
|
|
|
5757
5758
|
function fixedForwardRef(render) {
|
|
5758
5759
|
return forwardRef(render);
|
|
5759
5760
|
}
|
|
5760
|
-
const useIsomorphicLayoutEffect = typeof window !== "undefined" ? useLayoutEffect : useEffect;
|
|
5761
|
+
const useIsomorphicLayoutEffect$1 = typeof window !== "undefined" ? useLayoutEffect : useEffect;
|
|
5761
5762
|
function useQueue(runQueue) {
|
|
5762
5763
|
const [shouldFlush, setShouldFlush] = useState(false);
|
|
5763
5764
|
const [queue] = useState(() => createQueue(() => setShouldFlush(true)));
|
|
5764
|
-
useIsomorphicLayoutEffect(() => {
|
|
5765
|
+
useIsomorphicLayoutEffect$1(() => {
|
|
5765
5766
|
if (!shouldFlush) {
|
|
5766
5767
|
queue.reset();
|
|
5767
5768
|
return;
|
|
@@ -6439,7 +6440,7 @@ function HandleComponent({ type: type2 = "source", position = Position.Top, isVa
|
|
|
6439
6440
|
if (!nodeId) {
|
|
6440
6441
|
return;
|
|
6441
6442
|
}
|
|
6442
|
-
const isMouseTriggered = isMouseEvent(event.nativeEvent);
|
|
6443
|
+
const isMouseTriggered = isMouseEvent$1(event.nativeEvent);
|
|
6443
6444
|
if (isConnectableStart && (isMouseTriggered && event.button === 0 || !isMouseTriggered)) {
|
|
6444
6445
|
const currentStore = store.getState();
|
|
6445
6446
|
XYHandle.onPointerDown(event.nativeEvent, {
|
|
@@ -7876,7 +7877,7 @@ function ControlsComponent({ style: style2, showZoom = true, showFitView = true,
|
|
|
7876
7877
|
onInteractiveChange == null ? void 0 : onInteractiveChange(!isInteractive);
|
|
7877
7878
|
};
|
|
7878
7879
|
const orientationClass = orientation === "horizontal" ? "horizontal" : "vertical";
|
|
7879
|
-
return jsxs(Panel, { className: cc(["react-flow__controls", orientationClass, className]), position, style: style2, "data-testid": "rf__controls", "aria-label": ariaLabel, children: [showZoom && jsxs(Fragment, { children: [jsx(ControlButton, { onClick: onZoomInHandler, className: "react-flow__controls-zoomin", title: "zoom in", "aria-label": "zoom in", disabled: maxZoomReached, children: jsx(PlusIcon, {}) }), jsx(ControlButton, { onClick: onZoomOutHandler, className: "react-flow__controls-zoomout", title: "zoom out", "aria-label": "zoom out", disabled: minZoomReached, children: jsx(MinusIcon, {}) })] }), showFitView && jsx(ControlButton, { className: "react-flow__controls-fitview", onClick: onFitViewHandler, title: "fit view", "aria-label": "fit view", children: jsx(FitViewIcon, {}) }), showInteractive && jsx(ControlButton, { className: "react-flow__controls-interactive", onClick: onToggleInteractivity, title: "toggle interactivity", "aria-label": "toggle interactivity", children: isInteractive ? jsx(UnlockIcon, {}) : jsx(LockIcon, {}) }), children2] });
|
|
7880
|
+
return jsxs(Panel$1, { className: cc(["react-flow__controls", orientationClass, className]), position, style: style2, "data-testid": "rf__controls", "aria-label": ariaLabel, children: [showZoom && jsxs(Fragment, { children: [jsx(ControlButton, { onClick: onZoomInHandler, className: "react-flow__controls-zoomin", title: "zoom in", "aria-label": "zoom in", disabled: maxZoomReached, children: jsx(PlusIcon, {}) }), jsx(ControlButton, { onClick: onZoomOutHandler, className: "react-flow__controls-zoomout", title: "zoom out", "aria-label": "zoom out", disabled: minZoomReached, children: jsx(MinusIcon, {}) })] }), showFitView && jsx(ControlButton, { className: "react-flow__controls-fitview", onClick: onFitViewHandler, title: "fit view", "aria-label": "fit view", children: jsx(FitViewIcon, {}) }), showInteractive && jsx(ControlButton, { className: "react-flow__controls-interactive", onClick: onToggleInteractivity, title: "toggle interactivity", "aria-label": "toggle interactivity", children: isInteractive ? jsx(UnlockIcon, {}) : jsx(LockIcon, {}) }), children2] });
|
|
7880
7881
|
}
|
|
7881
7882
|
ControlsComponent.displayName = "Controls";
|
|
7882
7883
|
const Controls = memo(ControlsComponent);
|
|
@@ -8034,7 +8035,7 @@ function MiniMapComponent({
|
|
|
8034
8035
|
const node = store.getState().nodeLookup.get(nodeId);
|
|
8035
8036
|
onNodeClick(event, node);
|
|
8036
8037
|
}, []) : void 0;
|
|
8037
|
-
return jsx(Panel, { position, style: {
|
|
8038
|
+
return jsx(Panel$1, { position, style: {
|
|
8038
8039
|
...style2,
|
|
8039
8040
|
"--xy-minimap-background-color-props": typeof bgColor === "string" ? bgColor : void 0,
|
|
8040
8041
|
"--xy-minimap-mask-background-color-props": typeof maskColor === "string" ? maskColor : void 0,
|
|
@@ -8333,7 +8334,7 @@ class CanvasConverter {
|
|
|
8333
8334
|
* Convert Extended Canvas to internal NodeState/EdgeState format
|
|
8334
8335
|
*/
|
|
8335
8336
|
static canvasToGraph(canvas) {
|
|
8336
|
-
var _a, _b, _c, _d,
|
|
8337
|
+
var _a, _b, _c, _d, _e2;
|
|
8337
8338
|
const nodes = [];
|
|
8338
8339
|
const edges = [];
|
|
8339
8340
|
const now2 = Date.now();
|
|
@@ -8404,7 +8405,7 @@ class CanvasConverter {
|
|
|
8404
8405
|
if (canvas.edges) {
|
|
8405
8406
|
for (const edge of canvas.edges) {
|
|
8406
8407
|
const pv = edge.pv;
|
|
8407
|
-
const edgeTypeDef = (pv == null ? void 0 : pv.edgeType) ? (
|
|
8408
|
+
const edgeTypeDef = (pv == null ? void 0 : pv.edgeType) ? (_e2 = (_d = canvas.pv) == null ? void 0 : _d.edgeTypes) == null ? void 0 : _e2[pv.edgeType] : void 0;
|
|
8408
8409
|
edges.push({
|
|
8409
8410
|
id: edge.id,
|
|
8410
8411
|
type: (pv == null ? void 0 : pv.edgeType) || "default",
|
|
@@ -8431,7 +8432,7 @@ class CanvasConverter {
|
|
|
8431
8432
|
* Convert React Flow nodes/edges back to Extended Canvas format
|
|
8432
8433
|
*/
|
|
8433
8434
|
static reactFlowToCanvas(nodes, edges, metadata) {
|
|
8434
|
-
var _a, _b, _c, _d,
|
|
8435
|
+
var _a, _b, _c, _d, _e2;
|
|
8435
8436
|
const canvas = {
|
|
8436
8437
|
nodes: [],
|
|
8437
8438
|
edges: [],
|
|
@@ -8488,7 +8489,7 @@ ${description}` : `# ${name}`;
|
|
|
8488
8489
|
if ((_d = edge.style) == null ? void 0 : _d.stroke) {
|
|
8489
8490
|
canvasEdge.color = edge.style.stroke;
|
|
8490
8491
|
}
|
|
8491
|
-
if ((
|
|
8492
|
+
if ((_e2 = edge.data) == null ? void 0 : _e2.edgeType) {
|
|
8492
8493
|
canvasEdge.pv = {
|
|
8493
8494
|
edgeType: edge.data.edgeType,
|
|
8494
8495
|
style: edge.data.style,
|
|
@@ -42989,7 +42990,7 @@ function hexToLightColor(hexColor, lightness = 0.88) {
|
|
|
42989
42990
|
return `#${toHex(newR)}${toHex(newG)}${toHex(newB)}`;
|
|
42990
42991
|
}
|
|
42991
42992
|
const CustomNode = ({ data, selected: selected2, dragging }) => {
|
|
42992
|
-
var _a, _b, _c, _d,
|
|
42993
|
+
var _a, _b, _c, _d, _e2, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
|
|
42993
42994
|
const [isHovered, setIsHovered] = useState(false);
|
|
42994
42995
|
const nodeRef = useRef(null);
|
|
42995
42996
|
const nodeProps = data;
|
|
@@ -43047,7 +43048,7 @@ const CustomNode = ({ data, selected: selected2, dragging }) => {
|
|
|
43047
43048
|
const strokeColor = nodeDataStroke || typeDefinition.stroke || fillColor;
|
|
43048
43049
|
const color2 = fillColor;
|
|
43049
43050
|
const displayName = nodeProps.name;
|
|
43050
|
-
const icon = nodeData.icon || state && (((_d = nodeDataStates == null ? void 0 : nodeDataStates[state]) == null ? void 0 : _d.icon) || ((_f = (
|
|
43051
|
+
const icon = nodeData.icon || state && (((_d = nodeDataStates == null ? void 0 : nodeDataStates[state]) == null ? void 0 : _d.icon) || ((_f = (_e2 = typeDefinition.states) == null ? void 0 : _e2[state]) == null ? void 0 : _f.icon)) || typeDefinition.icon;
|
|
43051
43052
|
const getAnimationClass = () => {
|
|
43052
43053
|
switch (animationType) {
|
|
43053
43054
|
case "pulse":
|
|
@@ -43342,7 +43343,7 @@ const CustomNode = ({ data, selected: selected2, dragging }) => {
|
|
|
43342
43343
|
` })] });
|
|
43343
43344
|
};
|
|
43344
43345
|
const CustomEdge = ({ id: id2, sourceX, sourceY, targetX, targetY, sourcePosition, targetPosition, data, markerEnd, selected: selected2 }) => {
|
|
43345
|
-
var _a, _b, _c, _d,
|
|
43346
|
+
var _a, _b, _c, _d, _e2;
|
|
43346
43347
|
const edgeProps = data;
|
|
43347
43348
|
const { typeDefinition, hasViolations, data: edgeData, edgeType, animationType, animationDuration = 1e3, animationDirection = "forward", tooltipsEnabled = true, shiftKeyPressed = false } = edgeProps || {};
|
|
43348
43349
|
const [particlePosition, setParticlePosition] = useState(0);
|
|
@@ -43439,7 +43440,7 @@ const CustomEdge = ({ id: id2, sourceX, sourceY, targetX, targetY, sourcePositio
|
|
|
43439
43440
|
filter: "blur(3px)"
|
|
43440
43441
|
} }), animationType === "particle" && particlePos && jsx("circle", { cx: particlePos.x, cy: particlePos.y, r: width * 1.5, fill: ((_d = typeDefinition.animation) == null ? void 0 : _d.color) || color2, style: {
|
|
43441
43442
|
filter: "drop-shadow(0 0 3px rgba(0,0,0,0.3))"
|
|
43442
|
-
} }), !animationType && typeDefinition.style === "animated" && jsx("path", { d: edgePath, fill: "none", stroke: ((
|
|
43443
|
+
} }), !animationType && typeDefinition.style === "animated" && jsx("path", { d: edgePath, fill: "none", stroke: ((_e2 = typeDefinition.animation) == null ? void 0 : _e2.color) || color2, strokeWidth: width, strokeDasharray: "5 5", className: "edge-flow-forward", style: {
|
|
43443
43444
|
animationDuration: "500ms"
|
|
43444
43445
|
} }), labelText && jsx(EdgeLabelRenderer, { children: jsx("div", { style: {
|
|
43445
43446
|
position: "absolute",
|
|
@@ -43766,7 +43767,7 @@ const COMMON_ICONS = [
|
|
|
43766
43767
|
"GitPullRequest"
|
|
43767
43768
|
];
|
|
43768
43769
|
const NodeInfoPanel = ({ node, typeDefinition, availableNodeTypes, onClose, onDelete, onUpdate, onSourceClick }) => {
|
|
43769
|
-
var _a, _b, _c, _d,
|
|
43770
|
+
var _a, _b, _c, _d, _e2, _f, _g, _h, _i, _j;
|
|
43770
43771
|
const { theme } = useTheme();
|
|
43771
43772
|
const nodeColor = ((_a = node.data) == null ? void 0 : _a.color) || (typeDefinition == null ? void 0 : typeDefinition.color) || theme.colors.primary;
|
|
43772
43773
|
const canEdit = Boolean(onUpdate);
|
|
@@ -43805,7 +43806,7 @@ const NodeInfoPanel = ({ node, typeDefinition, availableNodeTypes, onClose, onDe
|
|
|
43805
43806
|
];
|
|
43806
43807
|
const otelInfo = (_d = node.data) == null ? void 0 : _d.otel;
|
|
43807
43808
|
const nodeDataEntries = node.data ? Object.entries(node.data).filter(([key]) => !internalFields.includes(key)) : [];
|
|
43808
|
-
const sources = ((
|
|
43809
|
+
const sources = ((_e2 = node.data) == null ? void 0 : _e2.sources) || [];
|
|
43809
43810
|
const handleTypeChange = (newType) => {
|
|
43810
43811
|
if (onUpdate && newType !== node.type) {
|
|
43811
43812
|
onUpdate(node.id, { type: newType });
|
|
@@ -44074,7 +44075,7 @@ const SelectionSidebar = ({ selectedNodeIds, nodes, nodeTypeDefinitions, onClose
|
|
|
44074
44075
|
alignItems: "center",
|
|
44075
44076
|
justifyContent: "center"
|
|
44076
44077
|
}, children: "x" })] }), jsx("div", { style: { display: "flex", flexDirection: "column", gap: "8px" }, children: selectedNodes.map((node) => {
|
|
44077
|
-
var _a, _b, _c, _d,
|
|
44078
|
+
var _a, _b, _c, _d, _e2, _f, _g;
|
|
44078
44079
|
const typeDefinition = nodeTypeDefinitions[node.type];
|
|
44079
44080
|
const nodeColor = ((_a = node.data) == null ? void 0 : _a.color) || (typeDefinition == null ? void 0 : typeDefinition.color) || theme.colors.secondary;
|
|
44080
44081
|
const icon = ((_b = node.data) == null ? void 0 : _b.icon) || (typeDefinition == null ? void 0 : typeDefinition.icon);
|
|
@@ -44147,7 +44148,7 @@ const SelectionSidebar = ({ selectedNodeIds, nodes, nodeTypeDefinitions, onClose
|
|
|
44147
44148
|
}, children: "State" }), jsx("div", { style: {
|
|
44148
44149
|
fontSize: "11px",
|
|
44149
44150
|
padding: "3px 8px",
|
|
44150
|
-
backgroundColor: ((
|
|
44151
|
+
backgroundColor: ((_e2 = (_d = typeDefinition == null ? void 0 : typeDefinition.states) == null ? void 0 : _d[node.state]) == null ? void 0 : _e2.color) || theme.colors.secondary,
|
|
44151
44152
|
color: "white",
|
|
44152
44153
|
borderRadius: "4px",
|
|
44153
44154
|
display: "inline-block"
|
|
@@ -44887,7 +44888,7 @@ const GraphRendererInner = ({ configuration, nodes: propNodes, edges: propEdges,
|
|
|
44887
44888
|
};
|
|
44888
44889
|
function useCanvasToLegacy(canvas, library) {
|
|
44889
44890
|
return useMemo(() => {
|
|
44890
|
-
var _a, _b, _c, _d,
|
|
44891
|
+
var _a, _b, _c, _d, _e2, _f, _g, _h, _i, _j, _k;
|
|
44891
44892
|
if (!canvas)
|
|
44892
44893
|
return null;
|
|
44893
44894
|
const { nodes, edges } = CanvasConverter.canvasToGraph(canvas);
|
|
@@ -44969,7 +44970,7 @@ function useCanvasToLegacy(canvas, library) {
|
|
|
44969
44970
|
}
|
|
44970
44971
|
const allowedConnections = [];
|
|
44971
44972
|
for (const edge of canvas.edges || []) {
|
|
44972
|
-
const edgeType = ((
|
|
44973
|
+
const edgeType = ((_e2 = edge.pv) == null ? void 0 : _e2.edgeType) || "default";
|
|
44973
44974
|
if (!edgeTypes2[edgeType]) {
|
|
44974
44975
|
edgeTypes2[edgeType] = {
|
|
44975
44976
|
style: ((_f = edge.pv) == null ? void 0 : _f.style) || "solid",
|
|
@@ -49074,659 +49075,6 @@ function applyChangesToCanvas(canvas, changes) {
|
|
|
49074
49075
|
}
|
|
49075
49076
|
return updatedCanvas;
|
|
49076
49077
|
}
|
|
49077
|
-
const TRACE_FILE_PATTERNS = [
|
|
49078
|
-
// Packages monorepo pattern: packages/core/__traces__/test-run.canvas.json
|
|
49079
|
-
/^packages\/([^/]+)\/__traces__\/(.+)\.canvas\.json$/,
|
|
49080
|
-
// Inside .principal-views: .principal-views/__traces__/test-run.canvas.json
|
|
49081
|
-
/^\.principal-views\/__traces__\/(.+)\.canvas\.json$/,
|
|
49082
|
-
// Direct __traces__ folder: __traces__/test-run.canvas.json
|
|
49083
|
-
/^__traces__\/(.+)\.canvas\.json$/
|
|
49084
|
-
];
|
|
49085
|
-
function getTraceNameFromFilename(filename) {
|
|
49086
|
-
return filename.replace(/\.canvas\.json$/, "").split("-").map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(" ");
|
|
49087
|
-
}
|
|
49088
|
-
class TraceLoader {
|
|
49089
|
-
/**
|
|
49090
|
-
* Parse JSON canvas content
|
|
49091
|
-
*/
|
|
49092
|
-
static parseTraceCanvas(content) {
|
|
49093
|
-
try {
|
|
49094
|
-
return JSON.parse(content);
|
|
49095
|
-
} catch (error) {
|
|
49096
|
-
throw new Error(`Failed to parse trace canvas JSON: ${error.message}`);
|
|
49097
|
-
}
|
|
49098
|
-
}
|
|
49099
|
-
/**
|
|
49100
|
-
* Extract metadata from a trace canvas
|
|
49101
|
-
*/
|
|
49102
|
-
static getTraceMetadata(canvas) {
|
|
49103
|
-
var _a, _b;
|
|
49104
|
-
const nodes = canvas.nodes || [];
|
|
49105
|
-
const spanCount = nodes.filter((n) => {
|
|
49106
|
-
var _a2;
|
|
49107
|
-
return ((_a2 = n.pv) == null ? void 0 : _a2.nodeType) === "span";
|
|
49108
|
-
}).length;
|
|
49109
|
-
const serviceNodes = nodes.filter(
|
|
49110
|
-
(n) => {
|
|
49111
|
-
var _a2;
|
|
49112
|
-
return ((_a2 = n.pv) == null ? void 0 : _a2.nodeType) === "service" || n.type === "group";
|
|
49113
|
-
}
|
|
49114
|
-
);
|
|
49115
|
-
const serviceCount = serviceNodes.length;
|
|
49116
|
-
const serviceNames = serviceNodes.map((n) => {
|
|
49117
|
-
var _a2;
|
|
49118
|
-
if ((_a2 = n.pv) == null ? void 0 : _a2.name) return n.pv.name;
|
|
49119
|
-
if (n.type === "group" && "label" in n) return n.label;
|
|
49120
|
-
return n.id;
|
|
49121
|
-
}).filter((name) => typeof name === "string");
|
|
49122
|
-
let exportedAt;
|
|
49123
|
-
const description = (_a = canvas.pv) == null ? void 0 : _a.description;
|
|
49124
|
-
if (description) {
|
|
49125
|
-
const match = description.match(/Exported at (.+)$/);
|
|
49126
|
-
if (match) {
|
|
49127
|
-
exportedAt = match[1];
|
|
49128
|
-
}
|
|
49129
|
-
}
|
|
49130
|
-
return {
|
|
49131
|
-
name: ((_b = canvas.pv) == null ? void 0 : _b.name) || "Untitled Trace",
|
|
49132
|
-
exportedAt,
|
|
49133
|
-
spanCount,
|
|
49134
|
-
serviceCount,
|
|
49135
|
-
serviceNames
|
|
49136
|
-
};
|
|
49137
|
-
}
|
|
49138
|
-
/**
|
|
49139
|
-
* Find all trace canvas files in the file tree
|
|
49140
|
-
*/
|
|
49141
|
-
static findTraceFiles(files) {
|
|
49142
|
-
const traceFiles = [];
|
|
49143
|
-
for (const file of files) {
|
|
49144
|
-
const filePath = file.relativePath || file.path || "";
|
|
49145
|
-
const fileName = file.name || filePath.split("/").pop() || "";
|
|
49146
|
-
for (const pattern of TRACE_FILE_PATTERNS) {
|
|
49147
|
-
const match = filePath.match(pattern);
|
|
49148
|
-
if (match) {
|
|
49149
|
-
let id2;
|
|
49150
|
-
let packageName;
|
|
49151
|
-
let baseName;
|
|
49152
|
-
if (pattern === TRACE_FILE_PATTERNS[0]) {
|
|
49153
|
-
packageName = match[1];
|
|
49154
|
-
baseName = match[2];
|
|
49155
|
-
id2 = `${packageName}-${baseName}`;
|
|
49156
|
-
} else if (pattern === TRACE_FILE_PATTERNS[1]) {
|
|
49157
|
-
baseName = match[1];
|
|
49158
|
-
id2 = `pv-${baseName}`;
|
|
49159
|
-
} else {
|
|
49160
|
-
baseName = match[1];
|
|
49161
|
-
id2 = baseName;
|
|
49162
|
-
}
|
|
49163
|
-
traceFiles.push({
|
|
49164
|
-
id: id2,
|
|
49165
|
-
name: getTraceNameFromFilename(fileName),
|
|
49166
|
-
path: filePath,
|
|
49167
|
-
packageName
|
|
49168
|
-
});
|
|
49169
|
-
break;
|
|
49170
|
-
}
|
|
49171
|
-
}
|
|
49172
|
-
}
|
|
49173
|
-
return traceFiles.sort((a, b) => {
|
|
49174
|
-
if (a.packageName && b.packageName) {
|
|
49175
|
-
const pkgCompare = a.packageName.localeCompare(b.packageName);
|
|
49176
|
-
if (pkgCompare !== 0) return pkgCompare;
|
|
49177
|
-
} else if (a.packageName) {
|
|
49178
|
-
return -1;
|
|
49179
|
-
} else if (b.packageName) {
|
|
49180
|
-
return 1;
|
|
49181
|
-
}
|
|
49182
|
-
return a.name.localeCompare(b.name);
|
|
49183
|
-
});
|
|
49184
|
-
}
|
|
49185
|
-
}
|
|
49186
|
-
const TraceStats = ({ metadata, theme }) => {
|
|
49187
|
-
const formattedTime = metadata.exportedAt ? formatExportTime(metadata.exportedAt) : null;
|
|
49188
|
-
return /* @__PURE__ */ jsxs(
|
|
49189
|
-
"div",
|
|
49190
|
-
{
|
|
49191
|
-
style: {
|
|
49192
|
-
display: "flex",
|
|
49193
|
-
alignItems: "center",
|
|
49194
|
-
gap: theme.space[4],
|
|
49195
|
-
padding: `${theme.space[2]}px ${theme.space[3]}px`,
|
|
49196
|
-
fontSize: theme.fontSizes[1],
|
|
49197
|
-
color: theme.colors.textMuted,
|
|
49198
|
-
fontFamily: theme.fonts.body,
|
|
49199
|
-
borderTop: `1px solid ${theme.colors.border}`,
|
|
49200
|
-
backgroundColor: theme.colors.background,
|
|
49201
|
-
flexShrink: 0
|
|
49202
|
-
},
|
|
49203
|
-
children: [
|
|
49204
|
-
/* @__PURE__ */ jsx(
|
|
49205
|
-
StatItem,
|
|
49206
|
-
{
|
|
49207
|
-
label: "Spans",
|
|
49208
|
-
value: metadata.spanCount.toString(),
|
|
49209
|
-
theme
|
|
49210
|
-
}
|
|
49211
|
-
),
|
|
49212
|
-
metadata.serviceCount > 0 && /* @__PURE__ */ jsx(
|
|
49213
|
-
StatItem,
|
|
49214
|
-
{
|
|
49215
|
-
label: metadata.serviceCount === 1 ? "Service" : "Services",
|
|
49216
|
-
value: metadata.serviceCount.toString(),
|
|
49217
|
-
theme
|
|
49218
|
-
}
|
|
49219
|
-
),
|
|
49220
|
-
formattedTime && /* @__PURE__ */ jsx(StatItem, { label: "Exported", value: formattedTime, theme })
|
|
49221
|
-
]
|
|
49222
|
-
}
|
|
49223
|
-
);
|
|
49224
|
-
};
|
|
49225
|
-
const StatItem = ({ label, value, theme }) => {
|
|
49226
|
-
var _a;
|
|
49227
|
-
return /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: theme.space[1] }, children: [
|
|
49228
|
-
/* @__PURE__ */ jsx(
|
|
49229
|
-
"span",
|
|
49230
|
-
{
|
|
49231
|
-
style: {
|
|
49232
|
-
fontWeight: ((_a = theme.fontWeights) == null ? void 0 : _a.medium) || 500,
|
|
49233
|
-
color: theme.colors.text
|
|
49234
|
-
},
|
|
49235
|
-
children: value
|
|
49236
|
-
}
|
|
49237
|
-
),
|
|
49238
|
-
/* @__PURE__ */ jsx("span", { children: label })
|
|
49239
|
-
] });
|
|
49240
|
-
};
|
|
49241
|
-
function formatExportTime(isoString) {
|
|
49242
|
-
try {
|
|
49243
|
-
const date = new Date(isoString);
|
|
49244
|
-
const now2 = /* @__PURE__ */ new Date();
|
|
49245
|
-
const diff = now2.getTime() - date.getTime();
|
|
49246
|
-
if (diff < 24 * 60 * 60 * 1e3) {
|
|
49247
|
-
const hours = Math.floor(diff / (60 * 60 * 1e3));
|
|
49248
|
-
const minutes = Math.floor(diff % (60 * 60 * 1e3) / (60 * 1e3));
|
|
49249
|
-
if (hours > 0) {
|
|
49250
|
-
return `${hours}h ${minutes}m ago`;
|
|
49251
|
-
}
|
|
49252
|
-
if (minutes > 0) {
|
|
49253
|
-
return `${minutes}m ago`;
|
|
49254
|
-
}
|
|
49255
|
-
return "just now";
|
|
49256
|
-
}
|
|
49257
|
-
return date.toLocaleString(void 0, {
|
|
49258
|
-
month: "short",
|
|
49259
|
-
day: "numeric",
|
|
49260
|
-
hour: "2-digit",
|
|
49261
|
-
minute: "2-digit"
|
|
49262
|
-
});
|
|
49263
|
-
} catch {
|
|
49264
|
-
return isoString;
|
|
49265
|
-
}
|
|
49266
|
-
}
|
|
49267
|
-
const TraceViewerPanel = ({
|
|
49268
|
-
context,
|
|
49269
|
-
actions,
|
|
49270
|
-
events
|
|
49271
|
-
}) => {
|
|
49272
|
-
var _a, _b, _c, _d, _e, _f;
|
|
49273
|
-
const { theme } = useTheme$1();
|
|
49274
|
-
const [state, setState] = useState({
|
|
49275
|
-
canvas: null,
|
|
49276
|
-
metadata: null,
|
|
49277
|
-
loading: true,
|
|
49278
|
-
error: null,
|
|
49279
|
-
availableTraces: [],
|
|
49280
|
-
selectedTraceId: null,
|
|
49281
|
-
showTraceSelector: false
|
|
49282
|
-
});
|
|
49283
|
-
const contextRef = useRef(context);
|
|
49284
|
-
const actionsRef = useRef(actions);
|
|
49285
|
-
const eventsRef = useRef(events);
|
|
49286
|
-
contextRef.current = context;
|
|
49287
|
-
actionsRef.current = actions;
|
|
49288
|
-
eventsRef.current = events;
|
|
49289
|
-
const selectedTraceIdRef = useRef(null);
|
|
49290
|
-
selectedTraceIdRef.current = state.selectedTraceId;
|
|
49291
|
-
const loadTrace = useCallback(async (traceId) => {
|
|
49292
|
-
setState((prev) => ({ ...prev, loading: prev.canvas === null, error: null }));
|
|
49293
|
-
try {
|
|
49294
|
-
const ctx = contextRef.current;
|
|
49295
|
-
const acts = actionsRef.current;
|
|
49296
|
-
if (!ctx.hasSlice("fileTree")) {
|
|
49297
|
-
throw new Error("File tree data not available");
|
|
49298
|
-
}
|
|
49299
|
-
if (ctx.isSliceLoading("fileTree")) {
|
|
49300
|
-
return;
|
|
49301
|
-
}
|
|
49302
|
-
const fileTreeSlice = ctx.getSlice("fileTree");
|
|
49303
|
-
const fileTreeData = fileTreeSlice == null ? void 0 : fileTreeSlice.data;
|
|
49304
|
-
if (!(fileTreeData == null ? void 0 : fileTreeData.allFiles)) {
|
|
49305
|
-
setState((prev) => ({
|
|
49306
|
-
...prev,
|
|
49307
|
-
canvas: null,
|
|
49308
|
-
metadata: null,
|
|
49309
|
-
loading: false,
|
|
49310
|
-
error: null,
|
|
49311
|
-
availableTraces: [],
|
|
49312
|
-
selectedTraceId: null
|
|
49313
|
-
}));
|
|
49314
|
-
return;
|
|
49315
|
-
}
|
|
49316
|
-
const availableTraces = TraceLoader.findTraceFiles(fileTreeData.allFiles);
|
|
49317
|
-
if (availableTraces.length === 0) {
|
|
49318
|
-
setState((prev) => ({
|
|
49319
|
-
...prev,
|
|
49320
|
-
canvas: null,
|
|
49321
|
-
metadata: null,
|
|
49322
|
-
loading: false,
|
|
49323
|
-
error: null,
|
|
49324
|
-
availableTraces: [],
|
|
49325
|
-
selectedTraceId: null
|
|
49326
|
-
}));
|
|
49327
|
-
return;
|
|
49328
|
-
}
|
|
49329
|
-
let selectedTrace2;
|
|
49330
|
-
if (traceId) {
|
|
49331
|
-
const found = availableTraces.find((t) => t.id === traceId);
|
|
49332
|
-
if (!found) {
|
|
49333
|
-
throw new Error(`Trace with ID '${traceId}' not found`);
|
|
49334
|
-
}
|
|
49335
|
-
selectedTrace2 = found;
|
|
49336
|
-
} else if (selectedTraceIdRef.current) {
|
|
49337
|
-
const found = availableTraces.find((t) => t.id === selectedTraceIdRef.current);
|
|
49338
|
-
selectedTrace2 = found || availableTraces[0];
|
|
49339
|
-
} else {
|
|
49340
|
-
selectedTrace2 = availableTraces[0];
|
|
49341
|
-
}
|
|
49342
|
-
const readFile = acts.readFile;
|
|
49343
|
-
if (!readFile) {
|
|
49344
|
-
throw new Error("readFile action not available");
|
|
49345
|
-
}
|
|
49346
|
-
const repositoryPath = ctx.repositoryPath;
|
|
49347
|
-
if (!repositoryPath) {
|
|
49348
|
-
throw new Error("Repository path not available");
|
|
49349
|
-
}
|
|
49350
|
-
const fullPath = `${repositoryPath}/${selectedTrace2.path}`;
|
|
49351
|
-
const traceContent = await readFile(fullPath);
|
|
49352
|
-
if (!traceContent || typeof traceContent !== "string") {
|
|
49353
|
-
throw new Error("Failed to read trace file");
|
|
49354
|
-
}
|
|
49355
|
-
const canvas = TraceLoader.parseTraceCanvas(traceContent);
|
|
49356
|
-
const metadata = TraceLoader.getTraceMetadata(canvas);
|
|
49357
|
-
setState((prev) => ({
|
|
49358
|
-
...prev,
|
|
49359
|
-
canvas,
|
|
49360
|
-
metadata,
|
|
49361
|
-
loading: false,
|
|
49362
|
-
error: null,
|
|
49363
|
-
availableTraces,
|
|
49364
|
-
selectedTraceId: selectedTrace2.id
|
|
49365
|
-
}));
|
|
49366
|
-
} catch (error) {
|
|
49367
|
-
console.error("[TraceViewer] Error loading trace:", error);
|
|
49368
|
-
setState((prev) => ({
|
|
49369
|
-
...prev,
|
|
49370
|
-
canvas: null,
|
|
49371
|
-
metadata: null,
|
|
49372
|
-
loading: false,
|
|
49373
|
-
error: error.message
|
|
49374
|
-
}));
|
|
49375
|
-
}
|
|
49376
|
-
}, []);
|
|
49377
|
-
const toggleTraceSelector = useCallback(() => {
|
|
49378
|
-
setState((prev) => ({ ...prev, showTraceSelector: !prev.showTraceSelector }));
|
|
49379
|
-
}, []);
|
|
49380
|
-
const handleTraceSelect = useCallback(
|
|
49381
|
-
(traceId) => {
|
|
49382
|
-
setState((prev) => ({ ...prev, showTraceSelector: false }));
|
|
49383
|
-
loadTrace(traceId);
|
|
49384
|
-
},
|
|
49385
|
-
[loadTrace]
|
|
49386
|
-
);
|
|
49387
|
-
const fileTreeLoading = context.hasSlice("fileTree") && context.isSliceLoading("fileTree");
|
|
49388
|
-
const fileTreeLoadingRef = useRef(fileTreeLoading);
|
|
49389
|
-
useEffect(() => {
|
|
49390
|
-
loadTrace();
|
|
49391
|
-
}, []);
|
|
49392
|
-
useEffect(() => {
|
|
49393
|
-
const wasLoading = fileTreeLoadingRef.current;
|
|
49394
|
-
fileTreeLoadingRef.current = fileTreeLoading;
|
|
49395
|
-
if (wasLoading && !fileTreeLoading) {
|
|
49396
|
-
loadTrace();
|
|
49397
|
-
}
|
|
49398
|
-
}, [fileTreeLoading, loadTrace]);
|
|
49399
|
-
useEffect(() => {
|
|
49400
|
-
const unsubscribe = eventsRef.current.on("data:refresh", () => {
|
|
49401
|
-
loadTrace();
|
|
49402
|
-
});
|
|
49403
|
-
return unsubscribe;
|
|
49404
|
-
}, []);
|
|
49405
|
-
useEffect(() => {
|
|
49406
|
-
const unsubscribe = eventsRef.current.on("trace:load", (event) => {
|
|
49407
|
-
const payload = event.payload;
|
|
49408
|
-
if (payload.traceId) {
|
|
49409
|
-
loadTrace(payload.traceId);
|
|
49410
|
-
} else if (payload.tracePath) {
|
|
49411
|
-
const pathMatch = payload.tracePath.match(
|
|
49412
|
-
/(?:packages\/([^/]+)\/)?__traces__\/(.+)\.canvas\.json$/
|
|
49413
|
-
);
|
|
49414
|
-
if (pathMatch) {
|
|
49415
|
-
const packageName = pathMatch[1];
|
|
49416
|
-
const baseName = pathMatch[2];
|
|
49417
|
-
const traceId = packageName ? `${packageName}-${baseName}` : baseName;
|
|
49418
|
-
loadTrace(traceId);
|
|
49419
|
-
}
|
|
49420
|
-
}
|
|
49421
|
-
});
|
|
49422
|
-
return unsubscribe;
|
|
49423
|
-
}, []);
|
|
49424
|
-
if (state.loading) {
|
|
49425
|
-
return /* @__PURE__ */ jsxs(
|
|
49426
|
-
"div",
|
|
49427
|
-
{
|
|
49428
|
-
style: {
|
|
49429
|
-
display: "flex",
|
|
49430
|
-
alignItems: "center",
|
|
49431
|
-
justifyContent: "center",
|
|
49432
|
-
height: "100%",
|
|
49433
|
-
color: theme.colors.textMuted,
|
|
49434
|
-
fontFamily: theme.fonts.body
|
|
49435
|
-
},
|
|
49436
|
-
children: [
|
|
49437
|
-
/* @__PURE__ */ jsx(Loader, { size: 24, style: { animation: "spin 1s linear infinite" } }),
|
|
49438
|
-
/* @__PURE__ */ jsx("span", { style: { marginLeft: theme.space[2] }, children: "Loading traces..." })
|
|
49439
|
-
]
|
|
49440
|
-
}
|
|
49441
|
-
);
|
|
49442
|
-
}
|
|
49443
|
-
if (state.error) {
|
|
49444
|
-
return /* @__PURE__ */ jsxs(
|
|
49445
|
-
"div",
|
|
49446
|
-
{
|
|
49447
|
-
style: {
|
|
49448
|
-
display: "flex",
|
|
49449
|
-
flexDirection: "column",
|
|
49450
|
-
alignItems: "center",
|
|
49451
|
-
justifyContent: "center",
|
|
49452
|
-
height: "100%",
|
|
49453
|
-
color: theme.colors.textMuted,
|
|
49454
|
-
fontFamily: theme.fonts.body,
|
|
49455
|
-
gap: theme.space[3],
|
|
49456
|
-
padding: theme.space[4]
|
|
49457
|
-
},
|
|
49458
|
-
children: [
|
|
49459
|
-
/* @__PURE__ */ jsxs("div", { style: { color: theme.colors.error || "#ef4444" }, children: [
|
|
49460
|
-
"Error: ",
|
|
49461
|
-
state.error
|
|
49462
|
-
] }),
|
|
49463
|
-
/* @__PURE__ */ jsx(
|
|
49464
|
-
"button",
|
|
49465
|
-
{
|
|
49466
|
-
onClick: () => loadTrace(),
|
|
49467
|
-
style: {
|
|
49468
|
-
padding: `${theme.space[2]}px ${theme.space[3]}px`,
|
|
49469
|
-
backgroundColor: theme.colors.primary,
|
|
49470
|
-
color: "white",
|
|
49471
|
-
border: "none",
|
|
49472
|
-
borderRadius: ((_a = theme.radii) == null ? void 0 : _a[1]) || 4,
|
|
49473
|
-
cursor: "pointer",
|
|
49474
|
-
fontFamily: theme.fonts.body
|
|
49475
|
-
},
|
|
49476
|
-
children: "Retry"
|
|
49477
|
-
}
|
|
49478
|
-
)
|
|
49479
|
-
]
|
|
49480
|
-
}
|
|
49481
|
-
);
|
|
49482
|
-
}
|
|
49483
|
-
if (!state.canvas) {
|
|
49484
|
-
return /* @__PURE__ */ jsxs(
|
|
49485
|
-
"div",
|
|
49486
|
-
{
|
|
49487
|
-
style: {
|
|
49488
|
-
display: "flex",
|
|
49489
|
-
flexDirection: "column",
|
|
49490
|
-
alignItems: "center",
|
|
49491
|
-
justifyContent: "center",
|
|
49492
|
-
height: "100%",
|
|
49493
|
-
color: theme.colors.textMuted,
|
|
49494
|
-
fontFamily: theme.fonts.body,
|
|
49495
|
-
gap: theme.space[3],
|
|
49496
|
-
padding: theme.space[4],
|
|
49497
|
-
textAlign: "center"
|
|
49498
|
-
},
|
|
49499
|
-
children: [
|
|
49500
|
-
/* @__PURE__ */ jsx(Activity, { size: 48, style: { opacity: 0.5 } }),
|
|
49501
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
49502
|
-
/* @__PURE__ */ jsx(
|
|
49503
|
-
"h3",
|
|
49504
|
-
{
|
|
49505
|
-
style: {
|
|
49506
|
-
margin: 0,
|
|
49507
|
-
marginBottom: theme.space[2],
|
|
49508
|
-
color: theme.colors.text,
|
|
49509
|
-
fontSize: theme.fontSizes[3]
|
|
49510
|
-
},
|
|
49511
|
-
children: "No Traces Found"
|
|
49512
|
-
}
|
|
49513
|
-
),
|
|
49514
|
-
/* @__PURE__ */ jsx("p", { style: { margin: 0, maxWidth: 400, lineHeight: 1.5 }, children: "No trace canvas files were found in this repository." }),
|
|
49515
|
-
/* @__PURE__ */ jsxs(
|
|
49516
|
-
"p",
|
|
49517
|
-
{
|
|
49518
|
-
style: {
|
|
49519
|
-
margin: 0,
|
|
49520
|
-
marginTop: theme.space[2],
|
|
49521
|
-
maxWidth: 400,
|
|
49522
|
-
lineHeight: 1.5,
|
|
49523
|
-
fontSize: theme.fontSizes[1]
|
|
49524
|
-
},
|
|
49525
|
-
children: [
|
|
49526
|
-
"Traces should be saved to ",
|
|
49527
|
-
/* @__PURE__ */ jsx("code", { children: "__traces__/*.canvas.json" }),
|
|
49528
|
-
" or",
|
|
49529
|
-
" ",
|
|
49530
|
-
/* @__PURE__ */ jsx("code", { children: "packages/*/__traces__/*.canvas.json" })
|
|
49531
|
-
]
|
|
49532
|
-
}
|
|
49533
|
-
)
|
|
49534
|
-
] })
|
|
49535
|
-
]
|
|
49536
|
-
}
|
|
49537
|
-
);
|
|
49538
|
-
}
|
|
49539
|
-
const selectedTrace = state.availableTraces.find(
|
|
49540
|
-
(t) => t.id === state.selectedTraceId
|
|
49541
|
-
);
|
|
49542
|
-
return /* @__PURE__ */ jsxs(
|
|
49543
|
-
"div",
|
|
49544
|
-
{
|
|
49545
|
-
style: {
|
|
49546
|
-
height: "100%",
|
|
49547
|
-
width: "100%",
|
|
49548
|
-
display: "flex",
|
|
49549
|
-
flexDirection: "column",
|
|
49550
|
-
fontFamily: theme.fonts.body
|
|
49551
|
-
},
|
|
49552
|
-
children: [
|
|
49553
|
-
/* @__PURE__ */ jsxs(
|
|
49554
|
-
"div",
|
|
49555
|
-
{
|
|
49556
|
-
style: {
|
|
49557
|
-
height: 39,
|
|
49558
|
-
borderBottom: `1px solid ${theme.colors.border}`,
|
|
49559
|
-
backgroundColor: theme.colors.background,
|
|
49560
|
-
flexShrink: 0,
|
|
49561
|
-
display: "flex",
|
|
49562
|
-
alignItems: "center",
|
|
49563
|
-
padding: `0 ${theme.space[3]}px`,
|
|
49564
|
-
boxSizing: "content-box"
|
|
49565
|
-
},
|
|
49566
|
-
children: [
|
|
49567
|
-
/* @__PURE__ */ jsx(
|
|
49568
|
-
Activity,
|
|
49569
|
-
{
|
|
49570
|
-
size: 18,
|
|
49571
|
-
style: { color: theme.colors.primary, marginRight: theme.space[2] }
|
|
49572
|
-
}
|
|
49573
|
-
),
|
|
49574
|
-
/* @__PURE__ */ jsx(
|
|
49575
|
-
"h2",
|
|
49576
|
-
{
|
|
49577
|
-
style: {
|
|
49578
|
-
margin: 0,
|
|
49579
|
-
fontSize: theme.fontSizes[3],
|
|
49580
|
-
fontWeight: ((_b = theme.fontWeights) == null ? void 0 : _b.medium) || 500,
|
|
49581
|
-
color: theme.colors.text,
|
|
49582
|
-
overflow: "hidden",
|
|
49583
|
-
textOverflow: "ellipsis",
|
|
49584
|
-
whiteSpace: "nowrap",
|
|
49585
|
-
minWidth: 0,
|
|
49586
|
-
flex: 1
|
|
49587
|
-
},
|
|
49588
|
-
children: ((_c = state.metadata) == null ? void 0 : _c.name) || "Trace Viewer"
|
|
49589
|
-
}
|
|
49590
|
-
),
|
|
49591
|
-
(selectedTrace == null ? void 0 : selectedTrace.packageName) && /* @__PURE__ */ jsx(
|
|
49592
|
-
"span",
|
|
49593
|
-
{
|
|
49594
|
-
style: {
|
|
49595
|
-
marginLeft: theme.space[2],
|
|
49596
|
-
padding: `2px ${theme.space[2]}px`,
|
|
49597
|
-
fontSize: theme.fontSizes[0],
|
|
49598
|
-
color: theme.colors.textMuted,
|
|
49599
|
-
backgroundColor: theme.colors.backgroundSecondary,
|
|
49600
|
-
borderRadius: ((_d = theme.radii) == null ? void 0 : _d[1]) || 4,
|
|
49601
|
-
flexShrink: 0
|
|
49602
|
-
},
|
|
49603
|
-
children: selectedTrace.packageName
|
|
49604
|
-
}
|
|
49605
|
-
),
|
|
49606
|
-
state.availableTraces.length > 1 && /* @__PURE__ */ jsxs("div", { style: { position: "relative" }, children: [
|
|
49607
|
-
/* @__PURE__ */ jsxs(
|
|
49608
|
-
"button",
|
|
49609
|
-
{
|
|
49610
|
-
onClick: toggleTraceSelector,
|
|
49611
|
-
style: {
|
|
49612
|
-
display: "flex",
|
|
49613
|
-
alignItems: "center",
|
|
49614
|
-
gap: theme.space[1],
|
|
49615
|
-
padding: `${theme.space[1]}px ${theme.space[2]}px`,
|
|
49616
|
-
fontSize: theme.fontSizes[1],
|
|
49617
|
-
fontFamily: theme.fonts.body,
|
|
49618
|
-
color: theme.colors.text,
|
|
49619
|
-
backgroundColor: theme.colors.backgroundSecondary,
|
|
49620
|
-
border: `1px solid ${theme.colors.border}`,
|
|
49621
|
-
borderRadius: ((_e = theme.radii) == null ? void 0 : _e[1]) || 4,
|
|
49622
|
-
cursor: "pointer",
|
|
49623
|
-
transition: "all 0.15s"
|
|
49624
|
-
},
|
|
49625
|
-
children: [
|
|
49626
|
-
/* @__PURE__ */ jsxs("span", { children: [
|
|
49627
|
-
state.availableTraces.length,
|
|
49628
|
-
" trace",
|
|
49629
|
-
state.availableTraces.length !== 1 ? "s" : ""
|
|
49630
|
-
] }),
|
|
49631
|
-
/* @__PURE__ */ jsx(
|
|
49632
|
-
ChevronDown,
|
|
49633
|
-
{
|
|
49634
|
-
size: 14,
|
|
49635
|
-
style: {
|
|
49636
|
-
transform: state.showTraceSelector ? "rotate(180deg)" : "rotate(0deg)",
|
|
49637
|
-
transition: "transform 0.15s"
|
|
49638
|
-
}
|
|
49639
|
-
}
|
|
49640
|
-
)
|
|
49641
|
-
]
|
|
49642
|
-
}
|
|
49643
|
-
),
|
|
49644
|
-
state.showTraceSelector && /* @__PURE__ */ jsx(
|
|
49645
|
-
"div",
|
|
49646
|
-
{
|
|
49647
|
-
style: {
|
|
49648
|
-
position: "absolute",
|
|
49649
|
-
top: "100%",
|
|
49650
|
-
right: 0,
|
|
49651
|
-
marginTop: theme.space[1],
|
|
49652
|
-
minWidth: 250,
|
|
49653
|
-
maxHeight: 300,
|
|
49654
|
-
overflow: "auto",
|
|
49655
|
-
backgroundColor: theme.colors.background,
|
|
49656
|
-
border: `1px solid ${theme.colors.border}`,
|
|
49657
|
-
borderRadius: ((_f = theme.radii) == null ? void 0 : _f[2]) || 6,
|
|
49658
|
-
boxShadow: "0 4px 12px rgba(0, 0, 0, 0.15)",
|
|
49659
|
-
zIndex: 100
|
|
49660
|
-
},
|
|
49661
|
-
children: state.availableTraces.map((trace) => {
|
|
49662
|
-
const isSelected = trace.id === state.selectedTraceId;
|
|
49663
|
-
return /* @__PURE__ */ jsxs(
|
|
49664
|
-
"button",
|
|
49665
|
-
{
|
|
49666
|
-
onClick: () => handleTraceSelect(trace.id),
|
|
49667
|
-
style: {
|
|
49668
|
-
display: "flex",
|
|
49669
|
-
flexDirection: "column",
|
|
49670
|
-
alignItems: "flex-start",
|
|
49671
|
-
gap: 2,
|
|
49672
|
-
width: "100%",
|
|
49673
|
-
padding: `${theme.space[2]}px ${theme.space[3]}px`,
|
|
49674
|
-
backgroundColor: isSelected ? `${theme.colors.primary}15` : "transparent",
|
|
49675
|
-
color: isSelected ? theme.colors.primary : theme.colors.text,
|
|
49676
|
-
border: "none",
|
|
49677
|
-
borderBottom: `1px solid ${theme.colors.border}`,
|
|
49678
|
-
cursor: "pointer",
|
|
49679
|
-
textAlign: "left",
|
|
49680
|
-
transition: "all 0.15s",
|
|
49681
|
-
fontFamily: theme.fonts.body
|
|
49682
|
-
},
|
|
49683
|
-
children: [
|
|
49684
|
-
/* @__PURE__ */ jsx(
|
|
49685
|
-
"span",
|
|
49686
|
-
{
|
|
49687
|
-
style: {
|
|
49688
|
-
fontSize: theme.fontSizes[1],
|
|
49689
|
-
fontWeight: isSelected ? 500 : 400
|
|
49690
|
-
},
|
|
49691
|
-
children: trace.name
|
|
49692
|
-
}
|
|
49693
|
-
),
|
|
49694
|
-
trace.packageName && /* @__PURE__ */ jsx(
|
|
49695
|
-
"span",
|
|
49696
|
-
{
|
|
49697
|
-
style: {
|
|
49698
|
-
fontSize: theme.fontSizes[0],
|
|
49699
|
-
color: theme.colors.textMuted
|
|
49700
|
-
},
|
|
49701
|
-
children: trace.packageName
|
|
49702
|
-
}
|
|
49703
|
-
)
|
|
49704
|
-
]
|
|
49705
|
-
},
|
|
49706
|
-
trace.id
|
|
49707
|
-
);
|
|
49708
|
-
})
|
|
49709
|
-
}
|
|
49710
|
-
)
|
|
49711
|
-
] })
|
|
49712
|
-
]
|
|
49713
|
-
}
|
|
49714
|
-
),
|
|
49715
|
-
/* @__PURE__ */ jsx("div", { style: { flex: 1, position: "relative", overflow: "hidden" }, children: /* @__PURE__ */ jsx(
|
|
49716
|
-
GraphRenderer,
|
|
49717
|
-
{
|
|
49718
|
-
canvas: state.canvas,
|
|
49719
|
-
showMinimap: false,
|
|
49720
|
-
showControls: true,
|
|
49721
|
-
showBackground: true,
|
|
49722
|
-
editable: false
|
|
49723
|
-
}
|
|
49724
|
-
) }),
|
|
49725
|
-
state.metadata && /* @__PURE__ */ jsx(TraceStats, { metadata: state.metadata, theme })
|
|
49726
|
-
]
|
|
49727
|
-
}
|
|
49728
|
-
);
|
|
49729
|
-
};
|
|
49730
49078
|
/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */
|
|
49731
49079
|
function isNothing(subject) {
|
|
49732
49080
|
return typeof subject === "undefined" || subject === null;
|
|
@@ -53900,6 +53248,28 @@ const CanvasDetailPanel = ({
|
|
|
53900
53248
|
const handleViewModeChange = useCallback((mode) => {
|
|
53901
53249
|
setState((prev) => ({ ...prev, viewMode: mode }));
|
|
53902
53250
|
}, []);
|
|
53251
|
+
const handleOpenInEditor = useCallback(() => {
|
|
53252
|
+
if (!state.canvas || !state.selectedCanvasId || !canvasPathProp) {
|
|
53253
|
+
console.warn("[CanvasDetailPanel] Cannot open in editor: missing canvas path prop");
|
|
53254
|
+
return;
|
|
53255
|
+
}
|
|
53256
|
+
if (eventsRef.current) {
|
|
53257
|
+
eventsRef.current.emit({
|
|
53258
|
+
type: "custom",
|
|
53259
|
+
source: "canvas-detail-panel",
|
|
53260
|
+
timestamp: Date.now(),
|
|
53261
|
+
payload: {
|
|
53262
|
+
action: "selectCanvas",
|
|
53263
|
+
canvasId: state.selectedCanvasId,
|
|
53264
|
+
canvas: {
|
|
53265
|
+
id: state.selectedCanvasId,
|
|
53266
|
+
path: canvasPathProp,
|
|
53267
|
+
name: state.canvasName || state.selectedCanvasId
|
|
53268
|
+
}
|
|
53269
|
+
}
|
|
53270
|
+
});
|
|
53271
|
+
}
|
|
53272
|
+
}, [state.canvas, state.selectedCanvasId, state.canvasName, canvasPathProp]);
|
|
53903
53273
|
const handleExecutionSelect = useCallback(async (executionId) => {
|
|
53904
53274
|
try {
|
|
53905
53275
|
const ctx = contextRef.current;
|
|
@@ -54364,6 +53734,31 @@ const CanvasDetailPanel = ({
|
|
|
54364
53734
|
children: /* @__PURE__ */ jsx(Grid3x3, { size: 14 })
|
|
54365
53735
|
}
|
|
54366
53736
|
),
|
|
53737
|
+
/* @__PURE__ */ jsxs(
|
|
53738
|
+
"button",
|
|
53739
|
+
{
|
|
53740
|
+
onClick: handleOpenInEditor,
|
|
53741
|
+
disabled: !canvasPathProp,
|
|
53742
|
+
style: {
|
|
53743
|
+
padding: "6px 12px",
|
|
53744
|
+
background: "#2a2a2a",
|
|
53745
|
+
border: "1px solid #3a3a3a",
|
|
53746
|
+
borderRadius: "4px",
|
|
53747
|
+
color: "#fff",
|
|
53748
|
+
cursor: canvasPathProp ? "pointer" : "not-allowed",
|
|
53749
|
+
opacity: canvasPathProp ? 1 : 0.5,
|
|
53750
|
+
display: "flex",
|
|
53751
|
+
alignItems: "center",
|
|
53752
|
+
gap: "6px",
|
|
53753
|
+
fontSize: "13px"
|
|
53754
|
+
},
|
|
53755
|
+
title: canvasPathProp ? "Open in Canvas Editor" : "Canvas path not available",
|
|
53756
|
+
children: [
|
|
53757
|
+
/* @__PURE__ */ jsx(Pencil, { size: 14 }),
|
|
53758
|
+
/* @__PURE__ */ jsx("span", { children: "Edit" })
|
|
53759
|
+
]
|
|
53760
|
+
}
|
|
53761
|
+
),
|
|
54367
53762
|
state.canvas && !state.execution && state.availableNarratives.length === 0 && /* @__PURE__ */ jsx("div", { style: { marginLeft: "auto" }, children: /* @__PURE__ */ jsxs(
|
|
54368
53763
|
"button",
|
|
54369
53764
|
{
|
|
@@ -54555,6 +53950,2068 @@ const CanvasDetailPanel = ({
|
|
|
54555
53950
|
}
|
|
54556
53951
|
);
|
|
54557
53952
|
};
|
|
53953
|
+
const PanelGroupContext = createContext(null);
|
|
53954
|
+
PanelGroupContext.displayName = "PanelGroupContext";
|
|
53955
|
+
const DATA_ATTRIBUTES = {
|
|
53956
|
+
group: "data-panel-group",
|
|
53957
|
+
groupDirection: "data-panel-group-direction",
|
|
53958
|
+
groupId: "data-panel-group-id",
|
|
53959
|
+
panel: "data-panel",
|
|
53960
|
+
panelCollapsible: "data-panel-collapsible",
|
|
53961
|
+
panelId: "data-panel-id",
|
|
53962
|
+
panelSize: "data-panel-size",
|
|
53963
|
+
resizeHandleId: "data-panel-resize-handle-id"
|
|
53964
|
+
};
|
|
53965
|
+
const PRECISION = 10;
|
|
53966
|
+
const useIsomorphicLayoutEffect = useLayoutEffect;
|
|
53967
|
+
const useId = React2["useId".toString()];
|
|
53968
|
+
const wrappedUseId = typeof useId === "function" ? useId : () => null;
|
|
53969
|
+
let counter = 0;
|
|
53970
|
+
function useUniqueId(idFromParams = null) {
|
|
53971
|
+
const idFromUseId = wrappedUseId();
|
|
53972
|
+
const idRef = useRef(idFromParams || idFromUseId || null);
|
|
53973
|
+
if (idRef.current === null) {
|
|
53974
|
+
idRef.current = "" + counter++;
|
|
53975
|
+
}
|
|
53976
|
+
return idFromParams !== null && idFromParams !== void 0 ? idFromParams : idRef.current;
|
|
53977
|
+
}
|
|
53978
|
+
function PanelWithForwardedRef({
|
|
53979
|
+
children: children2,
|
|
53980
|
+
className: classNameFromProps = "",
|
|
53981
|
+
collapsedSize,
|
|
53982
|
+
collapsible,
|
|
53983
|
+
defaultSize: defaultSize2,
|
|
53984
|
+
forwardedRef,
|
|
53985
|
+
id: idFromProps,
|
|
53986
|
+
maxSize,
|
|
53987
|
+
minSize,
|
|
53988
|
+
onCollapse,
|
|
53989
|
+
onExpand,
|
|
53990
|
+
onResize,
|
|
53991
|
+
order,
|
|
53992
|
+
style: styleFromProps,
|
|
53993
|
+
tagName: Type2 = "div",
|
|
53994
|
+
...rest
|
|
53995
|
+
}) {
|
|
53996
|
+
const context = useContext(PanelGroupContext);
|
|
53997
|
+
if (context === null) {
|
|
53998
|
+
throw Error(`Panel components must be rendered within a PanelGroup container`);
|
|
53999
|
+
}
|
|
54000
|
+
const {
|
|
54001
|
+
collapsePanel,
|
|
54002
|
+
expandPanel,
|
|
54003
|
+
getPanelSize,
|
|
54004
|
+
getPanelStyle,
|
|
54005
|
+
groupId,
|
|
54006
|
+
isPanelCollapsed,
|
|
54007
|
+
reevaluatePanelConstraints,
|
|
54008
|
+
registerPanel,
|
|
54009
|
+
resizePanel: resizePanel2,
|
|
54010
|
+
unregisterPanel
|
|
54011
|
+
} = context;
|
|
54012
|
+
const panelId = useUniqueId(idFromProps);
|
|
54013
|
+
const panelDataRef = useRef({
|
|
54014
|
+
callbacks: {
|
|
54015
|
+
onCollapse,
|
|
54016
|
+
onExpand,
|
|
54017
|
+
onResize
|
|
54018
|
+
},
|
|
54019
|
+
constraints: {
|
|
54020
|
+
collapsedSize,
|
|
54021
|
+
collapsible,
|
|
54022
|
+
defaultSize: defaultSize2,
|
|
54023
|
+
maxSize,
|
|
54024
|
+
minSize
|
|
54025
|
+
},
|
|
54026
|
+
id: panelId,
|
|
54027
|
+
idIsFromProps: idFromProps !== void 0,
|
|
54028
|
+
order
|
|
54029
|
+
});
|
|
54030
|
+
useRef({
|
|
54031
|
+
didLogMissingDefaultSizeWarning: false
|
|
54032
|
+
});
|
|
54033
|
+
useIsomorphicLayoutEffect(() => {
|
|
54034
|
+
const {
|
|
54035
|
+
callbacks,
|
|
54036
|
+
constraints
|
|
54037
|
+
} = panelDataRef.current;
|
|
54038
|
+
const prevConstraints = {
|
|
54039
|
+
...constraints
|
|
54040
|
+
};
|
|
54041
|
+
panelDataRef.current.id = panelId;
|
|
54042
|
+
panelDataRef.current.idIsFromProps = idFromProps !== void 0;
|
|
54043
|
+
panelDataRef.current.order = order;
|
|
54044
|
+
callbacks.onCollapse = onCollapse;
|
|
54045
|
+
callbacks.onExpand = onExpand;
|
|
54046
|
+
callbacks.onResize = onResize;
|
|
54047
|
+
constraints.collapsedSize = collapsedSize;
|
|
54048
|
+
constraints.collapsible = collapsible;
|
|
54049
|
+
constraints.defaultSize = defaultSize2;
|
|
54050
|
+
constraints.maxSize = maxSize;
|
|
54051
|
+
constraints.minSize = minSize;
|
|
54052
|
+
if (prevConstraints.collapsedSize !== constraints.collapsedSize || prevConstraints.collapsible !== constraints.collapsible || prevConstraints.maxSize !== constraints.maxSize || prevConstraints.minSize !== constraints.minSize) {
|
|
54053
|
+
reevaluatePanelConstraints(panelDataRef.current, prevConstraints);
|
|
54054
|
+
}
|
|
54055
|
+
});
|
|
54056
|
+
useIsomorphicLayoutEffect(() => {
|
|
54057
|
+
const panelData = panelDataRef.current;
|
|
54058
|
+
registerPanel(panelData);
|
|
54059
|
+
return () => {
|
|
54060
|
+
unregisterPanel(panelData);
|
|
54061
|
+
};
|
|
54062
|
+
}, [order, panelId, registerPanel, unregisterPanel]);
|
|
54063
|
+
useImperativeHandle(forwardedRef, () => ({
|
|
54064
|
+
collapse: () => {
|
|
54065
|
+
collapsePanel(panelDataRef.current);
|
|
54066
|
+
},
|
|
54067
|
+
expand: (minSize2) => {
|
|
54068
|
+
expandPanel(panelDataRef.current, minSize2);
|
|
54069
|
+
},
|
|
54070
|
+
getId() {
|
|
54071
|
+
return panelId;
|
|
54072
|
+
},
|
|
54073
|
+
getSize() {
|
|
54074
|
+
return getPanelSize(panelDataRef.current);
|
|
54075
|
+
},
|
|
54076
|
+
isCollapsed() {
|
|
54077
|
+
return isPanelCollapsed(panelDataRef.current);
|
|
54078
|
+
},
|
|
54079
|
+
isExpanded() {
|
|
54080
|
+
return !isPanelCollapsed(panelDataRef.current);
|
|
54081
|
+
},
|
|
54082
|
+
resize: (size) => {
|
|
54083
|
+
resizePanel2(panelDataRef.current, size);
|
|
54084
|
+
}
|
|
54085
|
+
}), [collapsePanel, expandPanel, getPanelSize, isPanelCollapsed, panelId, resizePanel2]);
|
|
54086
|
+
const style2 = getPanelStyle(panelDataRef.current, defaultSize2);
|
|
54087
|
+
return createElement(Type2, {
|
|
54088
|
+
...rest,
|
|
54089
|
+
children: children2,
|
|
54090
|
+
className: classNameFromProps,
|
|
54091
|
+
id: panelId,
|
|
54092
|
+
style: {
|
|
54093
|
+
...style2,
|
|
54094
|
+
...styleFromProps
|
|
54095
|
+
},
|
|
54096
|
+
// CSS selectors
|
|
54097
|
+
[DATA_ATTRIBUTES.groupId]: groupId,
|
|
54098
|
+
[DATA_ATTRIBUTES.panel]: "",
|
|
54099
|
+
[DATA_ATTRIBUTES.panelCollapsible]: collapsible || void 0,
|
|
54100
|
+
[DATA_ATTRIBUTES.panelId]: panelId,
|
|
54101
|
+
[DATA_ATTRIBUTES.panelSize]: parseFloat("" + style2.flexGrow).toFixed(1)
|
|
54102
|
+
});
|
|
54103
|
+
}
|
|
54104
|
+
const Panel = forwardRef((props, ref) => createElement(PanelWithForwardedRef, {
|
|
54105
|
+
...props,
|
|
54106
|
+
forwardedRef: ref
|
|
54107
|
+
}));
|
|
54108
|
+
PanelWithForwardedRef.displayName = "Panel";
|
|
54109
|
+
Panel.displayName = "forwardRef(Panel)";
|
|
54110
|
+
function isKeyDown(event) {
|
|
54111
|
+
return event.type === "keydown";
|
|
54112
|
+
}
|
|
54113
|
+
function isPointerEvent(event) {
|
|
54114
|
+
return event.type.startsWith("pointer");
|
|
54115
|
+
}
|
|
54116
|
+
function isMouseEvent(event) {
|
|
54117
|
+
return event.type.startsWith("mouse");
|
|
54118
|
+
}
|
|
54119
|
+
function getResizeEventCoordinates(event) {
|
|
54120
|
+
if (isPointerEvent(event)) {
|
|
54121
|
+
if (event.isPrimary) {
|
|
54122
|
+
return {
|
|
54123
|
+
x: event.clientX,
|
|
54124
|
+
y: event.clientY
|
|
54125
|
+
};
|
|
54126
|
+
}
|
|
54127
|
+
} else if (isMouseEvent(event)) {
|
|
54128
|
+
return {
|
|
54129
|
+
x: event.clientX,
|
|
54130
|
+
y: event.clientY
|
|
54131
|
+
};
|
|
54132
|
+
}
|
|
54133
|
+
return {
|
|
54134
|
+
x: Infinity,
|
|
54135
|
+
y: Infinity
|
|
54136
|
+
};
|
|
54137
|
+
}
|
|
54138
|
+
function getInputType() {
|
|
54139
|
+
if (typeof matchMedia === "function") {
|
|
54140
|
+
return matchMedia("(pointer:coarse)").matches ? "coarse" : "fine";
|
|
54141
|
+
}
|
|
54142
|
+
}
|
|
54143
|
+
const EXCEEDED_HORIZONTAL_MIN = 1;
|
|
54144
|
+
const EXCEEDED_HORIZONTAL_MAX = 2;
|
|
54145
|
+
const EXCEEDED_VERTICAL_MIN = 4;
|
|
54146
|
+
const EXCEEDED_VERTICAL_MAX = 8;
|
|
54147
|
+
getInputType() === "coarse";
|
|
54148
|
+
let panelConstraintFlags = /* @__PURE__ */ new Map();
|
|
54149
|
+
function reportConstraintsViolation(resizeHandleId, flag) {
|
|
54150
|
+
panelConstraintFlags.set(resizeHandleId, flag);
|
|
54151
|
+
}
|
|
54152
|
+
function useForceUpdate() {
|
|
54153
|
+
const [_, setCount] = useState(0);
|
|
54154
|
+
return useCallback(() => setCount((prevCount) => prevCount + 1), []);
|
|
54155
|
+
}
|
|
54156
|
+
function assert(expectedCondition, message) {
|
|
54157
|
+
if (!expectedCondition) {
|
|
54158
|
+
console.error(message);
|
|
54159
|
+
throw Error(message);
|
|
54160
|
+
}
|
|
54161
|
+
}
|
|
54162
|
+
function fuzzyCompareNumbers(actual, expected, fractionDigits = PRECISION) {
|
|
54163
|
+
if (actual.toFixed(fractionDigits) === expected.toFixed(fractionDigits)) {
|
|
54164
|
+
return 0;
|
|
54165
|
+
} else {
|
|
54166
|
+
return actual > expected ? 1 : -1;
|
|
54167
|
+
}
|
|
54168
|
+
}
|
|
54169
|
+
function fuzzyNumbersEqual$1(actual, expected, fractionDigits = PRECISION) {
|
|
54170
|
+
return fuzzyCompareNumbers(actual, expected, fractionDigits) === 0;
|
|
54171
|
+
}
|
|
54172
|
+
function fuzzyNumbersEqual(actual, expected, fractionDigits) {
|
|
54173
|
+
return fuzzyCompareNumbers(actual, expected, fractionDigits) === 0;
|
|
54174
|
+
}
|
|
54175
|
+
function fuzzyLayoutsEqual(actual, expected, fractionDigits) {
|
|
54176
|
+
if (actual.length !== expected.length) {
|
|
54177
|
+
return false;
|
|
54178
|
+
}
|
|
54179
|
+
for (let index2 = 0; index2 < actual.length; index2++) {
|
|
54180
|
+
const actualSize = actual[index2];
|
|
54181
|
+
const expectedSize = expected[index2];
|
|
54182
|
+
if (!fuzzyNumbersEqual(actualSize, expectedSize, fractionDigits)) {
|
|
54183
|
+
return false;
|
|
54184
|
+
}
|
|
54185
|
+
}
|
|
54186
|
+
return true;
|
|
54187
|
+
}
|
|
54188
|
+
function resizePanel({
|
|
54189
|
+
panelConstraints: panelConstraintsArray,
|
|
54190
|
+
panelIndex,
|
|
54191
|
+
size
|
|
54192
|
+
}) {
|
|
54193
|
+
const panelConstraints = panelConstraintsArray[panelIndex];
|
|
54194
|
+
assert(panelConstraints != null, `Panel constraints not found for index ${panelIndex}`);
|
|
54195
|
+
let {
|
|
54196
|
+
collapsedSize = 0,
|
|
54197
|
+
collapsible,
|
|
54198
|
+
maxSize = 100,
|
|
54199
|
+
minSize = 0
|
|
54200
|
+
} = panelConstraints;
|
|
54201
|
+
if (fuzzyCompareNumbers(size, minSize) < 0) {
|
|
54202
|
+
if (collapsible) {
|
|
54203
|
+
const halfwayPoint = (collapsedSize + minSize) / 2;
|
|
54204
|
+
if (fuzzyCompareNumbers(size, halfwayPoint) < 0) {
|
|
54205
|
+
size = collapsedSize;
|
|
54206
|
+
} else {
|
|
54207
|
+
size = minSize;
|
|
54208
|
+
}
|
|
54209
|
+
} else {
|
|
54210
|
+
size = minSize;
|
|
54211
|
+
}
|
|
54212
|
+
}
|
|
54213
|
+
size = Math.min(maxSize, size);
|
|
54214
|
+
size = parseFloat(size.toFixed(PRECISION));
|
|
54215
|
+
return size;
|
|
54216
|
+
}
|
|
54217
|
+
function adjustLayoutByDelta({
|
|
54218
|
+
delta,
|
|
54219
|
+
initialLayout,
|
|
54220
|
+
panelConstraints: panelConstraintsArray,
|
|
54221
|
+
pivotIndices,
|
|
54222
|
+
prevLayout,
|
|
54223
|
+
trigger
|
|
54224
|
+
}) {
|
|
54225
|
+
if (fuzzyNumbersEqual(delta, 0)) {
|
|
54226
|
+
return initialLayout;
|
|
54227
|
+
}
|
|
54228
|
+
const nextLayout = [...initialLayout];
|
|
54229
|
+
const [firstPivotIndex, secondPivotIndex] = pivotIndices;
|
|
54230
|
+
assert(firstPivotIndex != null, "Invalid first pivot index");
|
|
54231
|
+
assert(secondPivotIndex != null, "Invalid second pivot index");
|
|
54232
|
+
let deltaApplied = 0;
|
|
54233
|
+
{
|
|
54234
|
+
if (trigger === "keyboard") {
|
|
54235
|
+
{
|
|
54236
|
+
const index2 = delta < 0 ? secondPivotIndex : firstPivotIndex;
|
|
54237
|
+
const panelConstraints = panelConstraintsArray[index2];
|
|
54238
|
+
assert(panelConstraints, `Panel constraints not found for index ${index2}`);
|
|
54239
|
+
const {
|
|
54240
|
+
collapsedSize = 0,
|
|
54241
|
+
collapsible,
|
|
54242
|
+
minSize = 0
|
|
54243
|
+
} = panelConstraints;
|
|
54244
|
+
if (collapsible) {
|
|
54245
|
+
const prevSize = initialLayout[index2];
|
|
54246
|
+
assert(prevSize != null, `Previous layout not found for panel index ${index2}`);
|
|
54247
|
+
if (fuzzyNumbersEqual(prevSize, collapsedSize)) {
|
|
54248
|
+
const localDelta = minSize - prevSize;
|
|
54249
|
+
if (fuzzyCompareNumbers(localDelta, Math.abs(delta)) > 0) {
|
|
54250
|
+
delta = delta < 0 ? 0 - localDelta : localDelta;
|
|
54251
|
+
}
|
|
54252
|
+
}
|
|
54253
|
+
}
|
|
54254
|
+
}
|
|
54255
|
+
{
|
|
54256
|
+
const index2 = delta < 0 ? firstPivotIndex : secondPivotIndex;
|
|
54257
|
+
const panelConstraints = panelConstraintsArray[index2];
|
|
54258
|
+
assert(panelConstraints, `No panel constraints found for index ${index2}`);
|
|
54259
|
+
const {
|
|
54260
|
+
collapsedSize = 0,
|
|
54261
|
+
collapsible,
|
|
54262
|
+
minSize = 0
|
|
54263
|
+
} = panelConstraints;
|
|
54264
|
+
if (collapsible) {
|
|
54265
|
+
const prevSize = initialLayout[index2];
|
|
54266
|
+
assert(prevSize != null, `Previous layout not found for panel index ${index2}`);
|
|
54267
|
+
if (fuzzyNumbersEqual(prevSize, minSize)) {
|
|
54268
|
+
const localDelta = prevSize - collapsedSize;
|
|
54269
|
+
if (fuzzyCompareNumbers(localDelta, Math.abs(delta)) > 0) {
|
|
54270
|
+
delta = delta < 0 ? 0 - localDelta : localDelta;
|
|
54271
|
+
}
|
|
54272
|
+
}
|
|
54273
|
+
}
|
|
54274
|
+
}
|
|
54275
|
+
}
|
|
54276
|
+
}
|
|
54277
|
+
{
|
|
54278
|
+
const increment = delta < 0 ? 1 : -1;
|
|
54279
|
+
let index2 = delta < 0 ? secondPivotIndex : firstPivotIndex;
|
|
54280
|
+
let maxAvailableDelta = 0;
|
|
54281
|
+
while (true) {
|
|
54282
|
+
const prevSize = initialLayout[index2];
|
|
54283
|
+
assert(prevSize != null, `Previous layout not found for panel index ${index2}`);
|
|
54284
|
+
const maxSafeSize = resizePanel({
|
|
54285
|
+
panelConstraints: panelConstraintsArray,
|
|
54286
|
+
panelIndex: index2,
|
|
54287
|
+
size: 100
|
|
54288
|
+
});
|
|
54289
|
+
const delta2 = maxSafeSize - prevSize;
|
|
54290
|
+
maxAvailableDelta += delta2;
|
|
54291
|
+
index2 += increment;
|
|
54292
|
+
if (index2 < 0 || index2 >= panelConstraintsArray.length) {
|
|
54293
|
+
break;
|
|
54294
|
+
}
|
|
54295
|
+
}
|
|
54296
|
+
const minAbsDelta = Math.min(Math.abs(delta), Math.abs(maxAvailableDelta));
|
|
54297
|
+
delta = delta < 0 ? 0 - minAbsDelta : minAbsDelta;
|
|
54298
|
+
}
|
|
54299
|
+
{
|
|
54300
|
+
const pivotIndex = delta < 0 ? firstPivotIndex : secondPivotIndex;
|
|
54301
|
+
let index2 = pivotIndex;
|
|
54302
|
+
while (index2 >= 0 && index2 < panelConstraintsArray.length) {
|
|
54303
|
+
const deltaRemaining = Math.abs(delta) - Math.abs(deltaApplied);
|
|
54304
|
+
const prevSize = initialLayout[index2];
|
|
54305
|
+
assert(prevSize != null, `Previous layout not found for panel index ${index2}`);
|
|
54306
|
+
const unsafeSize = prevSize - deltaRemaining;
|
|
54307
|
+
const safeSize = resizePanel({
|
|
54308
|
+
panelConstraints: panelConstraintsArray,
|
|
54309
|
+
panelIndex: index2,
|
|
54310
|
+
size: unsafeSize
|
|
54311
|
+
});
|
|
54312
|
+
if (!fuzzyNumbersEqual(prevSize, safeSize)) {
|
|
54313
|
+
deltaApplied += prevSize - safeSize;
|
|
54314
|
+
nextLayout[index2] = safeSize;
|
|
54315
|
+
if (deltaApplied.toFixed(3).localeCompare(Math.abs(delta).toFixed(3), void 0, {
|
|
54316
|
+
numeric: true
|
|
54317
|
+
}) >= 0) {
|
|
54318
|
+
break;
|
|
54319
|
+
}
|
|
54320
|
+
}
|
|
54321
|
+
if (delta < 0) {
|
|
54322
|
+
index2--;
|
|
54323
|
+
} else {
|
|
54324
|
+
index2++;
|
|
54325
|
+
}
|
|
54326
|
+
}
|
|
54327
|
+
}
|
|
54328
|
+
if (fuzzyLayoutsEqual(prevLayout, nextLayout)) {
|
|
54329
|
+
return prevLayout;
|
|
54330
|
+
}
|
|
54331
|
+
{
|
|
54332
|
+
const pivotIndex = delta < 0 ? secondPivotIndex : firstPivotIndex;
|
|
54333
|
+
const prevSize = initialLayout[pivotIndex];
|
|
54334
|
+
assert(prevSize != null, `Previous layout not found for panel index ${pivotIndex}`);
|
|
54335
|
+
const unsafeSize = prevSize + deltaApplied;
|
|
54336
|
+
const safeSize = resizePanel({
|
|
54337
|
+
panelConstraints: panelConstraintsArray,
|
|
54338
|
+
panelIndex: pivotIndex,
|
|
54339
|
+
size: unsafeSize
|
|
54340
|
+
});
|
|
54341
|
+
nextLayout[pivotIndex] = safeSize;
|
|
54342
|
+
if (!fuzzyNumbersEqual(safeSize, unsafeSize)) {
|
|
54343
|
+
let deltaRemaining = unsafeSize - safeSize;
|
|
54344
|
+
const pivotIndex2 = delta < 0 ? secondPivotIndex : firstPivotIndex;
|
|
54345
|
+
let index2 = pivotIndex2;
|
|
54346
|
+
while (index2 >= 0 && index2 < panelConstraintsArray.length) {
|
|
54347
|
+
const prevSize2 = nextLayout[index2];
|
|
54348
|
+
assert(prevSize2 != null, `Previous layout not found for panel index ${index2}`);
|
|
54349
|
+
const unsafeSize2 = prevSize2 + deltaRemaining;
|
|
54350
|
+
const safeSize2 = resizePanel({
|
|
54351
|
+
panelConstraints: panelConstraintsArray,
|
|
54352
|
+
panelIndex: index2,
|
|
54353
|
+
size: unsafeSize2
|
|
54354
|
+
});
|
|
54355
|
+
if (!fuzzyNumbersEqual(prevSize2, safeSize2)) {
|
|
54356
|
+
deltaRemaining -= safeSize2 - prevSize2;
|
|
54357
|
+
nextLayout[index2] = safeSize2;
|
|
54358
|
+
}
|
|
54359
|
+
if (fuzzyNumbersEqual(deltaRemaining, 0)) {
|
|
54360
|
+
break;
|
|
54361
|
+
}
|
|
54362
|
+
if (delta > 0) {
|
|
54363
|
+
index2--;
|
|
54364
|
+
} else {
|
|
54365
|
+
index2++;
|
|
54366
|
+
}
|
|
54367
|
+
}
|
|
54368
|
+
}
|
|
54369
|
+
}
|
|
54370
|
+
const totalSize = nextLayout.reduce((total, size) => size + total, 0);
|
|
54371
|
+
if (!fuzzyNumbersEqual(totalSize, 100)) {
|
|
54372
|
+
return prevLayout;
|
|
54373
|
+
}
|
|
54374
|
+
return nextLayout;
|
|
54375
|
+
}
|
|
54376
|
+
function calculateAriaValues({
|
|
54377
|
+
layout,
|
|
54378
|
+
panelsArray,
|
|
54379
|
+
pivotIndices
|
|
54380
|
+
}) {
|
|
54381
|
+
let currentMinSize = 0;
|
|
54382
|
+
let currentMaxSize = 100;
|
|
54383
|
+
let totalMinSize = 0;
|
|
54384
|
+
let totalMaxSize = 0;
|
|
54385
|
+
const firstIndex = pivotIndices[0];
|
|
54386
|
+
assert(firstIndex != null, "No pivot index found");
|
|
54387
|
+
panelsArray.forEach((panelData, index2) => {
|
|
54388
|
+
const {
|
|
54389
|
+
constraints
|
|
54390
|
+
} = panelData;
|
|
54391
|
+
const {
|
|
54392
|
+
maxSize = 100,
|
|
54393
|
+
minSize = 0
|
|
54394
|
+
} = constraints;
|
|
54395
|
+
if (index2 === firstIndex) {
|
|
54396
|
+
currentMinSize = minSize;
|
|
54397
|
+
currentMaxSize = maxSize;
|
|
54398
|
+
} else {
|
|
54399
|
+
totalMinSize += minSize;
|
|
54400
|
+
totalMaxSize += maxSize;
|
|
54401
|
+
}
|
|
54402
|
+
});
|
|
54403
|
+
const valueMax = Math.min(currentMaxSize, 100 - totalMinSize);
|
|
54404
|
+
const valueMin = Math.max(currentMinSize, 100 - totalMaxSize);
|
|
54405
|
+
const valueNow = layout[firstIndex];
|
|
54406
|
+
return {
|
|
54407
|
+
valueMax,
|
|
54408
|
+
valueMin,
|
|
54409
|
+
valueNow
|
|
54410
|
+
};
|
|
54411
|
+
}
|
|
54412
|
+
function getResizeHandleElementsForGroup(groupId, scope = document) {
|
|
54413
|
+
return Array.from(scope.querySelectorAll(`[${DATA_ATTRIBUTES.resizeHandleId}][data-panel-group-id="${groupId}"]`));
|
|
54414
|
+
}
|
|
54415
|
+
function getResizeHandleElementIndex(groupId, id2, scope = document) {
|
|
54416
|
+
const handles = getResizeHandleElementsForGroup(groupId, scope);
|
|
54417
|
+
const index2 = handles.findIndex((handle) => handle.getAttribute(DATA_ATTRIBUTES.resizeHandleId) === id2);
|
|
54418
|
+
return index2 !== null && index2 !== void 0 ? index2 : null;
|
|
54419
|
+
}
|
|
54420
|
+
function determinePivotIndices(groupId, dragHandleId, panelGroupElement) {
|
|
54421
|
+
const index2 = getResizeHandleElementIndex(groupId, dragHandleId, panelGroupElement);
|
|
54422
|
+
return index2 != null ? [index2, index2 + 1] : [-1, -1];
|
|
54423
|
+
}
|
|
54424
|
+
function isHTMLElement(target) {
|
|
54425
|
+
if (target instanceof HTMLElement) {
|
|
54426
|
+
return true;
|
|
54427
|
+
}
|
|
54428
|
+
return typeof target === "object" && target !== null && "tagName" in target && "getAttribute" in target;
|
|
54429
|
+
}
|
|
54430
|
+
function getPanelGroupElement(id2, rootElement = document) {
|
|
54431
|
+
if (isHTMLElement(rootElement) && rootElement.dataset.panelGroupId == id2) {
|
|
54432
|
+
return rootElement;
|
|
54433
|
+
}
|
|
54434
|
+
const element = rootElement.querySelector(`[data-panel-group][data-panel-group-id="${id2}"]`);
|
|
54435
|
+
if (element) {
|
|
54436
|
+
return element;
|
|
54437
|
+
}
|
|
54438
|
+
return null;
|
|
54439
|
+
}
|
|
54440
|
+
function getResizeHandleElement(id2, scope = document) {
|
|
54441
|
+
const element = scope.querySelector(`[${DATA_ATTRIBUTES.resizeHandleId}="${id2}"]`);
|
|
54442
|
+
if (element) {
|
|
54443
|
+
return element;
|
|
54444
|
+
}
|
|
54445
|
+
return null;
|
|
54446
|
+
}
|
|
54447
|
+
function getResizeHandlePanelIds(groupId, handleId, panelsArray, scope = document) {
|
|
54448
|
+
var _panelsArray$index$id, _panelsArray$index, _panelsArray$id, _panelsArray;
|
|
54449
|
+
const handle = getResizeHandleElement(handleId, scope);
|
|
54450
|
+
const handles = getResizeHandleElementsForGroup(groupId, scope);
|
|
54451
|
+
const index2 = handle ? handles.indexOf(handle) : -1;
|
|
54452
|
+
const idBefore = (_panelsArray$index$id = (_panelsArray$index = panelsArray[index2]) === null || _panelsArray$index === void 0 ? void 0 : _panelsArray$index.id) !== null && _panelsArray$index$id !== void 0 ? _panelsArray$index$id : null;
|
|
54453
|
+
const idAfter = (_panelsArray$id = (_panelsArray = panelsArray[index2 + 1]) === null || _panelsArray === void 0 ? void 0 : _panelsArray.id) !== null && _panelsArray$id !== void 0 ? _panelsArray$id : null;
|
|
54454
|
+
return [idBefore, idAfter];
|
|
54455
|
+
}
|
|
54456
|
+
function useWindowSplitterPanelGroupBehavior({
|
|
54457
|
+
committedValuesRef,
|
|
54458
|
+
eagerValuesRef,
|
|
54459
|
+
groupId,
|
|
54460
|
+
layout,
|
|
54461
|
+
panelDataArray,
|
|
54462
|
+
panelGroupElement,
|
|
54463
|
+
setLayout
|
|
54464
|
+
}) {
|
|
54465
|
+
useRef({
|
|
54466
|
+
didWarnAboutMissingResizeHandle: false
|
|
54467
|
+
});
|
|
54468
|
+
useIsomorphicLayoutEffect(() => {
|
|
54469
|
+
if (!panelGroupElement) {
|
|
54470
|
+
return;
|
|
54471
|
+
}
|
|
54472
|
+
const resizeHandleElements = getResizeHandleElementsForGroup(groupId, panelGroupElement);
|
|
54473
|
+
for (let index2 = 0; index2 < panelDataArray.length - 1; index2++) {
|
|
54474
|
+
const {
|
|
54475
|
+
valueMax,
|
|
54476
|
+
valueMin,
|
|
54477
|
+
valueNow
|
|
54478
|
+
} = calculateAriaValues({
|
|
54479
|
+
layout,
|
|
54480
|
+
panelsArray: panelDataArray,
|
|
54481
|
+
pivotIndices: [index2, index2 + 1]
|
|
54482
|
+
});
|
|
54483
|
+
const resizeHandleElement = resizeHandleElements[index2];
|
|
54484
|
+
if (resizeHandleElement == null) ;
|
|
54485
|
+
else {
|
|
54486
|
+
const panelData = panelDataArray[index2];
|
|
54487
|
+
assert(panelData, `No panel data found for index "${index2}"`);
|
|
54488
|
+
resizeHandleElement.setAttribute("aria-controls", panelData.id);
|
|
54489
|
+
resizeHandleElement.setAttribute("aria-valuemax", "" + Math.round(valueMax));
|
|
54490
|
+
resizeHandleElement.setAttribute("aria-valuemin", "" + Math.round(valueMin));
|
|
54491
|
+
resizeHandleElement.setAttribute("aria-valuenow", valueNow != null ? "" + Math.round(valueNow) : "");
|
|
54492
|
+
}
|
|
54493
|
+
}
|
|
54494
|
+
return () => {
|
|
54495
|
+
resizeHandleElements.forEach((resizeHandleElement, index2) => {
|
|
54496
|
+
resizeHandleElement.removeAttribute("aria-controls");
|
|
54497
|
+
resizeHandleElement.removeAttribute("aria-valuemax");
|
|
54498
|
+
resizeHandleElement.removeAttribute("aria-valuemin");
|
|
54499
|
+
resizeHandleElement.removeAttribute("aria-valuenow");
|
|
54500
|
+
});
|
|
54501
|
+
};
|
|
54502
|
+
}, [groupId, layout, panelDataArray, panelGroupElement]);
|
|
54503
|
+
useEffect(() => {
|
|
54504
|
+
if (!panelGroupElement) {
|
|
54505
|
+
return;
|
|
54506
|
+
}
|
|
54507
|
+
const eagerValues = eagerValuesRef.current;
|
|
54508
|
+
assert(eagerValues, `Eager values not found`);
|
|
54509
|
+
const {
|
|
54510
|
+
panelDataArray: panelDataArray2
|
|
54511
|
+
} = eagerValues;
|
|
54512
|
+
const groupElement = getPanelGroupElement(groupId, panelGroupElement);
|
|
54513
|
+
assert(groupElement != null, `No group found for id "${groupId}"`);
|
|
54514
|
+
const handles = getResizeHandleElementsForGroup(groupId, panelGroupElement);
|
|
54515
|
+
assert(handles, `No resize handles found for group id "${groupId}"`);
|
|
54516
|
+
const cleanupFunctions = handles.map((handle) => {
|
|
54517
|
+
const handleId = handle.getAttribute(DATA_ATTRIBUTES.resizeHandleId);
|
|
54518
|
+
assert(handleId, `Resize handle element has no handle id attribute`);
|
|
54519
|
+
const [idBefore, idAfter] = getResizeHandlePanelIds(groupId, handleId, panelDataArray2, panelGroupElement);
|
|
54520
|
+
if (idBefore == null || idAfter == null) {
|
|
54521
|
+
return () => {
|
|
54522
|
+
};
|
|
54523
|
+
}
|
|
54524
|
+
const onKeyDown = (event) => {
|
|
54525
|
+
if (event.defaultPrevented) {
|
|
54526
|
+
return;
|
|
54527
|
+
}
|
|
54528
|
+
switch (event.key) {
|
|
54529
|
+
case "Enter": {
|
|
54530
|
+
event.preventDefault();
|
|
54531
|
+
const index2 = panelDataArray2.findIndex((panelData) => panelData.id === idBefore);
|
|
54532
|
+
if (index2 >= 0) {
|
|
54533
|
+
const panelData = panelDataArray2[index2];
|
|
54534
|
+
assert(panelData, `No panel data found for index ${index2}`);
|
|
54535
|
+
const size = layout[index2];
|
|
54536
|
+
const {
|
|
54537
|
+
collapsedSize = 0,
|
|
54538
|
+
collapsible,
|
|
54539
|
+
minSize = 0
|
|
54540
|
+
} = panelData.constraints;
|
|
54541
|
+
if (size != null && collapsible) {
|
|
54542
|
+
const nextLayout = adjustLayoutByDelta({
|
|
54543
|
+
delta: fuzzyNumbersEqual(size, collapsedSize) ? minSize - collapsedSize : collapsedSize - size,
|
|
54544
|
+
initialLayout: layout,
|
|
54545
|
+
panelConstraints: panelDataArray2.map((panelData2) => panelData2.constraints),
|
|
54546
|
+
pivotIndices: determinePivotIndices(groupId, handleId, panelGroupElement),
|
|
54547
|
+
prevLayout: layout,
|
|
54548
|
+
trigger: "keyboard"
|
|
54549
|
+
});
|
|
54550
|
+
if (layout !== nextLayout) {
|
|
54551
|
+
setLayout(nextLayout);
|
|
54552
|
+
}
|
|
54553
|
+
}
|
|
54554
|
+
}
|
|
54555
|
+
break;
|
|
54556
|
+
}
|
|
54557
|
+
}
|
|
54558
|
+
};
|
|
54559
|
+
handle.addEventListener("keydown", onKeyDown);
|
|
54560
|
+
return () => {
|
|
54561
|
+
handle.removeEventListener("keydown", onKeyDown);
|
|
54562
|
+
};
|
|
54563
|
+
});
|
|
54564
|
+
return () => {
|
|
54565
|
+
cleanupFunctions.forEach((cleanupFunction) => cleanupFunction());
|
|
54566
|
+
};
|
|
54567
|
+
}, [panelGroupElement, committedValuesRef, eagerValuesRef, groupId, layout, panelDataArray, setLayout]);
|
|
54568
|
+
}
|
|
54569
|
+
function areEqual(arrayA, arrayB) {
|
|
54570
|
+
if (arrayA.length !== arrayB.length) {
|
|
54571
|
+
return false;
|
|
54572
|
+
}
|
|
54573
|
+
for (let index2 = 0; index2 < arrayA.length; index2++) {
|
|
54574
|
+
if (arrayA[index2] !== arrayB[index2]) {
|
|
54575
|
+
return false;
|
|
54576
|
+
}
|
|
54577
|
+
}
|
|
54578
|
+
return true;
|
|
54579
|
+
}
|
|
54580
|
+
function getResizeEventCursorPosition(direction, event) {
|
|
54581
|
+
const isHorizontal = direction === "horizontal";
|
|
54582
|
+
const {
|
|
54583
|
+
x,
|
|
54584
|
+
y
|
|
54585
|
+
} = getResizeEventCoordinates(event);
|
|
54586
|
+
return isHorizontal ? x : y;
|
|
54587
|
+
}
|
|
54588
|
+
function calculateDragOffsetPercentage(event, dragHandleId, direction, initialDragState, panelGroupElement) {
|
|
54589
|
+
const isHorizontal = direction === "horizontal";
|
|
54590
|
+
const handleElement = getResizeHandleElement(dragHandleId, panelGroupElement);
|
|
54591
|
+
assert(handleElement, `No resize handle element found for id "${dragHandleId}"`);
|
|
54592
|
+
const groupId = handleElement.getAttribute(DATA_ATTRIBUTES.groupId);
|
|
54593
|
+
assert(groupId, `Resize handle element has no group id attribute`);
|
|
54594
|
+
let {
|
|
54595
|
+
initialCursorPosition
|
|
54596
|
+
} = initialDragState;
|
|
54597
|
+
const cursorPosition = getResizeEventCursorPosition(direction, event);
|
|
54598
|
+
const groupElement = getPanelGroupElement(groupId, panelGroupElement);
|
|
54599
|
+
assert(groupElement, `No group element found for id "${groupId}"`);
|
|
54600
|
+
const groupRect = groupElement.getBoundingClientRect();
|
|
54601
|
+
const groupSizeInPixels = isHorizontal ? groupRect.width : groupRect.height;
|
|
54602
|
+
const offsetPixels = cursorPosition - initialCursorPosition;
|
|
54603
|
+
const offsetPercentage = offsetPixels / groupSizeInPixels * 100;
|
|
54604
|
+
return offsetPercentage;
|
|
54605
|
+
}
|
|
54606
|
+
function calculateDeltaPercentage(event, dragHandleId, direction, initialDragState, keyboardResizeBy, panelGroupElement) {
|
|
54607
|
+
if (isKeyDown(event)) {
|
|
54608
|
+
const isHorizontal = direction === "horizontal";
|
|
54609
|
+
let delta = 0;
|
|
54610
|
+
if (event.shiftKey) {
|
|
54611
|
+
delta = 100;
|
|
54612
|
+
} else if (keyboardResizeBy != null) {
|
|
54613
|
+
delta = keyboardResizeBy;
|
|
54614
|
+
} else {
|
|
54615
|
+
delta = 10;
|
|
54616
|
+
}
|
|
54617
|
+
let movement = 0;
|
|
54618
|
+
switch (event.key) {
|
|
54619
|
+
case "ArrowDown":
|
|
54620
|
+
movement = isHorizontal ? 0 : delta;
|
|
54621
|
+
break;
|
|
54622
|
+
case "ArrowLeft":
|
|
54623
|
+
movement = isHorizontal ? -delta : 0;
|
|
54624
|
+
break;
|
|
54625
|
+
case "ArrowRight":
|
|
54626
|
+
movement = isHorizontal ? delta : 0;
|
|
54627
|
+
break;
|
|
54628
|
+
case "ArrowUp":
|
|
54629
|
+
movement = isHorizontal ? 0 : -delta;
|
|
54630
|
+
break;
|
|
54631
|
+
case "End":
|
|
54632
|
+
movement = 100;
|
|
54633
|
+
break;
|
|
54634
|
+
case "Home":
|
|
54635
|
+
movement = -100;
|
|
54636
|
+
break;
|
|
54637
|
+
}
|
|
54638
|
+
return movement;
|
|
54639
|
+
} else {
|
|
54640
|
+
if (initialDragState == null) {
|
|
54641
|
+
return 0;
|
|
54642
|
+
}
|
|
54643
|
+
return calculateDragOffsetPercentage(event, dragHandleId, direction, initialDragState, panelGroupElement);
|
|
54644
|
+
}
|
|
54645
|
+
}
|
|
54646
|
+
function calculateUnsafeDefaultLayout({
|
|
54647
|
+
panelDataArray
|
|
54648
|
+
}) {
|
|
54649
|
+
const layout = Array(panelDataArray.length);
|
|
54650
|
+
const panelConstraintsArray = panelDataArray.map((panelData) => panelData.constraints);
|
|
54651
|
+
let numPanelsWithSizes = 0;
|
|
54652
|
+
let remainingSize = 100;
|
|
54653
|
+
for (let index2 = 0; index2 < panelDataArray.length; index2++) {
|
|
54654
|
+
const panelConstraints = panelConstraintsArray[index2];
|
|
54655
|
+
assert(panelConstraints, `Panel constraints not found for index ${index2}`);
|
|
54656
|
+
const {
|
|
54657
|
+
defaultSize: defaultSize2
|
|
54658
|
+
} = panelConstraints;
|
|
54659
|
+
if (defaultSize2 != null) {
|
|
54660
|
+
numPanelsWithSizes++;
|
|
54661
|
+
layout[index2] = defaultSize2;
|
|
54662
|
+
remainingSize -= defaultSize2;
|
|
54663
|
+
}
|
|
54664
|
+
}
|
|
54665
|
+
for (let index2 = 0; index2 < panelDataArray.length; index2++) {
|
|
54666
|
+
const panelConstraints = panelConstraintsArray[index2];
|
|
54667
|
+
assert(panelConstraints, `Panel constraints not found for index ${index2}`);
|
|
54668
|
+
const {
|
|
54669
|
+
defaultSize: defaultSize2
|
|
54670
|
+
} = panelConstraints;
|
|
54671
|
+
if (defaultSize2 != null) {
|
|
54672
|
+
continue;
|
|
54673
|
+
}
|
|
54674
|
+
const numRemainingPanels = panelDataArray.length - numPanelsWithSizes;
|
|
54675
|
+
const size = remainingSize / numRemainingPanels;
|
|
54676
|
+
numPanelsWithSizes++;
|
|
54677
|
+
layout[index2] = size;
|
|
54678
|
+
remainingSize -= size;
|
|
54679
|
+
}
|
|
54680
|
+
return layout;
|
|
54681
|
+
}
|
|
54682
|
+
function callPanelCallbacks(panelsArray, layout, panelIdToLastNotifiedSizeMap) {
|
|
54683
|
+
layout.forEach((size, index2) => {
|
|
54684
|
+
const panelData = panelsArray[index2];
|
|
54685
|
+
assert(panelData, `Panel data not found for index ${index2}`);
|
|
54686
|
+
const {
|
|
54687
|
+
callbacks,
|
|
54688
|
+
constraints,
|
|
54689
|
+
id: panelId
|
|
54690
|
+
} = panelData;
|
|
54691
|
+
const {
|
|
54692
|
+
collapsedSize = 0,
|
|
54693
|
+
collapsible
|
|
54694
|
+
} = constraints;
|
|
54695
|
+
const lastNotifiedSize = panelIdToLastNotifiedSizeMap[panelId];
|
|
54696
|
+
if (lastNotifiedSize == null || size !== lastNotifiedSize) {
|
|
54697
|
+
panelIdToLastNotifiedSizeMap[panelId] = size;
|
|
54698
|
+
const {
|
|
54699
|
+
onCollapse,
|
|
54700
|
+
onExpand,
|
|
54701
|
+
onResize
|
|
54702
|
+
} = callbacks;
|
|
54703
|
+
if (onResize) {
|
|
54704
|
+
onResize(size, lastNotifiedSize);
|
|
54705
|
+
}
|
|
54706
|
+
if (collapsible && (onCollapse || onExpand)) {
|
|
54707
|
+
if (onExpand && (lastNotifiedSize == null || fuzzyNumbersEqual$1(lastNotifiedSize, collapsedSize)) && !fuzzyNumbersEqual$1(size, collapsedSize)) {
|
|
54708
|
+
onExpand();
|
|
54709
|
+
}
|
|
54710
|
+
if (onCollapse && (lastNotifiedSize == null || !fuzzyNumbersEqual$1(lastNotifiedSize, collapsedSize)) && fuzzyNumbersEqual$1(size, collapsedSize)) {
|
|
54711
|
+
onCollapse();
|
|
54712
|
+
}
|
|
54713
|
+
}
|
|
54714
|
+
}
|
|
54715
|
+
});
|
|
54716
|
+
}
|
|
54717
|
+
function compareLayouts(a, b) {
|
|
54718
|
+
if (a.length !== b.length) {
|
|
54719
|
+
return false;
|
|
54720
|
+
} else {
|
|
54721
|
+
for (let index2 = 0; index2 < a.length; index2++) {
|
|
54722
|
+
if (a[index2] != b[index2]) {
|
|
54723
|
+
return false;
|
|
54724
|
+
}
|
|
54725
|
+
}
|
|
54726
|
+
}
|
|
54727
|
+
return true;
|
|
54728
|
+
}
|
|
54729
|
+
function computePanelFlexBoxStyle({
|
|
54730
|
+
defaultSize: defaultSize2,
|
|
54731
|
+
dragState,
|
|
54732
|
+
layout,
|
|
54733
|
+
panelData,
|
|
54734
|
+
panelIndex,
|
|
54735
|
+
precision = 3
|
|
54736
|
+
}) {
|
|
54737
|
+
const size = layout[panelIndex];
|
|
54738
|
+
let flexGrow;
|
|
54739
|
+
if (size == null) {
|
|
54740
|
+
flexGrow = defaultSize2 != void 0 ? defaultSize2.toFixed(precision) : "1";
|
|
54741
|
+
} else if (panelData.length === 1) {
|
|
54742
|
+
flexGrow = "1";
|
|
54743
|
+
} else {
|
|
54744
|
+
flexGrow = size.toFixed(precision);
|
|
54745
|
+
}
|
|
54746
|
+
return {
|
|
54747
|
+
flexBasis: 0,
|
|
54748
|
+
flexGrow,
|
|
54749
|
+
flexShrink: 1,
|
|
54750
|
+
// Without this, Panel sizes may be unintentionally overridden by their content
|
|
54751
|
+
overflow: "hidden",
|
|
54752
|
+
// Disable pointer events inside of a panel during resize
|
|
54753
|
+
// This avoid edge cases like nested iframes
|
|
54754
|
+
pointerEvents: dragState !== null ? "none" : void 0
|
|
54755
|
+
};
|
|
54756
|
+
}
|
|
54757
|
+
function debounce(callback, durationMs = 10) {
|
|
54758
|
+
let timeoutId = null;
|
|
54759
|
+
let callable = (...args) => {
|
|
54760
|
+
if (timeoutId !== null) {
|
|
54761
|
+
clearTimeout(timeoutId);
|
|
54762
|
+
}
|
|
54763
|
+
timeoutId = setTimeout(() => {
|
|
54764
|
+
callback(...args);
|
|
54765
|
+
}, durationMs);
|
|
54766
|
+
};
|
|
54767
|
+
return callable;
|
|
54768
|
+
}
|
|
54769
|
+
function initializeDefaultStorage(storageObject) {
|
|
54770
|
+
try {
|
|
54771
|
+
if (typeof localStorage !== "undefined") {
|
|
54772
|
+
storageObject.getItem = (name) => {
|
|
54773
|
+
return localStorage.getItem(name);
|
|
54774
|
+
};
|
|
54775
|
+
storageObject.setItem = (name, value) => {
|
|
54776
|
+
localStorage.setItem(name, value);
|
|
54777
|
+
};
|
|
54778
|
+
} else {
|
|
54779
|
+
throw new Error("localStorage not supported in this environment");
|
|
54780
|
+
}
|
|
54781
|
+
} catch (error) {
|
|
54782
|
+
console.error(error);
|
|
54783
|
+
storageObject.getItem = () => null;
|
|
54784
|
+
storageObject.setItem = () => {
|
|
54785
|
+
};
|
|
54786
|
+
}
|
|
54787
|
+
}
|
|
54788
|
+
function getPanelGroupKey(autoSaveId) {
|
|
54789
|
+
return `react-resizable-panels:${autoSaveId}`;
|
|
54790
|
+
}
|
|
54791
|
+
function getPanelKey(panels2) {
|
|
54792
|
+
return panels2.map((panel) => {
|
|
54793
|
+
const {
|
|
54794
|
+
constraints,
|
|
54795
|
+
id: id2,
|
|
54796
|
+
idIsFromProps,
|
|
54797
|
+
order
|
|
54798
|
+
} = panel;
|
|
54799
|
+
if (idIsFromProps) {
|
|
54800
|
+
return id2;
|
|
54801
|
+
} else {
|
|
54802
|
+
return order ? `${order}:${JSON.stringify(constraints)}` : JSON.stringify(constraints);
|
|
54803
|
+
}
|
|
54804
|
+
}).sort((a, b) => a.localeCompare(b)).join(",");
|
|
54805
|
+
}
|
|
54806
|
+
function loadSerializedPanelGroupState(autoSaveId, storage) {
|
|
54807
|
+
try {
|
|
54808
|
+
const panelGroupKey = getPanelGroupKey(autoSaveId);
|
|
54809
|
+
const serialized = storage.getItem(panelGroupKey);
|
|
54810
|
+
if (serialized) {
|
|
54811
|
+
const parsed = JSON.parse(serialized);
|
|
54812
|
+
if (typeof parsed === "object" && parsed != null) {
|
|
54813
|
+
return parsed;
|
|
54814
|
+
}
|
|
54815
|
+
}
|
|
54816
|
+
} catch (error) {
|
|
54817
|
+
}
|
|
54818
|
+
return null;
|
|
54819
|
+
}
|
|
54820
|
+
function loadPanelGroupState(autoSaveId, panels2, storage) {
|
|
54821
|
+
var _loadSerializedPanelG, _state$panelKey;
|
|
54822
|
+
const state = (_loadSerializedPanelG = loadSerializedPanelGroupState(autoSaveId, storage)) !== null && _loadSerializedPanelG !== void 0 ? _loadSerializedPanelG : {};
|
|
54823
|
+
const panelKey = getPanelKey(panels2);
|
|
54824
|
+
return (_state$panelKey = state[panelKey]) !== null && _state$panelKey !== void 0 ? _state$panelKey : null;
|
|
54825
|
+
}
|
|
54826
|
+
function savePanelGroupState(autoSaveId, panels2, panelSizesBeforeCollapse, sizes, storage) {
|
|
54827
|
+
var _loadSerializedPanelG2;
|
|
54828
|
+
const panelGroupKey = getPanelGroupKey(autoSaveId);
|
|
54829
|
+
const panelKey = getPanelKey(panels2);
|
|
54830
|
+
const state = (_loadSerializedPanelG2 = loadSerializedPanelGroupState(autoSaveId, storage)) !== null && _loadSerializedPanelG2 !== void 0 ? _loadSerializedPanelG2 : {};
|
|
54831
|
+
state[panelKey] = {
|
|
54832
|
+
expandToSizes: Object.fromEntries(panelSizesBeforeCollapse.entries()),
|
|
54833
|
+
layout: sizes
|
|
54834
|
+
};
|
|
54835
|
+
try {
|
|
54836
|
+
storage.setItem(panelGroupKey, JSON.stringify(state));
|
|
54837
|
+
} catch (error) {
|
|
54838
|
+
console.error(error);
|
|
54839
|
+
}
|
|
54840
|
+
}
|
|
54841
|
+
function validatePanelGroupLayout({
|
|
54842
|
+
layout: prevLayout,
|
|
54843
|
+
panelConstraints
|
|
54844
|
+
}) {
|
|
54845
|
+
const nextLayout = [...prevLayout];
|
|
54846
|
+
const nextLayoutTotalSize = nextLayout.reduce((accumulated, current) => accumulated + current, 0);
|
|
54847
|
+
if (nextLayout.length !== panelConstraints.length) {
|
|
54848
|
+
throw Error(`Invalid ${panelConstraints.length} panel layout: ${nextLayout.map((size) => `${size}%`).join(", ")}`);
|
|
54849
|
+
} else if (!fuzzyNumbersEqual(nextLayoutTotalSize, 100) && nextLayout.length > 0) {
|
|
54850
|
+
for (let index2 = 0; index2 < panelConstraints.length; index2++) {
|
|
54851
|
+
const unsafeSize = nextLayout[index2];
|
|
54852
|
+
assert(unsafeSize != null, `No layout data found for index ${index2}`);
|
|
54853
|
+
const safeSize = 100 / nextLayoutTotalSize * unsafeSize;
|
|
54854
|
+
nextLayout[index2] = safeSize;
|
|
54855
|
+
}
|
|
54856
|
+
}
|
|
54857
|
+
let remainingSize = 0;
|
|
54858
|
+
for (let index2 = 0; index2 < panelConstraints.length; index2++) {
|
|
54859
|
+
const unsafeSize = nextLayout[index2];
|
|
54860
|
+
assert(unsafeSize != null, `No layout data found for index ${index2}`);
|
|
54861
|
+
const safeSize = resizePanel({
|
|
54862
|
+
panelConstraints,
|
|
54863
|
+
panelIndex: index2,
|
|
54864
|
+
size: unsafeSize
|
|
54865
|
+
});
|
|
54866
|
+
if (unsafeSize != safeSize) {
|
|
54867
|
+
remainingSize += unsafeSize - safeSize;
|
|
54868
|
+
nextLayout[index2] = safeSize;
|
|
54869
|
+
}
|
|
54870
|
+
}
|
|
54871
|
+
if (!fuzzyNumbersEqual(remainingSize, 0)) {
|
|
54872
|
+
for (let index2 = 0; index2 < panelConstraints.length; index2++) {
|
|
54873
|
+
const prevSize = nextLayout[index2];
|
|
54874
|
+
assert(prevSize != null, `No layout data found for index ${index2}`);
|
|
54875
|
+
const unsafeSize = prevSize + remainingSize;
|
|
54876
|
+
const safeSize = resizePanel({
|
|
54877
|
+
panelConstraints,
|
|
54878
|
+
panelIndex: index2,
|
|
54879
|
+
size: unsafeSize
|
|
54880
|
+
});
|
|
54881
|
+
if (prevSize !== safeSize) {
|
|
54882
|
+
remainingSize -= safeSize - prevSize;
|
|
54883
|
+
nextLayout[index2] = safeSize;
|
|
54884
|
+
if (fuzzyNumbersEqual(remainingSize, 0)) {
|
|
54885
|
+
break;
|
|
54886
|
+
}
|
|
54887
|
+
}
|
|
54888
|
+
}
|
|
54889
|
+
}
|
|
54890
|
+
return nextLayout;
|
|
54891
|
+
}
|
|
54892
|
+
const LOCAL_STORAGE_DEBOUNCE_INTERVAL = 100;
|
|
54893
|
+
const defaultStorage = {
|
|
54894
|
+
getItem: (name) => {
|
|
54895
|
+
initializeDefaultStorage(defaultStorage);
|
|
54896
|
+
return defaultStorage.getItem(name);
|
|
54897
|
+
},
|
|
54898
|
+
setItem: (name, value) => {
|
|
54899
|
+
initializeDefaultStorage(defaultStorage);
|
|
54900
|
+
defaultStorage.setItem(name, value);
|
|
54901
|
+
}
|
|
54902
|
+
};
|
|
54903
|
+
const debounceMap = {};
|
|
54904
|
+
function PanelGroupWithForwardedRef({
|
|
54905
|
+
autoSaveId = null,
|
|
54906
|
+
children: children2,
|
|
54907
|
+
className: classNameFromProps = "",
|
|
54908
|
+
direction,
|
|
54909
|
+
forwardedRef,
|
|
54910
|
+
id: idFromProps = null,
|
|
54911
|
+
onLayout = null,
|
|
54912
|
+
keyboardResizeBy = null,
|
|
54913
|
+
storage = defaultStorage,
|
|
54914
|
+
style: styleFromProps,
|
|
54915
|
+
tagName: Type2 = "div",
|
|
54916
|
+
...rest
|
|
54917
|
+
}) {
|
|
54918
|
+
const groupId = useUniqueId(idFromProps);
|
|
54919
|
+
const panelGroupElementRef = useRef(null);
|
|
54920
|
+
const [dragState, setDragState] = useState(null);
|
|
54921
|
+
const [layout, setLayout] = useState([]);
|
|
54922
|
+
const forceUpdate = useForceUpdate();
|
|
54923
|
+
const panelIdToLastNotifiedSizeMapRef = useRef({});
|
|
54924
|
+
const panelSizeBeforeCollapseRef = useRef(/* @__PURE__ */ new Map());
|
|
54925
|
+
const prevDeltaRef = useRef(0);
|
|
54926
|
+
const committedValuesRef = useRef({
|
|
54927
|
+
autoSaveId,
|
|
54928
|
+
direction,
|
|
54929
|
+
dragState,
|
|
54930
|
+
id: groupId,
|
|
54931
|
+
keyboardResizeBy,
|
|
54932
|
+
onLayout,
|
|
54933
|
+
storage
|
|
54934
|
+
});
|
|
54935
|
+
const eagerValuesRef = useRef({
|
|
54936
|
+
layout,
|
|
54937
|
+
panelDataArray: [],
|
|
54938
|
+
panelDataArrayChanged: false
|
|
54939
|
+
});
|
|
54940
|
+
useRef({
|
|
54941
|
+
didLogIdAndOrderWarning: false,
|
|
54942
|
+
didLogPanelConstraintsWarning: false,
|
|
54943
|
+
prevPanelIds: []
|
|
54944
|
+
});
|
|
54945
|
+
useImperativeHandle(forwardedRef, () => ({
|
|
54946
|
+
getId: () => committedValuesRef.current.id,
|
|
54947
|
+
getLayout: () => {
|
|
54948
|
+
const {
|
|
54949
|
+
layout: layout2
|
|
54950
|
+
} = eagerValuesRef.current;
|
|
54951
|
+
return layout2;
|
|
54952
|
+
},
|
|
54953
|
+
setLayout: (unsafeLayout) => {
|
|
54954
|
+
const {
|
|
54955
|
+
onLayout: onLayout2
|
|
54956
|
+
} = committedValuesRef.current;
|
|
54957
|
+
const {
|
|
54958
|
+
layout: prevLayout,
|
|
54959
|
+
panelDataArray
|
|
54960
|
+
} = eagerValuesRef.current;
|
|
54961
|
+
const safeLayout = validatePanelGroupLayout({
|
|
54962
|
+
layout: unsafeLayout,
|
|
54963
|
+
panelConstraints: panelDataArray.map((panelData) => panelData.constraints)
|
|
54964
|
+
});
|
|
54965
|
+
if (!areEqual(prevLayout, safeLayout)) {
|
|
54966
|
+
setLayout(safeLayout);
|
|
54967
|
+
eagerValuesRef.current.layout = safeLayout;
|
|
54968
|
+
if (onLayout2) {
|
|
54969
|
+
onLayout2(safeLayout);
|
|
54970
|
+
}
|
|
54971
|
+
callPanelCallbacks(panelDataArray, safeLayout, panelIdToLastNotifiedSizeMapRef.current);
|
|
54972
|
+
}
|
|
54973
|
+
}
|
|
54974
|
+
}), []);
|
|
54975
|
+
useIsomorphicLayoutEffect(() => {
|
|
54976
|
+
committedValuesRef.current.autoSaveId = autoSaveId;
|
|
54977
|
+
committedValuesRef.current.direction = direction;
|
|
54978
|
+
committedValuesRef.current.dragState = dragState;
|
|
54979
|
+
committedValuesRef.current.id = groupId;
|
|
54980
|
+
committedValuesRef.current.onLayout = onLayout;
|
|
54981
|
+
committedValuesRef.current.storage = storage;
|
|
54982
|
+
});
|
|
54983
|
+
useWindowSplitterPanelGroupBehavior({
|
|
54984
|
+
committedValuesRef,
|
|
54985
|
+
eagerValuesRef,
|
|
54986
|
+
groupId,
|
|
54987
|
+
layout,
|
|
54988
|
+
panelDataArray: eagerValuesRef.current.panelDataArray,
|
|
54989
|
+
setLayout,
|
|
54990
|
+
panelGroupElement: panelGroupElementRef.current
|
|
54991
|
+
});
|
|
54992
|
+
useEffect(() => {
|
|
54993
|
+
const {
|
|
54994
|
+
panelDataArray
|
|
54995
|
+
} = eagerValuesRef.current;
|
|
54996
|
+
if (autoSaveId) {
|
|
54997
|
+
if (layout.length === 0 || layout.length !== panelDataArray.length) {
|
|
54998
|
+
return;
|
|
54999
|
+
}
|
|
55000
|
+
let debouncedSave = debounceMap[autoSaveId];
|
|
55001
|
+
if (debouncedSave == null) {
|
|
55002
|
+
debouncedSave = debounce(savePanelGroupState, LOCAL_STORAGE_DEBOUNCE_INTERVAL);
|
|
55003
|
+
debounceMap[autoSaveId] = debouncedSave;
|
|
55004
|
+
}
|
|
55005
|
+
const clonedPanelDataArray = [...panelDataArray];
|
|
55006
|
+
const clonedPanelSizesBeforeCollapse = new Map(panelSizeBeforeCollapseRef.current);
|
|
55007
|
+
debouncedSave(autoSaveId, clonedPanelDataArray, clonedPanelSizesBeforeCollapse, layout, storage);
|
|
55008
|
+
}
|
|
55009
|
+
}, [autoSaveId, layout, storage]);
|
|
55010
|
+
useEffect(() => {
|
|
55011
|
+
});
|
|
55012
|
+
const collapsePanel = useCallback((panelData) => {
|
|
55013
|
+
const {
|
|
55014
|
+
onLayout: onLayout2
|
|
55015
|
+
} = committedValuesRef.current;
|
|
55016
|
+
const {
|
|
55017
|
+
layout: prevLayout,
|
|
55018
|
+
panelDataArray
|
|
55019
|
+
} = eagerValuesRef.current;
|
|
55020
|
+
if (panelData.constraints.collapsible) {
|
|
55021
|
+
const panelConstraintsArray = panelDataArray.map((panelData2) => panelData2.constraints);
|
|
55022
|
+
const {
|
|
55023
|
+
collapsedSize = 0,
|
|
55024
|
+
panelSize,
|
|
55025
|
+
pivotIndices
|
|
55026
|
+
} = panelDataHelper(panelDataArray, panelData, prevLayout);
|
|
55027
|
+
assert(panelSize != null, `Panel size not found for panel "${panelData.id}"`);
|
|
55028
|
+
if (!fuzzyNumbersEqual$1(panelSize, collapsedSize)) {
|
|
55029
|
+
panelSizeBeforeCollapseRef.current.set(panelData.id, panelSize);
|
|
55030
|
+
const isLastPanel = findPanelDataIndex(panelDataArray, panelData) === panelDataArray.length - 1;
|
|
55031
|
+
const delta = isLastPanel ? panelSize - collapsedSize : collapsedSize - panelSize;
|
|
55032
|
+
const nextLayout = adjustLayoutByDelta({
|
|
55033
|
+
delta,
|
|
55034
|
+
initialLayout: prevLayout,
|
|
55035
|
+
panelConstraints: panelConstraintsArray,
|
|
55036
|
+
pivotIndices,
|
|
55037
|
+
prevLayout,
|
|
55038
|
+
trigger: "imperative-api"
|
|
55039
|
+
});
|
|
55040
|
+
if (!compareLayouts(prevLayout, nextLayout)) {
|
|
55041
|
+
setLayout(nextLayout);
|
|
55042
|
+
eagerValuesRef.current.layout = nextLayout;
|
|
55043
|
+
if (onLayout2) {
|
|
55044
|
+
onLayout2(nextLayout);
|
|
55045
|
+
}
|
|
55046
|
+
callPanelCallbacks(panelDataArray, nextLayout, panelIdToLastNotifiedSizeMapRef.current);
|
|
55047
|
+
}
|
|
55048
|
+
}
|
|
55049
|
+
}
|
|
55050
|
+
}, []);
|
|
55051
|
+
const expandPanel = useCallback((panelData, minSizeOverride) => {
|
|
55052
|
+
const {
|
|
55053
|
+
onLayout: onLayout2
|
|
55054
|
+
} = committedValuesRef.current;
|
|
55055
|
+
const {
|
|
55056
|
+
layout: prevLayout,
|
|
55057
|
+
panelDataArray
|
|
55058
|
+
} = eagerValuesRef.current;
|
|
55059
|
+
if (panelData.constraints.collapsible) {
|
|
55060
|
+
const panelConstraintsArray = panelDataArray.map((panelData2) => panelData2.constraints);
|
|
55061
|
+
const {
|
|
55062
|
+
collapsedSize = 0,
|
|
55063
|
+
panelSize = 0,
|
|
55064
|
+
minSize: minSizeFromProps = 0,
|
|
55065
|
+
pivotIndices
|
|
55066
|
+
} = panelDataHelper(panelDataArray, panelData, prevLayout);
|
|
55067
|
+
const minSize = minSizeOverride !== null && minSizeOverride !== void 0 ? minSizeOverride : minSizeFromProps;
|
|
55068
|
+
if (fuzzyNumbersEqual$1(panelSize, collapsedSize)) {
|
|
55069
|
+
const prevPanelSize = panelSizeBeforeCollapseRef.current.get(panelData.id);
|
|
55070
|
+
const baseSize = prevPanelSize != null && prevPanelSize >= minSize ? prevPanelSize : minSize;
|
|
55071
|
+
const isLastPanel = findPanelDataIndex(panelDataArray, panelData) === panelDataArray.length - 1;
|
|
55072
|
+
const delta = isLastPanel ? panelSize - baseSize : baseSize - panelSize;
|
|
55073
|
+
const nextLayout = adjustLayoutByDelta({
|
|
55074
|
+
delta,
|
|
55075
|
+
initialLayout: prevLayout,
|
|
55076
|
+
panelConstraints: panelConstraintsArray,
|
|
55077
|
+
pivotIndices,
|
|
55078
|
+
prevLayout,
|
|
55079
|
+
trigger: "imperative-api"
|
|
55080
|
+
});
|
|
55081
|
+
if (!compareLayouts(prevLayout, nextLayout)) {
|
|
55082
|
+
setLayout(nextLayout);
|
|
55083
|
+
eagerValuesRef.current.layout = nextLayout;
|
|
55084
|
+
if (onLayout2) {
|
|
55085
|
+
onLayout2(nextLayout);
|
|
55086
|
+
}
|
|
55087
|
+
callPanelCallbacks(panelDataArray, nextLayout, panelIdToLastNotifiedSizeMapRef.current);
|
|
55088
|
+
}
|
|
55089
|
+
}
|
|
55090
|
+
}
|
|
55091
|
+
}, []);
|
|
55092
|
+
const getPanelSize = useCallback((panelData) => {
|
|
55093
|
+
const {
|
|
55094
|
+
layout: layout2,
|
|
55095
|
+
panelDataArray
|
|
55096
|
+
} = eagerValuesRef.current;
|
|
55097
|
+
const {
|
|
55098
|
+
panelSize
|
|
55099
|
+
} = panelDataHelper(panelDataArray, panelData, layout2);
|
|
55100
|
+
assert(panelSize != null, `Panel size not found for panel "${panelData.id}"`);
|
|
55101
|
+
return panelSize;
|
|
55102
|
+
}, []);
|
|
55103
|
+
const getPanelStyle = useCallback((panelData, defaultSize2) => {
|
|
55104
|
+
const {
|
|
55105
|
+
panelDataArray
|
|
55106
|
+
} = eagerValuesRef.current;
|
|
55107
|
+
const panelIndex = findPanelDataIndex(panelDataArray, panelData);
|
|
55108
|
+
return computePanelFlexBoxStyle({
|
|
55109
|
+
defaultSize: defaultSize2,
|
|
55110
|
+
dragState,
|
|
55111
|
+
layout,
|
|
55112
|
+
panelData: panelDataArray,
|
|
55113
|
+
panelIndex
|
|
55114
|
+
});
|
|
55115
|
+
}, [dragState, layout]);
|
|
55116
|
+
const isPanelCollapsed = useCallback((panelData) => {
|
|
55117
|
+
const {
|
|
55118
|
+
layout: layout2,
|
|
55119
|
+
panelDataArray
|
|
55120
|
+
} = eagerValuesRef.current;
|
|
55121
|
+
const {
|
|
55122
|
+
collapsedSize = 0,
|
|
55123
|
+
collapsible,
|
|
55124
|
+
panelSize
|
|
55125
|
+
} = panelDataHelper(panelDataArray, panelData, layout2);
|
|
55126
|
+
assert(panelSize != null, `Panel size not found for panel "${panelData.id}"`);
|
|
55127
|
+
return collapsible === true && fuzzyNumbersEqual$1(panelSize, collapsedSize);
|
|
55128
|
+
}, []);
|
|
55129
|
+
const isPanelExpanded = useCallback((panelData) => {
|
|
55130
|
+
const {
|
|
55131
|
+
layout: layout2,
|
|
55132
|
+
panelDataArray
|
|
55133
|
+
} = eagerValuesRef.current;
|
|
55134
|
+
const {
|
|
55135
|
+
collapsedSize = 0,
|
|
55136
|
+
collapsible,
|
|
55137
|
+
panelSize
|
|
55138
|
+
} = panelDataHelper(panelDataArray, panelData, layout2);
|
|
55139
|
+
assert(panelSize != null, `Panel size not found for panel "${panelData.id}"`);
|
|
55140
|
+
return !collapsible || fuzzyCompareNumbers(panelSize, collapsedSize) > 0;
|
|
55141
|
+
}, []);
|
|
55142
|
+
const registerPanel = useCallback((panelData) => {
|
|
55143
|
+
const {
|
|
55144
|
+
panelDataArray
|
|
55145
|
+
} = eagerValuesRef.current;
|
|
55146
|
+
panelDataArray.push(panelData);
|
|
55147
|
+
panelDataArray.sort((panelA, panelB) => {
|
|
55148
|
+
const orderA = panelA.order;
|
|
55149
|
+
const orderB = panelB.order;
|
|
55150
|
+
if (orderA == null && orderB == null) {
|
|
55151
|
+
return 0;
|
|
55152
|
+
} else if (orderA == null) {
|
|
55153
|
+
return -1;
|
|
55154
|
+
} else if (orderB == null) {
|
|
55155
|
+
return 1;
|
|
55156
|
+
} else {
|
|
55157
|
+
return orderA - orderB;
|
|
55158
|
+
}
|
|
55159
|
+
});
|
|
55160
|
+
eagerValuesRef.current.panelDataArrayChanged = true;
|
|
55161
|
+
forceUpdate();
|
|
55162
|
+
}, [forceUpdate]);
|
|
55163
|
+
useIsomorphicLayoutEffect(() => {
|
|
55164
|
+
if (eagerValuesRef.current.panelDataArrayChanged) {
|
|
55165
|
+
eagerValuesRef.current.panelDataArrayChanged = false;
|
|
55166
|
+
const {
|
|
55167
|
+
autoSaveId: autoSaveId2,
|
|
55168
|
+
onLayout: onLayout2,
|
|
55169
|
+
storage: storage2
|
|
55170
|
+
} = committedValuesRef.current;
|
|
55171
|
+
const {
|
|
55172
|
+
layout: prevLayout,
|
|
55173
|
+
panelDataArray
|
|
55174
|
+
} = eagerValuesRef.current;
|
|
55175
|
+
let unsafeLayout = null;
|
|
55176
|
+
if (autoSaveId2) {
|
|
55177
|
+
const state = loadPanelGroupState(autoSaveId2, panelDataArray, storage2);
|
|
55178
|
+
if (state) {
|
|
55179
|
+
panelSizeBeforeCollapseRef.current = new Map(Object.entries(state.expandToSizes));
|
|
55180
|
+
unsafeLayout = state.layout;
|
|
55181
|
+
}
|
|
55182
|
+
}
|
|
55183
|
+
if (unsafeLayout == null) {
|
|
55184
|
+
unsafeLayout = calculateUnsafeDefaultLayout({
|
|
55185
|
+
panelDataArray
|
|
55186
|
+
});
|
|
55187
|
+
}
|
|
55188
|
+
const nextLayout = validatePanelGroupLayout({
|
|
55189
|
+
layout: unsafeLayout,
|
|
55190
|
+
panelConstraints: panelDataArray.map((panelData) => panelData.constraints)
|
|
55191
|
+
});
|
|
55192
|
+
if (!areEqual(prevLayout, nextLayout)) {
|
|
55193
|
+
setLayout(nextLayout);
|
|
55194
|
+
eagerValuesRef.current.layout = nextLayout;
|
|
55195
|
+
if (onLayout2) {
|
|
55196
|
+
onLayout2(nextLayout);
|
|
55197
|
+
}
|
|
55198
|
+
callPanelCallbacks(panelDataArray, nextLayout, panelIdToLastNotifiedSizeMapRef.current);
|
|
55199
|
+
}
|
|
55200
|
+
}
|
|
55201
|
+
});
|
|
55202
|
+
useIsomorphicLayoutEffect(() => {
|
|
55203
|
+
const eagerValues = eagerValuesRef.current;
|
|
55204
|
+
return () => {
|
|
55205
|
+
eagerValues.layout = [];
|
|
55206
|
+
};
|
|
55207
|
+
}, []);
|
|
55208
|
+
const registerResizeHandle = useCallback((dragHandleId) => {
|
|
55209
|
+
let isRTL = false;
|
|
55210
|
+
const panelGroupElement = panelGroupElementRef.current;
|
|
55211
|
+
if (panelGroupElement) {
|
|
55212
|
+
const style3 = window.getComputedStyle(panelGroupElement, null);
|
|
55213
|
+
if (style3.getPropertyValue("direction") === "rtl") {
|
|
55214
|
+
isRTL = true;
|
|
55215
|
+
}
|
|
55216
|
+
}
|
|
55217
|
+
return function resizeHandler(event) {
|
|
55218
|
+
event.preventDefault();
|
|
55219
|
+
const panelGroupElement2 = panelGroupElementRef.current;
|
|
55220
|
+
if (!panelGroupElement2) {
|
|
55221
|
+
return () => null;
|
|
55222
|
+
}
|
|
55223
|
+
const {
|
|
55224
|
+
direction: direction2,
|
|
55225
|
+
dragState: dragState2,
|
|
55226
|
+
id: groupId2,
|
|
55227
|
+
keyboardResizeBy: keyboardResizeBy2,
|
|
55228
|
+
onLayout: onLayout2
|
|
55229
|
+
} = committedValuesRef.current;
|
|
55230
|
+
const {
|
|
55231
|
+
layout: prevLayout,
|
|
55232
|
+
panelDataArray
|
|
55233
|
+
} = eagerValuesRef.current;
|
|
55234
|
+
const {
|
|
55235
|
+
initialLayout
|
|
55236
|
+
} = dragState2 !== null && dragState2 !== void 0 ? dragState2 : {};
|
|
55237
|
+
const pivotIndices = determinePivotIndices(groupId2, dragHandleId, panelGroupElement2);
|
|
55238
|
+
let delta = calculateDeltaPercentage(event, dragHandleId, direction2, dragState2, keyboardResizeBy2, panelGroupElement2);
|
|
55239
|
+
const isHorizontal = direction2 === "horizontal";
|
|
55240
|
+
if (isHorizontal && isRTL) {
|
|
55241
|
+
delta = -delta;
|
|
55242
|
+
}
|
|
55243
|
+
const panelConstraints = panelDataArray.map((panelData) => panelData.constraints);
|
|
55244
|
+
const nextLayout = adjustLayoutByDelta({
|
|
55245
|
+
delta,
|
|
55246
|
+
initialLayout: initialLayout !== null && initialLayout !== void 0 ? initialLayout : prevLayout,
|
|
55247
|
+
panelConstraints,
|
|
55248
|
+
pivotIndices,
|
|
55249
|
+
prevLayout,
|
|
55250
|
+
trigger: isKeyDown(event) ? "keyboard" : "mouse-or-touch"
|
|
55251
|
+
});
|
|
55252
|
+
const layoutChanged = !compareLayouts(prevLayout, nextLayout);
|
|
55253
|
+
if (isPointerEvent(event) || isMouseEvent(event)) {
|
|
55254
|
+
if (prevDeltaRef.current != delta) {
|
|
55255
|
+
prevDeltaRef.current = delta;
|
|
55256
|
+
if (!layoutChanged && delta !== 0) {
|
|
55257
|
+
if (isHorizontal) {
|
|
55258
|
+
reportConstraintsViolation(dragHandleId, delta < 0 ? EXCEEDED_HORIZONTAL_MIN : EXCEEDED_HORIZONTAL_MAX);
|
|
55259
|
+
} else {
|
|
55260
|
+
reportConstraintsViolation(dragHandleId, delta < 0 ? EXCEEDED_VERTICAL_MIN : EXCEEDED_VERTICAL_MAX);
|
|
55261
|
+
}
|
|
55262
|
+
} else {
|
|
55263
|
+
reportConstraintsViolation(dragHandleId, 0);
|
|
55264
|
+
}
|
|
55265
|
+
}
|
|
55266
|
+
}
|
|
55267
|
+
if (layoutChanged) {
|
|
55268
|
+
setLayout(nextLayout);
|
|
55269
|
+
eagerValuesRef.current.layout = nextLayout;
|
|
55270
|
+
if (onLayout2) {
|
|
55271
|
+
onLayout2(nextLayout);
|
|
55272
|
+
}
|
|
55273
|
+
callPanelCallbacks(panelDataArray, nextLayout, panelIdToLastNotifiedSizeMapRef.current);
|
|
55274
|
+
}
|
|
55275
|
+
};
|
|
55276
|
+
}, []);
|
|
55277
|
+
const resizePanel2 = useCallback((panelData, unsafePanelSize) => {
|
|
55278
|
+
const {
|
|
55279
|
+
onLayout: onLayout2
|
|
55280
|
+
} = committedValuesRef.current;
|
|
55281
|
+
const {
|
|
55282
|
+
layout: prevLayout,
|
|
55283
|
+
panelDataArray
|
|
55284
|
+
} = eagerValuesRef.current;
|
|
55285
|
+
const panelConstraintsArray = panelDataArray.map((panelData2) => panelData2.constraints);
|
|
55286
|
+
const {
|
|
55287
|
+
panelSize,
|
|
55288
|
+
pivotIndices
|
|
55289
|
+
} = panelDataHelper(panelDataArray, panelData, prevLayout);
|
|
55290
|
+
assert(panelSize != null, `Panel size not found for panel "${panelData.id}"`);
|
|
55291
|
+
const isLastPanel = findPanelDataIndex(panelDataArray, panelData) === panelDataArray.length - 1;
|
|
55292
|
+
const delta = isLastPanel ? panelSize - unsafePanelSize : unsafePanelSize - panelSize;
|
|
55293
|
+
const nextLayout = adjustLayoutByDelta({
|
|
55294
|
+
delta,
|
|
55295
|
+
initialLayout: prevLayout,
|
|
55296
|
+
panelConstraints: panelConstraintsArray,
|
|
55297
|
+
pivotIndices,
|
|
55298
|
+
prevLayout,
|
|
55299
|
+
trigger: "imperative-api"
|
|
55300
|
+
});
|
|
55301
|
+
if (!compareLayouts(prevLayout, nextLayout)) {
|
|
55302
|
+
setLayout(nextLayout);
|
|
55303
|
+
eagerValuesRef.current.layout = nextLayout;
|
|
55304
|
+
if (onLayout2) {
|
|
55305
|
+
onLayout2(nextLayout);
|
|
55306
|
+
}
|
|
55307
|
+
callPanelCallbacks(panelDataArray, nextLayout, panelIdToLastNotifiedSizeMapRef.current);
|
|
55308
|
+
}
|
|
55309
|
+
}, []);
|
|
55310
|
+
const reevaluatePanelConstraints = useCallback((panelData, prevConstraints) => {
|
|
55311
|
+
const {
|
|
55312
|
+
layout: layout2,
|
|
55313
|
+
panelDataArray
|
|
55314
|
+
} = eagerValuesRef.current;
|
|
55315
|
+
const {
|
|
55316
|
+
collapsedSize: prevCollapsedSize = 0,
|
|
55317
|
+
collapsible: prevCollapsible
|
|
55318
|
+
} = prevConstraints;
|
|
55319
|
+
const {
|
|
55320
|
+
collapsedSize: nextCollapsedSize = 0,
|
|
55321
|
+
collapsible: nextCollapsible,
|
|
55322
|
+
maxSize: nextMaxSize = 100,
|
|
55323
|
+
minSize: nextMinSize = 0
|
|
55324
|
+
} = panelData.constraints;
|
|
55325
|
+
const {
|
|
55326
|
+
panelSize: prevPanelSize
|
|
55327
|
+
} = panelDataHelper(panelDataArray, panelData, layout2);
|
|
55328
|
+
if (prevPanelSize == null) {
|
|
55329
|
+
return;
|
|
55330
|
+
}
|
|
55331
|
+
if (prevCollapsible && nextCollapsible && fuzzyNumbersEqual$1(prevPanelSize, prevCollapsedSize)) {
|
|
55332
|
+
if (!fuzzyNumbersEqual$1(prevCollapsedSize, nextCollapsedSize)) {
|
|
55333
|
+
resizePanel2(panelData, nextCollapsedSize);
|
|
55334
|
+
}
|
|
55335
|
+
} else if (prevPanelSize < nextMinSize) {
|
|
55336
|
+
resizePanel2(panelData, nextMinSize);
|
|
55337
|
+
} else if (prevPanelSize > nextMaxSize) {
|
|
55338
|
+
resizePanel2(panelData, nextMaxSize);
|
|
55339
|
+
}
|
|
55340
|
+
}, [resizePanel2]);
|
|
55341
|
+
const startDragging = useCallback((dragHandleId, event) => {
|
|
55342
|
+
const {
|
|
55343
|
+
direction: direction2
|
|
55344
|
+
} = committedValuesRef.current;
|
|
55345
|
+
const {
|
|
55346
|
+
layout: layout2
|
|
55347
|
+
} = eagerValuesRef.current;
|
|
55348
|
+
if (!panelGroupElementRef.current) {
|
|
55349
|
+
return;
|
|
55350
|
+
}
|
|
55351
|
+
const handleElement = getResizeHandleElement(dragHandleId, panelGroupElementRef.current);
|
|
55352
|
+
assert(handleElement, `Drag handle element not found for id "${dragHandleId}"`);
|
|
55353
|
+
const initialCursorPosition = getResizeEventCursorPosition(direction2, event);
|
|
55354
|
+
setDragState({
|
|
55355
|
+
dragHandleId,
|
|
55356
|
+
dragHandleRect: handleElement.getBoundingClientRect(),
|
|
55357
|
+
initialCursorPosition,
|
|
55358
|
+
initialLayout: layout2
|
|
55359
|
+
});
|
|
55360
|
+
}, []);
|
|
55361
|
+
const stopDragging = useCallback(() => {
|
|
55362
|
+
setDragState(null);
|
|
55363
|
+
}, []);
|
|
55364
|
+
const unregisterPanel = useCallback((panelData) => {
|
|
55365
|
+
const {
|
|
55366
|
+
panelDataArray
|
|
55367
|
+
} = eagerValuesRef.current;
|
|
55368
|
+
const index2 = findPanelDataIndex(panelDataArray, panelData);
|
|
55369
|
+
if (index2 >= 0) {
|
|
55370
|
+
panelDataArray.splice(index2, 1);
|
|
55371
|
+
delete panelIdToLastNotifiedSizeMapRef.current[panelData.id];
|
|
55372
|
+
eagerValuesRef.current.panelDataArrayChanged = true;
|
|
55373
|
+
forceUpdate();
|
|
55374
|
+
}
|
|
55375
|
+
}, [forceUpdate]);
|
|
55376
|
+
const context = useMemo(() => ({
|
|
55377
|
+
collapsePanel,
|
|
55378
|
+
direction,
|
|
55379
|
+
dragState,
|
|
55380
|
+
expandPanel,
|
|
55381
|
+
getPanelSize,
|
|
55382
|
+
getPanelStyle,
|
|
55383
|
+
groupId,
|
|
55384
|
+
isPanelCollapsed,
|
|
55385
|
+
isPanelExpanded,
|
|
55386
|
+
reevaluatePanelConstraints,
|
|
55387
|
+
registerPanel,
|
|
55388
|
+
registerResizeHandle,
|
|
55389
|
+
resizePanel: resizePanel2,
|
|
55390
|
+
startDragging,
|
|
55391
|
+
stopDragging,
|
|
55392
|
+
unregisterPanel,
|
|
55393
|
+
panelGroupElement: panelGroupElementRef.current
|
|
55394
|
+
}), [collapsePanel, dragState, direction, expandPanel, getPanelSize, getPanelStyle, groupId, isPanelCollapsed, isPanelExpanded, reevaluatePanelConstraints, registerPanel, registerResizeHandle, resizePanel2, startDragging, stopDragging, unregisterPanel]);
|
|
55395
|
+
const style2 = {
|
|
55396
|
+
display: "flex",
|
|
55397
|
+
flexDirection: direction === "horizontal" ? "row" : "column",
|
|
55398
|
+
height: "100%",
|
|
55399
|
+
overflow: "hidden",
|
|
55400
|
+
width: "100%"
|
|
55401
|
+
};
|
|
55402
|
+
return createElement(PanelGroupContext.Provider, {
|
|
55403
|
+
value: context
|
|
55404
|
+
}, createElement(Type2, {
|
|
55405
|
+
...rest,
|
|
55406
|
+
children: children2,
|
|
55407
|
+
className: classNameFromProps,
|
|
55408
|
+
id: idFromProps,
|
|
55409
|
+
ref: panelGroupElementRef,
|
|
55410
|
+
style: {
|
|
55411
|
+
...style2,
|
|
55412
|
+
...styleFromProps
|
|
55413
|
+
},
|
|
55414
|
+
// CSS selectors
|
|
55415
|
+
[DATA_ATTRIBUTES.group]: "",
|
|
55416
|
+
[DATA_ATTRIBUTES.groupDirection]: direction,
|
|
55417
|
+
[DATA_ATTRIBUTES.groupId]: groupId
|
|
55418
|
+
}));
|
|
55419
|
+
}
|
|
55420
|
+
const PanelGroup = forwardRef((props, ref) => createElement(PanelGroupWithForwardedRef, {
|
|
55421
|
+
...props,
|
|
55422
|
+
forwardedRef: ref
|
|
55423
|
+
}));
|
|
55424
|
+
PanelGroupWithForwardedRef.displayName = "PanelGroup";
|
|
55425
|
+
PanelGroup.displayName = "forwardRef(PanelGroup)";
|
|
55426
|
+
function findPanelDataIndex(panelDataArray, panelData) {
|
|
55427
|
+
return panelDataArray.findIndex((prevPanelData) => prevPanelData === panelData || prevPanelData.id === panelData.id);
|
|
55428
|
+
}
|
|
55429
|
+
function panelDataHelper(panelDataArray, panelData, layout) {
|
|
55430
|
+
const panelIndex = findPanelDataIndex(panelDataArray, panelData);
|
|
55431
|
+
const isLastPanel = panelIndex === panelDataArray.length - 1;
|
|
55432
|
+
const pivotIndices = isLastPanel ? [panelIndex - 1, panelIndex] : [panelIndex, panelIndex + 1];
|
|
55433
|
+
const panelSize = layout[panelIndex];
|
|
55434
|
+
return {
|
|
55435
|
+
...panelData.constraints,
|
|
55436
|
+
panelSize,
|
|
55437
|
+
pivotIndices
|
|
55438
|
+
};
|
|
55439
|
+
}
|
|
55440
|
+
function S(e) {
|
|
55441
|
+
return { "--panel-background": e.colors.background, "--panel-border": e.colors.border, "--panel-handle": e.colors.backgroundSecondary, "--panel-handle-hover": e.colors.backgroundHover, "--panel-handle-active": e.colors.primary, "--panel-button-bg": e.colors.surface, "--panel-button-hover": e.colors.backgroundHover, "--panel-button-border": e.colors.border, "--panel-button-icon": e.colors.textSecondary, "--panel-accent-bg": e.colors.primary + "15" };
|
|
55442
|
+
}
|
|
55443
|
+
const z = forwardRef(({ panels: o, className: a = "", style: s, theme: d, minPanelWidth: u = 350, idealPanelWidth: p = 0.333, showSeparator: h = false, onPanelChange: m, preventKeyboardScroll: f = true }, g) => {
|
|
55444
|
+
const v = useRef(null), b = S(d);
|
|
55445
|
+
useImperativeHandle(g, () => ({ scrollToPanel: (e) => {
|
|
55446
|
+
if (!v.current) return;
|
|
55447
|
+
const t = v.current, n = t.children[e];
|
|
55448
|
+
if (n) {
|
|
55449
|
+
const e2 = n.offsetLeft;
|
|
55450
|
+
t.scrollTo({ left: e2, behavior: "smooth" });
|
|
55451
|
+
}
|
|
55452
|
+
}, getCurrentPanel: () => {
|
|
55453
|
+
if (!v.current || 0 === v.current.children.length) return 0;
|
|
55454
|
+
const e = v.current, t = e.getBoundingClientRect().left;
|
|
55455
|
+
let n = 0, r = 1 / 0;
|
|
55456
|
+
for (let o2 = 0; o2 < e.children.length; o2++) {
|
|
55457
|
+
const i = e.children[o2].getBoundingClientRect(), a2 = Math.abs(i.left - t);
|
|
55458
|
+
a2 < r && (r = a2, n = o2);
|
|
55459
|
+
}
|
|
55460
|
+
return n;
|
|
55461
|
+
} }));
|
|
55462
|
+
useEffect(() => {
|
|
55463
|
+
if (!f || !v.current) return;
|
|
55464
|
+
const e = v.current, t = (e2) => {
|
|
55465
|
+
const t2 = e2.target;
|
|
55466
|
+
if ("INPUT" === t2.tagName || "TEXTAREA" === t2.tagName || "SELECT" === t2.tagName || t2.isContentEditable || null !== t2.closest(".xterm") || null !== t2.closest('[contenteditable="true"]')) return;
|
|
55467
|
+
[" ", "Space", "ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight", "PageUp", "PageDown"].includes(e2.key) && e2.preventDefault();
|
|
55468
|
+
};
|
|
55469
|
+
return e.addEventListener("keydown", t), () => {
|
|
55470
|
+
e.removeEventListener("keydown", t);
|
|
55471
|
+
};
|
|
55472
|
+
}, [f]);
|
|
55473
|
+
const y = o.length, w = 2 * u;
|
|
55474
|
+
let x;
|
|
55475
|
+
x = 1 === y || 2 === y ? "100%" : `max(${u}px, ${100 * p}%)`;
|
|
55476
|
+
const C = React2__default.useId().replace(/:/g, "_");
|
|
55477
|
+
return jsxs(Fragment, { children: [
|
|
55478
|
+
2 === y && /* @__PURE__ */ jsx("style", { children: `
|
|
55479
|
+
.snap-carousel-container[data-carousel-id="${C}"][data-panel-count="2"] .snap-carousel-panel {
|
|
55480
|
+
width: 100%;
|
|
55481
|
+
}
|
|
55482
|
+
@container (min-width: ${w}px) {
|
|
55483
|
+
.snap-carousel-container[data-carousel-id="${C}"][data-panel-count="2"] .snap-carousel-panel {
|
|
55484
|
+
width: 50%;
|
|
55485
|
+
}
|
|
55486
|
+
}
|
|
55487
|
+
` }),
|
|
55488
|
+
/* @__PURE__ */ jsx("div", { ref: v, className: `snap-carousel-container ${a}`, style: { ...b, ...s, "--snap-carousel-min-width": `${u}px`, "--snap-carousel-ideal-width": 100 * p + "%", "--snap-carousel-gap": h ? "1px" : "0px", "--snap-carousel-panel-width": x, "--snap-carousel-panel-count": y, "--snap-carousel-two-panel-threshold": `${w}px` }, onScroll: (e) => {
|
|
55489
|
+
if (!m || !v.current || 0 === v.current.children.length) return;
|
|
55490
|
+
const t = v.current, n = t.getBoundingClientRect().left;
|
|
55491
|
+
let r = 0, o2 = 1 / 0;
|
|
55492
|
+
for (let i = 0; i < t.children.length; i++) {
|
|
55493
|
+
const e2 = t.children[i].getBoundingClientRect(), a2 = Math.abs(e2.left - n);
|
|
55494
|
+
a2 < o2 && (o2 = a2, r = i);
|
|
55495
|
+
}
|
|
55496
|
+
m(r);
|
|
55497
|
+
}, "data-panel-count": y, "data-carousel-id": C, children: o.map((t, n) => /* @__PURE__ */ jsx("div", { className: "snap-carousel-panel", children: t }, n)) })
|
|
55498
|
+
] });
|
|
55499
|
+
});
|
|
55500
|
+
z.displayName = "SnapCarousel";
|
|
55501
|
+
var le, se;
|
|
55502
|
+
(se = le || (le = {})).DragStart = "dragStart", se.DragMove = "dragMove", se.DragEnd = "dragEnd", se.DragCancel = "dragCancel", se.DragOver = "dragOver", se.RegisterDroppable = "registerDroppable", se.SetDroppableDisabled = "setDroppableDisabled", se.UnregisterDroppable = "unregisterDroppable";
|
|
55503
|
+
const de = /* @__PURE__ */ Object.freeze({ x: 0, y: 0 });
|
|
55504
|
+
var Te, Ae;
|
|
55505
|
+
(Ae = Te || (Te = {}))[Ae.Forward = 1] = "Forward", Ae[Ae.Backward = -1] = "Backward";
|
|
55506
|
+
var _e, je, He, Ke;
|
|
55507
|
+
(je = _e || (_e = {})).Click = "click", je.DragStart = "dragstart", je.Keydown = "keydown", je.ContextMenu = "contextmenu", je.Resize = "resize", je.SelectionChange = "selectionchange", je.VisibilityChange = "visibilitychange", (Ke = He || (He = {})).Space = "Space", Ke.Down = "ArrowDown", Ke.Right = "ArrowRight", Ke.Left = "ArrowLeft", Ke.Up = "ArrowUp", Ke.Esc = "Escape", Ke.Enter = "Enter", Ke.Tab = "Tab";
|
|
55508
|
+
({ start: [He.Space, He.Enter], cancel: [He.Esc], end: [He.Space, He.Enter, He.Tab] });
|
|
55509
|
+
var rt, ot;
|
|
55510
|
+
(ot = rt || (rt = {}))[ot.RightClick = 2] = "RightClick";
|
|
55511
|
+
var at$1, lt, st, ct;
|
|
55512
|
+
(lt = at$1 || (at$1 = {}))[lt.Pointer = 0] = "Pointer", lt[lt.DraggableRect = 1] = "DraggableRect", (ct = st || (st = {}))[ct.TreeOrder = 0] = "TreeOrder", ct[ct.ReversedTreeOrder = 1] = "ReversedTreeOrder";
|
|
55513
|
+
({ x: { [Te.Backward]: false, [Te.Forward]: false }, y: { [Te.Backward]: false, [Te.Forward]: false } });
|
|
55514
|
+
var pt, ht, mt;
|
|
55515
|
+
(ht = pt || (pt = {}))[ht.Always = 0] = "Always", ht[ht.BeforeDragging = 1] = "BeforeDragging", ht[ht.WhileDragging = 2] = "WhileDragging", (mt || (mt = {})).Optimized = "optimized";
|
|
55516
|
+
({ droppable: { strategy: pt.WhileDragging, frequency: mt.Optimized } });
|
|
55517
|
+
/* @__PURE__ */ createContext({ ...de, scaleX: 1, scaleY: 1 });
|
|
55518
|
+
var $t, Bt;
|
|
55519
|
+
(Bt = $t || ($t = {}))[Bt.Uninitialized = 0] = "Uninitialized", Bt[Bt.Initializing = 1] = "Initializing", Bt[Bt.Initialized = 2] = "Initialized";
|
|
55520
|
+
var Ut;
|
|
55521
|
+
(() => {
|
|
55522
|
+
if ("undefined" != typeof window) {
|
|
55523
|
+
const e = window;
|
|
55524
|
+
return e.__principlemd_theme_context__ || (e.__principlemd_theme_context__ = createContext(void 0)), e.__principlemd_theme_context__;
|
|
55525
|
+
}
|
|
55526
|
+
return Ut || (Ut = createContext(void 0)), Ut;
|
|
55527
|
+
})();
|
|
55528
|
+
var Pe = Object.defineProperty;
|
|
55529
|
+
var We = (o, e, t) => e in o ? Pe(o, e, { enumerable: true, configurable: true, writable: true, value: t }) : o[e] = t;
|
|
55530
|
+
var Y = (o, e, t) => We(o, typeof e != "symbol" ? e + "" : e, t);
|
|
55531
|
+
class Le {
|
|
55532
|
+
constructor() {
|
|
55533
|
+
Y(this, "PRESETS_KEY", "panel-layouts:workspace-presets");
|
|
55534
|
+
Y(this, "REPO_STATE_PREFIX", "panel-layouts:repo-state:");
|
|
55535
|
+
}
|
|
55536
|
+
/**
|
|
55537
|
+
* Load all user-created workspace presets
|
|
55538
|
+
*/
|
|
55539
|
+
async loadWorkspacePresets() {
|
|
55540
|
+
try {
|
|
55541
|
+
const e = localStorage.getItem(this.PRESETS_KEY);
|
|
55542
|
+
return e ? JSON.parse(e) : {};
|
|
55543
|
+
} catch (e) {
|
|
55544
|
+
return console.error("Failed to load workspace presets:", e), {};
|
|
55545
|
+
}
|
|
55546
|
+
}
|
|
55547
|
+
/**
|
|
55548
|
+
* Save workspace presets
|
|
55549
|
+
*/
|
|
55550
|
+
async saveWorkspacePresets(e) {
|
|
55551
|
+
try {
|
|
55552
|
+
localStorage.setItem(this.PRESETS_KEY, JSON.stringify(e));
|
|
55553
|
+
} catch (t) {
|
|
55554
|
+
throw console.error("Failed to save workspace presets:", t), t;
|
|
55555
|
+
}
|
|
55556
|
+
}
|
|
55557
|
+
/**
|
|
55558
|
+
* Load repository-specific workspace state
|
|
55559
|
+
*/
|
|
55560
|
+
async loadRepositoryState(e) {
|
|
55561
|
+
try {
|
|
55562
|
+
const t = `${this.REPO_STATE_PREFIX}${e}`, r = localStorage.getItem(t);
|
|
55563
|
+
return r ? JSON.parse(r) : null;
|
|
55564
|
+
} catch (t) {
|
|
55565
|
+
return console.error(
|
|
55566
|
+
`Failed to load repository state for ${e}:`,
|
|
55567
|
+
t
|
|
55568
|
+
), null;
|
|
55569
|
+
}
|
|
55570
|
+
}
|
|
55571
|
+
/**
|
|
55572
|
+
* Save repository-specific workspace state
|
|
55573
|
+
*/
|
|
55574
|
+
async saveRepositoryState(e, t) {
|
|
55575
|
+
try {
|
|
55576
|
+
const r = `${this.REPO_STATE_PREFIX}${e}`;
|
|
55577
|
+
localStorage.setItem(r, JSON.stringify(t));
|
|
55578
|
+
} catch (r) {
|
|
55579
|
+
throw console.error(
|
|
55580
|
+
`Failed to save repository state for ${e}:`,
|
|
55581
|
+
r
|
|
55582
|
+
), r;
|
|
55583
|
+
}
|
|
55584
|
+
}
|
|
55585
|
+
/**
|
|
55586
|
+
* Load all repository states
|
|
55587
|
+
*/
|
|
55588
|
+
async loadAllRepositoryStates() {
|
|
55589
|
+
try {
|
|
55590
|
+
const e = {};
|
|
55591
|
+
for (let t = 0; t < localStorage.length; t++) {
|
|
55592
|
+
const r = localStorage.key(t);
|
|
55593
|
+
if (r && r.startsWith(this.REPO_STATE_PREFIX)) {
|
|
55594
|
+
const n = r.substring(this.REPO_STATE_PREFIX.length), a = localStorage.getItem(r);
|
|
55595
|
+
if (a)
|
|
55596
|
+
try {
|
|
55597
|
+
e[n] = JSON.parse(a);
|
|
55598
|
+
} catch (i) {
|
|
55599
|
+
console.error(
|
|
55600
|
+
`Failed to parse repository state for ${n}:`,
|
|
55601
|
+
i
|
|
55602
|
+
);
|
|
55603
|
+
}
|
|
55604
|
+
}
|
|
55605
|
+
}
|
|
55606
|
+
return e;
|
|
55607
|
+
} catch (e) {
|
|
55608
|
+
return console.error("Failed to load all repository states:", e), {};
|
|
55609
|
+
}
|
|
55610
|
+
}
|
|
55611
|
+
}
|
|
55612
|
+
class D {
|
|
55613
|
+
/**
|
|
55614
|
+
* Configure a custom storage adapter (for Electron IPC or remote storage)
|
|
55615
|
+
*/
|
|
55616
|
+
static setAdapter(e) {
|
|
55617
|
+
this.adapter = e;
|
|
55618
|
+
}
|
|
55619
|
+
/**
|
|
55620
|
+
* Get all workspace layouts (including built-in)
|
|
55621
|
+
*/
|
|
55622
|
+
static async getWorkspaceLayouts() {
|
|
55623
|
+
const e = this.getBuiltInWorkspaceLayouts();
|
|
55624
|
+
return {
|
|
55625
|
+
...await this.adapter.loadWorkspacePresets(),
|
|
55626
|
+
...e
|
|
55627
|
+
};
|
|
55628
|
+
}
|
|
55629
|
+
/**
|
|
55630
|
+
* Get a specific workspace layout by ID
|
|
55631
|
+
*/
|
|
55632
|
+
static async getWorkspaceLayout(e) {
|
|
55633
|
+
return (await this.getWorkspaceLayouts())[e] || null;
|
|
55634
|
+
}
|
|
55635
|
+
/**
|
|
55636
|
+
* Create a new workspace layout
|
|
55637
|
+
*/
|
|
55638
|
+
static async createWorkspaceLayout(e) {
|
|
55639
|
+
const t = await this.adapter.loadWorkspacePresets(), r = this.generateWorkspaceId(e.name), n = {
|
|
55640
|
+
id: r,
|
|
55641
|
+
name: e.name,
|
|
55642
|
+
description: e.description,
|
|
55643
|
+
layout: e.layout,
|
|
55644
|
+
defaultSizes: e.defaultSizes,
|
|
55645
|
+
defaultCollapsed: e.defaultCollapsed,
|
|
55646
|
+
createdAt: Date.now(),
|
|
55647
|
+
updatedAt: Date.now(),
|
|
55648
|
+
isBuiltIn: false
|
|
55649
|
+
}, a = {
|
|
55650
|
+
...t,
|
|
55651
|
+
[r]: n
|
|
55652
|
+
};
|
|
55653
|
+
return await this.adapter.saveWorkspacePresets(a), n;
|
|
55654
|
+
}
|
|
55655
|
+
/**
|
|
55656
|
+
* Update an existing workspace layout
|
|
55657
|
+
*/
|
|
55658
|
+
static async updateWorkspaceLayout(e, t) {
|
|
55659
|
+
const r = await this.adapter.loadWorkspacePresets(), n = r[e];
|
|
55660
|
+
if (!n)
|
|
55661
|
+
return console.error(`Workspace layout ${e} not found`), null;
|
|
55662
|
+
if (n.isBuiltIn)
|
|
55663
|
+
return console.error(`Cannot update built-in workspace layout ${e}`), null;
|
|
55664
|
+
const a = {
|
|
55665
|
+
...n,
|
|
55666
|
+
...t,
|
|
55667
|
+
id: e,
|
|
55668
|
+
// Preserve ID
|
|
55669
|
+
createdAt: n.createdAt,
|
|
55670
|
+
// Preserve creation time
|
|
55671
|
+
updatedAt: Date.now()
|
|
55672
|
+
}, i = {
|
|
55673
|
+
...r,
|
|
55674
|
+
[e]: a
|
|
55675
|
+
};
|
|
55676
|
+
return await this.adapter.saveWorkspacePresets(i), a;
|
|
55677
|
+
}
|
|
55678
|
+
/**
|
|
55679
|
+
* Delete a workspace layout
|
|
55680
|
+
*/
|
|
55681
|
+
static async deleteWorkspaceLayout(e) {
|
|
55682
|
+
const t = await this.adapter.loadWorkspacePresets(), r = t[e];
|
|
55683
|
+
if (!r)
|
|
55684
|
+
return console.error(`Workspace layout ${e} not found`), false;
|
|
55685
|
+
if (r.isBuiltIn)
|
|
55686
|
+
return console.error(`Cannot delete built-in workspace layout ${e}`), false;
|
|
55687
|
+
const n = { ...t };
|
|
55688
|
+
return delete n[e], await this.adapter.saveWorkspacePresets(n), true;
|
|
55689
|
+
}
|
|
55690
|
+
/**
|
|
55691
|
+
* Get repository state (which workspace + current sizes/collapsed)
|
|
55692
|
+
*/
|
|
55693
|
+
static async getRepositoryState(e) {
|
|
55694
|
+
return await this.adapter.loadRepositoryState(e);
|
|
55695
|
+
}
|
|
55696
|
+
/**
|
|
55697
|
+
* Set repository state (which workspace + current sizes/collapsed/layout)
|
|
55698
|
+
*/
|
|
55699
|
+
static async setRepositoryState(e, t) {
|
|
55700
|
+
await this.adapter.saveRepositoryState(e, t);
|
|
55701
|
+
}
|
|
55702
|
+
/**
|
|
55703
|
+
* Update only sizes in repository state
|
|
55704
|
+
*/
|
|
55705
|
+
static async updateRepositorySizes(e, t) {
|
|
55706
|
+
const r = await this.getRepositoryState(e);
|
|
55707
|
+
r && await this.setRepositoryState(e, {
|
|
55708
|
+
...r,
|
|
55709
|
+
sizes: t
|
|
55710
|
+
});
|
|
55711
|
+
}
|
|
55712
|
+
/**
|
|
55713
|
+
* Update only collapsed state in repository state
|
|
55714
|
+
*/
|
|
55715
|
+
static async updateRepositoryCollapsed(e, t) {
|
|
55716
|
+
const r = await this.getRepositoryState(e);
|
|
55717
|
+
r && await this.setRepositoryState(e, {
|
|
55718
|
+
...r,
|
|
55719
|
+
collapsed: t
|
|
55720
|
+
});
|
|
55721
|
+
}
|
|
55722
|
+
/**
|
|
55723
|
+
* Check if repository state differs from workspace defaults
|
|
55724
|
+
*/
|
|
55725
|
+
static hasStateDeviation(e, t) {
|
|
55726
|
+
const r = t.defaultSizes ? JSON.stringify(e.sizes) !== JSON.stringify(t.defaultSizes) : false, n = t.defaultCollapsed ? JSON.stringify(e.collapsed) !== JSON.stringify(t.defaultCollapsed) : false;
|
|
55727
|
+
return { hasSizeDeviation: r, hasCollapsedDeviation: n };
|
|
55728
|
+
}
|
|
55729
|
+
/**
|
|
55730
|
+
* Update workspace defaults from repository state
|
|
55731
|
+
*/
|
|
55732
|
+
static async updateWorkspaceFromRepositoryState(e, t) {
|
|
55733
|
+
const r = await this.getWorkspaceLayout(e), n = await this.getRepositoryState(t);
|
|
55734
|
+
if (!r || !n || r.isBuiltIn) {
|
|
55735
|
+
console.error(
|
|
55736
|
+
"Cannot update built-in workspace or workspace/state not found"
|
|
55737
|
+
);
|
|
55738
|
+
return;
|
|
55739
|
+
}
|
|
55740
|
+
await this.updateWorkspaceLayout(e, {
|
|
55741
|
+
defaultSizes: n.sizes,
|
|
55742
|
+
defaultCollapsed: n.collapsed
|
|
55743
|
+
});
|
|
55744
|
+
}
|
|
55745
|
+
/**
|
|
55746
|
+
* Reset repository state to workspace defaults
|
|
55747
|
+
*/
|
|
55748
|
+
static async resetRepositoryToWorkspaceDefaults(e, t) {
|
|
55749
|
+
const r = await this.getWorkspaceLayout(t);
|
|
55750
|
+
if (!r) {
|
|
55751
|
+
console.error(`Workspace ${t} not found`);
|
|
55752
|
+
return;
|
|
55753
|
+
}
|
|
55754
|
+
const n = await this.getRepositoryState(e);
|
|
55755
|
+
n && await this.setRepositoryState(e, {
|
|
55756
|
+
...n,
|
|
55757
|
+
sizes: r.defaultSizes || { left: 20, middle: 45, right: 35 },
|
|
55758
|
+
collapsed: r.defaultCollapsed || { left: false, right: false }
|
|
55759
|
+
});
|
|
55760
|
+
}
|
|
55761
|
+
/**
|
|
55762
|
+
* Check if a layout matches a workspace layout
|
|
55763
|
+
*/
|
|
55764
|
+
static isLayoutMatchingWorkspace(e, t) {
|
|
55765
|
+
return this.areLayoutsEqual(e, t.layout);
|
|
55766
|
+
}
|
|
55767
|
+
/**
|
|
55768
|
+
* Find workspace ID that matches the given layout
|
|
55769
|
+
*/
|
|
55770
|
+
static async findMatchingWorkspace(e) {
|
|
55771
|
+
const t = await this.getWorkspaceLayouts();
|
|
55772
|
+
for (const [r, n] of Object.entries(t))
|
|
55773
|
+
if (this.isLayoutMatchingWorkspace(e, n))
|
|
55774
|
+
return r;
|
|
55775
|
+
return null;
|
|
55776
|
+
}
|
|
55777
|
+
/**
|
|
55778
|
+
* Deep comparison of two panel layouts
|
|
55779
|
+
*/
|
|
55780
|
+
static areLayoutsEqual(e, t) {
|
|
55781
|
+
return JSON.stringify(e) === JSON.stringify(t);
|
|
55782
|
+
}
|
|
55783
|
+
/**
|
|
55784
|
+
* Generate a unique ID from a workspace name
|
|
55785
|
+
*/
|
|
55786
|
+
static generateWorkspaceId(e) {
|
|
55787
|
+
return `${e.toLowerCase().replace(/[^a-z0-9]+/g, "-")}-${Date.now()}`;
|
|
55788
|
+
}
|
|
55789
|
+
/**
|
|
55790
|
+
* Get built-in workspace layouts
|
|
55791
|
+
*/
|
|
55792
|
+
static getBuiltInWorkspaceLayouts() {
|
|
55793
|
+
const e = Date.now();
|
|
55794
|
+
return {
|
|
55795
|
+
"project-management": {
|
|
55796
|
+
id: "project-management",
|
|
55797
|
+
name: "Project Management",
|
|
55798
|
+
description: "Tasks, dependencies, issues, file tree, docs, drawings, multi terminal, city visualization, code viewer, markdown slides, and excalidraw",
|
|
55799
|
+
layout: {
|
|
55800
|
+
left: {
|
|
55801
|
+
type: "tabs",
|
|
55802
|
+
panels: [
|
|
55803
|
+
"tasks",
|
|
55804
|
+
"dependencies",
|
|
55805
|
+
"gitIssues",
|
|
55806
|
+
"fileTree",
|
|
55807
|
+
"docs",
|
|
55808
|
+
"drawings"
|
|
55809
|
+
],
|
|
55810
|
+
config: { defaultActiveTab: 0, tabPosition: "top" }
|
|
55811
|
+
},
|
|
55812
|
+
middle: "multiTerminal",
|
|
55813
|
+
right: {
|
|
55814
|
+
type: "tabs",
|
|
55815
|
+
panels: [
|
|
55816
|
+
"cityVisualization",
|
|
55817
|
+
"codeViewer",
|
|
55818
|
+
"markdownViewer",
|
|
55819
|
+
"excalidrawDiagram"
|
|
55820
|
+
],
|
|
55821
|
+
config: { defaultActiveTab: 0, tabPosition: "top" }
|
|
55822
|
+
}
|
|
55823
|
+
},
|
|
55824
|
+
defaultSizes: { left: 20, middle: 45, right: 35 },
|
|
55825
|
+
defaultCollapsed: { left: false, right: false },
|
|
55826
|
+
createdAt: e,
|
|
55827
|
+
updatedAt: e,
|
|
55828
|
+
isBuiltIn: true
|
|
55829
|
+
},
|
|
55830
|
+
"code-review": {
|
|
55831
|
+
id: "code-review",
|
|
55832
|
+
name: "Code Review",
|
|
55833
|
+
description: "Git changes, pull requests, and file tree on left, git diff and code viewer in middle, city map on right",
|
|
55834
|
+
layout: {
|
|
55835
|
+
left: {
|
|
55836
|
+
type: "tabs",
|
|
55837
|
+
panels: ["gitChanges", "gitPullRequests", "fileTree"],
|
|
55838
|
+
config: { defaultActiveTab: 0, tabPosition: "top" }
|
|
55839
|
+
},
|
|
55840
|
+
middle: {
|
|
55841
|
+
type: "tabs",
|
|
55842
|
+
panels: ["gitDiff", "codeViewer"],
|
|
55843
|
+
config: { defaultActiveTab: 0, tabPosition: "top" }
|
|
55844
|
+
},
|
|
55845
|
+
right: "cityVisualization"
|
|
55846
|
+
},
|
|
55847
|
+
defaultSizes: { left: 20, middle: 50, right: 30 },
|
|
55848
|
+
defaultCollapsed: { left: false, right: false },
|
|
55849
|
+
createdAt: e,
|
|
55850
|
+
updatedAt: e,
|
|
55851
|
+
isBuiltIn: true
|
|
55852
|
+
},
|
|
55853
|
+
documentation: {
|
|
55854
|
+
id: "documentation",
|
|
55855
|
+
name: "Documentation",
|
|
55856
|
+
description: "Docs, markdown viewer, and code viewer",
|
|
55857
|
+
layout: {
|
|
55858
|
+
left: "docs",
|
|
55859
|
+
middle: "markdownViewer",
|
|
55860
|
+
right: "codeViewer"
|
|
55861
|
+
},
|
|
55862
|
+
defaultSizes: { left: 20, middle: 50, right: 30 },
|
|
55863
|
+
defaultCollapsed: { left: false, right: true },
|
|
55864
|
+
createdAt: e,
|
|
55865
|
+
updatedAt: e,
|
|
55866
|
+
isBuiltIn: true
|
|
55867
|
+
},
|
|
55868
|
+
"agent-work": {
|
|
55869
|
+
id: "agent-work",
|
|
55870
|
+
name: "Agent Work",
|
|
55871
|
+
description: "Tasks, agent sessions, file tree, agent context, git changes, docs, multi terminal, city map, agent events, code viewer, and markdown slides",
|
|
55872
|
+
layout: {
|
|
55873
|
+
left: {
|
|
55874
|
+
type: "tabs",
|
|
55875
|
+
panels: [
|
|
55876
|
+
"tasks",
|
|
55877
|
+
"agentSessions",
|
|
55878
|
+
"fileTree",
|
|
55879
|
+
"agentContext",
|
|
55880
|
+
"gitChanges",
|
|
55881
|
+
"docs"
|
|
55882
|
+
],
|
|
55883
|
+
config: { defaultActiveTab: 0, tabPosition: "top" }
|
|
55884
|
+
},
|
|
55885
|
+
middle: "multiTerminal",
|
|
55886
|
+
right: {
|
|
55887
|
+
type: "tabs",
|
|
55888
|
+
panels: [
|
|
55889
|
+
"cityVisualization",
|
|
55890
|
+
"agentEvents",
|
|
55891
|
+
"codeViewer",
|
|
55892
|
+
"markdownViewer"
|
|
55893
|
+
],
|
|
55894
|
+
config: { defaultActiveTab: 0, tabPosition: "top" }
|
|
55895
|
+
}
|
|
55896
|
+
},
|
|
55897
|
+
defaultSizes: { left: 20, middle: 45, right: 35 },
|
|
55898
|
+
defaultCollapsed: { left: false, right: false },
|
|
55899
|
+
createdAt: e,
|
|
55900
|
+
updatedAt: e,
|
|
55901
|
+
isBuiltIn: true
|
|
55902
|
+
},
|
|
55903
|
+
"quality-check": {
|
|
55904
|
+
id: "quality-check",
|
|
55905
|
+
name: "Quality Check",
|
|
55906
|
+
description: "Package information, tools, and dependencies on left; city visualization map in middle; multi terminal and code viewer on right (collapsed)",
|
|
55907
|
+
layout: {
|
|
55908
|
+
left: {
|
|
55909
|
+
type: "tabs",
|
|
55910
|
+
panels: ["packageInfo", "tools", "dependencies"],
|
|
55911
|
+
config: { defaultActiveTab: 0, tabPosition: "top" }
|
|
55912
|
+
},
|
|
55913
|
+
middle: "cityVisualization",
|
|
55914
|
+
right: {
|
|
55915
|
+
type: "tabs",
|
|
55916
|
+
panels: ["multiTerminal", "codeViewer"],
|
|
55917
|
+
config: { defaultActiveTab: 0, tabPosition: "top" }
|
|
55918
|
+
}
|
|
55919
|
+
},
|
|
55920
|
+
defaultSizes: { left: 20, middle: 45, right: 35 },
|
|
55921
|
+
defaultCollapsed: { left: false, right: true },
|
|
55922
|
+
createdAt: e,
|
|
55923
|
+
updatedAt: e,
|
|
55924
|
+
isBuiltIn: true
|
|
55925
|
+
},
|
|
55926
|
+
drawing: {
|
|
55927
|
+
id: "drawing",
|
|
55928
|
+
name: "Drawing",
|
|
55929
|
+
description: "Drawings and docs, excalidraw diagram, multi terminal and markdown viewer",
|
|
55930
|
+
layout: {
|
|
55931
|
+
left: {
|
|
55932
|
+
type: "tabs",
|
|
55933
|
+
panels: ["drawings", "docs"],
|
|
55934
|
+
config: { defaultActiveTab: 0, tabPosition: "top" }
|
|
55935
|
+
},
|
|
55936
|
+
middle: "excalidrawDiagram",
|
|
55937
|
+
right: {
|
|
55938
|
+
type: "tabs",
|
|
55939
|
+
panels: ["multiTerminal", "markdownViewer"],
|
|
55940
|
+
config: { defaultActiveTab: 0, tabPosition: "top" }
|
|
55941
|
+
}
|
|
55942
|
+
},
|
|
55943
|
+
defaultSizes: { left: 20, middle: 50, right: 30 },
|
|
55944
|
+
defaultCollapsed: { left: false, right: true },
|
|
55945
|
+
createdAt: e,
|
|
55946
|
+
updatedAt: e,
|
|
55947
|
+
isBuiltIn: true
|
|
55948
|
+
},
|
|
55949
|
+
"old-school": {
|
|
55950
|
+
id: "old-school",
|
|
55951
|
+
name: "Old School",
|
|
55952
|
+
description: "File tree, search, git changes, and docs on left; code viewer and markdown viewer in middle; multi terminal and city map on right (collapsed)",
|
|
55953
|
+
layout: {
|
|
55954
|
+
left: {
|
|
55955
|
+
type: "tabs",
|
|
55956
|
+
panels: ["fileTree", "search", "gitChanges", "docs"],
|
|
55957
|
+
config: { defaultActiveTab: 0, tabPosition: "top" }
|
|
55958
|
+
},
|
|
55959
|
+
middle: {
|
|
55960
|
+
type: "tabs",
|
|
55961
|
+
panels: ["codeViewer", "markdownViewer"],
|
|
55962
|
+
config: { defaultActiveTab: 0, tabPosition: "top" }
|
|
55963
|
+
},
|
|
55964
|
+
right: {
|
|
55965
|
+
type: "tabs",
|
|
55966
|
+
panels: ["multiTerminal", "cityVisualization"],
|
|
55967
|
+
config: { defaultActiveTab: 0, tabPosition: "top" }
|
|
55968
|
+
}
|
|
55969
|
+
},
|
|
55970
|
+
defaultSizes: { left: 20, middle: 50, right: 30 },
|
|
55971
|
+
defaultCollapsed: { left: false, right: true },
|
|
55972
|
+
createdAt: e,
|
|
55973
|
+
updatedAt: e,
|
|
55974
|
+
isBuiltIn: true
|
|
55975
|
+
},
|
|
55976
|
+
"principal-office": {
|
|
55977
|
+
id: "principal-office",
|
|
55978
|
+
name: "Principal Office",
|
|
55979
|
+
description: "Alexandria docs on left, MDX editor in middle, multi terminal on right",
|
|
55980
|
+
layout: {
|
|
55981
|
+
left: "docs",
|
|
55982
|
+
middle: "mdxEditor",
|
|
55983
|
+
right: "multiTerminal"
|
|
55984
|
+
},
|
|
55985
|
+
defaultSizes: { left: 20, middle: 50, right: 30 },
|
|
55986
|
+
defaultCollapsed: { left: false, right: false },
|
|
55987
|
+
createdAt: e,
|
|
55988
|
+
updatedAt: e,
|
|
55989
|
+
isBuiltIn: true
|
|
55990
|
+
}
|
|
55991
|
+
};
|
|
55992
|
+
}
|
|
55993
|
+
/**
|
|
55994
|
+
* Initialize workspace layouts with built-in defaults if none exist
|
|
55995
|
+
*/
|
|
55996
|
+
static async initializeWorkspaceLayouts() {
|
|
55997
|
+
const e = await this.adapter.loadWorkspacePresets();
|
|
55998
|
+
Object.keys(e).length;
|
|
55999
|
+
}
|
|
56000
|
+
}
|
|
56001
|
+
Y(D, "adapter", new Le());
|
|
56002
|
+
function at(o, e, t, r) {
|
|
56003
|
+
useEffect(() => {
|
|
56004
|
+
const n = e.on(
|
|
56005
|
+
"panel:focus",
|
|
56006
|
+
(i) => {
|
|
56007
|
+
i.payload.panelId === o && t();
|
|
56008
|
+
}
|
|
56009
|
+
);
|
|
56010
|
+
return () => {
|
|
56011
|
+
n();
|
|
56012
|
+
};
|
|
56013
|
+
}, [o, e, t, r]);
|
|
56014
|
+
}
|
|
54558
56015
|
const EMPTY_CANVAS_ARRAY = [];
|
|
54559
56016
|
const useCanvasData = ({
|
|
54560
56017
|
context
|
|
@@ -54778,6 +56235,10 @@ const CanvasListPanel = ({
|
|
|
54778
56235
|
}) => {
|
|
54779
56236
|
const { theme } = useTheme$1();
|
|
54780
56237
|
const panelRef = useRef(null);
|
|
56238
|
+
at("canvas-list", events, () => {
|
|
56239
|
+
var _a;
|
|
56240
|
+
return (_a = panelRef.current) == null ? void 0 : _a.focus();
|
|
56241
|
+
});
|
|
54781
56242
|
const [selectedCanvasId, setSelectedCanvasId] = useState(null);
|
|
54782
56243
|
const [searchQuery, setSearchQuery] = useState("");
|
|
54783
56244
|
const [isRefreshing, setIsRefreshing] = useState(false);
|
|
@@ -54837,10 +56298,10 @@ const CanvasListPanel = ({
|
|
|
54837
56298
|
setIsRefreshing(true);
|
|
54838
56299
|
if (events) {
|
|
54839
56300
|
events.emit({
|
|
54840
|
-
type: "
|
|
56301
|
+
type: "canvas:refresh",
|
|
54841
56302
|
source: "canvas-list-panel",
|
|
54842
56303
|
timestamp: Date.now(),
|
|
54843
|
-
payload: {
|
|
56304
|
+
payload: {}
|
|
54844
56305
|
});
|
|
54845
56306
|
}
|
|
54846
56307
|
try {
|
|
@@ -62497,6 +63958,936 @@ const ChangeImpactAnalysisExplainerPanel = ({ className }) => {
|
|
|
62497
63958
|
}
|
|
62498
63959
|
);
|
|
62499
63960
|
};
|
|
63961
|
+
const Step1TraditionalDevelopment = () => {
|
|
63962
|
+
return /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "16px" }, children: [
|
|
63963
|
+
/* @__PURE__ */ jsxs("svg", { viewBox: "0 0 600 250", style: { width: "100%", height: "auto" }, children: [
|
|
63964
|
+
/* @__PURE__ */ jsxs("g", { children: [
|
|
63965
|
+
/* @__PURE__ */ jsx("circle", { cx: "100", cy: "100", r: "30", fill: "#3b82f6", stroke: "#60a5fa", strokeWidth: "2" }),
|
|
63966
|
+
/* @__PURE__ */ jsx("text", { x: "100", y: "105", textAnchor: "middle", fill: "#fff", fontSize: "28", children: "👨💻" }),
|
|
63967
|
+
/* @__PURE__ */ jsx("text", { x: "100", y: "150", textAnchor: "middle", fill: "#94a3b8", fontSize: "12", fontWeight: "600", children: "DEVELOPER" })
|
|
63968
|
+
] }),
|
|
63969
|
+
/* @__PURE__ */ jsxs("g", { children: [
|
|
63970
|
+
/* @__PURE__ */ jsx("line", { x1: "140", y1: "100", x2: "220", y2: "100", stroke: "#10b981", strokeWidth: "2", markerEnd: "url(#arrowgreen)" }),
|
|
63971
|
+
/* @__PURE__ */ jsx("text", { x: "180", y: "90", textAnchor: "middle", fill: "#10b981", fontSize: "10", fontWeight: "600", children: "Builds Code" }),
|
|
63972
|
+
/* @__PURE__ */ jsx("text", { x: "180", y: "118", textAnchor: "middle", fill: "#10b981", fontSize: "9", children: "Gains Expertise" })
|
|
63973
|
+
] }),
|
|
63974
|
+
/* @__PURE__ */ jsxs("g", { children: [
|
|
63975
|
+
/* @__PURE__ */ jsx("rect", { x: "230", y: "70", width: "120", height: "60", fill: "#1e293b", stroke: "#475569", strokeWidth: "2", rx: "4" }),
|
|
63976
|
+
/* @__PURE__ */ jsx("text", { x: "290", y: "92", textAnchor: "middle", fill: "#94a3b8", fontSize: "11", fontWeight: "600", children: "CODE" }),
|
|
63977
|
+
/* @__PURE__ */ jsx("text", { x: "290", y: "106", textAnchor: "middle", fill: "#64748b", fontSize: "9", children: "system.ts" }),
|
|
63978
|
+
/* @__PURE__ */ jsx("text", { x: "290", y: "120", textAnchor: "middle", fill: "#64748b", fontSize: "9", children: "features.ts" })
|
|
63979
|
+
] }),
|
|
63980
|
+
/* @__PURE__ */ jsxs("g", { children: [
|
|
63981
|
+
/* @__PURE__ */ jsx("line", { x1: "290", y1: "140", x2: "290", y2: "180", stroke: "#3b82f6", strokeWidth: "2", markerEnd: "url(#arrowblue)" }),
|
|
63982
|
+
/* @__PURE__ */ jsx("text", { x: "320", y: "165", fill: "#3b82f6", fontSize: "10", fontWeight: "600", children: "Monitors" })
|
|
63983
|
+
] }),
|
|
63984
|
+
/* @__PURE__ */ jsxs("g", { children: [
|
|
63985
|
+
/* @__PURE__ */ jsx("rect", { x: "230", y: "190", width: "120", height: "45", fill: "#064e3b", stroke: "#059669", strokeWidth: "2", rx: "4" }),
|
|
63986
|
+
/* @__PURE__ */ jsx("text", { x: "290", y: "210", textAnchor: "middle", fill: "#6ee7b7", fontSize: "11", fontWeight: "600", children: "PRODUCTION" }),
|
|
63987
|
+
/* @__PURE__ */ jsx("text", { x: "290", y: "224", textAnchor: "middle", fill: "#a7f3d0", fontSize: "9", children: "Running System" })
|
|
63988
|
+
] }),
|
|
63989
|
+
/* @__PURE__ */ jsxs("g", { children: [
|
|
63990
|
+
/* @__PURE__ */ jsx(
|
|
63991
|
+
"path",
|
|
63992
|
+
{
|
|
63993
|
+
d: "M 360 100 Q 420 100, 420 160 Q 420 220, 360 220",
|
|
63994
|
+
stroke: "#fbbf24",
|
|
63995
|
+
strokeWidth: "2",
|
|
63996
|
+
fill: "none",
|
|
63997
|
+
strokeDasharray: "5,5",
|
|
63998
|
+
markerEnd: "url(#arrowyellow)"
|
|
63999
|
+
}
|
|
64000
|
+
),
|
|
64001
|
+
/* @__PURE__ */ jsx("text", { x: "440", y: "160", fill: "#fbbf24", fontSize: "10", fontWeight: "600", children: "Developer" }),
|
|
64002
|
+
/* @__PURE__ */ jsx("text", { x: "440", y: "172", fill: "#fbbf24", fontSize: "10", fontWeight: "600", children: "Knowledge" }),
|
|
64003
|
+
/* @__PURE__ */ jsx("text", { x: "440", y: "184", fill: "#fbbf24", fontSize: "10", fontWeight: "600", children: "= Monitoring" })
|
|
64004
|
+
] }),
|
|
64005
|
+
/* @__PURE__ */ jsxs("defs", { children: [
|
|
64006
|
+
/* @__PURE__ */ jsx("marker", { id: "arrowgreen", markerWidth: "10", markerHeight: "10", refX: "9", refY: "3", orient: "auto", markerUnits: "strokeWidth", children: /* @__PURE__ */ jsx("path", { d: "M0,0 L0,6 L9,3 z", fill: "#10b981" }) }),
|
|
64007
|
+
/* @__PURE__ */ jsx("marker", { id: "arrowblue", markerWidth: "10", markerHeight: "10", refX: "9", refY: "3", orient: "auto", markerUnits: "strokeWidth", children: /* @__PURE__ */ jsx("path", { d: "M0,0 L0,6 L9,3 z", fill: "#3b82f6" }) }),
|
|
64008
|
+
/* @__PURE__ */ jsx("marker", { id: "arrowyellow", markerWidth: "10", markerHeight: "10", refX: "9", refY: "3", orient: "auto", markerUnits: "strokeWidth", children: /* @__PURE__ */ jsx("path", { d: "M0,0 L0,6 L9,3 z", fill: "#fbbf24" }) })
|
|
64009
|
+
] })
|
|
64010
|
+
] }),
|
|
64011
|
+
/* @__PURE__ */ jsxs("div", { style: {
|
|
64012
|
+
fontSize: "14px",
|
|
64013
|
+
color: "#cbd5e1",
|
|
64014
|
+
backgroundColor: "#1e293b",
|
|
64015
|
+
padding: "16px",
|
|
64016
|
+
borderRadius: "6px",
|
|
64017
|
+
border: "1px solid #475569"
|
|
64018
|
+
}, children: [
|
|
64019
|
+
/* @__PURE__ */ jsx("strong", { children: "Traditional Development:" }),
|
|
64020
|
+
" Engineers built deep system knowledge while writing code. Their expertise was the monitoring system - they could debug because they understood every piece."
|
|
64021
|
+
] })
|
|
64022
|
+
] });
|
|
64023
|
+
};
|
|
64024
|
+
const Step2AgentDevelopment = () => {
|
|
64025
|
+
return /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "16px" }, children: [
|
|
64026
|
+
/* @__PURE__ */ jsxs("svg", { viewBox: "0 0 600 250", style: { width: "100%", height: "auto" }, children: [
|
|
64027
|
+
/* @__PURE__ */ jsxs("g", { children: [
|
|
64028
|
+
/* @__PURE__ */ jsx("circle", { cx: "100", cy: "100", r: "30", fill: "#3b82f6", stroke: "#60a5fa", strokeWidth: "2" }),
|
|
64029
|
+
/* @__PURE__ */ jsx("text", { x: "100", y: "105", textAnchor: "middle", fill: "#fff", fontSize: "28", children: "👨💻" }),
|
|
64030
|
+
/* @__PURE__ */ jsx("text", { x: "100", y: "150", textAnchor: "middle", fill: "#94a3b8", fontSize: "12", fontWeight: "600", children: "DEVELOPER" })
|
|
64031
|
+
] }),
|
|
64032
|
+
/* @__PURE__ */ jsxs("g", { children: [
|
|
64033
|
+
/* @__PURE__ */ jsx("line", { x1: "130", y1: "80", x2: "210", y2: "50", stroke: "#a78bfa", strokeWidth: "2", markerEnd: "url(#arrowpurple)" }),
|
|
64034
|
+
/* @__PURE__ */ jsx("text", { x: "170", y: "55", textAnchor: "middle", fill: "#a78bfa", fontSize: "10", fontWeight: "600", children: "Directs" })
|
|
64035
|
+
] }),
|
|
64036
|
+
/* @__PURE__ */ jsxs("g", { children: [
|
|
64037
|
+
/* @__PURE__ */ jsx("rect", { x: "220", y: "20", width: "100", height: "50", fill: "#4c1d95", stroke: "#a78bfa", strokeWidth: "2", rx: "4" }),
|
|
64038
|
+
/* @__PURE__ */ jsx("text", { x: "270", y: "42", textAnchor: "middle", fill: "#e9d5ff", fontSize: "24", children: "🤖" }),
|
|
64039
|
+
/* @__PURE__ */ jsx("text", { x: "270", y: "63", textAnchor: "middle", fill: "#c4b5fd", fontSize: "10", fontWeight: "600", children: "AI AGENT" })
|
|
64040
|
+
] }),
|
|
64041
|
+
/* @__PURE__ */ jsxs("g", { children: [
|
|
64042
|
+
/* @__PURE__ */ jsx("line", { x1: "270", y1: "80", x2: "270", y2: "120", stroke: "#ef4444", strokeWidth: "2", markerEnd: "url(#arrowred)", strokeDasharray: "5,5" }),
|
|
64043
|
+
/* @__PURE__ */ jsx("text", { x: "300", y: "105", fill: "#ef4444", fontSize: "10", fontWeight: "600", children: "Generates" }),
|
|
64044
|
+
/* @__PURE__ */ jsx("text", { x: "300", y: "117", fill: "#ef4444", fontSize: "9", children: "Without Context" })
|
|
64045
|
+
] }),
|
|
64046
|
+
/* @__PURE__ */ jsxs("g", { children: [
|
|
64047
|
+
/* @__PURE__ */ jsx("rect", { x: "220", y: "130", width: "100", height: "60", fill: "#1e293b", stroke: "#ef4444", strokeWidth: "2", rx: "4" }),
|
|
64048
|
+
/* @__PURE__ */ jsx("text", { x: "270", y: "150", textAnchor: "middle", fill: "#94a3b8", fontSize: "11", fontWeight: "600", children: "CODE" }),
|
|
64049
|
+
/* @__PURE__ */ jsx("text", { x: "270", y: "164", textAnchor: "middle", fill: "#64748b", fontSize: "9", children: "agent-gen.ts" }),
|
|
64050
|
+
/* @__PURE__ */ jsx("text", { x: "270", y: "178", textAnchor: "middle", fill: "#64748b", fontSize: "9", children: "auto-feat.ts" }),
|
|
64051
|
+
/* @__PURE__ */ jsx("text", { x: "245", y: "148", fill: "#ef4444", fontSize: "24", children: "⚠️" })
|
|
64052
|
+
] }),
|
|
64053
|
+
/* @__PURE__ */ jsxs("g", { children: [
|
|
64054
|
+
/* @__PURE__ */ jsx("rect", { x: "380", y: "130", width: "120", height: "60", fill: "#7f1d1d", stroke: "#ef4444", strokeWidth: "2", rx: "4" }),
|
|
64055
|
+
/* @__PURE__ */ jsx("text", { x: "440", y: "152", textAnchor: "middle", fill: "#fca5a5", fontSize: "11", fontWeight: "600", children: "PRODUCTION" }),
|
|
64056
|
+
/* @__PURE__ */ jsx("text", { x: "440", y: "166", textAnchor: "middle", fill: "#fca5a5", fontSize: "9", children: "Unknown Behavior" }),
|
|
64057
|
+
/* @__PURE__ */ jsx("text", { x: "440", y: "180", textAnchor: "middle", fill: "#fca5a5", fontSize: "9", children: "No Understanding" })
|
|
64058
|
+
] }),
|
|
64059
|
+
/* @__PURE__ */ jsxs("g", { children: [
|
|
64060
|
+
/* @__PURE__ */ jsx("line", { x1: "330", y1: "160", x2: "370", y2: "160", stroke: "#64748b", strokeWidth: "2", markerEnd: "url(#arrowgray)" }),
|
|
64061
|
+
/* @__PURE__ */ jsx("text", { x: "350", y: "150", textAnchor: "middle", fill: "#64748b", fontSize: "9", children: "Deploy" })
|
|
64062
|
+
] }),
|
|
64063
|
+
/* @__PURE__ */ jsxs("g", { children: [
|
|
64064
|
+
/* @__PURE__ */ jsx(
|
|
64065
|
+
"path",
|
|
64066
|
+
{
|
|
64067
|
+
d: "M 100 130 Q 100 200, 440 200",
|
|
64068
|
+
stroke: "#ef4444",
|
|
64069
|
+
strokeWidth: "3",
|
|
64070
|
+
fill: "none",
|
|
64071
|
+
strokeDasharray: "5,5"
|
|
64072
|
+
}
|
|
64073
|
+
),
|
|
64074
|
+
/* @__PURE__ */ jsx("text", { x: "70", y: "225", fill: "#ef4444", fontSize: "11", fontWeight: "700", children: "❌ KNOWLEDGE GAP" }),
|
|
64075
|
+
/* @__PURE__ */ jsx("text", { x: "240", y: "225", fill: "#ef4444", fontSize: "9", children: "Developer didn't build it = No debugging context" })
|
|
64076
|
+
] }),
|
|
64077
|
+
/* @__PURE__ */ jsxs("defs", { children: [
|
|
64078
|
+
/* @__PURE__ */ jsx("marker", { id: "arrowpurple", markerWidth: "10", markerHeight: "10", refX: "9", refY: "3", orient: "auto", markerUnits: "strokeWidth", children: /* @__PURE__ */ jsx("path", { d: "M0,0 L0,6 L9,3 z", fill: "#a78bfa" }) }),
|
|
64079
|
+
/* @__PURE__ */ jsx("marker", { id: "arrowred", markerWidth: "10", markerHeight: "10", refX: "9", refY: "3", orient: "auto", markerUnits: "strokeWidth", children: /* @__PURE__ */ jsx("path", { d: "M0,0 L0,6 L9,3 z", fill: "#ef4444" }) }),
|
|
64080
|
+
/* @__PURE__ */ jsx("marker", { id: "arrowgray", markerWidth: "10", markerHeight: "10", refX: "9", refY: "3", orient: "auto", markerUnits: "strokeWidth", children: /* @__PURE__ */ jsx("path", { d: "M0,0 L0,6 L9,3 z", fill: "#64748b" }) })
|
|
64081
|
+
] })
|
|
64082
|
+
] }),
|
|
64083
|
+
/* @__PURE__ */ jsxs("div", { style: {
|
|
64084
|
+
fontSize: "14px",
|
|
64085
|
+
color: "#fca5a5",
|
|
64086
|
+
backgroundColor: "#7f1d1d",
|
|
64087
|
+
padding: "16px",
|
|
64088
|
+
borderRadius: "6px",
|
|
64089
|
+
border: "1px solid #ef4444"
|
|
64090
|
+
}, children: [
|
|
64091
|
+
/* @__PURE__ */ jsx("strong", { children: "The Agent Gap:" }),
|
|
64092
|
+
" AI generates code without building developer understanding. When issues arise in production, there's no expertise to rely on. Traditional monitoring can't fill this gap."
|
|
64093
|
+
] })
|
|
64094
|
+
] });
|
|
64095
|
+
};
|
|
64096
|
+
const Step3TheGap = () => {
|
|
64097
|
+
return /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "16px" }, children: [
|
|
64098
|
+
/* @__PURE__ */ jsxs("svg", { viewBox: "0 0 600 320", style: { width: "100%", height: "auto" }, children: [
|
|
64099
|
+
/* @__PURE__ */ jsx("text", { x: "300", y: "25", textAnchor: "middle", fill: "#94a3b8", fontSize: "14", fontWeight: "700", children: "THE MONITORING GAP" }),
|
|
64100
|
+
/* @__PURE__ */ jsxs("g", { children: [
|
|
64101
|
+
/* @__PURE__ */ jsx("rect", { x: "40", y: "50", width: "220", height: "250", fill: "#1e293b", stroke: "#475569", strokeWidth: "2", rx: "6" }),
|
|
64102
|
+
/* @__PURE__ */ jsx("text", { x: "150", y: "75", textAnchor: "middle", fill: "#10b981", fontSize: "12", fontWeight: "600", children: "TRADITIONAL (Before)" }),
|
|
64103
|
+
/* @__PURE__ */ jsx("rect", { x: "60", y: "90", width: "180", height: "50", fill: "#064e3b", stroke: "#059669", strokeWidth: "1.5", rx: "4" }),
|
|
64104
|
+
/* @__PURE__ */ jsx("text", { x: "150", y: "108", textAnchor: "middle", fill: "#6ee7b7", fontSize: "11", fontWeight: "600", children: "Developer Expertise" }),
|
|
64105
|
+
/* @__PURE__ */ jsx("text", { x: "150", y: "122", textAnchor: "middle", fill: "#a7f3d0", fontSize: "9", children: "Built while coding" }),
|
|
64106
|
+
/* @__PURE__ */ jsx("text", { x: "150", y: "133", textAnchor: "middle", fill: "#a7f3d0", fontSize: "9", children: "Deep system knowledge" }),
|
|
64107
|
+
/* @__PURE__ */ jsx("text", { x: "150", y: "160", textAnchor: "middle", fill: "#94a3b8", fontSize: "10", children: "+" }),
|
|
64108
|
+
/* @__PURE__ */ jsx("rect", { x: "60", y: "170", width: "180", height: "45", fill: "#0f172a", stroke: "#334155", strokeWidth: "1.5", rx: "4" }),
|
|
64109
|
+
/* @__PURE__ */ jsx("text", { x: "150", y: "188", textAnchor: "middle", fill: "#94a3b8", fontSize: "11", fontWeight: "600", children: "Basic Monitoring" }),
|
|
64110
|
+
/* @__PURE__ */ jsx("text", { x: "150", y: "202", textAnchor: "middle", fill: "#64748b", fontSize: "9", children: "Logs, metrics, traces" }),
|
|
64111
|
+
/* @__PURE__ */ jsx("text", { x: "150", y: "235", textAnchor: "middle", fill: "#10b981", fontSize: "11", children: "=" }),
|
|
64112
|
+
/* @__PURE__ */ jsx("rect", { x: "60", y: "245", width: "180", height: "40", fill: "#064e3b", stroke: "#059669", strokeWidth: "2", rx: "4" }),
|
|
64113
|
+
/* @__PURE__ */ jsx("text", { x: "150", y: "264", textAnchor: "middle", fill: "#6ee7b7", fontSize: "11", fontWeight: "700", children: "✓ Effective Monitoring" }),
|
|
64114
|
+
/* @__PURE__ */ jsx("text", { x: "150", y: "277", textAnchor: "middle", fill: "#a7f3d0", fontSize: "9", children: "Human knowledge filled gaps" })
|
|
64115
|
+
] }),
|
|
64116
|
+
/* @__PURE__ */ jsxs("g", { children: [
|
|
64117
|
+
/* @__PURE__ */ jsx("rect", { x: "340", y: "50", width: "220", height: "250", fill: "#1e293b", stroke: "#475569", strokeWidth: "2", rx: "6" }),
|
|
64118
|
+
/* @__PURE__ */ jsx("text", { x: "450", y: "75", textAnchor: "middle", fill: "#ef4444", fontSize: "12", fontWeight: "600", children: "AI-ERA (Now)" }),
|
|
64119
|
+
/* @__PURE__ */ jsx("rect", { x: "360", y: "90", width: "180", height: "50", fill: "#7f1d1d", stroke: "#ef4444", strokeWidth: "1.5", rx: "4" }),
|
|
64120
|
+
/* @__PURE__ */ jsx("text", { x: "450", y: "108", textAnchor: "middle", fill: "#fca5a5", fontSize: "11", fontWeight: "600", children: "❌ No Expertise" }),
|
|
64121
|
+
/* @__PURE__ */ jsx("text", { x: "450", y: "122", textAnchor: "middle", fill: "#fca5a5", fontSize: "9", children: "AI wrote the code" }),
|
|
64122
|
+
/* @__PURE__ */ jsx("text", { x: "450", y: "133", textAnchor: "middle", fill: "#fca5a5", fontSize: "9", children: "Developer has no context" }),
|
|
64123
|
+
/* @__PURE__ */ jsx("text", { x: "450", y: "160", textAnchor: "middle", fill: "#94a3b8", fontSize: "10", children: "+" }),
|
|
64124
|
+
/* @__PURE__ */ jsx("rect", { x: "360", y: "170", width: "180", height: "45", fill: "#0f172a", stroke: "#334155", strokeWidth: "1.5", rx: "4" }),
|
|
64125
|
+
/* @__PURE__ */ jsx("text", { x: "450", y: "188", textAnchor: "middle", fill: "#94a3b8", fontSize: "11", fontWeight: "600", children: "Basic Monitoring" }),
|
|
64126
|
+
/* @__PURE__ */ jsx("text", { x: "450", y: "202", textAnchor: "middle", fill: "#64748b", fontSize: "9", children: "Same logs, metrics, traces" }),
|
|
64127
|
+
/* @__PURE__ */ jsx("text", { x: "450", y: "235", textAnchor: "middle", fill: "#ef4444", fontSize: "11", children: "=" }),
|
|
64128
|
+
/* @__PURE__ */ jsx("rect", { x: "360", y: "245", width: "180", height: "40", fill: "#7f1d1d", stroke: "#ef4444", strokeWidth: "2", rx: "4" }),
|
|
64129
|
+
/* @__PURE__ */ jsx("text", { x: "450", y: "264", textAnchor: "middle", fill: "#fca5a5", fontSize: "11", fontWeight: "700", children: "❌ Monitoring Gap" }),
|
|
64130
|
+
/* @__PURE__ */ jsx("text", { x: "450", y: "277", textAnchor: "middle", fill: "#fca5a5", fontSize: "9", children: "No knowledge to fill gaps" })
|
|
64131
|
+
] }),
|
|
64132
|
+
/* @__PURE__ */ jsxs("g", { children: [
|
|
64133
|
+
/* @__PURE__ */ jsx("path", { d: "M 280 200 L 320 200", stroke: "#fbbf24", strokeWidth: "3", markerEnd: "url(#arrowyellow2)" }),
|
|
64134
|
+
/* @__PURE__ */ jsx("text", { x: "300", y: "190", textAnchor: "middle", fill: "#fbbf24", fontSize: "11", fontWeight: "700", children: "THE GAP" })
|
|
64135
|
+
] }),
|
|
64136
|
+
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("marker", { id: "arrowyellow2", markerWidth: "10", markerHeight: "10", refX: "9", refY: "3", orient: "auto", markerUnits: "strokeWidth", children: /* @__PURE__ */ jsx("path", { d: "M0,0 L0,6 L9,3 z", fill: "#fbbf24" }) }) })
|
|
64137
|
+
] }),
|
|
64138
|
+
/* @__PURE__ */ jsxs("div", { style: {
|
|
64139
|
+
fontSize: "14px",
|
|
64140
|
+
color: "#fef3c7",
|
|
64141
|
+
backgroundColor: "#78350f",
|
|
64142
|
+
padding: "16px",
|
|
64143
|
+
borderRadius: "6px",
|
|
64144
|
+
border: "2px solid #fbbf24"
|
|
64145
|
+
}, children: [
|
|
64146
|
+
/* @__PURE__ */ jsx("strong", { children: "The Critical Gap:" }),
|
|
64147
|
+
" Traditional monitoring worked because developer expertise filled the gaps. With AI agents, that expertise is missing. ",
|
|
64148
|
+
/* @__PURE__ */ jsx("strong", { children: "We need tools to encapsulate what was once in developers' heads." })
|
|
64149
|
+
] })
|
|
64150
|
+
] });
|
|
64151
|
+
};
|
|
64152
|
+
const Step4ImplicationsDevelopers = () => {
|
|
64153
|
+
return /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "16px" }, children: [
|
|
64154
|
+
/* @__PURE__ */ jsxs("svg", { viewBox: "0 0 600 280", style: { width: "100%", height: "auto" }, children: [
|
|
64155
|
+
/* @__PURE__ */ jsx("text", { x: "300", y: "25", textAnchor: "middle", fill: "#94a3b8", fontSize: "14", fontWeight: "700", children: "WHAT THIS MEANS FOR DEVELOPERS" }),
|
|
64156
|
+
/* @__PURE__ */ jsxs("g", { children: [
|
|
64157
|
+
/* @__PURE__ */ jsx("rect", { x: "40", y: "50", width: "250", height: "100", fill: "#1e293b", stroke: "#60a5fa", strokeWidth: "2", rx: "6" }),
|
|
64158
|
+
/* @__PURE__ */ jsx("text", { x: "165", y: "72", textAnchor: "middle", fill: "#60a5fa", fontSize: "12", fontWeight: "700", children: "Every Engineer = Team Lead" }),
|
|
64159
|
+
/* @__PURE__ */ jsx("text", { x: "50", y: "92", fill: "#94a3b8", fontSize: "10", children: "✓ Manages AI agents making changes" }),
|
|
64160
|
+
/* @__PURE__ */ jsx("text", { x: "50", y: "108", fill: "#94a3b8", fontSize: "10", children: "✓ Reviews agent-generated code" }),
|
|
64161
|
+
/* @__PURE__ */ jsx("text", { x: "50", y: "124", fill: "#94a3b8", fontSize: "10", children: "✓ Ensures quality & correctness" }),
|
|
64162
|
+
/* @__PURE__ */ jsx("text", { x: "50", y: "140", fill: "#10b981", fontSize: "10", fontWeight: "600", children: "→ Time shifts from coding to oversight" })
|
|
64163
|
+
] }),
|
|
64164
|
+
/* @__PURE__ */ jsxs("g", { children: [
|
|
64165
|
+
/* @__PURE__ */ jsx("rect", { x: "310", y: "50", width: "250", height: "100", fill: "#7f1d1d", stroke: "#ef4444", strokeWidth: "2", rx: "6" }),
|
|
64166
|
+
/* @__PURE__ */ jsx("text", { x: "435", y: "72", textAnchor: "middle", fill: "#fca5a5", fontSize: "12", fontWeight: "700", children: "The Challenge" }),
|
|
64167
|
+
/* @__PURE__ */ jsx("text", { x: "320", y: "92", fill: "#fca5a5", fontSize: "10", children: "❌ Can't fully trust agent output" }),
|
|
64168
|
+
/* @__PURE__ */ jsx("text", { x: "320", y: "108", fill: "#fca5a5", fontSize: "10", children: "❌ No context for debugging issues" }),
|
|
64169
|
+
/* @__PURE__ */ jsx("text", { x: "320", y: "124", fill: "#fca5a5", fontSize: "10", children: "❌ Traditional tools don't help" }),
|
|
64170
|
+
/* @__PURE__ */ jsx("text", { x: "320", y: "140", fill: "#fca5a5", fontSize: "10", fontWeight: "600", children: "→ Can't leverage agents without risk" })
|
|
64171
|
+
] }),
|
|
64172
|
+
/* @__PURE__ */ jsxs("g", { children: [
|
|
64173
|
+
/* @__PURE__ */ jsx("rect", { x: "40", y: "170", width: "520", height: "90", fill: "#064e3b", stroke: "#10b981", strokeWidth: "3", rx: "6" }),
|
|
64174
|
+
/* @__PURE__ */ jsx("text", { x: "300", y: "195", textAnchor: "middle", fill: "#6ee7b7", fontSize: "13", fontWeight: "700", children: "WHAT DEVELOPERS NEED" }),
|
|
64175
|
+
/* @__PURE__ */ jsxs("text", { x: "60", y: "218", fill: "#a7f3d0", fontSize: "11", children: [
|
|
64176
|
+
"1. ",
|
|
64177
|
+
/* @__PURE__ */ jsx("tspan", { fontWeight: "600", children: "Encode Expectations:" }),
|
|
64178
|
+
" Define what the system should do"
|
|
64179
|
+
] }),
|
|
64180
|
+
/* @__PURE__ */ jsxs("text", { x: "60", y: "235", fill: "#a7f3d0", fontSize: "11", children: [
|
|
64181
|
+
"2. ",
|
|
64182
|
+
/* @__PURE__ */ jsx("tspan", { fontWeight: "600", children: "Automatic Validation:" }),
|
|
64183
|
+
" Verify agent changes against expectations"
|
|
64184
|
+
] }),
|
|
64185
|
+
/* @__PURE__ */ jsxs("text", { x: "60", y: "252", fill: "#a7f3d0", fontSize: "11", children: [
|
|
64186
|
+
"3. ",
|
|
64187
|
+
/* @__PURE__ */ jsx("tspan", { fontWeight: "600", children: "Confidence to Deploy:" }),
|
|
64188
|
+
" Trust that agents' work is correct"
|
|
64189
|
+
] })
|
|
64190
|
+
] })
|
|
64191
|
+
] }),
|
|
64192
|
+
/* @__PURE__ */ jsxs("div", { style: {
|
|
64193
|
+
fontSize: "14px",
|
|
64194
|
+
color: "#cbd5e1",
|
|
64195
|
+
backgroundColor: "#1e293b",
|
|
64196
|
+
padding: "16px",
|
|
64197
|
+
borderRadius: "6px",
|
|
64198
|
+
border: "1px solid #475569"
|
|
64199
|
+
}, children: [
|
|
64200
|
+
/* @__PURE__ */ jsx("strong", { children: "The Opportunity:" }),
|
|
64201
|
+
" Developers have time to craft system expectations instead of writing every line. They need tools that turn those expectations into automated verification - making agent work trustworthy."
|
|
64202
|
+
] })
|
|
64203
|
+
] });
|
|
64204
|
+
};
|
|
64205
|
+
const AgentMonitoringGapExplainerPanel = ({
|
|
64206
|
+
className
|
|
64207
|
+
}) => {
|
|
64208
|
+
var _a;
|
|
64209
|
+
const [activeSection, setActiveSection] = useState("traditional");
|
|
64210
|
+
const sections2 = [
|
|
64211
|
+
{ id: "traditional", title: "Traditional Development", component: Step1TraditionalDevelopment },
|
|
64212
|
+
{ id: "agent-era", title: "Agent Era", component: Step2AgentDevelopment },
|
|
64213
|
+
{ id: "the-gap", title: "The Gap", component: Step3TheGap },
|
|
64214
|
+
{ id: "implications", title: "What Developers Need", component: Step4ImplicationsDevelopers }
|
|
64215
|
+
];
|
|
64216
|
+
const ActiveComponent = ((_a = sections2.find((s) => s.id === activeSection)) == null ? void 0 : _a.component) || Step1TraditionalDevelopment;
|
|
64217
|
+
return /* @__PURE__ */ jsxs("div", { className, style: {
|
|
64218
|
+
backgroundColor: "#0f172a",
|
|
64219
|
+
color: "#cbd5e1",
|
|
64220
|
+
padding: "24px",
|
|
64221
|
+
fontFamily: "system-ui, -apple-system, sans-serif",
|
|
64222
|
+
minHeight: "100vh"
|
|
64223
|
+
}, children: [
|
|
64224
|
+
/* @__PURE__ */ jsxs("div", { style: { marginBottom: "24px" }, children: [
|
|
64225
|
+
/* @__PURE__ */ jsx("h1", { style: {
|
|
64226
|
+
fontSize: "24px",
|
|
64227
|
+
fontWeight: "700",
|
|
64228
|
+
color: "#f1f5f9",
|
|
64229
|
+
marginBottom: "8px"
|
|
64230
|
+
}, children: "The Agent Monitoring Gap" }),
|
|
64231
|
+
/* @__PURE__ */ jsx("p", { style: {
|
|
64232
|
+
fontSize: "14px",
|
|
64233
|
+
color: "#94a3b8",
|
|
64234
|
+
margin: 0
|
|
64235
|
+
}, children: "Why traditional monitoring fails with AI-generated code" })
|
|
64236
|
+
] }),
|
|
64237
|
+
/* @__PURE__ */ jsx("div", { style: {
|
|
64238
|
+
display: "flex",
|
|
64239
|
+
gap: "8px",
|
|
64240
|
+
marginBottom: "24px",
|
|
64241
|
+
borderBottom: "1px solid #334155",
|
|
64242
|
+
paddingBottom: "12px"
|
|
64243
|
+
}, children: sections2.map((section) => /* @__PURE__ */ jsx(
|
|
64244
|
+
"button",
|
|
64245
|
+
{
|
|
64246
|
+
onClick: () => setActiveSection(section.id),
|
|
64247
|
+
style: {
|
|
64248
|
+
padding: "8px 16px",
|
|
64249
|
+
backgroundColor: activeSection === section.id ? "#3b82f6" : "#1e293b",
|
|
64250
|
+
color: activeSection === section.id ? "#fff" : "#94a3b8",
|
|
64251
|
+
border: "1px solid",
|
|
64252
|
+
borderColor: activeSection === section.id ? "#60a5fa" : "#334155",
|
|
64253
|
+
borderRadius: "6px",
|
|
64254
|
+
cursor: "pointer",
|
|
64255
|
+
fontSize: "13px",
|
|
64256
|
+
fontWeight: activeSection === section.id ? "600" : "400",
|
|
64257
|
+
transition: "all 0.2s"
|
|
64258
|
+
},
|
|
64259
|
+
children: section.title
|
|
64260
|
+
},
|
|
64261
|
+
section.id
|
|
64262
|
+
)) }),
|
|
64263
|
+
/* @__PURE__ */ jsx("div", { style: {
|
|
64264
|
+
backgroundColor: "#1e293b",
|
|
64265
|
+
borderRadius: "8px",
|
|
64266
|
+
padding: "24px",
|
|
64267
|
+
border: "1px solid #334155"
|
|
64268
|
+
}, children: /* @__PURE__ */ jsx(ActiveComponent, {}) })
|
|
64269
|
+
] });
|
|
64270
|
+
};
|
|
64271
|
+
const Step1WhatAreStories = () => {
|
|
64272
|
+
return /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "16px" }, children: [
|
|
64273
|
+
/* @__PURE__ */ jsxs("svg", { viewBox: "0 0 600 240", style: { width: "100%", height: "auto" }, children: [
|
|
64274
|
+
/* @__PURE__ */ jsx("text", { x: "300", y: "25", textAnchor: "middle", fill: "#94a3b8", fontSize: "14", fontWeight: "700", children: "STORIES = HOW HUMANS UNDERSTAND SYSTEMS" }),
|
|
64275
|
+
/* @__PURE__ */ jsxs("g", { children: [
|
|
64276
|
+
/* @__PURE__ */ jsx("rect", { x: "40", y: "50", width: "240", height: "170", fill: "#1e293b", stroke: "#ef4444", strokeWidth: "2", rx: "6" }),
|
|
64277
|
+
/* @__PURE__ */ jsx("text", { x: "160", y: "73", textAnchor: "middle", fill: "#fca5a5", fontSize: "12", fontWeight: "700", children: "❌ Traditional Monitoring" }),
|
|
64278
|
+
/* @__PURE__ */ jsx("rect", { x: "60", y: "85", width: "200", height: "120", fill: "#0f172a", stroke: "#334155", strokeWidth: "1.5", rx: "4" }),
|
|
64279
|
+
/* @__PURE__ */ jsx("text", { x: "160", y: "100", textAnchor: "middle", fill: "#64748b", fontSize: "9", fontFamily: "monospace", children: "span.duration = 1234ms" }),
|
|
64280
|
+
/* @__PURE__ */ jsx("text", { x: "160", y: "115", textAnchor: "middle", fill: "#64748b", fontSize: "9", fontFamily: "monospace", children: "http.status_code = 200" }),
|
|
64281
|
+
/* @__PURE__ */ jsx("text", { x: "160", y: "130", textAnchor: "middle", fill: "#64748b", fontSize: "9", fontFamily: "monospace", children: "db.query.count = 12" }),
|
|
64282
|
+
/* @__PURE__ */ jsx("text", { x: "160", y: "145", textAnchor: "middle", fill: "#64748b", fontSize: "9", fontFamily: "monospace", children: 'event.type = "order.created"' }),
|
|
64283
|
+
/* @__PURE__ */ jsx("text", { x: "160", y: "160", textAnchor: "middle", fill: "#64748b", fontSize: "9", fontFamily: "monospace", children: 'trace.id = "abc123..."' }),
|
|
64284
|
+
/* @__PURE__ */ jsx("text", { x: "160", y: "175", textAnchor: "middle", fill: "#64748b", fontSize: "9", fontFamily: "monospace", children: "error.count = 0" }),
|
|
64285
|
+
/* @__PURE__ */ jsx("text", { x: "160", y: "190", textAnchor: "middle", fill: "#64748b", fontSize: "9", fontFamily: "monospace", children: "..." }),
|
|
64286
|
+
/* @__PURE__ */ jsx("text", { x: "160", y: "215", textAnchor: "middle", fill: "#fca5a5", fontSize: "10", fontStyle: "italic", children: "Needle in haystack" })
|
|
64287
|
+
] }),
|
|
64288
|
+
/* @__PURE__ */ jsxs("g", { children: [
|
|
64289
|
+
/* @__PURE__ */ jsx("line", { x1: "290", y1: "135", x2: "310", y2: "135", stroke: "#3b82f6", strokeWidth: "2", markerEnd: "url(#arrowblue)" }),
|
|
64290
|
+
/* @__PURE__ */ jsx("text", { x: "300", y: "127", textAnchor: "middle", fill: "#3b82f6", fontSize: "10", fontWeight: "600", children: "vs" })
|
|
64291
|
+
] }),
|
|
64292
|
+
/* @__PURE__ */ jsxs("g", { children: [
|
|
64293
|
+
/* @__PURE__ */ jsx("rect", { x: "320", y: "50", width: "240", height: "170", fill: "#064e3b", stroke: "#10b981", strokeWidth: "2", rx: "6" }),
|
|
64294
|
+
/* @__PURE__ */ jsx("text", { x: "440", y: "73", textAnchor: "middle", fill: "#6ee7b7", fontSize: "12", fontWeight: "700", children: "✓ System Stories" }),
|
|
64295
|
+
/* @__PURE__ */ jsx("rect", { x: "340", y: "85", width: "200", height: "120", fill: "#022c22", stroke: "#059669", strokeWidth: "1.5", rx: "4" }),
|
|
64296
|
+
/* @__PURE__ */ jsx("text", { x: "440", y: "103", textAnchor: "middle", fill: "#d1fae5", fontSize: "11", fontWeight: "600", children: 'Story: "User Checkout"' }),
|
|
64297
|
+
/* @__PURE__ */ jsx("text", { x: "350", y: "120", fill: "#a7f3d0", fontSize: "9", children: "When user completes checkout:" }),
|
|
64298
|
+
/* @__PURE__ */ jsx("text", { x: "355", y: "135", fill: "#a7f3d0", fontSize: "9", children: "• Payment processes in <2s" }),
|
|
64299
|
+
/* @__PURE__ */ jsx("text", { x: "355", y: "148", fill: "#a7f3d0", fontSize: "9", children: "• Order confirmation sent" }),
|
|
64300
|
+
/* @__PURE__ */ jsx("text", { x: "355", y: "161", fill: "#a7f3d0", fontSize: "9", children: "• Inventory decremented" }),
|
|
64301
|
+
/* @__PURE__ */ jsx("text", { x: "355", y: "174", fill: "#a7f3d0", fontSize: "9", children: "• Analytics event fired" }),
|
|
64302
|
+
/* @__PURE__ */ jsx("text", { x: "355", y: "187", fill: "#a7f3d0", fontSize: "9", children: "• User redirected to success" }),
|
|
64303
|
+
/* @__PURE__ */ jsx("text", { x: "440", y: "215", textAnchor: "middle", fill: "#6ee7b7", fontSize: "10", fontStyle: "italic", children: "Human-readable expectations" })
|
|
64304
|
+
] }),
|
|
64305
|
+
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("marker", { id: "arrowblue", markerWidth: "10", markerHeight: "10", refX: "9", refY: "3", orient: "auto", markerUnits: "strokeWidth", children: /* @__PURE__ */ jsx("path", { d: "M0,0 L0,6 L9,3 z", fill: "#3b82f6" }) }) })
|
|
64306
|
+
] }),
|
|
64307
|
+
/* @__PURE__ */ jsxs("div", { style: {
|
|
64308
|
+
fontSize: "14px",
|
|
64309
|
+
color: "#d1fae5",
|
|
64310
|
+
backgroundColor: "#064e3b",
|
|
64311
|
+
padding: "16px",
|
|
64312
|
+
borderRadius: "6px",
|
|
64313
|
+
border: "1px solid #059669"
|
|
64314
|
+
}, children: [
|
|
64315
|
+
/* @__PURE__ */ jsx("strong", { children: "Stories work because:" }),
|
|
64316
|
+
' Humans naturally think in narratives, not metrics. "User checkout should take <2s and send confirmation" is clearer than tracking 50 telemetry signals.'
|
|
64317
|
+
] })
|
|
64318
|
+
] });
|
|
64319
|
+
};
|
|
64320
|
+
const Step2HowStoriesWork = () => {
|
|
64321
|
+
return /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "16px" }, children: [
|
|
64322
|
+
/* @__PURE__ */ jsxs("svg", { viewBox: "0 0 600 280", style: { width: "100%", height: "auto" }, children: [
|
|
64323
|
+
/* @__PURE__ */ jsxs("g", { children: [
|
|
64324
|
+
/* @__PURE__ */ jsx("rect", { x: "30", y: "30", width: "180", height: "80", fill: "#1e293b", stroke: "#60a5fa", strokeWidth: "2", rx: "6" }),
|
|
64325
|
+
/* @__PURE__ */ jsx("text", { x: "120", y: "52", textAnchor: "middle", fill: "#60a5fa", fontSize: "11", fontWeight: "700", children: "1. DEFINE STORY" }),
|
|
64326
|
+
/* @__PURE__ */ jsx("text", { x: "40", y: "70", fill: "#cbd5e1", fontSize: "9", children: 'Story: "Payment Flow"' }),
|
|
64327
|
+
/* @__PURE__ */ jsx("text", { x: "45", y: "84", fill: "#94a3b8", fontSize: "8", children: "Expected behavior:" }),
|
|
64328
|
+
/* @__PURE__ */ jsx("text", { x: "50", y: "96", fill: "#94a3b8", fontSize: "8", children: "• Charge succeeds" }),
|
|
64329
|
+
/* @__PURE__ */ jsx("text", { x: "50", y: "105", fill: "#94a3b8", fontSize: "8", children: "• Receipt generated" })
|
|
64330
|
+
] }),
|
|
64331
|
+
/* @__PURE__ */ jsxs("g", { children: [
|
|
64332
|
+
/* @__PURE__ */ jsx("line", { x1: "220", y1: "70", x2: "270", y2: "70", stroke: "#10b981", strokeWidth: "2", markerEnd: "url(#arrowgreen)" }),
|
|
64333
|
+
/* @__PURE__ */ jsx("text", { x: "245", y: "65", textAnchor: "middle", fill: "#10b981", fontSize: "9", children: "Maps to" })
|
|
64334
|
+
] }),
|
|
64335
|
+
/* @__PURE__ */ jsxs("g", { children: [
|
|
64336
|
+
/* @__PURE__ */ jsx("rect", { x: "280", y: "30", width: "180", height: "80", fill: "#0f172a", stroke: "#6366f1", strokeWidth: "2", rx: "6" }),
|
|
64337
|
+
/* @__PURE__ */ jsx("text", { x: "370", y: "52", textAnchor: "middle", fill: "#a78bfa", fontSize: "11", fontWeight: "700", children: "2. TELEMETRY SIGNALS" }),
|
|
64338
|
+
/* @__PURE__ */ jsx("text", { x: "290", y: "70", fill: "#c4b5fd", fontSize: "8", fontFamily: "monospace", children: 'span: "ProcessPayment"' }),
|
|
64339
|
+
/* @__PURE__ */ jsx("text", { x: "290", y: "82", fill: "#c4b5fd", fontSize: "8", fontFamily: "monospace", children: 'event: "payment.success"' }),
|
|
64340
|
+
/* @__PURE__ */ jsx("text", { x: "290", y: "94", fill: "#c4b5fd", fontSize: "8", fontFamily: "monospace", children: 'event: "receipt.generated"' }),
|
|
64341
|
+
/* @__PURE__ */ jsx("text", { x: "290", y: "106", fill: "#c4b5fd", fontSize: "8", fontFamily: "monospace", children: "attr: amount, customer_id" })
|
|
64342
|
+
] }),
|
|
64343
|
+
/* @__PURE__ */ jsxs("g", { children: [
|
|
64344
|
+
/* @__PURE__ */ jsx("line", { x1: "370", y1: "120", x2: "370", y2: "160", stroke: "#fbbf24", strokeWidth: "2", markerEnd: "url(#arrowyellow)" }),
|
|
64345
|
+
/* @__PURE__ */ jsx("text", { x: "400", y: "145", fill: "#fbbf24", fontSize: "9", children: "Monitors" })
|
|
64346
|
+
] }),
|
|
64347
|
+
/* @__PURE__ */ jsxs("g", { children: [
|
|
64348
|
+
/* @__PURE__ */ jsx("rect", { x: "280", y: "170", width: "180", height: "80", fill: "#064e3b", stroke: "#059669", strokeWidth: "2", rx: "6" }),
|
|
64349
|
+
/* @__PURE__ */ jsx("text", { x: "370", y: "192", textAnchor: "middle", fill: "#6ee7b7", fontSize: "11", fontWeight: "700", children: "3. PRODUCTION SYSTEM" }),
|
|
64350
|
+
/* @__PURE__ */ jsx("text", { x: "290", y: "210", fill: "#a7f3d0", fontSize: "9", children: "Real telemetry events" }),
|
|
64351
|
+
/* @__PURE__ */ jsx("text", { x: "290", y: "224", fill: "#a7f3d0", fontSize: "9", children: "flowing from system" }),
|
|
64352
|
+
/* @__PURE__ */ jsx("text", { x: "290", y: "238", fill: "#10b981", fontSize: "9", fontWeight: "600", children: "✓ Story validated in real-time" })
|
|
64353
|
+
] }),
|
|
64354
|
+
/* @__PURE__ */ jsxs("g", { children: [
|
|
64355
|
+
/* @__PURE__ */ jsx(
|
|
64356
|
+
"path",
|
|
64357
|
+
{
|
|
64358
|
+
d: "M 270 210 Q 120 210, 120 120",
|
|
64359
|
+
stroke: "#3b82f6",
|
|
64360
|
+
strokeWidth: "2",
|
|
64361
|
+
fill: "none",
|
|
64362
|
+
strokeDasharray: "5,5",
|
|
64363
|
+
markerEnd: "url(#arrowblue2)"
|
|
64364
|
+
}
|
|
64365
|
+
),
|
|
64366
|
+
/* @__PURE__ */ jsx("text", { x: "180", y: "230", fill: "#3b82f6", fontSize: "9", children: "Alert if story breaks" })
|
|
64367
|
+
] }),
|
|
64368
|
+
/* @__PURE__ */ jsxs("g", { children: [
|
|
64369
|
+
/* @__PURE__ */ jsx("circle", { cx: "120", cy: "195", r: "25", fill: "#3b82f6", stroke: "#60a5fa", strokeWidth: "2" }),
|
|
64370
|
+
/* @__PURE__ */ jsx("text", { x: "120", y: "200", textAnchor: "middle", fill: "#fff", fontSize: "20", children: "👨💻" }),
|
|
64371
|
+
/* @__PURE__ */ jsx("text", { x: "120", y: "235", textAnchor: "middle", fill: "#94a3b8", fontSize: "9", fontWeight: "600", children: "ENGINEER" }),
|
|
64372
|
+
/* @__PURE__ */ jsx("text", { x: "120", y: "247", textAnchor: "middle", fill: "#10b981", fontSize: "8", children: "Gets alerts" })
|
|
64373
|
+
] }),
|
|
64374
|
+
/* @__PURE__ */ jsxs("defs", { children: [
|
|
64375
|
+
/* @__PURE__ */ jsx("marker", { id: "arrowgreen", markerWidth: "10", markerHeight: "10", refX: "9", refY: "3", orient: "auto", markerUnits: "strokeWidth", children: /* @__PURE__ */ jsx("path", { d: "M0,0 L0,6 L9,3 z", fill: "#10b981" }) }),
|
|
64376
|
+
/* @__PURE__ */ jsx("marker", { id: "arrowyellow", markerWidth: "10", markerHeight: "10", refX: "9", refY: "3", orient: "auto", markerUnits: "strokeWidth", children: /* @__PURE__ */ jsx("path", { d: "M0,0 L0,6 L9,3 z", fill: "#fbbf24" }) }),
|
|
64377
|
+
/* @__PURE__ */ jsx("marker", { id: "arrowblue2", markerWidth: "10", markerHeight: "10", refX: "9", refY: "3", orient: "auto", markerUnits: "strokeWidth", children: /* @__PURE__ */ jsx("path", { d: "M0,0 L0,6 L9,3 z", fill: "#3b82f6" }) })
|
|
64378
|
+
] })
|
|
64379
|
+
] }),
|
|
64380
|
+
/* @__PURE__ */ jsxs("div", { style: {
|
|
64381
|
+
fontSize: "14px",
|
|
64382
|
+
color: "#cbd5e1",
|
|
64383
|
+
backgroundColor: "#1e293b",
|
|
64384
|
+
padding: "16px",
|
|
64385
|
+
borderRadius: "6px",
|
|
64386
|
+
border: "1px solid #475569"
|
|
64387
|
+
}, children: [
|
|
64388
|
+
/* @__PURE__ */ jsx("strong", { children: "How it works:" }),
|
|
64389
|
+
" Define expected behavior as a story → Map to telemetry signals → Monitor production in real-time → Get alerts when expectations are violated."
|
|
64390
|
+
] })
|
|
64391
|
+
] });
|
|
64392
|
+
};
|
|
64393
|
+
const Step3AvoidNeedleInHaystack = () => {
|
|
64394
|
+
return /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "16px" }, children: [
|
|
64395
|
+
/* @__PURE__ */ jsxs("svg", { viewBox: "0 0 600 300", style: { width: "100%", height: "auto" }, children: [
|
|
64396
|
+
/* @__PURE__ */ jsx("text", { x: "300", y: "25", textAnchor: "middle", fill: "#94a3b8", fontSize: "14", fontWeight: "700", children: "AVOIDING THE NEEDLE IN THE HAYSTACK" }),
|
|
64397
|
+
/* @__PURE__ */ jsxs("g", { children: [
|
|
64398
|
+
/* @__PURE__ */ jsx("rect", { x: "40", y: "50", width: "240", height: "220", fill: "#7f1d1d", stroke: "#ef4444", strokeWidth: "2", rx: "6" }),
|
|
64399
|
+
/* @__PURE__ */ jsx("text", { x: "160", y: "73", textAnchor: "middle", fill: "#fca5a5", fontSize: "12", fontWeight: "700", children: "❌ Reactive Monitoring" }),
|
|
64400
|
+
/* @__PURE__ */ jsx("text", { x: "160", y: "88", textAnchor: "middle", fill: "#fca5a5", fontSize: "9", children: '"Something is wrong, find it!"' }),
|
|
64401
|
+
/* @__PURE__ */ jsx("rect", { x: "60", y: "100", width: "200", height: "130", fill: "#450a0a", stroke: "#991b1b", strokeWidth: "1.5", rx: "4" }),
|
|
64402
|
+
/* @__PURE__ */ jsx("text", { x: "160", y: "118", textAnchor: "middle", fill: "#7f1d1d", fontSize: "40", children: "🌾" }),
|
|
64403
|
+
/* @__PURE__ */ jsx("text", { x: "100", y: "155", fill: "#fca5a5", fontSize: "8", fontFamily: "monospace", children: "10,000 spans/sec" }),
|
|
64404
|
+
/* @__PURE__ */ jsx("text", { x: "100", y: "168", fill: "#fca5a5", fontSize: "8", fontFamily: "monospace", children: "500 services" }),
|
|
64405
|
+
/* @__PURE__ */ jsx("text", { x: "100", y: "181", fill: "#fca5a5", fontSize: "8", fontFamily: "monospace", children: "millions of events" }),
|
|
64406
|
+
/* @__PURE__ */ jsx("text", { x: "100", y: "194", fill: "#fca5a5", fontSize: "8", fontFamily: "monospace", children: "complex traces" }),
|
|
64407
|
+
/* @__PURE__ */ jsx("text", { x: "100", y: "207", fill: "#fca5a5", fontSize: "8", fontFamily: "monospace", children: "distributed systems" }),
|
|
64408
|
+
/* @__PURE__ */ jsx("text", { x: "180", y: "175", fill: "#ef4444", fontSize: "28", children: "📍" }),
|
|
64409
|
+
/* @__PURE__ */ jsx("text", { x: "160", y: "248", textAnchor: "middle", fill: "#fca5a5", fontSize: "10", fontStyle: "italic", children: "Hours hunting for root cause" })
|
|
64410
|
+
] }),
|
|
64411
|
+
/* @__PURE__ */ jsxs("g", { children: [
|
|
64412
|
+
/* @__PURE__ */ jsx("line", { x1: "290", y1: "160", x2: "310", y2: "160", stroke: "#10b981", strokeWidth: "3", markerEnd: "url(#arrowgreen2)" }),
|
|
64413
|
+
/* @__PURE__ */ jsx("text", { x: "300", y: "150", textAnchor: "middle", fill: "#10b981", fontSize: "10", fontWeight: "700", children: "VS" })
|
|
64414
|
+
] }),
|
|
64415
|
+
/* @__PURE__ */ jsxs("g", { children: [
|
|
64416
|
+
/* @__PURE__ */ jsx("rect", { x: "320", y: "50", width: "240", height: "220", fill: "#064e3b", stroke: "#10b981", strokeWidth: "2", rx: "6" }),
|
|
64417
|
+
/* @__PURE__ */ jsx("text", { x: "440", y: "73", textAnchor: "middle", fill: "#6ee7b7", fontSize: "12", fontWeight: "700", children: "✓ Proactive Stories" }),
|
|
64418
|
+
/* @__PURE__ */ jsx("text", { x: "440", y: "88", textAnchor: "middle", fill: "#a7f3d0", fontSize: "9", children: '"This is what should happen"' }),
|
|
64419
|
+
/* @__PURE__ */ jsx("rect", { x: "340", y: "100", width: "200", height: "130", fill: "#022c22", stroke: "#059669", strokeWidth: "1.5", rx: "4" }),
|
|
64420
|
+
/* @__PURE__ */ jsx("text", { x: "440", y: "120", textAnchor: "middle", fill: "#d1fae5", fontSize: "10", fontWeight: "600", children: "Expected Stories:" }),
|
|
64421
|
+
/* @__PURE__ */ jsxs("g", { children: [
|
|
64422
|
+
/* @__PURE__ */ jsx("circle", { cx: "355", cy: "138", r: "4", fill: "#10b981" }),
|
|
64423
|
+
/* @__PURE__ */ jsx("text", { x: "365", y: "142", fill: "#a7f3d0", fontSize: "9", children: "✓ User Login (Active)" })
|
|
64424
|
+
] }),
|
|
64425
|
+
/* @__PURE__ */ jsxs("g", { children: [
|
|
64426
|
+
/* @__PURE__ */ jsx("circle", { cx: "355", cy: "155", r: "4", fill: "#10b981" }),
|
|
64427
|
+
/* @__PURE__ */ jsx("text", { x: "365", y: "159", fill: "#a7f3d0", fontSize: "9", children: "✓ Checkout Flow (Active)" })
|
|
64428
|
+
] }),
|
|
64429
|
+
/* @__PURE__ */ jsxs("g", { children: [
|
|
64430
|
+
/* @__PURE__ */ jsx("circle", { cx: "355", cy: "172", r: "4", fill: "#10b981" }),
|
|
64431
|
+
/* @__PURE__ */ jsx("text", { x: "365", y: "176", fill: "#a7f3d0", fontSize: "9", children: "✓ Payment Process (Active)" })
|
|
64432
|
+
] }),
|
|
64433
|
+
/* @__PURE__ */ jsxs("g", { children: [
|
|
64434
|
+
/* @__PURE__ */ jsx("circle", { cx: "355", cy: "189", r: "4", fill: "#ef4444" }),
|
|
64435
|
+
/* @__PURE__ */ jsx("text", { x: "365", y: "193", fill: "#fca5a5", fontSize: "9", children: "❌ Email Send (VIOLATED!)" }),
|
|
64436
|
+
/* @__PURE__ */ jsx("text", { x: "375", y: "203", fill: "#fbbf24", fontSize: "8", children: "→ Immediate alert" })
|
|
64437
|
+
] }),
|
|
64438
|
+
/* @__PURE__ */ jsxs("g", { children: [
|
|
64439
|
+
/* @__PURE__ */ jsx("circle", { cx: "355", cy: "215", r: "4", fill: "#10b981" }),
|
|
64440
|
+
/* @__PURE__ */ jsx("text", { x: "365", y: "219", fill: "#a7f3d0", fontSize: "9", children: "✓ Analytics Track (Active)" })
|
|
64441
|
+
] }),
|
|
64442
|
+
/* @__PURE__ */ jsx("text", { x: "440", y: "248", textAnchor: "middle", fill: "#6ee7b7", fontSize: "10", fontStyle: "italic", children: "Know immediately what broke" })
|
|
64443
|
+
] }),
|
|
64444
|
+
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("marker", { id: "arrowgreen2", markerWidth: "10", markerHeight: "10", refX: "9", refY: "3", orient: "auto", markerUnits: "strokeWidth", children: /* @__PURE__ */ jsx("path", { d: "M0,0 L0,6 L9,3 z", fill: "#10b981" }) }) })
|
|
64445
|
+
] }),
|
|
64446
|
+
/* @__PURE__ */ jsxs("div", { style: {
|
|
64447
|
+
fontSize: "14px",
|
|
64448
|
+
color: "#d1fae5",
|
|
64449
|
+
backgroundColor: "#064e3b",
|
|
64450
|
+
padding: "16px",
|
|
64451
|
+
borderRadius: "6px",
|
|
64452
|
+
border: "1px solid #059669"
|
|
64453
|
+
}, children: [
|
|
64454
|
+
/* @__PURE__ */ jsx("strong", { children: "The Key Insight:" }),
|
|
64455
|
+
" Instead of searching millions of events for problems, define expected behaviors upfront. When a story is violated, you know exactly what broke and why."
|
|
64456
|
+
] })
|
|
64457
|
+
] });
|
|
64458
|
+
};
|
|
64459
|
+
const Step4AgentIntegration = () => {
|
|
64460
|
+
return /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "16px" }, children: [
|
|
64461
|
+
/* @__PURE__ */ jsxs("svg", { viewBox: "0 0 600 340", style: { width: "100%", height: "auto" }, children: [
|
|
64462
|
+
/* @__PURE__ */ jsx("text", { x: "300", y: "25", textAnchor: "middle", fill: "#94a3b8", fontSize: "14", fontWeight: "700", children: "STORIES MAKE AGENT WORK TRUSTWORTHY" }),
|
|
64463
|
+
/* @__PURE__ */ jsxs("g", { children: [
|
|
64464
|
+
/* @__PURE__ */ jsx("rect", { x: "40", y: "50", width: "160", height: "80", fill: "#4c1d95", stroke: "#a78bfa", strokeWidth: "2", rx: "6" }),
|
|
64465
|
+
/* @__PURE__ */ jsx("text", { x: "120", y: "70", textAnchor: "middle", fill: "#e9d5ff", fontSize: "11", fontWeight: "700", children: "1. AGENT WRITES CODE" }),
|
|
64466
|
+
/* @__PURE__ */ jsx("text", { x: "120", y: "88", textAnchor: "middle", fill: "#e9d5ff", fontSize: "24", children: "🤖" }),
|
|
64467
|
+
/* @__PURE__ */ jsx("text", { x: "120", y: "110", textAnchor: "middle", fill: "#c4b5fd", fontSize: "9", children: "Makes change to" }),
|
|
64468
|
+
/* @__PURE__ */ jsx("text", { x: "120", y: "122", textAnchor: "middle", fill: "#c4b5fd", fontSize: "9", children: "checkout flow" })
|
|
64469
|
+
] }),
|
|
64470
|
+
/* @__PURE__ */ jsxs("g", { children: [
|
|
64471
|
+
/* @__PURE__ */ jsx("line", { x1: "210", y1: "90", x2: "270", y2: "90", stroke: "#3b82f6", strokeWidth: "2", markerEnd: "url(#arrowblue3)" }),
|
|
64472
|
+
/* @__PURE__ */ jsx("text", { x: "240", y: "82", textAnchor: "middle", fill: "#3b82f6", fontSize: "9", children: "Deploy" })
|
|
64473
|
+
] }),
|
|
64474
|
+
/* @__PURE__ */ jsxs("g", { children: [
|
|
64475
|
+
/* @__PURE__ */ jsx("rect", { x: "280", y: "50", width: "160", height: "80", fill: "#1e293b", stroke: "#60a5fa", strokeWidth: "2", rx: "6" }),
|
|
64476
|
+
/* @__PURE__ */ jsx("text", { x: "360", y: "70", textAnchor: "middle", fill: "#60a5fa", fontSize: "11", fontWeight: "700", children: "2. STORIES VALIDATE" }),
|
|
64477
|
+
/* @__PURE__ */ jsx("text", { x: "290", y: "90", fill: "#94a3b8", fontSize: "9", children: 'Story: "Checkout"' }),
|
|
64478
|
+
/* @__PURE__ */ jsx("text", { x: "295", y: "103", fill: "#a7f3d0", fontSize: "8", children: "✓ Payment processes" }),
|
|
64479
|
+
/* @__PURE__ */ jsx("text", { x: "295", y: "114", fill: "#fca5a5", fontSize: "8", children: "❌ Email not sent!" })
|
|
64480
|
+
] }),
|
|
64481
|
+
/* @__PURE__ */ jsxs("g", { children: [
|
|
64482
|
+
/* @__PURE__ */ jsx("line", { x1: "360", y1: "140", x2: "360", y2: "180", stroke: "#ef4444", strokeWidth: "2", markerEnd: "url(#arrowred)" }),
|
|
64483
|
+
/* @__PURE__ */ jsx("text", { x: "380", y: "165", fill: "#ef4444", fontSize: "9", fontWeight: "600", children: "Alert!" })
|
|
64484
|
+
] }),
|
|
64485
|
+
/* @__PURE__ */ jsxs("g", { children: [
|
|
64486
|
+
/* @__PURE__ */ jsx("rect", { x: "280", y: "190", width: "160", height: "80", fill: "#7f1d1d", stroke: "#ef4444", strokeWidth: "2", rx: "6" }),
|
|
64487
|
+
/* @__PURE__ */ jsx("text", { x: "360", y: "210", textAnchor: "middle", fill: "#fca5a5", fontSize: "11", fontWeight: "700", children: "3. IMMEDIATE FEEDBACK" }),
|
|
64488
|
+
/* @__PURE__ */ jsx("text", { x: "360", y: "228", textAnchor: "middle", fill: "#fca5a5", fontSize: "24", children: "⚠️" }),
|
|
64489
|
+
/* @__PURE__ */ jsx("text", { x: "290", y: "250", fill: "#fca5a5", fontSize: "9", children: '"Agent broke checkout' }),
|
|
64490
|
+
/* @__PURE__ */ jsx("text", { x: "290", y: "262", fill: "#fca5a5", fontSize: "9", children: 'confirmation emails"' })
|
|
64491
|
+
] }),
|
|
64492
|
+
/* @__PURE__ */ jsxs("g", { children: [
|
|
64493
|
+
/* @__PURE__ */ jsx(
|
|
64494
|
+
"path",
|
|
64495
|
+
{
|
|
64496
|
+
d: "M 270 230 Q 220 230, 220 190",
|
|
64497
|
+
stroke: "#fbbf24",
|
|
64498
|
+
strokeWidth: "2",
|
|
64499
|
+
fill: "none",
|
|
64500
|
+
markerEnd: "url(#arrowyellow2)"
|
|
64501
|
+
}
|
|
64502
|
+
),
|
|
64503
|
+
/* @__PURE__ */ jsx("text", { x: "235", y: "225", fill: "#fbbf24", fontSize: "9", children: "Fix & redeploy" })
|
|
64504
|
+
] }),
|
|
64505
|
+
/* @__PURE__ */ jsxs("g", { children: [
|
|
64506
|
+
/* @__PURE__ */ jsx("rect", { x: "40", y: "190", width: "160", height: "80", fill: "#064e3b", stroke: "#10b981", strokeWidth: "2", rx: "6" }),
|
|
64507
|
+
/* @__PURE__ */ jsx("text", { x: "120", y: "210", textAnchor: "middle", fill: "#6ee7b7", fontSize: "11", fontWeight: "700", children: "4. CONFIDENCE" }),
|
|
64508
|
+
/* @__PURE__ */ jsx("text", { x: "120", y: "228", textAnchor: "middle", fill: "#10b981", fontSize: "24", children: "✓" }),
|
|
64509
|
+
/* @__PURE__ */ jsx("text", { x: "50", y: "250", fill: "#a7f3d0", fontSize: "9", children: "All stories pass =" }),
|
|
64510
|
+
/* @__PURE__ */ jsx("text", { x: "50", y: "262", fill: "#a7f3d0", fontSize: "9", children: "Safe to trust agent" })
|
|
64511
|
+
] }),
|
|
64512
|
+
/* @__PURE__ */ jsxs("g", { children: [
|
|
64513
|
+
/* @__PURE__ */ jsx("rect", { x: "40", y: "290", width: "520", height: "40", fill: "#1e293b", stroke: "#60a5fa", strokeWidth: "2", rx: "6" }),
|
|
64514
|
+
/* @__PURE__ */ jsx("text", { x: "300", y: "310", textAnchor: "middle", fill: "#60a5fa", fontSize: "11", fontWeight: "700", children: "RESULT: Engineers can leverage agents without fear" }),
|
|
64515
|
+
/* @__PURE__ */ jsx("text", { x: "300", y: "323", textAnchor: "middle", fill: "#94a3b8", fontSize: "9", children: "Stories act as automated acceptance tests for all agent changes" })
|
|
64516
|
+
] }),
|
|
64517
|
+
/* @__PURE__ */ jsxs("defs", { children: [
|
|
64518
|
+
/* @__PURE__ */ jsx("marker", { id: "arrowblue3", markerWidth: "10", markerHeight: "10", refX: "9", refY: "3", orient: "auto", markerUnits: "strokeWidth", children: /* @__PURE__ */ jsx("path", { d: "M0,0 L0,6 L9,3 z", fill: "#3b82f6" }) }),
|
|
64519
|
+
/* @__PURE__ */ jsx("marker", { id: "arrowred", markerWidth: "10", markerHeight: "10", refX: "9", refY: "3", orient: "auto", markerUnits: "strokeWidth", children: /* @__PURE__ */ jsx("path", { d: "M0,0 L0,6 L9,3 z", fill: "#ef4444" }) }),
|
|
64520
|
+
/* @__PURE__ */ jsx("marker", { id: "arrowyellow2", markerWidth: "10", markerHeight: "10", refX: "9", refY: "3", orient: "auto", markerUnits: "strokeWidth", children: /* @__PURE__ */ jsx("path", { d: "M0,0 L0,6 L9,3 z", fill: "#fbbf24" }) })
|
|
64521
|
+
] })
|
|
64522
|
+
] }),
|
|
64523
|
+
/* @__PURE__ */ jsxs("div", { style: {
|
|
64524
|
+
fontSize: "14px",
|
|
64525
|
+
color: "#d1fae5",
|
|
64526
|
+
backgroundColor: "#064e3b",
|
|
64527
|
+
padding: "16px",
|
|
64528
|
+
borderRadius: "6px",
|
|
64529
|
+
border: "1px solid #059669"
|
|
64530
|
+
}, children: [
|
|
64531
|
+
/* @__PURE__ */ jsx("strong", { children: "Why This Works:" }),
|
|
64532
|
+
" Every engineer now spends time defining system stories instead of writing all code. Stories automatically verify agent changes in production. When all stories pass, you can trust the agent's work."
|
|
64533
|
+
] })
|
|
64534
|
+
] });
|
|
64535
|
+
};
|
|
64536
|
+
const SystemStoriesSolutionExplainerPanel = ({
|
|
64537
|
+
className
|
|
64538
|
+
}) => {
|
|
64539
|
+
var _a;
|
|
64540
|
+
const [activeSection, setActiveSection] = useState("what");
|
|
64541
|
+
const sections2 = [
|
|
64542
|
+
{ id: "what", title: "What Are Stories?", component: Step1WhatAreStories },
|
|
64543
|
+
{ id: "how", title: "How They Work", component: Step2HowStoriesWork },
|
|
64544
|
+
{ id: "avoid-haystack", title: "Avoid Haystack Problem", component: Step3AvoidNeedleInHaystack },
|
|
64545
|
+
{ id: "agent-integration", title: "Agent Integration", component: Step4AgentIntegration }
|
|
64546
|
+
];
|
|
64547
|
+
const ActiveComponent = ((_a = sections2.find((s) => s.id === activeSection)) == null ? void 0 : _a.component) || Step1WhatAreStories;
|
|
64548
|
+
return /* @__PURE__ */ jsxs("div", { className, style: {
|
|
64549
|
+
backgroundColor: "#0f172a",
|
|
64550
|
+
color: "#cbd5e1",
|
|
64551
|
+
padding: "24px",
|
|
64552
|
+
fontFamily: "system-ui, -apple-system, sans-serif",
|
|
64553
|
+
minHeight: "100vh"
|
|
64554
|
+
}, children: [
|
|
64555
|
+
/* @__PURE__ */ jsxs("div", { style: { marginBottom: "24px" }, children: [
|
|
64556
|
+
/* @__PURE__ */ jsx("h1", { style: {
|
|
64557
|
+
fontSize: "24px",
|
|
64558
|
+
fontWeight: "700",
|
|
64559
|
+
color: "#f1f5f9",
|
|
64560
|
+
marginBottom: "8px"
|
|
64561
|
+
}, children: "System Stories: The Solution" }),
|
|
64562
|
+
/* @__PURE__ */ jsx("p", { style: {
|
|
64563
|
+
fontSize: "14px",
|
|
64564
|
+
color: "#94a3b8",
|
|
64565
|
+
margin: 0
|
|
64566
|
+
}, children: "How stories transform telemetry into trustworthy agent monitoring" })
|
|
64567
|
+
] }),
|
|
64568
|
+
/* @__PURE__ */ jsx("div", { style: {
|
|
64569
|
+
display: "flex",
|
|
64570
|
+
gap: "8px",
|
|
64571
|
+
marginBottom: "24px",
|
|
64572
|
+
borderBottom: "1px solid #334155",
|
|
64573
|
+
paddingBottom: "12px",
|
|
64574
|
+
flexWrap: "wrap"
|
|
64575
|
+
}, children: sections2.map((section) => /* @__PURE__ */ jsx(
|
|
64576
|
+
"button",
|
|
64577
|
+
{
|
|
64578
|
+
onClick: () => setActiveSection(section.id),
|
|
64579
|
+
style: {
|
|
64580
|
+
padding: "8px 16px",
|
|
64581
|
+
backgroundColor: activeSection === section.id ? "#3b82f6" : "#1e293b",
|
|
64582
|
+
color: activeSection === section.id ? "#fff" : "#94a3b8",
|
|
64583
|
+
border: "1px solid",
|
|
64584
|
+
borderColor: activeSection === section.id ? "#60a5fa" : "#334155",
|
|
64585
|
+
borderRadius: "6px",
|
|
64586
|
+
cursor: "pointer",
|
|
64587
|
+
fontSize: "13px",
|
|
64588
|
+
fontWeight: activeSection === section.id ? "600" : "400",
|
|
64589
|
+
transition: "all 0.2s"
|
|
64590
|
+
},
|
|
64591
|
+
children: section.title
|
|
64592
|
+
},
|
|
64593
|
+
section.id
|
|
64594
|
+
)) }),
|
|
64595
|
+
/* @__PURE__ */ jsx("div", { style: {
|
|
64596
|
+
backgroundColor: "#1e293b",
|
|
64597
|
+
borderRadius: "8px",
|
|
64598
|
+
padding: "24px",
|
|
64599
|
+
border: "1px solid #334155"
|
|
64600
|
+
}, children: /* @__PURE__ */ jsx(ActiveComponent, {}) })
|
|
64601
|
+
] });
|
|
64602
|
+
};
|
|
64603
|
+
const Step1AgentAdoption = () => {
|
|
64604
|
+
return /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "16px" }, children: [
|
|
64605
|
+
/* @__PURE__ */ jsxs("svg", { viewBox: "0 0 600 280", style: { width: "100%", height: "auto" }, children: [
|
|
64606
|
+
/* @__PURE__ */ jsx("text", { x: "300", y: "25", textAnchor: "middle", fill: "#94a3b8", fontSize: "14", fontWeight: "700", children: "THE AGENT REVOLUTION IS HERE" }),
|
|
64607
|
+
/* @__PURE__ */ jsx("line", { x1: "50", y1: "100", x2: "550", y2: "100", stroke: "#475569", strokeWidth: "3" }),
|
|
64608
|
+
/* @__PURE__ */ jsxs("g", { children: [
|
|
64609
|
+
/* @__PURE__ */ jsx("circle", { cx: "100", cy: "100", r: "8", fill: "#64748b" }),
|
|
64610
|
+
/* @__PURE__ */ jsx("text", { x: "100", y: "125", textAnchor: "middle", fill: "#94a3b8", fontSize: "11", fontWeight: "600", children: "2020" }),
|
|
64611
|
+
/* @__PURE__ */ jsx("text", { x: "100", y: "140", textAnchor: "middle", fill: "#64748b", fontSize: "9", children: "GPT-3" }),
|
|
64612
|
+
/* @__PURE__ */ jsx("text", { x: "100", y: "152", textAnchor: "middle", fill: "#64748b", fontSize: "9", children: "Copilot beta" })
|
|
64613
|
+
] }),
|
|
64614
|
+
/* @__PURE__ */ jsxs("g", { children: [
|
|
64615
|
+
/* @__PURE__ */ jsx("circle", { cx: "220", cy: "100", r: "10", fill: "#3b82f6" }),
|
|
64616
|
+
/* @__PURE__ */ jsx("text", { x: "220", y: "125", textAnchor: "middle", fill: "#94a3b8", fontSize: "11", fontWeight: "600", children: "2022" }),
|
|
64617
|
+
/* @__PURE__ */ jsx("text", { x: "220", y: "140", textAnchor: "middle", fill: "#60a5fa", fontSize: "9", children: "ChatGPT" }),
|
|
64618
|
+
/* @__PURE__ */ jsx("text", { x: "220", y: "152", textAnchor: "middle", fill: "#60a5fa", fontSize: "9", children: "GitHub Copilot GA" }),
|
|
64619
|
+
/* @__PURE__ */ jsx("text", { x: "220", y: "164", textAnchor: "middle", fill: "#60a5fa", fontSize: "9", children: "~30% code assist" })
|
|
64620
|
+
] }),
|
|
64621
|
+
/* @__PURE__ */ jsxs("g", { children: [
|
|
64622
|
+
/* @__PURE__ */ jsx("circle", { cx: "380", cy: "100", r: "12", fill: "#8b5cf6" }),
|
|
64623
|
+
/* @__PURE__ */ jsx("text", { x: "380", y: "125", textAnchor: "middle", fill: "#94a3b8", fontSize: "11", fontWeight: "600", children: "2024" }),
|
|
64624
|
+
/* @__PURE__ */ jsx("text", { x: "380", y: "140", textAnchor: "middle", fill: "#c4b5fd", fontSize: "9", children: "Claude Sonnet 3.5" }),
|
|
64625
|
+
/* @__PURE__ */ jsx("text", { x: "380", y: "152", textAnchor: "middle", fill: "#c4b5fd", fontSize: "9", children: "Cursor, Claude Code" }),
|
|
64626
|
+
/* @__PURE__ */ jsx("text", { x: "380", y: "164", textAnchor: "middle", fill: "#c4b5fd", fontSize: "9", children: "Agents write entire features" }),
|
|
64627
|
+
/* @__PURE__ */ jsx("text", { x: "380", y: "176", textAnchor: "middle", fill: "#a78bfa", fontSize: "9", fontWeight: "600", children: "~50-80% agent-written" })
|
|
64628
|
+
] }),
|
|
64629
|
+
/* @__PURE__ */ jsxs("g", { children: [
|
|
64630
|
+
/* @__PURE__ */ jsx("circle", { cx: "500", cy: "100", r: "14", fill: "#10b981" }),
|
|
64631
|
+
/* @__PURE__ */ jsx("text", { x: "500", y: "125", textAnchor: "middle", fill: "#94a3b8", fontSize: "11", fontWeight: "700", children: "2025+" }),
|
|
64632
|
+
/* @__PURE__ */ jsx("text", { x: "500", y: "140", textAnchor: "middle", fill: "#6ee7b7", fontSize: "9", children: "Autonomous agents" }),
|
|
64633
|
+
/* @__PURE__ */ jsx("text", { x: "500", y: "152", textAnchor: "middle", fill: "#6ee7b7", fontSize: "9", children: "Full feature ownership" }),
|
|
64634
|
+
/* @__PURE__ */ jsx("text", { x: "500", y: "164", textAnchor: "middle", fill: "#6ee7b7", fontSize: "9", children: "Engineers = reviewers" }),
|
|
64635
|
+
/* @__PURE__ */ jsx("text", { x: "500", y: "176", textAnchor: "middle", fill: "#10b981", fontSize: "9", fontWeight: "700", children: "~90%+ agent-written" })
|
|
64636
|
+
] }),
|
|
64637
|
+
/* @__PURE__ */ jsxs("g", { children: [
|
|
64638
|
+
/* @__PURE__ */ jsx(
|
|
64639
|
+
"path",
|
|
64640
|
+
{
|
|
64641
|
+
d: "M 100 250 Q 220 240, 380 200 Q 440 180, 500 150",
|
|
64642
|
+
stroke: "#10b981",
|
|
64643
|
+
strokeWidth: "3",
|
|
64644
|
+
fill: "none",
|
|
64645
|
+
markerEnd: "url(#arrowgreen)"
|
|
64646
|
+
}
|
|
64647
|
+
),
|
|
64648
|
+
/* @__PURE__ */ jsx("text", { x: "320", y: "230", textAnchor: "middle", fill: "#10b981", fontSize: "11", fontWeight: "600", children: "Exponential Agent Adoption" })
|
|
64649
|
+
] }),
|
|
64650
|
+
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("marker", { id: "arrowgreen", markerWidth: "10", markerHeight: "10", refX: "9", refY: "3", orient: "auto", markerUnits: "strokeWidth", children: /* @__PURE__ */ jsx("path", { d: "M0,0 L0,6 L9,3 z", fill: "#10b981" }) }) })
|
|
64651
|
+
] }),
|
|
64652
|
+
/* @__PURE__ */ jsxs("div", { style: {
|
|
64653
|
+
fontSize: "14px",
|
|
64654
|
+
color: "#d1fae5",
|
|
64655
|
+
backgroundColor: "#064e3b",
|
|
64656
|
+
padding: "16px",
|
|
64657
|
+
borderRadius: "6px",
|
|
64658
|
+
border: "1px solid #059669"
|
|
64659
|
+
}, children: [
|
|
64660
|
+
/* @__PURE__ */ jsx("strong", { children: "200%+ YoY Growth:" }),
|
|
64661
|
+
` AI coding assistants went from autocomplete to writing entire features in 3 years. GitHub Copilot, Cursor, Claude Code are now table stakes. The question isn't "if" but "how much" code is agent-generated.`
|
|
64662
|
+
] })
|
|
64663
|
+
] });
|
|
64664
|
+
};
|
|
64665
|
+
const Step2GrowingGap = () => {
|
|
64666
|
+
return /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "16px" }, children: [
|
|
64667
|
+
/* @__PURE__ */ jsxs("svg", { viewBox: "0 0 600 300", style: { width: "100%", height: "auto" }, children: [
|
|
64668
|
+
/* @__PURE__ */ jsx("text", { x: "300", y: "25", textAnchor: "middle", fill: "#94a3b8", fontSize: "14", fontWeight: "700", children: "THE EXPERIENCE GAP IS GROWING" }),
|
|
64669
|
+
/* @__PURE__ */ jsxs("g", { children: [
|
|
64670
|
+
/* @__PURE__ */ jsx("rect", { x: "40", y: "50", width: "220", height: "220", fill: "#1e293b", stroke: "#60a5fa", strokeWidth: "2", rx: "6" }),
|
|
64671
|
+
/* @__PURE__ */ jsx("text", { x: "150", y: "72", textAnchor: "middle", fill: "#60a5fa", fontSize: "12", fontWeight: "700", children: "CODE VOLUME" }),
|
|
64672
|
+
/* @__PURE__ */ jsx("rect", { x: "60", y: "220", width: "40", height: "30", fill: "#3b82f6" }),
|
|
64673
|
+
/* @__PURE__ */ jsx("text", { x: "80", y: "264", textAnchor: "middle", fill: "#94a3b8", fontSize: "9", children: "2020" }),
|
|
64674
|
+
/* @__PURE__ */ jsx("rect", { x: "110", y: "190", width: "40", height: "60", fill: "#3b82f6" }),
|
|
64675
|
+
/* @__PURE__ */ jsx("text", { x: "130", y: "264", textAnchor: "middle", fill: "#94a3b8", fontSize: "9", children: "2022" }),
|
|
64676
|
+
/* @__PURE__ */ jsx("rect", { x: "160", y: "140", width: "40", height: "110", fill: "#6366f1" }),
|
|
64677
|
+
/* @__PURE__ */ jsx("text", { x: "180", y: "264", textAnchor: "middle", fill: "#94a3b8", fontSize: "9", children: "2024" }),
|
|
64678
|
+
/* @__PURE__ */ jsx("rect", { x: "210", y: "90", width: "40", height: "160", fill: "#8b5cf6" }),
|
|
64679
|
+
/* @__PURE__ */ jsx("text", { x: "230", y: "264", textAnchor: "middle", fill: "#94a3b8", fontSize: "9", children: "2026" }),
|
|
64680
|
+
/* @__PURE__ */ jsx("text", { x: "150", y: "95", textAnchor: "middle", fill: "#a78bfa", fontSize: "20", children: "📈" }),
|
|
64681
|
+
/* @__PURE__ */ jsx("text", { x: "150", y: "115", textAnchor: "middle", fill: "#c4b5fd", fontSize: "10", fontWeight: "600", children: "10x more code" }),
|
|
64682
|
+
/* @__PURE__ */ jsx("text", { x: "150", y: "128", textAnchor: "middle", fill: "#c4b5fd", fontSize: "9", children: "Agents ship faster" })
|
|
64683
|
+
] }),
|
|
64684
|
+
/* @__PURE__ */ jsxs("g", { children: [
|
|
64685
|
+
/* @__PURE__ */ jsx("rect", { x: "340", y: "50", width: "220", height: "220", fill: "#1e293b", stroke: "#ef4444", strokeWidth: "2", rx: "6" }),
|
|
64686
|
+
/* @__PURE__ */ jsx("text", { x: "450", y: "72", textAnchor: "middle", fill: "#fca5a5", fontSize: "12", fontWeight: "700", children: "DEVELOPER CONTEXT" }),
|
|
64687
|
+
/* @__PURE__ */ jsx("rect", { x: "360", y: "140", width: "40", height: "110", fill: "#10b981" }),
|
|
64688
|
+
/* @__PURE__ */ jsx("text", { x: "380", y: "264", textAnchor: "middle", fill: "#94a3b8", fontSize: "9", children: "2020" }),
|
|
64689
|
+
/* @__PURE__ */ jsx("rect", { x: "410", y: "170", width: "40", height: "80", fill: "#fbbf24" }),
|
|
64690
|
+
/* @__PURE__ */ jsx("text", { x: "430", y: "264", textAnchor: "middle", fill: "#94a3b8", fontSize: "9", children: "2022" }),
|
|
64691
|
+
/* @__PURE__ */ jsx("rect", { x: "460", y: "210", width: "40", height: "40", fill: "#f97316" }),
|
|
64692
|
+
/* @__PURE__ */ jsx("text", { x: "480", y: "264", textAnchor: "middle", fill: "#94a3b8", fontSize: "9", children: "2024" }),
|
|
64693
|
+
/* @__PURE__ */ jsx("rect", { x: "510", y: "235", width: "40", height: "15", fill: "#ef4444" }),
|
|
64694
|
+
/* @__PURE__ */ jsx("text", { x: "530", y: "264", textAnchor: "middle", fill: "#94a3b8", fontSize: "9", children: "2026" }),
|
|
64695
|
+
/* @__PURE__ */ jsx("text", { x: "450", y: "95", textAnchor: "middle", fill: "#fca5a5", fontSize: "20", children: "📉" }),
|
|
64696
|
+
/* @__PURE__ */ jsx("text", { x: "450", y: "115", textAnchor: "middle", fill: "#fca5a5", fontSize: "10", fontWeight: "600", children: "90% less context" }),
|
|
64697
|
+
/* @__PURE__ */ jsx("text", { x: "450", y: "128", textAnchor: "middle", fill: "#fca5a5", fontSize: "9", children: "Didn't write code" })
|
|
64698
|
+
] }),
|
|
64699
|
+
/* @__PURE__ */ jsxs("g", { children: [
|
|
64700
|
+
/* @__PURE__ */ jsx("path", { d: "M 270 160 L 330 160", stroke: "#fbbf24", strokeWidth: "4", strokeDasharray: "8,4" }),
|
|
64701
|
+
/* @__PURE__ */ jsx("text", { x: "300", y: "155", textAnchor: "middle", fill: "#fbbf24", fontSize: "11", fontWeight: "700", children: "WIDENING" }),
|
|
64702
|
+
/* @__PURE__ */ jsx("text", { x: "300", y: "175", textAnchor: "middle", fill: "#fbbf24", fontSize: "11", fontWeight: "700", children: "GAP" })
|
|
64703
|
+
] })
|
|
64704
|
+
] }),
|
|
64705
|
+
/* @__PURE__ */ jsxs("div", { style: {
|
|
64706
|
+
fontSize: "14px",
|
|
64707
|
+
color: "#fef3c7",
|
|
64708
|
+
backgroundColor: "#78350f",
|
|
64709
|
+
padding: "16px",
|
|
64710
|
+
borderRadius: "6px",
|
|
64711
|
+
border: "2px solid #fbbf24"
|
|
64712
|
+
}, children: [
|
|
64713
|
+
/* @__PURE__ */ jsx("strong", { children: "The Scissors Problem:" }),
|
|
64714
|
+
" Code volume exploding while developer understanding plummets. Junior devs manage agent output without context. Senior devs lose touch with details. Traditional monitoring can't bridge this gap."
|
|
64715
|
+
] })
|
|
64716
|
+
] });
|
|
64717
|
+
};
|
|
64718
|
+
const Step3InfrastructureReady = () => {
|
|
64719
|
+
return /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "16px" }, children: [
|
|
64720
|
+
/* @__PURE__ */ jsxs("svg", { viewBox: "0 0 600 280", style: { width: "100%", height: "auto" }, children: [
|
|
64721
|
+
/* @__PURE__ */ jsx("text", { x: "300", y: "25", textAnchor: "middle", fill: "#94a3b8", fontSize: "14", fontWeight: "700", children: "TELEMETRY INFRASTRUCTURE IS MATURE" }),
|
|
64722
|
+
/* @__PURE__ */ jsxs("g", { children: [
|
|
64723
|
+
/* @__PURE__ */ jsx("rect", { x: "80", y: "200", width: "440", height: "60", fill: "#064e3b", stroke: "#059669", strokeWidth: "2", rx: "6" }),
|
|
64724
|
+
/* @__PURE__ */ jsx("text", { x: "300", y: "222", textAnchor: "middle", fill: "#6ee7b7", fontSize: "12", fontWeight: "700", children: "MATURE FOUNDATION" }),
|
|
64725
|
+
/* @__PURE__ */ jsx("text", { x: "100", y: "240", fill: "#a7f3d0", fontSize: "10", children: "✓ OpenTelemetry standard" }),
|
|
64726
|
+
/* @__PURE__ */ jsx("text", { x: "100", y: "253", fill: "#a7f3d0", fontSize: "10", children: "✓ Distributed tracing" }),
|
|
64727
|
+
/* @__PURE__ */ jsx("text", { x: "320", y: "240", fill: "#a7f3d0", fontSize: "10", children: "✓ Cloud-native observability" }),
|
|
64728
|
+
/* @__PURE__ */ jsx("text", { x: "320", y: "253", fill: "#a7f3d0", fontSize: "10", children: "✓ Wide adoption" })
|
|
64729
|
+
] }),
|
|
64730
|
+
/* @__PURE__ */ jsxs("g", { children: [
|
|
64731
|
+
/* @__PURE__ */ jsx("rect", { x: "80", y: "120", width: "440", height: "60", fill: "#7f1d1d", stroke: "#ef4444", strokeWidth: "2", strokeDasharray: "8,4", rx: "6" }),
|
|
64732
|
+
/* @__PURE__ */ jsx("text", { x: "300", y: "142", textAnchor: "middle", fill: "#fca5a5", fontSize: "12", fontWeight: "700", children: "MISSING: INTELLIGENCE LAYER" }),
|
|
64733
|
+
/* @__PURE__ */ jsx("text", { x: "100", y: "160", fill: "#fca5a5", fontSize: "10", children: "❌ No behavior expectations" }),
|
|
64734
|
+
/* @__PURE__ */ jsx("text", { x: "100", y: "173", fill: "#fca5a5", fontSize: "10", children: "❌ No story understanding" }),
|
|
64735
|
+
/* @__PURE__ */ jsx("text", { x: "320", y: "160", fill: "#fca5a5", fontSize: "10", children: "❌ No agent validation" }),
|
|
64736
|
+
/* @__PURE__ */ jsx("text", { x: "320", y: "173", fill: "#fca5a5", fontSize: "10", children: "❌ Reactive, not proactive" })
|
|
64737
|
+
] }),
|
|
64738
|
+
/* @__PURE__ */ jsxs("g", { children: [
|
|
64739
|
+
/* @__PURE__ */ jsx("rect", { x: "80", y: "40", width: "440", height: "60", fill: "#1e40af", stroke: "#3b82f6", strokeWidth: "3", rx: "6" }),
|
|
64740
|
+
/* @__PURE__ */ jsx("text", { x: "300", y: "62", textAnchor: "middle", fill: "#60a5fa", fontSize: "13", fontWeight: "700", children: "PRINCIPAL AI: THE INTELLIGENCE LAYER" }),
|
|
64741
|
+
/* @__PURE__ */ jsx("text", { x: "100", y: "80", fill: "#bfdbfe", fontSize: "10", children: "✓ Story-based expectations" }),
|
|
64742
|
+
/* @__PURE__ */ jsx("text", { x: "100", y: "93", fill: "#bfdbfe", fontSize: "10", children: "✓ Telemetry synthesis" }),
|
|
64743
|
+
/* @__PURE__ */ jsx("text", { x: "320", y: "80", fill: "#bfdbfe", fontSize: "10", children: "✓ Agent workflow integration" }),
|
|
64744
|
+
/* @__PURE__ */ jsx("text", { x: "320", y: "93", fill: "#bfdbfe", fontSize: "10", children: "✓ Automated validation" })
|
|
64745
|
+
] }),
|
|
64746
|
+
/* @__PURE__ */ jsxs("g", { children: [
|
|
64747
|
+
/* @__PURE__ */ jsx("line", { x1: "300", y1: "110", x2: "300", y2: "115", stroke: "#3b82f6", strokeWidth: "2", markerEnd: "url(#arrowblue)" }),
|
|
64748
|
+
/* @__PURE__ */ jsx("line", { x1: "300", y1: "190", x2: "300", y2: "195", stroke: "#10b981", strokeWidth: "2", markerEnd: "url(#arrowgreen2)" })
|
|
64749
|
+
] }),
|
|
64750
|
+
/* @__PURE__ */ jsxs("defs", { children: [
|
|
64751
|
+
/* @__PURE__ */ jsx("marker", { id: "arrowblue", markerWidth: "10", markerHeight: "10", refX: "9", refY: "3", orient: "auto", markerUnits: "strokeWidth", children: /* @__PURE__ */ jsx("path", { d: "M0,0 L0,6 L9,3 z", fill: "#3b82f6" }) }),
|
|
64752
|
+
/* @__PURE__ */ jsx("marker", { id: "arrowgreen2", markerWidth: "10", markerHeight: "10", refX: "9", refY: "3", orient: "auto", markerUnits: "strokeWidth", children: /* @__PURE__ */ jsx("path", { d: "M0,0 L0,6 L9,3 z", fill: "#10b981" }) })
|
|
64753
|
+
] })
|
|
64754
|
+
] }),
|
|
64755
|
+
/* @__PURE__ */ jsxs("div", { style: {
|
|
64756
|
+
fontSize: "14px",
|
|
64757
|
+
color: "#cbd5e1",
|
|
64758
|
+
backgroundColor: "#1e293b",
|
|
64759
|
+
padding: "16px",
|
|
64760
|
+
borderRadius: "6px",
|
|
64761
|
+
border: "1px solid #475569"
|
|
64762
|
+
}, children: [
|
|
64763
|
+
/* @__PURE__ */ jsx("strong", { children: "Perfect Timing:" }),
|
|
64764
|
+
" OpenTelemetry and distributed tracing solved the data collection problem. The infrastructure is ready for an intelligent layer that understands behavior, not just metrics."
|
|
64765
|
+
] })
|
|
64766
|
+
] });
|
|
64767
|
+
};
|
|
64768
|
+
const Step4MarketOpportunity = () => {
|
|
64769
|
+
return /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "16px" }, children: [
|
|
64770
|
+
/* @__PURE__ */ jsxs("svg", { viewBox: "0 0 600 320", style: { width: "100%", height: "auto" }, children: [
|
|
64771
|
+
/* @__PURE__ */ jsx("text", { x: "300", y: "25", textAnchor: "middle", fill: "#94a3b8", fontSize: "14", fontWeight: "700", children: "CONVERGING MARKET FORCES" }),
|
|
64772
|
+
/* @__PURE__ */ jsxs("g", { children: [
|
|
64773
|
+
/* @__PURE__ */ jsx("rect", { x: "40", y: "50", width: "250", height: "80", fill: "#4c1d95", stroke: "#a78bfa", strokeWidth: "2", rx: "6" }),
|
|
64774
|
+
/* @__PURE__ */ jsx("text", { x: "165", y: "72", textAnchor: "middle", fill: "#e9d5ff", fontSize: "12", fontWeight: "700", children: "🤖 AGENT ADOPTION" }),
|
|
64775
|
+
/* @__PURE__ */ jsx("text", { x: "50", y: "90", fill: "#c4b5fd", fontSize: "10", children: "• Every team using AI coding tools" }),
|
|
64776
|
+
/* @__PURE__ */ jsx("text", { x: "50", y: "104", fill: "#c4b5fd", fontSize: "10", children: "• 50-80% code now agent-generated" }),
|
|
64777
|
+
/* @__PURE__ */ jsx("text", { x: "50", y: "118", fill: "#c4b5fd", fontSize: "10", children: "• Growing dependency on automation" })
|
|
64778
|
+
] }),
|
|
64779
|
+
/* @__PURE__ */ jsxs("g", { children: [
|
|
64780
|
+
/* @__PURE__ */ jsx("rect", { x: "310", y: "50", width: "250", height: "80", fill: "#1e40af", stroke: "#3b82f6", strokeWidth: "2", rx: "6" }),
|
|
64781
|
+
/* @__PURE__ */ jsx("text", { x: "435", y: "72", textAnchor: "middle", fill: "#bfdbfe", fontSize: "12", fontWeight: "700", children: "⚡ PRODUCTIVITY PRESSURE" }),
|
|
64782
|
+
/* @__PURE__ */ jsx("text", { x: "320", y: "90", fill: "#bfdbfe", fontSize: "10", children: "• Ship faster with fewer engineers" }),
|
|
64783
|
+
/* @__PURE__ */ jsx("text", { x: "320", y: "104", fill: "#bfdbfe", fontSize: "10", children: "• Do more with AI leverage" }),
|
|
64784
|
+
/* @__PURE__ */ jsx("text", { x: "320", y: "118", fill: "#bfdbfe", fontSize: "10", children: "• Need confidence to deploy" })
|
|
64785
|
+
] }),
|
|
64786
|
+
/* @__PURE__ */ jsxs("g", { children: [
|
|
64787
|
+
/* @__PURE__ */ jsx("rect", { x: "40", y: "150", width: "250", height: "80", fill: "#7c2d12", stroke: "#f97316", strokeWidth: "2", rx: "6" }),
|
|
64788
|
+
/* @__PURE__ */ jsx("text", { x: "165", y: "172", textAnchor: "middle", fill: "#fed7aa", fontSize: "12", fontWeight: "700", children: "🌐 SYSTEM COMPLEXITY" }),
|
|
64789
|
+
/* @__PURE__ */ jsx("text", { x: "50", y: "190", fill: "#fed7aa", fontSize: "10", children: "• Microservices proliferation" }),
|
|
64790
|
+
/* @__PURE__ */ jsx("text", { x: "50", y: "204", fill: "#fed7aa", fontSize: "10", children: "• Distributed systems everywhere" }),
|
|
64791
|
+
/* @__PURE__ */ jsx("text", { x: "50", y: "218", fill: "#fed7aa", fontSize: "10", children: "• Traditional monitoring overwhelmed" })
|
|
64792
|
+
] }),
|
|
64793
|
+
/* @__PURE__ */ jsxs("g", { children: [
|
|
64794
|
+
/* @__PURE__ */ jsx("rect", { x: "310", y: "150", width: "250", height: "80", fill: "#7f1d1d", stroke: "#ef4444", strokeWidth: "2", rx: "6" }),
|
|
64795
|
+
/* @__PURE__ */ jsx("text", { x: "435", y: "172", textAnchor: "middle", fill: "#fca5a5", fontSize: "12", fontWeight: "700", children: "🧠 KNOWLEDGE PROBLEM" }),
|
|
64796
|
+
/* @__PURE__ */ jsx("text", { x: "320", y: "190", fill: "#fca5a5", fontSize: "10", children: "• Junior devs managing agent output" }),
|
|
64797
|
+
/* @__PURE__ */ jsx("text", { x: "320", y: "204", fill: "#fca5a5", fontSize: "10", children: "• Team scaling loses context" }),
|
|
64798
|
+
/* @__PURE__ */ jsx("text", { x: "320", y: "218", fill: "#fca5a5", fontSize: "10", children: "• Tribal knowledge doesn't scale" })
|
|
64799
|
+
] }),
|
|
64800
|
+
/* @__PURE__ */ jsxs("g", { children: [
|
|
64801
|
+
/* @__PURE__ */ jsx("path", { d: "M 165 140 L 300 270", stroke: "#10b981", strokeWidth: "2", markerEnd: "url(#arrowgreen3)" }),
|
|
64802
|
+
/* @__PURE__ */ jsx("path", { d: "M 435 140 L 300 270", stroke: "#10b981", strokeWidth: "2", markerEnd: "url(#arrowgreen3)" }),
|
|
64803
|
+
/* @__PURE__ */ jsx("path", { d: "M 165 240 L 300 270", stroke: "#10b981", strokeWidth: "2", markerEnd: "url(#arrowgreen3)" }),
|
|
64804
|
+
/* @__PURE__ */ jsx("path", { d: "M 435 240 L 300 270", stroke: "#10b981", strokeWidth: "2", markerEnd: "url(#arrowgreen3)" }),
|
|
64805
|
+
/* @__PURE__ */ jsx("circle", { cx: "300", cy: "275", r: "30", fill: "#064e3b", stroke: "#10b981", strokeWidth: "3" }),
|
|
64806
|
+
/* @__PURE__ */ jsx("text", { x: "300", y: "280", textAnchor: "middle", fill: "#6ee7b7", fontSize: "12", fontWeight: "700", children: "PERFECT" }),
|
|
64807
|
+
/* @__PURE__ */ jsx("text", { x: "300", y: "293", textAnchor: "middle", fill: "#6ee7b7", fontSize: "12", fontWeight: "700", children: "TIMING" })
|
|
64808
|
+
] }),
|
|
64809
|
+
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("marker", { id: "arrowgreen3", markerWidth: "10", markerHeight: "10", refX: "9", refY: "3", orient: "auto", markerUnits: "strokeWidth", children: /* @__PURE__ */ jsx("path", { d: "M0,0 L0,6 L9,3 z", fill: "#10b981" }) }) })
|
|
64810
|
+
] }),
|
|
64811
|
+
/* @__PURE__ */ jsxs("div", { style: {
|
|
64812
|
+
fontSize: "14px",
|
|
64813
|
+
color: "#d1fae5",
|
|
64814
|
+
backgroundColor: "#064e3b",
|
|
64815
|
+
padding: "16px",
|
|
64816
|
+
borderRadius: "6px",
|
|
64817
|
+
border: "2px solid #10b981"
|
|
64818
|
+
}, children: [
|
|
64819
|
+
/* @__PURE__ */ jsx("strong", { children: "Why Now:" }),
|
|
64820
|
+
" Agent adoption + productivity pressure + system complexity + knowledge distribution = urgent need for story-based monitoring. The market timing has never been better."
|
|
64821
|
+
] })
|
|
64822
|
+
] });
|
|
64823
|
+
};
|
|
64824
|
+
const WhyNowAgentRevolutionExplainerPanel = ({
|
|
64825
|
+
className
|
|
64826
|
+
}) => {
|
|
64827
|
+
var _a;
|
|
64828
|
+
const [activeSection, setActiveSection] = useState("adoption");
|
|
64829
|
+
const sections2 = [
|
|
64830
|
+
{ id: "adoption", title: "Agent Adoption", component: Step1AgentAdoption },
|
|
64831
|
+
{ id: "growing-gap", title: "Growing Gap", component: Step2GrowingGap },
|
|
64832
|
+
{ id: "infrastructure", title: "Infrastructure Ready", component: Step3InfrastructureReady },
|
|
64833
|
+
{ id: "market", title: "Market Opportunity", component: Step4MarketOpportunity }
|
|
64834
|
+
];
|
|
64835
|
+
const ActiveComponent = ((_a = sections2.find((s) => s.id === activeSection)) == null ? void 0 : _a.component) || Step1AgentAdoption;
|
|
64836
|
+
return /* @__PURE__ */ jsxs("div", { className, style: {
|
|
64837
|
+
backgroundColor: "#0f172a",
|
|
64838
|
+
color: "#cbd5e1",
|
|
64839
|
+
padding: "24px",
|
|
64840
|
+
fontFamily: "system-ui, -apple-system, sans-serif",
|
|
64841
|
+
minHeight: "100vh"
|
|
64842
|
+
}, children: [
|
|
64843
|
+
/* @__PURE__ */ jsxs("div", { style: { marginBottom: "24px" }, children: [
|
|
64844
|
+
/* @__PURE__ */ jsx("h1", { style: {
|
|
64845
|
+
fontSize: "24px",
|
|
64846
|
+
fontWeight: "700",
|
|
64847
|
+
color: "#f1f5f9",
|
|
64848
|
+
marginBottom: "8px"
|
|
64849
|
+
}, children: "Why Now: The Agent Revolution" }),
|
|
64850
|
+
/* @__PURE__ */ jsx("p", { style: {
|
|
64851
|
+
fontSize: "14px",
|
|
64852
|
+
color: "#94a3b8",
|
|
64853
|
+
margin: 0
|
|
64854
|
+
}, children: "Understanding the perfect market timing for story-based monitoring" })
|
|
64855
|
+
] }),
|
|
64856
|
+
/* @__PURE__ */ jsx("div", { style: {
|
|
64857
|
+
display: "flex",
|
|
64858
|
+
gap: "8px",
|
|
64859
|
+
marginBottom: "24px",
|
|
64860
|
+
borderBottom: "1px solid #334155",
|
|
64861
|
+
paddingBottom: "12px",
|
|
64862
|
+
flexWrap: "wrap"
|
|
64863
|
+
}, children: sections2.map((section) => /* @__PURE__ */ jsx(
|
|
64864
|
+
"button",
|
|
64865
|
+
{
|
|
64866
|
+
onClick: () => setActiveSection(section.id),
|
|
64867
|
+
style: {
|
|
64868
|
+
padding: "8px 16px",
|
|
64869
|
+
backgroundColor: activeSection === section.id ? "#3b82f6" : "#1e293b",
|
|
64870
|
+
color: activeSection === section.id ? "#fff" : "#94a3b8",
|
|
64871
|
+
border: "1px solid",
|
|
64872
|
+
borderColor: activeSection === section.id ? "#60a5fa" : "#334155",
|
|
64873
|
+
borderRadius: "6px",
|
|
64874
|
+
cursor: "pointer",
|
|
64875
|
+
fontSize: "13px",
|
|
64876
|
+
fontWeight: activeSection === section.id ? "600" : "400",
|
|
64877
|
+
transition: "all 0.2s"
|
|
64878
|
+
},
|
|
64879
|
+
children: section.title
|
|
64880
|
+
},
|
|
64881
|
+
section.id
|
|
64882
|
+
)) }),
|
|
64883
|
+
/* @__PURE__ */ jsx("div", { style: {
|
|
64884
|
+
backgroundColor: "#1e293b",
|
|
64885
|
+
borderRadius: "8px",
|
|
64886
|
+
padding: "24px",
|
|
64887
|
+
border: "1px solid #334155"
|
|
64888
|
+
}, children: /* @__PURE__ */ jsx(ActiveComponent, {}) })
|
|
64889
|
+
] });
|
|
64890
|
+
};
|
|
62500
64891
|
class PanelFileSystemAdapter {
|
|
62501
64892
|
constructor(options) {
|
|
62502
64893
|
this.fileContentCache = /* @__PURE__ */ new Map();
|
|
@@ -62692,31 +65083,6 @@ const panels = [
|
|
|
62692
65083
|
console.log("Canvas Editor Panel unmounting");
|
|
62693
65084
|
}
|
|
62694
65085
|
},
|
|
62695
|
-
{
|
|
62696
|
-
metadata: {
|
|
62697
|
-
id: "principal-ai.trace-viewer",
|
|
62698
|
-
name: "Trace Viewer",
|
|
62699
|
-
icon: "📊",
|
|
62700
|
-
version: "0.1.0",
|
|
62701
|
-
author: "Principal AI",
|
|
62702
|
-
description: "Visualizes OpenTelemetry traces captured from test runs as canvas diagrams",
|
|
62703
|
-
slices: ["fileTree"]
|
|
62704
|
-
},
|
|
62705
|
-
component: TraceViewerPanel,
|
|
62706
|
-
onMount: async (context) => {
|
|
62707
|
-
var _a;
|
|
62708
|
-
console.log(
|
|
62709
|
-
"Trace Viewer Panel mounted",
|
|
62710
|
-
(_a = context.currentScope.repository) == null ? void 0 : _a.path
|
|
62711
|
-
);
|
|
62712
|
-
if (context.hasSlice("fileTree") && !context.isSliceLoading("fileTree")) {
|
|
62713
|
-
await context.refresh("repository", "fileTree");
|
|
62714
|
-
}
|
|
62715
|
-
},
|
|
62716
|
-
onUnmount: async (_context) => {
|
|
62717
|
-
console.log("Trace Viewer Panel unmounting");
|
|
62718
|
-
}
|
|
62719
|
-
},
|
|
62720
65086
|
{
|
|
62721
65087
|
metadata: {
|
|
62722
65088
|
id: "principal-ai.canvas-detail",
|
|
@@ -62775,6 +65141,7 @@ const onPackageUnload = async () => {
|
|
|
62775
65141
|
console.log("Panel package unloading - Principal View Panels");
|
|
62776
65142
|
};
|
|
62777
65143
|
export {
|
|
65144
|
+
AgentMonitoringGapExplainerPanel,
|
|
62778
65145
|
BookAnalogyExplainerPanel,
|
|
62779
65146
|
CanvasDetailPanel,
|
|
62780
65147
|
CanvasEditorPanel,
|
|
@@ -62791,9 +65158,10 @@ export {
|
|
|
62791
65158
|
ProductionDebuggingExplainerPanel,
|
|
62792
65159
|
RuntimeValidationExplainerPanel,
|
|
62793
65160
|
ScenarioEnumerationExplainerPanel,
|
|
65161
|
+
SystemStoriesSolutionExplainerPanel,
|
|
62794
65162
|
TelemetryCoverageExplainerPanel,
|
|
62795
65163
|
TestVsProductionExplainerPanel,
|
|
62796
|
-
|
|
65164
|
+
WhyNowAgentRevolutionExplainerPanel,
|
|
62797
65165
|
focusNodeTool,
|
|
62798
65166
|
onPackageLoad,
|
|
62799
65167
|
onPackageUnload,
|