@nodish/core 0.2.1 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +1 -1
- package/dist/index.d.ts +103 -7
- package/dist/index.js +804 -595
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.field[data-v-4459e34d]{box-sizing:border-box;width:100%;min-height:16px;line-height:16px;font:inherit;color:#eee;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;background:#1c1f25;border:1px solid #0006;border-radius:3px;padding:1px 4px}.field[data-v-4459e34d]::placeholder{color:#eeeeee73}.field[data-v-0d93d0ea]{box-sizing:border-box;width:100%;min-height:16px;line-height:16px;font:inherit;color:#b8c0cc;cursor:default;-webkit-user-select:text;user-select:text;text-overflow:ellipsis;white-space:nowrap;background:#252830;border:1px solid #0000;border-radius:3px;padding:1px 4px;display:block;overflow:hidden}.field[data-v-bf7ff881]{box-sizing:border-box;width:100%;min-height:16px;line-height:16px;font:inherit;color:#eee;background:#1c1f25;border:1px solid #0006;border-radius:3px;padding:1px 4px}.field.multiline[data-v-bf7ff881]{resize:none;height:100%;min-height:0;line-height:1.3}.field-widget[data-v-4e15e37d]{flex:1;min-width:0}.port[data-v-88269100]{box-sizing:border-box;font-size:var(--v7bfdd17c);align-items:center;gap:4px;font-family:sans-serif;display:flex}.port.out[data-v-88269100]{justify-content:flex-end}.port.out.hasWidget[data-v-88269100]{justify-content:flex-start}.port.hasWidget[data-v-88269100] .field{flex:1;min-width:0}.label[data-v-88269100]{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.socket[data-v-88269100]{cursor:crosshair;z-index:1;border-radius:50%;flex:none;width:7.5px;height:7.5px}.socket[data-v-88269100]:hover{box-shadow:0 0 0 3px #ffffff40}.socket.multi[data-v-88269100]{border-radius:0}.port.in .socket[data-v-88269100]{margin-left:-5px}.port.in.no-socket[data-v-88269100]{padding-left:6.5px}.port.out .socket[data-v-88269100]{margin-right:-5px}.node[data-v-24b182cb]{color:#eee;font-family:sans-serif;font-size:var(--v8ff1e59c);-webkit-user-select:none;user-select:none;isolation:isolate;background:#2a2d34;border-radius:4px;position:absolute;box-shadow:0 1px 4px #0006}.node.selected[data-v-24b182cb]{outline-offset:0px;outline:2px solid #f5a623}.node.errored .error-ring[data-v-24b182cb]{pointer-events:none;z-index:0;border:4px solid #e5393555;border-radius:6px;position:absolute;inset:-4px}.node.errored>.header[data-v-24b182cb],.node.errored>.body[data-v-24b182cb]{z-index:1;position:relative}.header[data-v-24b182cb]{padding:0 2px 0 var(--v5f589aae);box-sizing:border-box;cursor:grab;border-radius:4px 4px 0 0;justify-content:space-between;align-items:center;gap:4px;display:flex}.header[data-v-24b182cb]:active{cursor:grabbing}.title[data-v-24b182cb]{text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;line-height:1;overflow:hidden}.grip[data-v-24b182cb]{pointer-events:none;flex:none;grid-template-rows:repeat(2,3px);grid-template-columns:repeat(3,3px);gap:1px;padding:1px 3px;display:grid}.dot[data-v-24b182cb]{background:#ffffff73;border-radius:50%;width:2px;height:2px}.body[data-v-24b182cb]{gap:6px;display:flex}.col[data-v-24b182cb]{flex-direction:column;min-width:0;display:flex}.body>.col[data-v-24b182cb]:only-child{flex:1 1 0}.body>.col.output[data-v-24b182cb]:only-child{padding-left:var(--v5f589aae)}.body>.col.input[data-v-24b182cb]:only-child{padding-right:var(--v5f589aae)}.input[data-v-24b182cb]{flex:1 1 0}.output[data-v-24b182cb]{flex:none}.output.wide[data-v-24b182cb]{flex:1 1 0}.wires[data-v-682ffd13]{pointer-events:none;z-index:0;width:100%;height:100%;position:absolute;inset:0;overflow:visible}.wires path[data-v-682ffd13]{fill:none;stroke:#aaa;stroke-width:2px}.wires path.pending[data-v-682ffd13]{stroke:#ddd;stroke-dasharray:5 4}.wires path.slice[data-v-682ffd13]{stroke:#e5484d;stroke-width:1.5px}.inspector-section[data-v-5e38007a]{-webkit-user-select:text;user-select:text}.inspector-section.divided[data-v-5e38007a]{border-top:1px solid #ffffff1a;margin-top:4px;padding-top:6px}.inspector-section-header[data-v-5e38007a]{align-items:center;gap:4px;margin-bottom:4px;display:flex}.inspector-section-title[data-v-5e38007a]{opacity:.85;flex:1;font-size:11px;line-height:1}.iface-grid[data-v-8f895443]{grid-template-columns:minmax(0,1fr) 72px 16px;align-items:center;gap:3px;display:grid}.iface-head span[data-v-8f895443]{opacity:.55;font-size:10px;line-height:1}.iface-rows[data-v-8f895443]{flex-direction:column;gap:6px;display:flex}.iface-entry[data-v-8f895443]{flex-direction:column;gap:3px;display:flex}.iface-default-row[data-v-8f895443]{grid-template-columns:44px minmax(0,1fr);align-items:center;gap:4px;display:grid}.iface-default-label[data-v-8f895443]{opacity:.55;font-size:10px;line-height:1}.iface-field[data-v-8f895443]{box-sizing:border-box;width:100%;height:18px;font:inherit;color:#eee;background:#1c1f25;border:1px solid #0006;border-radius:3px;padding:0 4px;font-size:11px;line-height:18px}.iface-select[data-v-8f895443]{cursor:pointer;padding-right:2px}.iface-default-widget[data-v-8f895443]{min-width:0}.iface-default-widget[data-v-8f895443] .field{box-sizing:border-box;width:100%;height:18px;font:inherit;padding:0 4px;font-size:11px;line-height:18px}.iface-remove[data-v-8f895443]{color:#ffffff8c;width:16px;height:16px;font:inherit;cursor:pointer;background:0 0;border:none;border-radius:2px;justify-self:center;padding:0;font-size:14px;line-height:1}.iface-remove[data-v-8f895443]:hover{color:#ffb4b4;background:#e5393540}.iface-empty[data-v-8f895443]{opacity:.45;text-align:center;padding:2px 0;font-size:10px}.iface-error[data-v-8f895443]{color:#ffb4b4;background:#e5393526;margin:4px 0 0;padding:4px;font-family:monospace;font-size:10px}.inspector-panel[data-v-78844099]{color:#eee;width:200px;font-family:sans-serif;font-size:var(--a8ea4b7e);-webkit-user-select:none;user-select:none;background:#2a2d34;border-radius:4px;overflow:hidden;box-shadow:0 1px 4px #0006}.inspector-header[data-v-78844099]{height:var(--v2ca6cb43);padding:0 2px 0 var(--v78510090);box-sizing:border-box;align-items:center;gap:2px;display:flex}.inspector-header-actions[data-v-78844099]{flex:none;align-items:center;gap:2px;display:flex}.inspector-panel.fill[data-v-78844099]{flex-direction:column;max-height:320px;display:flex}.inspector-title[data-v-78844099]{min-width:0;font:inherit;color:#fff;background:0 0;border:none;outline:none;flex:1;padding:0;line-height:1}.inspector-title.static[data-v-78844099]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.inspector-title[data-v-78844099]::placeholder{color:#fff9}.inspector-body[data-v-78844099]{padding:6px var(--v78510090);flex-direction:column;gap:4px;display:flex}.inspector-panel.fill .inspector-body[data-v-78844099]{flex:1;min-height:0;overflow:hidden}.inspector-body.flush[data-v-78844099]{gap:0;padding:0}.inspector-row{align-items:center;gap:6px;display:flex}.inspector-key{opacity:.7;flex:none;width:42px}.inspector-field{box-sizing:border-box;min-width:0;height:18px;font-size:inherit;color:#eee;background:#1c1f25;border:1px solid #0006;border-radius:3px;flex:1;padding:1px 4px;font-family:inherit;line-height:1}.inspector-swatch{cursor:pointer;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;background:#1c1f25;border:1px solid #0006;border-radius:3px;flex:1;min-width:0;height:18px;padding:0}.inspector-swatch::-webkit-color-swatch-wrapper{background:#1c1f25;padding:1px 2px}.inspector-swatch::-webkit-color-swatch{border:none;border-radius:2px}.inspector-swatch::-moz-color-swatch{border:none;border-radius:2px}.inspector-row.pair{gap:8px}.inspector-row.pair>label{flex:1;align-items:center;gap:4px;min-width:0;display:flex}.inspector-row.pair .inspector-key{width:auto}.inspector-icon-btn{color:#ffffffbf;width:16px;height:14px;font:inherit;cursor:pointer;background:0 0;border:none;border-radius:2px;flex:none;padding:0;font-size:13px;line-height:1}.inspector-icon-btn:hover:not(:disabled){color:#fff;background:#ffffff1f}.inspector-error[data-v-a863f513]{color:#ffb4b4;background:#e5393526;margin:0;padding:4px;font-family:monospace;font-size:10px}.inspector-slider[data-v-472135f4]{cursor:pointer;flex:1;min-width:0}.inspector-slider-value[data-v-472135f4]{text-align:right;opacity:.75;font-variant-numeric:tabular-nums;flex:none;width:26px}.node-panel[data-v-51945220]{z-index:10;position:absolute;top:8px;right:8px}.node-panel.stacked-panel[data-v-51945220]{position:static;top:auto;right:auto}.inspector-check[data-v-7b38cfa2]{cursor:pointer}.backdrop[data-v-999f2b7d]{z-index:20;position:absolute;inset:0}.anchor[data-v-999f2b7d]{width:200px;font-size:var(--v0e391f60);position:absolute}.crumbs[data-v-999f2b7d]{color:#fff;flex:1;align-items:center;gap:3px;min-width:0;line-height:1;display:flex;overflow:hidden}.crumbs .crumb[data-v-999f2b7d]{text-overflow:ellipsis;white-space:nowrap;opacity:.72;min-width:0;overflow:hidden}.crumbs .crumb.current[data-v-999f2b7d]{opacity:1}.crumbs .crumb-sep[data-v-999f2b7d]{color:#6b9bd1;flex:none}.picker-body[data-v-999f2b7d]{flex-direction:column;flex:1;min-height:0;display:flex}.search[data-v-999f2b7d]{box-sizing:border-box;font:inherit;color:#eee;background:#1c1f25;border:1px solid #0006;border-radius:3px;margin:6px;padding:1px 4px}.search[data-v-999f2b7d]:focus{outline:1px solid #6b9bd1}.list[data-v-999f2b7d]{flex:1;min-height:0;padding-bottom:4px;overflow-y:auto}.row[data-v-999f2b7d]{width:100%;height:var(--ae7fef7e);padding:0 var(--v113015c7);box-sizing:border-box;color:inherit;font:inherit;text-align:left;cursor:pointer;background:0 0;border:none;align-items:center;gap:6px;line-height:1;display:flex}.row[data-v-999f2b7d]:hover{background:#ffffff14}.row.node.active[data-v-999f2b7d]{background:#ffffff1f}.name[data-v-999f2b7d]{text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;overflow:hidden}.dot[data-v-999f2b7d]{border-radius:2px;flex:none;width:9px;height:9px}.row.up .icon[data-v-999f2b7d]{text-align:center;opacity:.7;flex:none;width:10px}.chev[data-v-999f2b7d]{font-size:inherit;color:#ffffffd9;flex:none;line-height:1}.path[data-v-999f2b7d]{flex:none;align-items:center;gap:2px;max-width:46%;font-size:10px;display:flex;overflow:hidden}.path-seg[data-v-999f2b7d]{text-overflow:ellipsis;white-space:nowrap;opacity:.55;overflow:hidden}.path-sep[data-v-999f2b7d]{color:#6b9bd1;flex:none}.empty[data-v-999f2b7d]{opacity:.5;text-align:center;padding:8px}.viewer[data-v-ff1ea32f]{background:#1e1e22;width:100%;height:100%;position:relative;overflow:hidden}.viewer.panning[data-v-ff1ea32f]{cursor:grabbing}.viewport[data-v-ff1ea32f]{transform-origin:0 0;width:100%;height:100%;position:relative}.canvas-bg[data-v-ff1ea32f]{z-index:0;position:absolute;inset:0}.marquee[data-v-ff1ea32f]{box-sizing:border-box;pointer-events:none;z-index:5;background:#f5a6231f;border:1px solid #f5a623e6;position:absolute}.top-right-stack[data-v-ff1ea32f]{z-index:10;flex-direction:column;align-items:flex-end;gap:8px;display:flex;position:absolute;top:8px;right:8px}
|
|
1
|
+
.field[data-v-4459e34d]{box-sizing:border-box;width:100%;min-height:16px;line-height:16px;font:inherit;color:#eee;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;background:#1c1f25;border:1px solid #0006;border-radius:3px;padding:1px 4px}.field[data-v-4459e34d]::placeholder{color:#eeeeee73}.field[data-v-0d93d0ea]{box-sizing:border-box;width:100%;min-height:16px;line-height:16px;font:inherit;color:#b8c0cc;cursor:default;-webkit-user-select:text;user-select:text;text-overflow:ellipsis;white-space:nowrap;background:#252830;border:1px solid #0000;border-radius:3px;padding:1px 4px;display:block;overflow:hidden}.field[data-v-bf7ff881]{box-sizing:border-box;width:100%;min-height:16px;line-height:16px;font:inherit;color:#eee;background:#1c1f25;border:1px solid #0006;border-radius:3px;padding:1px 4px}.field.multiline[data-v-bf7ff881]{resize:none;height:100%;min-height:0;line-height:1.3}.field-widget[data-v-b4dc9bc0]{flex:1;min-width:0}.port[data-v-15071e28]{box-sizing:border-box;font-size:var(--v3fd6b92b);align-items:center;gap:4px;font-family:sans-serif;display:flex}.port.out[data-v-15071e28]{justify-content:flex-end}.port.out.hasWidget[data-v-15071e28]{justify-content:flex-start}.port.hasWidget[data-v-15071e28] .field{flex:1;min-width:0}.label[data-v-15071e28]{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.socket[data-v-15071e28]{cursor:crosshair;z-index:1;border-radius:50%;flex:none;width:7.5px;height:7.5px}.socket[data-v-15071e28]:hover{box-shadow:0 0 0 3px #ffffff40}.socket.multi[data-v-15071e28]{border-radius:0}.port.in .socket[data-v-15071e28]{margin-left:-5px}.port.in.no-socket[data-v-15071e28]{padding-left:6.5px}.port.out .socket[data-v-15071e28]{margin-right:-5px}.node[data-v-24b182cb]{color:#eee;font-family:sans-serif;font-size:var(--v8ff1e59c);-webkit-user-select:none;user-select:none;isolation:isolate;background:#2a2d34;border-radius:4px;position:absolute;box-shadow:0 1px 4px #0006}.node.selected[data-v-24b182cb]{outline-offset:0px;outline:2px solid #f5a623}.node.errored .error-ring[data-v-24b182cb]{pointer-events:none;z-index:0;border:4px solid #e5393555;border-radius:6px;position:absolute;inset:-4px}.node.errored>.header[data-v-24b182cb],.node.errored>.body[data-v-24b182cb]{z-index:1;position:relative}.header[data-v-24b182cb]{padding:0 2px 0 var(--v5f589aae);box-sizing:border-box;cursor:grab;border-radius:4px 4px 0 0;justify-content:space-between;align-items:center;gap:4px;display:flex}.header[data-v-24b182cb]:active{cursor:grabbing}.title[data-v-24b182cb]{text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;line-height:1;overflow:hidden}.grip[data-v-24b182cb]{pointer-events:none;flex:none;grid-template-rows:repeat(2,3px);grid-template-columns:repeat(3,3px);gap:1px;padding:1px 3px;display:grid}.dot[data-v-24b182cb]{background:#ffffff73;border-radius:50%;width:2px;height:2px}.body[data-v-24b182cb]{gap:6px;display:flex}.col[data-v-24b182cb]{flex-direction:column;min-width:0;display:flex}.body>.col[data-v-24b182cb]:only-child{flex:1 1 0}.body>.col.output[data-v-24b182cb]:only-child{padding-left:var(--v5f589aae)}.body>.col.input[data-v-24b182cb]:only-child{padding-right:var(--v5f589aae)}.input[data-v-24b182cb]{flex:1 1 0}.output[data-v-24b182cb]{flex:none}.output.wide[data-v-24b182cb]{flex:1 1 0}.wires[data-v-682ffd13]{pointer-events:none;z-index:0;width:100%;height:100%;position:absolute;inset:0;overflow:visible}.wires path[data-v-682ffd13]{fill:none;stroke:#aaa;stroke-width:2px}.wires path.pending[data-v-682ffd13]{stroke:#ddd;stroke-dasharray:5 4}.wires path.slice[data-v-682ffd13]{stroke:#e5484d;stroke-width:1.5px}.inspector-section[data-v-5e38007a]{-webkit-user-select:text;user-select:text}.inspector-section.divided[data-v-5e38007a]{border-top:1px solid #ffffff1a;margin-top:4px;padding-top:6px}.inspector-section-header[data-v-5e38007a]{align-items:center;gap:4px;margin-bottom:4px;display:flex}.inspector-section-title[data-v-5e38007a]{opacity:.85;flex:1;font-size:11px;line-height:1}.iface-grid[data-v-8f895443]{grid-template-columns:minmax(0,1fr) 72px 16px;align-items:center;gap:3px;display:grid}.iface-head span[data-v-8f895443]{opacity:.55;font-size:10px;line-height:1}.iface-rows[data-v-8f895443]{flex-direction:column;gap:6px;display:flex}.iface-entry[data-v-8f895443]{flex-direction:column;gap:3px;display:flex}.iface-default-row[data-v-8f895443]{grid-template-columns:44px minmax(0,1fr);align-items:center;gap:4px;display:grid}.iface-default-label[data-v-8f895443]{opacity:.55;font-size:10px;line-height:1}.iface-field[data-v-8f895443]{box-sizing:border-box;width:100%;height:18px;font:inherit;color:#eee;background:#1c1f25;border:1px solid #0006;border-radius:3px;padding:0 4px;font-size:11px;line-height:18px}.iface-select[data-v-8f895443]{cursor:pointer;padding-right:2px}.iface-default-widget[data-v-8f895443]{min-width:0}.iface-default-widget[data-v-8f895443] .field{box-sizing:border-box;width:100%;height:18px;font:inherit;padding:0 4px;font-size:11px;line-height:18px}.iface-remove[data-v-8f895443]{color:#ffffff8c;width:16px;height:16px;font:inherit;cursor:pointer;background:0 0;border:none;border-radius:2px;justify-self:center;padding:0;font-size:14px;line-height:1}.iface-remove[data-v-8f895443]:hover{color:#ffb4b4;background:#e5393540}.iface-empty[data-v-8f895443]{opacity:.45;text-align:center;padding:2px 0;font-size:10px}.iface-error[data-v-8f895443]{color:#ffb4b4;background:#e5393526;margin:4px 0 0;padding:4px;font-family:monospace;font-size:10px}.inspector-panel[data-v-78844099]{color:#eee;width:200px;font-family:sans-serif;font-size:var(--a8ea4b7e);-webkit-user-select:none;user-select:none;background:#2a2d34;border-radius:4px;overflow:hidden;box-shadow:0 1px 4px #0006}.inspector-header[data-v-78844099]{height:var(--v2ca6cb43);padding:0 2px 0 var(--v78510090);box-sizing:border-box;align-items:center;gap:2px;display:flex}.inspector-header-actions[data-v-78844099]{flex:none;align-items:center;gap:2px;display:flex}.inspector-panel.fill[data-v-78844099]{flex-direction:column;max-height:320px;display:flex}.inspector-title[data-v-78844099]{min-width:0;font:inherit;color:#fff;background:0 0;border:none;outline:none;flex:1;padding:0;line-height:1}.inspector-title.static[data-v-78844099]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.inspector-title[data-v-78844099]::placeholder{color:#fff9}.inspector-body[data-v-78844099]{padding:6px var(--v78510090);flex-direction:column;gap:4px;display:flex}.inspector-panel.fill .inspector-body[data-v-78844099]{flex:1;min-height:0;overflow:hidden}.inspector-body.flush[data-v-78844099]{gap:0;padding:0}.inspector-row{align-items:center;gap:6px;display:flex}.inspector-key{opacity:.7;flex:none;width:42px}.inspector-field{box-sizing:border-box;min-width:0;height:18px;font-size:inherit;color:#eee;background:#1c1f25;border:1px solid #0006;border-radius:3px;flex:1;padding:1px 4px;font-family:inherit;line-height:1}.inspector-swatch{cursor:pointer;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;background:#1c1f25;border:1px solid #0006;border-radius:3px;flex:1;min-width:0;height:18px;padding:0}.inspector-swatch::-webkit-color-swatch-wrapper{background:#1c1f25;padding:1px 2px}.inspector-swatch::-webkit-color-swatch{border:none;border-radius:2px}.inspector-swatch::-moz-color-swatch{border:none;border-radius:2px}.inspector-row.pair{gap:8px}.inspector-row.pair>label{flex:1;align-items:center;gap:4px;min-width:0;display:flex}.inspector-row.pair .inspector-key{width:auto}.inspector-icon-btn{color:#ffffffbf;width:16px;height:14px;font:inherit;cursor:pointer;background:0 0;border:none;border-radius:2px;flex:none;padding:0;font-size:13px;line-height:1}.inspector-icon-btn:hover:not(:disabled){color:#fff;background:#ffffff1f}.inspector-error[data-v-a863f513]{color:#ffb4b4;background:#e5393526;margin:0;padding:4px;font-family:monospace;font-size:10px}.inspector-slider[data-v-472135f4]{cursor:pointer;flex:1;min-width:0}.inspector-slider-value[data-v-472135f4]{text-align:right;opacity:.75;font-variant-numeric:tabular-nums;flex:none;width:26px}.node-panel[data-v-51945220]{z-index:10;position:absolute;top:8px;right:8px}.node-panel.stacked-panel[data-v-51945220]{position:static;top:auto;right:auto}.inspector-check[data-v-7b38cfa2]{cursor:pointer}.backdrop[data-v-999f2b7d]{z-index:20;position:absolute;inset:0}.anchor[data-v-999f2b7d]{width:200px;font-size:var(--v0e391f60);position:absolute}.crumbs[data-v-999f2b7d]{color:#fff;flex:1;align-items:center;gap:3px;min-width:0;line-height:1;display:flex;overflow:hidden}.crumbs .crumb[data-v-999f2b7d]{text-overflow:ellipsis;white-space:nowrap;opacity:.72;min-width:0;overflow:hidden}.crumbs .crumb.current[data-v-999f2b7d]{opacity:1}.crumbs .crumb-sep[data-v-999f2b7d]{color:#6b9bd1;flex:none}.picker-body[data-v-999f2b7d]{flex-direction:column;flex:1;min-height:0;display:flex}.search[data-v-999f2b7d]{box-sizing:border-box;font:inherit;color:#eee;background:#1c1f25;border:1px solid #0006;border-radius:3px;margin:6px;padding:1px 4px}.search[data-v-999f2b7d]:focus{outline:1px solid #6b9bd1}.list[data-v-999f2b7d]{flex:1;min-height:0;padding-bottom:4px;overflow-y:auto}.row[data-v-999f2b7d]{width:100%;height:var(--ae7fef7e);padding:0 var(--v113015c7);box-sizing:border-box;color:inherit;font:inherit;text-align:left;cursor:pointer;background:0 0;border:none;align-items:center;gap:6px;line-height:1;display:flex}.row[data-v-999f2b7d]:hover{background:#ffffff14}.row.node.active[data-v-999f2b7d]{background:#ffffff1f}.name[data-v-999f2b7d]{text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;overflow:hidden}.dot[data-v-999f2b7d]{border-radius:2px;flex:none;width:9px;height:9px}.row.up .icon[data-v-999f2b7d]{text-align:center;opacity:.7;flex:none;width:10px}.chev[data-v-999f2b7d]{font-size:inherit;color:#ffffffd9;flex:none;line-height:1}.path[data-v-999f2b7d]{flex:none;align-items:center;gap:2px;max-width:46%;font-size:10px;display:flex;overflow:hidden}.path-seg[data-v-999f2b7d]{text-overflow:ellipsis;white-space:nowrap;opacity:.55;overflow:hidden}.path-sep[data-v-999f2b7d]{color:#6b9bd1;flex:none}.empty[data-v-999f2b7d]{opacity:.5;text-align:center;padding:8px}.viewer[data-v-0d57969f]{background:#1e1e22;width:100%;height:100%;position:relative;overflow:hidden}.viewer.panning[data-v-0d57969f]{cursor:grabbing}.viewport[data-v-0d57969f]{transform-origin:0 0;width:100%;height:100%;position:relative}.canvas-bg[data-v-0d57969f]{z-index:0;position:absolute;inset:0}.marquee[data-v-0d57969f]{box-sizing:border-box;pointer-events:none;z-index:5;background:#f5a6231f;border:1px solid #f5a623e6;position:absolute}.top-right-stack[data-v-0d57969f]{z-index:10;flex-direction:column;align-items:flex-end;gap:8px;display:flex;position:absolute;top:8px;right:8px}
|
package/dist/index.d.ts
CHANGED
|
@@ -21,6 +21,8 @@ declare type __VLS_Props = {
|
|
|
21
21
|
*/
|
|
22
22
|
export declare function applyDocument(map: NodeMap, doc: GraphDocument): string[];
|
|
23
23
|
|
|
24
|
+
export declare function assignable(map: NodeMap, from: PortTypeId, to: PortTypeId): boolean;
|
|
25
|
+
|
|
24
26
|
/**
|
|
25
27
|
* Return the single Input and Output nodes on the graph.
|
|
26
28
|
* @throws When the graph does not contain exactly one of each.
|
|
@@ -30,6 +32,23 @@ export declare function boundaryNodes(map: NodeMap): {
|
|
|
30
32
|
output: DefiniteNode;
|
|
31
33
|
};
|
|
32
34
|
|
|
35
|
+
/**
|
|
36
|
+
* Snapshot selected nodes and internal wires for in-memory paste.
|
|
37
|
+
* Boundary IO nodes are excluded.
|
|
38
|
+
*/
|
|
39
|
+
export declare function buildClipboard(nodes: DefiniteNode[], connections: Connection[], anchor: NodeLocation): ClipboardPayload | null;
|
|
40
|
+
|
|
41
|
+
export declare type ClipboardPayload = {
|
|
42
|
+
/** Deep clone at copy time (original ids preserved). */
|
|
43
|
+
nodes: DefiniteNode[];
|
|
44
|
+
/** Wires where both endpoints are in the copied node set. */
|
|
45
|
+
connections: Connection[];
|
|
46
|
+
offsets: Record<NodeId, {
|
|
47
|
+
x: number;
|
|
48
|
+
y: number;
|
|
49
|
+
}>;
|
|
50
|
+
};
|
|
51
|
+
|
|
33
52
|
/** Serializable nested graph owned by a composite instance. */
|
|
34
53
|
declare interface CompositeState {
|
|
35
54
|
graph: NodeGraph;
|
|
@@ -203,6 +222,15 @@ export declare function instantiate(def: IndefiniteNode, location: NodeLocation)
|
|
|
203
222
|
/** Input or output port templates keyed by port name. */
|
|
204
223
|
export declare type IOSpec = Record<string, PortSpec>;
|
|
205
224
|
|
|
225
|
+
/**
|
|
226
|
+
* Ports with no inline editor when disconnected: unions, explicit
|
|
227
|
+
* {@link Port.connectionOnly}, or type widget `kind: "none"`.
|
|
228
|
+
*/
|
|
229
|
+
export declare function isConnectionOnly(port: Pick<Port | PortDefinition, "type" | "types" | "connectionOnly">, typeDef?: PortTypeDefinition): boolean;
|
|
230
|
+
|
|
231
|
+
/** True when the port accepts more than one type. */
|
|
232
|
+
export declare function isUnionPort(port: Pick<Port | PortDefinition, "type" | "types">): boolean;
|
|
233
|
+
|
|
206
234
|
/** Evaluation errors keyed by {@link NodeId}. */
|
|
207
235
|
declare type NodeErrors = Record<NodeId, string>;
|
|
208
236
|
|
|
@@ -236,6 +264,8 @@ export declare interface NodeMap {
|
|
|
236
264
|
/** Ids of packs loaded via {@link NodeMap.loadPack}. */
|
|
237
265
|
extensions: string[];
|
|
238
266
|
graphInterface: GraphInterface;
|
|
267
|
+
/** Ownership metadata for types and node types registered via packs. */
|
|
268
|
+
registrationMeta: RegistrationMeta;
|
|
239
269
|
/**
|
|
240
270
|
* Register types, nodes, and optional widget setup from a pack.
|
|
241
271
|
* @returns Registration errors (empty array on success).
|
|
@@ -250,6 +280,8 @@ export declare interface NodeMap {
|
|
|
250
280
|
export declare interface NodePack {
|
|
251
281
|
/** Unique pack id (e.g. `"@my-org/my-pack"`). Recorded in {@link GraphDocument.extensions}. */
|
|
252
282
|
id: string;
|
|
283
|
+
/** Default priority for all types and nodes in this pack (default 0). */
|
|
284
|
+
priority?: number;
|
|
253
285
|
/** Custom {@link PortTypeDefinition}s to register. */
|
|
254
286
|
types?: TypeRegistry;
|
|
255
287
|
/** Custom node definitions to register (authoring form). */
|
|
@@ -293,6 +325,8 @@ export declare interface NodeSpec {
|
|
|
293
325
|
* act as initial defaults when present.
|
|
294
326
|
*/
|
|
295
327
|
resolvePorts?: DynamicPortsSpec;
|
|
328
|
+
/** Override pack priority when registering this node from a {@link NodePack}. */
|
|
329
|
+
priority?: number;
|
|
296
330
|
}
|
|
297
331
|
|
|
298
332
|
/** Node types in authoring form, keyed by {@link NodeTypeId}. */
|
|
@@ -308,10 +342,12 @@ export declare const OUTPUT_TYPE = "io/output";
|
|
|
308
342
|
/** Context passed to {@link NodePack.setup} for widget registration. */
|
|
309
343
|
export declare interface PackSetupContext {
|
|
310
344
|
/**
|
|
311
|
-
* Bind a Vue component to all editable ports of a type id.
|
|
312
|
-
* Overrides the generic widget for that type.
|
|
345
|
+
* Bind a Vue component to all editable ports of a type id (default widget slot).
|
|
313
346
|
*/
|
|
314
|
-
registerTypeWidget:
|
|
347
|
+
registerTypeWidget: {
|
|
348
|
+
(typeId: string, component: Component): void;
|
|
349
|
+
(typeId: string, widgetId: string, component: Component): void;
|
|
350
|
+
};
|
|
315
351
|
/**
|
|
316
352
|
* Bind a Vue component to a custom widget id
|
|
317
353
|
* ({@link TypeWidgetSpec} `kind: "custom"`).
|
|
@@ -325,6 +361,11 @@ export declare interface PackSetupContext {
|
|
|
325
361
|
*/
|
|
326
362
|
export declare function parseGraphDocument(json: string): GraphDocument;
|
|
327
363
|
|
|
364
|
+
/**
|
|
365
|
+
* Paste a clipboard payload into `map` at `anchor`, returning new top-level node ids.
|
|
366
|
+
*/
|
|
367
|
+
export declare function pasteClipboard(map: NodeMap, payload: ClipboardPayload, anchor: NodeLocation): NodeId[];
|
|
368
|
+
|
|
328
369
|
/**
|
|
329
370
|
* Materialized port on a placed node ({@link DefiniteNode}). Has a unique id so
|
|
330
371
|
* connections and the DOM can reference it directly.
|
|
@@ -334,14 +375,20 @@ export declare type Port = {
|
|
|
334
375
|
/** Matches the {@link PortDefinition.name} it came from. */
|
|
335
376
|
name: string;
|
|
336
377
|
type: PortType;
|
|
378
|
+
types?: PortTypeId[];
|
|
337
379
|
direction: PortDirection;
|
|
338
380
|
/** Input: value when disconnected. Output: optional cache of last computed value. */
|
|
339
381
|
value?: unknown;
|
|
340
382
|
userOnly?: boolean;
|
|
341
383
|
multi?: boolean;
|
|
384
|
+
widgetId?: string;
|
|
385
|
+
connectionOnly?: boolean;
|
|
342
386
|
customProps?: Record<string, unknown>;
|
|
343
387
|
};
|
|
344
388
|
|
|
389
|
+
/** Whether `from` may connect into `toPort` (any of its accepted types). */
|
|
390
|
+
export declare function portAccepts(map: NodeMap, from: PortTypeId, toPort: Port): boolean;
|
|
391
|
+
|
|
345
392
|
/**
|
|
346
393
|
* Port template declared by a node type ({@link IndefiniteNode}). Has no id and
|
|
347
394
|
* no live value — only describes ports that instances will receive.
|
|
@@ -349,7 +396,13 @@ export declare type Port = {
|
|
|
349
396
|
export declare type PortDefinition = {
|
|
350
397
|
/** Stable, human-authored key; referenced inside `execute()`. */
|
|
351
398
|
name: string;
|
|
399
|
+
/** Primary/display type (color, labels). Must appear in {@link types} when set. */
|
|
352
400
|
type: PortType;
|
|
401
|
+
/**
|
|
402
|
+
* Accepted types for this port. When length > 1, the port is connection-only
|
|
403
|
+
* (no inline editor when disconnected).
|
|
404
|
+
*/
|
|
405
|
+
types?: PortTypeId[];
|
|
353
406
|
/** Used by an input when nothing is connected to it. */
|
|
354
407
|
defaultValue?: unknown;
|
|
355
408
|
description?: string;
|
|
@@ -363,6 +416,14 @@ export declare type PortDefinition = {
|
|
|
363
416
|
* values as an unordered array of `type`.
|
|
364
417
|
*/
|
|
365
418
|
multi?: boolean;
|
|
419
|
+
/** Named widget variant from the port type's {@link PortTypeDefinition.widgets}. */
|
|
420
|
+
widgetId?: string;
|
|
421
|
+
/**
|
|
422
|
+
* Input-only. No inline value editor — label + socket only (like a wired port).
|
|
423
|
+
* Overrides the type widget; use {@link TypeWidgetSpec} `kind: "none"` for a
|
|
424
|
+
* type-wide default.
|
|
425
|
+
*/
|
|
426
|
+
connectionOnly?: boolean;
|
|
366
427
|
/**
|
|
367
428
|
* Widget-specific configuration merged on top of the type's widget spec.
|
|
368
429
|
* Recognized keys: `options`, `min`, `max`, `step`, `rows`, `rowHeight`.
|
|
@@ -405,7 +466,11 @@ export declare interface PortTypeDefinition {
|
|
|
405
466
|
accepts?: (from: PortTypeId) => boolean;
|
|
406
467
|
/** Fallback when a port of this type omits its own default. */
|
|
407
468
|
defaultValue?: unknown;
|
|
408
|
-
/**
|
|
469
|
+
/** Named widget variants for this type. */
|
|
470
|
+
widgets?: Record<string, TypeWidgetSpec>;
|
|
471
|
+
/** Key into {@link widgets}; defaults to `"default"`. */
|
|
472
|
+
defaultWidget?: string;
|
|
473
|
+
/** Legacy single-widget descriptor; normalized to {@link widgets}.default. */
|
|
409
474
|
widget?: TypeWidgetSpec;
|
|
410
475
|
/** Parse a raw string (e.g. from an input field) into a value. */
|
|
411
476
|
parse?: (raw: string) => unknown;
|
|
@@ -413,11 +478,16 @@ export declare interface PortTypeDefinition {
|
|
|
413
478
|
format?: (value: unknown) => string;
|
|
414
479
|
/** Normalize or clamp a value after edit or connection. */
|
|
415
480
|
coerce?: (value: unknown) => unknown;
|
|
481
|
+
/** Pack registration priority override (not used at runtime). */
|
|
482
|
+
priority?: number;
|
|
416
483
|
}
|
|
417
484
|
|
|
418
485
|
/** Key into the {@link TypeRegistry} (e.g. `"number"`). */
|
|
419
486
|
export declare type PortTypeId = string;
|
|
420
487
|
|
|
488
|
+
/** Accepted types for a port. Falls back to `[port.type]` when `types` is omitted. */
|
|
489
|
+
export declare function portTypes(port: Pick<Port | PortDefinition, "type" | "types">): PortTypeId[];
|
|
490
|
+
|
|
421
491
|
/**
|
|
422
492
|
* Bind a Vue component to a custom widget id
|
|
423
493
|
* ({@link TypeWidgetSpec} `kind: "custom"`).
|
|
@@ -431,11 +501,27 @@ export declare function registerComponentWidget(componentId: string, component:
|
|
|
431
501
|
export declare function registerDefaultTypeWidgets(): void;
|
|
432
502
|
|
|
433
503
|
/**
|
|
434
|
-
* Bind a Vue component to
|
|
435
|
-
* Overrides the generic widget for that type.
|
|
504
|
+
* Bind a Vue component to editable ports of a type id (default widget slot).
|
|
436
505
|
*/
|
|
437
506
|
export declare function registerTypeWidget(typeId: string, component: Component): void;
|
|
438
507
|
|
|
508
|
+
/**
|
|
509
|
+
* Bind a Vue component to a named widget slot for a type id.
|
|
510
|
+
*/
|
|
511
|
+
export declare function registerTypeWidget(typeId: string, widgetId: string, component: Component): void;
|
|
512
|
+
|
|
513
|
+
/** Tracks which pack registered each type/node id and at what priority. */
|
|
514
|
+
export declare type RegistrationMeta = {
|
|
515
|
+
types: Record<PortTypeId, {
|
|
516
|
+
packId: string;
|
|
517
|
+
priority: number;
|
|
518
|
+
}>;
|
|
519
|
+
nodeTypes: Record<NodeTypeId, {
|
|
520
|
+
packId: string;
|
|
521
|
+
priority: number;
|
|
522
|
+
}>;
|
|
523
|
+
};
|
|
524
|
+
|
|
439
525
|
declare function resetView(): void;
|
|
440
526
|
|
|
441
527
|
/**
|
|
@@ -472,8 +558,14 @@ export declare interface TypeSpec {
|
|
|
472
558
|
accepts?: (from: PortTypeId) => boolean;
|
|
473
559
|
/** Fallback when a port of this type omits its own default. */
|
|
474
560
|
defaultValue?: unknown;
|
|
475
|
-
/**
|
|
561
|
+
/** Named widget variants for ports of this type. */
|
|
562
|
+
widgets?: Record<string, TypeWidgetSpec>;
|
|
563
|
+
/** Key into {@link widgets}; defaults to `"default"`. */
|
|
564
|
+
defaultWidget?: string;
|
|
565
|
+
/** Legacy single-widget descriptor; normalized to {@link widgets}.default. */
|
|
476
566
|
widget?: TypeWidgetSpec;
|
|
567
|
+
/** Override pack priority when registering this type from a {@link NodePack}. */
|
|
568
|
+
priority?: number;
|
|
477
569
|
/** Override default parse behaviour for this type's widget. */
|
|
478
570
|
parse?: (raw: string) => unknown;
|
|
479
571
|
/** Override default format behaviour for this type's widget. */
|
|
@@ -505,6 +597,10 @@ export declare type TypeWidgetSpec = {
|
|
|
505
597
|
componentId: string;
|
|
506
598
|
/** Port row height in px; defaults to one line (20px). */
|
|
507
599
|
rowHeight?: number;
|
|
600
|
+
} | {
|
|
601
|
+
/** No inline editor — port shows label + socket only (wire in a value). */
|
|
602
|
+
kind: "none";
|
|
603
|
+
rowHeight?: number;
|
|
508
604
|
};
|
|
509
605
|
|
|
510
606
|
/**
|