ekms 8.0.0-beta.80 → 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 (82) hide show
  1. package/common/animals.instance.json +97 -97
  2. package/common/animals.js +1 -1
  3. package/common/articles.js +1 -1
  4. package/common/asking.js +1 -1
  5. package/common/avatar.js +1 -1
  6. package/common/characters.js +1 -1
  7. package/common/colors.instance.json +403 -403
  8. package/common/colors.js +1 -1
  9. package/common/comparable.instance.json +22 -22
  10. package/common/comparable.js +1 -1
  11. package/common/concept.js +1 -1
  12. package/common/conjunction.js +1 -1
  13. package/common/countable.js +1 -1
  14. package/common/crew.instance.json +485 -393
  15. package/common/crew.js +1 -1
  16. package/common/currency.js +1 -1
  17. package/common/dialogues.js +2 -2
  18. package/common/dimension.instance.json +9 -9
  19. package/common/dimension.js +1 -1
  20. package/common/edible.instance.json +464 -464
  21. package/common/edible.js +1 -1
  22. package/common/emotions.instance.json +105 -45
  23. package/common/emotions.js +1 -1
  24. package/common/evaluate.js +1 -1
  25. package/common/events.js +1 -1
  26. package/common/fastfood.instance.json +2675 -2562
  27. package/common/fastfood.js +1 -1
  28. package/common/formulas.instance.json +2 -2
  29. package/common/formulas.js +1 -1
  30. package/common/gdefaults.js +16 -1
  31. package/common/help.js +2 -2
  32. package/common/helpers.js +24 -21
  33. package/common/hierarchy.js +1 -1
  34. package/common/javascript.js +1 -1
  35. package/common/kirk.instance.json +3 -3
  36. package/common/kirk.js +1 -1
  37. package/common/length.instance.json +268 -248
  38. package/common/length.js +1 -1
  39. package/common/listener.js +1 -1
  40. package/common/math.instance.json +2 -2
  41. package/common/math.js +1 -1
  42. package/common/meta.js +1 -1
  43. package/common/nameable.js +1 -1
  44. package/common/negation.js +1 -1
  45. package/common/numbers.js +1 -1
  46. package/common/ordering.instance.json +75 -127
  47. package/common/ordering.js +1 -1
  48. package/common/ordinals.js +1 -1
  49. package/common/people.instance.json +139 -79
  50. package/common/people.js +1 -1
  51. package/common/percentages.js +1 -1
  52. package/common/pipboy.instance.json +233 -233
  53. package/common/pipboy.js +1 -1
  54. package/common/pokemon.instance.json +125 -125
  55. package/common/pokemon.js +1 -1
  56. package/common/pos.js +1 -1
  57. package/common/pressure.instance.json +128 -152
  58. package/common/pressure.js +1 -1
  59. package/common/properties.instance.json +17 -17
  60. package/common/properties.js +1 -1
  61. package/common/punctuation.js +1 -1
  62. package/common/reports.instance.json +16 -16
  63. package/common/reports.js +1 -1
  64. package/common/scorekeeper.js +1 -1
  65. package/common/sdefaults.js +1 -1
  66. package/common/sizeable.js +1 -1
  67. package/common/spock.instance.json +2 -2
  68. package/common/spock.js +1 -1
  69. package/common/stgame.js +1 -1
  70. package/common/stm.js +9 -7
  71. package/common/tell.js +1 -1
  72. package/common/temperature.instance.json +178 -202
  73. package/common/temperature.js +1 -1
  74. package/common/time.js +1 -1
  75. package/common/tokenize.js +1 -1
  76. package/common/ui.instance.json +34 -556
  77. package/common/ui.js +8 -13
  78. package/common/ui.test.json +641 -5357
  79. package/common/weight.instance.json +307 -319
  80. package/common/weight.js +1 -1
  81. package/common/yesno.js +1 -1
  82. 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: {