tpmkms_4wp 8.0.0-beta.0 → 8.0.0-beta.2
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 +103 -113
- package/common/characters.js +0 -1
- package/common/colors.instance.json +22140 -0
- package/common/colors.js +71 -0
- package/common/colors.test.json +4860 -0
- package/common/concept.js +2 -2
- package/common/crew.instance.json +4142 -3545
- package/common/crew.js +4 -2
- package/common/dialogues.js +34 -7
- package/common/dialogues.test.json +1053 -33
- package/common/dimension.instance.json +20 -30
- package/common/dimension.test.json +289 -312
- package/common/edible.instance.json +216 -156
- package/common/emotions.instance.json +64 -0
- package/common/fastfood.instance.json +1011 -386
- package/common/fastfood.js +1 -1
- package/common/fastfood.test.json +7941 -3647
- package/common/formulas.instance.json +4 -0
- package/common/formulas.test.json +1027 -955
- package/common/help.test.json +14 -10
- package/common/helpers/concept.js +29 -9
- package/common/helpers/dialogues.js +17 -1
- package/common/helpers/formulas.js +0 -14
- package/common/helpers/meta.js +0 -1
- package/common/helpers/properties.js +6 -13
- package/common/kirk.instance.json +4 -0
- package/common/length.instance.json +93 -63
- package/common/math.instance.json +26 -47
- package/common/meta.js +0 -2
- package/common/ordering.instance.json +76 -0
- package/common/people.instance.json +35 -60
- package/common/pipboy.instance.json +215 -229
- package/common/pokemon.instance.json +131 -82
- package/common/pressure.instance.json +38 -48
- package/common/properties.instance.json +4 -0
- package/common/properties.js +7 -7
- package/common/properties.test.json +17605 -4030
- package/common/punctuation.js +8 -0
- package/common/punctuation.test.json +233 -5
- package/common/reports.instance.json +12 -4
- package/common/reports.js +0 -2
- package/common/sizeable.js +7 -2
- package/common/spock.instance.json +4 -0
- package/common/stm.js +16 -5
- package/common/temperature.instance.json +45 -59
- package/common/testing.js +0 -1
- package/common/tokenize.js +2 -1
- package/common/tokenize.test.json +86 -1
- package/common/ui.instance.json +4 -0
- package/common/ui.js +0 -1
- package/common/weight.instance.json +62 -11
- package/common/weight.test.json +242 -238
- package/main.js +2 -0
- package/package.json +6 -2
package/common/colors.js
ADDED
@@ -0,0 +1,71 @@
|
|
1
|
+
const { Config, knowledgeModule, where } = require('./runtime').theprogrammablemind
|
2
|
+
const { defaultContextCheck } = require('./helpers')
|
3
|
+
const colors_tests = require('./colors.test.json')
|
4
|
+
const colors_instance = require('./colors.instance.json')
|
5
|
+
const hierarchy = require('./hierarchy')
|
6
|
+
|
7
|
+
const template = {
|
8
|
+
configs: [
|
9
|
+
"setidsuffix _colors",
|
10
|
+
"dark and light are brightness",
|
11
|
+
"red, pink, orange, yellow, purple, green, blue, brown, white and gray are colors",
|
12
|
+
"crimson is a red",
|
13
|
+
"gold and khaki is a yellow",
|
14
|
+
"lavender, violet, magenta and indigo is a purple",
|
15
|
+
"lime, chartruese, olive and teal are a green",
|
16
|
+
"aqua, cyan, aquamarine, turquoise and navy are a blue",
|
17
|
+
"tan, sienna and maroon are a brown",
|
18
|
+
"snow, azure, beige and ivory are a white",
|
19
|
+
"silver and black are a gray",
|
20
|
+
"brightness modifies colors",
|
21
|
+
"hex modifies color",
|
22
|
+
// '"hex color" is a color',
|
23
|
+
{
|
24
|
+
/*
|
25
|
+
operators: [
|
26
|
+
"([hexColor|])",
|
27
|
+
],
|
28
|
+
bridges: [
|
29
|
+
{
|
30
|
+
id: 'hexColor',
|
31
|
+
words: ['hex color'],
|
32
|
+
},
|
33
|
+
],
|
34
|
+
*/
|
35
|
+
words: {
|
36
|
+
patterns: [
|
37
|
+
{ "pattern": ["#", { type: 'hexDigit' }, { repeat: true, exactly: 6 }], defs: [{id: "hexColor", uuid: '1', initial: "{ value: text, instance: true }" }]},
|
38
|
+
],
|
39
|
+
hierarchy: [
|
40
|
+
..."0123456789abcdefABCDEF".split("").map((digit) => { return { child: digit, parent: 'hexDigit' } })
|
41
|
+
],
|
42
|
+
}
|
43
|
+
},
|
44
|
+
// "hex color is a color",
|
45
|
+
"resetIdSuffix",
|
46
|
+
],
|
47
|
+
}
|
48
|
+
|
49
|
+
const createConfig = () => {
|
50
|
+
const config = new Config({ name: 'colors' }, module)
|
51
|
+
config.add(hierarchy())
|
52
|
+
return config
|
53
|
+
}
|
54
|
+
|
55
|
+
knowledgeModule( {
|
56
|
+
module,
|
57
|
+
createConfig,
|
58
|
+
description: 'talking about colors',
|
59
|
+
test: {
|
60
|
+
name: './colors.test.json',
|
61
|
+
contents: colors_tests,
|
62
|
+
checks: {
|
63
|
+
context: defaultContextCheck,
|
64
|
+
},
|
65
|
+
},
|
66
|
+
template: {
|
67
|
+
template,
|
68
|
+
instance: colors_instance,
|
69
|
+
},
|
70
|
+
|
71
|
+
})
|