ol-stac 0.0.0 → 0.0.1
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 +1 -1
- package/events/ErrorEvent.d.ts +17 -0
- package/events/ErrorEvent.d.ts.map +1 -0
- package/{src/ol/events → events}/ErrorEvent.js +9 -11
- package/events/ErrorEvent.js.map +1 -0
- package/layer/STAC.d.ts +422 -0
- package/layer/STAC.d.ts.map +1 -0
- package/layer/STAC.js +698 -0
- package/layer/STAC.js.map +1 -0
- package/layer/stacUtil.d.ts +46 -0
- package/layer/stacUtil.d.ts.map +1 -0
- package/layer/stacUtil.js +154 -0
- package/layer/stacUtil.js.map +1 -0
- package/package.json +3 -85
- package/source/GeoTIFF2.d.ts +35 -0
- package/source/GeoTIFF2.d.ts.map +1 -0
- package/{src/ol/source → source}/GeoTIFF2.js +9 -16
- package/source/GeoTIFF2.js.map +1 -0
- package/.eslintignore +0 -2
- package/.github/workflows/deploy.yml +0 -67
- package/.github/workflows/publish.yml +0 -32
- package/.github/workflows/release.yml +0 -21
- package/.github/workflows/test.yml +0 -85
- package/CHANGELOG.md +0 -14
- package/DEVELOPING.md +0 -104
- package/config/jsdoc/api/conf.json +0 -38
- package/config/jsdoc/api/index.md +0 -1
- package/config/jsdoc/api/readme.md +0 -65
- package/config/jsdoc/api/template/README.md +0 -3
- package/config/jsdoc/api/template/publish.js +0 -743
- package/config/jsdoc/api/template/static/scripts/linenumber.js +0 -11
- package/config/jsdoc/api/template/static/scripts/main.js +0 -305
- package/config/jsdoc/api/template/static/scripts/prettify/Apache-License-2.0.txt +0 -202
- package/config/jsdoc/api/template/static/scripts/prettify/lang-css.js +0 -2
- package/config/jsdoc/api/template/static/scripts/prettify/prettify.js +0 -28
- package/config/jsdoc/api/template/static/styles/carbon.css +0 -65
- package/config/jsdoc/api/template/static/styles/jaguar.css +0 -512
- package/config/jsdoc/api/template/static/styles/prettify-jsdoc.css +0 -111
- package/config/jsdoc/api/template/static/styles/prettify-tomorrow.css +0 -132
- package/config/jsdoc/api/template/static/theme +0 -1
- package/config/jsdoc/api/template/tmpl/container.tmpl +0 -205
- package/config/jsdoc/api/template/tmpl/details.tmpl +0 -84
- package/config/jsdoc/api/template/tmpl/example.tmpl +0 -2
- package/config/jsdoc/api/template/tmpl/examples.tmpl +0 -16
- package/config/jsdoc/api/template/tmpl/exceptions.tmpl +0 -30
- package/config/jsdoc/api/template/tmpl/layout.tmpl +0 -92
- package/config/jsdoc/api/template/tmpl/mainpage.tmpl +0 -14
- package/config/jsdoc/api/template/tmpl/members.tmpl +0 -38
- package/config/jsdoc/api/template/tmpl/method.tmpl +0 -132
- package/config/jsdoc/api/template/tmpl/navigation.tmpl +0 -59
- package/config/jsdoc/api/template/tmpl/observables.tmpl +0 -39
- package/config/jsdoc/api/template/tmpl/params.tmpl +0 -109
- package/config/jsdoc/api/template/tmpl/properties.tmpl +0 -85
- package/config/jsdoc/api/template/tmpl/returns.tmpl +0 -72
- package/config/jsdoc/api/template/tmpl/source.tmpl +0 -8
- package/config/jsdoc/api/template/tmpl/stability.tmpl +0 -7
- package/config/jsdoc/api/template/tmpl/tutorial.tmpl +0 -19
- package/config/jsdoc/api/template/tmpl/type.tmpl +0 -7
- package/config/jsdoc/info/conf.json +0 -22
- package/config/jsdoc/info/publish.js +0 -175
- package/config/jsdoc/package.json +0 -4
- package/config/jsdoc/plugins/api.cjs +0 -181
- package/config/jsdoc/plugins/default-export.cjs +0 -35
- package/config/jsdoc/plugins/define-plugin.cjs +0 -33
- package/config/jsdoc/plugins/events.cjs +0 -39
- package/config/jsdoc/plugins/inline-options.cjs +0 -102
- package/config/jsdoc/plugins/markdown.cjs +0 -119
- package/config/jsdoc/plugins/observable.cjs +0 -69
- package/config/jsdoc/plugins/virtual-plugin.cjs +0 -16
- package/config/rollup-full-build.js +0 -24
- package/config/tsconfig-build.json +0 -25
- package/examples/.eslintrc +0 -29
- package/examples/index.html +0 -100
- package/examples/index.js +0 -109
- package/examples/planetary-computer.html +0 -14
- package/examples/planetary-computer.js +0 -53
- package/examples/resources/Jugl.js +0 -15
- package/examples/resources/common.js +0 -111
- package/examples/stac-collection-webmaplinks.html +0 -9
- package/examples/stac-collection-webmaplinks.js +0 -55
- package/examples/stac-item-from-object.html +0 -9
- package/examples/stac-item-from-object.js +0 -102
- package/examples/stac-item-tileserver.html +0 -9
- package/examples/stac-item-tileserver.js +0 -34
- package/examples/stac-item.html +0 -9
- package/examples/stac-item.js +0 -45
- package/examples/stac-itemcollection.html +0 -11
- package/examples/stac-itemcollection.js +0 -39
- package/examples/templates/example.html +0 -206
- package/examples/templates/readme.md +0 -3
- package/examples/webpack/config.mjs +0 -69
- package/examples/webpack/example-builder.js +0 -410
- package/site/build.js +0 -26
- package/site/layouts/default.hbs +0 -78
- package/site/src/doc/faq.md +0 -8
- package/site/src/doc/index.md +0 -22
- package/site/src/doc/quickstart.md +0 -121
- package/site/src/doc/tutorials/index.md +0 -8
- package/site/src/download/index.hbs +0 -62
- package/site/src/favicon.ico +0 -0
- package/site/src/index.hbs +0 -71
- package/site/src/theme/index.css +0 -26
- package/site/src/theme/site.css +0 -531
- package/src/ol/layer/STAC.js +0 -780
- package/src/ol/layer/stacUtil.js +0 -169
- package/tasks/.eslintrc +0 -5
- package/tasks/build-website.sh +0 -90
- package/tasks/create-release.js +0 -107
- package/tasks/generate-index.js +0 -125
- package/tasks/generate-info.js +0 -189
- package/tasks/get-latest-release.js +0 -36
- package/tasks/newest-tag.js +0 -52
- package/tasks/prepare-package.js +0 -46
- package/tasks/publish.sh +0 -90
- package/test/README.md +0 -56
- package/test/browser/.eslintrc +0 -14
- package/test/browser/karma.config.cjs +0 -94
- package/test/browser/spec/ol/layer/STAC.test.js +0 -18
- package/test/browser/test-extensions.js +0 -419
- package/tsconfig.json +0 -62
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
<?js
|
|
2
|
-
var data = obj;
|
|
3
|
-
var self = this;
|
|
4
|
-
var version = self.find({kind: 'package' })[0].version;
|
|
5
|
-
if (/-dev$/.test(version)) {
|
|
6
|
-
version = 'main';
|
|
7
|
-
} else {
|
|
8
|
-
version = 'v' + version;
|
|
9
|
-
}
|
|
10
|
-
?>
|
|
11
|
-
<dt class="<?js= (data.stability && data.stability !== 'stable') ? 'unstable' : '' ?>">
|
|
12
|
-
<?js if (data.stability || kind !== 'class') { ?>
|
|
13
|
-
<div class="nameContainer<?js if (data.inherited) { ?> inherited<?js } ?>">
|
|
14
|
-
<div class="anchor" id="<?js= id ?>">
|
|
15
|
-
</div>
|
|
16
|
-
<h4 class="name">
|
|
17
|
-
<?js= data.attribs + (kind === 'class' ? 'new ' : '') + this.getShortName(longname) + (kind !== 'event' ? data.signature : '') ?>
|
|
18
|
-
<?js if (data.inherited || data.inherits) { ?>
|
|
19
|
-
<span class="inherited"><?js= this.linkto(data.inherits, 'inherited') ?></span>
|
|
20
|
-
<?js } ?>
|
|
21
|
-
<?js= this.partial('stability.tmpl', data) ?>
|
|
22
|
-
</h4>
|
|
23
|
-
<?js if (data.meta) {?>
|
|
24
|
-
<div class="tag-source">
|
|
25
|
-
<a href="https://github.com/m-mohr/ol-stac/blob/<?js= version ?>/src/ol/<?js= meta.filename ?>"><?js= meta.filename ?></a>,
|
|
26
|
-
<a href="https://github.com/m-mohr/ol-stac/blob/<?js= version ?>/src/ol/<?js= meta.filename ?>#L<?js= meta.lineno ?>">line <?js= meta.lineno ?></a>
|
|
27
|
-
</div>
|
|
28
|
-
<?js } ?>
|
|
29
|
-
</div>
|
|
30
|
-
<?js } ?>
|
|
31
|
-
<?js if (data.summary) { ?>
|
|
32
|
-
<p class="summary"><?js= summary ?></p>
|
|
33
|
-
<?js } ?>
|
|
34
|
-
</dt>
|
|
35
|
-
<dd class="<?js= (data.stability && data.stability !== 'stable') ? 'unstable' : '' ?>">
|
|
36
|
-
|
|
37
|
-
<?js if (data.parent && data.parent.kind == 'module') { ?>
|
|
38
|
-
<?js const importName = data.isDefaultExport ? data.name : `{${data.name}}`; ?>
|
|
39
|
-
<pre class="prettyprint source"><code>import <?js= importName ?> from '<?js= data.parent.name ?>';</code></pre>
|
|
40
|
-
<?js } ?>
|
|
41
|
-
|
|
42
|
-
<?js if (data.description) { ?>
|
|
43
|
-
<div class="description">
|
|
44
|
-
<?js= data.description ?>
|
|
45
|
-
</div>
|
|
46
|
-
<?js } ?>
|
|
47
|
-
|
|
48
|
-
<?js if (kind === 'event' && data.type && data.type.names) {?>
|
|
49
|
-
<h5>Type:</h5>
|
|
50
|
-
<ul>
|
|
51
|
-
<li>
|
|
52
|
-
<?js= self.partial('type.tmpl', data.type.names) ?>
|
|
53
|
-
</li>
|
|
54
|
-
</ul>
|
|
55
|
-
<?js } ?>
|
|
56
|
-
|
|
57
|
-
<?js if (data['this']) { ?>
|
|
58
|
-
<h5>This:</h5>
|
|
59
|
-
<ul><li><?js= this.linkto(data['this']) ?></li></ul>
|
|
60
|
-
<?js } ?>
|
|
61
|
-
|
|
62
|
-
<?js if (data.stability || kind !== 'class') { ?>
|
|
63
|
-
<?js if (data.params && params.length) { ?>
|
|
64
|
-
<?js= this.partial('params.tmpl', params) ?>
|
|
65
|
-
<?js } ?>
|
|
66
|
-
<?js } ?>
|
|
67
|
-
|
|
68
|
-
<?js= this.partial('details.tmpl', data) ?>
|
|
69
|
-
|
|
70
|
-
<?js if (data.fires && fires.length) { ?>
|
|
71
|
-
<h5>Fires:</h5>
|
|
72
|
-
<ul><?js fires.forEach(function(f) {
|
|
73
|
-
var parts = f.split(/#?event:/);
|
|
74
|
-
var type = parts.pop();
|
|
75
|
-
var eventClass = self.find({longname: parts[0]})[0];
|
|
76
|
-
parts = type.split(' ');
|
|
77
|
-
type = parts.shift();
|
|
78
|
-
var description = parts.length ? parts.join(' ') : '';
|
|
79
|
-
var eventDoclet = self.find({longname: f})[0];
|
|
80
|
-
if (eventDoclet && !description && eventDoclet.description) {
|
|
81
|
-
description = eventDoclet.description.replace(/<[^>]*>/g, '');
|
|
82
|
-
}
|
|
83
|
-
?>
|
|
84
|
-
<li class="<?js= (eventDoclet || data).stability !== 'stable' ? 'unstable' : '' ?>">
|
|
85
|
-
<code><?js= eventClass ? self.linkto(f, type) : type ?></code>
|
|
86
|
-
<?js if (eventClass) { ?>
|
|
87
|
-
(<?js= self.linkto(eventClass.longname) ?>)
|
|
88
|
-
<?js } ?>
|
|
89
|
-
<?js= self.partial('stability.tmpl', eventDoclet || (data.stability ? data : {})) ?>
|
|
90
|
-
<?js if (description) { ?> -
|
|
91
|
-
<?js= description ?>
|
|
92
|
-
<?js } ?>
|
|
93
|
-
</li>
|
|
94
|
-
<?js }); ?></ul>
|
|
95
|
-
<?js } ?>
|
|
96
|
-
|
|
97
|
-
<?js if (data.listens && listens.length) { ?>
|
|
98
|
-
<h5>Listens to Events:</h5>
|
|
99
|
-
<ul><?js listens.forEach(function(f) { ?>
|
|
100
|
-
<li><?js= self.linkto(f) ?></li>
|
|
101
|
-
<?js }); ?></ul>
|
|
102
|
-
<?js } ?>
|
|
103
|
-
|
|
104
|
-
<?js if (data.listeners && listeners.length) { ?>
|
|
105
|
-
<h5>Listeners of This Event:</h5>
|
|
106
|
-
<ul><?js listeners.forEach(function(f) { ?>
|
|
107
|
-
<li><?js= self.linkto(f) ?></li>
|
|
108
|
-
<?js }); ?></ul>
|
|
109
|
-
<?js } ?>
|
|
110
|
-
|
|
111
|
-
<?js if (data.exceptions && exceptions.length) { ?>
|
|
112
|
-
<h5>Throws:</h5>
|
|
113
|
-
<?js if (exceptions.length > 1) { ?><ul><?js
|
|
114
|
-
exceptions.forEach(function(r) { ?>
|
|
115
|
-
<li><?js= self.partial('exceptions.tmpl', r) ?></li>
|
|
116
|
-
<?js });
|
|
117
|
-
?></ul><?js } else {
|
|
118
|
-
exceptions.forEach(function(r) { ?>
|
|
119
|
-
<?js= self.partial('exceptions.tmpl', r) ?>
|
|
120
|
-
<?js });
|
|
121
|
-
} } ?>
|
|
122
|
-
|
|
123
|
-
<?js if (data.returns && returns.length) { ?>
|
|
124
|
-
<?js if (returns.length > 1) { ?><h5>Returns:</h5><?js } ?>
|
|
125
|
-
<?js= self.partial('returns.tmpl', data.returns) ?>
|
|
126
|
-
<?js } ?>
|
|
127
|
-
|
|
128
|
-
<?js if (data.examples && examples.length) { ?>
|
|
129
|
-
<h5>Example<?js= examples.length > 1? 's':'' ?></h5>
|
|
130
|
-
<?js= this.partial('examples.tmpl', examples) ?>
|
|
131
|
-
<?js } ?>
|
|
132
|
-
</dd>
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
<?js
|
|
2
|
-
var self = this;
|
|
3
|
-
|
|
4
|
-
function toShortName(name) {
|
|
5
|
-
return name.startsWith('module:') ? name.split('/').pop() : name;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
function getItemCssClass(type) {
|
|
9
|
-
if (type === 'module') {
|
|
10
|
-
return 'fa-plus';
|
|
11
|
-
} else if (type === 'class') {
|
|
12
|
-
return 'fa-chevron-right';
|
|
13
|
-
}
|
|
14
|
-
return '';
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
const printListItem = (member) => {
|
|
18
|
-
const shortName = toShortName(member.name); ?>
|
|
19
|
-
<li data-name="<?js= shortName.toLowerCase() ?>"><?js= self.linkto(member.longname, shortName) ?><?js
|
|
20
|
-
};
|
|
21
|
-
const printListItemWithStability = (member) => {
|
|
22
|
-
const shortName = toShortName(member.name);
|
|
23
|
-
const cls = member.stability && member.stability !== 'stable' ? ' class="unstable"' : ''; ?>
|
|
24
|
-
<li data-name="<?js= shortName.toLowerCase() ?>"<?js= cls ?>><?js= self.linkto(member.longname, shortName) ?><?js
|
|
25
|
-
};
|
|
26
|
-
const printFiresListItem = (eventName) => {
|
|
27
|
-
const ancestor = self.find({longname: eventName})[0] ||
|
|
28
|
-
{longname: eventName, name: eventName.split(/#?event:/)[1]};
|
|
29
|
-
const eventEnum = ancestor.longname.split(/#?event:/)[0];
|
|
30
|
-
if (self.find({longname: eventEnum})[0]) {
|
|
31
|
-
printListItemWithStability(ancestor);
|
|
32
|
-
} else {
|
|
33
|
-
const cls = ancestor.stability && ancestor.stability !== 'stable' ? ' class="unstable"' : '';
|
|
34
|
-
const shortName = toShortName(ancestor.name); ?>
|
|
35
|
-
<li data-name="<?js= shortName.toLowerCase() ?>"<?js= cls ?>><?js= shortName ?><?js
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
function listContent(item, title, listItemPrinter) {
|
|
40
|
-
const type = title.toLowerCase();
|
|
41
|
-
if (item[type] && item[type].length) { ?>
|
|
42
|
-
<div class="member-list" data-type="<?js= type ?>">
|
|
43
|
-
<span class="subtitle"><?js= title ?></span>
|
|
44
|
-
<ul><?js
|
|
45
|
-
item[type].forEach((v) => listItemPrinter(v)); ?>
|
|
46
|
-
</ul>
|
|
47
|
-
</div><?js
|
|
48
|
-
}
|
|
49
|
-
} ?>
|
|
50
|
-
<li class="item item-<?js= item.type ?><?js= obj.classes || '' ?>" data-longname="<?js= item.longname ?>" data-name="<?js= item.prettyname.toLowerCase() ?>">
|
|
51
|
-
<span class="title toggle">
|
|
52
|
-
<span class="fa <?js= getItemCssClass(item.type) ?> me-2 mt-1"></span>
|
|
53
|
-
<span><?js= self.linkto(item.longname, item.prettyname.replace(/[.~\/]/g, '\u200b$&')) ?></span>
|
|
54
|
-
</span><?js
|
|
55
|
-
listContent(item, 'Members', printListItem);
|
|
56
|
-
listContent(item, 'Typedefs', printListItemWithStability);
|
|
57
|
-
listContent(item, 'Methods', printListItemWithStability);
|
|
58
|
-
listContent(item, 'Fires', printFiresListItem);
|
|
59
|
-
?>
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
<?js
|
|
2
|
-
var props = obj;
|
|
3
|
-
?>
|
|
4
|
-
|
|
5
|
-
<table class="props">
|
|
6
|
-
<thead>
|
|
7
|
-
<tr>
|
|
8
|
-
<th>Name</th>
|
|
9
|
-
<th>Type</th>
|
|
10
|
-
<th>Settable</th>
|
|
11
|
-
<th><a href="module-ol_Object.ObjectEvent.html">ObjectEvent</a> type</th>
|
|
12
|
-
<th class="last">Description</th>
|
|
13
|
-
</tr>
|
|
14
|
-
</thead>
|
|
15
|
-
|
|
16
|
-
<tbody>
|
|
17
|
-
<?js
|
|
18
|
-
var self = this;
|
|
19
|
-
var propsByName = {};
|
|
20
|
-
props.forEach(function(prop) {
|
|
21
|
-
if (!prop || propsByName[prop.name]) { return; }
|
|
22
|
-
propsByName[prop.name] = prop;
|
|
23
|
-
var setter = prop.readonly ? 'no' : 'yes';
|
|
24
|
-
?>
|
|
25
|
-
|
|
26
|
-
<tr class="<?js= (prop.stability && prop.stability !== 'stable') ? 'unstable' : '' ?>">
|
|
27
|
-
<td class="name"><code><?js= prop.name ?></code></td>
|
|
28
|
-
<td class="type">
|
|
29
|
-
<?js if (prop.type && prop.type.names) {?>
|
|
30
|
-
<?js= self.partial('type.tmpl', prop.type.names) ?>
|
|
31
|
-
<?js } ?>
|
|
32
|
-
</td>
|
|
33
|
-
<td class="setter"><?js= setter ?></td>
|
|
34
|
-
<td class="event"><code>change:<?js= prop.name.toLowerCase() ?></code></td>
|
|
35
|
-
<td class="description last"><?js= prop.description ?></td>
|
|
36
|
-
</tr>
|
|
37
|
-
<?js }); ?>
|
|
38
|
-
</tbody>
|
|
39
|
-
</table>
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
<?js
|
|
2
|
-
var params = obj;
|
|
3
|
-
|
|
4
|
-
/* sort subparams under their parent params (like opts.classname) */
|
|
5
|
-
var parentParam = null;
|
|
6
|
-
params.forEach(function(param, i) {
|
|
7
|
-
if (!param) { return; }
|
|
8
|
-
if (parentParam && param.name && param.name.startsWith(parentParam.name + '.')) {
|
|
9
|
-
param.name = param.name.substr(parentParam.name.length+1);
|
|
10
|
-
parentParam.subparams = parentParam.subparams || [];
|
|
11
|
-
parentParam.subparams.push(param);
|
|
12
|
-
params[i] = null;
|
|
13
|
-
}
|
|
14
|
-
else {
|
|
15
|
-
parentParam = param;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
/* determine if we need extra "attributes" column */
|
|
20
|
-
params.hasAttributes = false;
|
|
21
|
-
params.hasName = false;
|
|
22
|
-
|
|
23
|
-
var colspan = 2;
|
|
24
|
-
params.forEach(function(param) {
|
|
25
|
-
if (!param) { return; }
|
|
26
|
-
if (param.type && param.type.names && param.type.names.includes('undefined')) {
|
|
27
|
-
param.optional = true;
|
|
28
|
-
}
|
|
29
|
-
if (param.name.startsWith('var_')) {
|
|
30
|
-
params.hasAttributes = true;
|
|
31
|
-
param.variable = true;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
if (param.optional || param.nullable) {
|
|
35
|
-
params.hasAttributes = true;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
if (param.name) {
|
|
39
|
-
params.hasName = true;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
});
|
|
43
|
-
?>
|
|
44
|
-
|
|
45
|
-
<table class="params">
|
|
46
|
-
<thead>
|
|
47
|
-
<tr>
|
|
48
|
-
<?js if (params.hasName) {?>
|
|
49
|
-
<th>Name</th>
|
|
50
|
-
<?js } ?>
|
|
51
|
-
|
|
52
|
-
<th>Type</th>
|
|
53
|
-
|
|
54
|
-
<th class="last">Description</th>
|
|
55
|
-
</tr>
|
|
56
|
-
</thead>
|
|
57
|
-
|
|
58
|
-
<tbody>
|
|
59
|
-
<?js
|
|
60
|
-
var self = this;
|
|
61
|
-
|
|
62
|
-
if (params[0].name === 'options' && params[0].subparams) {
|
|
63
|
-
var onlyOptions = true;
|
|
64
|
-
for (var i = 1; i < params.length; ++i) {
|
|
65
|
-
if (params[i]) {
|
|
66
|
-
onlyOptions = false;
|
|
67
|
-
break;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
if (onlyOptions) {
|
|
71
|
-
var hasName = params.hasName;
|
|
72
|
-
params = params[0].subparams;
|
|
73
|
-
params.hasName = hasName;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
params.forEach(function(param) {
|
|
78
|
-
if (!param) { return; }
|
|
79
|
-
?>
|
|
80
|
-
|
|
81
|
-
<tr class="<?js= (param.stability && param.stability !== 'stable') ? 'unstable' : '' ?>">
|
|
82
|
-
<?js if (params.hasName) {?>
|
|
83
|
-
<td class="name"><code><?js= param.name ?></code></td>
|
|
84
|
-
<?js } ?>
|
|
85
|
-
|
|
86
|
-
<?js if (!param.subparams) {?>
|
|
87
|
-
<td class="type">
|
|
88
|
-
<?js if (param.type && param.type.names) {?>
|
|
89
|
-
<?js= self.partial('type.tmpl', param.type.names) + (param.optional && typeof param.defaultvalue === 'undefined' && !param.type.names.includes('undefined') ? ' | undefined' : '') ?>
|
|
90
|
-
<?js if (typeof param.defaultvalue !== 'undefined') { ?>
|
|
91
|
-
(defaults to <?js= self.htmlsafe(param.defaultvalue) ?>)
|
|
92
|
-
<?js } ?>
|
|
93
|
-
<?js } ?>
|
|
94
|
-
</td>
|
|
95
|
-
|
|
96
|
-
<?js } ?>
|
|
97
|
-
|
|
98
|
-
<td<?js= (param.subparams ? ' colspan=' + colspan : ' ') ?> class="description last">
|
|
99
|
-
<?js if (param.stability) { ?>
|
|
100
|
-
<?js= self.partial('stability.tmpl', param) ?>
|
|
101
|
-
<?js } ?>
|
|
102
|
-
<?js= param.description ?><?js if (param.subparams) { ?>
|
|
103
|
-
<?js= self.partial('params.tmpl', param.subparams) ?>
|
|
104
|
-
<?js } ?></td>
|
|
105
|
-
</tr>
|
|
106
|
-
|
|
107
|
-
<?js }); ?>
|
|
108
|
-
</tbody>
|
|
109
|
-
</table>
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
<?js
|
|
2
|
-
var props = obj;
|
|
3
|
-
|
|
4
|
-
/* sort subprops under their parent props (like opts.classname) */
|
|
5
|
-
var parentProp = null;
|
|
6
|
-
props.forEach(function(prop, i) {
|
|
7
|
-
if (!prop) { return; }
|
|
8
|
-
if (parentProp && prop.name && prop.name.startsWith(parentProp.name + '.')) {
|
|
9
|
-
prop.name = prop.name.substr(parentProp.name.length+1);
|
|
10
|
-
parentProp.subprops = parentProp.subprops || [];
|
|
11
|
-
parentProp.subprops.push(prop);
|
|
12
|
-
props[i] = null;
|
|
13
|
-
}
|
|
14
|
-
else {
|
|
15
|
-
parentProp = prop;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
/* determine if we need extra columns, "attributes" and "default" */
|
|
20
|
-
props.hasAttributes = false;
|
|
21
|
-
props.hasDefault = false;
|
|
22
|
-
props.hasName = false;
|
|
23
|
-
|
|
24
|
-
props.forEach(function(prop) {
|
|
25
|
-
if (!prop) { return; }
|
|
26
|
-
|
|
27
|
-
if (prop.optional || prop.nullable) {
|
|
28
|
-
props.hasAttributes = true;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
if (prop.name) {
|
|
32
|
-
props.hasName = true;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
if (typeof prop.defaultvalue !== 'undefined') {
|
|
36
|
-
props.hasDefault = true;
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
?>
|
|
40
|
-
|
|
41
|
-
<table class="props">
|
|
42
|
-
<thead>
|
|
43
|
-
<tr>
|
|
44
|
-
<?js if (props.hasName) {?>
|
|
45
|
-
<th>Name</th>
|
|
46
|
-
<?js } ?>
|
|
47
|
-
|
|
48
|
-
<th>Type</th>
|
|
49
|
-
|
|
50
|
-
<th class="last">Description</th>
|
|
51
|
-
</tr>
|
|
52
|
-
</thead>
|
|
53
|
-
|
|
54
|
-
<tbody>
|
|
55
|
-
<?js
|
|
56
|
-
var self = this;
|
|
57
|
-
props.forEach(function(prop) {
|
|
58
|
-
if (!prop) { return; }
|
|
59
|
-
?>
|
|
60
|
-
|
|
61
|
-
<tr>
|
|
62
|
-
<?js if (props.hasName) {?>
|
|
63
|
-
<td class="name"><code><?js= prop.name ?></code></td>
|
|
64
|
-
<?js } ?>
|
|
65
|
-
|
|
66
|
-
<td class="type">
|
|
67
|
-
<?js if (prop.type && prop.type.names) {?>
|
|
68
|
-
<?js= self.partial('type.tmpl', prop.type.names) + (prop.optional && typeof prop.defaultvalue === 'undefined' && !prop.type.names.includes('undefined') ? ' | undefined' : '') ?>
|
|
69
|
-
<?js if (typeof prop.defaultvalue !== 'undefined') { ?>
|
|
70
|
-
<br>(defaults to <?js= self.htmlsafe(prop.defaultvalue) ?>)
|
|
71
|
-
<?js } ?>
|
|
72
|
-
<?js } ?>
|
|
73
|
-
</td>
|
|
74
|
-
|
|
75
|
-
<td class="description last">
|
|
76
|
-
<?js= prop.description ?>
|
|
77
|
-
<?js if (prop.subprops) { ?>
|
|
78
|
-
<h6>Properties</h6><?js= self.partial('properties.tmpl', prop.subprops) ?>
|
|
79
|
-
<?js } ?>
|
|
80
|
-
</td>
|
|
81
|
-
</tr>
|
|
82
|
-
|
|
83
|
-
<?js }); ?>
|
|
84
|
-
</tbody>
|
|
85
|
-
</table>
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
<?js
|
|
2
|
-
var returns = obj;
|
|
3
|
-
var parentReturn = null;
|
|
4
|
-
|
|
5
|
-
returns.forEach(function (ret, i) {
|
|
6
|
-
if (ret && (ret.description || ret.name)) {
|
|
7
|
-
ret.description = ret.description.toString().replace(/<\/?p>/g, '');
|
|
8
|
-
|
|
9
|
-
var isNamed = ret.name ? true : false;
|
|
10
|
-
var name = ret.name || ret.description;
|
|
11
|
-
var startSpacePos = name.indexOf(" ");
|
|
12
|
-
|
|
13
|
-
if (parentReturn !== null && name.startsWith(parentReturn.name + '.')) {
|
|
14
|
-
ret.name = isNamed ? name.substr(parentReturn.name.length + 1) : name.substr(parentReturn.name.length + 1, startSpacePos - (parentReturn.name.length + 1));
|
|
15
|
-
|
|
16
|
-
parentReturn.subReturns = parentReturn.subReturns || [];
|
|
17
|
-
parentReturn.subReturns.push(ret);
|
|
18
|
-
returns[i] = null;
|
|
19
|
-
} else {
|
|
20
|
-
if (!isNamed) {
|
|
21
|
-
ret.name = ret.description.substr(0, startSpacePos !== -1 ? startSpacePos : ret.description.length);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
parentReturn = ret;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
?>
|
|
29
|
-
|
|
30
|
-
<?js
|
|
31
|
-
if (returns.length > 1) {
|
|
32
|
-
?>
|
|
33
|
-
<table class="params">
|
|
34
|
-
<thead>
|
|
35
|
-
<tr>
|
|
36
|
-
<th>Name</th>
|
|
37
|
-
<th>Type</th>
|
|
38
|
-
<th class="last">Description</th>
|
|
39
|
-
</tr>
|
|
40
|
-
</thead>
|
|
41
|
-
<tbody>
|
|
42
|
-
<?js
|
|
43
|
-
var self = this;
|
|
44
|
-
returns.forEach(function(ret) {
|
|
45
|
-
if (!ret) {
|
|
46
|
-
return false;
|
|
47
|
-
}
|
|
48
|
-
?>
|
|
49
|
-
<tr>
|
|
50
|
-
<td class="name"><code><?js= ret.name ?></code></td>
|
|
51
|
-
<td class="type">
|
|
52
|
-
<?js
|
|
53
|
-
if (ret.type && ret.type.names) {
|
|
54
|
-
ret.type.names.forEach(function(name, i) { ?>
|
|
55
|
-
<?js= self.linkto(name) ?>
|
|
56
|
-
<?js if (i < ret.type.names.length-1) { ?> | <?js } ?>
|
|
57
|
-
<?js });
|
|
58
|
-
}
|
|
59
|
-
?>
|
|
60
|
-
</td>
|
|
61
|
-
<td class="description last"><?js= ret.description ?><?js if (ret.subReturns) { ?>
|
|
62
|
-
<?js= self.partial('returns.tmpl', ret.subReturns) ?>
|
|
63
|
-
<?js } ?></td>
|
|
64
|
-
</tr>
|
|
65
|
-
<?js }); ?>
|
|
66
|
-
</tbody>
|
|
67
|
-
</table>
|
|
68
|
-
<?js } else if (returns[0].description) { ?>
|
|
69
|
-
<h5>Returns:</h5>
|
|
70
|
-
<?js= returns[0].description ?>
|
|
71
|
-
<br />
|
|
72
|
-
<?js } ?>
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
<section>
|
|
2
|
-
|
|
3
|
-
<header>
|
|
4
|
-
<?js if (children.length > 0) { ?>
|
|
5
|
-
<ul><?js
|
|
6
|
-
var self = this;
|
|
7
|
-
children.forEach(function(t) { ?>
|
|
8
|
-
<li><?js= self.tutoriallink(t.name) ?></li>
|
|
9
|
-
<?js }); ?></ul>
|
|
10
|
-
<?js } ?>
|
|
11
|
-
|
|
12
|
-
<h2><?js= header ?></h2>
|
|
13
|
-
</header>
|
|
14
|
-
|
|
15
|
-
<article>
|
|
16
|
-
<?js= content ?>
|
|
17
|
-
</article>
|
|
18
|
-
|
|
19
|
-
</section>
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"opts": {
|
|
3
|
-
"recurse": true,
|
|
4
|
-
"template": "config/jsdoc/info"
|
|
5
|
-
},
|
|
6
|
-
"tags": {
|
|
7
|
-
"allowUnknownTags": true
|
|
8
|
-
},
|
|
9
|
-
"source": {
|
|
10
|
-
"includePattern": "\\.js$"
|
|
11
|
-
},
|
|
12
|
-
"plugins": [
|
|
13
|
-
"jsdoc-plugin-intersection",
|
|
14
|
-
"jsdoc-plugin-typescript",
|
|
15
|
-
"config/jsdoc/plugins/define-plugin.cjs",
|
|
16
|
-
"config/jsdoc/plugins/virtual-plugin.cjs",
|
|
17
|
-
"config/jsdoc/plugins/default-export.cjs"
|
|
18
|
-
],
|
|
19
|
-
"typescript": {
|
|
20
|
-
"moduleRoot": "src"
|
|
21
|
-
}
|
|
22
|
-
}
|