tpmkms_4wp 9.3.0-beta.0 → 9.3.0-beta.10

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/animals.instance.json +0 -65
  2. package/common/colors.instance.json +0 -70
  3. package/common/comparable.instance.json +0 -15
  4. package/common/concept.test.json +279 -193
  5. package/common/crew.instance.json +0 -166
  6. package/common/dateTimeSelectors.instance.json +42 -0
  7. package/common/dateTimeSelectors.js +94 -0
  8. package/common/dateTimeSelectors.test.json +4529 -0
  9. package/common/dates.instance.json +52 -27
  10. package/common/dates.js +13 -0
  11. package/common/dates.test.json +1787 -0
  12. package/common/dialogues.js +5 -2
  13. package/common/dimension.instance.json +0 -5
  14. package/common/edible.instance.json +0 -160
  15. package/common/emotions.instance.json +0 -5
  16. package/common/evaluate.js +1 -1
  17. package/common/events.js +1 -1
  18. package/common/fastfood.instance.json +326 -873
  19. package/common/fastfood.test.json +16291 -6597
  20. package/common/formulas.instance.json +0 -5
  21. package/common/helpers/dateTimeSelectors.js +48 -0
  22. package/common/helpers.js +24 -7
  23. package/common/kirk.instance.json +0 -5
  24. package/common/length.instance.json +0 -75
  25. package/common/math.instance.json +0 -5
  26. package/common/menus.instance.json +0 -35
  27. package/common/numbers.js +1 -1
  28. package/common/numbers.test.json +89 -23
  29. package/common/ordering.instance.json +0 -10
  30. package/common/people.instance.json +0 -40
  31. package/common/percentages.js +1 -1
  32. package/common/pipboy.instance.json +0 -85
  33. package/common/pipboy.test.json +4377 -3386
  34. package/common/pokemon.instance.json +0 -65
  35. package/common/pressure.instance.json +0 -20
  36. package/common/properties.instance.json +0 -5
  37. package/common/reminders.instance.json +101 -0
  38. package/common/reminders.js +220 -0
  39. package/common/reminders.test.json +13560 -0
  40. package/common/reports.instance.json +2 -12
  41. package/common/scorekeeper.test.json +3565 -7550
  42. package/common/spock.instance.json +0 -5
  43. package/common/temperature.instance.json +0 -20
  44. package/common/time.js +55 -30
  45. package/common/time.test.json +4124 -124
  46. package/common/ui.instance.json +0 -5
  47. package/common/ui.js +3 -1
  48. package/common/weight.instance.json +0 -60
  49. package/common/wp.instance.json +0 -70
  50. package/common/wp.test.json +8057 -3867
  51. package/main.js +4 -0
  52. package/package.json +12 -4
@@ -500,11 +500,6 @@
500
500
  "theAble",
501
501
  false
502
502
  ],
503
- [
504
- "evaluate",
505
- "verb",
506
- false
507
- ],
508
503
  [
509
504
  "every",
510
505
  "article",
@@ -243,11 +243,6 @@
243
243
  "article",
244
244
  false
245
245
  ],
246
- [
247
- "evaluate",
248
- "verb",
249
- false
250
- ],
251
246
  [
252
247
  "every",
253
248
  "article",
@@ -1675,11 +1670,6 @@
1675
1670
  "article",
1676
1671
  false
1677
1672
  ],
1678
- [
1679
- "evaluate",
1680
- "verb",
1681
- false
1682
- ],
1683
1673
  [
1684
1674
  "every",
1685
1675
  "article",
@@ -3919,11 +3909,6 @@
3919
3909
  "article",
3920
3910
  false
3921
3911
  ],
3922
- [
3923
- "evaluate",
3924
- "verb",
3925
- false
3926
- ],
3927
3912
  [
3928
3913
  "every",
3929
3914
  "article",
@@ -6397,11 +6382,6 @@
6397
6382
  "article",
6398
6383
  false
6399
6384
  ],
