tpmkms_4wp 8.9.1-beta.15 → 8.9.1-beta.16

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.
@@ -21,7 +21,7 @@
21
21
  "((word_wp/*) [wordComparisonWithVerb_wp] ([comparisonWith_wp|with] (a/0)? (letters)))",
22
22
  "((word_wp/*) [wordComparison_wp] (a/0)? (letters))",
23
23
  "((styleModifier_wp/*) [modifiedByStyle_wp] (statefulElement_wp/* && context.determiner == undefined))",
24
- "((statefulElement_wp/*) <statefulElementInContext_wp|of,in> (statefulElement_wp/*))",
24
+ "((statefulElement_wp/*)? <statefulElementInContext_wp|of,in> (statefulElement_wp/*))",
25
25
  "((paragraph_wp/*) [paragraphComparisonVerb_wp] (word_wp/*))"
26
26
  ],
27
27
  "associations": {
@@ -114,6 +114,9 @@
114
114
  "parents": [
115
115
  "preposition"
116
116
  ],
117
+ "optional": {
118
+ "-1": "{ ...operator, invisible: true }"
119
+ },
117
120
  "bridge": "{ ...before[0], context: append(before[0].context, [after[0]]), generate: [before[0], operator, after[0]] }"
118
121
  },
119
122
  {
@@ -307,6 +310,31 @@
307
310
  2
308
311
  ]
309
312
  },
