@_unit/unit 1.0.1 → 1.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.
Files changed (75) hide show
  1. package/lib/$wrap.js +2 -1
  2. package/lib/$wrap.js.map +1 -1
  3. package/lib/boot/index.js +4 -2
  4. package/lib/boot/index.js.map +1 -1
  5. package/lib/client/platform/web/api/alert.d.ts +3 -0
  6. package/lib/client/platform/web/api/alert.js +12 -0
  7. package/lib/client/platform/web/api/alert.js.map +1 -0
  8. package/lib/client/platform/web/boot.js +3 -0
  9. package/lib/client/platform/web/boot.js.map +1 -1
  10. package/lib/interface.d.ts +32 -0
  11. package/lib/interface.js +32 -1
  12. package/lib/interface.js.map +1 -1
  13. package/lib/proxyWrap.js +25 -1
  14. package/lib/proxyWrap.js.map +1 -1
  15. package/lib/script/util.js +0 -1
  16. package/lib/script/util.js.map +1 -1
  17. package/lib/server/index.d.ts +1 -1
  18. package/lib/server/index.js +1 -1
  19. package/lib/system/_classes.d.ts +0 -2
  20. package/lib/system/_classes.js +0 -2
  21. package/lib/system/_classes.js.map +1 -1
  22. package/lib/system/_ids.d.ts +0 -1
  23. package/lib/system/_ids.js +7 -8
  24. package/lib/system/_ids.js.map +1 -1
  25. package/lib/system/_specs.js +1 -1
  26. package/lib/system/_specs.js.map +1 -1
  27. package/lib/types/AllKeys.d.ts +6 -0
  28. package/lib/types/AllKeys.js +3 -0
  29. package/lib/types/AllKeys.js.map +1 -0
  30. package/lib/types/interface/S.d.ts +2 -1
  31. package/lib/types/interface/async/$S.d.ts +2 -1
  32. package/lib/types/interface/async/$S.js.map +1 -1
  33. package/lib/types/interface/async/AsyncS.js +2 -2
  34. package/lib/types/interface/async/AsyncS.js.map +1 -1
  35. package/package.json +2 -4
  36. package/src/server/index.ts +1 -1
  37. package/lib/api/peer/config.d.ts +0 -2
  38. package/lib/api/peer/config.js +0 -13
  39. package/lib/api/peer/config.js.map +0 -1
  40. package/lib/debug/graph/watchInjectGraph.d.ts +0 -9
  41. package/lib/debug/graph/watchInjectGraph.js +0 -23
  42. package/lib/debug/graph/watchInjectGraph.js.map +0 -1
  43. package/lib/debug/watchUnitLeafEvent.d.ts +0 -11
  44. package/lib/debug/watchUnitLeafEvent.js +0 -21
  45. package/lib/debug/watchUnitLeafEvent.js.map +0 -1
  46. package/lib/debug/watchUnitLeafExposedPinSetEvent.d.ts +0 -13
  47. package/lib/debug/watchUnitLeafExposedPinSetEvent.js +0 -23
  48. package/lib/debug/watchUnitLeafExposedPinSetEvent.js.map +0 -1
  49. package/lib/debug/watchUnitLeafForkEvent.d.ts +0 -11
  50. package/lib/debug/watchUnitLeafForkEvent.js +0 -21
  51. package/lib/debug/watchUnitLeafForkEvent.js.map +0 -1
  52. package/lib/debug/watchUnitLeafInjectEvent.d.ts +0 -12
  53. package/lib/debug/watchUnitLeafInjectEvent.js +0 -21
  54. package/lib/debug/watchUnitLeafInjectEvent.js.map +0 -1
  55. package/lib/debug/watchUnitLeafMoveSubgraphIntoEvent.d.ts +0 -69
  56. package/lib/debug/watchUnitLeafMoveSubgraphIntoEvent.js +0 -28
  57. package/lib/debug/watchUnitLeafMoveSubgraphIntoEvent.js.map +0 -1
  58. package/lib/system/platform/Boot/index.d.ts +0 -18
  59. package/lib/system/platform/Boot/index.js +0 -50
  60. package/lib/system/platform/Boot/index.js.map +0 -1
  61. package/lib/system/platform/System/index.d.ts +0 -16
  62. package/lib/system/platform/System/index.js +0 -27
  63. package/lib/system/platform/System/index.js.map +0 -1
  64. package/lib/system/platform/api/canvas/AddPath/index.d.ts +0 -14
  65. package/lib/system/platform/api/canvas/AddPath/index.js +0 -19
  66. package/lib/system/platform/api/canvas/AddPath/index.js.map +0 -1
  67. package/lib/system/platform/api/peer/PeerSharePod/index.d.ts +0 -27
  68. package/lib/system/platform/api/peer/PeerSharePod/index.js +0 -120
  69. package/lib/system/platform/api/peer/PeerSharePod/index.js.map +0 -1
  70. package/lib/system/platform/component/app/History/Component.d.ts +0 -34
  71. package/lib/system/platform/component/app/History/Component.js +0 -163
  72. package/lib/system/platform/component/app/History/Component.js.map +0 -1
  73. package/lib/types/interface/async/$P.d.ts +0 -24
  74. package/lib/types/interface/async/$P.js +0 -12
  75. package/lib/types/interface/async/$P.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"_specs.js","sourceRoot":"src/","sources":["system/_specs.ts"],"names":[],"mappings":";;AAAA,kBAAe,IAAI,CAAC,KAAK,CAAC,qqrmBAAqqrmB,CAAC,CAAA"}
