ekms 8.9.0-beta.13 → 8.9.0-beta.15
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/animals.instance.json +65 -0
- package/common/articles.js +4 -0
- package/common/colors.instance.json +70 -0
- package/common/comparable.instance.json +15 -0
- package/common/crew.instance.json +130 -0
- package/common/dialogues.js +7 -11
- package/common/dimension.instance.json +5 -0
- package/common/edible.instance.json +160 -56
- package/common/emotions.instance.json +5 -60
- package/common/fastfood.instance.json +724 -212
- package/common/formulas.instance.json +5 -0
- package/common/kirk.instance.json +5 -0
- package/common/length.instance.json +75 -0
- package/common/math.instance.json +5 -0
- package/common/ordering.instance.json +10 -0
- package/common/people.instance.json +40 -36
- package/common/pipboy.instance.json +85 -0
- package/common/pokemon.instance.json +65 -0
- package/common/pressure.instance.json +20 -0
- package/common/properties.instance.json +5 -0
- package/common/reports.instance.json +11 -1
- package/common/spock.instance.json +5 -0
- package/common/temperature.instance.json +20 -52
- package/common/ui.instance.json +5 -0
- package/common/weight.instance.json +60 -0
- package/common/wp.instance.json +253 -22
- package/common/wp.js +69 -19
- package/common/wp.test.json +4846 -161
- package/package.json +2 -2
package/common/wp.instance.json
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
"words are countable and statefulElements",
|
5
5
|
"characters are countable",
|
6
6
|
"paragraphs are countable",
|
7
|
-
"bold, italic and underlined are styles",
|
7
|
+
"bold, italic, code and underlined are styles",
|
8
8
|
"resetIdSuffix",
|
9
9
|
{
|
10
10
|
"operators": [
|
@@ -20,10 +20,14 @@
|
|
20
20
|
"localHierarchy": [
|
21
21
|
[
|
22
22
|
"thisitthat",
|
23
|
-
"
|
23
|
+
"statefulElement_wp"
|
24
|
+
],
|
25
|
+
[
|
26
|
+
"everything",
|
27
|
+
"statefulElement_wp"
|
24
28
|
]
|
25
29
|
],
|
26
|
-
"semantic": "({api, context}) => {\n const unit = context.element.marker\n const scope = context.element.quantity.quantity\n const
|
30
|
+
"semantic": "({api, isA, context, toArray}) => {\n const unit = root(context.element.marker)\n const scope = context.element.quantity.quantity\n const update = { unit, scope }\n setUpdate(isA, update, toArray(context.state))\n api.changeState(update)\n }"
|
27
31
|
},
|
28
32
|
{
|
29
33
|
"id": "stateValue_wp",
|
@@ -33,6 +37,16 @@
|
|
33
37
|
]
|
34
38
|
}
|
35
39
|
],
|
40
|
+
"semantics": [
|
41
|
+
{
|
42
|
+
"match": "({context, isA}) => isA(context, 'style_wp') && !context.same && !context.isResponse && !context.evaluate",
|
43
|
+
"apply": "({context, api, isA, toArray}) => {\n const update = { scope: 'selection' }\n setUpdate(isA, update, toArray(context))\n api.changeState(update)\n }"
|
44
|
+
},
|
45
|
+
{
|
46
|
+
"match": "({context, isA}) => isA(context, 'statefulElement_wp') && !context.same && !context.isResponse && !context.evaluate",
|
47
|
+
"apply": "({context, api, isA, toArray}) => {\n const unit = root(context.marker)\n let scope\n if (context.quantity) {\n scope = context.quantity.quantity\n }\n // TODO set default scope for \"every word bold underlined etc\"\n }"
|
48
|
+
}
|
49
|
+
],
|
36
50
|
"priorities": [
|
37
51
|
{
|
38
52
|
"context": [
|
@@ -1390,6 +1404,11 @@
|
|
1390
1404
|
"theAble",
|
1391
1405
|
false
|
1392
1406
|
],
|
1407
|
+
[
|
1408
|
+
"negatable",
|
1409
|
+
"queryable",
|
1410
|
+
false
|
1411
|
+
],
|
1393
1412
|
[
|
1394
1413
|
"noun",
|
1395
1414
|
"theAble",
|
@@ -3619,6 +3638,11 @@
|
|
3619
3638
|
"theAble",
|
3620
3639
|
false
|
3621
3640
|
],
|
3641
|
+
[
|
3642
|
+
"negatable",
|
3643
|
+
"queryable",
|
3644
|
+
false
|
3645
|
+
],
|
3622
3646
|
[
|
3623
3647
|
"noun",
|
3624
3648
|
"theAble",
|
@@ -6061,6 +6085,11 @@
|
|
6061
6085
|
"theAble",
|
6062
6086
|
false
|
6063
6087
|
],
|
6088
|
+
[
|
6089
|
+
"negatable",
|
6090
|
+
"queryable",
|
6091
|
+
false
|
6092
|
+
],
|
6064
6093
|
[
|
6065
6094
|
"noun",
|
6066
6095
|
"theAble",
|
@@ -8482,6 +8511,11 @@
|
|
8482
8511
|
"theAble",
|
8483
8512
|
false
|
8484
8513
|
],
|
8514
|
+
[
|
8515
|
+
"negatable",
|
8516
|
+
"queryable",
|
8517
|
+
false
|
8518
|
+
],
|
8485
8519
|
[
|
8486
8520
|
"noun",
|
8487
8521
|
"theAble",
|
@@ -10903,6 +10937,11 @@
|
|
10903
10937
|
"theAble",
|
10904
10938
|
false
|
10905
10939
|
],
|
10940
|
+
[
|
10941
|
+
"negatable",
|
10942
|
+
"queryable",
|
10943
|
+
false
|
10944
|
+
],
|
10906
10945
|
[
|
10907
10946
|
"noun",
|
10908
10947
|
"theAble",
|
@@ -11822,6 +11861,10 @@
|
|
11822
11861
|
0
|
11823
11862
|
],
|
11824
11863
|
"ops": [
|
11864
|
+
[
|
11865
|
+
"comma",
|
11866
|
+
0
|
11867
|
+
],
|
11825
11868
|
[
|
11826
11869
|
"comma",
|
11827
11870
|
0
|
@@ -11846,6 +11889,10 @@
|
|
11846
11889
|
"unknown",
|
11847
11890
|
0
|
11848
11891
|
],
|
11892
|
+
[
|
11893
|
+
"unknown",
|
11894
|
+
0
|
11895
|
+
],
|
11849
11896
|
[
|
11850
11897
|
"unknown",
|
11851
11898
|
0
|
@@ -11859,6 +11906,10 @@
|
|
11859
11906
|
0
|
11860
11907
|
],
|
11861
11908
|
"ops": [
|
11909
|
+
[
|
11910
|
+
"comma",
|
11911
|
+
0
|
11912
|
+
],
|
11862
11913
|
[
|
11863
11914
|
"comma",
|
11864
11915
|
0
|
@@ -11879,6 +11930,10 @@
|
|
11879
11930
|
"unknown",
|
11880
11931
|
0
|
11881
11932
|
],
|
11933
|
+
[
|
11934
|
+
"unknown",
|
11935
|
+
0
|
11936
|
+
],
|
11882
11937
|
[
|
11883
11938
|
"unknown",
|
11884
11939
|
0
|
@@ -11892,6 +11947,10 @@
|
|
11892
11947
|
0
|
11893
11948
|
],
|
11894
11949
|
"ops": [
|
11950
|
+
[
|
11951
|
+
"comma",
|
11952
|
+
0
|
11953
|
+
],
|
11895
11954
|
[
|
11896
11955
|
"comma",
|
11897
11956
|
0
|
@@ -11908,6 +11967,10 @@
|
|
11908
11967
|
"unknown",
|
11909
11968
|
0
|
11910
11969
|
],
|
11970
|
+
[
|
11971
|
+
"unknown",
|
11972
|
+
0
|
11973
|
+
],
|
11911
11974
|
[
|
11912
11975
|
"unknown",
|
11913
11976
|
0
|
@@ -11921,6 +11984,10 @@
|
|
11921
11984
|
0
|
11922
11985
|
],
|
11923
11986
|
"ops": [
|
11987
|
+
[
|
11988
|
+
"comma",
|
11989
|
+
0
|
11990
|
+
],
|
11924
11991
|
[
|
11925
11992
|
"comma",
|
11926
11993
|
0
|
@@ -11933,6 +12000,10 @@
|
|
11933
12000
|
"list",
|
11934
12001
|
0
|
11935
12002
|
],
|
12003
|
+
[
|
12004
|
+
"unknown",
|
12005
|
+
0
|
12006
|
+
],
|
11936
12007
|
[
|
11937
12008
|
"unknown",
|
11938
12009
|
0
|
@@ -11942,10 +12013,14 @@
|
|
11942
12013
|
},
|
11943
12014
|
{
|
11944
12015
|
"op": [
|
11945
|
-
"
|
12016
|
+
"unknown",
|
11946
12017
|
0
|
11947
12018
|
],
|
11948
12019
|
"ops": [
|
12020
|
+
[
|
12021
|
+
"comma",
|
12022
|
+
0
|
12023
|
+
],
|
11949
12024
|
[
|
11950
12025
|
"comma",
|
11951
12026
|
0
|
@@ -11957,16 +12032,24 @@
|
|
11957
12032
|
[
|
11958
12033
|
"list",
|
11959
12034
|
0
|
12035
|
+
],
|
12036
|
+
[
|
12037
|
+
"unknown",
|
12038
|
+
0
|
11960
12039
|
]
|
11961
12040
|
],
|
11962
12041
|
"counter": 5
|
11963
12042
|
},
|
11964
12043
|
{
|
11965
12044
|
"op": [
|
11966
|
-
"
|
12045
|
+
"list",
|
11967
12046
|
0
|
11968
12047
|
],
|
11969
12048
|
"ops": [
|
12049
|
+
[
|
12050
|
+
"comma",
|
12051
|
+
0
|
12052
|
+
],
|
11970
12053
|
[
|
11971
12054
|
"comma",
|
11972
12055
|
0
|
@@ -11974,10 +12057,52 @@
|
|
11974
12057
|
[
|
11975
12058
|
"is",
|
11976
12059
|
0
|
12060
|
+
],
|
12061
|
+
[
|
12062
|
+
"list",
|
12063
|
+
0
|
11977
12064
|
]
|
11978
12065
|
],
|
11979
12066
|
"counter": 6
|
11980
12067
|
},
|
12068
|
+
{
|
12069
|
+
"op": [
|
12070
|
+
"comma",
|
12071
|
+
0
|
12072
|
+
],
|
12073
|
+
"ops": [
|
12074
|
+
[
|
12075
|
+
"comma",
|
12076
|
+
0
|
12077
|
+
],
|
12078
|
+
[
|
12079
|
+
"comma",
|
12080
|
+
0
|
12081
|
+
],
|
12082
|
+
[
|
12083
|
+
"is",
|
12084
|
+
0
|
12085
|
+
]
|
12086
|
+
],
|
12087
|
+
"counter": 7
|
12088
|
+
},
|
12089
|
+
{
|
12090
|
+
"op": [
|
12091
|
+
"comma",
|
12092
|
+
0
|
12093
|
+
],
|
12094
|
+
"ops": [
|
12095
|
+
[
|
12096
|
+
"comma",
|
12097
|
+
0
|
12098
|
+
],
|
12099
|
+
[
|
12100
|
+
"is",
|
12101
|
+
0
|
12102
|
+
]
|
12103
|
+
],
|
12104
|
+
"counter": 8
|
12105
|
+
},
|
11981
12106
|
{
|
11982
12107
|
"op": [
|
11983
12108
|
"list",
|
@@ -11993,7 +12118,24 @@
|
|
11993
12118
|
1
|
11994
12119
|
]
|
11995
12120
|
],
|
11996
|
-
"counter":
|
12121
|
+
"counter": 9
|
12122
|
+
},
|
12123
|
+
{
|
12124
|
+
"op": [
|
12125
|
+
"list",
|
12126
|
+
1
|
12127
|
+
],
|
12128
|
+
"ops": [
|
12129
|
+
[
|
12130
|
+
"is",
|
12131
|
+
0
|
12132
|
+
],
|
12133
|
+
[
|
12134
|
+
"list",
|
12135
|
+
1
|
12136
|
+
]
|
12137
|
+
],
|
12138
|
+
"counter": 10
|
11997
12139
|
},
|
11998
12140
|
{
|
11999
12141
|
"op": [
|
@@ -12006,7 +12148,7 @@
|
|
12006
12148
|
0
|
12007
12149
|
]
|
12008
12150
|
],
|
12009
|
-
"counter":
|
12151
|
+
"counter": 11
|
12010
12152
|
},
|
12011
12153
|
{
|
12012
12154
|
"op": [
|
@@ -12019,7 +12161,7 @@
|
|
12019
12161
|
1
|
12020
12162
|
]
|
12021
12163
|
],
|
12022
|
-
"counter":
|
12164
|
+
"counter": 12
|
12023
12165
|
}
|
12024
12166
|
]
|
12025
12167
|
},
|
@@ -12027,22 +12169,22 @@
|
|
12027
12169
|
"contexts": [
|
12028
12170
|
{
|
12029
12171
|
"number": "many",
|
12030
|
-
"text": "bold, italic and underlined are styles",
|
12172
|
+
"text": "bold, italic, code and underlined are styles",
|
12031
12173
|
"marker": "is",
|
12032
12174
|
"word": "are",
|
12033
12175
|
"range": {
|
12034
12176
|
"start": 0,
|
12035
|
-
"end":
|
12177
|
+
"end": 43
|
12036
12178
|
},
|
12037
12179
|
"one": {
|
12038
12180
|
"number": "many",
|
12039
12181
|
"marker": "list",
|
12040
12182
|
"default": true,
|
12041
12183
|
"word": "and",
|
12042
|
-
"text": "bold, italic and underlined",
|
12184
|
+
"text": "bold, italic, code and underlined",
|
12043
12185
|
"range": {
|
12044
12186
|
"start": 0,
|
12045
|
-
"end":
|
12187
|
+
"end": 43
|
12046
12188
|
},
|
12047
12189
|
"types": [
|
12048
12190
|
"list",
|
@@ -12087,12 +12229,44 @@
|
|
12087
12229
|
{
|
12088
12230
|
"value": "italic",
|
12089
12231
|
"unknown": true,
|
12090
|
-
"text": "italic",
|
12232
|
+
"text": "italic,",
|
12091
12233
|
"marker": "unknown",
|
12092
12234
|
"word": "italic",
|
12093
12235
|
"range": {
|
12094
12236
|
"start": 6,
|
12095
|
-
"end":
|
12237
|
+
"end": 12
|
12238
|
+
},
|
12239
|
+
"dead": true,
|
12240
|
+
"decorators": {
|
12241
|
+
"after": {
|
12242
|
+
"word": ",",
|
12243
|
+
"value": ",",
|
12244
|
+
"depth": "+",
|
12245
|
+
"text": ",",
|
12246
|
+
"marker": "comma",
|
12247
|
+
"range": {
|
12248
|
+
"start": 12,
|
12249
|
+
"end": 12
|
12250
|
+
},
|
12251
|
+
"level": 0
|
12252
|
+
}
|
12253
|
+
},
|
12254
|
+
"no_convolutions": true,
|
12255
|
+
"types": [
|
12256
|
+
"queryable",
|
12257
|
+
"unknown"
|
12258
|
+
],
|
12259
|
+
"level": 1
|
12260
|
+
},
|
12261
|
+
{
|
12262
|
+
"value": "code",
|
12263
|
+
"unknown": true,
|
12264
|
+
"text": "code",
|
12265
|
+
"marker": "unknown",
|
12266
|
+
"word": "code",
|
12267
|
+
"range": {
|
12268
|
+
"start": 14,
|
12269
|
+
"end": 17
|
12096
12270
|
},
|
12097
12271
|
"types": [
|
12098
12272
|
"queryable",
|
@@ -12108,8 +12282,8 @@
|
|
12108
12282
|
"marker": "unknown",
|
12109
12283
|
"word": "underlined",
|
12110
12284
|
"range": {
|
12111
|
-
"start":
|
12112
|
-
"end":
|
12285
|
+
"start": 23,
|
12286
|
+
"end": 32
|
12113
12287
|
},
|
12114
12288
|
"types": [
|
12115
12289
|
"queryable",
|
@@ -12128,8 +12302,8 @@
|
|
12128
12302
|
"marker": "unknown",
|
12129
12303
|
"word": "styles",
|
12130
12304
|
"range": {
|
12131
|
-
"start":
|
12132
|
-
"end":
|
12305
|
+
"start": 38,
|
12306
|
+
"end": 43
|
12133
12307
|
},
|
12134
12308
|
"dead": true,
|
12135
12309
|
"types": [
|
@@ -12150,7 +12324,7 @@
|
|
12150
12324
|
""
|
12151
12325
|
],
|
12152
12326
|
"paraphrases": [
|
12153
|
-
"bold, italic and underlined are styles"
|
12327
|
+
"bold, italic, code and underlined are styles"
|
12154
12328
|
],
|
12155
12329
|
"paraphrasesParenthesized": [],
|
12156
12330
|
"generatedParenthesized": [],
|
@@ -12250,9 +12424,9 @@
|
|
12250
12424
|
]
|
12251
12425
|
],
|
12252
12426
|
"learned_contextual_priorities": [],
|
12253
|
-
"query": "bold, italic and underlined are styles",
|
12427
|
+
"query": "bold, italic, code and underlined are styles",
|
12254
12428
|
"key": {
|
12255
|
-
"query": "bold, italic and underlined are styles"
|
12429
|
+
"query": "bold, italic, code and underlined are styles"
|
12256
12430
|
}
|
12257
12431
|
},
|
12258
12432
|
{
|
@@ -12792,6 +12966,46 @@
|
|
12792
12966
|
"theAble",
|
12793
12967
|
false
|
12794
12968
|
],
|
12969
|
+
[
|
12970
|
+
"code_wp",
|
12971
|
+
"hierarchyAble",
|
12972
|
+
false
|
12973
|
+
],
|
12974
|
+
[
|
12975
|
+
"code_wp",
|
12976
|
+
"isEdee",
|
12977
|
+
false
|
12978
|
+
],
|
12979
|
+
[
|
12980
|
+
"code_wp",
|
12981
|
+
"isEder",
|
12982
|
+
false
|
12983
|
+
],
|
12984
|
+
[
|
12985
|
+
"code_wp",
|
12986
|
+
"object",
|
12987
|
+
false
|
12988
|
+
],
|
12989
|
+
[
|
12990
|
+
"code_wp",
|
12991
|
+
"property",
|
12992
|
+
false
|
12993
|
+
],
|
12994
|
+
[
|
12995
|
+
"code_wp",
|
12996
|
+
"queryable",
|
12997
|
+
false
|
12998
|
+
],
|
12999
|
+
[
|
13000
|
+
"code_wp",
|
13001
|
+
"style_wp",
|
13002
|
+
false
|
13003
|
+
],
|
13004
|
+
[
|
13005
|
+
"code_wp",
|
13006
|
+
"theAble",
|
13007
|
+
false
|
13008
|
+
],
|
12795
13009
|
[
|
12796
13010
|
"color_colors",
|
12797
13011
|
"concept",
|
@@ -13707,6 +13921,11 @@
|
|
13707
13921
|
"theAble",
|
13708
13922
|
false
|
13709
13923
|
],
|
13924
|
+
[
|
13925
|
+
"negatable",
|
13926
|
+
"queryable",
|
13927
|
+
false
|
13928
|
+
],
|
13710
13929
|
[
|
13711
13930
|
"noun",
|
13712
13931
|
"theAble",
|
@@ -14764,7 +14983,11 @@
|
|
14764
14983
|
"localHierarchy": [
|
14765
14984
|
[
|
14766
14985
|
"thisitthat",
|
14767
|
-
"
|
14986
|
+
"statefulElement_wp"
|
14987
|
+
],
|
14988
|
+
[
|
14989
|
+
"everything",
|
14990
|
+
"statefulElement_wp"
|
14768
14991
|
]
|
14769
14992
|
]
|
14770
14993
|
},
|
@@ -14776,6 +14999,14 @@
|
|
14776
14999
|
]
|
14777
15000
|
}
|
14778
15001
|
],
|
15002
|
+
"semantics": [
|
15003
|
+
{
|
15004
|
+
"where": "/home/dev/code/theprogrammablemind/kms/common/wp.js:111"
|
15005
|
+
},
|
15006
|
+
{
|
15007
|
+
"where": "/home/dev/code/theprogrammablemind/kms/common/wp.js:120"
|
15008
|
+
}
|
15009
|
+
],
|
14779
15010
|
"priorities": [
|
14780
15011
|
{
|
14781
15012
|
"context": [
|
package/common/wp.js
CHANGED
@@ -18,15 +18,49 @@ const instance = require('./wp.instance.json')
|
|
18
18
|
|
19
19
|
|
20
20
|
make every word bold and underlines and blue -> weirdly "bold underlined and blue" works
|
21
|
+
|
22
|
+
make the font ...
|
23
|
+
make the color blue
|
24
|
+
make the color of the first paragraph blue
|
25
|
+
|
26
|
+
4 letter word
|
27
|
+
4 to 6 letter word
|
28
|
+
word with 'a' in it
|
29
|
+
words containing a
|
30
|
+
every 5th word
|
21
31
|
*/
|
22
32
|
|
23
33
|
class API {
|
24
34
|
initialize({ objects }) {
|
25
35
|
this._objects = objects
|
36
|
+
this._objects.changeState = []
|
26
37
|
}
|
27
38
|
|
28
39
|
changeState(value) {
|
29
|
-
this._objects.changeState
|
40
|
+
this._objects.changeState.push(value)
|
41
|
+
}
|
42
|
+
}
|
43
|
+
|
44
|
+
const root = (id) => {
|
45
|
+
return id.split('_')[0]
|
46
|
+
}
|
47
|
+
|
48
|
+
const setUpdate = (isA, update, states) => {
|
49
|
+
let color;
|
50
|
+
const styles = []
|
51
|
+
for (const state of states) {
|
52
|
+
if (isA(state, 'style_wp')) {
|
53
|
+
if (!update.styles) {
|
54
|
+
update.styles = []
|
55
|
+
}
|
56
|
+
let style = root(state.value)
|
57
|
+
if (style == 'underlined') {
|
58
|
+
style = 'underline'
|
59
|
+
}
|
60
|
+
update.styles.push(style)
|
61
|
+
} else {
|
62
|
+
update.color = root(state.value)
|
63
|
+
}
|
30
64
|
}
|
31
65
|
}
|
32
66
|
|
@@ -42,7 +76,8 @@ template = {
|
|
42
76
|
'words are countable and statefulElements',
|
43
77
|
'characters are countable',
|
44
78
|
'paragraphs are countable',
|
45
|
-
'bold, italic and underlined are styles',
|
79
|
+
'bold, italic, code and underlined are styles',
|
80
|
+
// 'styles are negatable',
|
46
81
|
"resetIdSuffix",
|
47
82
|
{
|
48
83
|
operators: [
|
@@ -55,27 +90,19 @@ template = {
|
|
55
90
|
parents: ['verb'],
|
56
91
|
bridge: "{ ...next(operator), element: after[0], state: after[1], operator: operator, generate: ['operator', 'element', 'state'] }",
|
57
92
|
localHierarchy: [
|
58
|
-
['thisitthat', '
|
93
|
+
['thisitthat', 'statefulElement_wp'],
|
94
|
+
['everything', 'statefulElement_wp'],
|
59
95
|
],
|
60
96
|
semantic: ({api, isA, context, toArray}) => {
|
61
|
-
|
62
|
-
|
97
|
+
let unit = root(context.element.marker)
|
98
|
+
let scope
|
99
|
+
if (isA(context.element, 'everything')) {
|
100
|
+
scope = 'all'
|
101
|
+
} else {
|
102
|
+
scope = context.element.quantity.quantity
|
63
103
|
}
|
64
|
-
const unit = root(context.element.marker)
|
65
|
-
const scope = context.element.quantity.quantity
|
66
|
-
let color;
|
67
|
-
const styles = []
|
68
104
|
const update = { unit, scope }
|
69
|
-
|
70
|
-
if (isA(state, 'style_wp')) {
|
71
|
-
if (!update.styles) {
|
72
|
-
update.styles = []
|
73
|
-
}
|
74
|
-
update.styles.push(root(state.value))
|
75
|
-
} else {
|
76
|
-
update.color = root(state.value)
|
77
|
-
}
|
78
|
-
}
|
105
|
+
setUpdate(isA, update, toArray(context.state))
|
79
106
|
api.changeState(update)
|
80
107
|
}
|
81
108
|
},
|
@@ -84,6 +111,29 @@ template = {
|
|
84
111
|
children: ['color_colors', 'style_wp'],
|
85
112
|
},
|
86
113
|
],
|
114
|
+
semantics: [
|
115
|
+
{
|
116
|
+
where: where(),
|
117
|
+
match: ({context, isA}) => isA(context, 'style_wp') && !context.same && !context.isResponse && !context.evaluate,
|
118
|
+
apply: ({context, api, isA, toArray}) => {
|
119
|
+
const update = { scope: 'selection' }
|
120
|
+
setUpdate(isA, update, toArray(context))
|
121
|
+
api.changeState(update)
|
122
|
+
}
|
123
|
+
},
|
124
|
+
{
|
125
|
+
where: where(),
|
126
|
+
match: ({context, isA}) => isA(context, 'statefulElement_wp') && !context.same && !context.isResponse && !context.evaluate,
|
127
|
+
apply: ({context, api, isA, toArray}) => {
|
128
|
+
const unit = root(context.marker)
|
129
|
+
let scope
|
130
|
+
if (context.quantity) {
|
131
|
+
scope = context.quantity.quantity
|
132
|
+
}
|
133
|
+
// TODO set default scope for "every word bold underlined etc"
|
134
|
+
}
|
135
|
+
},
|
136
|
+
],
|
87
137
|
priorities: [
|
88
138
|
{ "context": [['changeState_wp',0], ['statefulElement_wp', 0], ['list', 0]], ordered: true, choose: [0] },
|
89
139
|
],
|