@nodish/core 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/LICENSE +661 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +74 -14
- package/dist/index.js +732 -625
- package/package.json +7 -4
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-975cb236]{flex:1;min-width:0}.port[data-v-28eb3da7]{box-sizing:border-box;font-size:var(--v7cc4cde0);align-items:center;gap:4px;font-family:sans-serif;display:flex}.port.out[data-v-28eb3da7]{justify-content:flex-end}.port.out.hasWidget[data-v-28eb3da7]{justify-content:flex-start}.port.hasWidget[data-v-28eb3da7] .field{flex:1;min-width:0}.label[data-v-28eb3da7]{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.socket[data-v-28eb3da7]{cursor:crosshair;z-index:1;border-radius:50%;flex:none;width:7.5px;height:7.5px}.socket[data-v-28eb3da7]:hover{box-shadow:0 0 0 3px #ffffff40}.socket.multi[data-v-28eb3da7]{border-radius:0}.port.in .socket[data-v-28eb3da7]{margin-left:-5px}.port.in.no-socket[data-v-28eb3da7]{padding-left:6.5px}.port.out .socket[data-v-28eb3da7]{margin-right:-5px}.node[data-v-4f4ae398]{color:#eee;font-family:sans-serif;font-size:var(--v50d21574);-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-4f4ae398]{outline-offset:0px;outline:2px solid #f5a623}.node.errored .error-ring[data-v-4f4ae398]{pointer-events:none;z-index:0;border:4px solid #e5393555;border-radius:6px;position:absolute;inset:-4px}.node.errored>.header[data-v-4f4ae398],.node.errored>.body[data-v-4f4ae398]{z-index:1;position:relative}.header[data-v-4f4ae398]{padding:0 2px 0 var(--v691ebaeb);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-4f4ae398]:active{cursor:grabbing}.title[data-v-4f4ae398]{text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;line-height:1;overflow:hidden}.grip[data-v-4f4ae398]{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-4f4ae398]{background:#ffffff73;border-radius:50%;width:2px;height:2px}.body[data-v-4f4ae398]{gap:6px;display:flex}.col[data-v-4f4ae398]{flex-direction:column;min-width:0;display:flex}.body>.col[data-v-4f4ae398]:only-child{flex:1 1 0}.body>.col.output[data-v-4f4ae398]:only-child{padding-left:var(--v691ebaeb)}.body>.col.input[data-v-4f4ae398]:only-child{padding-right:var(--v691ebaeb)}.input[data-v-4f4ae398]{flex:1 1 0}.output[data-v-4f4ae398]{flex:none}.output.wide[data-v-4f4ae398]{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-e5bdc707]{grid-template-columns:minmax(0,1fr) 72px 16px;align-items:center;gap:3px;display:grid}.iface-head span[data-v-e5bdc707]{opacity:.55;font-size:10px;line-height:1}.iface-rows[data-v-e5bdc707]{flex-direction:column;gap:6px;display:flex}.iface-entry[data-v-e5bdc707]{flex-direction:column;gap:3px;display:flex}.iface-default-row[data-v-e5bdc707]{grid-template-columns:44px minmax(0,1fr);align-items:center;gap:4px;display:grid}.iface-default-label[data-v-e5bdc707]{opacity:.55;font-size:10px;line-height:1}.iface-field[data-v-e5bdc707]{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-e5bdc707]{cursor:pointer;padding-right:2px}.iface-default-widget[data-v-e5bdc707]{min-width:0}.iface-default-widget[data-v-e5bdc707] .field{box-sizing:border-box;width:100%;height:18px;font:inherit;padding:0 4px;font-size:11px;line-height:18px}.iface-remove[data-v-e5bdc707]{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-e5bdc707]:hover{color:#ffb4b4;background:#e5393540}.iface-empty[data-v-e5bdc707]{opacity:.45;text-align:center;padding:2px 0;font-size:10px}.iface-error[data-v-e5bdc707]{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-cadec420]{box-sizing:border-box;font-size:var(--v4929e218);align-items:center;gap:4px;font-family:sans-serif;display:flex}.port.out[data-v-cadec420]{justify-content:flex-end}.port.out.hasWidget[data-v-cadec420]{justify-content:flex-start}.port.hasWidget[data-v-cadec420] .field{flex:1;min-width:0}.label[data-v-cadec420]{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.socket[data-v-cadec420]{cursor:crosshair;z-index:1;border-radius:50%;flex:none;width:7.5px;height:7.5px}.socket[data-v-cadec420]:hover{box-shadow:0 0 0 3px #ffffff40}.socket.multi[data-v-cadec420]{border-radius:0}.port.in .socket[data-v-cadec420]{margin-left:-5px}.port.in.no-socket[data-v-cadec420]{padding-left:6.5px}.port.out .socket[data-v-cadec420]{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}
|
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,12 @@ import { ComponentProvideOptions } from 'vue';
|
|
|
4
4
|
import { DefineComponent } from 'vue';
|
|
5
5
|
import { PublicProps } from 'vue';
|
|
6
6
|
|
|
7
|
+
declare const __VLS_export: DefineComponent<__VLS_Props, {
|
|
8
|
+
resetView: typeof resetView;
|
|
9
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
10
|
+
ioWidgets: boolean;
|
|
11
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
|
|
7
13
|
declare type __VLS_Props = {
|
|
8
14
|
map: NodeMap;
|
|
9
15
|
ioWidgets?: boolean;
|
|
@@ -15,6 +21,8 @@ declare type __VLS_Props = {
|
|
|
15
21
|
*/
|
|
16
22
|
export declare function applyDocument(map: NodeMap, doc: GraphDocument): string[];
|
|
17
23
|
|
|
24
|
+
export declare function assignable(map: NodeMap, from: PortTypeId, to: PortTypeId): boolean;
|
|
25
|
+
|
|
18
26
|
/**
|
|
19
27
|
* Return the single Input and Output nodes on the graph.
|
|
20
28
|
* @throws When the graph does not contain exactly one of each.
|
|
@@ -197,6 +205,12 @@ export declare function instantiate(def: IndefiniteNode, location: NodeLocation)
|
|
|
197
205
|
/** Input or output port templates keyed by port name. */
|
|
198
206
|
export declare type IOSpec = Record<string, PortSpec>;
|
|
199
207
|
|
|
208
|
+
/** Union ports are connection-only — no inline value editor when disconnected. */
|
|
209
|
+
export declare function isConnectionOnly(port: Pick<Port | PortDefinition, "type" | "types">): boolean;
|
|
210
|
+
|
|
211
|
+
/** True when the port accepts more than one type. */
|
|
212
|
+
export declare function isUnionPort(port: Pick<Port | PortDefinition, "type" | "types">): boolean;
|
|
213
|
+
|
|
200
214
|
/** Evaluation errors keyed by {@link NodeId}. */
|
|
201
215
|
declare type NodeErrors = Record<NodeId, string>;
|
|
202
216
|
|
|
@@ -230,6 +244,8 @@ export declare interface NodeMap {
|
|
|
230
244
|
/** Ids of packs loaded via {@link NodeMap.loadPack}. */
|
|
231
245
|
extensions: string[];
|
|
232
246
|
graphInterface: GraphInterface;
|
|
247
|
+
/** Ownership metadata for types and node types registered via packs. */
|
|
248
|
+
registrationMeta: RegistrationMeta;
|
|
233
249
|
/**
|
|
234
250
|
* Register types, nodes, and optional widget setup from a pack.
|
|
235
251
|
* @returns Registration errors (empty array on success).
|
|
@@ -244,6 +260,8 @@ export declare interface NodeMap {
|
|
|
244
260
|
export declare interface NodePack {
|
|
245
261
|
/** Unique pack id (e.g. `"@my-org/my-pack"`). Recorded in {@link GraphDocument.extensions}. */
|
|
246
262
|
id: string;
|
|
263
|
+
/** Default priority for all types and nodes in this pack (default 0). */
|
|
264
|
+
priority?: number;
|
|
247
265
|
/** Custom {@link PortTypeDefinition}s to register. */
|
|
248
266
|
types?: TypeRegistry;
|
|
249
267
|
/** Custom node definitions to register (authoring form). */
|
|
@@ -287,6 +305,8 @@ export declare interface NodeSpec {
|
|
|
287
305
|
* act as initial defaults when present.
|
|
288
306
|
*/
|
|
289
307
|
resolvePorts?: DynamicPortsSpec;
|
|
308
|
+
/** Override pack priority when registering this node from a {@link NodePack}. */
|
|
309
|
+
priority?: number;
|
|
290
310
|
}
|
|
291
311
|
|
|
292
312
|
/** Node types in authoring form, keyed by {@link NodeTypeId}. */
|
|
@@ -294,13 +314,7 @@ export declare type NodeSpecRegistry = Record<NodeTypeId, NodeSpec>;
|
|
|
294
314
|
|
|
295
315
|
declare type NodeTypeId = string;
|
|
296
316
|
|
|
297
|
-
export declare const NodeViewer:
|
|
298
|
-
resetView: typeof resetView;
|
|
299
|
-
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
300
|
-
ioWidgets: boolean;
|
|
301
|
-
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
302
|
-
viewerEl: HTMLDivElement;
|
|
303
|
-
}, HTMLDivElement>;
|
|
317
|
+
export declare const NodeViewer: typeof __VLS_export;
|
|
304
318
|
|
|
305
319
|
/** {@link IndefiniteNode.typeId} for the graph Output (Group Output) boundary node. */
|
|
306
320
|
export declare const OUTPUT_TYPE = "io/output";
|
|
@@ -308,10 +322,12 @@ export declare const OUTPUT_TYPE = "io/output";
|
|
|
308
322
|
/** Context passed to {@link NodePack.setup} for widget registration. */
|
|
309
323
|
export declare interface PackSetupContext {
|
|
310
324
|
/**
|
|
311
|
-
* Bind a Vue component to all editable ports of a type id.
|
|
312
|
-
* Overrides the generic widget for that type.
|
|
325
|
+
* Bind a Vue component to all editable ports of a type id (default widget slot).
|
|
313
326
|
*/
|
|
314
|
-
registerTypeWidget:
|
|
327
|
+
registerTypeWidget: {
|
|
328
|
+
(typeId: string, component: Component): void;
|
|
329
|
+
(typeId: string, widgetId: string, component: Component): void;
|
|
330
|
+
};
|
|
315
331
|
/**
|
|
316
332
|
* Bind a Vue component to a custom widget id
|
|
317
333
|
* ({@link TypeWidgetSpec} `kind: "custom"`).
|
|
@@ -334,14 +350,19 @@ export declare type Port = {
|
|
|
334
350
|
/** Matches the {@link PortDefinition.name} it came from. */
|
|
335
351
|
name: string;
|
|
336
352
|
type: PortType;
|
|
353
|
+
types?: PortTypeId[];
|
|
337
354
|
direction: PortDirection;
|
|
338
355
|
/** Input: value when disconnected. Output: optional cache of last computed value. */
|
|
339
356
|
value?: unknown;
|
|
340
357
|
userOnly?: boolean;
|
|
341
358
|
multi?: boolean;
|
|
359
|
+
widgetId?: string;
|
|
342
360
|
customProps?: Record<string, unknown>;
|
|
343
361
|
};
|
|
344
362
|
|
|
363
|
+
/** Whether `from` may connect into `toPort` (any of its accepted types). */
|
|
364
|
+
export declare function portAccepts(map: NodeMap, from: PortTypeId, toPort: Port): boolean;
|
|
365
|
+
|
|
345
366
|
/**
|
|
346
367
|
* Port template declared by a node type ({@link IndefiniteNode}). Has no id and
|
|
347
368
|
* no live value — only describes ports that instances will receive.
|
|
@@ -349,7 +370,13 @@ export declare type Port = {
|
|
|
349
370
|
export declare type PortDefinition = {
|
|
350
371
|
/** Stable, human-authored key; referenced inside `execute()`. */
|
|
351
372
|
name: string;
|
|
373
|
+
/** Primary/display type (color, labels). Must appear in {@link types} when set. */
|
|
352
374
|
type: PortType;
|
|
375
|
+
/**
|
|
376
|
+
* Accepted types for this port. When length > 1, the port is connection-only
|
|
377
|
+
* (no inline editor when disconnected).
|
|
378
|
+
*/
|
|
379
|
+
types?: PortTypeId[];
|
|
353
380
|
/** Used by an input when nothing is connected to it. */
|
|
354
381
|
defaultValue?: unknown;
|
|
355
382
|
description?: string;
|
|
@@ -363,6 +390,8 @@ export declare type PortDefinition = {
|
|
|
363
390
|
* values as an unordered array of `type`.
|
|
364
391
|
*/
|
|
365
392
|
multi?: boolean;
|
|
393
|
+
/** Named widget variant from the port type's {@link PortTypeDefinition.widgets}. */
|
|
394
|
+
widgetId?: string;
|
|
366
395
|
/**
|
|
367
396
|
* Widget-specific configuration merged on top of the type's widget spec.
|
|
368
397
|
* Recognized keys: `options`, `min`, `max`, `step`, `rows`, `rowHeight`.
|
|
@@ -405,7 +434,11 @@ export declare interface PortTypeDefinition {
|
|
|
405
434
|
accepts?: (from: PortTypeId) => boolean;
|
|
406
435
|
/** Fallback when a port of this type omits its own default. */
|
|
407
436
|
defaultValue?: unknown;
|
|
408
|
-
/**
|
|
437
|
+
/** Named widget variants for this type. */
|
|
438
|
+
widgets?: Record<string, TypeWidgetSpec>;
|
|
439
|
+
/** Key into {@link widgets}; defaults to `"default"`. */
|
|
440
|
+
defaultWidget?: string;
|
|
441
|
+
/** Legacy single-widget descriptor; normalized to {@link widgets}.default. */
|
|
409
442
|
widget?: TypeWidgetSpec;
|
|
410
443
|
/** Parse a raw string (e.g. from an input field) into a value. */
|
|
411
444
|
parse?: (raw: string) => unknown;
|
|
@@ -413,11 +446,16 @@ export declare interface PortTypeDefinition {
|
|
|
413
446
|
format?: (value: unknown) => string;
|
|
414
447
|
/** Normalize or clamp a value after edit or connection. */
|
|
415
448
|
coerce?: (value: unknown) => unknown;
|
|
449
|
+
/** Pack registration priority override (not used at runtime). */
|
|
450
|
+
priority?: number;
|
|
416
451
|
}
|
|
417
452
|
|
|
418
453
|
/** Key into the {@link TypeRegistry} (e.g. `"number"`). */
|
|
419
454
|
export declare type PortTypeId = string;
|
|
420
455
|
|
|
456
|
+
/** Accepted types for a port. Falls back to `[port.type]` when `types` is omitted. */
|
|
457
|
+
export declare function portTypes(port: Pick<Port | PortDefinition, "type" | "types">): PortTypeId[];
|
|
458
|
+
|
|
421
459
|
/**
|
|
422
460
|
* Bind a Vue component to a custom widget id
|
|
423
461
|
* ({@link TypeWidgetSpec} `kind: "custom"`).
|
|
@@ -431,11 +469,27 @@ export declare function registerComponentWidget(componentId: string, component:
|
|
|
431
469
|
export declare function registerDefaultTypeWidgets(): void;
|
|
432
470
|
|
|
433
471
|
/**
|
|
434
|
-
* Bind a Vue component to
|
|
435
|
-
* Overrides the generic widget for that type.
|
|
472
|
+
* Bind a Vue component to editable ports of a type id (default widget slot).
|
|
436
473
|
*/
|
|
437
474
|
export declare function registerTypeWidget(typeId: string, component: Component): void;
|
|
438
475
|
|
|
476
|
+
/**
|
|
477
|
+
* Bind a Vue component to a named widget slot for a type id.
|
|
478
|
+
*/
|
|
479
|
+
export declare function registerTypeWidget(typeId: string, widgetId: string, component: Component): void;
|
|
480
|
+
|
|
481
|
+
/** Tracks which pack registered each type/node id and at what priority. */
|
|
482
|
+
export declare type RegistrationMeta = {
|
|
483
|
+
types: Record<PortTypeId, {
|
|
484
|
+
packId: string;
|
|
485
|
+
priority: number;
|
|
486
|
+
}>;
|
|
487
|
+
nodeTypes: Record<NodeTypeId, {
|
|
488
|
+
packId: string;
|
|
489
|
+
priority: number;
|
|
490
|
+
}>;
|
|
491
|
+
};
|
|
492
|
+
|
|
439
493
|
declare function resetView(): void;
|
|
440
494
|
|
|
441
495
|
/**
|
|
@@ -472,8 +526,14 @@ export declare interface TypeSpec {
|
|
|
472
526
|
accepts?: (from: PortTypeId) => boolean;
|
|
473
527
|
/** Fallback when a port of this type omits its own default. */
|
|
474
528
|
defaultValue?: unknown;
|
|
475
|
-
/**
|
|
529
|
+
/** Named widget variants for ports of this type. */
|
|
530
|
+
widgets?: Record<string, TypeWidgetSpec>;
|
|
531
|
+
/** Key into {@link widgets}; defaults to `"default"`. */
|
|
532
|
+
defaultWidget?: string;
|
|
533
|
+
/** Legacy single-widget descriptor; normalized to {@link widgets}.default. */
|
|
476
534
|
widget?: TypeWidgetSpec;
|
|
535
|
+
/** Override pack priority when registering this type from a {@link NodePack}. */
|
|
536
|
+
priority?: number;
|
|
477
537
|
/** Override default parse behaviour for this type's widget. */
|
|
478
538
|
parse?: (raw: string) => unknown;
|
|
479
539
|
/** Override default format behaviour for this type's widget. */
|