1
+ {"version":3,"file":"_specs.js","sourceRoot":"src/","sources":["system/_specs.ts"],"names":[],"mappings":";;AAAA,kBAAe,IAAI,CAAC,KAAK,CAAC,wvqmBAAwvqmB,CAAC,CAAA"}
@@ -0,0 +1,6 @@
1
+ export declare type AllKeys<T, V> = {
2
+ [key in keyof Required<T>]: V;
3
+ };
4
+ export declare type $AllKeys<T, V> = {
5
+ [key in `$${keyof Required<T>}`]: V;
6
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=AllKeys.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AllKeys.js","sourceRoot":"src/","sources":["types/AllKeys.ts"],"names":[],"mappings":""}
@@ -1,7 +1,8 @@
1
1
  import { Graph } from '../../Class/Graph';
2
2
  import { BundleSpec } from '../BundleSpec';
3
3
  import { GraphBundle } from '../GraphClass';
4
+ import { Unlisten } from '../Unlisten';
4
5
  export interface S {
5
6
  fromBundle(bundleSpec: BundleSpec): GraphBundle;
6
- newGraph(bundle: GraphBundle): Graph;
7
+ newGraph(bundle: GraphBundle): [Graph, Unlisten];
7
8
  }
@@ -1,4 +1,5 @@
1
1
  import { BundleSpec } from '../../BundleSpec';
2
+ import { Unlisten } from '../../Unlisten';
2
3
  import { $Graph } from './$Graph';
3
4
  export declare const S_METHOD_CALL: any[];
4
5
  export declare const S_METHOD_WATCH: any[];
@@ -11,7 +12,7 @@ export interface $S_R {
11
12
  $newGraph({ bundle }: {
12
13
  bundle: BundleSpec;
13
14
  _: string[];
14
- }): $Graph;
15
+ }): [$Graph, Unlisten];
15
16
  }
16
17
  export interface $S extends $S_C, $S_W, $S_R {
17
18
  }
@@ -1 +1 @@
1
- {"version":3,"file":"$S.js","sourceRoot":"src/","sources":["types/interface/async/$S.ts"],"names":[],"mappings":";;;AAGa,QAAA,aAAa,GAAG,EAAE,CAAA;AAClB,QAAA,cAAc,GAAG,EAAE,CAAA;AACnB,QAAA,YAAY,GAAG,CAAC,UAAU,CAAC,CAAA"}
1
+ {"version":3,"file":"$S.js","sourceRoot":"src/","sources":["types/interface/async/$S.ts"],"names":[],"mappings":";;;AAIa,QAAA,aAAa,GAAG,EAAE,CAAA;AAClB,QAAA,cAAc,GAAG,EAAE,CAAA;AACnB,QAAA,YAAY,GAAG,CAAC,UAAU,CAAC,CAAA"}
@@ -15,10 +15,10 @@ const AsyncSRef = (system) => {
15
15
  return {
16
16
  $newGraph({ bundle, _ }) {
17
17
  const _bundle = system.fromBundle(bundle);
18
- const graph = system.newGraph(_bundle);
18
+ const [graph, unlisten] = system.newGraph(_bundle);
19
19
  graph.play();
20
20
  const $graph = (0, AsyncGraph_1.AsyncGraph)(graph);
21
- return (0, proxyWrap_1.proxyWrap)($graph, _);
21
+ return [(0, proxyWrap_1.proxyWrap)($graph, _), unlisten];
22
22
  },
23
23
  };
24
24
  };
