emissions-api-sdk 1.0.5 → 1.0.6
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/README.md +19 -26
- package/dist/Constants.js +4 -29
- package/dist/api/Calculation.js +0 -63
- package/dist/api/EconomicActivity.js +0 -60
- package/dist/api/Factor.js +0 -82
- package/dist/api/Fugitive.js +0 -63
- package/dist/api/Location.js +0 -61
- package/dist/api/Metadata.js +155 -0
- package/dist/api/Mobile.js +0 -64
- package/dist/api/RealEstate.js +0 -61
- package/dist/api/Stationary.js +0 -63
- package/dist/api/TransportationAndDistribution.js +0 -63
- package/dist/coverage/clover.xml +132 -239
- package/dist/coverage/coverage-final.json +14 -13
- package/dist/coverage/lcov-report/index.html +20 -20
- package/dist/coverage/lcov-report/src/Client.ts.html +28 -28
- package/dist/coverage/lcov-report/src/Constants.ts.html +29 -110
- package/dist/coverage/lcov-report/src/api/Calculation.ts.html +7 -217
- package/dist/coverage/lcov-report/src/api/EconomicActivity.ts.html +7 -214
- package/dist/coverage/lcov-report/src/api/Factor.ts.html +6 -285
- package/dist/coverage/lcov-report/src/api/FactorSets.ts.html +1 -1
- package/dist/coverage/lcov-report/src/api/Fugitive.ts.html +7 -223
- package/dist/coverage/lcov-report/src/api/Location.ts.html +6 -222
- package/dist/coverage/lcov-report/src/api/Metadata.ts.html +604 -0
- package/dist/coverage/lcov-report/src/api/Mobile.ts.html +6 -231
- package/dist/coverage/lcov-report/src/api/RealEstate.ts.html +6 -219
- package/dist/coverage/lcov-report/src/api/Stationary.ts.html +6 -225
- package/dist/coverage/lcov-report/src/api/TransportationAndDistribution.ts.html +7 -223
- package/dist/coverage/lcov-report/src/api/Usage.ts.html +1 -1
- package/dist/coverage/lcov-report/src/api/index.html +48 -33
- package/dist/coverage/lcov-report/src/index.html +7 -7
- package/dist/coverage/lcov-report/src/request.ts.html +5 -5
- package/dist/coverage/lcov-report/src/utils.ts.html +6 -6
- package/dist/coverage/lcov-report/test/index.html +1 -1
- package/dist/coverage/lcov-report/test/mocks/CommonRequest.ts.html +1 -1
- package/dist/coverage/lcov-report/test/mocks/FactorRequest.ts.html +1 -1
- package/dist/coverage/lcov-report/test/mocks/GenericCalculationRequest.ts.html +1 -1
- package/dist/coverage/lcov-report/test/mocks/LocationRequest.ts.html +1 -1
- package/dist/coverage/lcov-report/test/mocks/SearchRequest.ts.html +1 -1
- package/dist/coverage/lcov-report/test/mocks/index.html +1 -1
- package/dist/coverage/lcov-report/test/testUtils.ts.html +1 -1
- package/dist/coverage/lcov.info +221 -354
- package/dist/index.js +2 -1
- package/dist/types/Constants.d.ts +3 -28
- package/dist/types/api/Calculation.d.ts +0 -41
- package/dist/types/api/EconomicActivity.d.ts +0 -38
- package/dist/types/api/Factor.d.ts +0 -52
- package/dist/types/api/Fugitive.d.ts +0 -41
- package/dist/types/api/Location.d.ts +0 -39
- package/dist/types/api/Metadata.d.ts +99 -0
- package/dist/types/api/Mobile.d.ts +0 -42
- package/dist/types/api/RealEstate.d.ts +0 -39
- package/dist/types/api/Stationary.d.ts +0 -41
- package/dist/types/api/TransportationAndDistribution.d.ts +0 -41
- package/dist/types/index.d.ts +1 -0
- package/docs/_sources/reference.rst.txt +14 -50
- package/docs/_static/basic.css +8 -0
- package/docs/_static/pygments.css +146 -164
- package/docs/_static/searchtools.js +5 -8
- package/docs/_static/styles/furo.css +1 -1
- package/docs/_static/styles/furo.css.map +1 -1
- package/docs/authentication.html +28 -19
- package/docs/client.html +28 -19
- package/docs/genindex.html +41 -84
- package/docs/getting_started.html +28 -19
- package/docs/index.html +29 -20
- package/docs/objects.inv +0 -0
- package/docs/reference.html +102 -502
- package/docs/sdk.html +28 -19
- package/docs/search.html +28 -19
- package/docs/searchindex.js +1 -1
- package/docs/troubleshooting.html +28 -19
- package/package.json +5 -3
- package/sphinx-build/source/reference.rst +14 -50
- package/src/Constants.ts +4 -31
- package/src/api/Calculation.ts +1 -72
- package/src/api/EconomicActivity.ts +1 -71
- package/src/api/Factor.ts +1 -94
- package/src/api/Fugitive.ts +1 -74
- package/src/api/Location.ts +1 -73
- package/src/api/Metadata.ts +174 -0
- package/src/api/Mobile.ts +1 -76
- package/src/api/RealEstate.ts +1 -72
- package/src/api/Stationary.ts +1 -74
- package/src/api/TransportationAndDistribution.ts +1 -74
- package/src/index.ts +1 -0
- package/test/apiTest.test.ts +0 -205
- package/test/metadata.test.ts +224 -0
- package/test/request.test.ts +0 -1
- package/sphinx-build/.secrets.baseline +0 -150
|
@@ -31,73 +31,37 @@ API
|
|
|
31
31
|
|
|
32
32
|
.. js:autofunction:: EconomicActivity.calculate
|
|
33
33
|
|
|
34
|
-
Metadata APIs
|
|
35
|
-
===========
|
|
36
|
-
|
|
37
|
-
getTypes
|
|
38
|
-
--------
|
|
39
|
-
|
|
40
|
-
.. js:autofunction:: Factor.getTypes
|
|
41
|
-
|
|
42
|
-
.. js:autofunction:: Calculation.getTypes
|
|
43
34
|
|
|
44
|
-
|
|
35
|
+
Global Metadata API
|
|
36
|
+
====================
|
|
45
37
|
|
|
46
|
-
|
|
38
|
+
The global Metadata API provides a unified way to query metadata across different endpoints without calling endpoint-specific methods.
|
|
47
39
|
|
|
48
|
-
|
|
40
|
+
- **getTypes/postTypes** and **getArea/postArea**: Accept an optional ``endpoint`` parameter to query metadata for specific endpoints
|
|
41
|
+
- **getUnits/postUnits**: Accept an optional ``type`` parameter to query units for specific emission types
|
|
49
42
|
|
|
50
|
-
|
|
43
|
+
**Supported endpoints** (for getTypes/postTypes and getArea/postArea): ``calculation``, ``location``, ``stationary``, ``mobile``, ``fugitive``, ``factor``, ``search``, ``transportation-and-distribution``, ``economic-activity``, ``real-estate``
|
|
51
44
|
|
|
52
|
-
|
|
45
|
+
getTypes
|
|
46
|
+
--------
|
|
53
47
|
|
|
54
|
-
.. js:autofunction::
|
|
48
|
+
.. js:autofunction:: Metadata.getTypes
|
|
55
49
|
|
|
56
|
-
.. js:autofunction::
|
|
50
|
+
.. js:autofunction:: Metadata.postTypes
|
|
57
51
|
|
|
58
52
|
getArea
|
|
59
53
|
-------
|
|
60
54
|
|
|
61
|
-
.. js:autofunction::
|
|
62
|
-
|
|
63
|
-
.. js:autofunction:: Factor.getSearchArea
|
|
64
|
-
|
|
65
|
-
.. js:autofunction:: Calculation.getArea
|
|
66
|
-
|
|
67
|
-
.. js:autofunction:: Location.getArea
|
|
68
|
-
|
|
69
|
-
.. js:autofunction:: Mobile.getArea
|
|
55
|
+
.. js:autofunction:: Metadata.getArea
|
|
70
56
|
|
|
71
|
-
.. js:autofunction::
|
|
72
|
-
|
|
73
|
-
.. js:autofunction:: TransportationAndDistribution.getArea
|
|
74
|
-
|
|
75
|
-
.. js:autofunction:: Fugitive.getArea
|
|
76
|
-
|
|
77
|
-
.. js:autofunction:: RealEstate.getArea
|
|
78
|
-
|
|
79
|
-
.. js:autofunction:: EconomicActivity.getArea
|
|
57
|
+
.. js:autofunction:: Metadata.postArea
|
|
80
58
|
|
|
81
59
|
getUnits
|
|
82
60
|
--------
|
|
83
61
|
|
|
84
|
-
.. js:autofunction::
|
|
85
|
-
|
|
86
|
-
.. js:autofunction:: Calculation.getUnits
|
|
87
|
-
|
|
88
|
-
.. js:autofunction:: Location.getUnits
|
|
89
|
-
|
|
90
|
-
.. js:autofunction:: Mobile.getUnits
|
|
91
|
-
|
|
92
|
-
.. js:autofunction:: Stationary.getUnits
|
|
93
|
-
|
|
94
|
-
.. js:autofunction:: TransportationAndDistribution.getUnits
|
|
95
|
-
|
|
96
|
-
.. js:autofunction:: Fugitive.getUnits
|
|
97
|
-
|
|
98
|
-
.. js:autofunction:: RealEstate.getUnits
|
|
62
|
+
.. js:autofunction:: Metadata.getUnits
|
|
99
63
|
|
|
100
|
-
.. js:autofunction::
|
|
64
|
+
.. js:autofunction:: Metadata.postUnits
|
|
101
65
|
|
|
102
66
|
|
|
103
67
|
Usage API
|
package/docs/_static/basic.css
CHANGED
|
@@ -741,6 +741,14 @@ abbr, acronym {
|
|
|
741
741
|
cursor: help;
|
|
742
742
|
}
|
|
743
743
|
|
|
744
|
+
.translated {
|
|
745
|
+
background-color: rgba(207, 255, 207, 0.2)
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
.untranslated {
|
|
749
|
+
background-color: rgba(255, 207, 207, 0.2)
|
|
750
|
+
}
|
|
751
|
+
|
|
744
752
|
/* -- code displays --------------------------------------------------------- */
|
|
745
753
|
|
|
746
754
|
pre {
|
|
@@ -76,175 +76,157 @@
|
|
|
76
76
|
.highlight .il { color: #7F4707 } /* Literal.Number.Integer.Long */
|
|
77
77
|
@media not print {
|
|
78
78
|
body[data-theme="dark"] .highlight pre { line-height: 125%; }
|
|
79
|
-
body[data-theme="dark"] .highlight td.linenos .normal { color:
|
|
80
|
-
body[data-theme="dark"] .highlight span.linenos { color:
|
|
79
|
+
body[data-theme="dark"] .highlight td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
|
|
80
|
+
body[data-theme="dark"] .highlight span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
|
|
81
81
|
body[data-theme="dark"] .highlight td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
|
|
82
82
|
body[data-theme="dark"] .highlight span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
|
|
83
|
-
body[data-theme="dark"] .highlight .hll { background-color: #
|
|
84
|
-
body[data-theme="dark"] .highlight { background: #
|
|
85
|
-
body[data-theme="dark"] .highlight .c { color: #
|
|
86
|
-
body[data-theme="dark"] .highlight .err { color: #
|
|
87
|
-
body[data-theme="dark"] .highlight .
|
|
88
|
-
body[data-theme="dark"] .highlight .
|
|
89
|
-
body[data-theme="dark"] .highlight .
|
|
90
|
-
body[data-theme="dark"] .highlight .
|
|
91
|
-
body[data-theme="dark"] .highlight .
|
|
92
|
-
body[data-theme="dark"] .highlight .
|
|
93
|
-
body[data-theme="dark"] .highlight .
|
|
94
|
-
body[data-theme="dark"] .highlight .
|
|
95
|
-
body[data-theme="dark"] .highlight .
|
|
96
|
-
body[data-theme="dark"] .highlight .
|
|
97
|
-
body[data-theme="dark"] .highlight .
|
|
98
|
-
body[data-theme="dark"] .highlight .
|
|
99
|
-
body[data-theme="dark"] .highlight .
|
|
100
|
-
body[data-theme="dark"] .highlight .
|
|
101
|
-
body[data-theme="dark"] .highlight .
|
|
102
|
-
body[data-theme="dark"] .highlight .
|
|
103
|
-
body[data-theme="dark"] .highlight .
|
|
104
|
-
body[data-theme="dark"] .highlight .
|
|
105
|
-
body[data-theme="dark"] .highlight .
|
|
106
|
-
body[data-theme="dark"] .highlight .
|
|
107
|
-
body[data-theme="dark"] .highlight .
|
|
108
|
-
body[data-theme="dark"] .highlight .
|
|
109
|
-
body[data-theme="dark"] .highlight .
|
|
110
|
-
body[data-theme="dark"] .highlight .
|
|
111
|
-
body[data-theme="dark"] .highlight .
|
|
112
|
-
body[data-theme="dark"] .highlight .
|
|
113
|
-
body[data-theme="dark"] .highlight .
|
|
114
|
-
body[data-theme="dark"] .highlight .
|
|
115
|
-
body[data-theme="dark"] .highlight .
|
|
116
|
-
body[data-theme="dark"] .highlight .
|
|
117
|
-
body[data-theme="dark"] .highlight .
|
|
118
|
-
body[data-theme="dark"] .highlight .
|
|
119
|
-
body[data-theme="dark"] .highlight .
|
|
120
|
-
body[data-theme="dark"] .highlight .
|
|
121
|
-
body[data-theme="dark"] .highlight .
|
|
122
|
-
body[data-theme="dark"] .highlight .
|
|
123
|
-
body[data-theme="dark"] .highlight .
|
|
124
|
-
body[data-theme="dark"] .highlight .
|
|
125
|
-
body[data-theme="dark"] .highlight .
|
|
126
|
-
body[data-theme="dark"] .highlight .
|
|
127
|
-
body[data-theme="dark"] .highlight .
|
|
128
|
-
body[data-theme="dark"] .highlight .
|
|
129
|
-
body[data-theme="dark"] .highlight .
|
|
130
|
-
body[data-theme="dark"] .highlight .
|
|
131
|
-
body[data-theme="dark"] .highlight .
|
|
132
|
-
body[data-theme="dark"] .highlight .
|
|
133
|
-
body[data-theme="dark"] .highlight .
|
|
134
|
-
body[data-theme="dark"] .highlight .
|
|
135
|
-
body[data-theme="dark"] .highlight .
|
|
136
|
-
body[data-theme="dark"] .highlight .
|
|
137
|
-
body[data-theme="dark"] .highlight .
|
|
138
|
-
body[data-theme="dark"] .highlight .
|
|
139
|
-
body[data-theme="dark"] .highlight .
|
|
140
|
-
body[data-theme="dark"] .highlight .
|
|
141
|
-
body[data-theme="dark"] .highlight .
|
|
142
|
-
body[data-theme="dark"] .highlight .
|
|
143
|
-
body[data-theme="dark"] .highlight .
|
|
144
|
-
body[data-theme="dark"] .highlight .
|
|
145
|
-
body[data-theme="dark"] .highlight .
|
|
146
|
-
body[data-theme="dark"] .highlight .
|
|
147
|
-
body[data-theme="dark"] .highlight .
|
|
148
|
-
body[data-theme="dark"] .highlight .
|
|
149
|
-
body[data-theme="dark"] .highlight .
|
|
150
|
-
body[data-theme="dark"] .highlight .
|
|
151
|
-
body[data-theme="dark"] .highlight .
|
|
152
|
-
body[data-theme="dark"] .highlight .
|
|
153
|
-
body[data-theme="dark"] .highlight .
|
|
154
|
-
body[data-theme="dark"] .highlight .s1 { color: #ED9D13 } /* Literal.String.Single */
|
|
155
|
-
body[data-theme="dark"] .highlight .ss { color: #ED9D13 } /* Literal.String.Symbol */
|
|
156
|
-
body[data-theme="dark"] .highlight .bp { color: #2FBCCD } /* Name.Builtin.Pseudo */
|
|
157
|
-
body[data-theme="dark"] .highlight .fm { color: #71ADFF } /* Name.Function.Magic */
|
|
158
|
-
body[data-theme="dark"] .highlight .vc { color: #40FFFF } /* Name.Variable.Class */
|
|
159
|
-
body[data-theme="dark"] .highlight .vg { color: #40FFFF } /* Name.Variable.Global */
|
|
160
|
-
body[data-theme="dark"] .highlight .vi { color: #40FFFF } /* Name.Variable.Instance */
|
|
161
|
-
body[data-theme="dark"] .highlight .vm { color: #40FFFF } /* Name.Variable.Magic */
|
|
162
|
-
body[data-theme="dark"] .highlight .il { color: #51B2FD } /* Literal.Number.Integer.Long */
|
|
83
|
+
body[data-theme="dark"] .highlight .hll { background-color: #ffd9002e }
|
|
84
|
+
body[data-theme="dark"] .highlight { background: #2b2b2b; color: #F8F8F2 }
|
|
85
|
+
body[data-theme="dark"] .highlight .c { color: #D4D0AB } /* Comment */
|
|
86
|
+
body[data-theme="dark"] .highlight .err { color: #FFA07A } /* Error */
|
|
87
|
+
body[data-theme="dark"] .highlight .k { color: #DCC6E0 } /* Keyword */
|
|
88
|
+
body[data-theme="dark"] .highlight .l { color: #F5AB35 } /* Literal */
|
|
89
|
+
body[data-theme="dark"] .highlight .n { color: #F8F8F2 } /* Name */
|
|
90
|
+
body[data-theme="dark"] .highlight .o { color: #ABE338 } /* Operator */
|
|
91
|
+
body[data-theme="dark"] .highlight .p { color: #F8F8F2 } /* Punctuation */
|
|
92
|
+
body[data-theme="dark"] .highlight .ch { color: #D4D0AB } /* Comment.Hashbang */
|
|
93
|
+
body[data-theme="dark"] .highlight .cm { color: #D4D0AB } /* Comment.Multiline */
|
|
94
|
+
body[data-theme="dark"] .highlight .cp { color: #D4D0AB } /* Comment.Preproc */
|
|
95
|
+
body[data-theme="dark"] .highlight .cpf { color: #D4D0AB } /* Comment.PreprocFile */
|
|
96
|
+
body[data-theme="dark"] .highlight .c1 { color: #D4D0AB } /* Comment.Single */
|
|
97
|
+
body[data-theme="dark"] .highlight .cs { color: #D4D0AB } /* Comment.Special */
|
|
98
|
+
body[data-theme="dark"] .highlight .gd { color: #00E0E0 } /* Generic.Deleted */
|
|
99
|
+
body[data-theme="dark"] .highlight .ge { font-style: italic } /* Generic.Emph */
|
|
100
|
+
body[data-theme="dark"] .highlight .gh { color: #00E0E0 } /* Generic.Heading */
|
|
101
|
+
body[data-theme="dark"] .highlight .gs { font-weight: bold } /* Generic.Strong */
|
|
102
|
+
body[data-theme="dark"] .highlight .gu { color: #00E0E0 } /* Generic.Subheading */
|
|
103
|
+
body[data-theme="dark"] .highlight .kc { color: #DCC6E0 } /* Keyword.Constant */
|
|
104
|
+
body[data-theme="dark"] .highlight .kd { color: #DCC6E0 } /* Keyword.Declaration */
|
|
105
|
+
body[data-theme="dark"] .highlight .kn { color: #DCC6E0 } /* Keyword.Namespace */
|
|
106
|
+
body[data-theme="dark"] .highlight .kp { color: #DCC6E0 } /* Keyword.Pseudo */
|
|
107
|
+
body[data-theme="dark"] .highlight .kr { color: #DCC6E0 } /* Keyword.Reserved */
|
|
108
|
+
body[data-theme="dark"] .highlight .kt { color: #F5AB35 } /* Keyword.Type */
|
|
109
|
+
body[data-theme="dark"] .highlight .ld { color: #F5AB35 } /* Literal.Date */
|
|
110
|
+
body[data-theme="dark"] .highlight .m { color: #F5AB35 } /* Literal.Number */
|
|
111
|
+
body[data-theme="dark"] .highlight .s { color: #ABE338 } /* Literal.String */
|
|
112
|
+
body[data-theme="dark"] .highlight .na { color: #FFD700 } /* Name.Attribute */
|
|
113
|
+
body[data-theme="dark"] .highlight .nb { color: #F5AB35 } /* Name.Builtin */
|
|
114
|
+
body[data-theme="dark"] .highlight .nc { color: #00E0E0 } /* Name.Class */
|
|
115
|
+
body[data-theme="dark"] .highlight .no { color: #00E0E0 } /* Name.Constant */
|
|
116
|
+
body[data-theme="dark"] .highlight .nd { color: #F5AB35 } /* Name.Decorator */
|
|
117
|
+
body[data-theme="dark"] .highlight .ni { color: #ABE338 } /* Name.Entity */
|
|
118
|
+
body[data-theme="dark"] .highlight .ne { color: #DCC6E0 } /* Name.Exception */
|
|
119
|
+
body[data-theme="dark"] .highlight .nf { color: #00E0E0 } /* Name.Function */
|
|
120
|
+
body[data-theme="dark"] .highlight .nl { color: #F5AB35 } /* Name.Label */
|
|
121
|
+
body[data-theme="dark"] .highlight .nn { color: #F8F8F2 } /* Name.Namespace */
|
|
122
|
+
body[data-theme="dark"] .highlight .nx { color: #F8F8F2 } /* Name.Other */
|
|
123
|
+
body[data-theme="dark"] .highlight .py { color: #00E0E0 } /* Name.Property */
|
|
124
|
+
body[data-theme="dark"] .highlight .nt { color: #00E0E0 } /* Name.Tag */
|
|
125
|
+
body[data-theme="dark"] .highlight .nv { color: #FFA07A } /* Name.Variable */
|
|
126
|
+
body[data-theme="dark"] .highlight .ow { color: #DCC6E0 } /* Operator.Word */
|
|
127
|
+
body[data-theme="dark"] .highlight .pm { color: #F8F8F2 } /* Punctuation.Marker */
|
|
128
|
+
body[data-theme="dark"] .highlight .w { color: #F8F8F2 } /* Text.Whitespace */
|
|
129
|
+
body[data-theme="dark"] .highlight .mb { color: #F5AB35 } /* Literal.Number.Bin */
|
|
130
|
+
body[data-theme="dark"] .highlight .mf { color: #F5AB35 } /* Literal.Number.Float */
|
|
131
|
+
body[data-theme="dark"] .highlight .mh { color: #F5AB35 } /* Literal.Number.Hex */
|
|
132
|
+
body[data-theme="dark"] .highlight .mi { color: #F5AB35 } /* Literal.Number.Integer */
|
|
133
|
+
body[data-theme="dark"] .highlight .mo { color: #F5AB35 } /* Literal.Number.Oct */
|
|
134
|
+
body[data-theme="dark"] .highlight .sa { color: #ABE338 } /* Literal.String.Affix */
|
|
135
|
+
body[data-theme="dark"] .highlight .sb { color: #ABE338 } /* Literal.String.Backtick */
|
|
136
|
+
body[data-theme="dark"] .highlight .sc { color: #ABE338 } /* Literal.String.Char */
|
|
137
|
+
body[data-theme="dark"] .highlight .dl { color: #ABE338 } /* Literal.String.Delimiter */
|
|
138
|
+
body[data-theme="dark"] .highlight .sd { color: #ABE338 } /* Literal.String.Doc */
|
|
139
|
+
body[data-theme="dark"] .highlight .s2 { color: #ABE338 } /* Literal.String.Double */
|
|
140
|
+
body[data-theme="dark"] .highlight .se { color: #ABE338 } /* Literal.String.Escape */
|
|
141
|
+
body[data-theme="dark"] .highlight .sh { color: #ABE338 } /* Literal.String.Heredoc */
|
|
142
|
+
body[data-theme="dark"] .highlight .si { color: #ABE338 } /* Literal.String.Interpol */
|
|
143
|
+
body[data-theme="dark"] .highlight .sx { color: #ABE338 } /* Literal.String.Other */
|
|
144
|
+
body[data-theme="dark"] .highlight .sr { color: #FFA07A } /* Literal.String.Regex */
|
|
145
|
+
body[data-theme="dark"] .highlight .s1 { color: #ABE338 } /* Literal.String.Single */
|
|
146
|
+
body[data-theme="dark"] .highlight .ss { color: #00E0E0 } /* Literal.String.Symbol */
|
|
147
|
+
body[data-theme="dark"] .highlight .bp { color: #F5AB35 } /* Name.Builtin.Pseudo */
|
|
148
|
+
body[data-theme="dark"] .highlight .fm { color: #00E0E0 } /* Name.Function.Magic */
|
|
149
|
+
body[data-theme="dark"] .highlight .vc { color: #FFA07A } /* Name.Variable.Class */
|
|
150
|
+
body[data-theme="dark"] .highlight .vg { color: #FFA07A } /* Name.Variable.Global */
|
|
151
|
+
body[data-theme="dark"] .highlight .vi { color: #FFA07A } /* Name.Variable.Instance */
|
|
152
|
+
body[data-theme="dark"] .highlight .vm { color: #F5AB35 } /* Name.Variable.Magic */
|
|
153
|
+
body[data-theme="dark"] .highlight .il { color: #F5AB35 } /* Literal.Number.Integer.Long */
|
|
163
154
|
@media (prefers-color-scheme: dark) {
|
|
164
155
|
body:not([data-theme="light"]) .highlight pre { line-height: 125%; }
|
|
165
|
-
body:not([data-theme="light"]) .highlight td.linenos .normal { color:
|
|
166
|
-
body:not([data-theme="light"]) .highlight span.linenos { color:
|
|
156
|
+
body:not([data-theme="light"]) .highlight td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
|
|
157
|
+
body:not([data-theme="light"]) .highlight span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
|
|
167
158
|
body:not([data-theme="light"]) .highlight td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
|
|
168
159
|
body:not([data-theme="light"]) .highlight span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
|
|
169
|
-
body:not([data-theme="light"]) .highlight .hll { background-color: #
|
|
170
|
-
body:not([data-theme="light"]) .highlight { background: #
|
|
171
|
-
body:not([data-theme="light"]) .highlight .c { color: #
|
|
172
|
-
body:not([data-theme="light"]) .highlight .err { color: #
|
|
173
|
-
body:not([data-theme="light"]) .highlight .
|
|
174
|
-
body:not([data-theme="light"]) .highlight .
|
|
175
|
-
body:not([data-theme="light"]) .highlight .
|
|
176
|
-
body:not([data-theme="light"]) .highlight .
|
|
177
|
-
body:not([data-theme="light"]) .highlight .
|
|
178
|
-
body:not([data-theme="light"]) .highlight .
|
|
179
|
-
body:not([data-theme="light"]) .highlight .
|
|
180
|
-
body:not([data-theme="light"]) .highlight .
|
|
181
|
-
body:not([data-theme="light"]) .highlight .
|
|
182
|
-
body:not([data-theme="light"]) .highlight .
|
|
183
|
-
body:not([data-theme="light"]) .highlight .
|
|
184
|
-
body:not([data-theme="light"]) .highlight .
|
|
185
|
-
body:not([data-theme="light"]) .highlight .
|
|
186
|
-
body:not([data-theme="light"]) .highlight .
|
|
187
|
-
body:not([data-theme="light"]) .highlight .
|
|
188
|
-
body:not([data-theme="light"]) .highlight .
|
|
189
|
-
body:not([data-theme="light"]) .highlight .
|
|
190
|
-
body:not([data-theme="light"]) .highlight .
|
|
191
|
-
body:not([data-theme="light"]) .highlight .
|
|
192
|
-
body:not([data-theme="light"]) .highlight .
|
|
193
|
-
body:not([data-theme="light"]) .highlight .
|
|
194
|
-
body:not([data-theme="light"]) .highlight .
|
|
195
|
-
body:not([data-theme="light"]) .highlight .
|
|
196
|
-
body:not([data-theme="light"]) .highlight .
|
|
197
|
-
body:not([data-theme="light"]) .highlight .
|
|
198
|
-
body:not([data-theme="light"]) .highlight .
|
|
199
|
-
body:not([data-theme="light"]) .highlight .
|
|
200
|
-
body:not([data-theme="light"]) .highlight .
|
|
201
|
-
body:not([data-theme="light"]) .highlight .
|
|
202
|
-
body:not([data-theme="light"]) .highlight .
|
|
203
|
-
body:not([data-theme="light"]) .highlight .
|
|
204
|
-
body:not([data-theme="light"]) .highlight .
|
|
205
|
-
body:not([data-theme="light"]) .highlight .
|
|
206
|
-
body:not([data-theme="light"]) .highlight .
|
|
207
|
-
body:not([data-theme="light"]) .highlight .
|
|
208
|
-
body:not([data-theme="light"]) .highlight .
|
|
209
|
-
body:not([data-theme="light"]) .highlight .
|
|
210
|
-
body:not([data-theme="light"]) .highlight .
|
|
211
|
-
body:not([data-theme="light"]) .highlight .
|
|
212
|
-
body:not([data-theme="light"]) .highlight .
|
|
213
|
-
body:not([data-theme="light"]) .highlight .
|
|
214
|
-
body:not([data-theme="light"]) .highlight .
|
|
215
|
-
body:not([data-theme="light"]) .highlight .
|
|
216
|
-
body:not([data-theme="light"]) .highlight .
|
|
217
|
-
body:not([data-theme="light"]) .highlight .
|
|
218
|
-
body:not([data-theme="light"]) .highlight .
|
|
219
|
-
body:not([data-theme="light"]) .highlight .
|
|
220
|
-
body:not([data-theme="light"]) .highlight .
|
|
221
|
-
body:not([data-theme="light"]) .highlight .
|
|
222
|
-
body:not([data-theme="light"]) .highlight .
|
|
223
|
-
body:not([data-theme="light"]) .highlight .
|
|
224
|
-
body:not([data-theme="light"]) .highlight .
|
|
225
|
-
body:not([data-theme="light"]) .highlight .
|
|
226
|
-
body:not([data-theme="light"]) .highlight .
|
|
227
|
-
body:not([data-theme="light"]) .highlight .
|
|
228
|
-
body:not([data-theme="light"]) .highlight .
|
|
229
|
-
body:not([data-theme="light"]) .highlight .
|
|
230
|
-
body:not([data-theme="light"]) .highlight .
|
|
231
|
-
body:not([data-theme="light"]) .highlight .
|
|
232
|
-
body:not([data-theme="light"]) .highlight .
|
|
233
|
-
body:not([data-theme="light"]) .highlight .
|
|
234
|
-
body:not([data-theme="light"]) .highlight .
|
|
235
|
-
body:not([data-theme="light"]) .highlight .
|
|
236
|
-
body:not([data-theme="light"]) .highlight .
|
|
237
|
-
body:not([data-theme="light"]) .highlight .
|
|
238
|
-
body:not([data-theme="light"]) .highlight .
|
|
239
|
-
body:not([data-theme="light"]) .highlight .
|
|
240
|
-
body:not([data-theme="light"]) .highlight .s1 { color: #ED9D13 } /* Literal.String.Single */
|
|
241
|
-
body:not([data-theme="light"]) .highlight .ss { color: #ED9D13 } /* Literal.String.Symbol */
|
|
242
|
-
body:not([data-theme="light"]) .highlight .bp { color: #2FBCCD } /* Name.Builtin.Pseudo */
|
|
243
|
-
body:not([data-theme="light"]) .highlight .fm { color: #71ADFF } /* Name.Function.Magic */
|
|
244
|
-
body:not([data-theme="light"]) .highlight .vc { color: #40FFFF } /* Name.Variable.Class */
|
|
245
|
-
body:not([data-theme="light"]) .highlight .vg { color: #40FFFF } /* Name.Variable.Global */
|
|
246
|
-
body:not([data-theme="light"]) .highlight .vi { color: #40FFFF } /* Name.Variable.Instance */
|
|
247
|
-
body:not([data-theme="light"]) .highlight .vm { color: #40FFFF } /* Name.Variable.Magic */
|
|
248
|
-
body:not([data-theme="light"]) .highlight .il { color: #51B2FD } /* Literal.Number.Integer.Long */
|
|
160
|
+
body:not([data-theme="light"]) .highlight .hll { background-color: #ffd9002e }
|
|
161
|
+
body:not([data-theme="light"]) .highlight { background: #2b2b2b; color: #F8F8F2 }
|
|
162
|
+
body:not([data-theme="light"]) .highlight .c { color: #D4D0AB } /* Comment */
|
|
163
|
+
body:not([data-theme="light"]) .highlight .err { color: #FFA07A } /* Error */
|
|
164
|
+
body:not([data-theme="light"]) .highlight .k { color: #DCC6E0 } /* Keyword */
|
|
165
|
+
body:not([data-theme="light"]) .highlight .l { color: #F5AB35 } /* Literal */
|
|
166
|
+
body:not([data-theme="light"]) .highlight .n { color: #F8F8F2 } /* Name */
|
|
167
|
+
body:not([data-theme="light"]) .highlight .o { color: #ABE338 } /* Operator */
|
|
168
|
+
body:not([data-theme="light"]) .highlight .p { color: #F8F8F2 } /* Punctuation */
|
|
169
|
+
body:not([data-theme="light"]) .highlight .ch { color: #D4D0AB } /* Comment.Hashbang */
|
|
170
|
+
body:not([data-theme="light"]) .highlight .cm { color: #D4D0AB } /* Comment.Multiline */
|
|
171
|
+
body:not([data-theme="light"]) .highlight .cp { color: #D4D0AB } /* Comment.Preproc */
|
|
172
|
+
body:not([data-theme="light"]) .highlight .cpf { color: #D4D0AB } /* Comment.PreprocFile */
|
|
173
|
+
body:not([data-theme="light"]) .highlight .c1 { color: #D4D0AB } /* Comment.Single */
|
|
174
|
+
body:not([data-theme="light"]) .highlight .cs { color: #D4D0AB } /* Comment.Special */
|
|
175
|
+
body:not([data-theme="light"]) .highlight .gd { color: #00E0E0 } /* Generic.Deleted */
|
|
176
|
+
body:not([data-theme="light"]) .highlight .ge { font-style: italic } /* Generic.Emph */
|
|
177
|
+
body:not([data-theme="light"]) .highlight .gh { color: #00E0E0 } /* Generic.Heading */
|
|
178
|
+
body:not([data-theme="light"]) .highlight .gs { font-weight: bold } /* Generic.Strong */
|
|
179
|
+
body:not([data-theme="light"]) .highlight .gu { color: #00E0E0 } /* Generic.Subheading */
|
|
180
|
+
body:not([data-theme="light"]) .highlight .kc { color: #DCC6E0 } /* Keyword.Constant */
|
|
181
|
+
body:not([data-theme="light"]) .highlight .kd { color: #DCC6E0 } /* Keyword.Declaration */
|
|
182
|
+
body:not([data-theme="light"]) .highlight .kn { color: #DCC6E0 } /* Keyword.Namespace */
|
|
183
|
+
body:not([data-theme="light"]) .highlight .kp { color: #DCC6E0 } /* Keyword.Pseudo */
|
|
184
|
+
body:not([data-theme="light"]) .highlight .kr { color: #DCC6E0 } /* Keyword.Reserved */
|
|
185
|
+
body:not([data-theme="light"]) .highlight .kt { color: #F5AB35 } /* Keyword.Type */
|
|
186
|
+
body:not([data-theme="light"]) .highlight .ld { color: #F5AB35 } /* Literal.Date */
|
|
187
|
+
body:not([data-theme="light"]) .highlight .m { color: #F5AB35 } /* Literal.Number */
|
|
188
|
+
body:not([data-theme="light"]) .highlight .s { color: #ABE338 } /* Literal.String */
|
|
189
|
+
body:not([data-theme="light"]) .highlight .na { color: #FFD700 } /* Name.Attribute */
|
|
190
|
+
body:not([data-theme="light"]) .highlight .nb { color: #F5AB35 } /* Name.Builtin */
|
|
191
|
+
body:not([data-theme="light"]) .highlight .nc { color: #00E0E0 } /* Name.Class */
|
|
192
|
+
body:not([data-theme="light"]) .highlight .no { color: #00E0E0 } /* Name.Constant */
|
|
193
|
+
body:not([data-theme="light"]) .highlight .nd { color: #F5AB35 } /* Name.Decorator */
|
|
194
|
+
body:not([data-theme="light"]) .highlight .ni { color: #ABE338 } /* Name.Entity */
|
|
195
|
+
body:not([data-theme="light"]) .highlight .ne { color: #DCC6E0 } /* Name.Exception */
|
|
196
|
+
body:not([data-theme="light"]) .highlight .nf { color: #00E0E0 } /* Name.Function */
|
|
197
|
+
body:not([data-theme="light"]) .highlight .nl { color: #F5AB35 } /* Name.Label */
|
|
198
|
+
body:not([data-theme="light"]) .highlight .nn { color: #F8F8F2 } /* Name.Namespace */
|
|
199
|
+
body:not([data-theme="light"]) .highlight .nx { color: #F8F8F2 } /* Name.Other */
|
|
200
|
+
body:not([data-theme="light"]) .highlight .py { color: #00E0E0 } /* Name.Property */
|
|
201
|
+
body:not([data-theme="light"]) .highlight .nt { color: #00E0E0 } /* Name.Tag */
|
|
202
|
+
body:not([data-theme="light"]) .highlight .nv { color: #FFA07A } /* Name.Variable */
|
|
203
|
+
body:not([data-theme="light"]) .highlight .ow { color: #DCC6E0 } /* Operator.Word */
|
|
204
|
+
body:not([data-theme="light"]) .highlight .pm { color: #F8F8F2 } /* Punctuation.Marker */
|
|
205
|
+
body:not([data-theme="light"]) .highlight .w { color: #F8F8F2 } /* Text.Whitespace */
|
|
206
|
+
body:not([data-theme="light"]) .highlight .mb { color: #F5AB35 } /* Literal.Number.Bin */
|
|
207
|
+
body:not([data-theme="light"]) .highlight .mf { color: #F5AB35 } /* Literal.Number.Float */
|
|
208
|
+
body:not([data-theme="light"]) .highlight .mh { color: #F5AB35 } /* Literal.Number.Hex */
|
|
209
|
+
body:not([data-theme="light"]) .highlight .mi { color: #F5AB35 } /* Literal.Number.Integer */
|
|
210
|
+
body:not([data-theme="light"]) .highlight .mo { color: #F5AB35 } /* Literal.Number.Oct */
|
|
211
|
+
body:not([data-theme="light"]) .highlight .sa { color: #ABE338 } /* Literal.String.Affix */
|
|
212
|
+
body:not([data-theme="light"]) .highlight .sb { color: #ABE338 } /* Literal.String.Backtick */
|
|
213
|
+
body:not([data-theme="light"]) .highlight .sc { color: #ABE338 } /* Literal.String.Char */
|
|
214
|
+
body:not([data-theme="light"]) .highlight .dl { color: #ABE338 } /* Literal.String.Delimiter */
|
|
215
|
+
body:not([data-theme="light"]) .highlight .sd { color: #ABE338 } /* Literal.String.Doc */
|
|
216
|
+
body:not([data-theme="light"]) .highlight .s2 { color: #ABE338 } /* Literal.String.Double */
|
|
217
|
+
body:not([data-theme="light"]) .highlight .se { color: #ABE338 } /* Literal.String.Escape */
|
|
218
|
+
body:not([data-theme="light"]) .highlight .sh { color: #ABE338 } /* Literal.String.Heredoc */
|
|
219
|
+
body:not([data-theme="light"]) .highlight .si { color: #ABE338 } /* Literal.String.Interpol */
|
|
220
|
+
body:not([data-theme="light"]) .highlight .sx { color: #ABE338 } /* Literal.String.Other */
|
|
221
|
+
body:not([data-theme="light"]) .highlight .sr { color: #FFA07A } /* Literal.String.Regex */
|
|
222
|
+
body:not([data-theme="light"]) .highlight .s1 { color: #ABE338 } /* Literal.String.Single */
|
|
223
|
+
body:not([data-theme="light"]) .highlight .ss { color: #00E0E0 } /* Literal.String.Symbol */
|
|
224
|
+
body:not([data-theme="light"]) .highlight .bp { color: #F5AB35 } /* Name.Builtin.Pseudo */
|
|
225
|
+
body:not([data-theme="light"]) .highlight .fm { color: #00E0E0 } /* Name.Function.Magic */
|
|
226
|
+
body:not([data-theme="light"]) .highlight .vc { color: #FFA07A } /* Name.Variable.Class */
|
|
227
|
+
body:not([data-theme="light"]) .highlight .vg { color: #FFA07A } /* Name.Variable.Global */
|
|
228
|
+
body:not([data-theme="light"]) .highlight .vi { color: #FFA07A } /* Name.Variable.Instance */
|
|
229
|
+
body:not([data-theme="light"]) .highlight .vm { color: #F5AB35 } /* Name.Variable.Magic */
|
|
230
|
+
body:not([data-theme="light"]) .highlight .il { color: #F5AB35 } /* Literal.Number.Integer.Long */
|
|
249
231
|
}
|
|
250
232
|
}
|
|
@@ -513,11 +513,9 @@ const Search = {
|
|
|
513
513
|
// perform the search on the required terms
|
|
514
514
|
searchTerms.forEach((word) => {
|
|
515
515
|
const files = [];
|
|
516
|
-
// find documents, if any, containing the query word in their text/title term indices
|
|
517
|
-
// use Object.hasOwnProperty to avoid mismatching against prototype properties
|
|
518
516
|
const arr = [
|
|
519
|
-
{ files: terms
|
|
520
|
-
{ files: titleTerms
|
|
517
|
+
{ files: terms[word], score: Scorer.term },
|
|
518
|
+
{ files: titleTerms[word], score: Scorer.title },
|
|
521
519
|
];
|
|
522
520
|
// add support for partial matches
|
|
523
521
|
if (word.length > 2) {
|
|
@@ -549,9 +547,8 @@ const Search = {
|
|
|
549
547
|
|
|
550
548
|
// set score for the word in each file
|
|
551
549
|
recordFiles.forEach((file) => {
|
|
552
|
-
if (!scoreMap.has(file)) scoreMap.set(file,
|
|
553
|
-
|
|
554
|
-
fileScores.set(word, record.score);
|
|
550
|
+
if (!scoreMap.has(file)) scoreMap.set(file, {});
|
|
551
|
+
scoreMap.get(file)[word] = record.score;
|
|
555
552
|
});
|
|
556
553
|
});
|
|
557
554
|
|
|
@@ -590,7 +587,7 @@ const Search = {
|
|
|
590
587
|
break;
|
|
591
588
|
|
|
592
589
|
// select one (max) score for the file.
|
|
593
|
-
const score = Math.max(...wordList.map((w) => scoreMap.get(file)
|
|
590
|
+
const score = Math.max(...wordList.map((w) => scoreMap.get(file)[w]));
|
|
594
591
|
// add result to the result list
|
|
595
592
|
results.push([
|
|
596
593
|
docNames[file],
|