solid-panes 3.5.35 → 3.5.36

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.
@@ -8,7 +8,8 @@ exports["default"] = void 0;
8
8
  var UI = _interopRequireWildcard(require("solid-ui"));
9
9
  var $rdf = _interopRequireWildcard(require("rdflib"));
10
10
  var mime = _interopRequireWildcard(require("mime-types"));
11
- var DOKIELI_TEMPLATE = _interopRequireWildcard(require("./new.js"));
11
+ var _new = _interopRequireDefault(require("./new.js"));
12
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
12
13
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
13
14
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
14
15
  /* Human-readable editable "Dokieli" Pane
@@ -88,7 +89,7 @@ var _default = exports["default"] = {
88
89
  newPaneOptions.newInstance = newInstance; // Save for creation system
89
90
 
90
91
  console.log('New dokieli will make: ' + newInstance);
91
- var htmlContents = DOKIELI_TEMPLATE;
92
+ var htmlContents = _new["default"];
92
93
  var filename = newInstance.uri.split('/').slice(-1)[0];
93
94
  filename = decodeURIComponent(filename.split('.')[0]);
94
95
  var encodedTitle = filename.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
@@ -1 +1 @@
1
- {"version":3,"file":"dokieliPane.js","names":["UI","_interopRequireWildcard","require","$rdf","mime","DOKIELI_TEMPLATE","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","_typeof","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_default","exports","icon","icons","iconBase","name","mintClass","ns","solid","label","subject","context","kb","session","store","allowed","hasContentTypeIn","x","displayables","cts","fetcher","getHeader","j","length","k","indexOf","hasContentTypeIn2","findTypeURIs","Util","mediaTypeClass","uri","link","mintNew","newPaneOptions","newInstance","newBase","endsWith","slice","sym","contentType","lookup","includes","console","log","htmlContents","filename","split","decodeURIComponent","encodedTitle","replace","Promise","resolve","webOperation","data","then","err","render","myDocument","dom","div","createElement","setAttribute","iframe","doc","ct","tr","appendChild"],"sources":["../../src/dokieli/dokieliPane.js"],"sourcesContent":["/* Human-readable editable \"Dokieli\" Pane\n **\n ** This outline pane contains the document contents for a Dokieli document\n ** The dokeili system allows the user to edit a document including anotations\n ** review. It does not use turtle, but RDF/a\n */\n\nimport * as UI from 'solid-ui'\nimport * as $rdf from 'rdflib'\nimport * as mime from 'mime-types'\n\n// const DOKIELI_TEMPLATE_URI = 'https://dokie.li/new' // Copy to make new dok\n\nimport * as DOKIELI_TEMPLATE from './new.js' // Distributed with this library\n\nexport default {\n icon: UI.icons.iconBase + 'dokieli-logo.png', // @@ improve? more like doccument?\n\n name: 'Dokieli',\n\n mintClass: UI.ns.solid('DokieliDocument'), // @@ A better class?\n\n label: function (subject, context) {\n const kb = context.session.store\n const ns = UI.ns\n const allowed = [\n // 'text/plain',\n 'text/html',\n 'application/xhtml+xml'\n // 'image/png', 'image/jpeg', 'application/pdf',\n // 'video/mp4'\n ]\n\n const hasContentTypeIn = function (kb, x, displayables) {\n const cts = kb.fetcher.getHeader(x, 'content-type')\n if (cts) {\n for (let j = 0; j < cts.length; j++) {\n for (let k = 0; k < displayables.length; k++) {\n if (cts[j].indexOf(displayables[k]) >= 0) {\n return true\n }\n }\n }\n }\n return false\n }\n\n // This data coul d come from a fetch OR from ldp comtaimner\n const hasContentTypeIn2 = function (kb, x, displayables) {\n const t = kb.findTypeURIs(subject)\n for (let k = 0; k < displayables.length; k++) {\n if ($rdf.Util.mediaTypeClass(displayables[k]).uri in t) {\n return true\n }\n }\n return false\n }\n\n if (!subject.uri) return null // no bnodes\n\n const t = kb.findTypeURIs(subject)\n if (t[ns.link('WebPage').uri]) return 'view'\n\n if (\n hasContentTypeIn(kb, subject, allowed) ||\n hasContentTypeIn2(kb, subject, allowed)\n ) {\n return 'Dok'\n }\n\n return null\n },\n\n // Create a new folder in a Solid system, with a dokieli editable document in it\n mintNew: function (context, newPaneOptions) {\n const kb = context.session.store\n let newInstance = newPaneOptions.newInstance\n if (!newInstance) {\n let uri = newPaneOptions.newBase\n if (uri.endsWith('/')) {\n uri = uri.slice(0, -1)\n newPaneOptions.newBase = uri\n }\n newInstance = kb.sym(uri)\n }\n\n const contentType = mime.lookup(newInstance.uri)\n if (!contentType || !contentType.includes('html')) {\n newInstance = $rdf.sym(newInstance.uri + '.html')\n }\n newPaneOptions.newInstance = newInstance // Save for creation system\n\n console.log('New dokieli will make: ' + newInstance)\n\n let htmlContents = DOKIELI_TEMPLATE\n let filename = newInstance.uri.split('/').slice(-1)[0]\n filename = decodeURIComponent(filename.split('.')[0])\n const encodedTitle = filename\n .replace(/&/g, '&amp;')\n .replace(/</g, '&lt;')\n .replace(/>/g, '&gt;')\n htmlContents = htmlContents.replace('<title>', '<title>' + encodedTitle)\n htmlContents = htmlContents.replace(\n '</article>',\n '<h1>' + encodedTitle + '</h1></article>'\n )\n console.log('@@ New HTML for Dok:' + htmlContents)\n return new Promise(function (resolve) {\n kb.fetcher\n .webOperation('PUT', newInstance.uri, {\n data: htmlContents,\n contentType: 'text/html'\n })\n .then(function () {\n console.log(\n 'new Dokieli document created at ' + newPaneOptions.newInstance\n )\n resolve(newPaneOptions)\n })\n .catch(function (err) {\n console.log(\n 'Error creating dokelili dok at ' +\n newPaneOptions.newInstance +\n ': ' +\n err\n )\n })\n })\n },\n\n // Derived from: humanReadablePane .. share code?\n render: function (subject, context) {\n const myDocument = context.dom\n const div = myDocument.createElement('div')\n const kb = context.session.store\n\n // @@ When we can, use CSP to turn off scripts within the iframe\n div.setAttribute('class', 'docView')\n const iframe = myDocument.createElement('IFRAME')\n iframe.setAttribute('src', subject.uri) // allow-same-origin\n iframe.setAttribute('class', 'doc')\n\n const cts = kb.fetcher.getHeader(subject.doc(), 'content-type')\n const ct = cts ? cts[0] : null\n if (ct) {\n console.log('dokieliPane: c-t:' + ct)\n } else {\n console.log('dokieliPane: unknown content-type?')\n }\n\n // @@ NOte beflow - if we set ANY sandbox, then Chrome and Safari won't display it if it is PDF.\n // https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe\n // You can;'t have any sandbox and allow plugins.\n // We could sandbox only HTML files I suppose.\n // HTML5 bug: https://lists.w3.org/Archives/Public/public-html/2011Jun/0330.html\n\n // iframe.setAttribute('sandbox', 'allow-same-origin allow-forms'); // allow-scripts ?? no documents should be static\n\n iframe.setAttribute('style', 'resize = both; height: 40em; width:40em;') // @@ improve guess\n // iframe.setAttribute('height', '480')\n // iframe.setAttribute('width', '640')\n const tr = myDocument.createElement('tr')\n tr.appendChild(iframe)\n div.appendChild(tr)\n return div\n }\n}\n// ends\n"],"mappings":";;;;;;;AAOA,IAAAA,EAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,IAAA,GAAAF,uBAAA,CAAAC,OAAA;AACA,IAAAE,IAAA,GAAAH,uBAAA,CAAAC,OAAA;AAIA,IAAAG,gBAAA,GAAAJ,uBAAA,CAAAC,OAAA;AAA6C,SAAAI,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,SAAAN,wBAAAM,CAAA,EAAAE,CAAA,SAA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AGF,UAAU,CAACG,aAAa,CAAC,KAAK,CAAC;IAC3C,IAAMhD,EAAE,GAAGD,OAAO,CAACE,OAAO,CAACC,KAAK;;IAEhC;IACA6C,GAAG,CAACE,YAAY,CAAC,OAAO,EAAE,SAAS,CAAC;IACpC,IAAMC,MAAM,GAAGL,UAAU,CAACG,aAAa,CAAC,QAAQ,CAAC;IACjDE,MAAM,CAACD,YAAY,CAAC,KAAK,EAAEnD,OAAO,CAACoB,GAAG,CAAC,EAAC;IACxCgC,MAAM,CAACD,YAAY,CAAC,OAAO,EAAE,KAAK,CAAC;IAEnC,IAAM1C,GAAG,GAAGP,EAAE,CAACQ,OAAO,CAACC,SAAS,CAACX,OAAO,CAACqD,GAAG,CAAC,CAAC,EAAE,cAAc,CAAC;IAC/D,IAAMC,EAAE,GAAG7C,GAAG,GAAGA,GAAG,CAAC,CAAC,CAAC,GAAG,IAAI;IAC9B,IAAI6C,EAAE,EAAE;MACNtB,OAAO,CAACC,GAAG,CAAC,mBAAmB,GAAGqB,EAAE,CAAC;IACvC,CAAC,MAAM;MACLtB,OAAO,CAACC,GAAG,CAAC,oCAAoC,CAAC;IACnD;;IAEA;IACA;IACA;IACA;IACA;;IAEA;;IAEAmB,MAAM,CAACD,YAAY,CAAC,OAAO,EAAE,0CAA0C,CAAC,EAAC;IACzE;IACA;IACA,IAAMI,EAAE,GAAGR,UAAU,CAACG,aAAa,CAAC,IAAI,CAAC;IACzCK,EAAE,CAACC,WAAW,CAACJ,MAAM,CAAC;IACtBH,GAAG,CAACO,WAAW,CAACD,EAAE,CAAC;IACnB,OAAON,GAAG;EACZ;AACF,CAAC,EACD","ignoreList":[]}
1
+ {"version":3,"file":"dokieliPane.js","names":["UI","_interopRequireWildcard","require","$rdf","mime","_new","_interopRequireDefault","obj","__esModule","_getRequireWildcardCache","e","WeakMap","r","t","_typeof","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_default","exports","icon","icons","iconBase","name","mintClass","ns","solid","label","subject","context","kb","session","store","allowed","hasContentTypeIn","x","displayables","cts","fetcher","getHeader","j","length","k","indexOf","hasContentTypeIn2","findTypeURIs","Util","mediaTypeClass","uri","link","mintNew","newPaneOptions","newInstance","newBase","endsWith","slice","sym","contentType","lookup","includes","console","log","htmlContents","DOKIELI_TEMPLATE","filename","split","decodeURIComponent","encodedTitle","replace","Promise","resolve","webOperation","data","then","err","render","myDocument","dom","div","createElement","setAttribute","iframe","doc","ct","tr","appendChild"],"sources":["../../src/dokieli/dokieliPane.js"],"sourcesContent":["/* Human-readable editable \"Dokieli\" Pane\n **\n ** This outline pane contains the document contents for a Dokieli document\n ** The dokeili system allows the user to edit a document including anotations\n ** review. It does not use turtle, but RDF/a\n */\n\nimport * as UI from 'solid-ui'\nimport * as $rdf from 'rdflib'\nimport * as mime from 'mime-types'\n\n// const DOKIELI_TEMPLATE_URI = 'https://dokie.li/new' // Copy to make new dok\n\nimport DOKIELI_TEMPLATE from './new.js' // Distributed with this library\n\nexport default {\n icon: UI.icons.iconBase + 'dokieli-logo.png', // @@ improve? more like doccument?\n\n name: 'Dokieli',\n\n mintClass: UI.ns.solid('DokieliDocument'), // @@ A better class?\n\n label: function (subject, context) {\n const kb = context.session.store\n const ns = UI.ns\n const allowed = [\n // 'text/plain',\n 'text/html',\n 'application/xhtml+xml'\n // 'image/png', 'image/jpeg', 'application/pdf',\n // 'video/mp4'\n ]\n\n const hasContentTypeIn = function (kb, x, displayables) {\n const cts = kb.fetcher.getHeader(x, 'content-type')\n if (cts) {\n for (let j = 0; j < cts.length; j++) {\n for (let k = 0; k < displayables.length; k++) {\n if (cts[j].indexOf(displayables[k]) >= 0) {\n return true\n }\n }\n }\n }\n return false\n }\n\n // This data coul d come from a fetch OR from ldp comtaimner\n const hasContentTypeIn2 = function (kb, x, displayables) {\n const t = kb.findTypeURIs(subject)\n for (let k = 0; k < displayables.length; k++) {\n if ($rdf.Util.mediaTypeClass(displayables[k]).uri in t) {\n return true\n }\n }\n return false\n }\n\n if (!subject.uri) return null // no bnodes\n\n const t = kb.findTypeURIs(subject)\n if (t[ns.link('WebPage').uri]) return 'view'\n\n if (\n hasContentTypeIn(kb, subject, allowed) ||\n hasContentTypeIn2(kb, subject, allowed)\n ) {\n return 'Dok'\n }\n\n return null\n },\n\n // Create a new folder in a Solid system, with a dokieli editable document in it\n mintNew: function (context, newPaneOptions) {\n const kb = context.session.store\n let newInstance = newPaneOptions.newInstance\n if (!newInstance) {\n let uri = newPaneOptions.newBase\n if (uri.endsWith('/')) {\n uri = uri.slice(0, -1)\n newPaneOptions.newBase = uri\n }\n newInstance = kb.sym(uri)\n }\n\n const contentType = mime.lookup(newInstance.uri)\n if (!contentType || !contentType.includes('html')) {\n newInstance = $rdf.sym(newInstance.uri + '.html')\n }\n newPaneOptions.newInstance = newInstance // Save for creation system\n\n console.log('New dokieli will make: ' + newInstance)\n\n let htmlContents = DOKIELI_TEMPLATE\n let filename = newInstance.uri.split('/').slice(-1)[0]\n filename = decodeURIComponent(filename.split('.')[0])\n const encodedTitle = filename\n .replace(/&/g, '&amp;')\n .replace(/</g, '&lt;')\n .replace(/>/g, '&gt;')\n htmlContents = htmlContents.replace('<title>', '<title>' + encodedTitle)\n htmlContents = htmlContents.replace(\n '</article>',\n '<h1>' + encodedTitle + '</h1></article>'\n )\n console.log('@@ New HTML for Dok:' + htmlContents)\n return new Promise(function (resolve) {\n kb.fetcher\n .webOperation('PUT', newInstance.uri, {\n data: htmlContents,\n contentType: 'text/html'\n })\n .then(function () {\n console.log(\n 'new Dokieli document created at ' + newPaneOptions.newInstance\n )\n resolve(newPaneOptions)\n })\n .catch(function (err) {\n console.log(\n 'Error creating dokelili dok at ' +\n newPaneOptions.newInstance +\n ': ' +\n err\n )\n })\n })\n },\n\n // Derived from: humanReadablePane .. share code?\n render: function (subject, context) {\n const myDocument = context.dom\n const div = myDocument.createElement('div')\n const kb = context.session.store\n\n // @@ When we can, use CSP to turn off scripts within the iframe\n div.setAttribute('class', 'docView')\n const iframe = myDocument.createElement('IFRAME')\n iframe.setAttribute('src', subject.uri) // allow-same-origin\n iframe.setAttribute('class', 'doc')\n\n const cts = kb.fetcher.getHeader(subject.doc(), 'content-type')\n const ct = cts ? cts[0] : null\n if (ct) {\n console.log('dokieliPane: c-t:' + ct)\n } else {\n console.log('dokieliPane: unknown content-type?')\n }\n\n // @@ NOte beflow - if we set ANY sandbox, then Chrome and Safari won't display it if it is PDF.\n // https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe\n // You can;'t have any sandbox and allow plugins.\n // We could sandbox only HTML files I suppose.\n // HTML5 bug: https://lists.w3.org/Archives/Public/public-html/2011Jun/0330.html\n\n // iframe.setAttribute('sandbox', 'allow-same-origin allow-forms'); // allow-scripts ?? no documents should be static\n\n iframe.setAttribute('style', 'resize = both; height: 40em; width:40em;') // @@ improve guess\n // iframe.setAttribute('height', '480')\n // iframe.setAttribute('width', '640')\n const tr = myDocument.createElement('tr')\n tr.appendChild(iframe)\n div.appendChild(tr)\n return div\n }\n}\n// ends\n"],"mappings":";;;;;;;AAOA,IAAAA,EAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,IAAA,GAAAF,uBAAA,CAAAC,OAAA;AACA,IAAAE,IAAA,GAAAH,uBAAA,CAAAC,OAAA;AAIA,IAAAG,IAAA,GAAAC,sBAAA,CAAAJ,OAAA;AAAuC,SAAAI,uBAAAC,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,gBAAAA,GAAA;AAAA,SAAAE,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,SAAAT,wBAAAS,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAF,UAAA,SAAAE,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GD,OAAO,CAACE,OAAO,CAACC,KAAK;;IAEhC;IACA8C,GAAG,CAACE,YAAY,CAAC,OAAO,EAAE,SAAS,CAAC;IACpC,IAAMC,MAAM,GAAGL,UAAU,CAACG,aAAa,CAAC,QAAQ,CAAC;IACjDE,MAAM,CAACD,YAAY,CAAC,KAAK,EAAEpD,OAAO,CAACoB,GAAG,CAAC,EAAC;IACxCiC,MAAM,CAACD,YAAY,CAAC,OAAO,EAAE,KAAK,CAAC;IAEnC,IAAM3C,GAAG,GAAGP,EAAE,CAACQ,OAAO,CAACC,SAAS,CAACX,OAAO,CAACsD,GAAG,CAAC,CAAC,EAAE,cAAc,CAAC;IAC/D,IAAMC,EAAE,GAAG9C,GAAG,GAAGA,GAAG,CAAC,CAAC,CAAC,GAAG,IAAI;IAC9B,IAAI8C,EAAE,EAAE;MACNvB,OAAO,CAACC,GAAG,CAAC,mBAAmB,GAAGsB,EAAE,CAAC;IACvC,CAAC,MAAM;MACLvB,OAAO,CAACC,GAAG,CAAC,oCAAoC,CAAC;IACnD;;IAEA;IACA;IACA;IACA;IACA;;IAEA;;IAEAoB,MAAM,CAACD,YAAY,CAAC,OAAO,EAAE,0CAA0C,CAAC,EAAC;IACzE;IACA;IACA,IAAMI,EAAE,GAAGR,UAAU,CAACG,aAAa,CAAC,IAAI,CAAC;IACzCK,EAAE,CAACC,WAAW,CAACJ,MAAM,CAAC;IACtBH,GAAG,CAACO,WAAW,CAACD,EAAE,CAAC;IACnB,OAAON,GAAG;EACZ;AACF,CAAC,EACD","ignoreList":[]}
@@ -4,5 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports["default"] = void 0;
7
- var _default = exports["default"] = "\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# 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#\" typeof=\"schema:CreativeWork sioc:Post prov:Entity\">\n <main>\n <article about=\"\" typeof=\"schema:Article\">\n\n </article>\n </main>\n </body>\n</html>\n";
7
+ var DOKIELI_TEMPLATE = "\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
+ var _default = exports["default"] = DOKIELI_TEMPLATE;
8
9
  //# sourceMappingURL=new.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"new.js","names":[],"sources":["../../src/dokieli/new.js"],"sourcesContent":["export default `\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# 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#\" typeof=\"schema:CreativeWork sioc:Post prov:Entity\">\n <main>\n <article about=\"\" typeof=\"schema:Article\">\n\n </article>\n </main>\n </body>\n</html>\n`\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"new.js","names":["DOKIELI_TEMPLATE","_default","exports"],"sources":["../../src/dokieli/new.js"],"sourcesContent":["const DOKIELI_TEMPLATE = `\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":";;;;;;AAAA,IAAMA,gBAAgB,ylEAmBd;AAAA,IAAAC,QAAA,GAAAC,OAAA,cAEOF,gBAAgB","ignoreList":[]}