@@ -1 +1 @@
1
- {"version":3,"file":"AsyncS.js","sourceRoot":"src/","sources":["types/interface/async/AsyncS.ts"],"names":[],"mappings":";;;AAAA,kDAA8C;AAG9C,6CAAyC;AAElC,MAAM,UAAU,GAAG,CAAC,MAAS,EAAQ,EAAE;IAC5C,OAAO,EAAE,CAAA;AACX,CAAC,CAAA;AAFY,QAAA,UAAU,cAEtB;AAEM,MAAM,WAAW,GAAG,CAAC,MAAS,EAAQ,EAAE;IAC7C,OAAO,EAAE,CAAA;AACX,CAAC,CAAA;AAFY,QAAA,WAAW,eAEvB;AAEM,MAAM,SAAS,GAAG,CAAC,MAAS,EAAQ,EAAE;IAC3C,OAAO;QACL,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;YACrB,MAAM,OAAO,GAAG,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAA;YAEzC,MAAM,KAAK,GAAG,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;YAEtC,KAAK,CAAC,IAAI,EAAE,CAAA;YAEZ,MAAM,MAAM,GAAG,IAAA,uBAAU,EAAC,KAAK,CAAC,CAAA;YAEhC,OAAO,IAAA,qBAAS,EAAC,MAAM,EAAE,CAAC,CAAC,CAAA;QAC7B,CAAC;KACF,CAAA;AACH,CAAC,CAAA;AAdY,QAAA,SAAS,aAcrB;AAEM,MAAM,MAAM,GAAG,CAAC,MAAS,EAAM,EAAE;IACtC,qDACK,IAAA,kBAAU,EAAC,MAAM,CAAC,GAClB,IAAA,mBAAW,EAAC,MAAM,CAAC,GACnB,IAAA,iBAAS,EAAC,MAAM,CAAC,EACrB;AACH,CAAC,CAAA;AANY,QAAA,MAAM,UAMlB"}
1
+ {"version":3,"file":"AsyncS.js","sourceRoot":"src/","sources":["types/interface/async/AsyncS.ts"],"names":[],"mappings":";;;AAAA,kDAA8C;AAG9C,6CAAyC;AAElC,MAAM,UAAU,GAAG,CAAC,MAAS,EAAQ,EAAE;IAC5C,OAAO,EAAE,CAAA;AACX,CAAC,CAAA;AAFY,QAAA,UAAU,cAEtB;AAEM,MAAM,WAAW,GAAG,CAAC,MAAS,EAAQ,EAAE;IAC7C,OAAO,EAAE,CAAA;AACX,CAAC,CAAA;AAFY,QAAA,WAAW,eAEvB;AAEM,MAAM,SAAS,GAAG,CAAC,MAAS,EAAQ,EAAE;IAC3C,OAAO;QACL,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;YACrB,MAAM,OAAO,GAAG,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAA;YAEzC,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;YAElD,KAAK,CAAC,IAAI,EAAE,CAAA;YAEZ,MAAM,MAAM,GAAG,IAAA,uBAAU,EAAC,KAAK,CAAC,CAAA;YAEhC,OAAO,CAAC,IAAA,qBAAS,EAAC,MAAM,EAAE,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAA;QACzC,CAAC;KACF,CAAA;AACH,CAAC,CAAA;AAdY,QAAA,SAAS,aAcrB;AAEM,MAAM,MAAM,GAAG,CAAC,MAAS,EAAM,EAAE;IACtC,qDACK,IAAA,kBAAU,EAAC,MAAM,CAAC,GAClB,IAAA,mBAAW,EAAC,MAAM,CAAC,GACnB,IAAA,iBAAS,EAAC,MAAM,CAAC,EACrB;AACH,CAAC,CAAA;AANY,QAAA,MAAM,UAMlB"}
package/package.json CHANGED
@@ -1,10 +1,8 @@
1
1
  {
2
2
  "name": "@_unit/unit",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "main": "lib/client/platform/web/index.js",
5
- "bin": {
6
- "unit": "./lib/server/index.js"
7
- },
5
+ "bin": "./lib/server/index.js",
8
6
  "repository": "git@github.com:samuelmtimbo/unit.git",
9
7
  "author": "Samuel Timbó <samuelmtimbo@gmail.com>",
10
8
  "license": "MIT",
@@ -1,4 +1,4 @@
1
- #!/usr/bin/node
1
+ #!/usr/bin/env node
2
2
  import * as cors from 'cors'
3
3
  import * as express from 'express'
4
4
  import * as http from 'http'
@@ -1,2 +0,0 @@
1
- export declare const DEFAULT_STUN_SERVER: string[];
2
- export declare const DEFAULT_STUN_RTC_CONFIG: RTCConfiguration;
@@ -1,13 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DEFAULT_STUN_RTC_CONFIG = exports.DEFAULT_STUN_SERVER = void 0;
4
- const IOUN_STUN_SERVER = ['stun:ice.ioun.net'];
5
- exports.DEFAULT_STUN_SERVER = [...IOUN_STUN_SERVER];
6
- exports.DEFAULT_STUN_RTC_CONFIG = {
7
- iceServers: [
8
- {
9
- urls: exports.DEFAULT_STUN_SERVER,
10
- },
11
- ],
12
- };
13
- //# sourceMappingURL=config.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"config.js","sourceRoot":"src/","sources":["api/peer/config.ts"],"names":[],"mappings":";;;AAAA,MAAM,gBAAgB,GAAa,CAAC,mBAAmB,CAAC,CAAA;AAE3C,QAAA,mBAAmB,GAAa,CAAC,GAAG,gBAAgB,CAAC,CAAA;AAErD,QAAA,uBAAuB,GAAqB;IACvD,UAAU,EAAE;QACV;YACE,IAAI,EAAE,2BAAmB;SAC1B;KACF;CACF,CAAA"}
@@ -1,9 +0,0 @@
1
- import { Graph } from '../../Class/Graph';
2
- import { BundleSpec } from '../../types/BundleSpec';
3
- import { Moment } from '../Moment';
4
- export interface GraphInjectGraphMomentData {
5
- bundle: BundleSpec;
6
- }
7
- export interface GraphInjectGraphMoment extends Moment<GraphInjectGraphMomentData> {
8
- }
9
- export declare function watchGraphInjectGraphEvent(event: 'inject_graph', bundle: Graph, callback: (moment: GraphInjectGraphMoment) => void): () => void;
@@ -1,23 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.watchGraphInjectGraphEvent = void 0;
4
- const stringifySpec_1 = require("../../spec/stringifySpec");
5
- function watchGraphInjectGraphEvent(event, bundle, callback) {
6
- const listener = (...[bundle]) => {
7
- const { spec } = bundle;
8
- (0, stringifySpec_1._stringifyGraphSpecData)(spec);
9
- callback({
10
- type: 'graph',
11
- event,
12
- data: {
13
- bundle,
14
- },
15
- });
16
- };
17
- bundle.prependListener(event, listener);
18
- return () => {
19
- bundle.removeListener(event, listener);
20
- };
21
- }
22
- exports.watchGraphInjectGraphEvent = watchGraphInjectGraphEvent;
23
- //# sourceMappingURL=watchInjectGraph.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"watchInjectGraph.js","sourceRoot":"src/","sources":["debug/graph/watchInjectGraph.ts"],"names":[],"mappings":";;;AACA,4DAAkE;AAYlE,SAAgB,0BAA0B,CACxC,KAAqB,EACrB,MAAa,EACb,QAAkD;IAElD,MAAM,QAAQ,GAAG,CAAC,GAAG,CAAC,MAAM,CAAuB,EAAE,EAAE;QACrD,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,CAAA;QAEvB,IAAA,uCAAuB,EAAC,IAAI,CAAC,CAAA;QAE7B,QAAQ,CAAC;YACP,IAAI,EAAE,OAAO;YACb,KAAK;YACL,IAAI,EAAE;gBACJ,MAAM;aACP;SACF,CAAC,CAAA;IACJ,CAAC,CAAA;IAED,MAAM,CAAC,eAAe,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;IAEvC,OAAO,GAAG,EAAE;QACV,MAAM,CAAC,cAAc,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;IACxC,CAAC,CAAA;AACH,CAAC;AAxBD,gEAwBC"}
@@ -1,11 +0,0 @@
1
- import { Graph } from '../Class/Graph';
2
- import { Moment } from './Moment';
3
- export interface UnitGraphSpecMomentData {
4
- path: string[];
5
- specId: string;
6
- }
7
- export interface UnitGraphSpecMoment extends Moment<UnitGraphSpecMomentData> {
8
- type: 'unit';
9
- event: 'leaf_add_unit' | 'leaf_remove_unit';
10
- }
11
- export declare function watchUnitLeafEvent(event: 'leaf_add_unit' | 'leaf_remove_unit', unit: Graph, callback: (moment: any) => void): () => void;
@@ -1,21 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.watchUnitLeafEvent = void 0;
4
- function watchUnitLeafEvent(event, unit, callback) {
5
- const listener = (_unit, path) => {
6
- callback({
7
- type: 'unit',
8
- event,
9
- data: {
10
- path,
11
- specId: _unit.constructor.__bundle.unit.id,
12
- },
13
- });
14
- };
15
- unit.prependListener(event, listener);
16
- return () => {
17
- unit.removeListener(event, listener);
18
- };
19
- }
20
- exports.watchUnitLeafEvent = watchUnitLeafEvent;
21
- //# sourceMappingURL=watchUnitLeafEvent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"watchUnitLeafEvent.js","sourceRoot":"src/","sources":["debug/watchUnitLeafEvent.ts"],"names":[],"mappings":";;;AAaA,SAAgB,kBAAkB,CAChC,KAA2C,EAC3C,IAAW,EACX,QAA0B;IAE1B,MAAM,QAAQ,GAAG,CAAC,KAAU,EAAE,IAAc,EAAE,EAAE;QAC9C,QAAQ,CAAC;YACP,IAAI,EAAE,MAAM;YACZ,KAAK;YACL,IAAI,EAAE;gBACJ,IAAI;gBACJ,MAAM,EAAE,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;aAC3C;SACF,CAAC,CAAA;IACJ,CAAC,CAAA;IACD,IAAI,CAAC,eAAe,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;IACrC,OAAO,GAAG,EAAE;QACV,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;IACtC,CAAC,CAAA;AACH,CAAC;AAnBD,gDAmBC"}
@@ -1,13 +0,0 @@
1
- import { Graph } from '../Class/Graph';
2
- import { GraphPinSpec } from '../types';
3
- import { IO } from '../types/IO';
4
- import { Moment } from './Moment';
5
- export interface UnitLeafExposedPinSetEventData {
6
- path: string[];
7
- type: IO;
8
- pinId: string;
9
- pinSpec: GraphPinSpec;
10
- }
11
- export interface UnitLeafExposedPinSetEvent extends Moment<UnitLeafExposedPinSetEventData> {
12
- }
13
- export declare function watchUnitLeafExposedPinSetEvent(event: 'leaf_expose_pin_set' | 'leaf_cover_pin_set', graph: Graph, callback: (moment: UnitLeafExposedPinSetEvent) => void): () => void;
@@ -1,23 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.watchUnitLeafExposedPinSetEvent = void 0;
4
- function watchUnitLeafExposedPinSetEvent(event, graph, callback) {
5
- const listener = (path, type, pinId, pinSpec) => {
6
- callback({
7
- type: 'unit',
8
- event,
9
- data: {
10
- path,
11
- type,
12
- pinId,
13
- pinSpec,
14
- },
15
- });
16
- };
17
- graph.prependListener(event, listener);
18
- return () => {
19
- graph.removeListener(event, listener);
20
- };
21
- }
22
- exports.watchUnitLeafExposedPinSetEvent = watchUnitLeafExposedPinSetEvent;
23
- //# sourceMappingURL=watchUnitLeafExposedPinSetEvent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"watchUnitLeafExposedPinSetEvent.js","sourceRoot":"src/","sources":["debug/watchUnitLeafExposedPinSetEvent.ts"],"names":[],"mappings":";;;AAeA,SAAgB,+BAA+B,CAC7C,KAAmD,EACnD,KAAY,EACZ,QAAsD;IAEtD,MAAM,QAAQ,GAAG,CACf,IAAc,EACd,IAAQ,EACR,KAAa,EACb,OAAqB,EACrB,EAAE;QACF,QAAQ,CAAC;YACP,IAAI,EAAE,MAAM;YACZ,KAAK;YACL,IAAI,EAAE;gBACJ,IAAI;gBACJ,IAAI;gBACJ,KAAK;gBACL,OAAO;aACR;SACF,CAAC,CAAA;IACJ,CAAC,CAAA;IACD,KAAK,CAAC,eAAe,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;IACtC,OAAO,GAAG,EAAE;QACV,KAAK,CAAC,cAAc,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;IACvC,CAAC,CAAA;AACH,CAAC;AA1BD,0EA0BC"}
@@ -1,11 +0,0 @@
1
- import { Graph } from '../Class/Graph';
2
- import { Moment } from './Moment';
3
- export interface LeafForkMomentData {
4
- specId: string;
5
- path: string[];
6
- }
7
- export interface LeafForkMoment extends Moment<LeafForkMomentData> {
8
- type: 'unit';
9
- event: 'leaf_fork';
10
- }
11
- export declare function watchUnitLeafForkEvent(event: 'leaf_fork', unit: Graph, callback: (moment: any) => void): () => void;
@@ -1,21 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.watchUnitLeafForkEvent = void 0;
4
- function watchUnitLeafForkEvent(event, unit, callback) {
5
- const listener = (specId, path) => {
6
- callback({
7
- type: 'unit',
8
- event,
9
- data: {
10
- specId,
11
- path,
12
- },
13
- });
14
- };
15
- unit.prependListener(event, listener);
16
- return () => {
17
- unit.removeListener(event, listener);
18
- };
19
- }
20
- exports.watchUnitLeafForkEvent = watchUnitLeafForkEvent;
21
- //# sourceMappingURL=watchUnitLeafForkEvent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"watchUnitLeafForkEvent.js","sourceRoot":"src/","sources":["debug/watchUnitLeafForkEvent.ts"],"names":[],"mappings":";;;AAaA,SAAgB,sBAAsB,CACpC,KAAkB,EAClB,IAAW,EACX,QAA0B;IAE1B,MAAM,QAAQ,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,EAAE;QAChC,QAAQ,CAAC;YACP,IAAI,EAAE,MAAM;YACZ,KAAK;YACL,IAAI,EAAE;gBACJ,MAAM;gBACN,IAAI;aACL;SACF,CAAC,CAAA;IACJ,CAAC,CAAA;IAED,IAAI,CAAC,eAAe,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;IAErC,OAAO,GAAG,EAAE;QACV,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;IACtC,CAAC,CAAA;AACH,CAAC;AArBD,wDAqBC"}
@@ -1,12 +0,0 @@
1
- import { Graph } from '../Class/Graph';
2
- import { BundleSpec } from '../types/BundleSpec';
3
- import { Moment } from './Moment';
4
- export interface LeafInjectGraphMomentData {
5
- path: string[];
6
- bundle: BundleSpec;
7
- }
8
- export interface LeafInjectGraphMoment extends Moment<LeafInjectGraphMomentData> {
9
- type: 'unit';
10
- event: 'leaf_inject_graph';
11
- }
12
- export declare function watchUnitLeafInjectEvent(event: 'leaf_inject_graph', unit: Graph, callback: (moment: any) => void): () => void;
@@ -1,21 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.watchUnitLeafInjectEvent = void 0;
4
- function watchUnitLeafInjectEvent(event, unit, callback) {
5
- const listener = (bundle, path) => {
6
- callback({
7
- type: 'unit',
8
- event,
9
- data: {
10
- path,
11
- bundle,
12
- },
13
- });
14
- };
15
- unit.prependListener(event, listener);
16
- return () => {
17
- unit.removeListener(event, listener);
18
- };
19
- }
20
- exports.watchUnitLeafInjectEvent = watchUnitLeafInjectEvent;
21
- //# sourceMappingURL=watchUnitLeafInjectEvent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"watchUnitLeafInjectEvent.js","sourceRoot":"src/","sources":["debug/watchUnitLeafInjectEvent.ts"],"names":[],"mappings":";;;AAeA,SAAgB,wBAAwB,CACtC,KAA0B,EAC1B,IAAW,EACX,QAA0B;IAE1B,MAAM,QAAQ,GAAG,CAAC,MAAkB,EAAE,IAAc,EAAE,EAAE;QACtD,QAAQ,CAAC;YACP,IAAI,EAAE,MAAM;YACZ,KAAK;YACL,IAAI,EAAE;gBACJ,IAAI;gBACJ,MAAM;aACP;SACF,CAAC,CAAA;IACJ,CAAC,CAAA;IAED,IAAI,CAAC,eAAe,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;IAErC,OAAO,GAAG,EAAE;QACV,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;IACtC,CAAC,CAAA;AACH,CAAC;AArBD,4DAqBC"}
@@ -1,69 +0,0 @@
1
- import { Graph } from '../Class/Graph';
2
- import { GraphSubPinSpec } from '../types';
3
- import { Dict } from '../types/Dict';
4
- import { IO } from '../types/IO';
5
- import { IOOf, _IOOf } from '../types/IOOf';
6
- import { Moment } from './Moment';
7
- export interface LeafMoveSubgraphIntoMomentData {
8
- path: string[];
9
- graphId: string;
10
- nodeIds: {
11
- merge: string[];
12
- link: {
13
- unitId: string;
14
- type: IO;
15
- pinId: string;
16
- }[];
17
- unit: string[];
18
- plug: {
19
- type: IO;
20
- pinId: string;
21
- subPinId: string;
22
- }[];
23
- };
24
- nextIdMap: {
25
- merge: Dict<string>;
26
- link: Dict<IOOf<Dict<{
27
- mergeId: string;
28
- oppositePinId: string;
29
- }>>>;
30
- plug: _IOOf<Dict<Dict<{
31
- mergeId: string;
32
- type: IO;
33
- }>>>;
34
- unit: Dict<string>;
35
- };
36
- nextPinIdMap: Dict<{
37
- input: Dict<{
38
- pinId: string;
39
- subPinId: string;
40
- }>;
41
- output: Dict<{
42
- pinId: string;
43
- subPinId: string;
44
- }>;
45
- }>;
46
- nextMergePinId: Dict<{
47
- input: {
48
- mergeId: string;
49
- pinId: string;
50
- subPinSpec: GraphSubPinSpec;
51
- };
52
- output: {
53
- mergeId: string;
54
- pinId: string;
55
- subPinSpec: GraphSubPinSpec;
56
- };
57
- }>;
58
- nextPlugSpec: {
59
- input: Dict<Dict<GraphSubPinSpec>>;
60
- output: Dict<Dict<GraphSubPinSpec>>;
61
- };
62
- nextSubComponentParentMap: Dict<string | null>;
63
- nextSubComponentChildrenMap: Dict<string[]>;
64
- }
65
- export interface LeafMoveSubgraphIntoMoment extends Moment<LeafMoveSubgraphIntoMomentData> {
66
- type: 'unit';
67
- event: 'leaf_move_subgraph_into';
68
- }
69
- export declare function watchUnitLeafMoveSubgraphIntoEvent(event: 'leaf_move_subgraph_into', unit: Graph, callback: (moment: any) => void): () => void;
@@ -1,28 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.watchUnitLeafMoveSubgraphIntoEvent = void 0;
4
- function watchUnitLeafMoveSubgraphIntoEvent(event, unit, callback) {
5
- const listener = (graphId, nodeIds, nextIdMap, nextPinIdMap, nextMergePinId, nextPlugSpec, nextSubComponentParentMap, nextSubComponentChildrenMap, path) => {
6
- callback({
7
- type: 'unit',
8
- event,
9
- data: {
10
- path,
11
- graphId,
12
- nodeIds,
13
- nextIdMap,
14
- nextPinIdMap,
15
- nextMergePinId,
16
- nextPlugSpec,
17
- nextSubComponentParentMap,
18
- nextSubComponentChildrenMap,
19
- },
20
- });
21
- };
22
- unit.prependListener(event, listener);
23
- return () => {
24
- unit.removeListener(event, listener);
25
- };
26
- }
27
- exports.watchUnitLeafMoveSubgraphIntoEvent = watchUnitLeafMoveSubgraphIntoEvent;
28
- //# sourceMappingURL=watchUnitLeafMoveSubgraphIntoEvent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"watchUnitLeafMoveSubgraphIntoEvent.js","sourceRoot":"src/","sources":["debug/watchUnitLeafMoveSubgraphIntoEvent.ts"],"names":[],"mappings":";;;AAoDA,SAAgB,kCAAkC,CAChD,KAAgC,EAChC,IAAW,EACX,QAA0B;IAE1B,MAAM,QAAQ,GAAG,CACf,OAAO,EACP,OAAO,EACP,SAAS,EACT,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,yBAAyB,EACzB,2BAA2B,EAC3B,IAAI,EACJ,EAAE;QACF,QAAQ,CAAC;YACP,IAAI,EAAE,MAAM;YACZ,KAAK;YACL,IAAI,EAAE;gBACJ,IAAI;gBACJ,OAAO;gBACP,OAAO;gBACP,SAAS;gBACT,YAAY;gBACZ,cAAc;gBACd,YAAY;gBACZ,yBAAyB;gBACzB,2BAA2B;aAC5B;SACF,CAAC,CAAA;IACJ,CAAC,CAAA;IAED,IAAI,CAAC,eAAe,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;IAErC,OAAO,GAAG,EAAE;QACV,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;IACtC,CAAC,CAAA;AACH,CAAC;AAtCD,gFAsCC"}
@@ -1,18 +0,0 @@
1
- import { Done } from '../../../Class/Functional/Done';
2
- import { Semifunctional } from '../../../Class/Semifunctional';
3
- import { System } from '../../../system';
4
- import { S } from '../../../types/interface/S';
5
- import { U } from '../../../types/interface/U';
6
- export interface I<T> {
7
- opt: U;
8
- done: T;
9
- parent: S;
10
- }
11
- export interface O<T> {
12
- system: S;
13
- }
14
- export default class Boot<T> extends Semifunctional<I<T>, O<T>> {
15
- constructor(system: System);
16
- f({ parent, opt }: I<T>, done: Done<O<T>>): Promise<void>;
17
- onIterDataInputData(name: string): void;
18
- }
@@ -1,50 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- const Semifunctional_1 = require("../../../Class/Semifunctional");
13
- const _ids_1 = require("../../_ids");
14
- class Boot extends Semifunctional_1.Semifunctional {
15
- constructor(system) {
16
- super({
17
- fi: ['init', 'parent'],
18
- fo: ['system'],
19
- i: ['done'],
20
- o: [],
21
- }, {
22
- input: {
23
- parent: {
24
- ref: true,
25
- },
26
- },
27
- output: {
28
- system: {
29
- ref: true,
30
- },
31
- },
32
- }, system, _ids_1.ID_BOOT);
33
- }
34
- f({ parent, opt }, done) {
35
- return __awaiter(this, void 0, void 0, function* () {
36
- const [system, unlisten] = parent.newSystem(opt);
37
- done({
38
- system,
39
- });
40
- });
41
- }
42
- onIterDataInputData(name) {
43
- // if (name === 'done') {
44
- this._forward_empty('system');
45
- this._backward('done');
46
- // }
47
- }
48
- }
49
- exports.default = Boot;
50
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"src/","sources":["system/platform/Boot/index.ts"],"names":[],"mappings":";;;;;;;;;;;AACA,kEAA8D;AAI9D,qCAAoC;AAYpC,MAAqB,IAAQ,SAAQ,+BAA0B;IAC7D,YAAY,MAAc;QACxB,KAAK,CACH;YACE,EAAE,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC;YACtB,EAAE,EAAE,CAAC,QAAQ,CAAC;YACd,CAAC,EAAE,CAAC,MAAM,CAAC;YACX,CAAC,EAAE,EAAE;SACN,EACD;YACE,KAAK,EAAE;gBACL,MAAM,EAAE;oBACN,GAAG,EAAE,IAAI;iBACV;aACF;YACD,MAAM,EAAE;gBACN,MAAM,EAAE;oBACN,GAAG,EAAE,IAAI;iBACV;aACF;SACF,EACD,MAAM,EACN,cAAO,CACR,CAAA;IACH,CAAC;IAEK,CAAC,CAAC,EAAE,MAAM,EAAE,GAAG,EAAQ,EAAE,IAAgB;;YAC7C,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,GAAG,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,CAAA;YAEhD,IAAI,CAAC;gBACH,MAAM;aACP,CAAC,CAAA;QACJ,CAAC;KAAA;IAED,mBAAmB,CAAC,IAAY;QAC9B,yBAAyB;QACzB,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAA;QAE7B,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAA;QACtB,IAAI;IACN,CAAC;CACF;AAzCD,uBAyCC"}
@@ -1,16 +0,0 @@
1
- import { Graph } from '../../../Class/Graph';
2
- import { Unit } from '../../../Class/Unit';
3
- import { System } from '../../../system';
4
- import { Dict } from '../../../types/Dict';
5
- import { GraphBundle } from '../../../types/GraphClass';
6
- import { S } from '../../../types/interface/S';
7
- import { Unlisten } from '../../../types/Unlisten';
8
- export interface I<T> {
9
- }
10
- export interface O<T> {
11
- }
12
- export default class _System<T> extends Unit<I<T>, O<T>> implements S {
13
- constructor(system: System);
14
- newGraph(bundle: GraphBundle<any, any>): [Dict<string>, Graph<any, any>, Unlisten];
15
- newSystem(opt: {}): [S, Unlisten];
16
- }
@@ -1,27 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const Unit_1 = require("../../../Class/Unit");
4
- const System_1 = require("../../../wrap/System");
5
- const _ids_1 = require("../../_ids");
6
- class _System extends Unit_1.Unit {
7
- constructor(system) {
8
- super({
9
- i: [],
10
- o: [],
11
- }, {
12
- output: {
13
- system: {
14
- ref: true,
15
- },
16
- },
17
- }, system, _ids_1.ID_SYSTEM);
18
- }
19
- newGraph(bundle) {
20
- throw new Error('Method not implemented.');
21
- }
22
- newSystem(opt) {
23
- return (0, System_1._newSystem)(this.__system, this.__system);
24
- }
25
- }
26
- exports.default = _System;
27
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"src/","sources":["system/platform/System/index.ts"],"names":[],"mappings":";;AACA,8CAA0C;AAM1C,iDAAiD;AACjD,qCAAsC;AAMtC,MAAqB,OAAW,SAAQ,WAAgB;IACtD,YAAY,MAAc;QACxB,KAAK,CACH;YACE,CAAC,EAAE,EAAE;YACL,CAAC,EAAE,EAAE;SACN,EACD;YACE,MAAM,EAAE;gBACN,MAAM,EAAE;oBACN,GAAG,EAAE,IAAI;iBACV;aACF;SACF,EACD,MAAM,EACN,gBAAS,CACV,CAAA;IACH,CAAC;IAED,QAAQ,CACN,MAA6B;QAE7B,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAA;IAC5C,CAAC;IAED,SAAS,CAAC,GAAO;QACf,OAAO,IAAA,mBAAU,EAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAA;IACjD,CAAC;CACF;AA5BD,0BA4BC"}
@@ -1,14 +0,0 @@
1
- import { Functional } from '../../../../../Class/Functional';
2
- import { Done } from '../../../../../Class/Functional/Done';
3
- import { System } from '../../../../../system';
4
- export interface I<T> {
5
- d: any[][];
6
- path: string;
7
- }
8
- export interface O<T> {
9
- d: any[][];
10
- }
11
- export default class AddPath<T> extends Functional<I<T>, O<T>> {
12
- constructor(system: System);
13
- f({ d, path }: I<T>, done: Done<O<T>>): void;
14
- }
@@ -1,19 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const Functional_1 = require("../../../../../Class/Functional");
4
- const _ids_1 = require("../../../../_ids");
5
- class AddPath extends Functional_1.Functional {
6
- constructor(system) {
7
- super({
8
- i: ['path', 'd'],
9
- o: ['d'],
10
- }, {}, system, _ids_1.ID_ADD_ARC);
11
- }
12
- f({ d, path }, done) {
13
- done({
14
- d: [...d, ['path', path]],
15
- });
16
- }
17
- }
18
- exports.default = AddPath;
19
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"src/","sources":["system/platform/api/canvas/AddPath/index.ts"],"names":[],"mappings":";;AAAA,gEAA4D;AAG5D,2CAA6C;AAW7C,MAAqB,OAAW,SAAQ,uBAAsB;IAC5D,YAAY,MAAc;QACxB,KAAK,CACH;YACE,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,CAAC;YAChB,CAAC,EAAE,CAAC,GAAG,CAAC;SACT,EACD,EAAE,EACF,MAAM,EACN,iBAAU,CACX,CAAA;IACH,CAAC;IAED,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,EAAQ,EAAE,IAAgB;QACnC,IAAI,CAAC;YACH,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;SAC1B,CAAC,CAAA;IACJ,CAAC;CACF;AAlBD,0BAkBC"}
@@ -1,27 +0,0 @@
1
- import { Graph } from '../../../../../Class/Graph';
2
- import { Semifunctional } from '../../../../../Class/Semifunctional';
3
- import { System } from '../../../../../system';
4
- export interface I {
5
- graph: Graph;
6
- answer: string;
7
- }
8
- export interface O {
9
- offer: string;
10
- }
11
- export default class PeerShareGraph extends Semifunctional<I, O> {
12
- __: string[];
13
- private _connected;
14
- private _peer;
15
- private _ref;
16
- constructor(system: System);
17
- private _disconnect;
18
- private _close;
19
- private _send;
20
- private _send_init;
21
- private _send_exec;
22
- private _send_terminate;
23
- f({ graph }: I): void;
24
- d(): void;
25
- onIterDataInputData(name: string, data: any): Promise<void>;
26
- onIterDataInputDrop(name: string): Promise<void>;
27
- }