@xyo-network/react-node-context 3.0.1 → 3.0.3

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.
@@ -0,0 +1,3 @@
1
+ import type { ModuleRepositoryContextState } from './State.ts';
2
+ export declare const ModuleRepositoryContext: import("react").Context<ModuleRepositoryContextState & import("@xyo-network/react-shared").ContextExState>;
3
+ //# sourceMappingURL=Context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Context.d.ts","sourceRoot":"","sources":["../../../src/ModuleRepository/Context.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,YAAY,CAAA;AAE9D,eAAO,MAAM,uBAAuB,4GAAkD,CAAA"}
@@ -0,0 +1,11 @@
1
+ import type { ModuleResolver } from '@xyo-network/module-model';
2
+ import type { ContextExState } from '@xyo-network/react-shared';
3
+ export interface ResolverEntries {
4
+ [name: string]: ModuleResolver;
5
+ }
6
+ export interface ModuleRepositoryContextState extends ContextExState {
7
+ removeResolvers?: (names?: string[]) => boolean;
8
+ resolvers?: ResolverEntries;
9
+ updateResolvers?: (resolvers: ResolverEntries) => boolean;
10
+ }
11
+ //# sourceMappingURL=State.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"State.d.ts","sourceRoot":"","sources":["../../../src/ModuleRepository/State.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAE/D,MAAM,WAAW,eAAe;IAC9B,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,CAAA;CAC/B;AAED,MAAM,WAAW,4BAA6B,SAAQ,cAAc;IAClE,eAAe,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,KAAK,OAAO,CAAA;IAC/C,SAAS,CAAC,EAAE,eAAe,CAAA;IAC3B,eAAe,CAAC,EAAE,CAAC,SAAS,EAAE,eAAe,KAAK,OAAO,CAAA;CAC1D"}
@@ -0,0 +1,3 @@
1
+ export * from './Context.ts';
2
+ export * from './State.ts';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ModuleRepository/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,YAAY,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { NodeContextState } from './State.ts';
2
+ export declare const NodeContext: import("react").Context<NodeContextState & import("@xyo-network/react-shared").ContextExState>;
3
+ //# sourceMappingURL=Context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Context.d.ts","sourceRoot":"","sources":["../../../src/Node/Context.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAElD,eAAO,MAAM,WAAW,gGAAsC,CAAA"}
@@ -0,0 +1,5 @@
1
+ import type { NodeInstance } from '@xyo-network/node-model';
2
+ export interface NodeContextState {
3
+ node?: NodeInstance | null;
4
+ }
5
+ //# sourceMappingURL=State.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"State.d.ts","sourceRoot":"","sources":["../../../src/Node/State.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAC3D,MAAM,WAAW,gBAAgB;IAC/B,IAAI,CAAC,EAAE,YAAY,GAAG,IAAI,CAAA;CAC3B"}
@@ -0,0 +1,3 @@
1
+ export * from './Context.ts';
2
+ export * from './State.ts';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Node/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,YAAY,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { NodeDrawerState } from './State.ts';
2
+ export declare const NodeDrawerContext: import("react").Context<NodeDrawerState & import("@xyo-network/react-shared").ContextExState>;
3
+ //# sourceMappingURL=Context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Context.d.ts","sourceRoot":"","sources":["../../../src/NodeDrawerContext/Context.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAEjD,eAAO,MAAM,iBAAiB,+FAAqC,CAAA"}
@@ -0,0 +1,7 @@
1
+ import type { ContextExState } from '@xyo-network/react-shared';
2
+ import type { Dispatch, SetStateAction } from 'react';
3
+ export interface NodeDrawerState extends ContextExState {
4
+ open?: boolean;
5
+ setOpen?: Dispatch<SetStateAction<boolean>>;
6
+ }
7
+ //# sourceMappingURL=State.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"State.d.ts","sourceRoot":"","sources":["../../../src/NodeDrawerContext/State.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC/D,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAErD,MAAM,WAAW,eAAgB,SAAQ,cAAc;IACrD,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,OAAO,CAAC,EAAE,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAA;CAC5C"}
@@ -0,0 +1,3 @@
1
+ export * from './Context.ts';
2
+ export * from './State.ts';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/NodeDrawerContext/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,YAAY,CAAA"}
@@ -1,32 +1,4 @@
1
- import * as react from 'react';
2
- import { Dispatch, SetStateAction } from 'react';
3
- import * as _xyo_network_react_shared from '@xyo-network/react-shared';
4
- import { ContextExState } from '@xyo-network/react-shared';
5
- import { ModuleResolver } from '@xyo-network/module-model';
6
- import { NodeInstance } from '@xyo-network/node-model';
7
-
8
- interface ResolverEntries {
9
- [name: string]: ModuleResolver;
10
- }
11
- interface ModuleRepositoryContextState extends ContextExState {
12
- removeResolvers?: (names?: string[]) => boolean;
13
- resolvers?: ResolverEntries;
14
- updateResolvers?: (resolvers: ResolverEntries) => boolean;
15
- }
16
-
17
- declare const ModuleRepositoryContext: react.Context<ModuleRepositoryContextState & _xyo_network_react_shared.ContextExState>;
18
-
19
- interface NodeContextState {
20
- node?: NodeInstance | null;
21
- }
22
-
23
- declare const NodeContext: react.Context<NodeContextState & _xyo_network_react_shared.ContextExState>;
24
-
25
- interface NodeDrawerState extends ContextExState {
26
- open?: boolean;
27
- setOpen?: Dispatch<SetStateAction<boolean>>;
28
- }
29
-
30
- declare const NodeDrawerContext: react.Context<NodeDrawerState & _xyo_network_react_shared.ContextExState>;
31
-
32
- export { ModuleRepositoryContext, type ModuleRepositoryContextState, NodeContext, type NodeContextState, NodeDrawerContext, type NodeDrawerState, type ResolverEntries };
1
+ export * from './ModuleRepository/index.ts';
2
+ export * from './Node/index.ts';
3
+ export * from './NodeDrawerContext/index.ts';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAA;AAC3C,cAAc,iBAAiB,CAAA;AAC/B,cAAc,8BAA8B,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/ModuleRepository/Context.ts","../../src/Node/Context.ts","../../src/NodeDrawerContext/Context.ts"],"sourcesContent":["import { createContextEx } from '@xyo-network/react-shared'\n\nimport { ModuleRepositoryContextState } from './State.ts'\n\nexport const ModuleRepositoryContext = createContextEx<ModuleRepositoryContextState>()\n","import { createContextEx } from '@xyo-network/react-shared'\n\nimport { NodeContextState } from './State.ts'\n\nexport const NodeContext = createContextEx<NodeContextState>()\n","import { createContextEx } from '@xyo-network/react-shared'\n\nimport { NodeDrawerState } from './State.ts'\n\nexport const NodeDrawerContext = createContextEx<NodeDrawerState>()\n"],"mappings":";AAAA,SAASA,uBAAuB;AAIzB,IAAMC,0BAA0BD,gBAAAA;;;ACJvC,SAASE,mBAAAA,wBAAuB;AAIzB,IAAMC,cAAcD,iBAAAA;;;ACJ3B,SAASE,mBAAAA,wBAAuB;AAIzB,IAAMC,oBAAoBD,iBAAAA;","names":["createContextEx","ModuleRepositoryContext","createContextEx","NodeContext","createContextEx","NodeDrawerContext"]}
1
+ {"version":3,"sources":["../../src/ModuleRepository/Context.ts","../../src/Node/Context.ts","../../src/NodeDrawerContext/Context.ts"],"sourcesContent":["import { createContextEx } from '@xyo-network/react-shared'\n\nimport type { ModuleRepositoryContextState } from './State.ts'\n\nexport const ModuleRepositoryContext = createContextEx<ModuleRepositoryContextState>()\n","import { createContextEx } from '@xyo-network/react-shared'\n\nimport type { NodeContextState } from './State.ts'\n\nexport const NodeContext = createContextEx<NodeContextState>()\n","import { createContextEx } from '@xyo-network/react-shared'\n\nimport type { NodeDrawerState } from './State.ts'\n\nexport const NodeDrawerContext = createContextEx<NodeDrawerState>()\n"],"mappings":";AAAA,SAASA,uBAAuB;AAIzB,IAAMC,0BAA0BD,gBAAAA;;;ACJvC,SAASE,mBAAAA,wBAAuB;AAIzB,IAAMC,cAAcD,iBAAAA;;;ACJ3B,SAASE,mBAAAA,wBAAuB;AAIzB,IAAMC,oBAAoBD,iBAAAA;","names":["createContextEx","ModuleRepositoryContext","createContextEx","NodeContext","createContextEx","NodeDrawerContext"]}
package/package.json CHANGED
@@ -1,22 +1,55 @@
1
1
  {
2
2
  "name": "@xyo-network/react-node-context",
3
+ "version": "3.0.3",
4
+ "description": "Common React library for all XYO projects that use React",
5
+ "keywords": [
6
+ "xyo",
7
+ "utility",
8
+ "typescript",
9
+ "react"
10
+ ],
11
+ "homepage": "https://xyo.network",
12
+ "bugs": {
13
+ "url": "git+https://github.com/XYOracleNetwork/sdk-xyo-react-js/issues",
14
+ "email": "support@xyo.network"
15
+ },
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "git+https://github.com/XYOracleNetwork/sdk-xyo-react-js.git"
19
+ },
20
+ "license": "LGPL-3.0-only",
3
21
  "author": {
4
- "email": "support@xyo.network",
5
22
  "name": "XYO Development Team",
23
+ "email": "support@xyo.network",
6
24
  "url": "https://xyo.network"
7
25
  },
