ekms 9.6.3-beta.15 → 9.6.3-beta.16

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.
@@ -21,6 +21,7 @@
21
21
  "doAction"
22
22
  ],
23
23
  "selector": {
24
+ "match": "same",
24
25
  "left": [
25
26
  {
26
27
  "pattern": "(action))"
@@ -49,7 +50,8 @@
49
50
  ],
50
51
  "passthrough": true
51
52
  },
52
- "bridge": "{ ...next(operator), value: append(before, operator.value) }"
53
+ "bridge": "{ ...next(operator), value: append(before, operator.value) }",
54
+ "semantic": "async ({context, toArray, s}) => {\n for (const action of toArray(context)) {\n await s(action)\n }\n }"
53
55
  },
54
56
  {
55
57
  "id": "again",
@@ -92,7 +94,7 @@
92
94
  "defs": [
93
95
  {
94
96
  "id": "action",
95
- "initial": "{ value: text, instance: true }"
97
+ "initial": "{ value: text, instance: true, dead: true }"
96
98
  }
97
99
  ]
98
100
  }
@@ -129,6 +131,7 @@
129
131
  "doAction"
130
132
  ],
131
133
  "selector": {
134
+ "match": "same",
132
135
  "left": [
133
136
  {
134
137
  "pattern": "(action))"
@@ -200,7 +203,7 @@
200
203
  "defs": [
201
204
  {
202
205
  "id": "action",
203
- "initial": "{ value: text, instance: true }"
206
+ "initial": "{ value: text, instance: true, dead: true }"
204
207
  }
205
208
  ]
206
209
  }
package/common/actions.js CHANGED
@@ -20,6 +20,7 @@ const config = {
20
20
  bridges: [
21
21
  {
22
22
  id: 'action',
23
+ // isA: ['thisitthat'],
23
24
  },
24
25
  {
25
26
  id: "thenAction",
@@ -27,6 +28,7 @@ const config = {
27
28
  isA: ['action'],
28
29
  before: ['doAction'],
29
30
  selector: {
31
+ match: "same",
30
32
  left: [ { pattern: '(action))' } ],
31
33
  right: [ { pattern: '(action)' } ],
32
34
  passthrough: true
@@ -48,8 +50,13 @@ const config = {
48
50
  selector: {
49
51
  left: [ { pattern: '(action)' } ],
50
52
  passthrough: true
51
- },
52
- bridge: "{ ...next(operator), value: append(before, operator.value) }"
53
+ },
54
+ bridge: "{ ...next(operator), value: append(before, operator.value) }",
55
+ semantic: async ({context, toArray, s}) => {
56
+ for (const action of toArray(context)) {
57
+ await s(action)
58
+ }
59
+ },
53
60
  },
54
61
 
55
62
  {
@@ -75,7 +82,7 @@ const config = {
75
82
  ],
76
83
  words: {
77
84
  patterns: [
78
- { "pattern": ["action", { type: 'digit' }], allow_partial_matches: false, defs: [{id: "action", initial: "{ value: text, instance: true }" }]},
85
+ { "pattern": ["action", { type: 'digit' }], allow_partial_matches: false, defs: [{id: "action", initial: "{ value: text, instance: true, dead: true }" }]},
79
86
  ],
80
87
  },
81
88
  semantics: [