313
+ {
314
+ "context": [
315
+ [
316
+ "statefulElementInContext_wp",
317
+ 0
318
+ ],
319
+ [
320
+ "word_wp",
321
+ 1
322
+ ],
323
+ [
324
+ "wordComparisonWithVerb_wp",
325
+ 0
326
+ ],
327
+ [
328
+ "comparisonWith_wp",
329
+ 1
330
+ ]
331
+ ],
332
+ "ordered": true,
333
+ "choose": [
334
+ 2,
335
+ 3
336
+ ]
337
+ },
310
338
  {
311
339
  "context": [
312
340
  [
@@ -5328,36 +5356,6 @@
5328
5356
  1
5329
5357
  ]
5330
5358
  ],
5331
- [
5332
- [
5333
- "countable",
5334
- 0
5335
- ],
5336
- [
5337
- "distributable",
5338
- 0
5339
- ],
5340
- [
5341
- "is",
5342
- 0
5343
- ],
5344
- [
5345
- "list",
5346
- 0
5347
- ],
5348
- [
5349
- "orderable",
5350
- 0
5351
- ],
5352
- [
5353
- "unknown",
5354
- 0
5355
- ],
5356
- [
5357
- "unknown",
5358
- 1
5359
- ]
5360
- ],
5361
5359
  [
5362
5360
  [
5363
5361
  "countable",
@@ -19647,6 +19645,10 @@
19647
19645
  "list",
19648
19646
  0
19649
19647
  ],
19648
+ [
19649
+ "unknown",
19650
+ 0
19651
+ ],
19650
19652
  [
19651
19653
  "unknown",
19652
19654
  1
@@ -19663,7 +19665,7 @@
19663
19665
  ],
19664
19666
  [
19665
19667
  "list",
19666
- 1
19668
+ 0
19667
19669
  ],
19668
19670
  [
19669
19671
  "unknown",
@@ -19671,6 +19673,10 @@
19671
19673
  ]
19672
19674
  ],
19673
19675
  [
19676
+ [
19677
+ "comma",
19678
+ 0
19679
+ ],
19674
19680
  [
19675
19681
  "is",
19676
19682
  0
@@ -38091,20 +38097,12 @@
38091
38097
  "underlined_wp",
38092
38098
  0
38093
38099
  ],
38094
- [
38095
- "unknown",
38096
- 0
38097
- ],
38098
38100
  [
38099
38101
  "unknown",
38100
38102
  1
38101
38103
  ]
38102
38104
  ],
38103
38105
  [
38104
- [
38105
- "capitalized_wp",
38106
- 0
38107
- ],
38108
38106
  [
38109
38107
  "comma",
38110
38108
  0
@@ -38131,10 +38129,6 @@
38131
38129
  ]
38132
38130
  ],
38133
38131
  [
38134
- [
38135
- "comma",
38136
- 0
38137
- ],
38138
38132
  [
38139
38133
  "is",
38140
38134
  0
@@ -38161,10 +38155,6 @@
38161
38155
  "is",
38162
38156
  0
38163
38157
  ],
38164
- [
38165
- "italicized_wp",
38166
- 0
38167
- ],
38168
38158
  [
38169
38159
  "list",
38170
38160
  0
@@ -38178,38 +38168,6 @@
38178
38168
  1
38179
38169
  ]
38180
38170
  ],
38181
- [
38182
- [
38183
- "is",
38184
- 0
38185
- ],
38186
- [
38187
- "list",
38188
- 0
38189
- ],
38190
- [
38191
- "underlined_wp",
38192
- 0
38193
- ],
38194
- [
38195
- "unknown",
38196
- 1
38197
- ]
38198
- ],
38199
- [
38200
- [
38201
- "is",
38202
- 0
38203
- ],
38204
- [
38205
- "list",
38206
- 1
38207
- ],
38208
- [
38209
- "unknown",
38210
- 1
38211
- ]
38212
- ],
38213
38171
  [
38214
38172
  [
38215
38173
  "is",
@@ -41318,7 +41276,7 @@
41318
41276
  "((word_wp/*) [wordComparisonWithVerb_wp] ([comparisonWith_wp|with] (a/0)? (letters)))",
41319
41277
  "((word_wp/*) [wordComparison_wp] (a/0)? (letters))",
41320
41278
  "((styleModifier_wp/*) [modifiedByStyle_wp] (statefulElement_wp/* && context.determiner == undefined))",
41321
- "((statefulElement_wp/*) <statefulElementInContext_wp|of,in> (statefulElement_wp/*))",
41279
+ "((statefulElement_wp/*)? <statefulElementInContext_wp|of,in> (statefulElement_wp/*))",
41322
41280
  "((paragraph_wp/*) [paragraphComparisonVerb_wp] (word_wp/*))"
41323
41281
  ],
41324
41282
  "associations": {
@@ -41411,6 +41369,9 @@
41411
41369
  "parents": [
41412
41370
  "preposition"
41413
41371
  ],
41372
+ "optional": {
41373
+ "-1": "{ ...operator, invisible: true }"
41374
+ },
41414
41375
  "bridge": "{ ...before[0], context: append(before[0].context, [after[0]]), generate: [before[0], operator, after[0]] }"
41415
41376
  },
41416
41377
  {
@@ -41529,10 +41490,10 @@
41529
41490
  ],
41530
41491
  "semantics": [
41531
41492
  {
41532
- "where": "/home/dev/code/theprogrammablemind/kms/common/wp.js:328"
41493
+ "where": "/home/dev/code/theprogrammablemind/kms/common/wp.js:332"
41533
41494
  },
41534
41495
  {
41535
- "where": "/home/dev/code/theprogrammablemind/kms/common/wp.js:337"
41496
+ "where": "/home/dev/code/theprogrammablemind/kms/common/wp.js:341"
41536
41497
  }
41537
41498
  ],
41538
41499
  "priorities": [
@@ -41600,6 +41561,31 @@
41600
41561
  2
41601
41562
  ]
41602
41563
  },
41564
+ {
41565
+ "context": [
41566
+ [
41567
+ "statefulElementInContext_wp",
41568
+ 0
41569
+ ],
41570
+ [
41571
+ "word_wp",
41572
+ 1
41573
+ ],
41574
+ [
41575
+ "wordComparisonWithVerb_wp",
41576
+ 0
41577
+ ],
41578
+ [
41579
+ "comparisonWith_wp",
41580
+ 1
41581
+ ]
41582
+ ],
41583
+ "ordered": true,
41584
+ "choose": [
41585
+ 2,
41586
+ 3
41587
+ ]
41588
+ },
41603
41589
  {
41604
41590
  "context": [
41605
41591
  [
@@ -41919,10 +41905,6 @@
41919
41905
  "underlined_wp",
41920
41906
  0
41921
41907
  ],
41922
- [
41923
- "unknown",
41924
- 0
41925
- ],
41926
41908
  [
41927
41909
  "unknown",
41928
41910
  1
@@ -41930,27 +41912,25 @@
41930
41912
  ],
41931
41913
  [
41932
41914
  [
41933
- "capitalized_wp",
41934
- 0
41935
- ],
41936
- [
41937
- "comma",
41915
+ "character_wp",
41938
41916
  0
41939
41917
  ],
41940
41918
  [
41941
- "is",
41919
+ "means",
41942
41920
  0
41943
41921
  ],
41944
41922
  [
41945
- "italicized_wp",
41923
+ "unknown",
41946
41924
  0
41947
- ],
41925
+ ]
41926
+ ],
41927
+ [
41948
41928
  [
41949
- "list",
41929
+ "character_wp",
41950
41930
  0
41951
41931
  ],
41952
41932
  [
41953
- "underlined_wp",
41933
+ "means",
41954
41934
  0
41955
41935
  ],
41956
41936
  [
@@ -41960,25 +41940,23 @@
41960
41940
  ],
41961
41941
  [
41962
41942
  [
41963
- "character_wp",
41943
+ "comma",
41964
41944
  0
41965
41945
  ],
41966
41946
  [
41967
- "means",
41947
+ "is",
41968
41948
  0
41969
41949
  ],
41970
41950
  [
41971
- "unknown",
41951
+ "italicized_wp",
41972
41952
  0
41973
- ]
41974
- ],
41975
- [
41953
+ ],
41976
41954
  [
41977
- "character_wp",
41955
+ "list",
41978
41956
  0
41979
41957
  ],
41980
41958
  [
41981
- "means",
41959
+ "underlined_wp",
41982
41960
  0
41983
41961
  ],
41984
41962
  [
@@ -41995,21 +41973,13 @@
41995
41973
  "is",
41996
41974
  0
41997
41975
  ],
41998
- [
41999
- "italicized_wp",
42000
- 0
42001
- ],
42002
41976
  [
42003
41977
  "list",
42004
41978
  0
42005
41979
  ],
42006
- [
42007
- "underlined_wp",
42008
- 0
42009
- ],
42010
41980
  [
42011
41981
  "unknown",
42012
- 1
41982
+ 0
42013
41983
  ]
42014
41984
  ],
42015
41985
  [
@@ -42028,6 +41998,10 @@
42028
41998
  [
42029
41999
  "unknown",
42030
42000
  0
42001
+ ],
42002
+ [
42003
+ "unknown",
42004
+ 1
42031
42005
  ]
42032
42006
  ],
42033
42007
  [
@@ -42272,36 +42246,6 @@
42272
42246
  1
42273
42247
  ]
42274
42248
  ],
42275
- [
42276
- [
42277
- "countable",
42278
- 0
42279
- ],
42280
- [
42281
- "distributable",
42282
- 0
42283
- ],
42284
- [
42285
- "is",
42286
- 0
42287
- ],
42288
- [
42289
- "list",
42290
- 0
42291
- ],
42292
- [
42293
- "orderable",
42294
- 0
42295
- ],
42296
- [
42297
- "unknown",
42298
- 0
42299
- ],
42300
- [
42301
- "unknown",
42302
- 1
42303
- ]
42304
- ],
42305
42249
  [
42306
42250
  [
42307
42251
  "countable",
@@ -42666,34 +42610,6 @@
42666
42610
  1
42667
42611
  ]
42668
42612
  ],
42669
- [
42670
- [
42671
- "is",
42672
- 0
42673
- ],
42674
- [
42675
- "list",
42676
- 1
42677
- ],
42678
- [
42679
- "unknown",
42680
- 1
42681
- ]
42682
- ],
42683
- [
42684
- [
42685
- "is",
42686
- 0
42687
- ],
42688
- [
42689
- "list",
42690
- 1
42691
- ],
42692
- [
42693
- "unknown",
42694
- 1
42695
- ]
42696
- ],
42697
42613
  [
42698
42614
  [
42699
42615
  "is",
package/common/wp.js CHANGED
@@ -24,14 +24,16 @@ const instance = require('./wp.instance.json')
24
24
  bold the first letter of every word that starts with t
25
25
  underline the bolded words in the second paragraph
26
26
  bold the words that start with t in the second paragraph
27
+ bold the first letter of the words that start with t in the second paragraph
27
28
 
28
29
  current
29
30
 
30
- bold the first letter of the words that start with t in the third paragraph
31
+ in the second paragraph bold the first word
31
32
 
32
33
  todo
33
34
 
34
- in the third paragraph bold the first letter of the words that start with t
35
+ in the second paragraph bold the first letter of the words that start with t
36
+ in the second paragraph for the words that start with t bold the first letter
35
37
  underline the bolded paragraphs
36
38
  bold the paragraph that contains three bolded words
37
39
  capitalize the first letter of the words that start with t
@@ -255,7 +257,35 @@ template = {
255
257
  optional: {
256
258
  '-1': "{ ...operator, invisible: true }",
257
259
  },
258
- bridge: "{ ...before[0], context: append(before[0].context, [after[0]]), generate: [before[0], operator, after[0]] }",
260
+ bridge: "{ ...next(before[0]), context: append(before[0].context, [after[0]]), generate: [before[0], operator, after[0]] }",
261
+ semantic: (args) => {
262
+ const { context, contexts } = args
263
+ for (let i = context.index + 1; i < contexts.length; ++i) {
264
+ if (contexts[i].marker == 'applyStyle_wp') {
265
+ debugger
266
+ debugger
267
+ const element = contexts[i].element
268
+ if (!element.context) {
269
+ element.context = []
270
+ }
271
+ element.context = element.context.concat(context.context)
272
+ }
273
+ }
274
+ console.log(JSON.stringify(Object.keys(args)))
275
+ },
276
+ },
277
+ {
278
+ id: 'applyStyle_wp',
279
+ parents: ['verb'],
280
+ convolution: true,
281
+ bridge: "{ ...next(operator), element: after[0], state: before[0], operator: operator, generate: ['state', 'element'] }",
282
+ localHierarchy: [
283
+ ['thisitthat', 'statefulElement_wp'],
284
+ ['everything', 'statefulElement_wp'],
285
+ ],
286
+ semantic: (args) => {
287
+ changeState({...args, element: args.context.element, state: args.context.state})
288
+ }
259
289
  },
260
290
  {
261
291
  id: 'modifiedByStyle_wp',
@@ -297,19 +327,6 @@ template = {
297
327
  },
298
328
  bridge: "{ ...next(operator), operator: operator, letters: after[1], generate: ['operator', 'letters'] }",
299
329
  },
300
- {
301
- id: 'applyStyle_wp',
302
- parents: ['verb'],
303
- convolution: true,
304
- bridge: "{ ...next(operator), element: after[0], state: before[0], operator: operator, generate: ['state', 'element'] }",
305
- localHierarchy: [
306
- ['thisitthat', 'statefulElement_wp'],
307
- ['everything', 'statefulElement_wp'],
308
- ],
309
- semantic: (args) => {
310
- changeState({...args, element: args.context.element, state: args.context.state})
311
- }
312
- },
313
330
  {
314
331
  id: 'changeState_wp',
315
332
  parents: ['verb'],