ekms 8.0.0-beta.81 → 8.0.0-beta.82

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 (69) hide show
  1. package/common/animals.js +1 -1
  2. package/common/articles.js +1 -1
  3. package/common/asking.js +1 -1
  4. package/common/avatar.js +1 -1
  5. package/common/characters.js +1 -1
  6. package/common/colors.js +1 -1
  7. package/common/comparable.js +1 -1
  8. package/common/concept.js +1 -1
  9. package/common/conjunction.js +1 -1
  10. package/common/countable.js +1 -1
  11. package/common/crew.instance.json +68 -36
  12. package/common/crew.js +1 -1
  13. package/common/currency.js +1 -1
  14. package/common/dialogues.js +2 -2
  15. package/common/dimension.js +1 -1
  16. package/common/edible.js +1 -1
  17. package/common/emotions.instance.json +60 -0
  18. package/common/emotions.js +1 -1
  19. package/common/evaluate.js +1 -1
  20. package/common/events.js +1 -1
  21. package/common/fastfood.instance.json +553 -764
  22. package/common/fastfood.js +1 -1
  23. package/common/formulas.js +1 -1
  24. package/common/gdefaults.js +16 -1
  25. package/common/help.js +2 -2
  26. package/common/helpers.js +24 -21
  27. package/common/hierarchy.js +1 -1
  28. package/common/javascript.js +1 -1
  29. package/common/kirk.js +1 -1
  30. package/common/length.instance.json +98 -78
  31. package/common/length.js +1 -1
  32. package/common/listener.js +1 -1
  33. package/common/math.js +1 -1
  34. package/common/meta.js +1 -1
  35. package/common/nameable.js +1 -1
  36. package/common/negation.js +1 -1
  37. package/common/numbers.js +1 -1
  38. package/common/ordering.js +1 -1
  39. package/common/ordinals.js +1 -1
  40. package/common/people.instance.json +46 -14
  41. package/common/people.js +1 -1
  42. package/common/percentages.js +1 -1
  43. package/common/pipboy.js +1 -1
  44. package/common/pokemon.js +1 -1
  45. package/common/pos.js +1 -1
  46. package/common/pressure.instance.json +81 -105
  47. package/common/pressure.js +1 -1
  48. package/common/properties.js +1 -1
  49. package/common/punctuation.js +1 -1
  50. package/common/reports.instance.json +1 -1
  51. package/common/reports.js +1 -1
  52. package/common/scorekeeper.js +1 -1
  53. package/common/sdefaults.js +1 -1
  54. package/common/sizeable.js +1 -1
  55. package/common/spock.js +1 -1
  56. package/common/stgame.js +1 -1
  57. package/common/stm.js +9 -7
  58. package/common/tell.js +1 -1
  59. package/common/temperature.instance.json +86 -110
  60. package/common/temperature.js +1 -1
  61. package/common/time.js +1 -1
  62. package/common/tokenize.js +1 -1
  63. package/common/ui.instance.json +32 -554
  64. package/common/ui.js +8 -13
  65. package/common/ui.test.json +641 -5357
  66. package/common/weight.instance.json +154 -166
  67. package/common/weight.js +1 -1
  68. package/common/yesno.js +1 -1
  69. package/package.json +2 -2
package/common/ui.js CHANGED
@@ -1,7 +1,7 @@
1
1
  const { knowledgeModule, where, Digraph } = require('./runtime').theprogrammablemind
2
2
  const { defaultContextCheck } = require('./helpers')
3
3
  const dialogues = require('./dialogues')
4
- const math = require('./math')
4
+ const ordinals = require('./ordinals')
5
5
  const ui_tests = require('./ui.test.json')
6
6
  const ui_instance = require('./ui.instance.json')
7
7
 
@@ -45,7 +45,7 @@ const config = {
45
45
  "([select])",
46
46
  "([unselect])",
47
47
  "([cancel])",
48
- "([move] ([direction]))",
48
+ "([move] ([moveable])? ([direction]))",
49
49
  "([down])",
50
50
  "([up])",
51
51
  "([left])",
@@ -127,22 +127,17 @@ const config = {
127
127
  id: "move",
128
128
  isA: ['verb'],
129
129
  level: 0,
130
- bridge: "{ ...next(operator), direction: after[0] }",
131
- generatorp: async ({context, g}) => `move ${await g(context.direction)}`,
130
+ optional: { 1: "{ marker: 'moveable', pullFromContext: true, default: true, skipDefault: true }" },
131
+ bridge: "{ ...next(operator), operator: operator, moveable: after[0], direction: after[1], generate: ['operator', 'moveable', 'direction' ] }",
132
132
  semantic: ({api, context}) => {
133
133
  api.move(context.direction.value, context.direction.steps ? context.direction.steps.value : 1)
134
134
  }
135
135
  },
136
- {
137
- id: "direction",
138
- level: 0,
139
- bridge: "{ ...next(operator) }"
140
- },
136
+ { id: "moveable", },
137
+ { id: "direction", },
141
138
  {
142
139
  id: "up",
143
- level: 0,
144
140
  isA: ['direction'],
145
- bridge: "{ ...next(operator) }"
146
141
  },
147
142
  {
148
143
  id: "down",
@@ -187,7 +182,7 @@ const template = {
187
182
 
188
183
  knowledgeModule({
189
184
  config,
190
- includes: [dialogues, math],
185
+ includes: [dialogues, ordinals],
191
186
  api: () => new API(),
192
187
 
193
188
  module,
@@ -197,7 +192,7 @@ knowledgeModule({
197
192
  contents: ui_tests,
198
193
  checks: {
199
194
  objects: ['move', 'select', 'unselect', 'cancel', 'stop'],
200
- context: defaultContextCheck,
195
+ context: defaultContextCheck(['operator', 'direction', 'moveable']),
201
196
  },
202
197
  },
203
198
  template: {