@xyo-network/react-node 2.35.6 → 2.35.8

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.
@@ -1,4 +1,4 @@
1
1
  /// <reference types="react" />
2
- import { XyoNodeContextState } from './State';
3
- export declare const XyoNodeContext: import("react").Context<XyoNodeContextState & import("@xyo-network/react-shared").ContextExState>;
2
+ import { NodeContextState } from './State';
3
+ export declare const NodeContext: import("react").Context<NodeContextState & import("@xyo-network/react-shared").ContextExState>;
4
4
  //# sourceMappingURL=Context.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Context.d.ts","sourceRoot":"","sources":["../../../src/contexts/Context.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAE7C,eAAO,MAAM,cAAc,mGAAyC,CAAA"}
1
+ {"version":3,"file":"Context.d.ts","sourceRoot":"","sources":["../../../src/contexts/Context.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAE1C,eAAO,MAAM,WAAW,gGAAsC,CAAA"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.XyoNodeContext = void 0;
3
+ exports.NodeContext = void 0;
4
4
  const react_shared_1 = require("@xyo-network/react-shared");
5
- exports.XyoNodeContext = (0, react_shared_1.createContextEx)();
5
+ exports.NodeContext = (0, react_shared_1.createContextEx)();
6
6
  //# sourceMappingURL=Context.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Context.js","sourceRoot":"","sources":["../../../src/contexts/Context.ts"],"names":[],"mappings":";;;AAAA,4DAA2D;AAI9C,QAAA,cAAc,GAAG,IAAA,8BAAe,GAAuB,CAAA"}
1
+ {"version":3,"file":"Context.js","sourceRoot":"","sources":["../../../src/contexts/Context.ts"],"names":[],"mappings":";;;AAAA,4DAA2D;AAI9C,QAAA,WAAW,GAAG,IAAA,8BAAe,GAAoB,CAAA"}
@@ -1,9 +1,13 @@
1
1
  /// <reference types="react" />
2
2
  import { WithChildren } from '@xylabs/react-shared';
3
3
  import { XyoNode } from '@xyo-network/node';
4
- export interface XyoNodeProviderProps {
4
+ export interface NodeProviderProps {
5
5
  required?: boolean;
6
6
  node?: XyoNode;
7
7
  }
8
- export declare const XyoNodeProvider: React.FC<WithChildren<XyoNodeProviderProps>>;
8
+ /** @deprecated use NodeProviderProps instead */
9
+ export declare type XyoNodeProviderProps = NodeProviderProps;
10
+ export declare const NodeProvider: React.FC<WithChildren<NodeProviderProps>>;
11
+ /** @deprecated use NodeProvider instead */
12
+ export declare const XyoNodeProvider: import("react").FC<WithChildren<NodeProviderProps>>;
9
13
  //# sourceMappingURL=Provider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Provider.d.ts","sourceRoot":"","sources":["../../../src/contexts/Provider.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAK3C,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,CAAC,EAAE,OAAO,CAAA;CACf;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,oBAAoB,CAAC,CAQxE,CAAA"}
1
+ {"version":3,"file":"Provider.d.ts","sourceRoot":"","sources":["../../../src/contexts/Provider.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAK3C,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,CAAC,EAAE,OAAO,CAAA;CACf;AAED,gDAAgD;AAChD,oBAAY,oBAAoB,GAAG,iBAAiB,CAAA;AAEpD,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,iBAAiB,CAAC,CAQlE,CAAA;AAED,2CAA2C;AAC3C,eAAO,MAAM,eAAe,qDAAe,CAAA"}
@@ -1,15 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.XyoNodeProvider = void 0;
3
+ exports.XyoNodeProvider = exports.NodeProvider = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
6
  const Context_1 = require("./Context");
7
- const XyoNodeProvider = ({ node: nodeProp, required = false, children }) => {
7
+ const NodeProvider = ({ node: nodeProp, required = false, children }) => {
8
8
  const [node, setNode] = (0, react_1.useState)();
9
9
  (0, react_1.useEffect)(() => {
10
10
  setNode(nodeProp);
11
11
  }, [nodeProp]);
12
- return !required || node ? (0, jsx_runtime_1.jsx)(Context_1.XyoNodeContext.Provider, Object.assign({ value: { node, provided: true, setNode } }, { children: children })) : null;
12
+ return !required || node ? (0, jsx_runtime_1.jsx)(Context_1.NodeContext.Provider, Object.assign({ value: { node, provided: true, setNode } }, { children: children })) : null;
13
13
  };
14
- exports.XyoNodeProvider = XyoNodeProvider;
14
+ exports.NodeProvider = NodeProvider;
15
+ /** @deprecated use NodeProvider instead */
16
+ exports.XyoNodeProvider = exports.NodeProvider;
15
17
  //# sourceMappingURL=Provider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Provider.js","sourceRoot":"","sources":["../../../src/contexts/Provider.tsx"],"names":[],"mappings":";;;;AAEA,iCAA2C;AAE3C,uCAA0C;AAOnC,MAAM,eAAe,GAAiD,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,GAAG,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC9H,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,IAAA,gBAAQ,GAAW,CAAA;IAE3C,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,OAAO,CAAC,QAAQ,CAAC,CAAA;IACnB,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAA;IAEd,OAAO,CAAC,QAAQ,IAAI,IAAI,CAAC,CAAC,CAAC,uBAAC,wBAAc,CAAC,QAAQ,kBAAC,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,gBAAG,QAAQ,IAA2B,CAAC,CAAC,CAAC,IAAI,CAAA;AAC3I,CAAC,CAAA;AARY,QAAA,eAAe,mBAQ3B"}
1
+ {"version":3,"file":"Provider.js","sourceRoot":"","sources":["../../../src/contexts/Provider.tsx"],"names":[],"mappings":";;;;AAEA,iCAA2C;AAE3C,uCAAuC;AAUhC,MAAM,YAAY,GAA8C,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,GAAG,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE;IACxH,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,IAAA,gBAAQ,GAAW,CAAA;IAE3C,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,OAAO,CAAC,QAAQ,CAAC,CAAA;IACnB,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAA;IAEd,OAAO,CAAC,QAAQ,IAAI,IAAI,CAAC,CAAC,CAAC,uBAAC,qBAAW,CAAC,QAAQ,kBAAC,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,gBAAG,QAAQ,IAAwB,CAAC,CAAC,CAAC,IAAI,CAAA;AACrI,CAAC,CAAA;AARY,QAAA,YAAY,gBAQxB;AAED,2CAA2C;AAC9B,QAAA,eAAe,GAAG,oBAAY,CAAA"}
@@ -1,6 +1,6 @@
1
1
  import { XyoNode } from '@xyo-network/node';
2
2
  import { Dispatch } from 'react';
3
- export interface XyoNodeContextState {
3
+ export interface NodeContextState {
4
4
  node?: XyoNode;
5
5
  setNode?: Dispatch<XyoNode>;
6
6
  }
@@ -1 +1 @@
1
- {"version":3,"file":"State.d.ts","sourceRoot":"","sources":["../../../src/contexts/State.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAEhC,MAAM,WAAW,mBAAmB;IAClC,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,OAAO,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAA;CAC5B"}
1
+ {"version":3,"file":"State.d.ts","sourceRoot":"","sources":["../../../src/contexts/State.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAEhC,MAAM,WAAW,gBAAgB;IAC/B,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,OAAO,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAA;CAC5B"}
@@ -4,7 +4,7 @@ exports.useNode = void 0;
4
4
  const react_shared_1 = require("@xyo-network/react-shared");
5
5
  const Context_1 = require("./Context");
6
6
  const useNode = () => {
7
- const { node, setNode } = (0, react_shared_1.useContextEx)(Context_1.XyoNodeContext, 'XyoNode');
7
+ const { node, setNode } = (0, react_shared_1.useContextEx)(Context_1.NodeContext, 'XyoNode');
8
8
  return [node, setNode];
9
9
  };
10
10
  exports.useNode = useNode;
@@ -1 +1 @@
1
- {"version":3,"file":"useNode.js","sourceRoot":"","sources":["../../../src/contexts/useNode.ts"],"names":[],"mappings":";;;AACA,4DAAwD;AAGxD,uCAA0C;AAEnC,MAAM,OAAO,GAAG,GAAyD,EAAE;IAChF,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,IAAA,2BAAY,EAAC,wBAAc,EAAE,SAAS,CAAC,CAAA;IAEjE,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;AACxB,CAAC,CAAA;AAJY,QAAA,OAAO,WAInB"}
1
+ {"version":3,"file":"useNode.js","sourceRoot":"","sources":["../../../src/contexts/useNode.ts"],"names":[],"mappings":";;;AACA,4DAAwD;AAGxD,uCAAuC;AAEhC,MAAM,OAAO,GAAG,GAAyD,EAAE;IAChF,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,IAAA,2BAAY,EAAC,qBAAW,EAAE,SAAS,CAAC,CAAA;IAE9D,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;AACxB,CAAC,CAAA;AAJY,QAAA,OAAO,WAInB"}