tpmkms_4wp 8.9.1-beta.8 → 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.
- package/common/articles.js +1 -1
- package/common/asking.js +2 -2
- package/common/avatar.js +1 -1
- package/common/characters.js +1 -1
- package/common/comparable.js +1 -1
- package/common/concept.js +1 -1
- package/common/conjunction.js +1 -1
- package/common/countable.js +1 -1
- package/common/currency.js +2 -2
- package/common/dialogues.js +3 -3
- package/common/dimension.js +2 -2
- package/common/errors.js +1 -1
- package/common/events.js +1 -1
- package/common/fastfood.instance.json +705 -928
- package/common/fastfood.js +3 -3
- package/common/formulas.js +1 -1
- package/common/gdefaults.js +2 -2
- package/common/help.js +4 -4
- package/common/helpers/concept.js +3 -3
- package/common/helpers/conjunction.js +1 -1
- package/common/helpers/formulas.js +4 -4
- package/common/helpers/frankenhash.js +4 -4
- package/common/helpers/meta.js +4 -4
- package/common/helpers/ordering.js +2 -2
- package/common/helpers/properties.js +16 -16
- package/common/helpers.js +1 -1
- package/common/hierarchy.js +3 -3
- package/common/javascript.js +1 -1
- package/common/math.js +1 -1
- package/common/meta.js +5 -5
- package/common/negation.js +1 -1
- package/common/numbers.js +1 -1
- package/common/ordinals.js +1 -1
- package/common/people.js +1 -1
- package/common/percentages.js +1 -1
- package/common/pipboy.js +1 -1
- package/common/pos.js +1 -1
- package/common/properties.js +2 -2
- package/common/punctuation.js +1 -1
- package/common/reports.instance.json +2 -2
- package/common/reports.js +7 -7
- package/common/scorekeeper.js +5 -5
- package/common/sdefaults.js +2 -2
- package/common/sizeable.js +1 -1
- package/common/stm.js +6 -6
- package/common/tell.js +1 -1
- package/common/tester.js +1 -1
- package/common/wp.instance.json +50 -2
- package/common/wp.js +39 -3
- package/common/wp.test.json +7307 -0
- package/common/yesno.js +1 -1
- 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
|
-
|
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
|
-
|
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
|
-
|
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'],
|