@@ -5,10 +5,10 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports["default"] = void 0;
7
7
  var _default = exports["default"] = {
8
- buildTime: "2024-04-03T15:57:07Z",
9
- commit: "91d7b679d3a824fc7deb31efa4df6e56a22b0b28",
8
+ buildTime: "2024-04-30T16:17:40Z",
9
+ commit: "afb8af9fe456631a76789ae72f3f6257bd1b7319",
10
10
  npmInfo: {
11
- 'solid-panes': '3.5.35',
11
+ 'solid-panes': '3.5.36',
12
12
  npm: '8.19.4',
13
13
  node: '16.20.2',
14
14
  v8: '9.4.146.26-node.26',
@@ -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: \"2024-04-03T15:57:07Z\",\ncommit: \"91d7b679d3a824fc7deb31efa4df6e56a22b0b28\",\nnpmInfo:\n{\n 'solid-panes': '3.5.35',\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,QAAQ;IACvBC,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":[]}
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: \"2024-04-30T16:17:40Z\",\ncommit: \"afb8af9fe456631a76789ae72f3f6257bd1b7319\",\nnpmInfo:\n{\n 'solid-panes': '3.5.36',\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,QAAQ;IACvBC,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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "solid-panes",
3
- "version": "3.5.35",
3
+ "version": "3.5.36",
4
4
  "description": "Solid-compatible Panes: applets and views for the mashlib and databrowser",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -11,7 +11,7 @@ import * as mime from 'mime-types'
11
11
 
12
12
  // const DOKIELI_TEMPLATE_URI = 'https://dokie.li/new' // Copy to make new dok
13
13
 
14
- import * as DOKIELI_TEMPLATE from './new.js' // Distributed with this library
14
+ import DOKIELI_TEMPLATE from './new.js' // Distributed with this library
15
15
 
16
16
  export default {
17
17
  icon: UI.icons.iconBase + 'dokieli-logo.png', // @@ improve? more like doccument?
@@ -1,4 +1,4 @@
1
- export default `
1
+ const DOKIELI_TEMPLATE = `
2
2
  <!DOCTYPE html>
3
3
  <html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
4
4
  <head>
@@ -10,12 +10,13 @@ export default `
10
10
  <script src="https://dokie.li/scripts/dokieli.js"></script>
11
11
  </head>
12
12
 
13
- <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# 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#" typeof="schema:CreativeWork sioc:Post prov:Entity">
13
+ <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">
14
14
  <main>
15
15
  <article about="" typeof="schema:Article">
16
16
 
17
17
  </article>
18
18
  </main>
19
19
  </body>
20
- </html>
21
- `
20
+ </html>`
21
+
22
+ export default DOKIELI_TEMPLATE
@@ -1,9 +1,9 @@
1
1
  export default {
2
- buildTime: "2024-04-03T15:57:07Z",
3
- commit: "91d7b679d3a824fc7deb31efa4df6e56a22b0b28",
2
+ buildTime: "2024-04-30T16:17:40Z",
3
+ commit: "afb8af9fe456631a76789ae72f3f6257bd1b7319",
4
4
  npmInfo:
5
5
  {
6
- 'solid-panes': '3.5.35',
6
+ 'solid-panes': '3.5.36',
7
7
  npm: '8.19.4',
8
8
  node: '16.20.2',
9
9
  v8: '9.4.146.26-node.26',