solid-panes 3.7.3-125af630 → 3.7.3-18da570b
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/dist/RDFXMLPane.js +58 -0
- package/dist/RDFXMLPane.js.map +1 -0
- package/dist/argument/argumentPane.js +61 -0
- package/dist/argument/argumentPane.js.map +1 -0
- package/dist/attach/attachPane.js +394 -0
- package/dist/attach/attachPane.js.map +1 -0
- package/dist/audio/audioPane.js +182 -0
- package/dist/audio/audioPane.js.map +1 -0
- package/dist/classInstancePane.js +92 -0
- package/dist/classInstancePane.js.map +1 -0
- package/dist/dashboard/basicPreferences.js +121 -129
- package/dist/dashboard/basicPreferences.js.map +1 -1
- package/dist/dashboard/dashboardPane.js +60 -54
- package/dist/dashboard/dashboardPane.js.map +1 -1
- package/dist/dashboard/homepage.js +45 -54
- package/dist/dashboard/homepage.js.map +1 -1
- package/dist/dataContentPane.js +259 -0
- package/dist/dataContentPane.js.map +1 -0
- package/dist/defaultPane.js +75 -0
- package/dist/defaultPane.js.map +1 -0
- package/dist/dokieli/dokieliPane.js +169 -0
- package/dist/dokieli/dokieliPane.js.map +1 -0
- package/dist/dokieli/new.js +28 -0
- package/dist/dokieli/new.js.map +1 -0
- package/dist/form/pane.js +185 -0
- package/dist/form/pane.js.map +1 -0
- package/dist/global.d.js +2 -0
- package/dist/global.d.js.map +1 -0
- package/dist/home/homePane.js +60 -55
- package/dist/home/homePane.js.map +1 -1
- package/dist/humanReadablePane.js +135 -0
- package/dist/humanReadablePane.js.map +1 -0
- package/dist/imagePane.js +70 -0
- package/dist/imagePane.js.map +1 -0
- package/dist/index.js +86 -25
- package/dist/index.js.map +1 -1
- package/dist/internal/internalPane.js +168 -179
- package/dist/internal/internalPane.js.map +1 -1
- package/dist/mainPage/footer.js +13 -7
- package/dist/mainPage/footer.js.map +1 -1
- package/dist/mainPage/header.js +59 -58
- package/dist/mainPage/header.js.map +1 -1
- package/dist/mainPage/index.js +19 -24
- package/dist/mainPage/index.js.map +1 -1
- package/dist/microblogPane/microblogPane.js +1031 -0
- package/dist/microblogPane/microblogPane.js.map +1 -0
- package/dist/n3Pane.js +56 -0
- package/dist/n3Pane.js.map +1 -0
- package/dist/outline/context.js +17 -11
- package/dist/outline/context.js.map +1 -1
- package/dist/outline/manager.js +1997 -0
- package/dist/outline/manager.js.map +1 -0
- package/dist/outline/outlineIcons.js +127 -0
- package/dist/outline/outlineIcons.js.map +1 -0
- package/dist/outline/propertyViews.js +39 -28
- package/dist/outline/propertyViews.js.map +1 -1
- package/dist/outline/queryByExample.js +285 -0
- package/dist/outline/queryByExample.js.map +1 -0
- package/dist/outline/userInput.js +1819 -0
- package/dist/outline/userInput.js.map +1 -0
- package/dist/outline/viewAsImage.js +13 -5
- package/dist/outline/viewAsImage.js.map +1 -1
- package/dist/outline/viewAsMbox.js +20 -11
- package/dist/outline/viewAsMbox.js.map +1 -1
- package/dist/pad/padPane.js +395 -404
- package/dist/pad/padPane.js.map +1 -1
- package/dist/playlist/playlistPane.js +124 -0
- package/dist/playlist/playlistPane.js.map +1 -0
- package/dist/registerPanes.js +146 -0
- package/dist/registerPanes.js.map +1 -0
- package/dist/schedule/schedulePane.js +888 -0
- package/dist/schedule/schedulePane.js.map +1 -0
- package/dist/sharing/sharingPane.js +36 -32
- package/dist/sharing/sharingPane.js.map +1 -1
- package/dist/slideshow/slideshowPane.js +80 -0
- package/dist/slideshow/slideshowPane.js.map +1 -0
- package/dist/socialPane.js +430 -0
- package/dist/socialPane.js.map +1 -0
- package/dist/tabbed/tabbedPane.js +54 -51
- package/dist/tabbed/tabbedPane.js.map +1 -1
- package/dist/tableViewPane.js +57 -0
- package/dist/tableViewPane.js.map +1 -0
- package/dist/transaction/pane.js +478 -0
- package/dist/transaction/pane.js.map +1 -0
- package/dist/transaction/period.js +324 -0
- package/dist/transaction/period.js.map +1 -0
- package/dist/trip/tripPane.js +175 -0
- package/dist/trip/tripPane.js.map +1 -0
- package/dist/trustedApplications/trustedApplications.dom.js +134 -146
- package/dist/trustedApplications/trustedApplications.dom.js.map +1 -1
- package/dist/trustedApplications/trustedApplications.utils.js +20 -20
- package/dist/trustedApplications/trustedApplications.utils.js.map +1 -1
- package/dist/trustedApplications/trustedApplications.view.js +51 -57
- package/dist/trustedApplications/trustedApplications.view.js.map +1 -1
- package/dist/types.js +5 -1
- package/dist/types.js.map +1 -1
- package/dist/ui/pane.js +147 -0
- package/dist/ui/pane.js.map +1 -0
- package/dist/versionInfo.js +35 -29
- package/dist/versionInfo.js.map +1 -1
- package/dist/video/videoPane.js +43 -0
- package/dist/video/videoPane.js.map +1 -0
- package/package.json +4 -3
|
@@ -1,62 +1,56 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
import { icons, login, widgets } from 'solid-ui';
|
|
11
|
-
import { store } from 'solid-logic';
|
|
12
|
-
import { createApplicationTable, createContainer, createText } from './trustedApplications.dom';
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _solidUi = require("solid-ui");
|
|
8
|
+
var _solidLogic = require("solid-logic");
|
|
9
|
+
var _trustedApplications = require("./trustedApplications.dom");
|
|
13
10
|
const thisColor = '#418d99';
|
|
14
11
|
const trustedApplicationView = {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
return div;
|
|
33
|
-
}
|
|
12
|
+
global: true,
|
|
13
|
+
icon: `${_solidUi.icons.iconBase}noun_15177.svg`,
|
|
14
|
+
name: 'trustedApplications',
|
|
15
|
+
label: () => null,
|
|
16
|
+
render: (subject, context) => {
|
|
17
|
+
const dom = context.dom;
|
|
18
|
+
const div = dom.createElement('div');
|
|
19
|
+
div.classList.add('trusted-applications-pane');
|
|
20
|
+
div.setAttribute('style', 'border: 0.3em solid ' + thisColor + '; border-radius: 0.5em; padding: 0.7em; margin-top:0.7em;');
|
|
21
|
+
const table = div.appendChild(dom.createElement('table'));
|
|
22
|
+
const main = table.appendChild(dom.createElement('tr'));
|
|
23
|
+
const bottom = table.appendChild(dom.createElement('tr'));
|
|
24
|
+
const statusArea = bottom.appendChild(dom.createElement('div'));
|
|
25
|
+
statusArea.setAttribute('style', 'padding: 0.7em;');
|
|
26
|
+
render(dom, main, statusArea).catch(err => statusArea.appendChild(_solidUi.widgets.errorMessageBlock(dom, err)));
|
|
27
|
+
return div;
|
|
28
|
+
}
|
|
34
29
|
};
|
|
35
|
-
function render(dom, main, statusArea) {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
});
|
|
30
|
+
async function render(dom, main, statusArea) {
|
|
31
|
+
const authContext = await _solidUi.login.ensureLoadedProfile({
|
|
32
|
+
dom,
|
|
33
|
+
div: main,
|
|
34
|
+
statusArea,
|
|
35
|
+
me: null
|
|
36
|
+
});
|
|
37
|
+
const subject = authContext.me;
|
|
38
|
+
const profile = subject.doc();
|
|
39
|
+
if (!_solidLogic.store.updater) {
|
|
40
|
+
throw new Error('Store has no updater');
|
|
41
|
+
}
|
|
42
|
+
const editable = _solidLogic.store.updater.editable(profile.uri, _solidLogic.store);
|
|
43
|
+
main.appendChild((0, _trustedApplications.createText)('h3', 'Manage your trusted applications'));
|
|
44
|
+
if (!editable) {
|
|
45
|
+
main.appendChild(_solidUi.widgets.errorMessageBlock(dom, `Your profile ${subject.doc().uri} is not editable, so we cannot do much here.`));
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
main.appendChild((0, _trustedApplications.createText)('p', 'Here you can manage the applications you trust.'));
|
|
49
|
+
const applicationsTable = (0, _trustedApplications.createApplicationTable)(subject);
|
|
50
|
+
main.appendChild(applicationsTable);
|
|
51
|
+
main.appendChild((0, _trustedApplications.createText)('h4', 'Notes'));
|
|
52
|
+
main.appendChild((0, _trustedApplications.createContainer)('ol', [main.appendChild((0, _trustedApplications.createText)('li', 'Trusted applications will get access to all resources that you have access to.')), main.appendChild((0, _trustedApplications.createText)('li', 'You can limit which modes they have by default.')), main.appendChild((0, _trustedApplications.createText)('li', 'They will not gain more access than you have.'))]));
|
|
53
|
+
main.appendChild((0, _trustedApplications.createText)('p', 'Application URLs must be valid URL. Examples are http://localhost:3000, https://trusted.app, and https://sub.trusted.app.'));
|
|
60
54
|
}
|
|
61
|
-
|
|
55
|
+
var _default = exports.default = trustedApplicationView;
|
|
62
56
|
//# sourceMappingURL=trustedApplications.view.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trustedApplications.view.js","
|
|
1
|
+
{"version":3,"file":"trustedApplications.view.js","names":["_solidUi","require","_solidLogic","_trustedApplications","thisColor","trustedApplicationView","global","icon","icons","iconBase","name","label","render","subject","context","dom","div","createElement","classList","add","setAttribute","table","appendChild","main","bottom","statusArea","catch","err","widgets","errorMessageBlock","authContext","login","ensureLoadedProfile","me","profile","doc","store","updater","Error","editable","uri","createText","applicationsTable","createApplicationTable","createContainer","_default","exports","default"],"sources":["../../src/trustedApplications/trustedApplications.view.ts"],"sourcesContent":["import { PaneDefinition } from 'pane-registry'\nimport { NamedNode } from 'rdflib'\nimport { icons, login, widgets } from 'solid-ui'\nimport { store } from 'solid-logic'\nimport { createApplicationTable, createContainer, createText } from './trustedApplications.dom'\n\nconst thisColor = '#418d99'\n\nconst trustedApplicationView: PaneDefinition = {\n global: true,\n icon: `${icons.iconBase}noun_15177.svg`,\n name: 'trustedApplications',\n label: () => null,\n render: (subject, context) => {\n const dom = context.dom\n const div = dom.createElement('div')\n div.classList.add('trusted-applications-pane')\n div.setAttribute(\n 'style',\n 'border: 0.3em solid ' +\n thisColor +\n '; border-radius: 0.5em; padding: 0.7em; margin-top:0.7em;'\n )\n const table = div.appendChild(dom.createElement('table'))\n const main = table.appendChild(dom.createElement('tr'))\n const bottom = table.appendChild(dom.createElement('tr'))\n const statusArea = bottom.appendChild(dom.createElement('div'))\n statusArea.setAttribute('style', 'padding: 0.7em;')\n render(dom, main, statusArea).catch(err => statusArea.appendChild(widgets.errorMessageBlock(dom, err)))\n return div\n }\n}\n\nasync function render (dom, main, statusArea): Promise<void> {\n const authContext = await login.ensureLoadedProfile({ dom, div: main, statusArea, me: null })\n const subject = authContext.me as NamedNode\n\n const profile = subject.doc()\n if (!store.updater) {\n throw new Error('Store has no updater')\n }\n const editable = store.updater.editable(profile.uri, store)\n\n main.appendChild(createText('h3', 'Manage your trusted applications'))\n\n if (!editable) {\n main.appendChild(\n widgets.errorMessageBlock(dom, `Your profile ${subject.doc().uri} is not editable, so we cannot do much here.`)\n )\n return\n }\n\n main.appendChild(createText('p', 'Here you can manage the applications you trust.'))\n\n const applicationsTable = createApplicationTable(subject)\n main.appendChild(applicationsTable)\n\n main.appendChild(createText('h4', 'Notes'))\n main.appendChild(\n createContainer('ol', [\n main.appendChild(\n createText(\n 'li',\n 'Trusted applications will get access to all resources that you have access to.'\n )\n ),\n main.appendChild(\n createText('li', 'You can limit which modes they have by default.')\n ),\n main.appendChild(\n createText('li', 'They will not gain more access than you have.')\n )\n ])\n )\n main.appendChild(\n createText('p', 'Application URLs must be valid URL. Examples are http://localhost:3000, https://trusted.app, and https://sub.trusted.app.')\n )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WAAW,CACd,IAAAmB,+BAAU,EACR,IAAI,EACJ,gFACF,CACF,CAAC,EACDlB,IAAI,CAACD,WAAW,CACd,IAAAmB,+BAAU,EAAC,IAAI,EAAE,iDAAiD,CACpE,CAAC,EACDlB,IAAI,CAACD,WAAW,CACd,IAAAmB,+BAAU,EAAC,IAAI,EAAE,+CAA+C,CAClE,CAAC,CACF,CACH,CAAC;EACDlB,IAAI,CAACD,WAAW,CACd,IAAAmB,+BAAU,EAAC,GAAG,EAAE,2HAA2H,CAC7I,CAAC;AACH;AAAC,IAAAI,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEc1C,sBAAsB","ignoreList":[]}
|
package/dist/types.js
CHANGED
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","
|
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["../src/types.ts"],"sourcesContent":["interface SolidAuthorization {\n\n access_token: string\n\n client_id: string\n\n id_token: string\n}\n\ninterface SolidClaim {\n\n at_hash: string\n aud: string\n azp: string\n cnf: {\n jwk: string\n }\n exp: number\n iat: number\n iss: string\n jti: string\n nonce: string\n sub: string\n}\n\nexport interface SolidSession {\n authorization: SolidAuthorization\n credentialType: string\n idClaims: SolidClaim\n idp: string\n issuer: string\n sessionKey: string\n webId: string\n}\n"],"mappings":"","ignoreList":[]}
|
package/dist/ui/pane.js
ADDED
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var UI = _interopRequireWildcard(require("solid-ui"));
|
|
8
|
+
var $rdf = _interopRequireWildcard(require("rdflib"));
|
|
9
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
10
|
+
/* Form building/editing Pane
|
|
11
|
+
**
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
const ns = UI.ns;
|
|
15
|
+
var _default = exports.default = {
|
|
16
|
+
// noun_170702.svg' builder noun_122196.svg form
|
|
17
|
+
icon: UI.icons.iconBase + 'noun_170702.svg',
|
|
18
|
+
name: 'ui',
|
|
19
|
+
audience: [ns.solid('PowerUser')],
|
|
20
|
+
// Does the subject deserve this pane?
|
|
21
|
+
label: function (subject, context) {
|
|
22
|
+
const ns = UI.ns;
|
|
23
|
+
const kb = context.session.store;
|
|
24
|
+
const t = kb.findTypeURIs(subject);
|
|
25
|
+
if (t[ns.rdfs('Class').uri]) return 'creation forms';
|
|
26
|
+
// if (t[ns.rdf('Property').uri]) return "user interface";
|
|
27
|
+
if (t[ns.ui('Form').uri]) return 'edit form';
|
|
28
|
+
return null; // No under other circumstances (while testing at least!)
|
|
29
|
+
},
|
|
30
|
+
render: function (subject, context) {
|
|
31
|
+
const dom = context.dom;
|
|
32
|
+
const kb = context.session.store;
|
|
33
|
+
const ns = UI.ns;
|
|
34
|
+
const box = dom.createElement('div');
|
|
35
|
+
box.setAttribute('class', 'formPane'); // Share styles
|
|
36
|
+
const label = UI.utils.label(subject);
|
|
37
|
+
const mention = function complain(message, style) {
|
|
38
|
+
const pre = dom.createElement('p');
|
|
39
|
+
pre.setAttribute('style', style || 'color: grey; background-color: white');
|
|
40
|
+
box.appendChild(pre).textContent = message;
|
|
41
|
+
return pre;
|
|
42
|
+
};
|
|
43
|
+
const complain = function complain(message, style) {
|
|
44
|
+
mention(message, 'style', style || 'color: grey; background-color: #fdd');
|
|
45
|
+
};
|
|
46
|
+
const complainIfBad = function (ok, body) {
|
|
47
|
+
if (ok) {
|
|
48
|
+
// setModifiedDate(store, kb, store);
|
|
49
|
+
// rerender(box); // Deleted forms at the moment
|
|
50
|
+
} else complain('Sorry, failed to save your change:\n' + body);
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
// //////////////////////////////////////////////////////////////////////////////
|
|
54
|
+
|
|
55
|
+
const t = kb.findTypeURIs(subject);
|
|
56
|
+
let store = null;
|
|
57
|
+
let docuri;
|
|
58
|
+
if (subject.uri) {
|
|
59
|
+
docuri = $rdf.Util.uri.docpart(subject.uri);
|
|
60
|
+
if (subject.uri !== docuri && kb.updater.editable(docuri)) {
|
|
61
|
+
store = kb.sym($rdf.Util.uri.docpart(subject.uri));
|
|
62
|
+
} // an editable ontology with hash
|
|
63
|
+
}
|
|
64
|
+
if (!store) store = kb.any(kb.sym(docuri), ns.link('annotationStore'));
|
|
65
|
+
if (!store) store = UI.widgets.defaultAnnotationStore(subject);
|
|
66
|
+
if (!store) {
|
|
67
|
+
store = kb.sym('https://formsregistry.solid.community/public/formRegistry/'); // fallback
|
|
68
|
+
}
|
|
69
|
+
// if (!store) store = kb.sym('http://tabulator.org/wiki/ontologyAnnotation/common') // fallback
|
|
70
|
+
|
|
71
|
+
// A fallback which gives a different store page for each ontology would be good @@
|
|
72
|
+
|
|
73
|
+
let pred;
|
|
74
|
+
if (t[ns.rdfs('Class').uri]) {
|
|
75
|
+
// Stuff we can do before we load the store
|
|
76
|
+
}
|
|
77
|
+
const wait = mention('(Loading data from: ' + store + ')');
|
|
78
|
+
kb.fetcher.nowOrWhenFetched(store.uri, subject, function (ok, body) {
|
|
79
|
+
if (!ok) {
|
|
80
|
+
complain('Cannot load store ' + store + ' :' + body);
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
box.removeChild(wait);
|
|
84
|
+
|
|
85
|
+
// Render a Class -- the forms associated with it
|
|
86
|
+
|
|
87
|
+
if (t[ns.rdfs('Class').uri]) {
|
|
88
|
+
// For each creation form, allow one to create a new object with it, and also to edit the form.
|
|
89
|
+
const displayFormsForRelation = function displayFormsForRelation(pred, allowCreation) {
|
|
90
|
+
const sts = kb.statementsMatching(subject, pred);
|
|
91
|
+
const outliner = context.getOutliner(dom);
|
|
92
|
+
if (sts.length) {
|
|
93
|
+
for (let i = 0; i < sts.length; i++) {
|
|
94
|
+
outliner.appendPropertyTRs(box, [sts[i]]);
|
|
95
|
+
const form = sts[i].object;
|
|
96
|
+
const cell = dom.createElement('td');
|
|
97
|
+
box.lastChild.appendChild(cell);
|
|
98
|
+
if (allowCreation) {
|
|
99
|
+
cell.appendChild(UI.widgets.newButton(dom, kb, null, null, subject, form, store, function (ok, body) {
|
|
100
|
+
if (ok) {
|
|
101
|
+
// dom.outlineManager.GotoSubject(newThing@@, true, undefined, true, undefined);
|
|
102
|
+
// rerender(box); // Deleted forms at the moment
|
|
103
|
+
} else {
|
|
104
|
+
complain('Sorry, failed to save your change:\n' + body);
|
|
105
|
+
}
|
|
106
|
+
}));
|
|
107
|
+
}
|
|
108
|
+
let formdef = kb.statementsMatching(form, ns.rdf('type'));
|
|
109
|
+
if (!formdef.length) formdef = kb.statementsMatching(form);
|
|
110
|
+
if (!formdef.length) complain('No data about form');else {
|
|
111
|
+
UI.widgets.editFormButton(dom, box, form, formdef[0].why, complainIfBad);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
box.appendChild(dom.createElement('hr'));
|
|
115
|
+
} else {
|
|
116
|
+
mention('There are currently no known forms to make a ' + label + '.');
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
pred = ns.ui('creationForm');
|
|
120
|
+
box.appendChild(dom.createElement('h2')).textContent = UI.utils.label(pred);
|
|
121
|
+
mention('Creation forms allow you to add information about a new thing,' + ' in this case a new ' + label + '.');
|
|
122
|
+
displayFormsForRelation(pred, true);
|
|
123
|
+
box.appendChild(dom.createElement('hr'));
|
|
124
|
+
mention('You can make a new creation form:');
|
|
125
|
+
box.appendChild(UI.widgets.newButton(dom, kb, subject, pred, ns.ui('Form'), null, store, complainIfBad));
|
|
126
|
+
box.appendChild(dom.createElement('hr'));
|
|
127
|
+
pred = ns.ui('annotationForm');
|
|
128
|
+
box.appendChild(dom.createElement('h2')).textContent = UI.utils.label(pred);
|
|
129
|
+
mention('Annotaion forms allow you to add extra information about a ,' + label + ' we already know about.');
|
|
130
|
+
displayFormsForRelation(pred, false);
|
|
131
|
+
box.appendChild(dom.createElement('hr'));
|
|
132
|
+
mention('You can make a new annotation form:');
|
|
133
|
+
box.appendChild(UI.widgets.newButton(dom, kb, subject, pred, ns.ui('Form'), null, store, complainIfBad));
|
|
134
|
+
mention('(Storing new forms in: ' + store + ')');
|
|
135
|
+
|
|
136
|
+
// Render a Form
|
|
137
|
+
} else if (t[ns.ui('Form').uri]) {
|
|
138
|
+
UI.widgets.appendForm(dom, box, kb, subject, ns.ui('FormForm'), store, complainIfBad);
|
|
139
|
+
} else {
|
|
140
|
+
complain('ui/pane internal error -- Eh?');
|
|
141
|
+
}
|
|
142
|
+
}); // end: when store loded
|
|
143
|
+
|
|
144
|
+
return box;
|
|
145
|
+
}
|
|
146
|
+
}; // ends
|
|
147
|
+
//# sourceMappingURL=pane.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pane.js","names":["UI","_interopRequireWildcard","require","$rdf","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ns","_default","exports","icon","icons","iconBase","name","audience","solid","label","subject","context","kb","session","store","findTypeURIs","rdfs","uri","ui","render","dom","box","createElement","setAttribute","utils","mention","complain","message","style","pre","appendChild","textContent","complainIfBad","ok","body","docuri","Util","docpart","updater","editable","sym","any","link","widgets","defaultAnnotationStore","pred","wait","fetcher","nowOrWhenFetched","removeChild","displayFormsForRelation","allowCreation","sts","statementsMatching","outliner","getOutliner","length","appendPropertyTRs","form","object","cell","lastChild","newButton","formdef","rdf","editFormButton","why","appendForm"],"sources":["../../src/ui/pane.js"],"sourcesContent":["/* Form building/editing Pane\n **\n */\n\nimport * as UI from 'solid-ui'\nimport * as $rdf from 'rdflib'\nconst ns = UI.ns\n\nexport default {\n // noun_170702.svg' builder noun_122196.svg form\n icon: UI.icons.iconBase + 'noun_170702.svg',\n\n name: 'ui',\n\n audience: [ns.solid('PowerUser')],\n\n // Does the subject deserve this pane?\n label: function (subject, context) {\n const ns = UI.ns\n const kb = context.session.store\n const t = kb.findTypeURIs(subject)\n if (t[ns.rdfs('Class').uri]) return 'creation forms'\n // if (t[ns.rdf('Property').uri]) return \"user interface\";\n if (t[ns.ui('Form').uri]) return 'edit form'\n\n return null // No under other circumstances (while testing at least!)\n },\n\n render: function (subject, context) {\n const dom = context.dom\n const kb = context.session.store\n const ns = UI.ns\n\n const box = dom.createElement('div')\n box.setAttribute('class', 'formPane') // Share styles\n const label = UI.utils.label(subject)\n\n const mention = function complain (message, style) {\n const pre = dom.createElement('p')\n pre.setAttribute('style', style || 'color: grey; background-color: white')\n box.appendChild(pre).textContent = message\n return pre\n }\n\n const complain = function complain (message, style) {\n mention(message, 'style', style || 'color: grey; background-color: #fdd')\n }\n\n const complainIfBad = function (ok, body) {\n if (ok) {\n // setModifiedDate(store, kb, store);\n // rerender(box); // Deleted forms at the moment\n } else complain('Sorry, failed to save your change:\\n' + body)\n }\n\n // //////////////////////////////////////////////////////////////////////////////\n\n const t = kb.findTypeURIs(subject)\n\n let store = null\n let docuri\n if (subject.uri) {\n docuri = $rdf.Util.uri.docpart(subject.uri)\n if (subject.uri !== docuri && kb.updater.editable(docuri)) {\n store = kb.sym($rdf.Util.uri.docpart(subject.uri))\n } // an editable ontology with hash\n }\n if (!store) store = kb.any(kb.sym(docuri), ns.link('annotationStore'))\n if (!store) store = UI.widgets.defaultAnnotationStore(subject)\n\n if (!store) {\n store = kb.sym(\n 'https://formsregistry.solid.community/public/formRegistry/'\n ) // fallback\n }\n // if (!store) store = kb.sym('http://tabulator.org/wiki/ontologyAnnotation/common') // fallback\n\n // A fallback which gives a different store page for each ontology would be good @@\n\n let pred\n if (t[ns.rdfs('Class').uri]) {\n // Stuff we can do before we load the store\n }\n\n const wait = mention('(Loading data from: ' + store + ')')\n\n kb.fetcher.nowOrWhenFetched(store.uri, subject, function (ok, body) {\n if (!ok) {\n complain('Cannot load store ' + store + ' :' + body)\n return\n }\n box.removeChild(wait)\n\n // Render a Class -- the forms associated with it\n\n if (t[ns.rdfs('Class').uri]) {\n // For each creation form, allow one to create a new object with it, and also to edit the form.\n const displayFormsForRelation = function displayFormsForRelation (\n pred,\n allowCreation\n ) {\n const sts = kb.statementsMatching(subject, pred)\n const outliner = context.getOutliner(dom)\n if (sts.length) {\n for (let i = 0; i < sts.length; i++) {\n outliner.appendPropertyTRs(box, [sts[i]])\n const form = sts[i].object\n const cell = dom.createElement('td')\n box.lastChild.appendChild(cell)\n if (allowCreation) {\n cell.appendChild(\n UI.widgets.newButton(\n dom,\n kb,\n null,\n null,\n subject,\n form,\n store,\n function (ok, body) {\n if (ok) {\n // dom.outlineManager.GotoSubject(newThing@@, true, undefined, true, undefined);\n // rerender(box); // Deleted forms at the moment\n } else {\n complain('Sorry, failed to save your change:\\n' + body)\n }\n }\n )\n )\n }\n let formdef = kb.statementsMatching(form, ns.rdf('type'))\n if (!formdef.length) formdef = kb.statementsMatching(form)\n if (!formdef.length) complain('No data about form')\n else {\n UI.widgets.editFormButton(\n dom,\n box,\n form,\n formdef[0].why,\n complainIfBad\n )\n }\n }\n box.appendChild(dom.createElement('hr'))\n } else {\n mention(\n 'There are currently no known forms to make a ' + label + '.'\n )\n }\n }\n\n pred = ns.ui('creationForm')\n box.appendChild(dom.createElement('h2')).textContent = UI.utils.label(\n pred\n )\n mention(\n 'Creation forms allow you to add information about a new thing,' +\n ' in this case a new ' +\n label +\n '.'\n )\n displayFormsForRelation(pred, true)\n box.appendChild(dom.createElement('hr'))\n mention('You can make a new creation form:')\n box.appendChild(\n UI.widgets.newButton(\n dom,\n kb,\n subject,\n pred,\n ns.ui('Form'),\n null,\n store,\n complainIfBad\n )\n )\n\n box.appendChild(dom.createElement('hr'))\n\n pred = ns.ui('annotationForm')\n box.appendChild(dom.createElement('h2')).textContent = UI.utils.label(\n pred\n )\n mention(\n 'Annotaion forms allow you to add extra information about a ,' +\n label +\n ' we already know about.'\n )\n displayFormsForRelation(pred, false)\n box.appendChild(dom.createElement('hr'))\n mention('You can make a new annotation form:')\n box.appendChild(\n UI.widgets.newButton(\n dom,\n kb,\n subject,\n pred,\n ns.ui('Form'),\n null,\n store,\n complainIfBad\n )\n )\n\n mention('(Storing new forms in: ' + store + ')')\n\n // Render a Form\n } else if (t[ns.ui('Form').uri]) {\n UI.widgets.appendForm(\n dom,\n box,\n kb,\n subject,\n ns.ui('FormForm'),\n store,\n complainIfBad\n )\n } else {\n complain('ui/pane internal error -- Eh?')\n }\n }) // end: when store loded\n\n return box\n }\n}\n// ends\n"],"mappings":";;;;;;AAIA,IAAAA,EAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,IAAA,GAAAF,uBAAA,CAAAC,OAAA;AAA8B,SAAAD,wBAAAG,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAL,uBAAA,YAAAA,CAAAG,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,C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12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _default = exports.default = {
|
|
8
|
+
buildTime: '2025-10-06T13:56:14Z',
|
|
9
|
+
commit: '18da570b481d446ffa3642ae4680b2edcdaf13cd',
|
|
10
|
+
npmInfo: {
|
|
11
|
+
'\'solid-panes\'': '\'3.7.3\',',
|
|
12
|
+
npm: '\'10.8.2\',',
|
|
13
|
+
node: '\'20.19.5\',',
|
|
14
|
+
acorn: '\'8.15.0\',',
|
|
15
|
+
ada: '\'2.9.2\',',
|
|
16
|
+
ares: '\'1.34.5\',',
|
|
17
|
+
brotli: '\'1.1.0\',',
|
|
18
|
+
cjs_module_lexer: '\'2.1.0\',',
|
|
19
|
+
cldr: '\'47.0\',',
|
|
20
|
+
icu: '\'77.1\',',
|
|
21
|
+
llhttp: '\'9.3.0\',',
|
|
22
|
+
modules: '\'115\',',
|
|
23
|
+
napi: '\'9\',',
|
|
24
|
+
nghttp2: '\'1.61.0\',',
|
|
25
|
+
openssl: '\'3.0.16\',',
|
|
26
|
+
simdutf: '\'6.4.2\',',
|
|
27
|
+
tz: '\'2025b\',',
|
|
28
|
+
undici: '\'6.21.2\',',
|
|
29
|
+
unicode: '\'16.0\',',
|
|
30
|
+
uv: '\'1.46.0\',',
|
|
31
|
+
uvwasi: '\'0.0.21\',',
|
|
32
|
+
v8: '\'11.3.244.8-node.30\',',
|
|
33
|
+
zlib: '\'1.3.1-470d3a2\'',
|
|
34
|
+
'}': '}'
|
|
35
|
+
}
|
|
30
36
|
};
|
|
31
37
|
//# sourceMappingURL=versionInfo.js.map
|
package/dist/versionInfo.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"versionInfo.js","
|
|
1
|
+
{"version":3,"file":"versionInfo.js","names":["buildTime","commit","npmInfo","npm","node","acorn","ada","ares","brotli","cjs_module_lexer","cldr","icu","llhttp","modules","napi","nghttp2","openssl","simdutf","tz","undici","unicode","uv","uvwasi","v8","zlib"],"sources":["../src/versionInfo.ts"],"sourcesContent":["export default {\n buildTime: '2025-10-06T13:56:14Z',\n commit: '18da570b481d446ffa3642ae4680b2edcdaf13cd',\n npmInfo: {\n '\\'solid-panes\\'': '\\'3.7.3\\',',\n npm: '\\'10.8.2\\',',\n node: '\\'20.19.5\\',',\n acorn: '\\'8.15.0\\',',\n ada: '\\'2.9.2\\',',\n ares: '\\'1.34.5\\',',\n brotli: '\\'1.1.0\\',',\n cjs_module_lexer: '\\'2.1.0\\',',\n cldr: '\\'47.0\\',',\n icu: '\\'77.1\\',',\n llhttp: '\\'9.3.0\\',',\n modules: '\\'115\\',',\n napi: '\\'9\\',',\n nghttp2: '\\'1.61.0\\',',\n openssl: '\\'3.0.16\\',',\n simdutf: '\\'6.4.2\\',',\n tz: '\\'2025b\\',',\n undici: '\\'6.21.2\\',',\n unicode: '\\'16.0\\',',\n uv: '\\'1.46.0\\',',\n uvwasi: '\\'0.0.21\\',',\n v8: '\\'11.3.244.8-node.30\\',',\n zlib: '\\'1.3.1-470d3a2\\'',\n '}': '}',\n }\n}\n"],"mappings":";;;;;;iCAAe;EACbA,SAAS,EAAE,sBAAsB;EACjCC,MAAM,EAAE,0CAA0C;EAClDC,OAAO,EAAE;IACP,iBAAiB,EAAE,YAAY;IAC/BC,GAAG,EAAE,aAAa;IAClBC,IAAI,EAAE,cAAc;IACpBC,KAAK,EAAE,aAAa;IACpBC,GAAG,EAAE,YAAY;IACjBC,IAAI,EAAE,aAAa;IACnBC,MAAM,EAAE,YAAY;IACpBC,gBAAgB,EAAE,YAAY;IAC9BC,IAAI,EAAE,WAAW;IACjBC,GAAG,EAAE,WAAW;IAChBC,MAAM,EAAE,YAAY;IACpBC,OAAO,EAAE,UAAU;IACnBC,IAAI,EAAE,QAAQ;IACdC,OAAO,EAAE,aAAa;IACtBC,OAAO,EAAE,aAAa;IACtBC,OAAO,EAAE,YAAY;IACrBC,EAAE,EAAE,YAAY;IAChBC,MAAM,EAAE,aAAa;IACrBC,OAAO,EAAE,WAAW;IACpBC,EAAE,EAAE,aAAa;IACjBC,MAAM,EAAE,aAAa;IACrBC,EAAE,EAAE,yBAAyB;IAC7BC,IAAI,EAAE,mBAAmB;IACzB,GAAG,EAAE;EACP;AACF,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var UI = _interopRequireWildcard(require("solid-ui"));
|
|
8
|
+
var $rdf = _interopRequireWildcard(require("rdflib"));
|
|
9
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
10
|
+
/* Single video play Pane
|
|
11
|
+
**
|
|
12
|
+
*/
|
|
13
|
+
var _default = exports.default = {
|
|
14
|
+
icon: UI.icons.iconBase + 'noun_1619.svg',
|
|
15
|
+
name: 'video',
|
|
16
|
+
// Does the subject deserve an slideshow pane?
|
|
17
|
+
label: function (subject, context) {
|
|
18
|
+
const kb = context.session.store;
|
|
19
|
+
const typeURIs = kb.findTypeURIs(subject);
|
|
20
|
+
const prefix = $rdf.Util.mediaTypeClass('video/*').uri.split('*')[0];
|
|
21
|
+
for (const t in typeURIs) {
|
|
22
|
+
if (t.startsWith(prefix)) return 'Play video';
|
|
23
|
+
}
|
|
24
|
+
return null;
|
|
25
|
+
},
|
|
26
|
+
render: function (subject, context) {
|
|
27
|
+
const kb = context.session.store;
|
|
28
|
+
const dom = context.dom;
|
|
29
|
+
const div = dom.createElement('div');
|
|
30
|
+
const video = div.appendChild(dom.createElement('video'));
|
|
31
|
+
video.setAttribute('controls', 'yes');
|
|
32
|
+
// get video with authenticated fetch
|
|
33
|
+
kb.fetcher._fetch(subject.uri).then(function (response) {
|
|
34
|
+
return response.blob();
|
|
35
|
+
}).then(function (myBlob) {
|
|
36
|
+
const objectURL = URL.createObjectURL(myBlob);
|
|
37
|
+
video.setAttribute('src', objectURL); // w640 h480 //
|
|
38
|
+
});
|
|
39
|
+
video.setAttribute('width', '100%');
|
|
40
|
+
return div;
|
|
41
|
+
}
|
|
42
|
+
}; // ends
|
|
43
|
+
//# sourceMappingURL=videoPane.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"videoPane.js","names":["UI","_interopRequireWildcard","require","$rdf","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","_default","exports","icon","icons","iconBase","name","label","subject","context","kb","session","store","typeURIs","findTypeURIs","prefix","Util","mediaTypeClass","uri","split","startsWith","render","dom","div","createElement","video","appendChild","setAttribute","fetcher","_fetch","then","response","blob","myBlob","objectURL","URL","createObjectURL"],"sources":["../../src/video/videoPane.js"],"sourcesContent":["/* Single video play Pane\n **\n */\nimport * as UI from 'solid-ui'\nimport * as $rdf from 'rdflib'\n\nexport default {\n icon: UI.icons.iconBase + 'noun_1619.svg',\n\n name: 'video',\n\n // Does the subject deserve an slideshow pane?\n label: function (subject, context) {\n const kb = context.session.store\n const typeURIs = kb.findTypeURIs(subject)\n const prefix = $rdf.Util.mediaTypeClass('video/*').uri.split('*')[0]\n for (const t in typeURIs) {\n if (t.startsWith(prefix)) return 'Play video'\n }\n\n return null\n },\n\n render: function (subject, context) {\n const kb = context.session.store\n const dom = context.dom\n const div = dom.createElement('div')\n const video = div.appendChild(dom.createElement('video'))\n video.setAttribute('controls', 'yes')\n // get video with authenticated fetch\n kb.fetcher._fetch(subject.uri)\n .then(function (response) {\n return response.blob()\n })\n .then(function (myBlob) {\n const objectURL = URL.createObjectURL(myBlob)\n video.setAttribute('src', objectURL) // w640 h480 //\n })\n\n video.setAttribute('width', '100%')\n return div\n }\n}\n// ends\n"],"mappings":";;;;;;AAGA,IAAAA,EAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,IAAA,GAAAF,uBAAA,CAAAC,OAAA;AAA8B,SAAAD,wBAAAG,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAL,uBAAA,YAAAA,CAAAG,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA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,aAAa,CAAC,OAAO,CAAC,CAAC;IACzDC,KAAK,CAACE,YAAY,CAAC,UAAU,EAAE,KAAK,CAAC;IACrC;IACAjB,EAAE,CAACkB,OAAO,CAACC,MAAM,CAACrB,OAAO,CAACU,GAAG,CAAC,CAC3BY,IAAI,CAAC,UAAUC,QAAQ,EAAE;MACxB,OAAOA,QAAQ,CAACC,IAAI,CAAC,CAAC;IACxB,CAAC,CAAC,CACDF,IAAI,CAAC,UAAUG,MAAM,EAAE;MACtB,MAAMC,SAAS,GAAGC,GAAG,CAACC,eAAe,CAACH,MAAM,CAAC;MAC7CR,KAAK,CAACE,YAAY,CAAC,KAAK,EAAEO,SAAS,CAAC,EAAC;IACvC,CAAC,CAAC;IAEJT,KAAK,CAACE,YAAY,CAAC,OAAO,EAAE,MAAM,CAAC;IACnC,OAAOJ,GAAG;EACZ;AACF,CAAC,EACD","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "solid-panes",
|
|
3
|
-
"version": "3.7.3-
|
|
3
|
+
"version": "3.7.3-18da570b",
|
|
4
4
|
"description": "Solid-compatible Panes: applets and views for the mashlib and databrowser",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -14,8 +14,9 @@
|
|
|
14
14
|
"clean": "rm -rf dist dist-dev src/versionInfo.ts",
|
|
15
15
|
"build": "npm run clean && npm run build-version && npm run build-js && npm run postbuild-js",
|
|
16
16
|
"build-version": "./timestamp.sh > src/versionInfo.ts && eslint 'src/versionInfo.ts' --fix",
|
|
17
|
-
"build-
|
|
18
|
-
"build-
|
|
17
|
+
"build-js": "npm run build-types && npm run build-babel",
|
|
18
|
+
"build-types": "tsc --emitDeclarationOnly",
|
|
19
|
+
"build-babel": "babel src --out-dir dist --extensions '.ts,.js' --source-maps",
|
|
19
20
|
"postbuild-js": "rm -f dist/versionInfo.d.ts dist/versionInfo.d.ts.map",
|
|
20
21
|
"build-dev": "webpack --progress --mode=development",
|
|
21
22
|
"lint": "eslint",
|