6400
- [
6401
- "evaluate",
6402
- "verb",
6403
- false
6404
- ],
6405
6385
  [
6406
6386
  "every",
6407
6387
  "article",
package/common/time.js CHANGED
@@ -41,8 +41,11 @@ const config = {
41
41
  name: 'time',
42
42
  operators: [
43
43
  "([time])",
44
+ "([atTime|at] (time))",
44
45
  "([use] (([timeUnit]) [timeFormat|format]))",
45
- "(([number|]) [ampm|])"
46
+ // "(([number|]) [ampm|])",
47
+ "((time) [ampm|])",
48
+ "([hourMinutes|] (integer) (colon) (integer))",
46
49
  //"(([anyConcept]) [equals|is] ([anyConcept]))",
47
50
  //"(([what0|what]) [equals] (<the> ([timeConcept])))",
48
51
  //"(<whatP|what> ([anyConcept]))",
@@ -53,26 +56,47 @@ const config = {
53
56
  // how many hours are in a day
54
57
  ],
55
58
  bridges: [
56
- { "id": "time", "level": 0, "bridge": "{ ...next(operator) }" },
57
-
58
- // { "id": "hourUnits", "level": 0, "bridge": "{ ...next(operator) }" },
59
- { "id": "ampm", "level": 0, "bridge": "{ ...next(operator), hour: before[0] }" },
60
-
61
- { "id": "timeFormat", "level": 0, "bridge": "{ ...before[0], ...next(operator) }" },
62
- // { "id": "count", "level": 0, "bridge": "{ ...after, count: operator.value }" },
59
+ {
60
+ id: 'hourMinutes',
61
+ isA: ['time'],
62
+ convolution: true,
63
+ bridge: "{ ...next(operator), hour: after[0], colon: after[1], minute: after[2], interpolate: '${hour}${colon}${minute}' }",
64
+ },
65
+ {
66
+ id: "atTime",
67
+ words: ['@'],
68
+ isA: ['preposition'],
69
+ bridge: "{ ...next(operator), time: after[0], operator: operator, interpolate: '${operator} ${time}' }"
70
+ },
71
+ {
72
+ id: "time",
73
+ bridge: "{ ...next(operator) }"
74
+ },
63
75
  {
64
- "id": "timeUnit",
65
- "level": 0,
76
+ id: "ampm",
77
+ isA: ['adjective'],
78
+ localHierarchy: [
79
+ ['integer', 'time'],
80
+ ],
81
+ bridge: "{ ...next(before[0]), marker: if(isA(before[0].marker, 'integer'), operator('time'), before[0].marker), ampm: operator, time: before[0], interpolate: concat(default(before[0].interpolate, '${time}'), ' ${ampm}') }",
82
+ },
83
+ {
84
+ id: "timeFormat",
85
+ bridge: "{ ...before[0], ...next(operator) }"
86
+ },
87
+ {
88
+ id: "timeUnit",
66
89
  words: [
67
90
  ...helpers.words('hour', { initial: "{ units: 'hour' }" }),
68
91
  ...helpers.words('minute', { initial: "{ units: 'minute' }" }),
69
92
  ...helpers.words('second', { initial: "{ units: 'second' }" }),
70
93
  ],
71
- "bridge": "{ ...next(operator) }"
94
+ bridge: "{ ...next(operator) }"
72
95
  },
73
- { "id": "use", "level": 0,
74
- bridge: "{ ...next(operator), format: after[0] }",
75
- generatorp: ({g, context}) => `use ${context.format.quantity.value} hour time`
96
+ {
97
+ id: "use",
98
+ bridge: "{ ...next(operator), format: after[0] }",
99
+ generatorp: ({g, context}) => `use ${context.format.quantity.value} hour time`
76
100
  },
77
101
  ],
78
102
  hierarchy: [
@@ -84,26 +108,21 @@ const config = {
84
108
 
85
109
  "words": {
86
110
  "literals": {
87
- // " ([0-9]+)": [{"id": "count", "initial": "{ value: int(group[0]) }" }],
88
- // " (1[0-2]|[1-9])": [{"id": "hourUnits", "initial": "{ hour: int(group[0]) }" }],
89
- "am": [{"id": "ampm", "initial": "{ ampm: 'am', determined: true }" }],
90
- "pm": [{"id": "ampm", "initial": "{ ampm: 'pm', determined: true }" }],
91
- //" (1[0-2]|[1-9]) ?pm": [{"id": "count", "initial": "{ hour: int(group[0]), part: 'pm' }" }],
92
- //" (1[0-2]|[1-9]) ?am": [{"id": "count", "initial": "{ hour: int(group[0]), part: 'am' }" }],
111
+ // " ([0-9]+)": [{id: "count", "initial": "{ value: int(group[0]) }" }],
112
+ // " (1[0-2]|[1-9])": [{id: "hourUnits", "initial": "{ hour: int(group[0]) }" }],
113
+ "am": [{id: "ampm", "initial": "{ ampm: 'am', determined: true }" }],
114
+ "pm": [{id: "ampm", "initial": "{ ampm: 'pm', determined: true }" }],
115
+ //" (1[0-2]|[1-9]) ?pm": [{id: "count", "initial": "{ hour: int(group[0]), part: 'pm' }" }],
116
+ //" (1[0-2]|[1-9]) ?am": [{id: "count", "initial": "{ hour: int(group[0]), part: 'am' }" }],
93
117
  /*
94
- " hours?": [{"id": "timeUnit", "initial": "{ units: 'hour' }" }],
95
- " minutes?": [{"id": "timeUnit", "initial": "{ units: 'hour' }" }],
96
- " seconds?": [{"id": "timeUnit", "initial": "{ units: 'seconds' }" }],
118
+ " hours?": [{id: "timeUnit", "initial": "{ units: 'hour' }" }],
119
+ " minutes?": [{id: "timeUnit", "initial": "{ units: 'hour' }" }],
120
+ " seconds?": [{id: "timeUnit", "initial": "{ units: 'seconds' }" }],
97
121
  */
98
122
  }
99
123
  },
100
124
 
101
125
  generators: [
102
- {
103
- where: where(),
104
- match: ({context}) => context.marker == 'ampm' && context.paraphrase,
105
- apply: async ({g, context, gp}) => `${await gp(context.hour)} ${context.ampm}`
106
- },
107
126
  {
108
127
  where: where(),
109
128
  match: ({context}) => context.marker == 'time' && context.evalue && context.format == 12,
@@ -194,7 +213,13 @@ knowledgeModule({
194
213
  name: './time.test.json',
195
214
  contents: time_tests,
196
215
  checks: {
197
- context: defaultContextCheck(),
198
- },
216
+ context: defaultContextCheck([{
217
+ event: {
218
+ defaults: true,
219
+ one: 'defaults',
220
+ two: 'defaults',
221
+ }
222
+ }]),
223
+ },
199
224
  },
200
225
  })