tpmkms_4wp 8.9.1-beta.7 → 8.9.1-beta.9

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 (52) hide show
  1. package/common/articles.js +1 -1
  2. package/common/asking.js +2 -2
  3. package/common/avatar.js +1 -1
  4. package/common/characters.js +1 -1
  5. package/common/comparable.js +1 -1
  6. package/common/concept.js +1 -1
  7. package/common/conjunction.js +1 -1
  8. package/common/countable.js +1 -1
  9. package/common/currency.js +2 -2
  10. package/common/dialogues.js +3 -3
  11. package/common/dimension.js +2 -2
  12. package/common/errors.js +1 -1
  13. package/common/events.js +1 -1
  14. package/common/fastfood.instance.json +705 -928
  15. package/common/fastfood.js +3 -3
  16. package/common/formulas.js +1 -1
  17. package/common/gdefaults.js +2 -2
  18. package/common/help.js +4 -4
  19. package/common/helpers/concept.js +3 -3
  20. package/common/helpers/conjunction.js +1 -1
  21. package/common/helpers/formulas.js +4 -4
  22. package/common/helpers/frankenhash.js +4 -4
  23. package/common/helpers/meta.js +4 -4
  24. package/common/helpers/ordering.js +2 -2
  25. package/common/helpers/properties.js +16 -16
  26. package/common/helpers.js +1 -1
  27. package/common/hierarchy.js +3 -3
  28. package/common/javascript.js +1 -1
  29. package/common/math.js +1 -1
  30. package/common/meta.js +5 -5
  31. package/common/negation.js +1 -1
  32. package/common/numbers.js +1 -1
  33. package/common/ordinals.js +1 -1
  34. package/common/people.js +1 -1
  35. package/common/percentages.js +1 -1
  36. package/common/pipboy.js +1 -1
  37. package/common/pos.js +1 -1
  38. package/common/properties.js +2 -2
  39. package/common/punctuation.js +1 -1
  40. package/common/reports.instance.json +2 -2
  41. package/common/reports.js +7 -7
  42. package/common/scorekeeper.js +5 -5
  43. package/common/sdefaults.js +2 -2
  44. package/common/sizeable.js +1 -1
  45. package/common/stm.js +6 -6
  46. package/common/tell.js +1 -1
  47. package/common/tester.js +1 -1
  48. package/common/wp.instance.json +50 -2
  49. package/common/wp.js +40 -3
  50. package/common/wp.test.json +9804 -91
  51. package/common/yesno.js +1 -1
  52. package/package.json +4 -4
package/common/wp.js CHANGED
@@ -14,6 +14,11 @@ const instance = require('./wp.instance.json')
14
14
  bold the first paragraph
15
15
  bold the first letter
16
16
 
17
+ current
18
+
19
+ underline the bolded paragraphs
20
+ underline the paragraphs that contain bolded words
21
+
17
22
  after
18
23
  bold the first word of every paragraph
19
24
  bold the first word of the second and third paragraph
@@ -22,6 +27,8 @@ const instance = require('./wp.instance.json')
22
27
  bold the first letter of every word that starts with t
23
28
  bold the first letter of the words that start with t in the third paragraph
24
29
  bold the paragraph that contains words that start with t
30
+ underline the paragraph that contains bolded words
31
+ bold the paragraph that contains three bolded words
25
32
 
26
33
  after
27
34
  make the words that start with t blue
@@ -99,7 +106,7 @@ const setUpdate = (isA, update, states) => {
99
106
  if (!update.styles) {
100
107
  update.styles = []
101
108
  }
102
- let style = root(state.value)
109
+ const style = root(state.value)
103
110
  /*
104
111
  if (style == 'underlined') {
105
112
  style = 'underline'
@@ -116,7 +123,7 @@ const setUpdate = (isA, update, states) => {
116
123
 
117
124
  const api = new API()
118
125
 
119
- let config = {
126
+ const config = {
120
127
  name: 'wp',
121
128
  };
122
129
 
@@ -125,7 +132,7 @@ const changeState = ({api, isA, context, toArray, element, state}) => {
125
132
 
126
133
  const getElement = (selector, update) => {
127
134
  const unit = root(selector.marker)
128
- let conditions = []
135
+ const conditions = []
129
136
  let scope;
130
137
  const condition = []
131
138
  if (selector.ordinal) {
@@ -148,6 +155,11 @@ const changeState = ({api, isA, context, toArray, element, state}) => {
148
155
  // with or not with that is the question
149
156
  const letters = condition.letters.text
150
157
  conditions.push({ comparison: condition.comparison, letters })
158
+ } else if (condition.marker == 'paragraphComparison_wp') {
159
+ // with or not with that is the question
160
+ const update = { selectors: [] }
161
+ const words = getElement(condition.words, update)
162
+ conditions.push({ comparison: condition.comparison, words: update})
151
163
  } else if (isA(condition, 'styleModifier_wp')) {
152
164
  for (const style of toArray(condition)) {
153
165
  conditions.push({ hasStyle: style.marker })
@@ -201,8 +213,32 @@ template = {
201
213
  "((styleModifier_wp/*) [modifiedByStyle_wp] (statefulElement_wp/* && context.determiner == undefined))",
202
214
  // the first letter of each paragraph
203
215
  "((statefulElement_wp/*) <statefulElementInContext_wp|of> (statefulElement_wp/*))",
216
+ // the paragraph that contains words that start with t
217
+ "((paragraph_wp/*) [paragraphComparison_wp] (word_wp/*))",
204
218
  ],
219
+ associations: {
220
+ negative: [
221
+ ],
222
+ positive: [
223
+ // TODO remove these after crucible work done and fix the associator rules
224
+ [['paragraph_wp', 0], ['thatVerb', 0], ['paragraphComparison_wp', 0], ['word_wp', 0]],
225
+ [['paragraph_wp', 0], ['thatVerb', 0], ['paragraphComparison_wp', 0], ['styleModifier_wp', 0], ['word_wp', 0]],
226
+ [['word_wp', 0], ['thatVerb', 0], ['wordComparison_wp', 0]],
227
+ ]
228
+ },
229
+
205
230
  bridges: [
231
+ {
232
+ id: 'paragraphComparison_wp',
233
+ parents: ['verb'],
234
+ words: [
235
+ { word: 'contain', comparison: 'include' },
236
+ { word: 'contains', comparison: 'include' },
237
+ { word: 'include', comparison: 'include' },
238
+ { word: 'includes', comparison: 'include' },
239
+ ],
240
+ bridge: "{ ...next(operator), element: before[0], subject: before[0], words: after[0], verb: operator, generate: ['element', 'verb', 'words'] }",
241
+ },
206
242
  {
207
243
  id: 'statefulElementInContext_wp',
208
244
  parents: ['preposition'],
@@ -302,6 +338,7 @@ template = {
302
338
  },
303
339
  ],
304
340
  priorities: [
341
+ { "context": [['ordinal',1], ['list', 0], ['ordinal', 1], ['word_wp', 1]], ordered: true, choose: [1] },
305
342
  { "context": [['changeState_wp',0], ['every', 0], ['word_wp', 1], ['list', 1]], ordered: true, choose: [1] },
306
343
  { "context": [['changeState_wp',0], ['statefulElement_wp', 0], ['list', 0]], ordered: true, choose: [0] },
307
344
  { "context": [['comparisonWith_wp',0], ['unknown', 0], ['list', 1]], ordered: true, choose: [0] },