geonodes-web-render 0.2.0 → 0.3.0
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/embed.css +1 -1
- package/dist/embed.js +243 -210
- package/dist/types/embed.d.ts +7 -2
- package/dist/types/gn/components/GeometryNodesFlow.d.ts +2 -0
- package/dist/types/gn/exporter/nodebpyExporter.d.ts +25 -0
- package/dist/types/utils/formatTreeClipperJson.d.ts +14 -0
- package/package.json +2 -1
package/dist/embed.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
.react-flow{--xy-edge-stroke-default:#b1b1b7;--xy-edge-stroke-width-default:1;--xy-edge-stroke-selected-default:#555;--xy-connectionline-stroke-default:#b1b1b7;--xy-connectionline-stroke-width-default:1;--xy-attribution-background-color-default:#ffffff80;--xy-minimap-background-color-default:#fff;--xy-minimap-mask-background-color-default:#f0f0f099;--xy-minimap-mask-stroke-color-default:transparent;--xy-minimap-mask-stroke-width-default:1;--xy-minimap-node-background-color-default:#e2e2e2;--xy-minimap-node-stroke-color-default:transparent;--xy-minimap-node-stroke-width-default:2;--xy-background-color-default:transparent;--xy-background-pattern-dots-color-default:#91919a;--xy-background-pattern-lines-color-default:#eee;--xy-background-pattern-cross-color-default:#e2e2e2;background-color:var(--xy-background-color,var(--xy-background-color-default));--xy-node-color-default:inherit;--xy-node-border-default:1px solid #1a192b;--xy-node-background-color-default:#fff;--xy-node-group-background-color-default:#f0f0f040;--xy-node-boxshadow-hover-default:0 1px 4px 1px #00000014;--xy-node-boxshadow-selected-default:0 0 0 .5px #1a192b;--xy-node-border-radius-default:3px;--xy-handle-background-color-default:#1a192b;--xy-handle-border-color-default:#fff;--xy-selection-background-color-default:#0059dc14;--xy-selection-border-default:1px dotted #0059dccc;--xy-controls-button-background-color-default:#fefefe;--xy-controls-button-background-color-hover-default:#f4f4f4;--xy-controls-button-color-default:inherit;--xy-controls-button-color-hover-default:inherit;--xy-controls-button-border-color-default:#eee;--xy-controls-box-shadow-default:0 0 2px 1px #00000014;--xy-edge-label-background-color-default:#fff;--xy-edge-label-color-default:inherit;--xy-resize-background-color-default:#3367d9;direction:ltr}.react-flow.dark{--xy-edge-stroke-default:#3e3e3e;--xy-edge-stroke-width-default:1;--xy-edge-stroke-selected-default:#727272;--xy-connectionline-stroke-default:#b1b1b7;--xy-connectionline-stroke-width-default:1;--xy-attribution-background-color-default:#96969640;--xy-minimap-background-color-default:#141414;--xy-minimap-mask-background-color-default:#3c3c3c99;--xy-minimap-mask-stroke-color-default:transparent;--xy-minimap-mask-stroke-width-default:1;--xy-minimap-node-background-color-default:#2b2b2b;--xy-minimap-node-stroke-color-default:transparent;--xy-minimap-node-stroke-width-default:2;--xy-background-color-default:#141414;--xy-background-pattern-dots-color-default:#777;--xy-background-pattern-lines-color-default:#777;--xy-background-pattern-cross-color-default:#777;--xy-node-color-default:#f8f8f8;--xy-node-border-default:1px solid #3c3c3c;--xy-node-background-color-default:#1e1e1e;--xy-node-group-background-color-default:#f0f0f040;--xy-node-boxshadow-hover-default:0 1px 4px 1px #ffffff14;--xy-node-boxshadow-selected-default:0 0 0 .5px #999;--xy-handle-background-color-default:#bebebe;--xy-handle-border-color-default:#1e1e1e;--xy-selection-background-color-default:#c8c8dc14;--xy-selection-border-default:1px dotted #c8c8dccc;--xy-controls-button-background-color-default:#2b2b2b;--xy-controls-button-background-color-hover-default:#3e3e3e;--xy-controls-button-color-default:#f8f8f8;--xy-controls-button-color-hover-default:#fff;--xy-controls-button-border-color-default:#5b5b5b;--xy-controls-box-shadow-default:0 0 2px 1px #00000014;--xy-edge-label-background-color-default:#141414;--xy-edge-label-color-default:#f8f8f8}.react-flow__background{background-color:var(--xy-background-color-props,var(--xy-background-color,var(--xy-background-color-default)));pointer-events:none;z-index:-1}.react-flow__container{width:100%;height:100%;position:absolute;top:0;left:0}.react-flow__pane{z-index:1;touch-action:none}.react-flow__pane.draggable{cursor:grab}.react-flow__pane.dragging{cursor:grabbing}.react-flow__pane.selection{cursor:pointer}.react-flow__viewport{transform-origin:0 0;z-index:2;pointer-events:none}.react-flow__renderer{z-index:4}.react-flow__selection{z-index:6}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible{outline:none}.react-flow__edge-path{stroke:var(--xy-edge-stroke,var(--xy-edge-stroke-default));stroke-width:var(--xy-edge-stroke-width,var(--xy-edge-stroke-width-default));fill:none}.react-flow__connection-path{stroke:var(--xy-connectionline-stroke,var(--xy-connectionline-stroke-default));stroke-width:var(--xy-connectionline-stroke-width,var(--xy-connectionline-stroke-width-default));fill:none}.react-flow .react-flow__edges{position:absolute}.react-flow .react-flow__edges svg{pointer-events:none;position:absolute;overflow:visible}.react-flow__edge{pointer-events:visibleStroke}.react-flow__edge.selectable{cursor:pointer}.react-flow__edge.animated path{stroke-dasharray:5;animation:.5s linear infinite dashdraw}.react-flow__edge.animated path.react-flow__edge-interaction{stroke-dasharray:none;animation:none}.react-flow__edge.inactive{pointer-events:none}.react-flow__edge.selected,.react-flow__edge:focus,.react-flow__edge:focus-visible{outline:none}.react-flow__edge.selected .react-flow__edge-path,.react-flow__edge.selectable:focus .react-flow__edge-path,.react-flow__edge.selectable:focus-visible .react-flow__edge-path{stroke:var(--xy-edge-stroke-selected,var(--xy-edge-stroke-selected-default))}.react-flow__edge-textwrapper{pointer-events:all}.react-flow__edge .react-flow__edge-text{pointer-events:none;-webkit-user-select:none;user-select:none}.react-flow__arrowhead polyline{stroke:var(--xy-edge-stroke,var(--xy-edge-stroke-default))}.react-flow__arrowhead polyline.arrowclosed{fill:var(--xy-edge-stroke,var(--xy-edge-stroke-default))}.react-flow__connection{pointer-events:none}.react-flow__connection .animated{stroke-dasharray:5;animation:.5s linear infinite dashdraw}svg.react-flow__connectionline{z-index:1001;position:absolute;overflow:visible}.react-flow__nodes{pointer-events:none;transform-origin:0 0}.react-flow__node{-webkit-user-select:none;user-select:none;pointer-events:all;transform-origin:0 0;box-sizing:border-box;cursor:default;position:absolute}.react-flow__node.selectable{cursor:pointer}.react-flow__node.draggable{cursor:grab;pointer-events:all}.react-flow__node.draggable.dragging{cursor:grabbing}.react-flow__nodesselection{z-index:3;transform-origin:0 0;pointer-events:none}.react-flow__nodesselection-rect{pointer-events:all;cursor:grab;position:absolute}.react-flow__handle{pointer-events:none;background-color:var(--xy-handle-background-color,var(--xy-handle-background-color-default));border:1px solid var(--xy-handle-border-color,var(--xy-handle-border-color-default));border-radius:100%;width:6px;min-width:5px;height:6px;min-height:5px;position:absolute}.react-flow__handle.connectingfrom{pointer-events:all}.react-flow__handle.connectionindicator{pointer-events:all;cursor:crosshair}.react-flow__handle-bottom{top:auto;bottom:0;left:50%;transform:translate(-50%,50%)}.react-flow__handle-top{top:0;left:50%;transform:translate(-50%,-50%)}.react-flow__handle-left{top:50%;left:0;transform:translate(-50%,-50%)}.react-flow__handle-right{top:50%;right:0;transform:translate(50%,-50%)}.react-flow__edgeupdater{cursor:move;pointer-events:all}.react-flow__pane.selection .react-flow__panel{pointer-events:none}.react-flow__panel{z-index:5;margin:15px;position:absolute}.react-flow__panel.top{top:0}.react-flow__panel.bottom{bottom:0}.react-flow__panel.top.center,.react-flow__panel.bottom.center{left:50%;transform:translate(-15px)translate(-50%)}.react-flow__panel.left{left:0}.react-flow__panel.right{right:0}.react-flow__panel.left.center,.react-flow__panel.right.center{top:50%;transform:translateY(-15px)translateY(-50%)}.react-flow__attribution{background:var(--xy-attribution-background-color,var(--xy-attribution-background-color-default));margin:0;padding:2px 3px;font-size:10px}.react-flow__attribution a{color:#999;text-decoration:none}@keyframes dashdraw{0%{stroke-dashoffset:10px}}.react-flow__edgelabel-renderer{pointer-events:none;-webkit-user-select:none;user-select:none;width:100%;height:100%;position:absolute;top:0;left:0}.react-flow__viewport-portal{-webkit-user-select:none;user-select:none;width:100%;height:100%;position:absolute;top:0;left:0}.react-flow__minimap{background:var(--xy-minimap-background-color-props,var(--xy-minimap-background-color,var(--xy-minimap-background-color-default)))}.react-flow__minimap-svg{display:block}.react-flow__minimap-mask{fill:var(--xy-minimap-mask-background-color-props,var(--xy-minimap-mask-background-color,var(--xy-minimap-mask-background-color-default)));stroke:var(--xy-minimap-mask-stroke-color-props,var(--xy-minimap-mask-stroke-color,var(--xy-minimap-mask-stroke-color-default)));stroke-width:var(--xy-minimap-mask-stroke-width-props,var(--xy-minimap-mask-stroke-width,var(--xy-minimap-mask-stroke-width-default)))}.react-flow__minimap-node{fill:var(--xy-minimap-node-background-color-props,var(--xy-minimap-node-background-color,var(--xy-minimap-node-background-color-default)));stroke:var(--xy-minimap-node-stroke-color-props,var(--xy-minimap-node-stroke-color,var(--xy-minimap-node-stroke-color-default)));stroke-width:var(--xy-minimap-node-stroke-width-props,var(--xy-minimap-node-stroke-width,var(--xy-minimap-node-stroke-width-default)))}.react-flow__background-pattern.dots{fill:var(--xy-background-pattern-color-props,var(--xy-background-pattern-color,var(--xy-background-pattern-dots-color-default)))}.react-flow__background-pattern.lines{stroke:var(--xy-background-pattern-color-props,var(--xy-background-pattern-color,var(--xy-background-pattern-lines-color-default)))}.react-flow__background-pattern.cross{stroke:var(--xy-background-pattern-color-props,var(--xy-background-pattern-color,var(--xy-background-pattern-cross-color-default)))}.react-flow__controls{box-shadow:var(--xy-controls-box-shadow,var(--xy-controls-box-shadow-default));flex-direction:column;display:flex}.react-flow__controls.horizontal{flex-direction:row}.react-flow__controls-button{background:var(--xy-controls-button-background-color,var(--xy-controls-button-background-color-default));border:none;border-bottom:1px solid var(--xy-controls-button-border-color-props,var(--xy-controls-button-border-color,var(--xy-controls-button-border-color-default)));width:26px;height:26px;color:var(--xy-controls-button-color-props,var(--xy-controls-button-color,var(--xy-controls-button-color-default)));cursor:pointer;-webkit-user-select:none;user-select:none;justify-content:center;align-items:center;padding:4px;display:flex}.react-flow__controls-button svg{fill:currentColor;width:100%;max-width:12px;max-height:12px}.react-flow__edge.updating .react-flow__edge-path{stroke:#777}.react-flow__edge-text{font-size:10px}.react-flow__node.selectable:focus,.react-flow__node.selectable:focus-visible{outline:none}.react-flow__node-input,.react-flow__node-default,.react-flow__node-output,.react-flow__node-group{border-radius:var(--xy-node-border-radius,var(--xy-node-border-radius-default));width:150px;color:var(--xy-node-color,var(--xy-node-color-default));text-align:center;border:var(--xy-node-border,var(--xy-node-border-default));background-color:var(--xy-node-background-color,var(--xy-node-background-color-default));padding:10px;font-size:12px}.react-flow__node-input.selectable:hover,.react-flow__node-default.selectable:hover,.react-flow__node-output.selectable:hover,.react-flow__node-group.selectable:hover{box-shadow:var(--xy-node-boxshadow-hover,var(--xy-node-boxshadow-hover-default))}.react-flow__node-input.selectable.selected,.react-flow__node-input.selectable:focus,.react-flow__node-input.selectable:focus-visible,.react-flow__node-default.selectable.selected,.react-flow__node-default.selectable:focus,.react-flow__node-default.selectable:focus-visible,.react-flow__node-output.selectable.selected,.react-flow__node-output.selectable:focus,.react-flow__node-output.selectable:focus-visible,.react-flow__node-group.selectable.selected,.react-flow__node-group.selectable:focus,.react-flow__node-group.selectable:focus-visible{box-shadow:var(--xy-node-boxshadow-selected,var(--xy-node-boxshadow-selected-default))}.react-flow__node-group{background-color:var(--xy-node-group-background-color,var(--xy-node-group-background-color-default))}.react-flow__nodesselection-rect,.react-flow__selection{background:var(--xy-selection-background-color,var(--xy-selection-background-color-default));border:var(--xy-selection-border,var(--xy-selection-border-default))}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible,.react-flow__selection:focus,.react-flow__selection:focus-visible{outline:none}.react-flow__controls-button:hover{background:var(--xy-controls-button-background-color-hover-props,var(--xy-controls-button-background-color-hover,var(--xy-controls-button-background-color-hover-default)));color:var(--xy-controls-button-color-hover-props,var(--xy-controls-button-color-hover,var(--xy-controls-button-color-hover-default)))}.react-flow__controls-button:disabled{pointer-events:none}.react-flow__controls-button:disabled svg{fill-opacity:.4}.react-flow__controls-button:last-child{border-bottom:none}.react-flow__controls.horizontal .react-flow__controls-button{border-bottom:none;border-right:1px solid var(--xy-controls-button-border-color-props,var(--xy-controls-button-border-color,var(--xy-controls-button-border-color-default)))}.react-flow__controls.horizontal .react-flow__controls-button:last-child{border-right:none}.react-flow__resize-control{position:absolute}.react-flow__resize-control.left,.react-flow__resize-control.right{cursor:ew-resize}.react-flow__resize-control.top,.react-flow__resize-control.bottom{cursor:ns-resize}.react-flow__resize-control.top.left,.react-flow__resize-control.bottom.right{cursor:nwse-resize}.react-flow__resize-control.bottom.left,.react-flow__resize-control.top.right{cursor:nesw-resize}.react-flow__resize-control.handle{background-color:var(--xy-resize-background-color,var(--xy-resize-background-color-default));border:1px solid #fff;border-radius:1px;width:5px;height:5px;translate:-50% -50%}.react-flow__resize-control.handle.left{top:50%;left:0}.react-flow__resize-control.handle.right{top:50%;left:100%}.react-flow__resize-control.handle.top{top:0;left:50%}.react-flow__resize-control.handle.bottom{top:100%;left:50%}.react-flow__resize-control.handle.top.left,.react-flow__resize-control.handle.bottom.left{left:0}.react-flow__resize-control.handle.top.right,.react-flow__resize-control.handle.bottom.right{left:100%}.react-flow__resize-control.line{border-color:var(--xy-resize-background-color,var(--xy-resize-background-color-default));border-style:solid;border-width:0}.react-flow__resize-control.line.left,.react-flow__resize-control.line.right{width:1px;height:100%;top:0;transform:translate(-50%)}.react-flow__resize-control.line.left{border-left-width:1px;left:0}.react-flow__resize-control.line.right{border-right-width:1px;left:100%}.react-flow__resize-control.line.top,.react-flow__resize-control.line.bottom{width:100%;height:1px;left:0;transform:translateY(-50%)}.react-flow__resize-control.line.top{border-top-width:1px;top:0}.react-flow__resize-control.line.bottom{border-bottom-width:1px;top:100%}.react-flow__edge-textbg{fill:var(--xy-edge-label-background-color,var(--xy-edge-label-background-color-default))}.react-flow__edge-text{fill:var(--xy-edge-label-color,var(--xy-edge-label-color-default))}.app-layout{grid-template-columns:minmax(320px,34vw) 1fr;gap:0;width:100%;height:100vh;min-height:100svh;display:grid}.left-pane,.right-pane{min-height:0}.left-pane{border-right:1px solid var(--border)}.panel{flex-direction:column;height:100%;min-height:0;display:flex}.panel-header{border-bottom:1px solid var(--border);align-items:center;gap:12px;padding:10px 12px;display:flex}.panel-title{color:var(--text-h);font-weight:600}.panel-status{opacity:.8;margin-left:auto;font-size:13px}.panel-body{flex:auto;min-height:0;display:flex;overflow:hidden}.panel-footer{border-top:1px solid var(--border);padding:8px 12px;font-size:13px}.tabs{flex-wrap:wrap;gap:6px;display:inline-flex}.tab{appearance:none;border:1px solid var(--border);color:var(--text-h);cursor:pointer;background:0 0;border-radius:8px;padding:6px 10px;font-size:14px}.tab.active{border-color:var(--accent-border);background:var(--accent-bg)}.tab:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.panel-actions{gap:8px;display:inline-flex}.action-button{appearance:none;border:1px solid var(--border);color:var(--text-h);cursor:pointer;background:0 0;border-radius:8px;padding:6px 10px;font-size:14px}.action-button:disabled{opacity:.5;cursor:not-allowed}.action-button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.cm-editor{width:100%;height:100%}.cm-editor .cm-content{font-family:var(--mono);font-size:12px;line-height:150%}.cm-editor .cm-gutters{font-size:11px}.json-status.ok{color:var(--text)}.json-status.bad{color:#ef4444}.flow-panel .panel-header{justify-content:space-between}.flow-panel__body{background:radial-gradient(1200px 600px at 20% 10%, #aa3bff14, transparent 60%), var(--bg);position:relative}.flow-empty{flex:auto;place-items:center;font-size:14px;display:grid}.flow-error{color:#f87171;text-align:center;flex-direction:column;flex:auto;justify-content:center;align-items:center;gap:8px;padding:24px;font-size:13px;display:flex}.flow-error strong{font-size:14px;font-weight:600}.flow-error span{opacity:.8;word-break:break-word;max-width:480px;font-family:monospace}.flow-panel__body .react-flow{--xy-background-color-default:transparent;--xy-controls-button-background-color-default:var(--bg);--xy-controls-button-color-default:var(--text-h);--xy-controls-button-border-color-default:var(--border);--xy-edge-stroke-width-default:2.5;width:100%;height:100%}.flow-panel__body .react-flow__attribution{display:none}.flow-panel__body .react-flow__pane{cursor:grab}.flow-panel__body .react-flow__pane:active{cursor:grabbing}.flow-panel__body .react-flow__node,.flow-panel__body .react-flow__edge{pointer-events:none}.gn-reroute{background:var(--gn-reroute-color,#888);pointer-events:none;border:2px solid #00000059;border-radius:50%;width:12px;height:12px;box-shadow:0 0 0 1px #ffffff1f}.gn-reroute .gn-reroute__handle{opacity:0;pointer-events:none;cursor:default;background:0 0!important;border:none!important;width:1px!important;min-width:0!important;height:1px!important;min-height:0!important}.gn-reroute .react-flow__handle-left.gn-reroute__handle{top:50%;left:0;transform:translate(-50%,-50%)}.gn-reroute .react-flow__handle-right.gn-reroute__handle{top:50%;right:0;transform:translate(50%,-50%)}.gn-node{box-sizing:border-box;border:1px solid var(--border);background:color-mix(in srgb, var(--bg) 88%, #111827 12%);color:var(--text-h);box-shadow:var(--shadow);border-radius:8px;overflow:visible}.gn-node__header{box-sizing:border-box;border-bottom:1px solid #0000004d;border-top-left-radius:7px;border-top-right-radius:7px;align-items:center;min-height:28px;padding:6px 10px;display:flex}.gn-node__title{color:#ffffffd9;font-size:12px;font-weight:600;line-height:1.2}.gn-node__props{background:color-mix(in srgb, var(--bg) 80%, #000 20%);border-bottom:1px solid #00000040;padding:4px 10px}.gn-node__prop-row{color:var(--text);white-space:nowrap;text-overflow:ellipsis;background:color-mix(in srgb, var(--bg) 60%, #000 40%);border:1px solid #ffffff14;border-radius:3px;margin:2px 0;padding:1px 6px;font-size:10px;line-height:1.8;overflow:hidden}.gn-node--group{pointer-events:all;cursor:pointer;border-color:var(--accent-border);box-shadow:0 0 0 1px var(--accent-border), 0 0 16px 3px color-mix(in srgb, var(--accent) 25%, transparent), var(--shadow);transition:box-shadow .15s,border-color .15s;position:relative}.gn-node--group:hover{border-color:var(--accent);box-shadow:0 0 0 1.5px var(--accent), 0 0 24px 6px color-mix(in srgb, var(--accent) 40%, transparent), var(--shadow)}.gn-node__stack{z-index:-1;flex-direction:column;align-items:center;gap:1px;display:flex;position:absolute;top:calc(100% - 2px);left:0;right:0}.gn-node__stack-bar{background:color-mix(in srgb, var(--text) 22%, var(--bg));border:1px solid color-mix(in srgb, var(--text) 45%, var(--bg));border-top:none;border-radius:0 0 5px 5px;height:4px;box-shadow:0 1px 2px #00000026}.gn-node__stack-bar:first-child{opacity:1;width:90%}.gn-node__stack-bar:nth-child(2){opacity:.7;width:78%}.gn-node__stack-bar:nth-child(3){opacity:.45;width:66%}.gn-node__body{background:color-mix(in srgb, var(--bg) 90%, #111827 10%);border-bottom-right-radius:7px;border-bottom-left-radius:7px;padding:6px 0}.gn-node__socket-row{align-items:center;min-height:20px;padding:0 10px;display:flex;position:relative}.gn-node__socket-row--right{justify-content:flex-end}.gn-node__socket-row--right .gn-node__socket-label{text-align:right}.gn-node__socket-label{color:var(--text-h);white-space:nowrap;text-overflow:ellipsis;flex:1 1 0;min-width:0;font-size:10px;line-height:1.2;overflow:hidden}.gn-node__value{color:var(--text);white-space:nowrap;text-align:right;flex-shrink:0;margin-left:8px;font-size:10px;line-height:1.2}.gn-node__color-swatch{border:1px solid var(--border);border-radius:3px;height:14px;margin:2px 8px 4px 18px}.gn-node__curve-wrap{border-bottom:1px solid var(--border);background:#1e1e1e;padding:6px 6px 4px}.gn-node__curve-svg{display:block}.gn-node__curve-zero{stroke:#ffffff26;stroke-width:1px;fill:none;stroke-dasharray:3 3}.gn-node__curve-fill{fill:#ffffff14}.gn-node__curve-stroke{fill:none;stroke:#ffffffbf;stroke-width:1.5px;stroke-linejoin:round;stroke-linecap:round}.gn-node__curve-dot{fill:#ccc;stroke:#1e1e1e;stroke-width:1px}.gn-node__vec-block{border:1px solid var(--border);border-radius:4px;margin:1px 8px 4px 18px;overflow:hidden}.gn-node__vec-row{background:color-mix(in srgb, var(--bg) 70%, #111827 30%);border-top:1px solid var(--border);justify-content:space-between;align-items:center;height:16px;padding:0 6px;display:flex}.gn-node__vec-row:first-child{border-top:none}.gn-node__vec-label{color:var(--text);text-transform:uppercase;flex-shrink:0;width:10px;font-size:9px}.gn-node__vec-value{color:var(--text-h);text-align:right;font-size:9px}.gn-node .react-flow__handle.gn-socket{pointer-events:none;cursor:default;background:0 0;border:1px solid #0000;margin-top:0;top:50%}.gn-node .react-flow__handle.gn-socket--circle{border-radius:999px;width:8px;height:8px}.gn-node .react-flow__handle.gn-socket--line{border-radius:1px;width:7px;height:12px}.gn-node .react-flow__handle.gn-socket--diamond{border-radius:1px;width:8px;height:8px}.gn-node .react-flow__handle.gn-socket--list,.gn-node .react-flow__handle.gn-socket--grid{border-radius:2px;width:9px;height:9px}.gn-node .react-flow__handle-left.gn-socket{left:0;transform:translate(-50%,-50%)}.gn-node .react-flow__handle-right.gn-socket{right:0;transform:translate(50%,-50%)}.gn-node .react-flow__handle-left.gn-socket--diamond{transform:translate(-50%,-50%)rotate(45deg)}.gn-node .react-flow__handle-right.gn-socket--diamond{transform:translate(50%,-50%)rotate(45deg)}.flow-panel__body .react-flow__edge-path{stroke-width:2.5px}.flow-panel__body .react-flow__edge.selected .react-flow__edge-path,.flow-panel__body .react-flow__edge-path{stroke-linecap:round;stroke-linejoin:round}@media (width<=980px){.app-layout{grid-template-rows:55svh 1fr;grid-template-columns:1fr}.left-pane{border-right:none;border-bottom:1px solid var(--border)}}.geonodes-embed{background:var(--bg,#1a1a1a);flex-direction:column;height:100%;min-height:0;display:flex}.geonodes-embed--dark{--text:#9ca3af;--text-h:#f3f4f6;--bg:#16171d;--border:#2e303a;--code-bg:#1f2028;--accent:#c084fc;--accent-bg:#c084fc26;--accent-border:#c084fc80;color:var(--text);background:var(--bg)}.geonodes-embed__header{border-bottom:1px solid var(--border,#333);flex-shrink:0;align-items:center;padding:6px 10px;display:flex}.geonodes-embed__title{color:var(--text-h,#eee);font-weight:600}.geonodes-embed__body{flex:auto;min-height:0;overflow:hidden}.gn-breadcrumbs{background:color-mix(in srgb, var(--bg) 85%, #000 15%);border:1px solid var(--border);pointer-events:all;border-radius:6px;flex-wrap:wrap;align-items:center;gap:2px;padding:4px 8px;font-size:12px;display:flex}.gn-breadcrumbs__item{align-items:center;gap:2px;display:inline-flex}.gn-breadcrumbs__sep{color:var(--text);opacity:.6;padding:0 2px}.gn-breadcrumbs__link{appearance:none;color:var(--text);cursor:pointer;background:0 0;border:none;border-radius:4px;padding:2px 4px;font-size:12px}.gn-breadcrumbs__link:hover{color:var(--accent);background:var(--accent-bg)}.gn-breadcrumbs__current{color:var(--text-h);padding:2px 4px;font-weight:600}.tree-clipper-badge{background:color-mix(in srgb, var(--bg) 85%, #000 15%);border:1px solid var(--border);color:var(--text);white-space:nowrap;opacity:.75;pointer-events:all;border-radius:6px;padding:5px 10px;font-size:11px;text-decoration:none;transition:opacity .15s,border-color .15s;display:inline-block}.tree-clipper-badge:hover{opacity:1;border-color:var(--accent-border);color:var(--accent)}
|
|
1
|
+
.react-flow{--xy-edge-stroke-default:#b1b1b7;--xy-edge-stroke-width-default:1;--xy-edge-stroke-selected-default:#555;--xy-connectionline-stroke-default:#b1b1b7;--xy-connectionline-stroke-width-default:1;--xy-attribution-background-color-default:#ffffff80;--xy-minimap-background-color-default:#fff;--xy-minimap-mask-background-color-default:#f0f0f099;--xy-minimap-mask-stroke-color-default:transparent;--xy-minimap-mask-stroke-width-default:1;--xy-minimap-node-background-color-default:#e2e2e2;--xy-minimap-node-stroke-color-default:transparent;--xy-minimap-node-stroke-width-default:2;--xy-background-color-default:transparent;--xy-background-pattern-dots-color-default:#91919a;--xy-background-pattern-lines-color-default:#eee;--xy-background-pattern-cross-color-default:#e2e2e2;background-color:var(--xy-background-color,var(--xy-background-color-default));--xy-node-color-default:inherit;--xy-node-border-default:1px solid #1a192b;--xy-node-background-color-default:#fff;--xy-node-group-background-color-default:#f0f0f040;--xy-node-boxshadow-hover-default:0 1px 4px 1px #00000014;--xy-node-boxshadow-selected-default:0 0 0 .5px #1a192b;--xy-node-border-radius-default:3px;--xy-handle-background-color-default:#1a192b;--xy-handle-border-color-default:#fff;--xy-selection-background-color-default:#0059dc14;--xy-selection-border-default:1px dotted #0059dccc;--xy-controls-button-background-color-default:#fefefe;--xy-controls-button-background-color-hover-default:#f4f4f4;--xy-controls-button-color-default:inherit;--xy-controls-button-color-hover-default:inherit;--xy-controls-button-border-color-default:#eee;--xy-controls-box-shadow-default:0 0 2px 1px #00000014;--xy-edge-label-background-color-default:#fff;--xy-edge-label-color-default:inherit;--xy-resize-background-color-default:#3367d9;direction:ltr}.react-flow.dark{--xy-edge-stroke-default:#3e3e3e;--xy-edge-stroke-width-default:1;--xy-edge-stroke-selected-default:#727272;--xy-connectionline-stroke-default:#b1b1b7;--xy-connectionline-stroke-width-default:1;--xy-attribution-background-color-default:#96969640;--xy-minimap-background-color-default:#141414;--xy-minimap-mask-background-color-default:#3c3c3c99;--xy-minimap-mask-stroke-color-default:transparent;--xy-minimap-mask-stroke-width-default:1;--xy-minimap-node-background-color-default:#2b2b2b;--xy-minimap-node-stroke-color-default:transparent;--xy-minimap-node-stroke-width-default:2;--xy-background-color-default:#141414;--xy-background-pattern-dots-color-default:#777;--xy-background-pattern-lines-color-default:#777;--xy-background-pattern-cross-color-default:#777;--xy-node-color-default:#f8f8f8;--xy-node-border-default:1px solid #3c3c3c;--xy-node-background-color-default:#1e1e1e;--xy-node-group-background-color-default:#f0f0f040;--xy-node-boxshadow-hover-default:0 1px 4px 1px #ffffff14;--xy-node-boxshadow-selected-default:0 0 0 .5px #999;--xy-handle-background-color-default:#bebebe;--xy-handle-border-color-default:#1e1e1e;--xy-selection-background-color-default:#c8c8dc14;--xy-selection-border-default:1px dotted #c8c8dccc;--xy-controls-button-background-color-default:#2b2b2b;--xy-controls-button-background-color-hover-default:#3e3e3e;--xy-controls-button-color-default:#f8f8f8;--xy-controls-button-color-hover-default:#fff;--xy-controls-button-border-color-default:#5b5b5b;--xy-controls-box-shadow-default:0 0 2px 1px #00000014;--xy-edge-label-background-color-default:#141414;--xy-edge-label-color-default:#f8f8f8}.react-flow__background{background-color:var(--xy-background-color-props,var(--xy-background-color,var(--xy-background-color-default)));pointer-events:none;z-index:-1}.react-flow__container{width:100%;height:100%;position:absolute;top:0;left:0}.react-flow__pane{z-index:1;touch-action:none}.react-flow__pane.draggable{cursor:grab}.react-flow__pane.dragging{cursor:grabbing}.react-flow__pane.selection{cursor:pointer}.react-flow__viewport{transform-origin:0 0;z-index:2;pointer-events:none}.react-flow__renderer{z-index:4}.react-flow__selection{z-index:6}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible{outline:none}.react-flow__edge-path{stroke:var(--xy-edge-stroke,var(--xy-edge-stroke-default));stroke-width:var(--xy-edge-stroke-width,var(--xy-edge-stroke-width-default));fill:none}.react-flow__connection-path{stroke:var(--xy-connectionline-stroke,var(--xy-connectionline-stroke-default));stroke-width:var(--xy-connectionline-stroke-width,var(--xy-connectionline-stroke-width-default));fill:none}.react-flow .react-flow__edges{position:absolute}.react-flow .react-flow__edges svg{pointer-events:none;position:absolute;overflow:visible}.react-flow__edge{pointer-events:visibleStroke}.react-flow__edge.selectable{cursor:pointer}.react-flow__edge.animated path{stroke-dasharray:5;animation:.5s linear infinite dashdraw}.react-flow__edge.animated path.react-flow__edge-interaction{stroke-dasharray:none;animation:none}.react-flow__edge.inactive{pointer-events:none}.react-flow__edge.selected,.react-flow__edge:focus,.react-flow__edge:focus-visible{outline:none}.react-flow__edge.selected .react-flow__edge-path,.react-flow__edge.selectable:focus .react-flow__edge-path,.react-flow__edge.selectable:focus-visible .react-flow__edge-path{stroke:var(--xy-edge-stroke-selected,var(--xy-edge-stroke-selected-default))}.react-flow__edge-textwrapper{pointer-events:all}.react-flow__edge .react-flow__edge-text{pointer-events:none;-webkit-user-select:none;user-select:none}.react-flow__arrowhead polyline{stroke:var(--xy-edge-stroke,var(--xy-edge-stroke-default))}.react-flow__arrowhead polyline.arrowclosed{fill:var(--xy-edge-stroke,var(--xy-edge-stroke-default))}.react-flow__connection{pointer-events:none}.react-flow__connection .animated{stroke-dasharray:5;animation:.5s linear infinite dashdraw}svg.react-flow__connectionline{z-index:1001;position:absolute;overflow:visible}.react-flow__nodes{pointer-events:none;transform-origin:0 0}.react-flow__node{-webkit-user-select:none;user-select:none;pointer-events:all;transform-origin:0 0;box-sizing:border-box;cursor:default;position:absolute}.react-flow__node.selectable{cursor:pointer}.react-flow__node.draggable{cursor:grab;pointer-events:all}.react-flow__node.draggable.dragging{cursor:grabbing}.react-flow__nodesselection{z-index:3;transform-origin:0 0;pointer-events:none}.react-flow__nodesselection-rect{pointer-events:all;cursor:grab;position:absolute}.react-flow__handle{pointer-events:none;background-color:var(--xy-handle-background-color,var(--xy-handle-background-color-default));border:1px solid var(--xy-handle-border-color,var(--xy-handle-border-color-default));border-radius:100%;width:6px;min-width:5px;height:6px;min-height:5px;position:absolute}.react-flow__handle.connectingfrom{pointer-events:all}.react-flow__handle.connectionindicator{pointer-events:all;cursor:crosshair}.react-flow__handle-bottom{top:auto;bottom:0;left:50%;transform:translate(-50%,50%)}.react-flow__handle-top{top:0;left:50%;transform:translate(-50%,-50%)}.react-flow__handle-left{top:50%;left:0;transform:translate(-50%,-50%)}.react-flow__handle-right{top:50%;right:0;transform:translate(50%,-50%)}.react-flow__edgeupdater{cursor:move;pointer-events:all}.react-flow__pane.selection .react-flow__panel{pointer-events:none}.react-flow__panel{z-index:5;margin:15px;position:absolute}.react-flow__panel.top{top:0}.react-flow__panel.bottom{bottom:0}.react-flow__panel.top.center,.react-flow__panel.bottom.center{left:50%;transform:translate(-15px)translate(-50%)}.react-flow__panel.left{left:0}.react-flow__panel.right{right:0}.react-flow__panel.left.center,.react-flow__panel.right.center{top:50%;transform:translateY(-15px)translateY(-50%)}.react-flow__attribution{background:var(--xy-attribution-background-color,var(--xy-attribution-background-color-default));margin:0;padding:2px 3px;font-size:10px}.react-flow__attribution a{color:#999;text-decoration:none}@keyframes dashdraw{0%{stroke-dashoffset:10px}}.react-flow__edgelabel-renderer{pointer-events:none;-webkit-user-select:none;user-select:none;width:100%;height:100%;position:absolute;top:0;left:0}.react-flow__viewport-portal{-webkit-user-select:none;user-select:none;width:100%;height:100%;position:absolute;top:0;left:0}.react-flow__minimap{background:var(--xy-minimap-background-color-props,var(--xy-minimap-background-color,var(--xy-minimap-background-color-default)))}.react-flow__minimap-svg{display:block}.react-flow__minimap-mask{fill:var(--xy-minimap-mask-background-color-props,var(--xy-minimap-mask-background-color,var(--xy-minimap-mask-background-color-default)));stroke:var(--xy-minimap-mask-stroke-color-props,var(--xy-minimap-mask-stroke-color,var(--xy-minimap-mask-stroke-color-default)));stroke-width:var(--xy-minimap-mask-stroke-width-props,var(--xy-minimap-mask-stroke-width,var(--xy-minimap-mask-stroke-width-default)))}.react-flow__minimap-node{fill:var(--xy-minimap-node-background-color-props,var(--xy-minimap-node-background-color,var(--xy-minimap-node-background-color-default)));stroke:var(--xy-minimap-node-stroke-color-props,var(--xy-minimap-node-stroke-color,var(--xy-minimap-node-stroke-color-default)));stroke-width:var(--xy-minimap-node-stroke-width-props,var(--xy-minimap-node-stroke-width,var(--xy-minimap-node-stroke-width-default)))}.react-flow__background-pattern.dots{fill:var(--xy-background-pattern-color-props,var(--xy-background-pattern-color,var(--xy-background-pattern-dots-color-default)))}.react-flow__background-pattern.lines{stroke:var(--xy-background-pattern-color-props,var(--xy-background-pattern-color,var(--xy-background-pattern-lines-color-default)))}.react-flow__background-pattern.cross{stroke:var(--xy-background-pattern-color-props,var(--xy-background-pattern-color,var(--xy-background-pattern-cross-color-default)))}.react-flow__controls{box-shadow:var(--xy-controls-box-shadow,var(--xy-controls-box-shadow-default));flex-direction:column;display:flex}.react-flow__controls.horizontal{flex-direction:row}.react-flow__controls-button{background:var(--xy-controls-button-background-color,var(--xy-controls-button-background-color-default));border:none;border-bottom:1px solid var(--xy-controls-button-border-color-props,var(--xy-controls-button-border-color,var(--xy-controls-button-border-color-default)));width:26px;height:26px;color:var(--xy-controls-button-color-props,var(--xy-controls-button-color,var(--xy-controls-button-color-default)));cursor:pointer;-webkit-user-select:none;user-select:none;justify-content:center;align-items:center;padding:4px;display:flex}.react-flow__controls-button svg{fill:currentColor;width:100%;max-width:12px;max-height:12px}.react-flow__edge.updating .react-flow__edge-path{stroke:#777}.react-flow__edge-text{font-size:10px}.react-flow__node.selectable:focus,.react-flow__node.selectable:focus-visible{outline:none}.react-flow__node-input,.react-flow__node-default,.react-flow__node-output,.react-flow__node-group{border-radius:var(--xy-node-border-radius,var(--xy-node-border-radius-default));width:150px;color:var(--xy-node-color,var(--xy-node-color-default));text-align:center;border:var(--xy-node-border,var(--xy-node-border-default));background-color:var(--xy-node-background-color,var(--xy-node-background-color-default));padding:10px;font-size:12px}.react-flow__node-input.selectable:hover,.react-flow__node-default.selectable:hover,.react-flow__node-output.selectable:hover,.react-flow__node-group.selectable:hover{box-shadow:var(--xy-node-boxshadow-hover,var(--xy-node-boxshadow-hover-default))}.react-flow__node-input.selectable.selected,.react-flow__node-input.selectable:focus,.react-flow__node-input.selectable:focus-visible,.react-flow__node-default.selectable.selected,.react-flow__node-default.selectable:focus,.react-flow__node-default.selectable:focus-visible,.react-flow__node-output.selectable.selected,.react-flow__node-output.selectable:focus,.react-flow__node-output.selectable:focus-visible,.react-flow__node-group.selectable.selected,.react-flow__node-group.selectable:focus,.react-flow__node-group.selectable:focus-visible{box-shadow:var(--xy-node-boxshadow-selected,var(--xy-node-boxshadow-selected-default))}.react-flow__node-group{background-color:var(--xy-node-group-background-color,var(--xy-node-group-background-color-default))}.react-flow__nodesselection-rect,.react-flow__selection{background:var(--xy-selection-background-color,var(--xy-selection-background-color-default));border:var(--xy-selection-border,var(--xy-selection-border-default))}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible,.react-flow__selection:focus,.react-flow__selection:focus-visible{outline:none}.react-flow__controls-button:hover{background:var(--xy-controls-button-background-color-hover-props,var(--xy-controls-button-background-color-hover,var(--xy-controls-button-background-color-hover-default)));color:var(--xy-controls-button-color-hover-props,var(--xy-controls-button-color-hover,var(--xy-controls-button-color-hover-default)))}.react-flow__controls-button:disabled{pointer-events:none}.react-flow__controls-button:disabled svg{fill-opacity:.4}.react-flow__controls-button:last-child{border-bottom:none}.react-flow__controls.horizontal .react-flow__controls-button{border-bottom:none;border-right:1px solid var(--xy-controls-button-border-color-props,var(--xy-controls-button-border-color,var(--xy-controls-button-border-color-default)))}.react-flow__controls.horizontal .react-flow__controls-button:last-child{border-right:none}.react-flow__resize-control{position:absolute}.react-flow__resize-control.left,.react-flow__resize-control.right{cursor:ew-resize}.react-flow__resize-control.top,.react-flow__resize-control.bottom{cursor:ns-resize}.react-flow__resize-control.top.left,.react-flow__resize-control.bottom.right{cursor:nwse-resize}.react-flow__resize-control.bottom.left,.react-flow__resize-control.top.right{cursor:nesw-resize}.react-flow__resize-control.handle{background-color:var(--xy-resize-background-color,var(--xy-resize-background-color-default));border:1px solid #fff;border-radius:1px;width:5px;height:5px;translate:-50% -50%}.react-flow__resize-control.handle.left{top:50%;left:0}.react-flow__resize-control.handle.right{top:50%;left:100%}.react-flow__resize-control.handle.top{top:0;left:50%}.react-flow__resize-control.handle.bottom{top:100%;left:50%}.react-flow__resize-control.handle.top.left,.react-flow__resize-control.handle.bottom.left{left:0}.react-flow__resize-control.handle.top.right,.react-flow__resize-control.handle.bottom.right{left:100%}.react-flow__resize-control.line{border-color:var(--xy-resize-background-color,var(--xy-resize-background-color-default));border-style:solid;border-width:0}.react-flow__resize-control.line.left,.react-flow__resize-control.line.right{width:1px;height:100%;top:0;transform:translate(-50%)}.react-flow__resize-control.line.left{border-left-width:1px;left:0}.react-flow__resize-control.line.right{border-right-width:1px;left:100%}.react-flow__resize-control.line.top,.react-flow__resize-control.line.bottom{width:100%;height:1px;left:0;transform:translateY(-50%)}.react-flow__resize-control.line.top{border-top-width:1px;top:0}.react-flow__resize-control.line.bottom{border-bottom-width:1px;top:100%}.react-flow__edge-textbg{fill:var(--xy-edge-label-background-color,var(--xy-edge-label-background-color-default))}.react-flow__edge-text{fill:var(--xy-edge-label-color,var(--xy-edge-label-color-default))}.app-layout{grid-template-columns:var(--left-w,28%) 6px minmax(0, 1fr) 6px var(--right-w,26%);gap:0;width:100%;height:100vh;min-height:100svh;display:grid}.left-pane,.center-pane,.right-pane{min-width:0;min-height:0}.pane-divider{cursor:col-resize;touch-action:none;position:relative}.pane-divider:after{content:"";background:var(--border);width:1px;margin:0 auto;transition:width .1s,background .1s;position:absolute;inset:0}.pane-divider:hover:after,body.is-resizing .pane-divider:after{background:var(--accent);width:3px}body.is-resizing{cursor:col-resize;-webkit-user-select:none;user-select:none}body.is-resizing .left-pane,body.is-resizing .center-pane,body.is-resizing .right-pane{pointer-events:none}.panel-body .cm-content{padding:10px 14px 24px}.right-pane .cm-content,.right-pane .cm-gutters{font-size:15px}.flow-panel__body .react-flow__node.selected:not(:has(.gn-reroute)){outline:2px solid var(--accent);outline-offset:2px;border-radius:6px}.flow-panel__body .react-flow__node.selected .gn-reroute{box-shadow:0 0 0 1px #00000059, 0 0 0 3px var(--bg), 0 0 0 5px var(--accent)}.flow-panel__body .react-flow__selection{border:1px solid var(--accent);background:var(--accent-bg)}.panel{flex-direction:column;height:100%;min-height:0;display:flex}.panel-header{border-bottom:1px solid var(--border);align-items:center;gap:12px;padding:10px 12px;display:flex}.panel-title{color:var(--text-h);font-weight:600}.panel-status{opacity:.8;margin-left:auto;font-size:13px}.panel-body{flex:auto;min-height:0;display:flex;overflow:hidden}.panel-footer{border-top:1px solid var(--border);padding:8px 12px;font-size:13px}.tabs{flex-wrap:wrap;gap:6px;display:inline-flex}.tab{appearance:none;border:1px solid var(--border);color:var(--text-h);cursor:pointer;background:0 0;border-radius:8px;padding:6px 10px;font-size:14px}.tab.active{border-color:var(--accent-border);background:var(--accent-bg)}.tab:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.panel-actions{gap:8px;display:inline-flex}.view-toggle{border:1px solid var(--border);border-radius:8px;display:inline-flex;overflow:hidden}.view-toggle__option{appearance:none;color:var(--text);cursor:pointer;background:0 0;border:none;padding:6px 10px;font-size:13px}.view-toggle__option+.view-toggle__option{border-left:1px solid var(--border)}.view-toggle__option.active{background:var(--accent-bg);color:var(--text-h)}.view-toggle__option:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}.action-button{appearance:none;border:1px solid var(--border);color:var(--text-h);cursor:pointer;background:0 0;border-radius:8px;padding:6px 10px;font-size:14px}.action-button:disabled{opacity:.5;cursor:not-allowed}.action-button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.cm-editor{width:100%;height:100%}.cm-editor .cm-content{font-family:var(--mono);font-size:12px;line-height:150%}.cm-editor .cm-gutters{font-size:11px}.json-status.ok{color:var(--text)}.json-status.bad{color:#ef4444}.flow-panel .panel-header{justify-content:space-between}.flow-panel__body{background:radial-gradient(1200px 600px at 20% 10%, #aa3bff14, transparent 60%), var(--bg);position:relative}.flow-empty{flex:auto;place-items:center;font-size:14px;display:grid}.flow-error{color:#f87171;text-align:center;flex-direction:column;flex:auto;justify-content:center;align-items:center;gap:8px;padding:24px;font-size:13px;display:flex}.flow-error strong{font-size:14px;font-weight:600}.flow-error span{opacity:.8;word-break:break-word;max-width:480px;font-family:monospace}.flow-panel__body .react-flow{--xy-background-color-default:transparent;--xy-controls-button-background-color-default:var(--bg);--xy-controls-button-color-default:var(--text-h);--xy-controls-button-border-color-default:var(--border);--xy-edge-stroke-width-default:2.5;width:100%;height:100%}.flow-panel__body .react-flow__attribution{display:none}.flow-panel__body .react-flow__pane{cursor:grab}.flow-panel__body .react-flow__pane:active{cursor:grabbing}.flow-panel__body .react-flow__node,.flow-panel__body .react-flow__edge{pointer-events:none}.gn-reroute{box-sizing:border-box;background:var(--gn-reroute-color,#888);pointer-events:none;border:2px solid #00000059;border-radius:50%;width:12px;height:12px;box-shadow:0 0 0 1px #ffffff1f}.gn-reroute .gn-reroute__handle{opacity:0;pointer-events:none;cursor:default;background:0 0!important;border:none!important;width:1px!important;min-width:0!important;height:1px!important;min-height:0!important}.gn-reroute .react-flow__handle-left.gn-reroute__handle{top:50%;left:0;transform:translate(-50%,-50%)}.gn-reroute .react-flow__handle-right.gn-reroute__handle{top:50%;right:0;transform:translate(50%,-50%)}.gn-node{box-sizing:border-box;border:1px solid var(--border);background:color-mix(in srgb, var(--bg) 88%, #111827 12%);color:var(--text-h);box-shadow:var(--shadow);border-radius:8px;overflow:visible}.gn-node__header{box-sizing:border-box;border-bottom:1px solid #0000004d;border-top-left-radius:7px;border-top-right-radius:7px;align-items:center;min-height:28px;padding:6px 10px;display:flex}.gn-node__title{color:#ffffffd9;font-size:12px;font-weight:600;line-height:1.2}.gn-node__props{background:color-mix(in srgb, var(--bg) 80%, #000 20%);border-bottom:1px solid #00000040;padding:4px 10px}.gn-node__prop-row{color:var(--text);white-space:nowrap;text-overflow:ellipsis;background:color-mix(in srgb, var(--bg) 60%, #000 40%);border:1px solid #ffffff14;border-radius:3px;margin:2px 0;padding:1px 6px;font-size:10px;line-height:1.8;overflow:hidden}.gn-node--group{pointer-events:all;cursor:pointer;border-color:var(--accent-border);box-shadow:0 0 0 1px var(--accent-border), 0 0 16px 3px color-mix(in srgb, var(--accent) 25%, transparent), var(--shadow);transition:box-shadow .15s,border-color .15s;position:relative}.gn-node--group:hover{border-color:var(--accent);box-shadow:0 0 0 1.5px var(--accent), 0 0 24px 6px color-mix(in srgb, var(--accent) 40%, transparent), var(--shadow)}.gn-node__stack{z-index:-1;flex-direction:column;align-items:center;gap:1px;display:flex;position:absolute;top:calc(100% - 2px);left:0;right:0}.gn-node__stack-bar{background:color-mix(in srgb, var(--text) 22%, var(--bg));border:1px solid color-mix(in srgb, var(--text) 45%, var(--bg));border-top:none;border-radius:0 0 5px 5px;height:4px;box-shadow:0 1px 2px #00000026}.gn-node__stack-bar:first-child{opacity:1;width:90%}.gn-node__stack-bar:nth-child(2){opacity:.7;width:78%}.gn-node__stack-bar:nth-child(3){opacity:.45;width:66%}.gn-node__body{background:color-mix(in srgb, var(--bg) 90%, #111827 10%);border-bottom-right-radius:7px;border-bottom-left-radius:7px;padding:6px 0}.gn-node__socket-row{align-items:center;min-height:20px;padding:0 10px;display:flex;position:relative}.gn-node__socket-row--right{justify-content:flex-end}.gn-node__socket-row--right .gn-node__socket-label{text-align:right}.gn-node__socket-label{color:var(--text-h);white-space:nowrap;text-overflow:ellipsis;flex:1 1 0;min-width:0;font-size:10px;line-height:1.2;overflow:hidden}.gn-node__value{color:var(--text);white-space:nowrap;text-align:right;flex-shrink:0;margin-left:8px;font-size:10px;line-height:1.2}.gn-node__color-swatch{border:1px solid var(--border);border-radius:3px;height:14px;margin:2px 8px 4px 18px}.gn-node__curve-wrap{border-bottom:1px solid var(--border);background:#1e1e1e;padding:6px 6px 4px}.gn-node__curve-svg{display:block}.gn-node__curve-zero{stroke:#ffffff26;stroke-width:1px;fill:none;stroke-dasharray:3 3}.gn-node__curve-fill{fill:#ffffff14}.gn-node__curve-stroke{fill:none;stroke:#ffffffbf;stroke-width:1.5px;stroke-linejoin:round;stroke-linecap:round}.gn-node__curve-dot{fill:#ccc;stroke:#1e1e1e;stroke-width:1px}.gn-node__vec-block{border:1px solid var(--border);border-radius:4px;margin:1px 8px 4px 18px;overflow:hidden}.gn-node__vec-row{background:color-mix(in srgb, var(--bg) 70%, #111827 30%);border-top:1px solid var(--border);justify-content:space-between;align-items:center;height:16px;padding:0 6px;display:flex}.gn-node__vec-row:first-child{border-top:none}.gn-node__vec-label{color:var(--text);text-transform:uppercase;flex-shrink:0;width:10px;font-size:9px}.gn-node__vec-value{color:var(--text-h);text-align:right;font-size:9px}.gn-node .react-flow__handle.gn-socket{pointer-events:none;cursor:default;background:0 0;border:1px solid #0000;margin-top:0;top:50%}.gn-node .react-flow__handle.gn-socket--circle{border-radius:999px;width:8px;height:8px}.gn-node .react-flow__handle.gn-socket--line{border-radius:1px;width:7px;height:12px}.gn-node .react-flow__handle.gn-socket--diamond{border-radius:1px;width:8px;height:8px}.gn-node .react-flow__handle.gn-socket--list,.gn-node .react-flow__handle.gn-socket--grid{border-radius:2px;width:9px;height:9px}.gn-node .react-flow__handle-left.gn-socket{left:0;transform:translate(-50%,-50%)}.gn-node .react-flow__handle-right.gn-socket{right:0;transform:translate(50%,-50%)}.gn-node .react-flow__handle-left.gn-socket--diamond{transform:translate(-50%,-50%)rotate(45deg)}.gn-node .react-flow__handle-right.gn-socket--diamond{transform:translate(50%,-50%)rotate(45deg)}.flow-panel__body .react-flow__edge-path{stroke-width:2.5px}.flow-panel__body .react-flow__edge.selected .react-flow__edge-path,.flow-panel__body .react-flow__edge-path{stroke-linecap:round;stroke-linejoin:round}@media (width<=980px){.app-layout{grid-template-rows:40svh 1fr 30svh;grid-template-columns:1fr}.pane-divider{display:none}.left-pane{border-bottom:1px solid var(--border)}.right-pane{border-top:1px solid var(--border)}}.geonodes-embed{background:var(--bg,#1a1a1a);flex-direction:column;height:100%;min-height:0;display:flex}.geonodes-embed--dark{--text:#9ca3af;--text-h:#f3f4f6;--bg:#16171d;--border:#2e303a;--code-bg:#1f2028;--accent:#c084fc;--accent-bg:#c084fc26;--accent-border:#c084fc80;color:var(--text);background:var(--bg)}.geonodes-embed__header{border-bottom:1px solid var(--border,#333);flex-shrink:0;align-items:center;padding:6px 10px;display:flex}.geonodes-embed__title{color:var(--text-h,#eee);font-weight:600}.geonodes-embed__body{flex:auto;min-height:0;overflow:hidden}.gn-breadcrumbs{background:color-mix(in srgb, var(--bg) 85%, #000 15%);border:1px solid var(--border);pointer-events:all;border-radius:6px;flex-wrap:wrap;align-items:center;gap:2px;padding:4px 8px;font-size:12px;display:flex}.gn-breadcrumbs__item{align-items:center;gap:2px;display:inline-flex}.gn-breadcrumbs__sep{color:var(--text);opacity:.6;padding:0 2px}.gn-breadcrumbs__link{appearance:none;color:var(--text);cursor:pointer;background:0 0;border:none;border-radius:4px;padding:2px 4px;font-size:12px}.gn-breadcrumbs__link:hover{color:var(--accent);background:var(--accent-bg)}.gn-breadcrumbs__current{color:var(--text-h);padding:2px 4px;font-weight:600}.tree-clipper-badge{background:color-mix(in srgb, var(--bg) 85%, #000 15%);border:1px solid var(--border);color:var(--text);white-space:nowrap;opacity:.75;pointer-events:all;border-radius:6px;padding:5px 10px;font-size:11px;text-decoration:none;transition:opacity .15s,border-color .15s;display:inline-block}.tree-clipper-badge:hover{opacity:1;border-color:var(--accent-border);color:var(--accent)}
|
|
2
2
|
/*$vite$:1*/
|
package/dist/embed.js
CHANGED
|
@@ -7108,8 +7108,24 @@ function ud({ nodes: e, edges: t, defaultNodes: n, defaultEdges: r, className: i
|
|
|
7108
7108
|
});
|
|
7109
7109
|
}
|
|
7110
7110
|
var dd = tl(ud);
|
|
7111
|
+
function fd(e) {
|
|
7112
|
+
let [t, n] = f(e);
|
|
7113
|
+
return [
|
|
7114
|
+
t,
|
|
7115
|
+
n,
|
|
7116
|
+
a((e) => n((t) => Gc(e, t)), [])
|
|
7117
|
+
];
|
|
7118
|
+
}
|
|
7119
|
+
function pd(e) {
|
|
7120
|
+
let [t, n] = f(e);
|
|
7121
|
+
return [
|
|
7122
|
+
t,
|
|
7123
|
+
n,
|
|
7124
|
+
a((e) => n((t) => Kc(e, t)), [])
|
|
7125
|
+
];
|
|
7126
|
+
}
|
|
7111
7127
|
J.error014();
|
|
7112
|
-
function
|
|
7128
|
+
function md({ dimensions: e, lineWidth: t, variant: n, className: r }) {
|
|
7113
7129
|
return g("path", {
|
|
7114
7130
|
strokeWidth: t,
|
|
7115
7131
|
d: `M${e[0] / 2} 0 V${e[1]} M0 ${e[1] / 2} H${e[0]}`,
|
|
@@ -7120,7 +7136,7 @@ function fd({ dimensions: e, lineWidth: t, variant: n, className: r }) {
|
|
|
7120
7136
|
])
|
|
7121
7137
|
});
|
|
7122
7138
|
}
|
|
7123
|
-
function
|
|
7139
|
+
function hd({ radius: e, className: t }) {
|
|
7124
7140
|
return g("circle", {
|
|
7125
7141
|
cx: e,
|
|
7126
7142
|
cy: e,
|
|
@@ -7132,20 +7148,20 @@ function pd({ radius: e, className: t }) {
|
|
|
7132
7148
|
])
|
|
7133
7149
|
});
|
|
7134
7150
|
}
|
|
7135
|
-
var
|
|
7151
|
+
var gd;
|
|
7136
7152
|
(function(e) {
|
|
7137
7153
|
e.Lines = "lines", e.Dots = "dots", e.Cross = "cross";
|
|
7138
|
-
})(
|
|
7139
|
-
var
|
|
7140
|
-
[
|
|
7141
|
-
[
|
|
7142
|
-
[
|
|
7143
|
-
},
|
|
7154
|
+
})(gd ||= {});
|
|
7155
|
+
var _d = {
|
|
7156
|
+
[gd.Dots]: 1,
|
|
7157
|
+
[gd.Lines]: 1,
|
|
7158
|
+
[gd.Cross]: 6
|
|
7159
|
+
}, vd = (e) => ({
|
|
7144
7160
|
transform: e.transform,
|
|
7145
7161
|
patternId: `pattern-${e.rfId}`
|
|
7146
7162
|
});
|
|
7147
|
-
function
|
|
7148
|
-
let f = d(null), { transform: p, patternId: m } = Z(
|
|
7163
|
+
function yd({ id: e, variant: t = gd.Dots, gap: n = 20, size: r, lineWidth: i = 1, offset: a = 0, color: o, bgColor: s, style: c, className: l, patternClassName: u }) {
|
|
7164
|
+
let f = d(null), { transform: p, patternId: m } = Z(vd, X), h = r || _d[t], v = t === gd.Dots, y = t === gd.Cross, b = Array.isArray(n) ? n : [n, n], x = [b[0] * p[2] || 1, b[1] * p[2] || 1], C = h * p[2], w = Array.isArray(a) ? a : [a, a], T = y ? [C, C] : x, E = [w[0] * p[2] || 1 + T[0] / 2, w[1] * p[2] || 1 + T[1] / 2], D = `${m}${e || ""}`;
|
|
7149
7165
|
return _("svg", {
|
|
7150
7166
|
className: S(["react-flow__background", l]),
|
|
7151
7167
|
style: {
|
|
@@ -7164,10 +7180,10 @@ function _d({ id: e, variant: t = md.Dots, gap: n = 20, size: r, lineWidth: i =
|
|
|
7164
7180
|
height: x[1],
|
|
7165
7181
|
patternUnits: "userSpaceOnUse",
|
|
7166
7182
|
patternTransform: `translate(-${E[0]},-${E[1]})`,
|
|
7167
|
-
children: v ? g(
|
|
7183
|
+
children: v ? g(hd, {
|
|
7168
7184
|
radius: C / 2,
|
|
7169
7185
|
className: u
|
|
7170
|
-
}) : g(
|
|
7186
|
+
}) : g(md, {
|
|
7171
7187
|
dimensions: T,
|
|
7172
7188
|
lineWidth: i,
|
|
7173
7189
|
variant: t,
|
|
@@ -7182,44 +7198,44 @@ function _d({ id: e, variant: t = md.Dots, gap: n = 20, size: r, lineWidth: i =
|
|
|
7182
7198
|
})]
|
|
7183
7199
|
});
|
|
7184
7200
|
}
|
|
7185
|
-
|
|
7186
|
-
var
|
|
7187
|
-
function
|
|
7201
|
+
yd.displayName = "Background";
|
|
7202
|
+
var bd = i(yd);
|
|
7203
|
+
function xd() {
|
|
7188
7204
|
return g("svg", {
|
|
7189
7205
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7190
7206
|
viewBox: "0 0 32 32",
|
|
7191
7207
|
children: g("path", { d: "M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z" })
|
|
7192
7208
|
});
|
|
7193
7209
|
}
|
|
7194
|
-
function
|
|
7210
|
+
function Sd() {
|
|
7195
7211
|
return g("svg", {
|
|
7196
7212
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7197
7213
|
viewBox: "0 0 32 5",
|
|
7198
7214
|
children: g("path", { d: "M0 0h32v4.2H0z" })
|
|
7199
7215
|
});
|
|
7200
7216
|
}
|
|
7201
|
-
function
|
|
7217
|
+
function Cd() {
|
|
7202
7218
|
return g("svg", {
|
|
7203
7219
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7204
7220
|
viewBox: "0 0 32 30",
|
|
7205
7221
|
children: g("path", { d: "M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z" })
|
|
7206
7222
|
});
|
|
7207
7223
|
}
|
|
7208
|
-
function
|
|
7224
|
+
function wd() {
|
|
7209
7225
|
return g("svg", {
|
|
7210
7226
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7211
7227
|
viewBox: "0 0 25 32",
|
|
7212
7228
|
children: g("path", { d: "M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z" })
|
|
7213
7229
|
});
|
|
7214
7230
|
}
|
|
7215
|
-
function
|
|
7231
|
+
function Td() {
|
|
7216
7232
|
return g("svg", {
|
|
7217
7233
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7218
7234
|
viewBox: "0 0 25 32",
|
|
7219
7235
|
children: g("path", { d: "M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z" })
|
|
7220
7236
|
});
|
|
7221
7237
|
}
|
|
7222
|
-
function
|
|
7238
|
+
function Ed({ children: e, className: t, ...n }) {
|
|
7223
7239
|
return g("button", {
|
|
7224
7240
|
type: "button",
|
|
7225
7241
|
className: S(["react-flow__controls-button", t]),
|
|
@@ -7227,14 +7243,14 @@ function wd({ children: e, className: t, ...n }) {
|
|
|
7227
7243
|
children: e
|
|
7228
7244
|
});
|
|
7229
7245
|
}
|
|
7230
|
-
var
|
|
7246
|
+
var Dd = (e) => ({
|
|
7231
7247
|
isInteractive: e.nodesDraggable || e.nodesConnectable || e.elementsSelectable,
|
|
7232
7248
|
minZoomReached: e.transform[2] <= e.minZoom,
|
|
7233
7249
|
maxZoomReached: e.transform[2] >= e.maxZoom,
|
|
7234
7250
|
ariaLabelConfig: e.ariaLabelConfig
|
|
7235
7251
|
});
|
|
7236
|
-
function
|
|
7237
|
-
let m = Q(), { isInteractive: v, minZoomReached: y, maxZoomReached: b, ariaLabelConfig: x } = Z(
|
|
7252
|
+
function Od({ style: e, showZoom: t = !0, showFitView: n = !0, showInteractive: r = !0, fitViewOptions: i, onZoomIn: a, onZoomOut: o, onFitView: s, onInteractiveChange: c, className: l, children: u, position: d = "bottom-left", orientation: f = "vertical", "aria-label": p }) {
|
|
7253
|
+
let m = Q(), { isInteractive: v, minZoomReached: y, maxZoomReached: b, ariaLabelConfig: x } = Z(Dd, X), { zoomIn: C, zoomOut: w, fitView: T } = ll();
|
|
7238
7254
|
return _(Sc, {
|
|
7239
7255
|
className: S([
|
|
7240
7256
|
"react-flow__controls",
|
|
@@ -7246,7 +7262,7 @@ function Ed({ style: e, showZoom: t = !0, showFitView: n = !0, showInteractive:
|
|
|
7246
7262
|
"data-testid": "rf__controls",
|
|
7247
7263
|
"aria-label": p ?? x["controls.ariaLabel"],
|
|
7248
7264
|
children: [
|
|
7249
|
-
t && _(h, { children: [g(
|
|
7265
|
+
t && _(h, { children: [g(Ed, {
|
|
7250
7266
|
onClick: () => {
|
|
7251
7267
|
C(), a?.();
|
|
7252
7268
|
},
|
|
@@ -7254,8 +7270,8 @@ function Ed({ style: e, showZoom: t = !0, showFitView: n = !0, showInteractive:
|
|
|
7254
7270
|
title: x["controls.zoomIn.ariaLabel"],
|
|
7255
7271
|
"aria-label": x["controls.zoomIn.ariaLabel"],
|
|
7256
7272
|
disabled: b,
|
|
7257
|
-
children: g(
|
|
7258
|
-
}), g(
|
|
7273
|
+
children: g(xd, {})
|
|
7274
|
+
}), g(Ed, {
|
|
7259
7275
|
onClick: () => {
|
|
7260
7276
|
w(), o?.();
|
|
7261
7277
|
},
|
|
@@ -7263,18 +7279,18 @@ function Ed({ style: e, showZoom: t = !0, showFitView: n = !0, showInteractive:
|
|
|
7263
7279
|
title: x["controls.zoomOut.ariaLabel"],
|
|
7264
7280
|
"aria-label": x["controls.zoomOut.ariaLabel"],
|
|
7265
7281
|
disabled: y,
|
|
7266
|
-
children: g(
|
|
7282
|
+
children: g(Sd, {})
|
|
7267
7283
|
})] }),
|
|
7268
|
-
n && g(
|
|
7284
|
+
n && g(Ed, {
|
|
7269
7285
|
className: "react-flow__controls-fitview",
|
|
7270
7286
|
onClick: () => {
|
|
7271
7287
|
T(i), s?.();
|
|
7272
7288
|
},
|
|
7273
7289
|
title: x["controls.fitView.ariaLabel"],
|
|
7274
7290
|
"aria-label": x["controls.fitView.ariaLabel"],
|
|
7275
|
-
children: g(
|
|
7291
|
+
children: g(Cd, {})
|
|
7276
7292
|
}),
|
|
7277
|
-
r && g(
|
|
7293
|
+
r && g(Ed, {
|
|
7278
7294
|
className: "react-flow__controls-interactive",
|
|
7279
7295
|
onClick: () => {
|
|
7280
7296
|
m.setState({
|
|
@@ -7285,15 +7301,15 @@ function Ed({ style: e, showZoom: t = !0, showFitView: n = !0, showInteractive:
|
|
|
7285
7301
|
},
|
|
7286
7302
|
title: x["controls.interactive.ariaLabel"],
|
|
7287
7303
|
"aria-label": x["controls.interactive.ariaLabel"],
|
|
7288
|
-
children: g(v ?
|
|
7304
|
+
children: g(v ? Td : wd, {})
|
|
7289
7305
|
}),
|
|
7290
7306
|
u
|
|
7291
7307
|
]
|
|
7292
7308
|
});
|
|
7293
7309
|
}
|
|
7294
|
-
|
|
7295
|
-
var
|
|
7296
|
-
function
|
|
7310
|
+
Od.displayName = "Controls";
|
|
7311
|
+
var kd = i(Od);
|
|
7312
|
+
function Ad({ id: e, x: t, y: n, width: r, height: i, style: a, color: o, strokeColor: s, strokeWidth: c, className: l, borderRadius: u, shapeRendering: d, selected: f, onClick: p }) {
|
|
7297
7313
|
let { background: m, backgroundColor: h } = a || {}, _ = o || m || h;
|
|
7298
7314
|
return g("rect", {
|
|
7299
7315
|
className: S([
|
|
@@ -7316,10 +7332,10 @@ function Od({ id: e, x: t, y: n, width: r, height: i, style: a, color: o, stroke
|
|
|
7316
7332
|
onClick: p ? (t) => p(t, e) : void 0
|
|
7317
7333
|
});
|
|
7318
7334
|
}
|
|
7319
|
-
var
|
|
7320
|
-
function
|
|
7321
|
-
let s = Z(
|
|
7322
|
-
return g(h, { children: s.map((e) => g(
|
|
7335
|
+
var jd = i(Ad), Md = (e) => e.nodes.map((e) => e.id), Nd = (e) => e instanceof Function ? e : () => e;
|
|
7336
|
+
function Pd({ nodeStrokeColor: e, nodeColor: t, nodeClassName: n = "", nodeBorderRadius: r = 5, nodeStrokeWidth: i, nodeComponent: a = jd, onClick: o }) {
|
|
7337
|
+
let s = Z(Md, X), c = Nd(t), l = Nd(e), u = Nd(n), d = typeof window > "u" || window.chrome ? "crispEdges" : "geometricPrecision";
|
|
7338
|
+
return g(h, { children: s.map((e) => g(Id, {
|
|
7323
7339
|
id: e,
|
|
7324
7340
|
nodeColorFunc: c,
|
|
7325
7341
|
nodeStrokeColorFunc: l,
|
|
@@ -7331,7 +7347,7 @@ function Md({ nodeStrokeColor: e, nodeColor: t, nodeClassName: n = "", nodeBorde
|
|
|
7331
7347
|
shapeRendering: d
|
|
7332
7348
|
}, e)) });
|
|
7333
7349
|
}
|
|
7334
|
-
function
|
|
7350
|
+
function Fd({ id: e, nodeColorFunc: t, nodeStrokeColorFunc: n, nodeClassNameFunc: r, nodeBorderRadius: i, nodeStrokeWidth: a, shapeRendering: o, NodeComponent: s, onClick: c }) {
|
|
7335
7351
|
let { node: l, x: u, y: d, width: f, height: p } = Z((t) => {
|
|
7336
7352
|
let n = t.nodeLookup.get(e);
|
|
7337
7353
|
if (!n) return {
|
|
@@ -7367,7 +7383,7 @@ function Nd({ id: e, nodeColorFunc: t, nodeStrokeColorFunc: n, nodeClassNameFunc
|
|
|
7367
7383
|
id: l.id
|
|
7368
7384
|
});
|
|
7369
7385
|
}
|
|
7370
|
-
var
|
|
7386
|
+
var Id = i(Fd), Ld = i(Pd), Rd = 200, zd = 150, Bd = (e) => !e.hidden, Vd = (e) => {
|
|
7371
7387
|
let t = {
|
|
7372
7388
|
x: -e.transform[0] / e.transform[2],
|
|
7373
7389
|
y: -e.transform[1] / e.transform[2],
|
|
@@ -7376,7 +7392,7 @@ var Pd = i(Nd), Fd = i(Md), Id = 200, Ld = 150, Rd = (e) => !e.hidden, zd = (e)
|
|
|
7376
7392
|
};
|
|
7377
7393
|
return {
|
|
7378
7394
|
viewBB: t,
|
|
7379
|
-
boundingRect: e.nodeLookup.size > 0 ? Ka(ka(e.nodeLookup, { filter:
|
|
7395
|
+
boundingRect: e.nodeLookup.size > 0 ? Ka(ka(e.nodeLookup, { filter: Bd }), t) : t,
|
|
7380
7396
|
rfId: e.rfId,
|
|
7381
7397
|
panZoom: e.panZoom,
|
|
7382
7398
|
translateExtent: e.translateExtent,
|
|
@@ -7384,9 +7400,9 @@ var Pd = i(Nd), Fd = i(Md), Id = 200, Ld = 150, Rd = (e) => !e.hidden, zd = (e)
|
|
|
7384
7400
|
flowHeight: e.height,
|
|
7385
7401
|
ariaLabelConfig: e.ariaLabelConfig
|
|
7386
7402
|
};
|
|
7387
|
-
},
|
|
7388
|
-
function
|
|
7389
|
-
let D = Q(), O = d(null), { boundingRect: k, viewBB: A, rfId: j, panZoom: M, translateExtent: N, flowWidth: P, flowHeight: F, ariaLabelConfig: I } = Z(
|
|
7403
|
+
}, Hd = "react-flow__minimap-desc";
|
|
7404
|
+
function Ud({ style: e, className: t, nodeStrokeColor: n, nodeColor: r, nodeClassName: i = "", nodeBorderRadius: o = 5, nodeStrokeWidth: s, nodeComponent: l, bgColor: u, maskColor: f, maskStrokeColor: p, maskStrokeWidth: m, position: h = "bottom-right", onClick: v, onNodeClick: y, pannable: b = !1, zoomable: x = !1, ariaLabel: C, inversePan: w, zoomStep: T = 1, offsetScale: E = 5 }) {
|
|
7405
|
+
let D = Q(), O = d(null), { boundingRect: k, viewBB: A, rfId: j, panZoom: M, translateExtent: N, flowWidth: P, flowHeight: F, ariaLabelConfig: I } = Z(Vd, X), L = e?.width ?? Rd, R = e?.height ?? zd, ee = k.width / L, z = k.height / R, B = Math.max(ee, z), V = B * L, H = B * R, U = E * B, W = k.x - (V - k.width) / 2 - U, te = k.y - (H - k.height) / 2 - U, ne = V + U * 2, re = H + U * 2, ie = `${Hd}-${j}`, ae = d(0), oe = d();
|
|
7390
7406
|
ae.current = B, c(() => {
|
|
7391
7407
|
if (O.current && M) return oe.current = Ts({
|
|
7392
7408
|
domNode: O.current,
|
|
@@ -7453,7 +7469,7 @@ function Vd({ style: e, className: t, nodeStrokeColor: n, nodeColor: r, nodeClas
|
|
|
7453
7469
|
id: ie,
|
|
7454
7470
|
children: le
|
|
7455
7471
|
}),
|
|
7456
|
-
g(
|
|
7472
|
+
g(Ld, {
|
|
7457
7473
|
onClick: ce,
|
|
7458
7474
|
nodeColor: r,
|
|
7459
7475
|
nodeStrokeColor: n,
|
|
@@ -7473,13 +7489,13 @@ function Vd({ style: e, className: t, nodeStrokeColor: n, nodeColor: r, nodeClas
|
|
|
7473
7489
|
})
|
|
7474
7490
|
});
|
|
7475
7491
|
}
|
|
7476
|
-
|
|
7477
|
-
var
|
|
7492
|
+
Ud.displayName = "MiniMap", i(Ud);
|
|
7493
|
+
var Wd = (e) => (t) => e ? `${Math.max(1 / t.transform[2], 1)}` : void 0, Gd = {
|
|
7478
7494
|
[Bs.Line]: "right",
|
|
7479
7495
|
[Bs.Handle]: "bottom-right"
|
|
7480
7496
|
};
|
|
7481
|
-
function
|
|
7482
|
-
let C = Ol(), w = typeof e == "string" ? e : C, T = Q(), E = d(null), D = n === Bs.Handle, O = Z(a(
|
|
7497
|
+
function Kd({ nodeId: e, position: t, variant: n = Bs.Handle, className: r, style: i = void 0, children: o, color: s, minWidth: l = 10, minHeight: u = 10, maxWidth: f = Number.MAX_VALUE, maxHeight: p = Number.MAX_VALUE, keepAspectRatio: m = !1, resizeDirection: h, autoScale: _ = !0, shouldResize: v, onResizeStart: y, onResize: b, onResizeEnd: x }) {
|
|
7498
|
+
let C = Ol(), w = typeof e == "string" ? e : C, T = Q(), E = d(null), D = n === Bs.Handle, O = Z(a(Wd(D && _), [D, _]), X), k = d(null), A = t ?? Gd[n];
|
|
7483
7499
|
return c(() => {
|
|
7484
7500
|
if (!(!E.current || !w)) return k.current ||= Zs({
|
|
7485
7501
|
domNode: E.current,
|
|
@@ -7605,17 +7621,17 @@ function Wd({ nodeId: e, position: t, variant: n = Bs.Handle, className: r, styl
|
|
|
7605
7621
|
children: o
|
|
7606
7622
|
});
|
|
7607
7623
|
}
|
|
7608
|
-
i(
|
|
7624
|
+
i(Kd);
|
|
7609
7625
|
//#endregion
|
|
7610
7626
|
//#region src/gn/ir/socketColors.ts
|
|
7611
|
-
function
|
|
7627
|
+
function qd(e) {
|
|
7612
7628
|
return e <= .0031308 ? 12.92 * e : 1.055 * e ** (1 / 2.4) - .055;
|
|
7613
7629
|
}
|
|
7614
7630
|
function $(e, t, n) {
|
|
7615
|
-
let r = (e) => Math.round(Math.min(1, Math.max(0,
|
|
7631
|
+
let r = (e) => Math.round(Math.min(1, Math.max(0, qd(e))) * 255).toString(16).padStart(2, "0");
|
|
7616
7632
|
return `#${r(e)}${r(t)}${r(n)}`;
|
|
7617
7633
|
}
|
|
7618
|
-
var
|
|
7634
|
+
var Jd = {
|
|
7619
7635
|
FLOAT: $(.63, .63, .63),
|
|
7620
7636
|
VECTOR: $(.39, .39, .78),
|
|
7621
7637
|
RGBA: $(.78, .78, .16),
|
|
@@ -7637,12 +7653,12 @@ var Kd = {
|
|
|
7637
7653
|
INT_VECTOR: $(.36, .47, .61),
|
|
7638
7654
|
CUSTOM: $(.2, .2, .2)
|
|
7639
7655
|
};
|
|
7640
|
-
function
|
|
7641
|
-
return
|
|
7656
|
+
function Yd(e) {
|
|
7657
|
+
return Jd[e] ?? Jd.CUSTOM;
|
|
7642
7658
|
}
|
|
7643
7659
|
//#endregion
|
|
7644
7660
|
//#region src/gn/ir/nodeColors.ts
|
|
7645
|
-
var
|
|
7661
|
+
var Xd = {
|
|
7646
7662
|
GEOMETRY: "#1d725e",
|
|
7647
7663
|
INPUT: "#82354c",
|
|
7648
7664
|
OUTPUT: "#3e232a",
|
|
@@ -7659,10 +7675,10 @@ var Jd = {
|
|
|
7659
7675
|
SCRIPT: "#203c3c",
|
|
7660
7676
|
DEFAULT: "#303030"
|
|
7661
7677
|
};
|
|
7662
|
-
function
|
|
7678
|
+
function Zd(e) {
|
|
7663
7679
|
return e === "NodeGroupInput" || e === "NodeGroupOutput" ? "INTERFACE" : e.startsWith("NodeGroup") ? "GROUP" : e.startsWith("GeometryNodeSet") || e.startsWith("GeometryNodeTransform") || e.startsWith("GeometryNodeMerge") || e.startsWith("GeometryNodeJoin") || e.startsWith("GeometryNodeDelete") || e.startsWith("GeometryNodeSeparate") || e.startsWith("GeometryNodeDuplicate") || e.startsWith("GeometryNodeExtrude") || e.startsWith("GeometryNodeFlip") || e.startsWith("GeometryNodeSubdivide") || e.startsWith("GeometryNodeTriangulate") || e.startsWith("GeometryNodeMesh") || e.startsWith("GeometryNodeCurve") || e.startsWith("GeometryNodePoints") || e.startsWith("GeometryNodeVolume") || e.startsWith("GeometryNodeInstance") || e.startsWith("GeometryNodeRealize") || e.startsWith("GeometryNodeConvex") || e.startsWith("GeometryNodeFill") || e.startsWith("GeometryNodeSDF") || e.startsWith("GeometryNode") ? "GEOMETRY" : e.startsWith("ShaderNode") ? "SHADER" : e.startsWith("FunctionNode") ? "CONVERTER" : "DEFAULT";
|
|
7664
7680
|
}
|
|
7665
|
-
var
|
|
7681
|
+
var Qd = {
|
|
7666
7682
|
GeometryNodeInputMaterial: "INPUT",
|
|
7667
7683
|
GeometryNodeInputMaterialIndex: "INPUT",
|
|
7668
7684
|
GeometryNodeInputRadius: "INPUT",
|
|
@@ -7713,12 +7729,12 @@ var Xd = {
|
|
|
7713
7729
|
GeometryNodeFieldVariance: "CONVERTER",
|
|
7714
7730
|
GeometryNodeViewer: "OUTPUT"
|
|
7715
7731
|
};
|
|
7716
|
-
function
|
|
7717
|
-
return
|
|
7732
|
+
function $d(e) {
|
|
7733
|
+
return Xd[Qd[e] ?? Zd(e)] ?? Xd.DEFAULT;
|
|
7718
7734
|
}
|
|
7719
7735
|
//#endregion
|
|
7720
7736
|
//#region src/gn/importer/blenderTree.ts
|
|
7721
|
-
var
|
|
7737
|
+
var ef = {
|
|
7722
7738
|
NodeSocketGeometry: "GEOMETRY",
|
|
7723
7739
|
NodeSocketFloat: "FLOAT",
|
|
7724
7740
|
NodeSocketVector: "VECTOR",
|
|
@@ -7735,10 +7751,10 @@ var Qd = {
|
|
|
7735
7751
|
NodeSocketMatrix: "MATRIX",
|
|
7736
7752
|
NodeSocketMenu: "MENU"
|
|
7737
7753
|
};
|
|
7738
|
-
function
|
|
7739
|
-
return
|
|
7754
|
+
function tf(e) {
|
|
7755
|
+
return ef[e] ?? "CUSTOM";
|
|
7740
7756
|
}
|
|
7741
|
-
var
|
|
7757
|
+
var nf = {
|
|
7742
7758
|
HSV: [
|
|
7743
7759
|
"Hue",
|
|
7744
7760
|
"Saturation",
|
|
@@ -7755,7 +7771,7 @@ var ef = {
|
|
|
7755
7771
|
"Blue"
|
|
7756
7772
|
]
|
|
7757
7773
|
};
|
|
7758
|
-
function
|
|
7774
|
+
function rf(e) {
|
|
7759
7775
|
let t = e.data.mapping?.data;
|
|
7760
7776
|
if (!t) return;
|
|
7761
7777
|
let n = t.curves?.data?.items;
|
|
@@ -7773,8 +7789,8 @@ function tf(e) {
|
|
|
7773
7789
|
points: r
|
|
7774
7790
|
};
|
|
7775
7791
|
}
|
|
7776
|
-
function
|
|
7777
|
-
let n =
|
|
7792
|
+
function af(e, t) {
|
|
7793
|
+
let n = nf[t ?? "RGB"] ?? nf.RGB, r = nf.RGB;
|
|
7778
7794
|
return e.map((e) => {
|
|
7779
7795
|
let t = r.indexOf(e.name);
|
|
7780
7796
|
return t === -1 ? e : {
|
|
@@ -7783,11 +7799,11 @@ function nf(e, t) {
|
|
|
7783
7799
|
};
|
|
7784
7800
|
});
|
|
7785
7801
|
}
|
|
7786
|
-
function
|
|
7802
|
+
function of(e) {
|
|
7787
7803
|
return e.replace(/\.\d{3}$/, "");
|
|
7788
7804
|
}
|
|
7789
|
-
function
|
|
7790
|
-
let n =
|
|
7805
|
+
function sf(e, t) {
|
|
7806
|
+
let n = tf(e.data.socket_idname ?? ""), r = Yd(n), i = String(e.data.single_input ?? `${e.id}_in`), a = String(e.data.single_output ?? `${e.id}_out`), o = (e) => ({
|
|
7791
7807
|
id: e,
|
|
7792
7808
|
name: "",
|
|
7793
7809
|
dataType: n,
|
|
@@ -7812,7 +7828,7 @@ function af(e, t) {
|
|
|
7812
7828
|
outputs: [o(a)]
|
|
7813
7829
|
};
|
|
7814
7830
|
}
|
|
7815
|
-
function
|
|
7831
|
+
function cf(e) {
|
|
7816
7832
|
return e == null ? null : Array.isArray(e) && e.length >= 2 ? {
|
|
7817
7833
|
kind: "vec",
|
|
7818
7834
|
values: e
|
|
@@ -7821,20 +7837,20 @@ function of(e) {
|
|
|
7821
7837
|
value: e
|
|
7822
7838
|
} : null;
|
|
7823
7839
|
}
|
|
7824
|
-
function
|
|
7840
|
+
function lf(e, t) {
|
|
7825
7841
|
return {
|
|
7826
7842
|
id: String(e.id),
|
|
7827
7843
|
name: e.data.name,
|
|
7828
7844
|
dataType: e.data.type,
|
|
7829
7845
|
displayShape: e.data.display_shape,
|
|
7830
|
-
color:
|
|
7831
|
-
defaultValue:
|
|
7846
|
+
color: Yd(e.data.type),
|
|
7847
|
+
defaultValue: cf(e.data.default_value),
|
|
7832
7848
|
hideValue: e.data.hide_value ?? !1,
|
|
7833
7849
|
enabled: e.data.enabled ?? !0,
|
|
7834
7850
|
index: t
|
|
7835
7851
|
};
|
|
7836
7852
|
}
|
|
7837
|
-
function
|
|
7853
|
+
function uf(e) {
|
|
7838
7854
|
if (e.data.bl_idname === "FunctionNodeCompare") {
|
|
7839
7855
|
let t = {};
|
|
7840
7856
|
return e.data.data_type && (t.data_type = e.data.data_type), e.data.operation && (t.operation = e.data.operation), Object.keys(t).length > 0 ? t : void 0;
|
|
@@ -7844,7 +7860,7 @@ function cf(e) {
|
|
|
7844
7860
|
return e.data.operation && (t.operation = e.data.operation), e.data.use_clamp && (t.use_clamp = "true"), Object.keys(t).length > 0 ? t : void 0;
|
|
7845
7861
|
}
|
|
7846
7862
|
}
|
|
7847
|
-
function
|
|
7863
|
+
function df(e, t) {
|
|
7848
7864
|
if (!e?.data) throw Error(`"node_trees[${t}].data" is missing.`);
|
|
7849
7865
|
if (!e.data.nodes?.data?.items) throw Error(`"node_trees[${t}].data.nodes.data.items" is missing.`);
|
|
7850
7866
|
if (!e.data.links?.data?.items) throw Error(`"node_trees[${t}].data.links.data.items" is missing.`);
|
|
@@ -7854,10 +7870,10 @@ function lf(e, t) {
|
|
|
7854
7870
|
nodes: e.data.nodes.data.items.map((e, t) => {
|
|
7855
7871
|
if (!e?.data) throw Error(`Node at index ${t} is missing ".data".`);
|
|
7856
7872
|
let n = e.data.location_absolute ?? e.data.location ?? [0, 0];
|
|
7857
|
-
if (e.data.bl_idname === "NodeReroute") return
|
|
7873
|
+
if (e.data.bl_idname === "NodeReroute") return sf(e, n);
|
|
7858
7874
|
let r = (e.data.outputs?.data?.items ?? []).map((t, n) => {
|
|
7859
7875
|
if (!t?.data) throw Error(`Node "${e.data.name}" output socket ${n} is missing ".data".`);
|
|
7860
|
-
return
|
|
7876
|
+
return lf(t, n);
|
|
7861
7877
|
});
|
|
7862
7878
|
e.data.bl_idname === "FunctionNodeInputVector" && Array.isArray(e.data.vector) && (r[0] &&= {
|
|
7863
7879
|
...r[0],
|
|
@@ -7868,20 +7884,20 @@ function lf(e, t) {
|
|
|
7868
7884
|
});
|
|
7869
7885
|
let i = (e.data.inputs?.data?.items ?? []).map((t, n) => {
|
|
7870
7886
|
if (!t?.data) throw Error(`Node "${e.data.name}" input socket ${n} is missing ".data".`);
|
|
7871
|
-
return
|
|
7887
|
+
return lf(t, n);
|
|
7872
7888
|
});
|
|
7873
|
-
(e.data.bl_idname === "ShaderNodeCombineColor" || e.data.bl_idname === "ShaderNodeSeparateColor") && (i =
|
|
7874
|
-
let a = e.data.bl_idname === "ShaderNodeFloatCurve" ?
|
|
7889
|
+
(e.data.bl_idname === "ShaderNodeCombineColor" || e.data.bl_idname === "ShaderNodeSeparateColor") && (i = af(i, e.data.mode));
|
|
7890
|
+
let a = e.data.bl_idname === "ShaderNodeFloatCurve" ? rf(e) : void 0, o = uf(e);
|
|
7875
7891
|
return {
|
|
7876
7892
|
id: String(e.id),
|
|
7877
7893
|
type: e.data.bl_idname,
|
|
7878
|
-
label: e.data.label ||
|
|
7894
|
+
label: e.data.label || of(e.data.name),
|
|
7879
7895
|
position: {
|
|
7880
7896
|
x: n[0],
|
|
7881
7897
|
y: -n[1]
|
|
7882
7898
|
},
|
|
7883
7899
|
width: e.data.width ?? 140,
|
|
7884
|
-
headerColor:
|
|
7900
|
+
headerColor: $d(e.data.bl_idname),
|
|
7885
7901
|
inputs: i,
|
|
7886
7902
|
outputs: r,
|
|
7887
7903
|
floatCurve: a,
|
|
@@ -7899,12 +7915,12 @@ function lf(e, t) {
|
|
|
7899
7915
|
})
|
|
7900
7916
|
};
|
|
7901
7917
|
}
|
|
7902
|
-
function
|
|
7918
|
+
function ff(e) {
|
|
7903
7919
|
if (!e || typeof e != "object") throw Error("JSON root must be an object.");
|
|
7904
7920
|
if (!Array.isArray(e.node_trees) || e.node_trees.length === 0) throw Error("Expected \"node_trees\" array with at least one entry.");
|
|
7905
7921
|
let t = {};
|
|
7906
7922
|
for (let n = 0; n < e.node_trees.length; n++) {
|
|
7907
|
-
let r =
|
|
7923
|
+
let r = df(e.node_trees[n], n);
|
|
7908
7924
|
t[r.id] = r;
|
|
7909
7925
|
}
|
|
7910
7926
|
let n = /* @__PURE__ */ new Set();
|
|
@@ -7923,21 +7939,21 @@ function uf(e) {
|
|
|
7923
7939
|
trees: t
|
|
7924
7940
|
};
|
|
7925
7941
|
}
|
|
7926
|
-
function
|
|
7942
|
+
function pf(e, t) {
|
|
7927
7943
|
return {
|
|
7928
7944
|
...t,
|
|
7929
7945
|
nodeId: e,
|
|
7930
7946
|
direction: "input"
|
|
7931
7947
|
};
|
|
7932
7948
|
}
|
|
7933
|
-
function
|
|
7949
|
+
function mf(e, t) {
|
|
7934
7950
|
return {
|
|
7935
7951
|
...t,
|
|
7936
7952
|
nodeId: e,
|
|
7937
7953
|
direction: "output"
|
|
7938
7954
|
};
|
|
7939
7955
|
}
|
|
7940
|
-
function
|
|
7956
|
+
function hf(e) {
|
|
7941
7957
|
let t = e.nodes.map((e) => ({
|
|
7942
7958
|
id: e.id,
|
|
7943
7959
|
type: e.type,
|
|
@@ -7945,8 +7961,8 @@ function pf(e) {
|
|
|
7945
7961
|
position: e.position,
|
|
7946
7962
|
width: e.width,
|
|
7947
7963
|
headerColor: e.headerColor,
|
|
7948
|
-
inputs: e.inputs.map((t) =>
|
|
7949
|
-
outputs: e.outputs.map((t) =>
|
|
7964
|
+
inputs: e.inputs.map((t) => pf(e.id, t)),
|
|
7965
|
+
outputs: e.outputs.map((t) => mf(e.id, t)),
|
|
7950
7966
|
floatCurve: e.floatCurve,
|
|
7951
7967
|
properties: e.properties,
|
|
7952
7968
|
groupTreeId: e.groupTreeId,
|
|
@@ -7970,11 +7986,11 @@ function pf(e) {
|
|
|
7970
7986
|
}
|
|
7971
7987
|
//#endregion
|
|
7972
7988
|
//#region src/gn/xyflow/mapGraphIRToFlow.ts
|
|
7973
|
-
function
|
|
7989
|
+
function gf(e) {
|
|
7974
7990
|
let t = Math.max(e.inputs.length, e.outputs.length);
|
|
7975
7991
|
return Math.max(60, 32 + t * 18 + 16);
|
|
7976
7992
|
}
|
|
7977
|
-
function
|
|
7993
|
+
function _f(e, t) {
|
|
7978
7994
|
if (e.type === "NodeReroute") {
|
|
7979
7995
|
let t = e.outputs[0]?.color ?? e.inputs[0]?.color ?? "#888888";
|
|
7980
7996
|
return {
|
|
@@ -8014,7 +8030,7 @@ function hf(e, t) {
|
|
|
8014
8030
|
}
|
|
8015
8031
|
};
|
|
8016
8032
|
}
|
|
8017
|
-
function
|
|
8033
|
+
function vf(e, t, n) {
|
|
8018
8034
|
let r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map();
|
|
8019
8035
|
for (let e of n.nodes) r.set(e.id, []), i.set(e.id, []);
|
|
8020
8036
|
for (let e of n.edges) r.has(e.sourceNodeId) || r.set(e.sourceNodeId, []), i.has(e.targetNodeId) || i.set(e.targetNodeId, []), r.get(e.sourceNodeId).push(e.targetNodeId), i.get(e.targetNodeId).push(e.sourceNodeId);
|
|
@@ -8038,16 +8054,16 @@ function gf(e, t, n) {
|
|
|
8038
8054
|
for (let e of a) s.has(e) && l.add(e);
|
|
8039
8055
|
return l;
|
|
8040
8056
|
}
|
|
8041
|
-
function
|
|
8042
|
-
let t = new Set(e.edges.map((e) => e.targetSocketId)), n = e.nodes.map((e) =>
|
|
8057
|
+
function yf(e) {
|
|
8058
|
+
let t = new Set(e.edges.map((e) => e.targetSocketId)), n = e.nodes.map((e) => _f(e, t)), r = e.nodes.find((e) => e.type === "GeometryNodeSimulationInput"), i = e.nodes.find((e) => e.type === "GeometryNodeSimulationOutput"), a = n;
|
|
8043
8059
|
if (r && i) {
|
|
8044
|
-
let t =
|
|
8060
|
+
let t = vf(r.id, i.id, e);
|
|
8045
8061
|
if (t.size > 0) {
|
|
8046
8062
|
let i = new Map(e.nodes.map((e) => [e.id, e])), o = Infinity, s = Infinity, c = -Infinity, l = -Infinity;
|
|
8047
8063
|
for (let e of t) {
|
|
8048
8064
|
let t = i.get(e);
|
|
8049
8065
|
if (!t) continue;
|
|
8050
|
-
let n = t.width, r =
|
|
8066
|
+
let n = t.width, r = gf(t);
|
|
8051
8067
|
o = Math.min(o, t.position.x), s = Math.min(s, t.position.y), c = Math.max(c, t.position.x + n), l = Math.max(l, t.position.y + r);
|
|
8052
8068
|
}
|
|
8053
8069
|
if (Number.isFinite(o) && Number.isFinite(s) && Number.isFinite(c) && Number.isFinite(l)) {
|
|
@@ -8095,10 +8111,10 @@ function _f(e) {
|
|
|
8095
8111
|
}
|
|
8096
8112
|
//#endregion
|
|
8097
8113
|
//#region src/gn/ir/curvePath.ts
|
|
8098
|
-
function
|
|
8114
|
+
function bf(e, t) {
|
|
8099
8115
|
return Math.sqrt(e * e + t * t);
|
|
8100
8116
|
}
|
|
8101
|
-
function
|
|
8117
|
+
function xf(e) {
|
|
8102
8118
|
let t = e.length, n = e.map(({ location: [n, r], handleType: i }, a) => {
|
|
8103
8119
|
let o = a > 0 ? e[a - 1].location : null, s = a < t - 1 ? e[a + 1].location : null;
|
|
8104
8120
|
if (i === "VECTOR") return {
|
|
@@ -8108,11 +8124,11 @@ function yf(e) {
|
|
|
8108
8124
|
let c = 0, l = 0, u = 0, d = 0;
|
|
8109
8125
|
if (o && s) {
|
|
8110
8126
|
let e = n - o[0], t = r - o[1], i = s[0] - n, a = s[1] - r;
|
|
8111
|
-
if (u =
|
|
8112
|
-
let n = e / u + i / d, r = t / u + a / d, o =
|
|
8127
|
+
if (u = bf(e, t), d = bf(i, a), u > 1e-8 && d > 1e-8) {
|
|
8128
|
+
let n = e / u + i / d, r = t / u + a / d, o = bf(n, r);
|
|
8113
8129
|
o > 1e-8 && (c = n / o, l = r / o);
|
|
8114
8130
|
} else d > 1e-8 ? (c = (s[0] - n) / d, l = (s[1] - r) / d) : u > 1e-8 && (c = (n - o[0]) / u, l = (r - o[1]) / u);
|
|
8115
|
-
} else s ? (d =
|
|
8131
|
+
} else s ? (d = bf(s[0] - n, s[1] - r), d > 1e-8 && (c = (s[0] - n) / d, l = (s[1] - r) / d)) : o && (u = bf(n - o[0], r - o[1]), u > 1e-8 && (c = (n - o[0]) / u, l = (r - o[1]) / u));
|
|
8116
8132
|
let f = [n - c * u / 3, r - l * u / 3], p = [n + c * d / 3, r + l * d / 3];
|
|
8117
8133
|
if (i === "AUTO_CLAMPED") {
|
|
8118
8134
|
if (o) {
|
|
@@ -8157,7 +8173,7 @@ function yf(e) {
|
|
|
8157
8173
|
}
|
|
8158
8174
|
return n;
|
|
8159
8175
|
}
|
|
8160
|
-
function
|
|
8176
|
+
function Sf(e, t, n, r, i, a, o) {
|
|
8161
8177
|
let s = r - t || 1, c = i - n || 1, l = (e) => (e - t) / s * a, u = (e) => (1 - (e - n) / c) * o;
|
|
8162
8178
|
if (e.length < 2) return {
|
|
8163
8179
|
strokePath: "",
|
|
@@ -8165,7 +8181,7 @@ function bf(e, t, n, r, i, a, o) {
|
|
|
8165
8181
|
zeroLinePath: "",
|
|
8166
8182
|
dotPositions: []
|
|
8167
8183
|
};
|
|
8168
|
-
let d =
|
|
8184
|
+
let d = xf(e), [f, p] = e[0].location, m = `M ${l(f).toFixed(2)} ${u(p).toFixed(2)}`;
|
|
8169
8185
|
for (let t = 0; t < e.length - 1; t++) {
|
|
8170
8186
|
let n = d[t].right, r = d[t + 1].left, [i, a] = e[t + 1].location;
|
|
8171
8187
|
m += ` C ${l(n[0]).toFixed(2)} ${u(n[1]).toFixed(2)},`, m += ` ${l(r[0]).toFixed(2)} ${u(r[1]).toFixed(2)},`, m += ` ${l(i).toFixed(2)} ${u(a).toFixed(2)}`;
|
|
@@ -8180,18 +8196,18 @@ function bf(e, t, n, r, i, a, o) {
|
|
|
8180
8196
|
}
|
|
8181
8197
|
//#endregion
|
|
8182
8198
|
//#region src/gn/components/groupNavContext.ts
|
|
8183
|
-
var
|
|
8184
|
-
function
|
|
8185
|
-
return o(
|
|
8199
|
+
var Cf = t(null);
|
|
8200
|
+
function wf() {
|
|
8201
|
+
return o(Cf);
|
|
8186
8202
|
}
|
|
8187
8203
|
//#endregion
|
|
8188
8204
|
//#region src/gn/components/GenericGNNode.tsx
|
|
8189
|
-
var
|
|
8205
|
+
var Tf = [
|
|
8190
8206
|
"X",
|
|
8191
8207
|
"Y",
|
|
8192
8208
|
"Z",
|
|
8193
8209
|
"W"
|
|
8194
|
-
],
|
|
8210
|
+
], Ef = {
|
|
8195
8211
|
FLOAT: "Float",
|
|
8196
8212
|
INT: "Integer",
|
|
8197
8213
|
VECTOR: "Vector",
|
|
@@ -8199,7 +8215,7 @@ var Cf = [
|
|
|
8199
8215
|
STRING: "String",
|
|
8200
8216
|
BOOLEAN: "Boolean",
|
|
8201
8217
|
ROTATION: "Rotation"
|
|
8202
|
-
},
|
|
8218
|
+
}, Df = {
|
|
8203
8219
|
EQUAL: "Equal",
|
|
8204
8220
|
NOT_EQUAL: "Not Equal",
|
|
8205
8221
|
LESS_THAN: "Less Than",
|
|
@@ -8245,10 +8261,10 @@ var Cf = [
|
|
|
8245
8261
|
RADIANS: "To Radians",
|
|
8246
8262
|
DEGREES: "To Degrees"
|
|
8247
8263
|
};
|
|
8248
|
-
function
|
|
8249
|
-
return e === "data_type" ?
|
|
8264
|
+
function Of(e, t) {
|
|
8265
|
+
return e === "data_type" ? Ef[t] ?? t : e === "operation" ? Df[t] ?? t : e === "use_clamp" ? "Clamp" : t;
|
|
8250
8266
|
}
|
|
8251
|
-
function
|
|
8267
|
+
function kf(e) {
|
|
8252
8268
|
switch (e) {
|
|
8253
8269
|
case "LINE": return "gn-socket--line";
|
|
8254
8270
|
case "DIAMOND": return "gn-socket--diamond";
|
|
@@ -8257,55 +8273,55 @@ function Df(e) {
|
|
|
8257
8273
|
default: return "gn-socket--circle";
|
|
8258
8274
|
}
|
|
8259
8275
|
}
|
|
8260
|
-
function
|
|
8276
|
+
function Af(e) {
|
|
8261
8277
|
return e === "ROTATION" ? "°" : e === "FLOAT" ? " m" : "";
|
|
8262
8278
|
}
|
|
8263
|
-
function
|
|
8279
|
+
function jf(e) {
|
|
8264
8280
|
return parseFloat(e.toFixed(3)).toString();
|
|
8265
8281
|
}
|
|
8266
|
-
function
|
|
8267
|
-
return typeof e == "boolean" ? e ? "True" : "False" : typeof e == "string" ? e : `${
|
|
8282
|
+
function Mf(e, t) {
|
|
8283
|
+
return typeof e == "boolean" ? e ? "True" : "False" : typeof e == "string" ? e : `${jf(e)}${Af(t)}`;
|
|
8268
8284
|
}
|
|
8269
|
-
function
|
|
8285
|
+
function Nf(e) {
|
|
8270
8286
|
return Math.round(Math.min(1, Math.max(0, e)) * 255);
|
|
8271
8287
|
}
|
|
8272
|
-
function
|
|
8288
|
+
function Pf(e) {
|
|
8273
8289
|
let [t, n, r, i = 1] = e.values;
|
|
8274
8290
|
return /* @__PURE__ */ g("div", {
|
|
8275
8291
|
className: "gn-node__color-swatch",
|
|
8276
|
-
style: { background: `rgba(${
|
|
8292
|
+
style: { background: `rgba(${Nf(t)},${Nf(n)},${Nf(r)},${i.toFixed(2)})` }
|
|
8277
8293
|
});
|
|
8278
8294
|
}
|
|
8279
|
-
function
|
|
8280
|
-
if (e.dataType === "RGBA") return /* @__PURE__ */ g(
|
|
8281
|
-
let t =
|
|
8295
|
+
function Ff(e) {
|
|
8296
|
+
if (e.dataType === "RGBA") return /* @__PURE__ */ g(Pf, { values: e.values });
|
|
8297
|
+
let t = Af(e.dataType);
|
|
8282
8298
|
return /* @__PURE__ */ g("div", {
|
|
8283
8299
|
className: "gn-node__vec-block",
|
|
8284
8300
|
children: e.values.slice(0, 4).map((e, n) => /* @__PURE__ */ _("div", {
|
|
8285
8301
|
className: "gn-node__vec-row",
|
|
8286
8302
|
children: [/* @__PURE__ */ g("span", {
|
|
8287
8303
|
className: "gn-node__vec-label",
|
|
8288
|
-
children:
|
|
8304
|
+
children: Tf[n]
|
|
8289
8305
|
}), /* @__PURE__ */ _("span", {
|
|
8290
8306
|
className: "gn-node__vec-value",
|
|
8291
|
-
children: [
|
|
8307
|
+
children: [jf(e), t]
|
|
8292
8308
|
})]
|
|
8293
8309
|
}, n))
|
|
8294
8310
|
});
|
|
8295
8311
|
}
|
|
8296
|
-
function
|
|
8312
|
+
function If({ properties: e }) {
|
|
8297
8313
|
let t = Object.entries(e);
|
|
8298
8314
|
return t.length === 0 ? null : /* @__PURE__ */ g("div", {
|
|
8299
8315
|
className: "gn-node__props",
|
|
8300
8316
|
children: t.map(([e, t]) => /* @__PURE__ */ g("div", {
|
|
8301
8317
|
className: "gn-node__prop-row",
|
|
8302
|
-
children:
|
|
8318
|
+
children: Of(e, t)
|
|
8303
8319
|
}, e))
|
|
8304
8320
|
});
|
|
8305
8321
|
}
|
|
8306
|
-
var
|
|
8307
|
-
function
|
|
8308
|
-
let n = Math.max(10, t -
|
|
8322
|
+
var Lf = 120, Rf = 6;
|
|
8323
|
+
function zf({ curve: e, width: t }) {
|
|
8324
|
+
let n = Math.max(10, t - Rf * 2), r = Lf, { strokePath: i, fillPath: a, zeroLinePath: o, dotPositions: s } = Sf(e.points, e.clipMinX, e.clipMinY, e.clipMaxX, e.clipMaxY, n, r);
|
|
8309
8325
|
return /* @__PURE__ */ g("div", {
|
|
8310
8326
|
className: "gn-node__curve-wrap",
|
|
8311
8327
|
children: /* @__PURE__ */ _("svg", {
|
|
@@ -8336,7 +8352,7 @@ function Lf({ curve: e, width: t }) {
|
|
|
8336
8352
|
})
|
|
8337
8353
|
});
|
|
8338
8354
|
}
|
|
8339
|
-
function
|
|
8355
|
+
function Bf(e) {
|
|
8340
8356
|
let { socket: t, position: n, type: r, align: i, suppressDefault: a } = e, o = t.name.trim().length === 0, s = !a && !t.hideValue && t.defaultValue?.kind === "scalar";
|
|
8341
8357
|
return /* @__PURE__ */ _("div", {
|
|
8342
8358
|
className: `gn-node__socket-row gn-node__socket-row--${i}`,
|
|
@@ -8345,7 +8361,7 @@ function Rf(e) {
|
|
|
8345
8361
|
id: t.id,
|
|
8346
8362
|
type: r,
|
|
8347
8363
|
position: n,
|
|
8348
|
-
className: `gn-socket ${
|
|
8364
|
+
className: `gn-socket ${kf(t.displayShape)}`,
|
|
8349
8365
|
style: {
|
|
8350
8366
|
top: "50%",
|
|
8351
8367
|
background: t.color,
|
|
@@ -8358,15 +8374,15 @@ function Rf(e) {
|
|
|
8358
8374
|
}),
|
|
8359
8375
|
s && t.defaultValue?.kind === "scalar" ? /* @__PURE__ */ g("span", {
|
|
8360
8376
|
className: "gn-node__value",
|
|
8361
|
-
children:
|
|
8377
|
+
children: Mf(t.defaultValue.value, t.dataType)
|
|
8362
8378
|
}) : null
|
|
8363
8379
|
]
|
|
8364
8380
|
});
|
|
8365
8381
|
}
|
|
8366
|
-
function
|
|
8382
|
+
function Vf(e, t) {
|
|
8367
8383
|
return !t && !e.hideValue && e.defaultValue?.kind === "vec";
|
|
8368
8384
|
}
|
|
8369
|
-
function
|
|
8385
|
+
function Hf() {
|
|
8370
8386
|
return /* @__PURE__ */ _("div", {
|
|
8371
8387
|
className: "gn-node__stack",
|
|
8372
8388
|
"aria-hidden": "true",
|
|
@@ -8377,8 +8393,8 @@ function Bf() {
|
|
|
8377
8393
|
]
|
|
8378
8394
|
});
|
|
8379
8395
|
}
|
|
8380
|
-
function
|
|
8381
|
-
let t = e.data, n =
|
|
8396
|
+
function Uf(e) {
|
|
8397
|
+
let t = e.data, n = wf(), r = new Set(t.connectedInputIds ?? []), i = t.outputs.filter((e) => e.enabled), a = t.inputs.filter((e) => e.enabled), o = t.groupTreeId, s = o !== void 0 && t.groupTreeName !== void 0 && !!n;
|
|
8382
8398
|
return /* @__PURE__ */ _("div", {
|
|
8383
8399
|
className: `gn-node${s ? " gn-node--group nodrag" : ""}`,
|
|
8384
8400
|
onClick: s ? () => n.openGroup(o) : void 0,
|
|
@@ -8393,15 +8409,15 @@ function Vf(e) {
|
|
|
8393
8409
|
children: t.label
|
|
8394
8410
|
})
|
|
8395
8411
|
}),
|
|
8396
|
-
s && /* @__PURE__ */ g(
|
|
8397
|
-
t.properties && /* @__PURE__ */ g(
|
|
8398
|
-
t.floatCurve && /* @__PURE__ */ g(
|
|
8412
|
+
s && /* @__PURE__ */ g(Hf, {}),
|
|
8413
|
+
t.properties && /* @__PURE__ */ g(If, { properties: t.properties }),
|
|
8414
|
+
t.floatCurve && /* @__PURE__ */ g(zf, {
|
|
8399
8415
|
curve: t.floatCurve,
|
|
8400
8416
|
width: t.width
|
|
8401
8417
|
}),
|
|
8402
8418
|
/* @__PURE__ */ _("div", {
|
|
8403
8419
|
className: "gn-node__body",
|
|
8404
|
-
children: [i.map((e) => /* @__PURE__ */ g(
|
|
8420
|
+
children: [i.map((e) => /* @__PURE__ */ g(Bf, {
|
|
8405
8421
|
socket: e,
|
|
8406
8422
|
position: Y.Right,
|
|
8407
8423
|
type: "source",
|
|
@@ -8409,13 +8425,13 @@ function Vf(e) {
|
|
|
8409
8425
|
suppressDefault: !0
|
|
8410
8426
|
}, e.id)), a.map((e) => {
|
|
8411
8427
|
let t = r.has(e.id);
|
|
8412
|
-
return /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g(
|
|
8428
|
+
return /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g(Bf, {
|
|
8413
8429
|
socket: e,
|
|
8414
8430
|
position: Y.Left,
|
|
8415
8431
|
type: "target",
|
|
8416
8432
|
align: "left",
|
|
8417
8433
|
suppressDefault: t
|
|
8418
|
-
}),
|
|
8434
|
+
}), Vf(e, t) ? /* @__PURE__ */ g(Ff, {
|
|
8419
8435
|
values: e.defaultValue.values,
|
|
8420
8436
|
dataType: e.dataType
|
|
8421
8437
|
}) : null] }, e.id);
|
|
@@ -8426,7 +8442,7 @@ function Vf(e) {
|
|
|
8426
8442
|
}
|
|
8427
8443
|
//#endregion
|
|
8428
8444
|
//#region src/gn/components/RerouteNode.tsx
|
|
8429
|
-
function
|
|
8445
|
+
function Wf(e) {
|
|
8430
8446
|
let t = e.data;
|
|
8431
8447
|
return /* @__PURE__ */ _("div", {
|
|
8432
8448
|
className: "gn-reroute",
|
|
@@ -8446,7 +8462,7 @@ function Hf(e) {
|
|
|
8446
8462
|
}
|
|
8447
8463
|
//#endregion
|
|
8448
8464
|
//#region src/gn/components/SimulationZoneFrame.tsx
|
|
8449
|
-
function
|
|
8465
|
+
function Gf(e) {
|
|
8450
8466
|
let t = e.data;
|
|
8451
8467
|
return /* @__PURE__ */ g("div", {
|
|
8452
8468
|
className: "gn-sim-zone",
|
|
@@ -8473,40 +8489,53 @@ function Uf(e) {
|
|
|
8473
8489
|
}
|
|
8474
8490
|
//#endregion
|
|
8475
8491
|
//#region src/gn/components/GeometryNodesFlow.tsx
|
|
8476
|
-
var
|
|
8477
|
-
gnNode:
|
|
8478
|
-
rerouteNode:
|
|
8479
|
-
simulationZone:
|
|
8480
|
-
},
|
|
8481
|
-
function
|
|
8482
|
-
let { nodes: t, edges: n, breadcrumbs: r, onNavigate: i } = e, { fitView:
|
|
8492
|
+
var Kf = {
|
|
8493
|
+
gnNode: Uf,
|
|
8494
|
+
rerouteNode: Wf,
|
|
8495
|
+
simulationZone: Gf
|
|
8496
|
+
}, qf = { padding: .08 };
|
|
8497
|
+
function Jf(e) {
|
|
8498
|
+
let { nodes: t, edges: n, breadcrumbs: r, onNavigate: i, onSelectionIds: o } = e, { fitView: s } = ll(), [l, u, d] = fd(t), [f, p, m] = pd(n);
|
|
8483
8499
|
return c(() => {
|
|
8484
|
-
|
|
8485
|
-
}, [
|
|
8486
|
-
|
|
8487
|
-
|
|
8488
|
-
|
|
8500
|
+
u(t), o?.([]), s(qf);
|
|
8501
|
+
}, [
|
|
8502
|
+
t,
|
|
8503
|
+
u,
|
|
8504
|
+
o,
|
|
8505
|
+
s
|
|
8506
|
+
]), c(() => {
|
|
8507
|
+
p(n);
|
|
8508
|
+
}, [n, p]), /* @__PURE__ */ _(dd, {
|
|
8509
|
+
nodes: l,
|
|
8510
|
+
edges: f,
|
|
8511
|
+
onNodesChange: d,
|
|
8512
|
+
onEdgesChange: m,
|
|
8513
|
+
onSelectionChange: a(({ nodes: e }) => {
|
|
8514
|
+
o?.(e.map((e) => e.id));
|
|
8515
|
+
}, [o]),
|
|
8516
|
+
nodeTypes: Kf,
|
|
8489
8517
|
fitView: !0,
|
|
8490
|
-
fitViewOptions:
|
|
8518
|
+
fitViewOptions: qf,
|
|
8491
8519
|
minZoom: .2,
|
|
8492
8520
|
nodesDraggable: !1,
|
|
8493
8521
|
nodesConnectable: !1,
|
|
8494
|
-
elementsSelectable: !
|
|
8522
|
+
elementsSelectable: !0,
|
|
8495
8523
|
nodesFocusable: !1,
|
|
8496
8524
|
edgesFocusable: !1,
|
|
8497
8525
|
selectNodesOnDrag: !1,
|
|
8498
|
-
selectionOnDrag: !
|
|
8526
|
+
selectionOnDrag: !0,
|
|
8527
|
+
selectionMode: va.Partial,
|
|
8499
8528
|
connectOnClick: !1,
|
|
8500
|
-
panOnDrag:
|
|
8529
|
+
panOnDrag: [1, 2],
|
|
8501
8530
|
panOnScroll: !1,
|
|
8502
8531
|
zoomOnScroll: !0,
|
|
8503
8532
|
zoomOnDoubleClick: !1,
|
|
8504
8533
|
children: [
|
|
8505
|
-
/* @__PURE__ */ g(
|
|
8534
|
+
/* @__PURE__ */ g(bd, {
|
|
8506
8535
|
gap: 20,
|
|
8507
8536
|
size: 1
|
|
8508
8537
|
}),
|
|
8509
|
-
/* @__PURE__ */ g(
|
|
8538
|
+
/* @__PURE__ */ g(kd, { showInteractive: !1 }),
|
|
8510
8539
|
r.length > 1 ? /* @__PURE__ */ g(Sc, {
|
|
8511
8540
|
position: "top-left",
|
|
8512
8541
|
children: /* @__PURE__ */ g("nav", {
|
|
@@ -8547,19 +8576,19 @@ function Kf(e) {
|
|
|
8547
8576
|
]
|
|
8548
8577
|
});
|
|
8549
8578
|
}
|
|
8550
|
-
function
|
|
8551
|
-
let { jsonText: t, showHeader: n = !0 } = e, [
|
|
8579
|
+
function Yf(e) {
|
|
8580
|
+
let { jsonText: t, showHeader: n = !0, onSelectionChange: r } = e, [i, o] = f({
|
|
8552
8581
|
json: t,
|
|
8553
8582
|
ids: []
|
|
8554
|
-
}),
|
|
8583
|
+
}), s = u(() => {
|
|
8555
8584
|
if (!t.trim()) return null;
|
|
8556
8585
|
try {
|
|
8557
|
-
let { rootId: e, trees: n } =
|
|
8586
|
+
let { rootId: e, trees: n } = ff(JSON.parse(t)), r = {};
|
|
8558
8587
|
for (let e of Object.values(n)) {
|
|
8559
|
-
let t =
|
|
8588
|
+
let t = hf(e);
|
|
8560
8589
|
r[t.id] = {
|
|
8561
8590
|
graph: t,
|
|
8562
|
-
flow:
|
|
8591
|
+
flow: yf(t)
|
|
8563
8592
|
};
|
|
8564
8593
|
}
|
|
8565
8594
|
return {
|
|
@@ -8574,36 +8603,36 @@ function qf(e) {
|
|
|
8574
8603
|
error: e instanceof Error ? e.message : String(e)
|
|
8575
8604
|
};
|
|
8576
8605
|
}
|
|
8577
|
-
}, [t]),
|
|
8578
|
-
if (!
|
|
8579
|
-
let e =
|
|
8580
|
-
for (let t of e)
|
|
8606
|
+
}, [t]), l = u(() => {
|
|
8607
|
+
if (!s?.views) return [];
|
|
8608
|
+
let e = i.json === t ? i.ids : [], n = [s.rootId];
|
|
8609
|
+
for (let t of e) s.views[t] && n.push(t);
|
|
8581
8610
|
return n;
|
|
8582
8611
|
}, [
|
|
8583
|
-
|
|
8584
|
-
|
|
8612
|
+
s,
|
|
8613
|
+
i,
|
|
8585
8614
|
t
|
|
8586
|
-
]),
|
|
8587
|
-
|
|
8615
|
+
]), d = s?.views ? s.views[l[l.length - 1]] : null, p = a((e) => {
|
|
8616
|
+
o((n) => ({
|
|
8588
8617
|
json: t,
|
|
8589
8618
|
ids: n.json === t ? [...n.ids, e] : [e]
|
|
8590
8619
|
}));
|
|
8591
|
-
}, [t]),
|
|
8620
|
+
}, [t]), m = u(() => ({ openGroup: p }), [p]);
|
|
8592
8621
|
c(() => {
|
|
8593
|
-
if (
|
|
8622
|
+
if (l.length <= 1) return;
|
|
8594
8623
|
function e(e) {
|
|
8595
8624
|
if (e.key !== "Tab" && e.key !== "Escape" || e.ctrlKey || e.metaKey || e.altKey) return;
|
|
8596
8625
|
let n = e.target;
|
|
8597
|
-
n && (n.isContentEditable || n.tagName === "INPUT" || n.tagName === "TEXTAREA" || n.closest(".cm-editor")) || (e.preventDefault(),
|
|
8626
|
+
n && (n.isContentEditable || n.tagName === "INPUT" || n.tagName === "TEXTAREA" || n.closest(".cm-editor")) || (e.preventDefault(), o({
|
|
8598
8627
|
json: t,
|
|
8599
|
-
ids:
|
|
8628
|
+
ids: l.slice(1, -1)
|
|
8600
8629
|
}));
|
|
8601
8630
|
}
|
|
8602
8631
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
8603
|
-
}, [
|
|
8604
|
-
let
|
|
8632
|
+
}, [l, t]);
|
|
8633
|
+
let h = s?.views ? l.map((e) => ({
|
|
8605
8634
|
id: e,
|
|
8606
|
-
label:
|
|
8635
|
+
label: s.views[e].graph.label
|
|
8607
8636
|
})) : [];
|
|
8608
8637
|
return /* @__PURE__ */ _("div", {
|
|
8609
8638
|
className: "panel flow-panel",
|
|
@@ -8615,24 +8644,25 @@ function qf(e) {
|
|
|
8615
8644
|
}), /* @__PURE__ */ g("div", {
|
|
8616
8645
|
className: "panel-status",
|
|
8617
8646
|
"aria-live": "polite",
|
|
8618
|
-
children:
|
|
8647
|
+
children: d ? `${d.graph.nodes.length} nodes, ${d.graph.edges.length} links` : null
|
|
8619
8648
|
})]
|
|
8620
8649
|
}) : null, /* @__PURE__ */ g("div", {
|
|
8621
8650
|
className: "panel-body flow-panel__body",
|
|
8622
|
-
children:
|
|
8651
|
+
children: s?.error ? /* @__PURE__ */ _("div", {
|
|
8623
8652
|
className: "flow-error",
|
|
8624
8653
|
role: "alert",
|
|
8625
|
-
children: [/* @__PURE__ */ g("strong", { children: "Parse error" }), /* @__PURE__ */ g("span", { children:
|
|
8626
|
-
}) :
|
|
8627
|
-
value:
|
|
8628
|
-
children: /* @__PURE__ */ g(sd, { children: /* @__PURE__ */ g(
|
|
8629
|
-
nodes:
|
|
8630
|
-
edges:
|
|
8631
|
-
breadcrumbs:
|
|
8632
|
-
onNavigate: (e) =>
|
|
8654
|
+
children: [/* @__PURE__ */ g("strong", { children: "Parse error" }), /* @__PURE__ */ g("span", { children: s.error })]
|
|
8655
|
+
}) : d ? /* @__PURE__ */ g(Cf.Provider, {
|
|
8656
|
+
value: m,
|
|
8657
|
+
children: /* @__PURE__ */ g(sd, { children: /* @__PURE__ */ g(Jf, {
|
|
8658
|
+
nodes: d.flow.nodes,
|
|
8659
|
+
edges: d.flow.edges,
|
|
8660
|
+
breadcrumbs: h,
|
|
8661
|
+
onNavigate: (e) => o({
|
|
8633
8662
|
json: t,
|
|
8634
|
-
ids:
|
|
8635
|
-
})
|
|
8663
|
+
ids: l.slice(1, e + 1)
|
|
8664
|
+
}),
|
|
8665
|
+
onSelectionIds: r
|
|
8636
8666
|
}) })
|
|
8637
8667
|
}) : /* @__PURE__ */ g("div", {
|
|
8638
8668
|
className: "flow-empty",
|
|
@@ -8643,7 +8673,7 @@ function qf(e) {
|
|
|
8643
8673
|
}
|
|
8644
8674
|
//#endregion
|
|
8645
8675
|
//#region src/embed.tsx
|
|
8646
|
-
function
|
|
8676
|
+
function Xf(e) {
|
|
8647
8677
|
let { payload: t } = e, [n, r] = f(""), [i, a] = f(null), [o, s] = f(!0);
|
|
8648
8678
|
return c(() => {
|
|
8649
8679
|
let e = !1;
|
|
@@ -8665,26 +8695,29 @@ function Jf(e) {
|
|
|
8665
8695
|
className: "flow-error",
|
|
8666
8696
|
role: "alert",
|
|
8667
8697
|
children: [/* @__PURE__ */ g("strong", { children: "Decode error" }), /* @__PURE__ */ g("span", { children: i })]
|
|
8668
|
-
}) : /* @__PURE__ */ g(
|
|
8698
|
+
}) : /* @__PURE__ */ g(Yf, {
|
|
8669
8699
|
jsonText: n,
|
|
8670
8700
|
showHeader: !1
|
|
8671
8701
|
})
|
|
8672
8702
|
})
|
|
8673
8703
|
});
|
|
8674
8704
|
}
|
|
8675
|
-
var
|
|
8676
|
-
function
|
|
8677
|
-
|
|
8678
|
-
let r =
|
|
8679
|
-
|
|
8705
|
+
var Zf = /* @__PURE__ */ new Map(), Qf = null;
|
|
8706
|
+
function $f(e, t) {
|
|
8707
|
+
Zf.get(e)?.unmount();
|
|
8708
|
+
let r = m(e);
|
|
8709
|
+
Zf.set(e, r), Qf = e;
|
|
8710
|
+
let i = t.onClose;
|
|
8711
|
+
return r.render(n(Xf, {
|
|
8680
8712
|
...t,
|
|
8681
|
-
onClose:
|
|
8682
|
-
|
|
8713
|
+
onClose: i ? () => {
|
|
8714
|
+
ep(e), i();
|
|
8683
8715
|
} : void 0
|
|
8684
|
-
})),
|
|
8716
|
+
})), () => ep(e);
|
|
8685
8717
|
}
|
|
8686
|
-
function
|
|
8687
|
-
|
|
8718
|
+
function ep(e) {
|
|
8719
|
+
let t = e ?? Qf;
|
|
8720
|
+
t && (Zf.get(t)?.unmount(), Zf.delete(t), t === Qf && (Qf = null));
|
|
8688
8721
|
}
|
|
8689
8722
|
//#endregion
|
|
8690
|
-
export {
|
|
8723
|
+
export { Xf as GraphView, $f as mountGraphView, ep as unmountGraphView };
|
package/dist/types/embed.d.ts
CHANGED
|
@@ -6,7 +6,12 @@ export type GraphViewEmbedOptions = {
|
|
|
6
6
|
};
|
|
7
7
|
export declare function GraphView(props: GraphViewEmbedOptions): import("react").JSX.Element;
|
|
8
8
|
/**
|
|
9
|
-
* Mount the graph view into a DOM container.
|
|
9
|
+
* Mount the graph view into a DOM container. Returns a function that unmounts
|
|
10
|
+
* this graph; you can also call unmountGraphView(container).
|
|
10
11
|
*/
|
|
11
12
|
export declare function mountGraphView(container: HTMLElement, options: GraphViewEmbedOptions): () => void;
|
|
12
|
-
|
|
13
|
+
/**
|
|
14
|
+
* Unmount a previously mounted graph. With no argument, unmounts the most
|
|
15
|
+
* recently mounted one (kept for backwards compatibility).
|
|
16
|
+
*/
|
|
17
|
+
export declare function unmountGraphView(container?: HTMLElement): void;
|
|
@@ -2,4 +2,6 @@ export declare function GeometryNodesFlow(props: {
|
|
|
2
2
|
jsonText: string;
|
|
3
3
|
/** When false, hide the panel header ("Geometry Nodes Graph" and node count). Default true. */
|
|
4
4
|
showHeader?: boolean;
|
|
5
|
+
/** Reports the currently selected node ids (raw Tree Clipper node ids as strings). */
|
|
6
|
+
onSelectionChange?: (nodeIds: string[]) => void;
|
|
5
7
|
}): import("react").JSX.Element;
|
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
type SpecParam = {
|
|
2
|
+
name: string;
|
|
3
|
+
default: string | null;
|
|
4
|
+
};
|
|
5
|
+
export type SpecSocket = {
|
|
6
|
+
attr: string;
|
|
7
|
+
type: string;
|
|
8
|
+
label: string;
|
|
9
|
+
};
|
|
10
|
+
export type SpecEntry = {
|
|
11
|
+
class: string;
|
|
12
|
+
params: SpecParam[];
|
|
13
|
+
props: SpecParam[];
|
|
14
|
+
inputs: SpecSocket[];
|
|
15
|
+
outputs: SpecSocket[];
|
|
16
|
+
};
|
|
17
|
+
export type SpecDb = Record<string, Record<string, SpecEntry>>;
|
|
18
|
+
export declare function getNodebpySpec(): SpecDb;
|
|
1
19
|
type RawSocket = {
|
|
2
20
|
id: number;
|
|
3
21
|
data: {
|
|
@@ -79,5 +97,12 @@ type RawTree = {
|
|
|
79
97
|
type RawExport = {
|
|
80
98
|
node_trees: RawTree[];
|
|
81
99
|
};
|
|
100
|
+
/**
|
|
101
|
+
* Reduce a Tree Clipper export to a subset of nodes (by raw node id), keeping
|
|
102
|
+
* only links whose two endpoints both survive. Group trees instantiated by a
|
|
103
|
+
* surviving group node are kept complete (transitively); trees left with no
|
|
104
|
+
* nodes are dropped. Returns the input unchanged when nothing matches.
|
|
105
|
+
*/
|
|
106
|
+
export declare function filterExportToSelection(raw: RawExport, selected: ReadonlySet<number>): RawExport;
|
|
82
107
|
export declare function exportToNodebpy(raw: RawExport): string;
|
|
83
108
|
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pretty-print a Tree Clipper export so that each repeated entity (a node tree,
|
|
3
|
+
* an interface socket, a node, a link) lands on its own line, while every
|
|
4
|
+
* structural wrapper around those entity lists stays collapsed inline.
|
|
5
|
+
*
|
|
6
|
+
* Only the entity arrays break across lines; the `{"id": …, "data": {… "items": [`
|
|
7
|
+
* prefix and the trailing `]}}` suffix each stay on a single line. The result:
|
|
8
|
+
* the number of lines in an entity list equals the number of entities, so
|
|
9
|
+
* selecting one more node on the canvas adds exactly one visible line.
|
|
10
|
+
*
|
|
11
|
+
* Entity lines can get very long; the editor scrolls horizontally rather than
|
|
12
|
+
* wrapping them, so they stay one-per-row on screen.
|
|
13
|
+
*/
|
|
14
|
+
export declare function formatTreeClipperJson(value: unknown): string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "geonodes-web-render",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Browser-based viewer for Blender Geometry Nodes exported via Tree Clipper. Renders node trees as a read-only, Blender-styled graph.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@codemirror/lang-json": "^6.0.2",
|
|
40
|
+
"@codemirror/lang-python": "^6.2.1",
|
|
40
41
|
"@codemirror/state": "^6.6.0",
|
|
41
42
|
"@codemirror/theme-one-dark": "^6.1.3",
|
|
42
43
|
"@codemirror/view": "^6.40.0",
|