solid-panes 3.6.1-a6940b09 → 3.6.1-f584fd85
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/coverage/clover.xml +2 -2
- package/coverage/lcov-report/index.html +1 -1
- package/coverage/lcov-report/outline/index.html +1 -1
- package/coverage/lcov-report/outline/outlineIcons.js.html +1 -1
- package/coverage/lcov-report/outline/propertyViews.ts.html +1 -1
- package/coverage/lcov-report/outline/viewAsImage.ts.html +1 -1
- package/coverage/lcov-report/outline/viewAsMbox.ts.html +1 -1
- package/coverage/lcov-report/trustedApplications/index.html +1 -1
- package/coverage/lcov-report/trustedApplications/trustedApplications.utils.ts.html +1 -1
- package/lib/dataContentPane.js +1 -0
- package/lib/dataContentPane.js.map +1 -1
- package/lib/dokieli/new.js +1 -1
- package/lib/dokieli/new.js.map +1 -1
- package/lib/versionInfo.js +2 -2
- package/lib/versionInfo.js.map +1 -1
- package/package.json +1 -1
- package/src/dataContentPane.js +2 -1
- package/src/dokieli/new.html +6 -17
- package/src/dokieli/new.js +1 -1
- package/src/versionInfo.ts +2 -2
package/coverage/clover.xml
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<coverage generated="
|
|
3
|
-
<project timestamp="
|
|
2
|
+
<coverage generated="1738516660359" clover="3.2.0">
|
|
3
|
+
<project timestamp="1738516660359" name="All files">
|
|
4
4
|
<metrics statements="125" coveredstatements="125" conditionals="6" coveredconditionals="4" methods="13" coveredmethods="13" elements="144" coveredelements="142" complexity="0" loc="125" ncloc="125" packages="2" files="5" classes="5"/>
|
|
5
5
|
<package name="outline">
|
|
6
6
|
<metrics statements="112" coveredstatements="112" conditionals="6" coveredconditionals="4" methods="7" coveredmethods="7"/>
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
117
117
|
Code coverage generated by
|
|
118
118
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
119
|
-
at 2025-02-02T17:
|
|
119
|
+
at 2025-02-02T17:17:40.351Z
|
|
120
120
|
</div>
|
|
121
121
|
<script src="prettify.js"></script>
|
|
122
122
|
<script>
|
|
@@ -146,7 +146,7 @@
|
|
|
146
146
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
147
147
|
Code coverage generated by
|
|
148
148
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
149
|
-
at 2025-02-02T17:
|
|
149
|
+
at 2025-02-02T17:17:40.351Z
|
|
150
150
|
</div>
|
|
151
151
|
<script src="../prettify.js"></script>
|
|
152
152
|
<script>
|
|
@@ -550,7 +550,7 @@ outlineIcons.termWidgets.addTri = new outlineIcons.OutlinerIcon(
|
|
|
550
550
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
551
551
|
Code coverage generated by
|
|
552
552
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
553
|
-
at 2025-02-02T17:
|
|
553
|
+
at 2025-02-02T17:17:40.351Z
|
|
554
554
|
</div>
|
|
555
555
|
<script src="../prettify.js"></script>
|
|
556
556
|
<script>
|
|
@@ -181,7 +181,7 @@ export function viewsAddPropertyView (views, property, pviewfunc, isDefault) {
|
|
|
181
181
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
182
182
|
Code coverage generated by
|
|
183
183
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
184
|
-
at 2025-02-02T17:
|
|
184
|
+
at 2025-02-02T17:17:40.351Z
|
|
185
185
|
</div>
|
|
186
186
|
<script src="../prettify.js"></script>
|
|
187
187
|
<script>
|
|
@@ -106,7 +106,7 @@ export default (dom) => function viewAsImage (obj) {
|
|
|
106
106
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
107
107
|
Code coverage generated by
|
|
108
108
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
109
|
-
at 2025-02-02T17:
|
|
109
|
+
at 2025-02-02T17:17:40.351Z
|
|
110
110
|
</div>
|
|
111
111
|
<script src="../prettify.js"></script>
|
|
112
112
|
<script>
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
113
113
|
Code coverage generated by
|
|
114
114
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
115
|
-
at 2025-02-02T17:
|
|
115
|
+
at 2025-02-02T17:17:40.351Z
|
|
116
116
|
</div>
|
|
117
117
|
<script src="../prettify.js"></script>
|
|
118
118
|
<script>
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
102
102
|
Code coverage generated by
|
|
103
103
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
104
|
-
at 2025-02-02T17:
|
|
104
|
+
at 2025-02-02T17:17:40.351Z
|
|
105
105
|
</div>
|
|
106
106
|
<script src="../prettify.js"></script>
|
|
107
107
|
<script>
|
|
@@ -223,7 +223,7 @@ export function generateRandomString () {
|
|
|
223
223
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
224
224
|
Code coverage generated by
|
|
225
225
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
226
|
-
at 2025-02-02T17:
|
|
226
|
+
at 2025-02-02T17:17:40.351Z
|
|
227
227
|
</div>
|
|
228
228
|
<script src="../prettify.js"></script>
|
|
229
229
|
<script>
|
package/lib/dataContentPane.js
CHANGED
|
@@ -173,6 +173,7 @@ var dataContentPane = exports.dataContentPane = {
|
|
|
173
173
|
}
|
|
174
174
|
for (var i = 0; i < roots.length; i++) {
|
|
175
175
|
var tr = myDocument.createElement('tr');
|
|
176
|
+
tr.setAttribute('style', "background-color: ".concat(i % 2 === 0 ? '#f0f0f0' : 'white', ";"));
|
|
176
177
|
rep.appendChild(tr);
|
|
177
178
|
var subjectTD = myDocument.createElement('td');
|
|
178
179
|
tr.appendChild(subjectTD);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dataContentPane.js","names":["UI","_interopRequireWildcard","require","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","_typeof","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ns","dataContentPane","exports","icon","icons","originalIconBase","name","audience","solid","label","subject","context","session","store","findTypeURIs","statementsMatching","undefined","length","statementsAsTables","sts","initialRoots","myDocument","dom","rep","createElement","sz","rdf","Serializer","res","rootSubjects","roots","subjects","loopBreakers","x","console","log","doneBnodes","referencedBnodes","propertyTree","lastPred","toStr","appendChild","createTextNode","sort","same","predicateTD","st","tr","predicate","uri","setAttribute","anchor","addEventListener","widgets","openHrefInOutlineMode","utils","predicateLabelForXML","objectTD","objectTree","object","obj","termType","datatype","textContent","value","innerHTML","toNT","slice","newTable","ancestor","style","backgroundColor","elements","paneRegistry","byName","statements","Error","concat","filter","sameTerm","subjectTD","TDTree","root","bNT","table","insertBefore","firstChild","render","alternativeRendering","p","s2","div","plist","kb","outliner","appendPropertyTRs","_pred","_inverse","verticalAlign","td","outlineObjectTD","outlineExpand","pane","mainRendering","holds","push","ps","any","foaf","getOutliner"],"sources":["../src/dataContentPane.js"],"sourcesContent":["/* Data content Pane\n **\n ** This pane shows the content of a particular RDF resource\n ** or at least the RDF semantics we attribute to that resource.\n */\n\n// To do: - Only take data from one graph\n// - Only do forwards not backward?\n// - Expand automatically all the way down\n// - original source view? Use ffox view source\n\nimport * as UI from 'solid-ui'\nconst ns = UI.ns\n\nexport const dataContentPane = {\n icon: UI.icons.originalIconBase + 'rdf_flyer.24.gif',\n\n name: 'dataContents',\n\n audience: [ns.solid('Developer')],\n\n label: function (subject, context) {\n if (\n 'http://www.w3.org/2007/ont/link#ProtocolEvent' in\n context.session.store.findTypeURIs(subject)\n ) {\n return null\n }\n const n = context.session.store.statementsMatching(\n undefined,\n undefined,\n undefined,\n subject\n ).length\n if (n === 0) return null\n return 'Data (' + n + ')'\n },\n /*\n shouldGetFocus: function(subject) {\n return store.whether(subject, UI.ns.rdf('type'), UI.ns.link('RDFDocument'))\n },\n*/\n statementsAsTables: function statementsAsTables (sts, context, initialRoots) {\n const myDocument = context.dom\n // const outliner = context.getOutliner(myDocument)\n const rep = myDocument.createElement('table')\n const sz = UI.rdf.Serializer(context.session.store)\n const res = sz.rootSubjects(sts)\n let roots = res.roots\n const subjects = res.subjects\n const loopBreakers = res.loopBreakers\n for (const x in loopBreakers) {\n console.log('\\tdataContentPane: loopbreaker:' + x)\n }\n const doneBnodes = {} // For preventing looping\n const referencedBnodes = {} // Bnodes which need to be named alas\n\n // The property tree for a single subject or anonymous node\n function propertyTree (subject) {\n // print('Proprty tree for '+subject)\n const rep = myDocument.createElement('table')\n let lastPred = null\n const sts = subjects[sz.toStr(subject)] // relevant statements\n if (!sts) {\n // No statements in tree\n rep.appendChild(myDocument.createTextNode('...')) // just empty bnode as object\n return rep\n }\n sts.sort()\n let same = 0\n let predicateTD // The cell which holds the predicate\n for (let i = 0; i < sts.length; i++) {\n const st = sts[i]\n const tr = myDocument.createElement('tr')\n if (st.predicate.uri !== lastPred) {\n if (lastPred && same > 1) {\n predicateTD.setAttribute('rowspan', '' + same)\n }\n predicateTD = myDocument.createElement('td')\n predicateTD.setAttribute('class', 'pred')\n const anchor = myDocument.createElement('a')\n anchor.setAttribute('href', st.predicate.uri)\n anchor.addEventListener(\n 'click',\n UI.widgets.openHrefInOutlineMode,\n true\n )\n anchor.appendChild(\n myDocument.createTextNode(\n UI.utils.predicateLabelForXML(st.predicate)\n )\n )\n predicateTD.appendChild(anchor)\n tr.appendChild(predicateTD)\n lastPred = st.predicate.uri\n same = 0\n }\n same++\n const objectTD = myDocument.createElement('td')\n objectTD.appendChild(objectTree(st.object))\n tr.appendChild(objectTD)\n rep.appendChild(tr)\n }\n if (lastPred && same > 1) predicateTD.setAttribute('rowspan', '' + same)\n return rep\n }\n\n // Convert a set of statements into a nested tree of tables\n function objectTree (obj) {\n let res, anchor\n switch (obj.termType) {\n case 'NamedNode':\n anchor = myDocument.createElement('a')\n anchor.setAttribute('href', obj.uri)\n anchor.addEventListener(\n 'click',\n UI.widgets.openHrefInOutlineMode,\n true\n )\n anchor.appendChild(myDocument.createTextNode(UI.utils.label(obj)))\n return anchor\n\n case 'Literal':\n if (!obj.datatype || !obj.datatype.uri) {\n res = myDocument.createElement('div')\n res.setAttribute('style', 'white-space: pre-wrap;')\n res.textContent = obj.value\n return res\n } else if (\n obj.datatype.uri ===\n 'http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral'\n ) {\n res = myDocument.createElement('div')\n res.setAttribute('class', 'embeddedXHTML')\n res.innerHTML = obj.value // Try that @@@ beware embedded dangerous code\n return res\n }\n return myDocument.createTextNode(obj.value) // placeholder - could be smarter,\n\n case 'BlankNode': {\n if (obj.toNT() in doneBnodes) {\n // Break infinite recursion\n referencedBnodes[obj.toNT()] = true\n const anchor = myDocument.createElement('a')\n anchor.setAttribute('href', '#' + obj.toNT().slice(2))\n anchor.setAttribute('class', 'bnodeRef')\n anchor.textContent = '*' + obj.toNT().slice(3)\n return anchor\n }\n doneBnodes[obj.toNT()] = true // Flag to prevent infinite recursion in propertyTree\n const newTable = propertyTree(obj)\n doneBnodes[obj.toNT()] = newTable // Track where we mentioned it first\n if (\n UI.utils.ancestor(newTable, 'TABLE') &&\n UI.utils.ancestor(newTable, 'TABLE').style.backgroundColor ===\n 'white'\n ) {\n newTable.style.backgroundColor = '#eee'\n } else {\n newTable.style.backgroundColor = 'white'\n }\n return newTable\n }\n case 'Collection':\n res = myDocument.createElement('table')\n res.setAttribute('class', 'collectionAsTables')\n for (let i = 0; i < obj.elements.length; i++) {\n const tr = myDocument.createElement('tr')\n res.appendChild(tr)\n tr.appendChild(objectTree(obj.elements[i]))\n }\n return res\n case 'Graph':\n res = context.session.paneRegistry\n .byName('dataContents')\n .statementsAsTables(obj.statements, context)\n res.setAttribute('class', 'nestedFormula')\n return res\n case 'Variable':\n res = myDocument.createTextNode('?' + obj.uri)\n return res\n }\n throw new Error('Unhandled node type: ' + obj.termType)\n }\n\n // roots.sort()\n\n if (initialRoots) {\n roots = initialRoots.concat(\n roots.filter(function (x) {\n for (let i = 0; i < initialRoots.length; i++) {\n // Max 2\n if (x.sameTerm(initialRoots[i])) return false\n }\n return true\n })\n )\n }\n for (let i = 0; i < roots.length; i++) {\n const tr = myDocument.createElement('tr')\n rep.appendChild(tr)\n const subjectTD = myDocument.createElement('td')\n tr.appendChild(subjectTD)\n const TDTree = myDocument.createElement('td')\n tr.appendChild(TDTree)\n const root = roots[i]\n if (root.termType === 'BlankNode') {\n subjectTD.appendChild(myDocument.createTextNode(UI.utils.label(root))) // Don't recurse!\n } else {\n subjectTD.appendChild(objectTree(root)) // won't have tree\n }\n TDTree.appendChild(propertyTree(root))\n }\n for (const bNT in referencedBnodes) {\n // Add number to refer to\n const table = doneBnodes[bNT]\n // let tr = myDocument.createElement('tr')\n const anchor = myDocument.createElement('a')\n anchor.setAttribute('id', bNT.slice(2))\n anchor.setAttribute('class', 'bnodeDef')\n anchor.textContent = bNT.slice(3) + ')'\n table.insertBefore(anchor, table.firstChild)\n }\n return rep\n }, // statementsAsTables\n // View the data in a file in user-friendly way\n render: function (subject, context) {\n const myDocument = context.dom\n\n function alternativeRendering () {\n const sz = UI.rdf.Serializer(context.session.store)\n const res = sz.rootSubjects(sts)\n const roots = res.roots\n const p = {}\n p.render = function (s2) {\n const div = myDocument.createElement('div')\n div.setAttribute('class', 'withinDocumentPane')\n const plist = kb.statementsMatching(s2, undefined, undefined, subject)\n outliner.appendPropertyTRs(div, plist, false, function (\n _pred,\n _inverse\n ) {\n return true\n })\n return div\n }\n for (let i = 0; i < roots.length; i++) {\n const tr = myDocument.createElement('TR')\n const root = roots[i]\n tr.style.verticalAlign = 'top'\n const td = outliner.outlineObjectTD(root, undefined, tr)\n tr.appendChild(td)\n div.appendChild(tr)\n outliner.outlineExpand(td, root, { pane: p })\n }\n }\n\n function mainRendering () {\n const initialRoots = [] // Ordering: start with stuff about this doc\n if (kb.holds(subject, undefined, undefined, subject)) {\n initialRoots.push(subject)\n }\n // Then about the primary topic of the document if any\n const ps = kb.any(subject, UI.ns.foaf('primaryTopic'), undefined, subject)\n if (ps) initialRoots.push(ps)\n div.appendChild(\n context.session.paneRegistry\n .byName('dataContents')\n .statementsAsTables(sts, context, initialRoots)\n )\n }\n\n const outliner = context.getOutliner(myDocument)\n const kb = context.session.store\n const div = myDocument.createElement('div')\n div.setAttribute('class', 'dataContentPane')\n // Because of smushing etc, this will not be a copy of the original source\n // We could instead either fetch and re-parse the source,\n // or we could keep all the pre-smushed triples.\n const sts = kb.statementsMatching(undefined, undefined, undefined, subject) // @@ slow with current store!\n\n if (false) { // keep code\n alternativeRendering()\n } else {\n mainRendering()\n }\n return div\n }\n}\n"],"mappings":";;;;;;;AAWA,IAAAA,EAAA,GAAAC,uBAAA,CAAAC,OAAA;AAA8B,SAAAC,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAH,wBAAAG,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,gBAAAK,OAAA,CAAAL,CAAA,0BAAAA,CAAA,sBAAAA,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAA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3CmE,GAAG,CAACzC,YAAY,CAAC,OAAO,EAAE,iBAAiB,CAAC;IAC5C;IACA;IACA;IACA,IAAM/B,GAAG,GAAG0E,EAAE,CAAC9E,kBAAkB,CAACC,SAAS,EAAEA,SAAS,EAAEA,SAAS,EAAEN,OAAO,CAAC,EAAC;;IAE5E,IAAI,KAAK,EAAE;MAAE;MACX8E,oBAAoB,CAAC,CAAC;IACxB,CAAC,MAAM;MACLe,aAAa,CAAC,CAAC;IACjB;IACA,OAAOZ,GAAG;EACZ;AACF,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"dataContentPane.js","names":["UI","_interopRequireWildcard","require","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","_typeof","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ns","dataContentPane","exports","icon","icons","originalIconBase","name","audience","solid","label","subject","context","session","store","findTypeURIs","statementsMatching","undefined","length","statementsAsTables","sts","initialRoots","myDocument","dom","rep","createElement","sz","rdf","Serializer","res","rootSubjects","roots","subjects","loopBreakers","x","console","log","doneBnodes","referencedBnodes","propertyTree","lastPred","toStr","appendChild","createTextNode","sort","same","predicateTD","st","tr","predicate","uri","setAttribute","anchor","addEventListener","widgets","openHrefInOutlineMode","utils","predicateLabelForXML","objectTD","objectTree","object","obj","termType","datatype","textContent","value","innerHTML","toNT","slice","newTable","ancestor","style","backgroundColor","elements","paneRegistry","byName","statements","Error","concat","filter","sameTerm","subjectTD","TDTree","root","bNT","table","insertBefore","firstChild","render","alternativeRendering","p","s2","div","plist","kb","outliner","appendPropertyTRs","_pred","_inverse","verticalAlign","td","outlineObjectTD","outlineExpand","pane","mainRendering","holds","push","ps","any","foaf","getOutliner"],"sources":["../src/dataContentPane.js"],"sourcesContent":["/* Data content Pane\n **\n ** This pane shows the content of a particular RDF resource\n ** or at least the RDF semantics we attribute to that resource.\n */\n\n// To do: - Only take data from one graph\n// - Only do forwards not backward?\n// - Expand automatically all the way down\n// - original source view? Use ffox view source\n\nimport * as UI from 'solid-ui'\nconst ns = UI.ns\n\nexport const dataContentPane = {\n icon: UI.icons.originalIconBase + 'rdf_flyer.24.gif',\n\n name: 'dataContents',\n\n audience: [ns.solid('Developer')],\n\n label: function (subject, context) {\n if (\n 'http://www.w3.org/2007/ont/link#ProtocolEvent' in\n context.session.store.findTypeURIs(subject)\n ) {\n return null\n }\n const n = context.session.store.statementsMatching(\n undefined,\n undefined,\n undefined,\n subject\n ).length\n if (n === 0) return null\n return 'Data (' + n + ')'\n },\n /*\n shouldGetFocus: function(subject) {\n return store.whether(subject, UI.ns.rdf('type'), UI.ns.link('RDFDocument'))\n },\n*/\n statementsAsTables: function statementsAsTables (sts, context, initialRoots) {\n const myDocument = context.dom\n // const outliner = context.getOutliner(myDocument)\n const rep = myDocument.createElement('table')\n const sz = UI.rdf.Serializer(context.session.store)\n const res = sz.rootSubjects(sts)\n let roots = res.roots\n const subjects = res.subjects\n const loopBreakers = res.loopBreakers\n for (const x in loopBreakers) {\n console.log('\\tdataContentPane: loopbreaker:' + x)\n }\n const doneBnodes = {} // For preventing looping\n const referencedBnodes = {} // Bnodes which need to be named alas\n\n // The property tree for a single subject or anonymous node\n function propertyTree (subject) {\n // print('Proprty tree for '+subject)\n const rep = myDocument.createElement('table')\n let lastPred = null\n const sts = subjects[sz.toStr(subject)] // relevant statements\n if (!sts) {\n // No statements in tree\n rep.appendChild(myDocument.createTextNode('...')) // just empty bnode as object\n return rep\n }\n sts.sort()\n let same = 0\n let predicateTD // The cell which holds the predicate\n for (let i = 0; i < sts.length; i++) {\n const st = sts[i]\n const tr = myDocument.createElement('tr')\n if (st.predicate.uri !== lastPred) {\n if (lastPred && same > 1) {\n predicateTD.setAttribute('rowspan', '' + same)\n }\n predicateTD = myDocument.createElement('td')\n predicateTD.setAttribute('class', 'pred')\n const anchor = myDocument.createElement('a')\n anchor.setAttribute('href', st.predicate.uri)\n anchor.addEventListener(\n 'click',\n UI.widgets.openHrefInOutlineMode,\n true\n )\n anchor.appendChild(\n myDocument.createTextNode(\n UI.utils.predicateLabelForXML(st.predicate)\n )\n )\n predicateTD.appendChild(anchor)\n tr.appendChild(predicateTD)\n lastPred = st.predicate.uri\n same = 0\n }\n same++\n const objectTD = myDocument.createElement('td')\n objectTD.appendChild(objectTree(st.object))\n tr.appendChild(objectTD)\n rep.appendChild(tr)\n }\n if (lastPred && same > 1) predicateTD.setAttribute('rowspan', '' + same)\n return rep\n }\n\n // Convert a set of statements into a nested tree of tables\n function objectTree (obj) {\n let res, anchor\n switch (obj.termType) {\n case 'NamedNode':\n anchor = myDocument.createElement('a')\n anchor.setAttribute('href', obj.uri)\n anchor.addEventListener(\n 'click',\n UI.widgets.openHrefInOutlineMode,\n true\n )\n anchor.appendChild(myDocument.createTextNode(UI.utils.label(obj)))\n return anchor\n\n case 'Literal':\n if (!obj.datatype || !obj.datatype.uri) {\n res = myDocument.createElement('div')\n res.setAttribute('style', 'white-space: pre-wrap;')\n res.textContent = obj.value\n return res\n } else if (\n obj.datatype.uri ===\n 'http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral'\n ) {\n res = myDocument.createElement('div')\n res.setAttribute('class', 'embeddedXHTML')\n res.innerHTML = obj.value // Try that @@@ beware embedded dangerous code\n return res\n }\n return myDocument.createTextNode(obj.value) // placeholder - could be smarter,\n\n case 'BlankNode': {\n if (obj.toNT() in doneBnodes) {\n // Break infinite recursion\n referencedBnodes[obj.toNT()] = true\n const anchor = myDocument.createElement('a')\n anchor.setAttribute('href', '#' + obj.toNT().slice(2))\n anchor.setAttribute('class', 'bnodeRef')\n anchor.textContent = '*' + obj.toNT().slice(3)\n return anchor\n }\n doneBnodes[obj.toNT()] = true // Flag to prevent infinite recursion in propertyTree\n const newTable = propertyTree(obj)\n doneBnodes[obj.toNT()] = newTable // Track where we mentioned it first\n if (\n UI.utils.ancestor(newTable, 'TABLE') &&\n UI.utils.ancestor(newTable, 'TABLE').style.backgroundColor ===\n 'white'\n ) {\n newTable.style.backgroundColor = '#eee'\n } else {\n newTable.style.backgroundColor = 'white'\n }\n return newTable\n }\n case 'Collection':\n res = myDocument.createElement('table')\n res.setAttribute('class', 'collectionAsTables')\n for (let i = 0; i < obj.elements.length; i++) {\n const tr = myDocument.createElement('tr')\n res.appendChild(tr)\n tr.appendChild(objectTree(obj.elements[i]))\n }\n return res\n case 'Graph':\n res = context.session.paneRegistry\n .byName('dataContents')\n .statementsAsTables(obj.statements, context)\n res.setAttribute('class', 'nestedFormula')\n return res\n case 'Variable':\n res = myDocument.createTextNode('?' + obj.uri)\n return res\n }\n throw new Error('Unhandled node type: ' + obj.termType)\n }\n\n // roots.sort()\n\n if (initialRoots) {\n roots = initialRoots.concat(\n roots.filter(function (x) {\n for (let i = 0; i < initialRoots.length; i++) {\n // Max 2\n if (x.sameTerm(initialRoots[i])) return false\n }\n return true\n })\n )\n }\n for (let i = 0; i < roots.length; i++) {\n const tr = myDocument.createElement('tr')\n tr.setAttribute('style', `background-color: ${i % 2 === 0 ? '#f0f0f0' : 'white'};`)\n rep.appendChild(tr)\n const subjectTD = myDocument.createElement('td')\n tr.appendChild(subjectTD)\n const TDTree = myDocument.createElement('td')\n tr.appendChild(TDTree)\n const root = roots[i]\n if (root.termType === 'BlankNode') {\n subjectTD.appendChild(myDocument.createTextNode(UI.utils.label(root))) // Don't recurse!\n } else {\n subjectTD.appendChild(objectTree(root)) // won't have tree\n }\n TDTree.appendChild(propertyTree(root))\n }\n for (const bNT in referencedBnodes) {\n // Add number to refer to\n const table = doneBnodes[bNT]\n // let tr = myDocument.createElement('tr')\n const anchor = myDocument.createElement('a')\n anchor.setAttribute('id', bNT.slice(2))\n anchor.setAttribute('class', 'bnodeDef')\n anchor.textContent = bNT.slice(3) + ')'\n table.insertBefore(anchor, table.firstChild)\n }\n return rep\n }, // statementsAsTables\n // View the data in a file in user-friendly way\n render: function (subject, context) {\n const myDocument = context.dom\n\n function alternativeRendering () {\n const sz = UI.rdf.Serializer(context.session.store)\n const res = sz.rootSubjects(sts)\n const roots = res.roots\n const p = {}\n p.render = function (s2) {\n const div = myDocument.createElement('div')\n div.setAttribute('class', 'withinDocumentPane')\n const plist = kb.statementsMatching(s2, undefined, undefined, subject)\n outliner.appendPropertyTRs(div, plist, false, function (\n _pred,\n _inverse\n ) {\n return true\n })\n return div\n }\n for (let i = 0; i < roots.length; i++) {\n const tr = myDocument.createElement('TR')\n const root = roots[i]\n tr.style.verticalAlign = 'top'\n const td = outliner.outlineObjectTD(root, undefined, tr)\n tr.appendChild(td)\n div.appendChild(tr)\n outliner.outlineExpand(td, root, { pane: p })\n }\n }\n\n function mainRendering () {\n const initialRoots = [] // Ordering: start with stuff about this doc\n if (kb.holds(subject, undefined, undefined, subject)) {\n initialRoots.push(subject)\n }\n // Then about the primary topic of the document if any\n const ps = kb.any(subject, UI.ns.foaf('primaryTopic'), undefined, subject)\n if (ps) initialRoots.push(ps)\n div.appendChild(\n context.session.paneRegistry\n .byName('dataContents')\n .statementsAsTables(sts, context, initialRoots)\n )\n }\n\n const outliner = context.getOutliner(myDocument)\n const kb = context.session.store\n const div = myDocument.createElement('div')\n div.setAttribute('class', 'dataContentPane')\n // Because of smushing etc, this will not be a copy of the original source\n // We could instead either fetch and re-parse the source,\n // or we could keep all the pre-smushed triples.\n const sts = kb.statementsMatching(undefined, undefined, undefined, subject) // @@ slow with current store!\n\n if (false) { // keep code\n alternativeRendering()\n } else {\n mainRendering()\n }\n return div\n }\n}\n"],"mappings":";;;;;;;AAWA,IAAAA,EAAA,GAAAC,uBAAA,CAAAC,OAAA;AAA8B,SAAAC,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAH,wBAAAG,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,C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;MAC1E,IAAIgG,EAAE,EAAEtF,YAAY,CAACqF,IAAI,CAACC,EAAE,CAAC;MAC7Bf,GAAG,CAAClD,WAAW,CACb9B,OAAO,CAACC,OAAO,CAAC6D,YAAY,CACzBC,MAAM,CAAC,cAAc,CAAC,CACtBxD,kBAAkB,CAACC,GAAG,EAAER,OAAO,EAAES,YAAY,CAClD,CAAC;IACH;IAEA,IAAM0E,QAAQ,GAAGnF,OAAO,CAACkG,WAAW,CAACxF,UAAU,CAAC;IAChD,IAAMwE,EAAE,GAAGlF,OAAO,CAACC,OAAO,CAACC,KAAK;IAChC,IAAM8E,GAAG,GAAGtE,UAAU,CAACG,aAAa,CAAC,KAAK,CAAC;IAC3CmE,GAAG,CAACzC,YAAY,CAAC,OAAO,EAAE,iBAAiB,CAAC;IAC5C;IACA;IACA;IACA,IAAM/B,GAAG,GAAG0E,EAAE,CAAC9E,kBAAkB,CAACC,SAAS,EAAEA,SAAS,EAAEA,SAAS,EAAEN,OAAO,CAAC,EAAC;;IAE5E,IAAI,KAAK,EAAE;MAAE;MACX8E,oBAAoB,CAAC,CAAC;IACxB,CAAC,MAAM;MACLe,aAAa,CAAC,CAAC;IACjB;IACA,OAAOZ,GAAG;EACZ;AACF,CAAC","ignoreList":[]}
|
package/lib/dokieli/new.js
CHANGED
|
@@ -4,6 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
|
-
|
|
7
|
+
module.exports = "\n<!DOCTYPE html>\n<html lang=\"en\" xml:lang=\"en\" xmlns=\"http://www.w3.org/1999/xhtml\">\n <head>\n <meta charset=\"utf-8\" />\n <title></title>\n <meta content=\"width=device-width, initial-scale=1\" name=\"viewport\" />\n <link href=\"https://dokie.li/media/css/basic.css\" media=\"all\" rel=\"stylesheet\" title=\"Basic\" />\n <link href=\"https://dokie.li/media/css/dokieli.css\" media=\"all\" rel=\"stylesheet\" />\n <script src=\"https://dokie.li/scripts/dokieli.js\"></script>\n </head>\n\n <body about=\"\" prefix=\"rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns# rdfs: http://www.w3.org/2000/01/rdf-schema# owl: http://www.w3.org/2002/07/owl# xsd: http://www.w3.org/2001/XMLSchema# rdfa: http://www.w3.org/ns/rdfa# dcterms: http://purl.org/dc/terms/ dctypes: http://purl.org/dc/dcmitype/ foaf: http://xmlns.com/foaf/0.1/ pimspace: http://www.w3.org/ns/pim/space# skos: http://www.w3.org/2004/02/skos/core# prov: http://www.w3.org/ns/prov# mem: http://mementoweb.org/ns# qb: http://purl.org/linked-data/cube# schema: http://schema.org/ void: http://rdfs.org/ns/void# rsa: http://www.w3.org/ns/auth/rsa# cert: http://www.w3.org/ns/auth/cert# wgs: http://www.w3.org/2003/01/geo/wgs84_pos# bibo: http://purl.org/ontology/bibo/ sioc: http://rdfs.org/sioc/ns# doap: http://usefulinc.com/ns/doap# dbr: http://dbpedia.org/resource/ dbp: http://dbpedia.org/property/ sio: http://semanticscience.org/resource/ opmw: http://www.opmw.org/ontology/ deo: http://purl.org/spar/deo/ doco: http://purl.org/spar/doco/ cito: http://purl.org/spar/cito/ fabio: http://purl.org/spar/fabio/ oa: http://www.w3.org/ns/oa# as: https://www.w3.org/ns/activitystreams# ldp: http://www.w3.org/ns/ldp# solid: http://www.w3.org/ns/solid/terms# acl: http://www.w3.org/ns/auth/acl# earl: http://www.w3.org/ns/earl# spec: http://www.w3.org/ns/spec# odrl: http://www.w3.org/ns/odrl/2/ dio: https://w3id.org/dio# rel: https://www.w3.org/ns/iana/link-relations/relation#\" typeof=\"schema:CreativeWork prov:Entity\">\n <main>\n <article about=\"\" typeof=\"schema:Article\">\n\n </article>\n </main>\n </body>\n</html>";
|
|
8
8
|
var _default = exports["default"] = DOKIELI_TEMPLATE;
|
|
9
9
|
//# sourceMappingURL=new.js.map
|
package/lib/dokieli/new.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"new.js","names":["
|
|
1
|
+
{"version":3,"file":"new.js","names":["module","exports","_default","DOKIELI_TEMPLATE"],"sources":["../../src/dokieli/new.js"],"sourcesContent":["module.exports = `\n<!DOCTYPE html>\n<html lang=\"en\" xml:lang=\"en\" xmlns=\"http://www.w3.org/1999/xhtml\">\n <head>\n <meta charset=\"utf-8\" />\n <title></title>\n <meta content=\"width=device-width, initial-scale=1\" name=\"viewport\" />\n <link href=\"https://dokie.li/media/css/basic.css\" media=\"all\" rel=\"stylesheet\" title=\"Basic\" />\n <link href=\"https://dokie.li/media/css/dokieli.css\" media=\"all\" rel=\"stylesheet\" />\n <script src=\"https://dokie.li/scripts/dokieli.js\"></script>\n </head>\n\n <body about=\"\" prefix=\"rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns# rdfs: http://www.w3.org/2000/01/rdf-schema# owl: http://www.w3.org/2002/07/owl# xsd: http://www.w3.org/2001/XMLSchema# rdfa: http://www.w3.org/ns/rdfa# dcterms: http://purl.org/dc/terms/ dctypes: http://purl.org/dc/dcmitype/ foaf: http://xmlns.com/foaf/0.1/ pimspace: http://www.w3.org/ns/pim/space# skos: http://www.w3.org/2004/02/skos/core# prov: http://www.w3.org/ns/prov# mem: http://mementoweb.org/ns# qb: http://purl.org/linked-data/cube# schema: http://schema.org/ void: http://rdfs.org/ns/void# rsa: http://www.w3.org/ns/auth/rsa# cert: http://www.w3.org/ns/auth/cert# wgs: http://www.w3.org/2003/01/geo/wgs84_pos# bibo: http://purl.org/ontology/bibo/ sioc: http://rdfs.org/sioc/ns# doap: http://usefulinc.com/ns/doap# dbr: http://dbpedia.org/resource/ dbp: http://dbpedia.org/property/ sio: http://semanticscience.org/resource/ opmw: http://www.opmw.org/ontology/ deo: http://purl.org/spar/deo/ doco: http://purl.org/spar/doco/ cito: http://purl.org/spar/cito/ fabio: http://purl.org/spar/fabio/ oa: http://www.w3.org/ns/oa# as: https://www.w3.org/ns/activitystreams# ldp: http://www.w3.org/ns/ldp# solid: http://www.w3.org/ns/solid/terms# acl: http://www.w3.org/ns/auth/acl# earl: http://www.w3.org/ns/earl# spec: http://www.w3.org/ns/spec# odrl: http://www.w3.org/ns/odrl/2/ dio: https://w3id.org/dio# rel: https://www.w3.org/ns/iana/link-relations/relation#\" typeof=\"schema:CreativeWork prov:Entity\">\n <main>\n <article about=\"\" typeof=\"schema:Article\">\n\n </article>\n </main>\n </body>\n</html>`\n\nexport default DOKIELI_TEMPLATE\n"],"mappings":";;;;;;AAAAA,MAAM,CAACC,OAAO,ylEAmBN;AAAA,IAAAC,QAAA,GAAAD,OAAA,cAEOE,gBAAgB","ignoreList":[]}
|
package/lib/versionInfo.js
CHANGED
|
@@ -5,8 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _default = exports["default"] = {
|
|
8
|
-
buildTime: "2025-02-02T17:
|
|
9
|
-
commit: "
|
|
8
|
+
buildTime: "2025-02-02T17:17:41Z",
|
|
9
|
+
commit: "f584fd85e218c730b022ccd30dc21e7d4dc1e0ee",
|
|
10
10
|
npmInfo: {
|
|
11
11
|
'solid-panes': '3.6.1',
|
|
12
12
|
npm: '8.19.4',
|
package/lib/versionInfo.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"versionInfo.js","names":["buildTime","commit","npmInfo","npm","node","v8","uv","zlib","brotli","ares","modules","nghttp2","napi","llhttp","openssl","cldr","icu","tz","unicode","ngtcp2","nghttp3"],"sources":["../src/versionInfo.ts"],"sourcesContent":["export default {\nbuildTime: \"2025-02-02T17:
|
|
1
|
+
{"version":3,"file":"versionInfo.js","names":["buildTime","commit","npmInfo","npm","node","v8","uv","zlib","brotli","ares","modules","nghttp2","napi","llhttp","openssl","cldr","icu","tz","unicode","ngtcp2","nghttp3"],"sources":["../src/versionInfo.ts"],"sourcesContent":["export default {\nbuildTime: \"2025-02-02T17:17:41Z\",\ncommit: \"f584fd85e218c730b022ccd30dc21e7d4dc1e0ee\",\nnpmInfo:\n{\n 'solid-panes': '3.6.1',\n npm: '8.19.4',\n node: '16.20.2',\n v8: '9.4.146.26-node.26',\n uv: '1.43.0',\n zlib: '1.2.11',\n brotli: '1.0.9',\n ares: '1.19.1',\n modules: '93',\n nghttp2: '1.47.0',\n napi: '8',\n llhttp: '6.0.11',\n openssl: '1.1.1v+quic',\n cldr: '41.0',\n icu: '71.1',\n tz: '2022f',\n unicode: '14.0',\n ngtcp2: '0.8.1',\n nghttp3: '0.7.0'\n}\n};\n"],"mappings":";;;;;;oCAAe;EACfA,SAAS,EAAE,sBAAsB;EACjCC,MAAM,EAAE,0CAA0C;EAClDC,OAAO,EACP;IACE,aAAa,EAAE,OAAO;IACtBC,GAAG,EAAE,QAAQ;IACbC,IAAI,EAAE,SAAS;IACfC,EAAE,EAAE,oBAAoB;IACxBC,EAAE,EAAE,QAAQ;IACZC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE,OAAO;IACfC,IAAI,EAAE,QAAQ;IACdC,OAAO,EAAE,IAAI;IACbC,OAAO,EAAE,QAAQ;IACjBC,IAAI,EAAE,GAAG;IACTC,MAAM,EAAE,QAAQ;IAChBC,OAAO,EAAE,aAAa;IACtBC,IAAI,EAAE,MAAM;IACZC,GAAG,EAAE,MAAM;IACXC,EAAE,EAAE,OAAO;IACXC,OAAO,EAAE,MAAM;IACfC,MAAM,EAAE,OAAO;IACfC,OAAO,EAAE;EACX;AACA,CAAC","ignoreList":[]}
|
package/package.json
CHANGED
package/src/dataContentPane.js
CHANGED
|
@@ -153,7 +153,7 @@ export const dataContentPane = {
|
|
|
153
153
|
if (
|
|
154
154
|
UI.utils.ancestor(newTable, 'TABLE') &&
|
|
155
155
|
UI.utils.ancestor(newTable, 'TABLE').style.backgroundColor ===
|
|
156
|
-
|
|
156
|
+
'white'
|
|
157
157
|
) {
|
|
158
158
|
newTable.style.backgroundColor = '#eee'
|
|
159
159
|
} else {
|
|
@@ -198,6 +198,7 @@ export const dataContentPane = {
|
|
|
198
198
|
}
|
|
199
199
|
for (let i = 0; i < roots.length; i++) {
|
|
200
200
|
const tr = myDocument.createElement('tr')
|
|
201
|
+
tr.setAttribute('style', `background-color: ${i % 2 === 0 ? '#f0f0f0' : 'white'};`)
|
|
201
202
|
rep.appendChild(tr)
|
|
202
203
|
const subjectTD = myDocument.createElement('td')
|
|
203
204
|
tr.appendChild(subjectTD)
|
package/src/dokieli/new.html
CHANGED
|
@@ -4,27 +4,16 @@
|
|
|
4
4
|
<meta charset="utf-8" />
|
|
5
5
|
<title></title>
|
|
6
6
|
<meta content="width=device-width, initial-scale=1" name="viewport" />
|
|
7
|
-
<link
|
|
8
|
-
|
|
9
|
-
media="all"
|
|
10
|
-
rel="stylesheet"
|
|
11
|
-
title="Basic"
|
|
12
|
-
/>
|
|
13
|
-
<link
|
|
14
|
-
href="https://dokie.li/media/css/dokieli.css"
|
|
15
|
-
media="all"
|
|
16
|
-
rel="stylesheet"
|
|
17
|
-
/>
|
|
7
|
+
<link href="https://dokie.li/media/css/basic.css" media="all" rel="stylesheet" title="Basic" />
|
|
8
|
+
<link href="https://dokie.li/media/css/dokieli.css" media="all" rel="stylesheet" />
|
|
18
9
|
<script src="https://dokie.li/scripts/dokieli.js"></script>
|
|
19
10
|
</head>
|
|
20
11
|
|
|
21
|
-
<body
|
|
22
|
-
about=""
|
|
23
|
-
prefix="rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns# rdfs: http://www.w3.org/2000/01/rdf-schema# owl: http://www.w3.org/2002/07/owl# xsd: http://www.w3.org/2001/XMLSchema# dcterms: http://purl.org/dc/terms/ dctypes: http://purl.org/dc/dcmitype/ foaf: http://xmlns.com/foaf/0.1/ pimspace: http://www.w3.org/ns/pim/space# cc: https://creativecommons.org/ns# skos: http://www.w3.org/2004/02/skos/core# prov: http://www.w3.org/ns/prov# mem: http://mementoweb.org/ns# qb: http://purl.org/linked-data/cube# schema: http://schema.org/ void: http://rdfs.org/ns/void# rsa: http://www.w3.org/ns/auth/rsa# cert: http://www.w3.org/ns/auth/cert# wgs: http://www.w3.org/2003/01/geo/wgs84_pos# bibo: http://purl.org/ontology/bibo/ sioc: http://rdfs.org/sioc/ns# doap: http://usefulinc.com/ns/doap# dbr: http://dbpedia.org/resource/ dbp: http://dbpedia.org/property/ sio: http://semanticscience.org/resource/ opmw: http://www.opmw.org/ontology/ deo: http://purl.org/spar/deo/ doco: http://purl.org/spar/doco/ cito: http://purl.org/spar/cito/ fabio: http://purl.org/spar/fabio/ oa: http://www.w3.org/ns/oa# as: https://www.w3.org/ns/activitystreams# ldp: http://www.w3.org/ns/ldp# solid: http://www.w3.org/ns/solid/terms# acl: http://www.w3.org/ns/auth/acl# dio: https://w3id.org/dio# rel: https://www.w3.org/ns/iana/link-relations/relation#"
|
|
24
|
-
typeof="schema:CreativeWork sioc:Post prov:Entity"
|
|
25
|
-
>
|
|
12
|
+
<body about="" prefix="rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns# rdfs: http://www.w3.org/2000/01/rdf-schema# owl: http://www.w3.org/2002/07/owl# xsd: http://www.w3.org/2001/XMLSchema# rdfa: http://www.w3.org/ns/rdfa# dcterms: http://purl.org/dc/terms/ dctypes: http://purl.org/dc/dcmitype/ foaf: http://xmlns.com/foaf/0.1/ pimspace: http://www.w3.org/ns/pim/space# skos: http://www.w3.org/2004/02/skos/core# prov: http://www.w3.org/ns/prov# mem: http://mementoweb.org/ns# qb: http://purl.org/linked-data/cube# schema: http://schema.org/ void: http://rdfs.org/ns/void# rsa: http://www.w3.org/ns/auth/rsa# cert: http://www.w3.org/ns/auth/cert# wgs: http://www.w3.org/2003/01/geo/wgs84_pos# bibo: http://purl.org/ontology/bibo/ sioc: http://rdfs.org/sioc/ns# doap: http://usefulinc.com/ns/doap# dbr: http://dbpedia.org/resource/ dbp: http://dbpedia.org/property/ sio: http://semanticscience.org/resource/ opmw: http://www.opmw.org/ontology/ deo: http://purl.org/spar/deo/ doco: http://purl.org/spar/doco/ cito: http://purl.org/spar/cito/ fabio: http://purl.org/spar/fabio/ oa: http://www.w3.org/ns/oa# as: https://www.w3.org/ns/activitystreams# ldp: http://www.w3.org/ns/ldp# solid: http://www.w3.org/ns/solid/terms# acl: http://www.w3.org/ns/auth/acl# earl: http://www.w3.org/ns/earl# spec: http://www.w3.org/ns/spec# odrl: http://www.w3.org/ns/odrl/2/ dio: https://w3id.org/dio# rel: https://www.w3.org/ns/iana/link-relations/relation#" typeof="schema:CreativeWork prov:Entity">
|
|
26
13
|
<main>
|
|
27
|
-
<article about="" typeof="schema:Article"
|
|
14
|
+
<article about="" typeof="schema:Article">
|
|
15
|
+
|
|
16
|
+
</article>
|
|
28
17
|
</main>
|
|
29
18
|
</body>
|
|
30
19
|
</html>
|
package/src/dokieli/new.js
CHANGED
package/src/versionInfo.ts
CHANGED