ol-stac 0.0.0
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/.eslintignore +2 -0
- package/.github/workflows/deploy.yml +67 -0
- package/.github/workflows/publish.yml +32 -0
- package/.github/workflows/release.yml +21 -0
- package/.github/workflows/test.yml +85 -0
- package/CHANGELOG.md +14 -0
- package/DEVELOPING.md +104 -0
- package/LICENSE.md +201 -0
- package/README.md +43 -0
- package/config/jsdoc/api/conf.json +38 -0
- package/config/jsdoc/api/index.md +1 -0
- package/config/jsdoc/api/readme.md +65 -0
- package/config/jsdoc/api/template/README.md +3 -0
- package/config/jsdoc/api/template/publish.js +743 -0
- package/config/jsdoc/api/template/static/scripts/linenumber.js +11 -0
- package/config/jsdoc/api/template/static/scripts/main.js +305 -0
- package/config/jsdoc/api/template/static/scripts/prettify/Apache-License-2.0.txt +202 -0
- package/config/jsdoc/api/template/static/scripts/prettify/lang-css.js +2 -0
- package/config/jsdoc/api/template/static/scripts/prettify/prettify.js +28 -0
- package/config/jsdoc/api/template/static/styles/carbon.css +65 -0
- package/config/jsdoc/api/template/static/styles/jaguar.css +512 -0
- package/config/jsdoc/api/template/static/styles/prettify-jsdoc.css +111 -0
- package/config/jsdoc/api/template/static/styles/prettify-tomorrow.css +132 -0
- package/config/jsdoc/api/template/static/theme +1 -0
- package/config/jsdoc/api/template/tmpl/container.tmpl +205 -0
- package/config/jsdoc/api/template/tmpl/details.tmpl +84 -0
- package/config/jsdoc/api/template/tmpl/example.tmpl +2 -0
- package/config/jsdoc/api/template/tmpl/examples.tmpl +16 -0
- package/config/jsdoc/api/template/tmpl/exceptions.tmpl +30 -0
- package/config/jsdoc/api/template/tmpl/layout.tmpl +92 -0
- package/config/jsdoc/api/template/tmpl/mainpage.tmpl +14 -0
- package/config/jsdoc/api/template/tmpl/members.tmpl +38 -0
- package/config/jsdoc/api/template/tmpl/method.tmpl +132 -0
- package/config/jsdoc/api/template/tmpl/navigation.tmpl +59 -0
- package/config/jsdoc/api/template/tmpl/observables.tmpl +39 -0
- package/config/jsdoc/api/template/tmpl/params.tmpl +109 -0
- package/config/jsdoc/api/template/tmpl/properties.tmpl +85 -0
- package/config/jsdoc/api/template/tmpl/returns.tmpl +72 -0
- package/config/jsdoc/api/template/tmpl/source.tmpl +8 -0
- package/config/jsdoc/api/template/tmpl/stability.tmpl +7 -0
- package/config/jsdoc/api/template/tmpl/tutorial.tmpl +19 -0
- package/config/jsdoc/api/template/tmpl/type.tmpl +7 -0
- package/config/jsdoc/info/conf.json +22 -0
- package/config/jsdoc/info/publish.js +175 -0
- package/config/jsdoc/package.json +4 -0
- package/config/jsdoc/plugins/api.cjs +181 -0
- package/config/jsdoc/plugins/default-export.cjs +35 -0
- package/config/jsdoc/plugins/define-plugin.cjs +33 -0
- package/config/jsdoc/plugins/events.cjs +39 -0
- package/config/jsdoc/plugins/inline-options.cjs +102 -0
- package/config/jsdoc/plugins/markdown.cjs +119 -0
- package/config/jsdoc/plugins/observable.cjs +69 -0
- package/config/jsdoc/plugins/virtual-plugin.cjs +16 -0
- package/config/rollup-full-build.js +24 -0
- package/config/tsconfig-build.json +25 -0
- package/examples/.eslintrc +29 -0
- package/examples/index.html +100 -0
- package/examples/index.js +109 -0
- package/examples/planetary-computer.html +14 -0
- package/examples/planetary-computer.js +53 -0
- package/examples/resources/Jugl.js +15 -0
- package/examples/resources/common.js +111 -0
- package/examples/stac-collection-webmaplinks.html +9 -0
- package/examples/stac-collection-webmaplinks.js +55 -0
- package/examples/stac-item-from-object.html +9 -0
- package/examples/stac-item-from-object.js +102 -0
- package/examples/stac-item-tileserver.html +9 -0
- package/examples/stac-item-tileserver.js +34 -0
- package/examples/stac-item.html +9 -0
- package/examples/stac-item.js +45 -0
- package/examples/stac-itemcollection.html +11 -0
- package/examples/stac-itemcollection.js +39 -0
- package/examples/templates/example.html +206 -0
- package/examples/templates/readme.md +3 -0
- package/examples/webpack/config.mjs +69 -0
- package/examples/webpack/example-builder.js +410 -0
- package/package.json +107 -0
- package/site/build.js +26 -0
- package/site/layouts/default.hbs +78 -0
- package/site/src/doc/faq.md +8 -0
- package/site/src/doc/index.md +22 -0
- package/site/src/doc/quickstart.md +121 -0
- package/site/src/doc/tutorials/index.md +8 -0
- package/site/src/download/index.hbs +62 -0
- package/site/src/favicon.ico +0 -0
- package/site/src/index.hbs +71 -0
- package/site/src/theme/index.css +26 -0
- package/site/src/theme/site.css +531 -0
- package/src/ol/events/ErrorEvent.js +25 -0
- package/src/ol/layer/STAC.js +780 -0
- package/src/ol/layer/stacUtil.js +169 -0
- package/src/ol/source/GeoTIFF2.js +47 -0
- package/tasks/.eslintrc +5 -0
- package/tasks/build-website.sh +90 -0
- package/tasks/create-release.js +107 -0
- package/tasks/generate-index.js +125 -0
- package/tasks/generate-info.js +189 -0
- package/tasks/get-latest-release.js +36 -0
- package/tasks/newest-tag.js +52 -0
- package/tasks/prepare-package.js +46 -0
- package/tasks/publish.sh +90 -0
- package/test/README.md +56 -0
- package/test/browser/.eslintrc +14 -0
- package/test/browser/karma.config.cjs +94 -0
- package/test/browser/spec/ol/layer/STAC.test.js +18 -0
- package/test/browser/test-extensions.js +419 -0
- package/tsconfig.json +62 -0
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
/* Tomorrow Theme */
|
|
2
|
+
/* Original theme - https://github.com/chriskempson/tomorrow-theme */
|
|
3
|
+
/* Pretty printing styles. Used with prettify.js. */
|
|
4
|
+
/* SPAN elements with the classes below are added by prettyprint. */
|
|
5
|
+
/* plain text */
|
|
6
|
+
.pln {
|
|
7
|
+
color: #4d4d4c; }
|
|
8
|
+
|
|
9
|
+
@media screen {
|
|
10
|
+
/* string content */
|
|
11
|
+
.str {
|
|
12
|
+
color: #718c00; }
|
|
13
|
+
|
|
14
|
+
/* a keyword */
|
|
15
|
+
.kwd {
|
|
16
|
+
color: #8959a8; }
|
|
17
|
+
|
|
18
|
+
/* a comment */
|
|
19
|
+
.com {
|
|
20
|
+
color: #8e908c; }
|
|
21
|
+
|
|
22
|
+
/* a type name */
|
|
23
|
+
.typ {
|
|
24
|
+
color: #4271ae; }
|
|
25
|
+
|
|
26
|
+
/* a literal value */
|
|
27
|
+
.lit {
|
|
28
|
+
color: #f5871f; }
|
|
29
|
+
|
|
30
|
+
/* punctuation */
|
|
31
|
+
.pun {
|
|
32
|
+
color: #4d4d4c; }
|
|
33
|
+
|
|
34
|
+
/* lisp open bracket */
|
|
35
|
+
.opn {
|
|
36
|
+
color: #4d4d4c; }
|
|
37
|
+
|
|
38
|
+
/* lisp close bracket */
|
|
39
|
+
.clo {
|
|
40
|
+
color: #4d4d4c; }
|
|
41
|
+
|
|
42
|
+
/* a markup tag name */
|
|
43
|
+
.tag {
|
|
44
|
+
color: #c82829; }
|
|
45
|
+
|
|
46
|
+
/* a markup attribute name */
|
|
47
|
+
.atn {
|
|
48
|
+
color: #f5871f; }
|
|
49
|
+
|
|
50
|
+
/* a markup attribute value */
|
|
51
|
+
.atv {
|
|
52
|
+
color: #3e999f; }
|
|
53
|
+
|
|
54
|
+
/* a declaration */
|
|
55
|
+
.dec {
|
|
56
|
+
color: #f5871f; }
|
|
57
|
+
|
|
58
|
+
/* a variable name */
|
|
59
|
+
.var {
|
|
60
|
+
color: #c82829; }
|
|
61
|
+
|
|
62
|
+
/* a function name */
|
|
63
|
+
.fun {
|
|
64
|
+
color: #4271ae; } }
|
|
65
|
+
/* Use higher contrast and text-weight for printable form. */
|
|
66
|
+
@media print, projection {
|
|
67
|
+
.str {
|
|
68
|
+
color: #060; }
|
|
69
|
+
|
|
70
|
+
.kwd {
|
|
71
|
+
color: #006;
|
|
72
|
+
font-weight: bold; }
|
|
73
|
+
|
|
74
|
+
.com {
|
|
75
|
+
color: #600;
|
|
76
|
+
font-style: italic; }
|
|
77
|
+
|
|
78
|
+
.typ {
|
|
79
|
+
color: #404;
|
|
80
|
+
font-weight: bold; }
|
|
81
|
+
|
|
82
|
+
.lit {
|
|
83
|
+
color: #044; }
|
|
84
|
+
|
|
85
|
+
.pun, .opn, .clo {
|
|
86
|
+
color: #440; }
|
|
87
|
+
|
|
88
|
+
.tag {
|
|
89
|
+
color: #006;
|
|
90
|
+
font-weight: bold; }
|
|
91
|
+
|
|
92
|
+
.atn {
|
|
93
|
+
color: #404; }
|
|
94
|
+
|
|
95
|
+
.atv {
|
|
96
|
+
color: #060; } }
|
|
97
|
+
/* Style */
|
|
98
|
+
/*
|
|
99
|
+
pre.prettyprint {
|
|
100
|
+
background: white;
|
|
101
|
+
font-family: Menlo, Monaco, Consolas, monospace;
|
|
102
|
+
font-size: 12px;
|
|
103
|
+
line-height: 1.5;
|
|
104
|
+
border: 1px solid #ccc;
|
|
105
|
+
padding: 10px; }
|
|
106
|
+
*/
|
|
107
|
+
|
|
108
|
+
/* Specify class=linenums on a pre to get line numbering */
|
|
109
|
+
ol.linenums {
|
|
110
|
+
margin-top: 0;
|
|
111
|
+
margin-bottom: 0; }
|
|
112
|
+
|
|
113
|
+
/* IE indents via margin-left */
|
|
114
|
+
li.L0,
|
|
115
|
+
li.L1,
|
|
116
|
+
li.L2,
|
|
117
|
+
li.L3,
|
|
118
|
+
li.L4,
|
|
119
|
+
li.L5,
|
|
120
|
+
li.L6,
|
|
121
|
+
li.L7,
|
|
122
|
+
li.L8,
|
|
123
|
+
li.L9 {
|
|
124
|
+
/* */ }
|
|
125
|
+
|
|
126
|
+
/* Alternate shading for lines */
|
|
127
|
+
li.L1,
|
|
128
|
+
li.L3,
|
|
129
|
+
li.L5,
|
|
130
|
+
li.L7,
|
|
131
|
+
li.L9 {
|
|
132
|
+
/* */ }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
../../../../../site/src/theme
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
<?js
|
|
2
|
+
var self = this;
|
|
3
|
+
docs.forEach(function(doc, i) {
|
|
4
|
+
?>
|
|
5
|
+
|
|
6
|
+
<?js if (doc.kind === 'mainpage' || (doc.kind === 'package')) { ?>
|
|
7
|
+
<?js= self.partial('mainpage.tmpl', doc) ?>
|
|
8
|
+
<?js } else if (doc.kind === 'source') { ?>
|
|
9
|
+
<?js= self.partial('source.tmpl', doc) ?>
|
|
10
|
+
<?js } else { ?>
|
|
11
|
+
|
|
12
|
+
<section class="content">
|
|
13
|
+
|
|
14
|
+
<header>
|
|
15
|
+
<h2 class="my-3"><?js if (doc.ancestors && doc.ancestors.length) { ?>
|
|
16
|
+
<span class="ancestors"><?js= doc.ancestors.join('') ?></span><?js } ?><?js= doc.name ?>
|
|
17
|
+
<?js if (doc.variation) { ?>
|
|
18
|
+
<sup class="variation"><?js= doc.variation ?></sup>
|
|
19
|
+
<?js } ?></h2>
|
|
20
|
+
<br>
|
|
21
|
+
<?js if (doc.stability || doc.kind == 'namespace' || doc.kind == 'module') {
|
|
22
|
+
var ancestors = doc.ancestors.map(a => a.replace(/>\./g, '>').replace(/\.</g, '<')).join('/');
|
|
23
|
+
var parts = [];
|
|
24
|
+
if (ancestors) {
|
|
25
|
+
parts.push(ancestors.split('~').shift());
|
|
26
|
+
}
|
|
27
|
+
var importPath = parts.join('/') + '.js';
|
|
28
|
+
?>
|
|
29
|
+
<?js
|
|
30
|
+
var nameParts = doc.name.split('/');
|
|
31
|
+
var moduleName = nameParts[nameParts.length - 1];
|
|
32
|
+
if(moduleName) {
|
|
33
|
+
var firstChar = moduleName.charAt(0);
|
|
34
|
+
moduleName = firstChar.toUpperCase() + moduleName.slice(1);
|
|
35
|
+
var isClassModule = firstChar.toUpperCase() === firstChar;
|
|
36
|
+
}
|
|
37
|
+
?>
|
|
38
|
+
<?js if (doc.kind == 'module' && !isClassModule && nameParts.length < 3) {?>
|
|
39
|
+
<pre class="prettyprint source"><code>import * as ol<?js= moduleName ?> from '<?js= doc.name ?>';</code></pre>
|
|
40
|
+
<?js } else if(doc.kind !== 'module') { ?>
|
|
41
|
+
<pre class="prettyprint source"><code>import <?js= doc.name ?> from '<?js= importPath ?>';</code></pre>
|
|
42
|
+
<?js } ?>
|
|
43
|
+
<?js } ?>
|
|
44
|
+
<div class="row p-3 ">
|
|
45
|
+
<?js if (doc.classdesc) { ?>
|
|
46
|
+
<div class="class-description col-lg-7 align-self-center ps-0"><?js= doc.classdesc ?></div>
|
|
47
|
+
<?js } ?>
|
|
48
|
+
</div>
|
|
49
|
+
</header>
|
|
50
|
+
|
|
51
|
+
<article>
|
|
52
|
+
<div class="container-overview">
|
|
53
|
+
<?js if (doc.kind === 'module' && doc.module) { ?>
|
|
54
|
+
<dl>
|
|
55
|
+
<?js= self.partial('method.tmpl', doc.module) ?>
|
|
56
|
+
</dl>
|
|
57
|
+
<?js } ?>
|
|
58
|
+
|
|
59
|
+
<?js if (doc.kind === 'class') { ?>
|
|
60
|
+
<dl>
|
|
61
|
+
<?js= self.partial('method.tmpl', doc) ?>
|
|
62
|
+
</dl>
|
|
63
|
+
<?js } else { ?>
|
|
64
|
+
<?js if (doc.description) { ?>
|
|
65
|
+
<div class="description"><?js= doc.description ?></div>
|
|
66
|
+
<?js } ?>
|
|
67
|
+
|
|
68
|
+
<?js= self.partial('details.tmpl', doc) ?>
|
|
69
|
+
|
|
70
|
+
<?js if (doc.examples && doc.examples.length) { ?>
|
|
71
|
+
<h3>Example<?js= doc.examples.length > 1? 's':'' ?></h3>
|
|
72
|
+
<?js= self.partial('examples.tmpl', doc.examples) ?>
|
|
73
|
+
<?js } ?>
|
|
74
|
+
<?js } ?>
|
|
75
|
+
</div>
|
|
76
|
+
|
|
77
|
+
<?js if (doc.kind == 'class') {
|
|
78
|
+
var subclasses = self.find(function() {
|
|
79
|
+
return this.augments && this.augments.includes(doc.longname);
|
|
80
|
+
})
|
|
81
|
+
if (subclasses.length) {
|
|
82
|
+
?>
|
|
83
|
+
<h3 class="subsection-title">Subclasses</h3>
|
|
84
|
+
<ul><?js subclasses.forEach(function(s) { ?>
|
|
85
|
+
<li><?js= self.linkto(s.longname) ?>
|
|
86
|
+
<?js= (s.interface ? '(Interface)' : '') ?>
|
|
87
|
+
</li>
|
|
88
|
+
<?js }); ?></ul>
|
|
89
|
+
<?js } } ?>
|
|
90
|
+
|
|
91
|
+
<?js if (doc.augments && doc.augments.length) { ?>
|
|
92
|
+
<h3 class="subsection-title">Extends</h3>
|
|
93
|
+
|
|
94
|
+
<ul><?js doc.augments.forEach(function(a) { ?>
|
|
95
|
+
<li><?js= self.linkto(a) ?></li>
|
|
96
|
+
<?js }); ?></ul>
|
|
97
|
+
<?js } ?>
|
|
98
|
+
|
|
99
|
+
<?js if (doc.mixes && doc.mixes.length) { ?>
|
|
100
|
+
<h3 class="subsection-title">Mixes In</h3>
|
|
101
|
+
|
|
102
|
+
<ul><?js doc.mixes.forEach(function(a) { ?>
|
|
103
|
+
<li><?js= self.linkto(a) ?></li>
|
|
104
|
+
<?js }); ?></ul>
|
|
105
|
+
<?js } ?>
|
|
106
|
+
|
|
107
|
+
<?js if (doc.requires && doc.requires.length) { ?>
|
|
108
|
+
<h3 class="subsection-title">Requires</h3>
|
|
109
|
+
|
|
110
|
+
<ul><?js doc.requires.forEach(function(r) { ?>
|
|
111
|
+
<li><?js= self.linkto(r) ?></li>
|
|
112
|
+
<?js }); ?></ul>
|
|
113
|
+
<?js } ?>
|
|
114
|
+
|
|
115
|
+
<?js
|
|
116
|
+
var classes = self.find({kind: 'class', memberof: doc.longname});
|
|
117
|
+
if (doc.kind !== 'globalobj' && classes && classes.length) {
|
|
118
|
+
?>
|
|
119
|
+
<h3 class="subsection-title">Classes</h3>
|
|
120
|
+
|
|
121
|
+
<dl><?js classes.forEach(function(c) { ?>
|
|
122
|
+
<dt><?js= self.linkto(c.longname, c.name) ?></dt>
|
|
123
|
+
<dd><?js if (c.summary) { ?><?js= c.summary ?><?js } ?></dd>
|
|
124
|
+
<?js }); ?></dl>
|
|
125
|
+
<?js } ?>
|
|
126
|
+
|
|
127
|
+
<?js
|
|
128
|
+
var namespaces = self.find({kind: 'namespace', memberof: doc.longname});
|
|
129
|
+
if (doc.kind !== 'globalobj' && namespaces && namespaces.length) {
|
|
130
|
+
?>
|
|
131
|
+
<h3 class="subsection-title">Namespaces</h3>
|
|
132
|
+
|
|
133
|
+
<dl><?js namespaces.forEach(function(n) { ?>
|
|
134
|
+
<dt><a href="namespaces.html#<?js= n.longname ?>"><?js= self.linkto(n.longname, n.name) ?></a></dt>
|
|
135
|
+
<dd><?js if (n.summary) { ?><?js= n.summary ?><?js } ?></dd>
|
|
136
|
+
<?js }); ?></dl>
|
|
137
|
+
<?js } ?>
|
|
138
|
+
|
|
139
|
+
<?js
|
|
140
|
+
if (doc.observables && doc.observables.length) {
|
|
141
|
+
?>
|
|
142
|
+
<h3 class="subsection-title">Observable Properties</h3>
|
|
143
|
+
<dl><?js= self.partial('observables.tmpl', doc.observables) ?></dl>
|
|
144
|
+
|
|
145
|
+
<?js } ?>
|
|
146
|
+
|
|
147
|
+
<?js
|
|
148
|
+
var members = self.find({kind: 'member', memberof: title === 'Global' ? {isUndefined: true} : doc.longname});
|
|
149
|
+
if (members && members.length && members.forEach) {
|
|
150
|
+
?>
|
|
151
|
+
<h3 class="subsection-title">Members</h3>
|
|
152
|
+
|
|
153
|
+
<dl><?js members.forEach(function(p) { ?>
|
|
154
|
+
<?js= self.partial('members.tmpl', p) ?>
|
|
155
|
+
<?js }); ?></dl>
|
|
156
|
+
<?js } ?>
|
|
157
|
+
|
|
158
|
+
<?js
|
|
159
|
+
var methods = self.find({kind: 'function', memberof: title === 'Global' ? {isUndefined: true} : doc.longname});
|
|
160
|
+
if (methods && methods.length && methods.forEach) {
|
|
161
|
+
?>
|
|
162
|
+
<h3 class="subsection-title"><?js= doc.kind === 'module' ? 'Functions' : 'Methods' ?></h3>
|
|
163
|
+
|
|
164
|
+
<dl><?js methods.forEach(function(m) { ?>
|
|
165
|
+
<?js m.parent = doc ?>
|
|
166
|
+
<?js= self.partial('method.tmpl', m) ?>
|
|
167
|
+
<?js }); ?></dl>
|
|
168
|
+
<?js } ?>
|
|
169
|
+
|
|
170
|
+
<?js
|
|
171
|
+
var typedefs = self.find({kind: 'typedef', memberof: title === 'Global' ? {isUndefined: true} : doc.longname});
|
|
172
|
+
if (typedefs && typedefs.length && typedefs.forEach) {
|
|
173
|
+
?>
|
|
174
|
+
<h3 class="subsection-title">Type Definitions</h3>
|
|
175
|
+
|
|
176
|
+
<dl><?js typedefs.forEach(function(e) {
|
|
177
|
+
if (e.signature) {
|
|
178
|
+
?>
|
|
179
|
+
<?js= self.partial('method.tmpl', e) ?>
|
|
180
|
+
<?js
|
|
181
|
+
}
|
|
182
|
+
else {
|
|
183
|
+
?>
|
|
184
|
+
<?js= self.partial('members.tmpl', e) ?>
|
|
185
|
+
<?js
|
|
186
|
+
}
|
|
187
|
+
}); ?></dl>
|
|
188
|
+
<?js } ?>
|
|
189
|
+
|
|
190
|
+
<?js
|
|
191
|
+
var events = self.find({kind: 'event', memberof: title === 'Global' ? {isUndefined: true} : doc.longname});
|
|
192
|
+
if (events && events.length && events.forEach) {
|
|
193
|
+
?>
|
|
194
|
+
<h3 class="subsection-title">Events</h3>
|
|
195
|
+
|
|
196
|
+
<dl><?js events.forEach(function(e) { ?>
|
|
197
|
+
<?js= self.partial('method.tmpl', e) ?>
|
|
198
|
+
<?js }); ?></dl>
|
|
199
|
+
<?js } ?>
|
|
200
|
+
</article>
|
|
201
|
+
|
|
202
|
+
</section>
|
|
203
|
+
<?js } ?>
|
|
204
|
+
|
|
205
|
+
<?js }); ?>
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
<?js
|
|
2
|
+
var data = obj;
|
|
3
|
+
var self = this;
|
|
4
|
+
?>
|
|
5
|
+
<dl class="details">
|
|
6
|
+
<?js
|
|
7
|
+
var properties = data.properties;
|
|
8
|
+
if (properties && properties.length && properties.forEach) {
|
|
9
|
+
?>
|
|
10
|
+
|
|
11
|
+
<h5 class="subsection-title">Properties:</h5>
|
|
12
|
+
|
|
13
|
+
<dl><?js= this.partial('properties.tmpl', properties) ?></dl>
|
|
14
|
+
|
|
15
|
+
<?js } ?>
|
|
16
|
+
|
|
17
|
+
<?js if (data.version) {?>
|
|
18
|
+
<dt class="tag-version">Version:</dt>
|
|
19
|
+
<dd class="tag-version"><ul class="dummy"><li><?js= version ?></li></ul></dd>
|
|
20
|
+
<?js } ?>
|
|
21
|
+
|
|
22
|
+
<?js if (data.since) {?>
|
|
23
|
+
<dt class="tag-since">Since:</dt>
|
|
24
|
+
<dd class="tag-since"><ul class="dummy"><li><?js= since ?></dd>
|
|
25
|
+
<?js } ?>
|
|
26
|
+
|
|
27
|
+
<?js if (data.deprecated) { ?>
|
|
28
|
+
<dt class="important tag-deprecated">Deprecated</dt><?js
|
|
29
|
+
if (data.deprecated === true) { ?><dd class="yes-def tag-deprecated"><ul class="dummy"><li>Yes</li></ul></dd><?js }
|
|
30
|
+
else { ?><dd><ul class="dummy"><li><?js= data.deprecated ?></li><ul></dd><?js }
|
|
31
|
+
?>
|
|
32
|
+
<?js } ?>
|
|
33
|
+
|
|
34
|
+
<?js if (data.author && author.length) {?>
|
|
35
|
+
<dt class="tag-author">Author:</dt>
|
|
36
|
+
<dd class="tag-author">
|
|
37
|
+
<ul><?js author.forEach(function(a) { ?>
|
|
38
|
+
<li><?js= self.resolveAuthorLinks(a) ?></li>
|
|
39
|
+
<?js }); ?></ul>
|
|
40
|
+
</dd>
|
|
41
|
+
<?js } ?>
|
|
42
|
+
|
|
43
|
+
<?js if (data.copyright) {?>
|
|
44
|
+
<dt class="tag-copyright">Copyright:</dt>
|
|
45
|
+
<dd class="tag-copyright"><ul class="dummy"><li><?js= copyright ?></li></ul></dd>
|
|
46
|
+
<?js } ?>
|
|
47
|
+
|
|
48
|
+
<?js if (data.license) {?>
|
|
49
|
+
<dt class="tag-license">License:</dt>
|
|
50
|
+
<dd class="tag-license"><ul class="dummy"><li><?js= license ?></li></ul></dd>
|
|
51
|
+
<?js } ?>
|
|
52
|
+
|
|
53
|
+
<?js if (data.defaultvalue) {?>
|
|
54
|
+
<dt class="tag-default">Default Value:</dt>
|
|
55
|
+
<dd class="tag-default"><ul class="dummy"><li><?js= data.defaultvalue ?></li></ul></dd>
|
|
56
|
+
<?js } ?>
|
|
57
|
+
|
|
58
|
+
<?js if (data.tutorials && tutorials.length) {?>
|
|
59
|
+
<dt class="tag-tutorial">Tutorials:</dt>
|
|
60
|
+
<dd class="tag-tutorial">
|
|
61
|
+
<ul><?js tutorials.forEach(function(t) { ?>
|
|
62
|
+
<li><?js= self.tutoriallink(t) ?></li>
|
|
63
|
+
<?js }); ?></ul>
|
|
64
|
+
</dd>
|
|
65
|
+
<?js } ?>
|
|
66
|
+
|
|
67
|
+
<?js if (data.see && see.length) {?>
|
|
68
|
+
<dt class="tag-see">See:</dt>
|
|
69
|
+
<dd class="tag-see">
|
|
70
|
+
<ul><?js see.forEach(function(s) { ?>
|
|
71
|
+
<li><?js= self.linkto(s) ?></li>
|
|
72
|
+
<?js }); ?></ul>
|
|
73
|
+
</dd>
|
|
74
|
+
<?js } ?>
|
|
75
|
+
|
|
76
|
+
<?js if (data.todo && todo.length) {?>
|
|
77
|
+
<dt class="tag-todo">TODO</dt>
|
|
78
|
+
<dd class="tag-todo">
|
|
79
|
+
<ul><?js todo.forEach(function(t) { ?>
|
|
80
|
+
<li><?js= t ?></li>
|
|
81
|
+
<?js }); ?></ul>
|
|
82
|
+
</dd>
|
|
83
|
+
<?js } ?>
|
|
84
|
+
</dl>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<?js
|
|
2
|
+
var data = obj;
|
|
3
|
+
data.forEach(function(example) {
|
|
4
|
+
if (example.caption) {
|
|
5
|
+
?>
|
|
6
|
+
<p class="code-caption"><?js= example.caption ?></p>
|
|
7
|
+
<?js } ?>
|
|
8
|
+
|
|
9
|
+
<?js if (!example.code.toString().includes('<pre>')) { ?>
|
|
10
|
+
<pre class="prettyprint"><code><?js= example.code ?></code></pre>
|
|
11
|
+
<?js } else { ?>
|
|
12
|
+
<?js= example.code.replace(/<pre>/g, '<pre class="prettyprint">') ?>
|
|
13
|
+
<?js } ?>
|
|
14
|
+
<?js
|
|
15
|
+
});
|
|
16
|
+
?>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<?js
|
|
2
|
+
var data = obj;
|
|
3
|
+
?>
|
|
4
|
+
<?js if (data.description && data.type && data.type.names) { ?>
|
|
5
|
+
<dl>
|
|
6
|
+
<dt>
|
|
7
|
+
<div class="param-desc">
|
|
8
|
+
<?js= data.description ?>
|
|
9
|
+
</div>
|
|
10
|
+
</dt>
|
|
11
|
+
<dt>
|
|
12
|
+
<dl>
|
|
13
|
+
<dt>
|
|
14
|
+
Type
|
|
15
|
+
</dt>
|
|
16
|
+
<dd>
|
|
17
|
+
<?js= this.partial('type.tmpl', data.type.names) ?>
|
|
18
|
+
</dd>
|
|
19
|
+
</dl>
|
|
20
|
+
</dt>
|
|
21
|
+
</dl>
|
|
22
|
+
<?js } else { ?>
|
|
23
|
+
<div class="param-desc">
|
|
24
|
+
<?js if (data.description) { ?>
|
|
25
|
+
<?js= data.description ?>
|
|
26
|
+
<?js } else if (data.type && data.type.names) { ?>
|
|
27
|
+
<?js= this.partial('type.tmpl', data.type.names) ?>
|
|
28
|
+
<?js } ?>
|
|
29
|
+
</div>
|
|
30
|
+
<?js } ?>
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
<?js
|
|
2
|
+
var version = obj.packageInfo.version;
|
|
3
|
+
?>
|
|
4
|
+
<!DOCTYPE html>
|
|
5
|
+
<html lang="en">
|
|
6
|
+
<head>
|
|
7
|
+
<meta charset="UTF-8">
|
|
8
|
+
<title>OL STAC v<?js= version ?> API - <?js= title ?></title>
|
|
9
|
+
<script src="scripts/prettify/prettify.js"></script>
|
|
10
|
+
<script src="scripts/prettify/lang-css.js"></script>
|
|
11
|
+
<script src="https://code.jquery.com/jquery-3.6.0.min.js" crossorigin="anonymous"></script>
|
|
12
|
+
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0/dist/js/bootstrap.bundle.min.js" crossorigin="anonymous"></script>
|
|
13
|
+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0/dist/css/bootstrap.min.css" crossorigin="anonymous">
|
|
14
|
+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.1.2/css/fontawesome.min.css" crossorigin="anonymous">
|
|
15
|
+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.1.2/css/solid.css" crossorigin="anonymous">
|
|
16
|
+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.1.2/css/brands.css" crossorigin="anonymous">
|
|
17
|
+
<link rel="stylesheet" type="text/css" href="styles/prettify-tomorrow.css">
|
|
18
|
+
<link rel="stylesheet" type="text/css" href="styles/jaguar.css">
|
|
19
|
+
<link rel="stylesheet" type="text/css" href="styles/carbon.css">
|
|
20
|
+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/ol/ol.css">
|
|
21
|
+
<link rel="stylesheet" type="text/css" href="/ol-stac/theme/site.css">
|
|
22
|
+
</head>
|
|
23
|
+
<body>
|
|
24
|
+
<header class="navbar navbar-expand-sm navbar-dark mb-3 px-3 py-0 fixed-top" role="navigation">
|
|
25
|
+
<a class="navbar-brand" href="/">OL STAC</a>
|
|
26
|
+
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#olmenu" aria-controls="olmenu" aria-expanded="false" aria-label="Toggle navigation">
|
|
27
|
+
<span class="navbar-toggler-icon"></span>
|
|
28
|
+
</button>
|
|
29
|
+
|
|
30
|
+
<!-- menu items that get hidden below 768px width -->
|
|
31
|
+
<nav class="collapse navbar-collapse" id="olmenu">
|
|
32
|
+
<ul class="navbar-nav ms-auto">
|
|
33
|
+
<li class="nav-item dropdown">
|
|
34
|
+
<a class="nav-link dropdown-toggle" href="#" id="docdropdown" role="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Docs</a>
|
|
35
|
+
<div class="dropdown-menu dropdown-menu-end" aria-labelledby="docdropdown">
|
|
36
|
+
<a class="dropdown-item" href="/ol-stac/doc/">Docs</a>
|
|
37
|
+
<div class="dropdown-divider"></div>
|
|
38
|
+
<a class="dropdown-item" href="/ol-stac/doc/quickstart.html"><i class="fa fa-check fa-fw me-2 fa-lg"></i>Quick Start</a>
|
|
39
|
+
<a class="dropdown-item" href="/ol-stac/doc/faq.html"><i class="fa fa-question fa-fw me-2 fa-lg"></i>FAQ</a>
|
|
40
|
+
<a class="dropdown-item" href="/ol-stac/doc/tutorials/"><i class="fa fa-book fa-fw me-2 fa-lg"></i>Tutorials</a>
|
|
41
|
+
</div>
|
|
42
|
+
</li>
|
|
43
|
+
<li class="nav-item"><a class="nav-link" href="../examples/">Examples</a></li>
|
|
44
|
+
<li class="nav-item active"><a class="nav-link" href="../apidoc/"><i class="fa fa-sitemap me-1"></i>API</a></li>
|
|
45
|
+
<li class="nav-item dropdown">
|
|
46
|
+
<a class="nav-link dropdown-toggle" href="#" id="codedropdown" role="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Code</a>
|
|
47
|
+
<div class="dropdown-menu dropdown-menu-end" aria-labelledby="codedropdown">
|
|
48
|
+
<a class="dropdown-item" href="https://github.com/m-mohr/ol-stac"><i class="fab fa-github fa-fw me-2 fa-lg"></i>Repository</a>
|
|
49
|
+
<a class="dropdown-item" href="/ol-stac/download/"><i class="fa fa-download fa-fw me-2 fa-lg"></i>Download</a>
|
|
50
|
+
</div>
|
|
51
|
+
</li>
|
|
52
|
+
</ul>
|
|
53
|
+
</nav>
|
|
54
|
+
</header>
|
|
55
|
+
|
|
56
|
+
<div class="container-fluid">
|
|
57
|
+
<div id="wrap" class="row">
|
|
58
|
+
<div class="navigation col-md-4 col-lg-3">
|
|
59
|
+
<div class="search-wrapper">
|
|
60
|
+
<div class="search">
|
|
61
|
+
<input id="search" type="text" autocomplete="off" class="form-control input-sm" placeholder="Search Documentation">
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
<div class="navigation-list-wrapper">
|
|
65
|
+
<ul class="navigation-list search-empty"><?js
|
|
66
|
+
const item = this.navigationItems[docs[0].longname];
|
|
67
|
+
const listItem = item
|
|
68
|
+
? this.partial('navigation.tmpl', {
|
|
69
|
+
item: item,
|
|
70
|
+
classes: ' toggle-manual toggle-manual-show',
|
|
71
|
+
})
|
|
72
|
+
: '';
|
|
73
|
+
?><?js= listItem ?>
|
|
74
|
+
<li class="loading">Loading …
|
|
75
|
+
</ul>
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
78
|
+
|
|
79
|
+
<div class="main col-md-8 col-lg-9">
|
|
80
|
+
<h1 class="page-title" data-filename="<?js= filename ?>"><?js= title ?></h1>
|
|
81
|
+
<div id="latest-check" class="alert alert-warning alert-dismissible" role="alert" style="display:none">
|
|
82
|
+
<button id="latest-dismiss" type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
|
83
|
+
This documentation is for OL STAC v<span id="package-version"><?js= version ?></span>. The <a id="latest-link" href="#" class="alert-link">latest</a> is v<span id="latest-version"></span>.
|
|
84
|
+
</div>
|
|
85
|
+
<?js= content ?>
|
|
86
|
+
</div>
|
|
87
|
+
</div>
|
|
88
|
+
</div>
|
|
89
|
+
<script>prettyPrint();</script>
|
|
90
|
+
<script src="scripts/linenumber.js"></script>
|
|
91
|
+
</body>
|
|
92
|
+
</html>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<?js
|
|
2
|
+
var data = obj;
|
|
3
|
+
var self = this;
|
|
4
|
+
?>
|
|
5
|
+
|
|
6
|
+
<?js if (data.kind === 'package') { ?>
|
|
7
|
+
<h3><?js= data.name ?> <?js= data.version ?></h3>
|
|
8
|
+
<?js } ?>
|
|
9
|
+
|
|
10
|
+
<?js if (data.readme) { ?>
|
|
11
|
+
<section>
|
|
12
|
+
<article class="readme"><?js= data.readme ?></article>
|
|
13
|
+
</section>
|
|
14
|
+
<?js } ?>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<?js
|
|
2
|
+
var data = obj;
|
|
3
|
+
var self = this;
|
|
4
|
+
var typeSignature = '';
|
|
5
|
+
|
|
6
|
+
if (data.type && data.type.names) {
|
|
7
|
+
data.type.names.forEach(function (name) {
|
|
8
|
+
typeSignature += '<span class="type-signature type ' + name.toLowerCase() + '">{' + self.linkto(name) + '}</span> ';
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
?>
|
|
12
|
+
<dt class="<?js= (data.stability && data.stability !== 'stable') ? 'unstable' : '' ?>">
|
|
13
|
+
<div class="nameContainer">
|
|
14
|
+
<div class="anchor" id="<?js= id ?>">
|
|
15
|
+
</div>
|
|
16
|
+
<h4 class="name">
|
|
17
|
+
<?js= data.attribs + (data.scope === 'static' ? longname : name.startsWith('module:') ? name.split('/').pop() : name) + typeSignature ?>
|
|
18
|
+
<?js= this.partial('stability.tmpl', data) ?>
|
|
19
|
+
</h4>
|
|
20
|
+
</div>
|
|
21
|
+
<?js if (data.summary) { ?>
|
|
22
|
+
<p class="summary"><?js= summary ?></p>
|
|
23
|
+
<?js } ?>
|
|
24
|
+
</dt>
|
|
25
|
+
<dd class="<?js= (data.stability && data.stability !== 'stable') ? 'unstable' : '' ?>">
|
|
26
|
+
<?js if (data.description) { ?>
|
|
27
|
+
<div class="description">
|
|
28
|
+
<?js= data.description ?>
|
|
29
|
+
</div>
|
|
30
|
+
<?js } ?>
|
|
31
|
+
|
|
32
|
+
<?js= this.partial('details.tmpl', data) ?>
|
|
33
|
+
|
|
34
|
+
<?js if (data.examples && examples.length) { ?>
|
|
35
|
+
<h5>Example<?js= examples.length > 1? 's':'' ?></h5>
|
|
36
|
+
<?js= this.partial('examples.tmpl', examples) ?>
|
|
37
|
+
<?js } ?>
|
|
38
|
+
</dd>
|