8
- "bugs": {
9
- "email": "support@xyo.network",
10
- "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/issues"
26
+ "sideEffects": false,
27
+ "type": "module",
28
+ "exports": {
29
+ ".": {
30
+ "import": {
31
+ "types": "./dist/browser/index.d.ts",
32
+ "default": "./dist/browser/index.mjs"
33
+ },
34
+ "types": "./dist/browser/index.d.ts",
35
+ "default": "./dist/browser/index.mjs"
36
+ },
37
+ "./package.json": "./package.json"
38
+ },
39
+ "module": "dist/browser/index.mjs",
40
+ "types": "dist/browser/index.d.ts",
41
+ "scripts": {
42
+ "license": "yarn license-checker --exclude \"MIT, ISC, Apache-2.0, BSD, BSD-2-Clause, CC-BY-4.0, Unlicense, CC-BY-3.0, CC0-1.0\"",
43
+ "lint-pkg": "npmPkgJsonLint ."
11
44
  },
12
45
  "dependencies": {
13
- "@xyo-network/module-model": "^3.0.2",
14
- "@xyo-network/node-model": "^3.0.2",
15
- "@xyo-network/react-shared": "^3.0.1"
46
+ "@xyo-network/module-model": "^3.0.15",
47
+ "@xyo-network/node-model": "^3.0.15",
48
+ "@xyo-network/react-shared": "^3.0.3"
16
49
  },
17
50
  "devDependencies": {
18
- "@xylabs/ts-scripts-yarn3": "^4.0.0-rc.15",
19
- "@xylabs/tsconfig-react": "^4.0.0-rc.15",
51
+ "@xylabs/ts-scripts-yarn3": "^4.0.7",
52
+ "@xylabs/tsconfig-react": "^4.0.7",
20
53
  "typescript": "^5.5.4"
21
54
  },
22
55
  "peerDependencies": {
@@ -26,41 +59,8 @@
26
59
  "react": "^18",
27
60
  "react-dom": "^18"
28
61
  },
29
- "description": "Common React library for all XYO projects that use React",
30
- "docs": "dist/docs.json",
31
- "exports": {
32
- ".": {
33
- "import": {
34
- "types": "./dist/browser/index.d.ts",
35
- "default": "./dist/browser/index.mjs"
36
- },
37
- "types": "./dist/browser/index.d.ts",
38
- "default": "./dist/browser/index.mjs"
39
- },
40
- "./package.json": "./package.json"
41
- },
42
- "module": "dist/browser/index.mjs",
43
- "homepage": "https://xyo.network",
44
- "keywords": [
45
- "xyo",
46
- "utility",
47
- "typescript",
48
- "react"
49
- ],
50
- "license": "LGPL-3.0-only",
51
62
  "publishConfig": {
52
63
  "access": "public"
53
64
  },
54
- "repository": {
55
- "type": "git",
56
- "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js.git"
57
- },
58
- "scripts": {
59
- "lint-pkg": "npmPkgJsonLint .",
60
- "license": "yarn license-checker --exclude \"MIT, ISC, Apache-2.0, BSD, BSD-2-Clause, CC-BY-4.0, Unlicense, CC-BY-3.0, CC0-1.0\""
61
- },
62
- "sideEffects": false,
63
- "types": "dist/browser/index.d.ts",
64
- "version": "3.0.1",
65
- "type": "module"
65
+ "docs": "dist/docs.json"
66
66
  }
