@nodish/core 0.0.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/pack.d.ts
CHANGED
|
@@ -36,7 +36,7 @@ export type NodeId = string;
|
|
|
36
36
|
export type PortId = string;
|
|
37
37
|
export type ConnectionId = string;
|
|
38
38
|
export type NodeTypeId = string;
|
|
39
|
-
type
|
|
39
|
+
export type NodeLocation = {
|
|
40
40
|
x: number;
|
|
41
41
|
y: number;
|
|
42
42
|
};
|
|
@@ -194,7 +194,7 @@ export interface DefiniteNode {
|
|
|
194
194
|
id: NodeId;
|
|
195
195
|
/** {@link IndefiniteNode} this instance was created from. */
|
|
196
196
|
typeId: NodeTypeId;
|
|
197
|
-
location:
|
|
197
|
+
location: NodeLocation;
|
|
198
198
|
inputs: NodeIO;
|
|
199
199
|
outputs: NodeIO;
|
|
200
200
|
label?: string;
|
package/dist/src/pack/index.d.ts
CHANGED
|
@@ -2,4 +2,4 @@ export type { DynamicPortsSpec, IOSpec, NodeSpec, NodeSpecRegistry, PortSpec, }
|
|
|
2
2
|
export { defineType } from '../store/registry/defineType';
|
|
3
3
|
export type { TypeSpec } from '../store/registry/defineType';
|
|
4
4
|
export type { NodePack, PackSetupContext } from '../store/registry';
|
|
5
|
-
export type { GraphPortSpec, IndefiniteNode, PortDefinition, PortTypeDefinition, TypeWidgetSpec, } from '../store/model';
|
|
5
|
+
export type { GraphPortSpec, IndefiniteNode, NodeLocation, PortDefinition, PortTypeDefinition, TypeWidgetSpec, } from '../store/model';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { NodeSpec } from '../registry/defineNode';
|
|
2
2
|
import { UpdateGraphInterfaceOptions } from '../interface/graphInterface';
|
|
3
|
-
import { DefiniteNode, GraphInterface,
|
|
3
|
+
import { DefiniteNode, GraphInterface, NodeLocation, NodeMap } from '../model';
|
|
4
4
|
export declare const COMPOSITE_TYPE = "composite/group";
|
|
5
5
|
export type { UpdateGraphInterfaceOptions };
|
|
6
6
|
export declare const compositeNode: NodeSpec;
|
|
@@ -8,5 +8,5 @@ export declare function buildNestedMap(parent: NodeMap, composite: DefiniteNode)
|
|
|
8
8
|
export declare function persistNestedMap(parent: NodeMap, composite: DefiniteNode, nested: NodeMap): void;
|
|
9
9
|
export declare function reconcileCompositePorts(map: NodeMap, composite: DefiniteNode): void;
|
|
10
10
|
export declare function applyGraphInterfaceUpdate(map: NodeMap, iface: GraphInterface, options?: UpdateGraphInterfaceOptions): string[];
|
|
11
|
-
export declare function instantiateComposite(parent: NodeMap, location:
|
|
11
|
+
export declare function instantiateComposite(parent: NodeMap, location: NodeLocation): DefiniteNode;
|
|
12
12
|
export declare function isCompositeNode(node: DefiniteNode): boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { DefiniteNode, IndefiniteNode,
|
|
1
|
+
import { DefiniteNode, IndefiniteNode, NodeLocation } from '../model';
|
|
2
2
|
/**
|
|
3
3
|
* Create a placed {@link DefiniteNode} from a node type, generating fresh port ids.
|
|
4
4
|
* For dynamic nodes, the initial port set comes from {@link IndefiniteNode.resolvePorts}
|
|
5
5
|
* seeded with the definition's default parameter values.
|
|
6
6
|
*/
|
|
7
|
-
export declare function instantiate(def: IndefiniteNode, location:
|
|
7
|
+
export declare function instantiate(def: IndefiniteNode, location: NodeLocation): DefiniteNode;
|
|
@@ -3,7 +3,7 @@ export type NodeId = string;
|
|
|
3
3
|
export type PortId = string;
|
|
4
4
|
export type ConnectionId = string;
|
|
5
5
|
export type NodeTypeId = string;
|
|
6
|
-
export type
|
|
6
|
+
export type NodeLocation = {
|
|
7
7
|
x: number;
|
|
8
8
|
y: number;
|
|
9
9
|
};
|
|
@@ -161,7 +161,7 @@ export interface DefiniteNode {
|
|
|
161
161
|
id: NodeId;
|
|
162
162
|
/** {@link IndefiniteNode} this instance was created from. */
|
|
163
163
|
typeId: NodeTypeId;
|
|
164
|
-
location:
|
|
164
|
+
location: NodeLocation;
|
|
165
165
|
inputs: NodeIO;
|
|
166
166
|
outputs: NodeIO;
|
|
167
167
|
label?: string;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nodish/core",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.1.2",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"**/*.css"
|
|
@@ -18,8 +18,7 @@
|
|
|
18
18
|
"types": "./dist/src/vue/index.d.ts",
|
|
19
19
|
"import": "./dist/vue.js",
|
|
20
20
|
"style": "./dist/vue.css"
|
|
21
|
-
}
|
|
22
|
-
"./vue.css": "./dist/vue.css"
|
|
21
|
+
}
|
|
23
22
|
},
|
|
24
23
|
"scripts": {
|
|
25
24
|
"preinstall": "node scripts/copy-dev-to-local.mjs",
|
|
@@ -39,5 +38,16 @@
|
|
|
39
38
|
"vite-plugin-dts": "^4.5.4",
|
|
40
39
|
"vite-plugin-lib-inject-css": "^2.2.2",
|
|
41
40
|
"vue": "^3.5.35"
|
|
41
|
+
},
|
|
42
|
+
"repository": {
|
|
43
|
+
"type": "git",
|
|
44
|
+
"url": "https://github.com/nodish/core.git"
|
|
45
|
+
},
|
|
46
|
+
"bugs": {
|
|
47
|
+
"url": "https://github.com/nodish/core/issues"
|
|
48
|
+
},
|
|
49
|
+
"homepage": "https://github.com/nodish/core#readme",
|
|
50
|
+
"publishConfig": {
|
|
51
|
+
"access": "public"
|
|
42
52
|
}
|
|
43
53
|
}
|
package/readme.md
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
# nodish/core
|
|
2
|
-
|
|
3
|
-
An extensible node editor.
|
|
4
|
-
|
|
5
|
-
## Development
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
npm i # will make a copy of /dev to /local, which is in the .gitignore
|
|
9
|
-
npm run dev # will start the development server
|
|
10
|
-
```
|
|
11
|
-
|
|
12
|
-
## Examples
|
|
13
|
-
|
|
14
|
-
See the [dev](./dev) directory for how to use NodeViewer and nodepacks.
|
|
1
|
+
# nodish/core
|
|
2
|
+
|
|
3
|
+
An extensible node editor.
|
|
4
|
+
|
|
5
|
+
## Development
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm i # will make a copy of /dev to /local, which is in the .gitignore
|
|
9
|
+
npm run dev # will start the development server
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Examples
|
|
13
|
+
|
|
14
|
+
See the [dev](./dev) directory for how to use NodeViewer and nodepacks.
|