@knowlearning/agents 0.1.4 → 0.1.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knowlearning/agents",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "API for embedding applications in KnowLearning systems.",
5
5
  "main": "package/node.js",
6
6
  "browser": "package/browser.js",
@@ -10,7 +10,7 @@ function isScopeSerializable(v) {
10
10
 
11
11
  export default async function (module, props) {
12
12
  const component = module.default ? { ...module.default } : { ...module } // copy component since we will mess with mounted and data functions
13
-
13
+ /*
14
14
  if (!component.ephemeral) {
15
15
  const state = await Agent.mutate()
16
16
 
@@ -28,14 +28,12 @@ export default async function (module, props) {
28
28
  const origSetupFn = component.setup
29
29
  const isReactiveRef = r => r && r.__v_isRef
30
30
  component.setup = function setupProxy(a, b) { // need to specifically add this here, otherwise second argument not passed in arguments array (probably because of webpack optimization...)
31
- const refs = origSetupFn.call(this, a, b)
31
+ let refs = origSetupFn.call(this, a, b)
32
32
 
33
- if (state) {
34
- Object
35
- .entries(state)
36
- .filter(([k]) => isReactiveRef(refs[k]))
37
- .forEach(([k, v]) => refs[k].value = v)
38
- }
33
+ Object
34
+ .entries(state)
35
+ .filter(([k]) => isReactiveRef(refs[k]))
36
+ .forEach(([k, v]) => refs[k].value = v)
39
37
 
40
38
  Object
41
39
  .entries(refs)
@@ -52,9 +50,11 @@ export default async function (module, props) {
52
50
  }
53
51
  }
54
52
  }
53
+ */
55
54
 
56
55
  document.body.innerHTML = ''
57
56
  const app = createApp(component, props)
57
+ console.log(app)
58
58
  app.component('Content', content)
59
59
  app.mount(document.body)
60
60
  }