@@ -1,5 +1,5 @@
1
1
  import { createContextEx } from '@xyo-network/react-shared'
2
2
 
3
- import { ModuleRepositoryContextState } from './State.ts'
3
+ import type { ModuleRepositoryContextState } from './State.ts'
4
4
 
5
5
  export const ModuleRepositoryContext = createContextEx<ModuleRepositoryContextState>()
@@ -1,5 +1,5 @@
1
- import { ModuleResolver } from '@xyo-network/module-model'
2
- import { ContextExState } from '@xyo-network/react-shared'
1
+ import type { ModuleResolver } from '@xyo-network/module-model'
2
+ import type { ContextExState } from '@xyo-network/react-shared'
3
3
 
4
4
  export interface ResolverEntries {
5
5
  [name: string]: ModuleResolver
@@ -1,5 +1,5 @@
1
1
  import { createContextEx } from '@xyo-network/react-shared'
2
2
 
3
- import { NodeContextState } from './State.ts'
3
+ import type { NodeContextState } from './State.ts'
4
4
 
5
5
  export const NodeContext = createContextEx<NodeContextState>()
package/src/Node/State.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { NodeInstance } from '@xyo-network/node-model'
1
+ import type { NodeInstance } from '@xyo-network/node-model'
2
2
  export interface NodeContextState {
3
3
  node?: NodeInstance | null
4
4
  }
@@ -1,5 +1,5 @@
1
1
  import { createContextEx } from '@xyo-network/react-shared'
2
2
 
3
- import { NodeDrawerState } from './State.ts'
3
+ import type { NodeDrawerState } from './State.ts'
4
4
 
5
5
  export const NodeDrawerContext = createContextEx<NodeDrawerState>()
@@ -1,5 +1,5 @@
1
- import { ContextExState } from '@xyo-network/react-shared'
2
- import { Dispatch, SetStateAction } from 'react'
1
+ import type { ContextExState } from '@xyo-network/react-shared'
2
+ import type { Dispatch, SetStateAction } from 'react'
3
3
 
4
4
  export interface NodeDrawerState extends ContextExState {
5
5
  open?: boolean
package/xy.config.ts CHANGED
@@ -1,9 +1,7 @@
1
- import { XyTsupConfig } from '@xylabs/ts-scripts-yarn3'
1
+ import type { XyTsupConfig } from '@xylabs/ts-scripts-yarn3'
2
2
  const config: XyTsupConfig = {
3
3
  compile: {
4
- browser: {
5
- src: true,
6
- },
4
+ browser: { src: true },
7
5
  node: {},
8
6
  neutral: {},
9
7
  },