diff --git a/.gitignore b/.gitignore index d62d2a65..2a37fddd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ # Built code -dist lib dist-dev src/versionInfo.ts diff --git a/README.md b/README.md index ef5f4287..74f7f5f9 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# solid-panes +# solid-panes-jss -A set of core solid-compatible applets based on solid-ui +A set of core solid-compatible applets based on solid-ui-jss (JSS variant with minimal solid-oidc authentication) These are a set of interlinked applications, or parts of applications, which called 'panes' -- as in parts of a window. A pane displays a data object of certain class using part of the window. @@ -29,7 +29,7 @@ Currently the panes available include: - and so on The solid-app-set panes are built using a set of widgets and utilities in -[https://github.com/linkeddata/solid-ui](https://github.com/linkeddata/solid-ui) +[https://github.com/JavaScriptSolidServer/solid-ui-jss](https://github.com/JavaScriptSolidServer/solid-ui-jss) To help onboarding, we're using [roles](https://github.com/solidos/userguide/#role) to limit the number of panes presented to new users. @@ -55,8 +55,8 @@ To get started, make sure you have Node.js installed (for instance through https://github.com/nvm-sh/nvm), and: 1. run ```sh -git clone https://github.com/solidos/solid-panes -cd solid-panes +git clone https://github.com/JavaScriptSolidServer/solid-panes-jss +cd solid-panes-jss npm install npm run start ``` @@ -78,3 +78,7 @@ contacts (A VCARD Address Book, Group, Individual, Organization) can be handled pane. Any other pane which wants to deal with contacts can just use the pane within its own user interface. ![Mapping many classes on the L to panes on the R](https://solidos.github.io/solid-panes/doc/images/panes-for-classes.svg) + +## Credits + +This is a fork of [solidos/solid-panes](https://github.com/solidos/solid-panes) with the authentication replaced from `@inrupt/solid-client-authn-browser` to the minimal [solid-oidc](https://github.com/JavaScriptSolidServer/solid-oidc) library via [solid-logic-jss](https://github.com/JavaScriptSolidServer/solid-logic-jss) and [solid-ui-jss](https://github.com/JavaScriptSolidServer/solid-ui-jss). diff --git a/babel.config.mjs b/babel.config.mjs index d5db5463..2bd1abdc 100644 --- a/babel.config.mjs +++ b/babel.config.mjs @@ -3,7 +3,9 @@ export default { ['@babel/preset-env', { targets: { browsers: ['> 1%', 'last 3 versions', 'not dead'] - } + }, + // Preserve import() for webpack code splitting + modules: false }], '@babel/preset-typescript' ], diff --git a/dev/loader.ts b/dev/loader.ts index 14eebf04..d26b5cc5 100644 --- a/dev/loader.ts +++ b/dev/loader.ts @@ -1,8 +1,8 @@ import * as paneRegistry from 'pane-registry' import * as $rdf from 'rdflib' -import { solidLogicSingleton, store, authSession } from 'solid-logic' +import { solidLogicSingleton, store, authSession } from 'solid-logic-jss' import { getOutliner } from '../src' -import Pane from 'profile-pane' +import Pane from 'profile-pane-jss' // FIXME: window.$rdf = $rdf diff --git a/dev/pane/index.ts b/dev/pane/index.ts index 6cf52cb9..59364516 100644 --- a/dev/pane/index.ts +++ b/dev/pane/index.ts @@ -1,7 +1,7 @@ // import { longChatPane as Pane } from 'chat-pane' // import Pane from '../../src/profile/profile.view' -import Pane from 'profile-pane' -import * as UI from 'solid-ui' +import Pane from 'profile-pane-jss' +import * as UI from 'solid-ui-jss' console.log('Loaded pane into Solid Pane Tester. Check window.Pane and window.UI') ;(window as any).Pane = Pane diff --git a/dist/RDFXMLPane.js b/dist/RDFXMLPane.js new file mode 100644 index 00000000..0e99594c --- /dev/null +++ b/dist/RDFXMLPane.js @@ -0,0 +1,52 @@ +/* RDF/XML content Pane + ** + ** This pane shows the content of a particular RDF resource + ** or at least the RDF semantics we attribute to that resource, + ** in generated N3 syntax. + */ + +import * as UI from 'solid-ui-jss'; +import * as $rdf from 'rdflib'; +const ns = UI.ns; +export const RDFXMLPane = { + icon: UI.icons.originalIconBase + '22-text-xml4.png', + name: 'RDFXML', + audience: [ns.solid('Developer')], + label: function (subject, context) { + const store = context.session.store; + if ('http://www.w3.org/2007/ont/link#ProtocolEvent' in store.findTypeURIs(subject)) { + return null; + } + const n = store.statementsMatching(undefined, undefined, undefined, subject).length; + if (n === 0) return null; + return 'As RDF/XML (' + n + ')'; + }, + render: function (subject, context) { + const myDocument = context.dom; + const kb = context.session.store; + const div = myDocument.createElement('div'); + div.setAttribute('class', 'RDFXMLPane'); + // Because of smushing etc, this will not be a copy of the original source + // We could instead either fetch and re-parse the source, + // or we could keep all the pre-smushed triples. + const sts = kb.statementsMatching(undefined, undefined, undefined, subject); // @@ slow with current store! + /* + var kludge = kb.formula([]) // No features + for (var i=0; i< sts.length; i++) { + s = sts[i] + kludge.add(s.subject, s.predicate, s.object) + } + */ + const sz = $rdf.Serializer(kb); + sz.suggestNamespaces(kb.namespaces); + sz.setBase(subject.uri); + const str = sz.statementsToXML(sts); + const pre = myDocument.createElement('PRE'); + pre.appendChild(myDocument.createTextNode(str)); + div.appendChild(pre); + return div; + } +}; + +// ends +//# sourceMappingURL=RDFXMLPane.js.map \ No newline at end of file diff --git a/dist/RDFXMLPane.js.map b/dist/RDFXMLPane.js.map new file mode 100644 index 00000000..90438eee --- /dev/null +++ b/dist/RDFXMLPane.js.map @@ -0,0 +1 @@ +{"version":3,"file":"RDFXMLPane.js","names":["UI","$rdf","ns","RDFXMLPane","icon","icons","originalIconBase","name","audience","solid","label","subject","context","store","session","findTypeURIs","n","statementsMatching","undefined","length","render","myDocument","dom","kb","div","createElement","setAttribute","sts","sz","Serializer","suggestNamespaces","namespaces","setBase","uri","str","statementsToXML","pre","appendChild","createTextNode"],"sources":["../src/RDFXMLPane.js"],"sourcesContent":["/* RDF/XML 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 ** in generated N3 syntax.\n */\n\nimport * as UI from 'solid-ui-jss'\nimport * as $rdf from 'rdflib'\n\nconst ns = UI.ns\n\nexport const RDFXMLPane = {\n icon: UI.icons.originalIconBase + '22-text-xml4.png',\n\n name: 'RDFXML',\n\n audience: [ns.solid('Developer')],\n\n label: function (subject, context) {\n const store = context.session.store\n if (\n 'http://www.w3.org/2007/ont/link#ProtocolEvent' in\n store.findTypeURIs(subject)\n ) {\n return null\n }\n\n const n = store.statementsMatching(undefined, undefined, undefined, subject)\n .length\n if (n === 0) return null\n return 'As RDF/XML (' + n + ')'\n },\n\n render: function (subject, context) {\n const myDocument = context.dom\n const kb = context.session.store\n const div = myDocument.createElement('div')\n div.setAttribute('class', 'RDFXMLPane')\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 var kludge = kb.formula([]) // No features\n for (var i=0; i< sts.length; i++) {\n s = sts[i]\n kludge.add(s.subject, s.predicate, s.object)\n }\n */\n const sz = $rdf.Serializer(kb)\n sz.suggestNamespaces(kb.namespaces)\n sz.setBase(subject.uri)\n const str = sz.statementsToXML(sts)\n const pre = myDocument.createElement('PRE')\n pre.appendChild(myDocument.createTextNode(str))\n div.appendChild(pre)\n return div\n }\n}\n\n// ends\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,KAAKA,EAAE,MAAM,cAAc;AAClC,OAAO,KAAKC,IAAI,MAAM,QAAQ;AAE9B,MAAMC,EAAE,GAAGF,EAAE,CAACE,EAAE;AAEhB,OAAO,MAAMC,UAAU,GAAG;EACxBC,IAAI,EAAEJ,EAAE,CAACK,KAAK,CAACC,gBAAgB,GAAG,kBAAkB;EAEpDC,IAAI,EAAE,QAAQ;EAEdC,QAAQ,EAAE,CAACN,EAAE,CAACO,KAAK,CAAC,WAAW,CAAC,CAAC;EAEjCC,KAAK,EAAE,SAAAA,CAAUC,OAAO,EAAEC,OAAO,EAAE;IACjC,MAAMC,KAAK,GAAGD,OAAO,CAACE,OAAO,CAACD,KAAK;IACnC,IACE,+CAA+C,IAC/CA,KAAK,CAACE,YAAY,CAACJ,OAAO,CAAC,EAC3B;MACA,OAAO,IAAI;IACb;IAEA,MAAMK,CAAC,GAAGH,KAAK,CAACI,kBAAkB,CAACC,SAAS,EAAEA,SAAS,EAAEA,SAAS,EAAEP,OAAO,CAAC,CACzEQ,MAAM;IACT,IAAIH,CAAC,KAAK,CAAC,EAAE,OAAO,IAAI;IACxB,OAAO,cAAc,GAAGA,CAAC,GAAG,GAAG;EACjC,CAAC;EAEDI,MAAM,EAAE,SAAAA,CAAUT,OAAO,EAAEC,OAAO,EAAE;IAClC,MAAMS,UAAU,GAAGT,OAAO,CAACU,GAAG;IAC9B,MAAMC,EAAE,GAAGX,OAAO,CAACE,OAAO,CAACD,KAAK;IAChC,MAAMW,GAAG,GAAGH,UAAU,CAACI,aAAa,CAAC,KAAK,CAAC;IAC3CD,GAAG,CAACE,YAAY,CAAC,OAAO,EAAE,YAAY,CAAC;IACvC;IACA;IACA;IACA,MAAMC,GAAG,GAAGJ,EAAE,CAACN,kBAAkB,CAACC,SAAS,EAAEA,SAAS,EAAEA,SAAS,EAAEP,OAAO,CAAC,EAAC;IAC5E;AACJ;AACA;AACA;AACA;AACA;AACA;IACI,MAAMiB,EAAE,GAAG3B,IAAI,CAAC4B,UAAU,CAACN,EAAE,CAAC;IAC9BK,EAAE,CAACE,iBAAiB,CAACP,EAAE,CAACQ,UAAU,CAAC;IACnCH,EAAE,CAACI,OAAO,CAACrB,OAAO,CAACsB,GAAG,CAAC;IACvB,MAAMC,GAAG,GAAGN,EAAE,CAACO,eAAe,CAACR,GAAG,CAAC;IACnC,MAAMS,GAAG,GAAGf,UAAU,CAACI,aAAa,CAAC,KAAK,CAAC;IAC3CW,GAAG,CAACC,WAAW,CAAChB,UAAU,CAACiB,cAAc,CAACJ,GAAG,CAAC,CAAC;IAC/CV,GAAG,CAACa,WAAW,CAACD,GAAG,CAAC;IACpB,OAAOZ,GAAG;EACZ;AACF,CAAC;;AAED","ignoreList":[]} \ No newline at end of file diff --git a/dist/activitystreams/activitystreamsPane.js b/dist/activitystreams/activitystreamsPane.js new file mode 100644 index 00000000..1de555c1 --- /dev/null +++ b/dist/activitystreams/activitystreamsPane.js @@ -0,0 +1,271 @@ +/** + * ActivityStreams Pane - Vanilla JS rewrite + * + * Displays as:Note content as a styled card. + * Replaces the React-based activitystreams-pane package (~11MB -> ~3KB) + */ + +import * as UI from 'solid-ui-jss'; +import { sym } from 'rdflib'; +const ns = UI.ns; + +// Styles for the note card +const styles = { + card: ` + font-family: sans-serif; + display: flex; + flex-wrap: wrap; + border-radius: 4px; + flex-direction: column; + justify-content: center; + padding: 1em; + box-shadow: 0 1px 5px rgba(0,0,0,0.2); + transition: all .25s ease-in-out; + max-width: 632px; + `, + content: ` + font-size: larger; + margin: 0.5em 0; + `, + date: ` + color: rgba(0, 0, 0, 0.6); + margin: 0.5em 0; + `, + attribution: ` + display: flex; + align-items: center; + font-weight: bold; + `, + attributionLink: ` + color: black; + text-decoration: none; + `, + attributionImage: ` + margin-right: 5px; + width: 47px; + height: 47px; + border-radius: 5px; + object-fit: cover; + ` +}; + +/** + * Format a date as relative time (e.g., "2 hours ago") + */ +function timeAgo(date) { + const seconds = Math.floor((new Date() - date) / 1000); + const intervals = [{ + label: 'year', + seconds: 31536000 + }, { + label: 'month', + seconds: 2592000 + }, { + label: 'week', + seconds: 604800 + }, { + label: 'day', + seconds: 86400 + }, { + label: 'hour', + seconds: 3600 + }, { + label: 'minute', + seconds: 60 + }]; + for (const interval of intervals) { + const count = Math.floor(seconds / interval.seconds); + if (count >= 1) { + return `${count} ${interval.label}${count > 1 ? 's' : ''} ago`; + } + } + return 'just now'; +} + +/** + * Format date for display + */ +function formatDate(date) { + if (!date) return null; + const formatted = date.toLocaleDateString(undefined, { + year: 'numeric', + month: '2-digit', + day: '2-digit', + hour: '2-digit', + minute: '2-digit' + }); + return `${timeAgo(date)} · ${formatted}`; +} + +/** + * Check if node is a Person type + */ +function isPerson(store, node) { + const types = store.findTypeURIs(node); + return types[ns.as('Person').uri] || types[ns.foaf('Person').uri] || types[ns.vcard('Individual').uri] || types[ns.schema('Person').uri]; +} + +/** + * Read person's image URL from store + */ +function readImageSrc(store, node) { + const image = store.anyValue(node, ns.as('image')); + if (image) { + return store.anyValue(sym(image), ns.as('url')) || null; + } + return store.anyValue(node, ns.foaf('img')) || store.anyValue(node, ns.vcard('hasPhoto')) || null; +} + +/** + * Read attribution (author) info from store + */ +function readAttribution(store, subject) { + const attributedTo = store.any(subject, ns.as('attributedTo')); + if (!attributedTo || !attributedTo.uri) { + return { + type: 'none' + }; + } + if (isPerson(store, attributedTo)) { + const name = store.anyValue(attributedTo, ns.as('name')) || store.anyValue(attributedTo, ns.foaf('name')) || store.anyValue(attributedTo, ns.vcard('fn')) || store.anyValue(attributedTo, ns.schema('name')) || ''; + return { + type: 'person', + webId: attributedTo.uri, + name, + imageSrc: readImageSrc(store, attributedTo) + }; + } + return { + type: 'link', + uri: attributedTo.uri + }; +} + +/** + * Read note data from store + */ +function readNote(store, subject) { + const content = store.any(subject, ns.as('content')); + const published = store.any(subject, ns.as('published')); + if (!content) return null; + return { + content: content.value, + published: published ? new Date(published.value) : null, + attribution: readAttribution(store, subject) + }; +} + +/** + * Create the attribution element + */ +function createAttributionElement(doc, attribution) { + const container = doc.createElement('div'); + container.setAttribute('style', styles.attribution); + if (attribution.type === 'none') { + return container; + } + if (attribution.type === 'link') { + const link = doc.createElement('a'); + link.setAttribute('href', attribution.uri); + link.setAttribute('style', styles.attributionLink); + link.textContent = attribution.uri; + container.appendChild(link); + return container; + } + if (attribution.type === 'person') { + if (attribution.imageSrc) { + const img = doc.createElement('img'); + img.setAttribute('src', attribution.imageSrc); + img.setAttribute('alt', attribution.name); + img.setAttribute('style', styles.attributionImage); + container.appendChild(img); + } + const link = doc.createElement('a'); + link.setAttribute('href', attribution.webId); + link.setAttribute('style', styles.attributionLink); + link.textContent = attribution.name || attribution.webId; + link.addEventListener('mouseover', () => { + link.style.textDecoration = 'underline'; + }); + link.addEventListener('mouseout', () => { + link.style.textDecoration = 'none'; + }); + container.appendChild(link); + } + return container; +} + +/** + * Create the note card element + */ +function createNoteCard(doc, note) { + const card = doc.createElement('div'); + card.setAttribute('style', styles.card); + + // Attribution (author) + card.appendChild(createAttributionElement(doc, note.attribution)); + + // Content + const content = doc.createElement('p'); + content.setAttribute('style', styles.content); + content.textContent = note.content; + card.appendChild(content); + + // Date + if (note.published) { + const dateEl = doc.createElement('p'); + dateEl.setAttribute('style', styles.date); + dateEl.textContent = formatDate(note.published); + card.appendChild(dateEl); + } + return card; +} + +/** + * The ActivityStreams Pane + */ +export default { + icon: UI.icons.iconBase + 'noun_15695.svg', + name: 'activitystreams', + label: function (subject, context) { + const store = context.session.store; + const types = store.findTypeURIs(subject); + if (types[ns.as('Note').uri]) { + return 'Note'; + } + return null; + }, + render: function (subject, context) { + const doc = context.dom; + const store = context.session.store; + const container = doc.createElement('div'); + const note = readNote(store, subject); + if (!note) { + const msg = doc.createElement('p'); + msg.textContent = 'Unable to read note content.'; + container.appendChild(msg); + return container; + } + + // Render initial card + container.appendChild(createNoteCard(doc, note)); + + // If attribution is just a link, try to fetch and update + if (note.attribution.type === 'link') { + const attributionNode = sym(note.attribution.uri); + store.fetcher.load(attributionNode).then(() => { + // Re-read attribution after fetch + const updatedAttribution = readAttribution(store, subject); + if (updatedAttribution.type === 'person') { + note.attribution = updatedAttribution; + container.innerHTML = ''; + container.appendChild(createNoteCard(doc, note)); + } + }).catch(() => { + // Keep original link attribution on error + }); + } + return container; + } +}; +//# sourceMappingURL=activitystreamsPane.js.map \ No newline at end of file diff --git a/dist/activitystreams/activitystreamsPane.js.map b/dist/activitystreams/activitystreamsPane.js.map new file mode 100644 index 00000000..43db96ed --- /dev/null +++ b/dist/activitystreams/activitystreamsPane.js.map @@ -0,0 +1 @@ +{"version":3,"file":"activitystreamsPane.js","names":["UI","sym","ns","styles","card","content","date","attribution","attributionLink","attributionImage","timeAgo","seconds","Math","floor","Date","intervals","label","interval","count","formatDate","formatted","toLocaleDateString","undefined","year","month","day","hour","minute","isPerson","store","node","types","findTypeURIs","as","uri","foaf","vcard","schema","readImageSrc","image","anyValue","readAttribution","subject","attributedTo","any","type","name","webId","imageSrc","readNote","published","value","createAttributionElement","doc","container","createElement","setAttribute","link","textContent","appendChild","img","addEventListener","style","textDecoration","createNoteCard","note","dateEl","icon","icons","iconBase","context","session","render","dom","msg","attributionNode","fetcher","load","then","updatedAttribution","innerHTML","catch"],"sources":["../../src/activitystreams/activitystreamsPane.js"],"sourcesContent":["/**\n * ActivityStreams Pane - Vanilla JS rewrite\n *\n * Displays as:Note content as a styled card.\n * Replaces the React-based activitystreams-pane package (~11MB -> ~3KB)\n */\n\nimport * as UI from 'solid-ui-jss'\nimport { sym } from 'rdflib'\n\nconst ns = UI.ns\n\n// Styles for the note card\nconst styles = {\n card: `\n font-family: sans-serif;\n display: flex;\n flex-wrap: wrap;\n border-radius: 4px;\n flex-direction: column;\n justify-content: center;\n padding: 1em;\n box-shadow: 0 1px 5px rgba(0,0,0,0.2);\n transition: all .25s ease-in-out;\n max-width: 632px;\n `,\n content: `\n font-size: larger;\n margin: 0.5em 0;\n `,\n date: `\n color: rgba(0, 0, 0, 0.6);\n margin: 0.5em 0;\n `,\n attribution: `\n display: flex;\n align-items: center;\n font-weight: bold;\n `,\n attributionLink: `\n color: black;\n text-decoration: none;\n `,\n attributionImage: `\n margin-right: 5px;\n width: 47px;\n height: 47px;\n border-radius: 5px;\n object-fit: cover;\n `\n}\n\n/**\n * Format a date as relative time (e.g., \"2 hours ago\")\n */\nfunction timeAgo (date) {\n const seconds = Math.floor((new Date() - date) / 1000)\n\n const intervals = [\n { label: 'year', seconds: 31536000 },\n { label: 'month', seconds: 2592000 },\n { label: 'week', seconds: 604800 },\n { label: 'day', seconds: 86400 },\n { label: 'hour', seconds: 3600 },\n { label: 'minute', seconds: 60 }\n ]\n\n for (const interval of intervals) {\n const count = Math.floor(seconds / interval.seconds)\n if (count >= 1) {\n return `${count} ${interval.label}${count > 1 ? 's' : ''} ago`\n }\n }\n return 'just now'\n}\n\n/**\n * Format date for display\n */\nfunction formatDate (date) {\n if (!date) return null\n const formatted = date.toLocaleDateString(undefined, {\n year: 'numeric',\n month: '2-digit',\n day: '2-digit',\n hour: '2-digit',\n minute: '2-digit'\n })\n return `${timeAgo(date)} · ${formatted}`\n}\n\n/**\n * Check if node is a Person type\n */\nfunction isPerson (store, node) {\n const types = store.findTypeURIs(node)\n return types[ns.as('Person').uri] ||\n types[ns.foaf('Person').uri] ||\n types[ns.vcard('Individual').uri] ||\n types[ns.schema('Person').uri]\n}\n\n/**\n * Read person's image URL from store\n */\nfunction readImageSrc (store, node) {\n const image = store.anyValue(node, ns.as('image'))\n if (image) {\n return store.anyValue(sym(image), ns.as('url')) || null\n }\n return store.anyValue(node, ns.foaf('img')) ||\n store.anyValue(node, ns.vcard('hasPhoto')) ||\n null\n}\n\n/**\n * Read attribution (author) info from store\n */\nfunction readAttribution (store, subject) {\n const attributedTo = store.any(subject, ns.as('attributedTo'))\n\n if (!attributedTo || !attributedTo.uri) {\n return { type: 'none' }\n }\n\n if (isPerson(store, attributedTo)) {\n const name = store.anyValue(attributedTo, ns.as('name')) ||\n store.anyValue(attributedTo, ns.foaf('name')) ||\n store.anyValue(attributedTo, ns.vcard('fn')) ||\n store.anyValue(attributedTo, ns.schema('name')) ||\n ''\n return {\n type: 'person',\n webId: attributedTo.uri,\n name,\n imageSrc: readImageSrc(store, attributedTo)\n }\n }\n\n return { type: 'link', uri: attributedTo.uri }\n}\n\n/**\n * Read note data from store\n */\nfunction readNote (store, subject) {\n const content = store.any(subject, ns.as('content'))\n const published = store.any(subject, ns.as('published'))\n\n if (!content) return null\n\n return {\n content: content.value,\n published: published ? new Date(published.value) : null,\n attribution: readAttribution(store, subject)\n }\n}\n\n/**\n * Create the attribution element\n */\nfunction createAttributionElement (doc, attribution) {\n const container = doc.createElement('div')\n container.setAttribute('style', styles.attribution)\n\n if (attribution.type === 'none') {\n return container\n }\n\n if (attribution.type === 'link') {\n const link = doc.createElement('a')\n link.setAttribute('href', attribution.uri)\n link.setAttribute('style', styles.attributionLink)\n link.textContent = attribution.uri\n container.appendChild(link)\n return container\n }\n\n if (attribution.type === 'person') {\n if (attribution.imageSrc) {\n const img = doc.createElement('img')\n img.setAttribute('src', attribution.imageSrc)\n img.setAttribute('alt', attribution.name)\n img.setAttribute('style', styles.attributionImage)\n container.appendChild(img)\n }\n\n const link = doc.createElement('a')\n link.setAttribute('href', attribution.webId)\n link.setAttribute('style', styles.attributionLink)\n link.textContent = attribution.name || attribution.webId\n link.addEventListener('mouseover', () => {\n link.style.textDecoration = 'underline'\n })\n link.addEventListener('mouseout', () => {\n link.style.textDecoration = 'none'\n })\n container.appendChild(link)\n }\n\n return container\n}\n\n/**\n * Create the note card element\n */\nfunction createNoteCard (doc, note) {\n const card = doc.createElement('div')\n card.setAttribute('style', styles.card)\n\n // Attribution (author)\n card.appendChild(createAttributionElement(doc, note.attribution))\n\n // Content\n const content = doc.createElement('p')\n content.setAttribute('style', styles.content)\n content.textContent = note.content\n card.appendChild(content)\n\n // Date\n if (note.published) {\n const dateEl = doc.createElement('p')\n dateEl.setAttribute('style', styles.date)\n dateEl.textContent = formatDate(note.published)\n card.appendChild(dateEl)\n }\n\n return card\n}\n\n/**\n * The ActivityStreams Pane\n */\nexport default {\n icon: UI.icons.iconBase + 'noun_15695.svg',\n\n name: 'activitystreams',\n\n label: function (subject, context) {\n const store = context.session.store\n const types = store.findTypeURIs(subject)\n if (types[ns.as('Note').uri]) {\n return 'Note'\n }\n return null\n },\n\n render: function (subject, context) {\n const doc = context.dom\n const store = context.session.store\n const container = doc.createElement('div')\n\n const note = readNote(store, subject)\n\n if (!note) {\n const msg = doc.createElement('p')\n msg.textContent = 'Unable to read note content.'\n container.appendChild(msg)\n return container\n }\n\n // Render initial card\n container.appendChild(createNoteCard(doc, note))\n\n // If attribution is just a link, try to fetch and update\n if (note.attribution.type === 'link') {\n const attributionNode = sym(note.attribution.uri)\n store.fetcher.load(attributionNode).then(() => {\n // Re-read attribution after fetch\n const updatedAttribution = readAttribution(store, subject)\n if (updatedAttribution.type === 'person') {\n note.attribution = updatedAttribution\n container.innerHTML = ''\n container.appendChild(createNoteCard(doc, note))\n }\n }).catch(() => {\n // Keep original link attribution on error\n })\n }\n\n return container\n }\n}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G,GAAGiB,OAAO,CAACG,GAAG;IACvB,MAAM5C,KAAK,GAAGyC,OAAO,CAACC,OAAO,CAAC1C,KAAK;IACnC,MAAMyB,SAAS,GAAGD,GAAG,CAACE,aAAa,CAAC,KAAK,CAAC;IAE1C,MAAMU,IAAI,GAAGhB,QAAQ,CAACpB,KAAK,EAAEa,OAAO,CAAC;IAErC,IAAI,CAACuB,IAAI,EAAE;MACT,MAAMS,GAAG,GAAGrB,GAAG,CAACE,aAAa,CAAC,GAAG,CAAC;MAClCmB,GAAG,CAAChB,WAAW,GAAG,8BAA8B;MAChDJ,SAAS,CAACK,WAAW,CAACe,GAAG,CAAC;MAC1B,OAAOpB,SAAS;IAClB;;IAEA;IACAA,SAAS,CAACK,WAAW,CAACK,cAAc,CAACX,GAAG,EAAEY,IAAI,CAAC,CAAC;;IAEhD;IACA,IAAIA,IAAI,CAAC1D,WAAW,CAACsC,IAAI,KAAK,MAAM,EAAE;MACpC,MAAM8B,eAAe,GAAG1E,GAAG,CAACgE,IAAI,CAAC1D,WAAW,CAAC2B,GAAG,CAAC;MACjDL,KAAK,CAAC+C,OAAO,CAACC,IAAI,CAACF,eAAe,CAAC,CAACG,IAAI,CAAC,MAAM;QAC7C;QACA,MAAMC,kBAAkB,GAAGtC,eAAe,CAACZ,KAAK,EAAEa,OAAO,CAAC;QAC1D,IAAIqC,kBAAkB,CAAClC,IAAI,KAAK,QAAQ,EAAE;UACxCoB,IAAI,CAAC1D,WAAW,GAAGwE,kBAAkB;UACrCzB,SAAS,CAAC0B,SAAS,GAAG,EAAE;UACxB1B,SAAS,CAACK,WAAW,CAACK,cAAc,CAACX,GAAG,EAAEY,IAAI,CAAC,CAAC;QAClD;MACF,CAAC,CAAC,CAACgB,KAAK,CAAC,MAAM;QACb;MAAA,CACD,CAAC;IACJ;IAEA,OAAO3B,SAAS;EAClB;AACF,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/dist/argument/argumentPane.js b/dist/argument/argumentPane.js new file mode 100644 index 00000000..bb31146c --- /dev/null +++ b/dist/argument/argumentPane.js @@ -0,0 +1,57 @@ +/* View argument Pane +** +** This pane shows a position and optionally the positions which +** support or oppose it. +** @@ Unfinsihed. +** Should allow editing the data too + +*/ +import { store } from 'solid-logic-jss'; +import * as UI from 'solid-ui-jss'; +import * as panes from 'pane-registry'; + +// console.log('@@@ argument pane icon at ' + (module.__dirname || __dirname) + '/icon_argument.png') +export default { + icon: (module.__dirname || __dirname) + '/icon_argument.png', + // @@ fix fro mashlib version + + name: 'argument', + label: function (subject) { + const kb = store; + const t = kb.findTypeURIs(subject); + if (t[UI.ns.arg('Position').uri]) return 'Argument'; + return null; + }, + // View the data in a file in user-friendly way + render: function (subject, dom) { + const outliner = panes.getOutliner(dom); + const kb = store; + const arg = UI.ns.arg; + subject = kb.canon(subject); + // var types = kb.findTypeURIs(subject) + + const div = dom.createElement('div'); + div.setAttribute('class', 'argumentPane'); + + // var title = kb.any(subject, UI.ns.dc('title')) + + const comment = kb.any(subject, UI.ns.rdfs('comment')); + if (comment) { + const para = dom.createElement('p'); + para.setAttribute('style', 'margin-left: 2em; font-style: italic;'); + div.appendChild(para); + para.textContent = comment.value; + } + div.appendChild(dom.createElement('hr')); + let plist = kb.statementsMatching(subject, arg('support')); + outliner.appendPropertyTRs(div, plist, false); + div.appendChild(dom.createElement('hr')); + plist = kb.statementsMatching(subject, arg('opposition')); + outliner.appendPropertyTRs(div, plist, false); + div.appendChild(dom.createElement('hr')); + return div; + } +}; + +// ends +//# sourceMappingURL=argumentPane.js.map \ No newline at end of file diff --git a/dist/argument/argumentPane.js.map b/dist/argument/argumentPane.js.map new file mode 100644 index 00000000..69b21208 --- /dev/null +++ b/dist/argument/argumentPane.js.map @@ -0,0 +1 @@ +{"version":3,"file":"argumentPane.js","names":["store","UI","panes","icon","module","__dirname","name","label","subject","kb","t","findTypeURIs","ns","arg","uri","render","dom","outliner","getOutliner","canon","div","createElement","setAttribute","comment","any","rdfs","para","appendChild","textContent","value","plist","statementsMatching","appendPropertyTRs"],"sources":["../../src/argument/argumentPane.js"],"sourcesContent":["/* View argument Pane\n**\n** This pane shows a position and optionally the positions which\n** support or oppose it.\n** @@ Unfinsihed.\n** Should allow editing the data too\n\n*/\nimport { store } from 'solid-logic-jss'\nimport * as UI from 'solid-ui-jss'\nimport * as panes from 'pane-registry'\n\n// console.log('@@@ argument pane icon at ' + (module.__dirname || __dirname) + '/icon_argument.png')\nexport default {\n icon: (module.__dirname || __dirname) + '/icon_argument.png', // @@ fix fro mashlib version\n\n name: 'argument',\n\n label: function (subject) {\n const kb = store\n const t = kb.findTypeURIs(subject)\n\n if (t[UI.ns.arg('Position').uri]) return 'Argument'\n\n return null\n },\n\n // View the data in a file in user-friendly way\n render: function (subject, dom) {\n const outliner = panes.getOutliner(dom)\n const kb = store\n const arg = UI.ns.arg\n\n subject = kb.canon(subject)\n // var types = kb.findTypeURIs(subject)\n\n const div = dom.createElement('div')\n div.setAttribute('class', 'argumentPane')\n\n // var title = kb.any(subject, UI.ns.dc('title'))\n\n const comment = kb.any(subject, UI.ns.rdfs('comment'))\n if (comment) {\n const para = dom.createElement('p')\n para.setAttribute('style', 'margin-left: 2em; font-style: italic;')\n div.appendChild(para)\n para.textContent = comment.value\n }\n\n div.appendChild(dom.createElement('hr'))\n\n let plist = kb.statementsMatching(subject, arg('support'))\n outliner.appendPropertyTRs(div, plist, false)\n\n div.appendChild(dom.createElement('hr'))\n\n plist = kb.statementsMatching(subject, arg('opposition'))\n outliner.appendPropertyTRs(div, plist, false)\n\n div.appendChild(dom.createElement('hr'))\n return div\n }\n}\n\n// ends\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,KAAK,QAAQ,iBAAiB;AACvC,OAAO,KAAKC,EAAE,MAAM,cAAc;AAClC,OAAO,KAAKC,KAAK,MAAM,eAAe;;AAEtC;AACA,eAAe;EACbC,IAAI,EAAE,CAACC,MAAM,CAACC,SAAS,IAAIA,SAAS,IAAI,oBAAoB;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AEK,GAAG,CAAC,SAAS,CAAC,CAAC;IAC1DI,QAAQ,CAACe,iBAAiB,CAACZ,GAAG,EAAEU,KAAK,EAAE,KAAK,CAAC;IAE7CV,GAAG,CAACO,WAAW,CAACX,GAAG,CAACK,aAAa,CAAC,IAAI,CAAC,CAAC;IAExCS,KAAK,GAAGrB,EAAE,CAACsB,kBAAkB,CAACvB,OAAO,EAAEK,GAAG,CAAC,YAAY,CAAC,CAAC;IACzDI,QAAQ,CAACe,iBAAiB,CAACZ,GAAG,EAAEU,KAAK,EAAE,KAAK,CAAC;IAE7CV,GAAG,CAACO,WAAW,CAACX,GAAG,CAACK,aAAa,CAAC,IAAI,CAAC,CAAC;IACxC,OAAOD,GAAG;EACZ;AACF,CAAC;;AAED","ignoreList":[]} \ No newline at end of file diff --git a/dist/attach/attachPane.js b/dist/attach/attachPane.js new file mode 100644 index 00000000..7bd52443 --- /dev/null +++ b/dist/attach/attachPane.js @@ -0,0 +1,389 @@ +/* Attachment Pane + ** + ** - Attach a document to a thing + ** - View attachments + ** - Look at all unattached Supporting Documents. + ** - Drag a document onto the pane to attach it @@ + ** + ** + */ + +import * as UI from 'solid-ui-jss'; +import * as $rdf from 'rdflib'; +export default { + icon: UI.icons.iconBase + 'noun_25830.svg', + // noun_25830 + + name: 'attachments', + // Does the subject deserve an attachments pane? + // + // In this case we will render any thing which is in any subclass of + // certain classes, or also the certain classes themselves, as a + // triage tool for correlating many attachees with attachments. + // We also offer the pane for anything of any class which just has an attachment already. + // + label: function (subject, context) { + const kb = context.session.store; + const t = kb.findTypeURIs(subject); + const QU = $rdf.Namespace('http://www.w3.org/2000/10/swap/pim/qif#'); + const WF = $rdf.Namespace('http://www.w3.org/2005/01/wf/flow#'); + if (t['http://www.w3.org/ns/pim/trip#Trip'] || + // If in any subclass + subject.uri === 'http://www.w3.org/ns/pim/trip#Trip' || t['http://www.w3.org/2005/01/wf/flow#Task'] || t['http://www.w3.org/2000/10/swap/pim/qif#Transaction'] || + // subject.uri == 'http://www.w3.org/2000/10/swap/pim/qif#Transaction' || + QU('Transaction') in kb.findSuperClassesNT(subject) || kb.holds(subject, WF('attachment'))) { + return 'attachments'; + } + return null; + }, + render: function (subject, context) { + const dom = context.dom; + const kb = context.session.store; + const WF = $rdf.Namespace('http://www.w3.org/2005/01/wf/flow#'); + const QU = $rdf.Namespace('http://www.w3.org/2000/10/swap/pim/qif#'); + + // //////////////////////////////////////////////////////////////////////////// + + const complain = function complain(message) { + const pre = dom.createElement('pre'); + pre.setAttribute('style', 'background-color: pink'); + div.appendChild(pre); + pre.appendChild(dom.createTextNode(message)); + }; + + // Where can we write about this thing? + // + // Returns term for document or null + const findStore = function (kb, subject) { + if (kb.updater.editable(subject.doc(), kb)) return subject.doc(); + const store = kb.any(subject.doc(), QU('annotationStore')); + return store; + }; + const div = dom.createElement('div'); + const esc = UI.utils.escapeForXML; + div.setAttribute('class', 'attachPane'); + div.innerHTML = '

' + esc(UI.utils.label(subject, true)) + ' attachments

'; // + + const predicate = WF('attachment'); + const range = QU('SupportingDocument'); + let subjects, multi; + const options = {}; + let currentMode = 0; // 0 -> Show all; 1 -> Attached; 2 -> unattached + let currentSubject = null; + let currentObject = null; + const objectType = QU('SupportingDocument'); + + // Find all members of the class which we know about + // and sort them by an appropriate property. @@ Move to library + // + + const getSortKeySimple = function (_c) { + const uriMap = { + 'http://www.w3.org/2005/01/wf/flow#Task': 'http://purl.org/dc/elements/1.1/created', + 'http://www.w3.org/ns/pim/trip#Trip': 'http://www.w3.org/2002/12/cal/ical#dtstart', + 'http://www.w3.org/2000/10/swap/pim/qif#Transaction': 'http://www.w3.org/2000/10/swap/pim/qif#date', + 'http://www.w3.org/2000/10/swap/pim/qif#SupportingDocument': 'http://purl.org/dc/elements/1.1/date' + }; + const uri = uriMap[subject.uri]; + return uri ? kb.sym(uri) : kb.any(subject, UI.ns.ui('sortBy')); + }; + const getSortKey = function (c) { + let k = getSortKeySimple(c.uri); + if (k) return k; + const sup = kb.findSuperClassesNT(c); + for (const cl in sup) { + // note unordered -- could be closest first + k = getSortKeySimple(kb.fromNT(cl).uri); + if (k) return k; + } + return undefined; // failure + }; + const getMembersAndSort = function (subject) { + const sortBy = getSortKey(subject); + let u, x, key; + const uriHash = kb.findMemberURIs(subject); + const pairs = []; + const subjects = []; + for (u in uriHash) { + // @@ TODO: Write away the need for exception on next line + + if (Object.prototype.hasOwnProperty.call(uriHash, u)) { + x = kb.sym(u); + if (sortBy) { + key = kb.any(x, sortBy); + if (!key) { + // complain("No key "+key+" sortby "+sortBy+" for "+x) + key = '8888-12-31'; + } else { + key = key.value; + } + } else { + complain('No sortby ' + sortBy + ' for ' + x); + key = '9999-12-31'; + } + // key = (sortBy && kb.any(x, sortBy)) || kb.literal("9999-12-31") // Undated appear future + // if (!key) complain("Sort: '"+key+"' No "+sortBy+" for "+x) // Assume just not in this year + pairs.push([key, x]); + } + } + pairs.sort(); + pairs.reverse(); // @@ Descending order .. made a toggle? + for (let i = 0; i < pairs.length; i++) { + subjects.push(pairs[i][1]); + } + return subjects; + }; + + // Set up a triage of many class members against documents or just one + if (subject.uri === 'http://www.w3.org/ns/pim/trip#Trip' || QU('Transaction') in kb.findSuperClassesNT(subject) + // subject.uri == 'http://www.w3.org/2000/10/swap/pim/qif#Transaction' + ) { + multi = true; + subjects = getMembersAndSort(subject); + } else { + currentSubject = subject; + currentMode = 1; // Show attached only. + subjects = [subject]; + multi = false; + } + + // var store = findStore(kb, subject) + // if (!store) complain("There is no annotation store for: "+subject.uri) + + // var objects = kb.each(undefined, ns.rdf('type'), range) + const objects = getMembersAndSort(range); + if (!objects) complain('objects:' + objects.length); + const deselectObject = function () { + currentObject = null; + preview.innerHTML = ''; + }; + const showFiltered = function (mode) { + const filtered = mode === 0 ? objects : getFiltered(); + // eslint-enable + UI.widgets.selectorPanelRefresh(objectList, dom, kb, objectType, predicate, true, filtered, options, showObject, linkClicked); + if (filtered.length === 1) { + currentObject = filtered[0]; + showObject(currentObject, null, true); // @@ (Sure?) if only one select it. + } else { + deselectObject(); + } + function getFiltered() { + return mode === 1 ? currentSubject === null ? objects.filter(y => !!kb.holds(undefined, predicate, y)) : objects.filter(y => !!kb.holds(currentSubject, predicate, y)) : objects.filter(y => kb.each(undefined, predicate, y).length === 0); + } + }; + const setAttachment = function (x, y, value, refresh) { + if (kb.holds(x, predicate, y) === value) return; + const verb = value ? 'attach' : 'detach'; + // complain("Info: starting to "+verb+" " + y.uri + " to "+x.uri+ ":\n") + const linkDone3 = function (uri, ok, body) { + if (ok) { + // complain("Success "+verb+" "+y.uri+" to "+x.uri+ ":\n"+ body) + refresh(); + } else { + complain('Error: Unable to ' + verb + ' ' + y.uri + ' to ' + x.uri + ':\n' + body); + } + }; + const store = findStore(kb, x); + if (!store) { + complain('There is no annotation store for: ' + x.uri); + } else { + const sts = [$rdf.st(x, predicate, y, store)]; + if (value) { + kb.updater.update([], sts, linkDone3); + } else { + kb.updater.update(sts, [], linkDone3); + } + } + }; + const linkClicked = function (x, event, inverse, refresh) { + let s, o; + if (inverse) { + // Objectlist + if (!currentSubject) { + complain('No subject for the link has been selected'); + return; + } else { + s = currentSubject; + o = x; + } + } else { + // Subjectlist + if (!currentObject) { + complain('No object for the link has been selected'); + return; + } else { + s = x; + o = currentObject; + } + } + setAttachment(s, o, !kb.holds(s, predicate, o), refresh); // @@ toggle + }; + + // When you click on a subject, filter the objects connected to the subject in Mode 1 + const showSubject = function (x, event, selected) { + if (selected) { + currentSubject = x; + } else { + currentSubject = null; + if (currentMode === 1) deselectObject(); + } // If all are displayed, refresh would just annoy: + if (currentMode !== 0) showFiltered(currentMode); // Refresh the objects + }; + if (multi) { + const subjectList = UI.widgets.selectorPanel(dom, kb, subject, predicate, false, subjects, options, showSubject, linkClicked); + subjectList.setAttribute('style', 'background-color: white; width: 25em; height: 100%; padding: 0 em; overflow:scroll; float:left'); + div.appendChild(subjectList); + } + const showObject = function (x, event, selected) { + if (!selected) { + deselectObject(); + preview.innerHTML = ''; // Clean out what is there + // complain("Show object "+x.uri) + return; + } + currentObject = x; + try { + /* + var dispalyable = function (kb, x) { + var cts = kb.fetcher.getHeader(x, 'content-type') + if (cts) { + var displayables = ['text/html', 'image/png', 'application/pdf'] + for (var j = 0; j < cts.length; j++) { + for (var k = 0; k < displayables.length; k++) { + if (cts[j].indexOf(displayables[k]) >= 0) { + return true + } + } + } + } + return false + } + */ + preview.innerHTML = 'Loading ....'; + if (x.uri) { + kb.fetcher.load(x.uri).then(() => { + const outliner = context.getOutliner(dom); + const display = outliner.propertyTable(x); // ,table, pane + preview.innerHTML = ''; + preview.appendChild(display); + }).catch(err => { + preview.textContent = 'Error loading ' + x.uri + ': ' + err; + }); + } + /* + if (dispalyable(kb, x) || x.uri.slice(-4) == ".pdf" || x.uri.slice(-4) == ".png" || x.uri.slice(-5) == ".html" || + x.uri.slice(-5) == ".jpeg") { // @@@@@@ MAJOR KLUDGE! use metadata after HEAD + preview.innerHTML = '' + } else { + } + */ + } catch (e) { + preview.innerHTML = '' + 'Error:' + e + ''; // @@ enc + } + }; + div.setAttribute('style', 'background-color: white; width:40cm; height:20cm;'); + const headerButtons = function (dom, labels, intial, callback) { + const head = dom.createElement('table'); + let current = intial; + head.setAttribute('style', 'float: left; width: 30em; padding: 0.5em; height: 1.5em; background-color: #ddd; color: #444; font-weight: bold'); + const tr = dom.createElement('tr'); + const style0 = 'border-radius: 0.6em; text-align: center;'; + const style1 = style0 + 'background-color: #ccc; color: black;'; + head.appendChild(tr); + const setStyles = function () { + for (i = 0; i < labels.length; i++) { + buttons[i].setAttribute('style', i === current ? style1 : style0); + } + }; + let i, b; + const buttons = []; + for (i = 0; i < labels.length; i++) { + b = buttons[i] = dom.createElement('td'); + b.textContent = labels[i]; + tr.appendChild(buttons[i]); + const listen = function (b, i) { + b.addEventListener('click', function (_e) { + current = i; + setStyles(); + callback(i); + }); + }; + listen(b, i); + } + setStyles(); + return head; + }; + const setMode = function (mode) { + if (mode !== currentMode) { + currentMode = mode; + deselectObject(); + showFiltered(mode); + } + }; + const wrapper = dom.createElement('div'); + wrapper.setAttribute('style', ' width: 30em; height: 100%; padding: 0em; float:left;'); + // wrapper.appendChild(head) + div.appendChild(wrapper); + wrapper.appendChild(headerButtons(dom, ['all', 'attached', 'not attached'], currentMode, setMode)); + const objectList = UI.widgets.selectorPanel(dom, kb, objectType, predicate, true, objects, options, showObject, linkClicked); + objectList.setAttribute('style', 'background-color: #ffe; width: 30em; height: 100%; padding: 0em; overflow:scroll;'); // float:left + wrapper.appendChild(objectList); + + // objectList.insertBefore(head, objectList.firstChild) + + const preview = dom.createElement('div'); + preview.setAttribute('style', /* background-color: black; */'padding: 0em; margin: 0; height: 100%; overflow:scroll;'); + div.appendChild(preview); + showFiltered(currentMode); + if (subjects.length > 0 && multi) { + const stores = {}; + for (let k = 0; k < subjects.length; k++) { + const store = findStore(kb, subjects[k]); + if (store) stores[store.uri] = subjects[k]; + // if (!store) complain("No store for "+subjects[k].uri) + } + for (const storeURI in stores) { + // var store = findStore(kb,subjects[subjectList.length-1]) + const store = kb.sym(storeURI); + const mintBox = dom.createElement('div'); + mintBox.setAttribute('style', 'clear: left; width: 20em; margin-top:2em; background-color:#ccc; border-radius: 1em; padding: 1em; font-weight: bold;'); + mintBox.textContent = '+ New ' + UI.utils.label(subject); + mintBox.textContent += ' in ' + UI.utils.label(store); + const storeLab = dom.createElement('span'); + storeLab.setAttribute('style', 'font-weight: normal; font-size: 80%; color: #777;'); + storeLab.textContent = storeURI; + mintBox.appendChild(dom.createElement('br')); + mintBox.appendChild(storeLab); + /* + var mintButton = dom.createElement('img') + mintBox.appendChild(mintButton) + mintButton.setAttribute('src', ...); @@ Invokes master handler + */ + mintBox.addEventListener('click', function (_event) { + const thisForm = UI.widgets.promptForNew(dom, kb, subject, predicate, subject, null, store, function (ok, _body) { + if (!ok) { + // callback(ok, body); // @@ if ok, need some form of refresh of the select for the new thing + } else { + // Refresh @@ + } + }); + try { + div.insertBefore(thisForm, mintBox.nextSibling); // Sigh no insertAfter + } catch (e) { + div.appendChild(thisForm); + } + // var newObject = thisForm.AJAR_subject + }, false); + div.appendChild(mintBox); + } + } + + // if (!me) complain("(You do not have your Web Id set. Set your Web ID to make changes.)") + + return div; + } +}; // pane object + +// ends +//# sourceMappingURL=attachPane.js.map \ No newline at end of file diff --git a/dist/attach/attachPane.js.map b/dist/attach/attachPane.js.map new file mode 100644 index 00000000..d9c435a6 --- /dev/null +++ b/dist/attach/attachPane.js.map @@ -0,0 +1 @@ +{"version":3,"file":"attachPane.js","names":["UI","$rdf","icon","icons","iconBase","name","label","subject","context","kb","session","store","t","findTypeURIs","QU","Namespace","WF","uri","findSuperClassesNT","holds","render","dom","complain","message","pre","createElement","setAttribute","div","appendChild","createTextNode","findStore","updater","editable","doc","any","esc","utils","escapeForXML","innerHTML","predicate","range","subjects","multi","options","currentMode","currentSubject","currentObject","objectType","getSortKeySimple","_c","uriMap","sym","ns","ui","getSortKey","c","k","sup","cl","fromNT","undefined","getMembersAndSort","sortBy","u","x","key","uriHash","findMemberURIs","pairs","Object","prototype","hasOwnProperty","call","value","push","sort","reverse","i","length","objects","deselectObject","preview","showFiltered","mode","filtered","getFiltered","widgets","selectorPanelRefresh","objectList","showObject","linkClicked","filter","y","each","setAttachment","refresh","verb","linkDone3","ok","body","sts","st","update","event","inverse","s","o","showSubject","selected","subjectList","selectorPanel","fetcher","load","then","outliner","getOutliner","display","propertyTable","catch","err","textContent","e","headerButtons","labels","intial","callback","head","current","tr","style0","style1","setStyles","buttons","b","listen","addEventListener","_e","setMode","wrapper","stores","storeURI","mintBox","storeLab","_event","thisForm","promptForNew","_body","insertBefore","nextSibling"],"sources":["../../src/attach/attachPane.js"],"sourcesContent":["/* Attachment Pane\n **\n ** - Attach a document to a thing\n ** - View attachments\n ** - Look at all unattached Supporting Documents.\n ** - Drag a document onto the pane to attach it @@\n **\n **\n */\n\nimport * as UI from 'solid-ui-jss'\nimport * as $rdf from 'rdflib'\n\nexport default {\n icon: UI.icons.iconBase + 'noun_25830.svg', // noun_25830\n\n name: 'attachments',\n\n // Does the subject deserve an attachments pane?\n //\n // In this case we will render any thing which is in any subclass of\n // certain classes, or also the certain classes themselves, as a\n // triage tool for correlating many attachees with attachments.\n // We also offer the pane for anything of any class which just has an attachment already.\n //\n label: function (subject, context) {\n const kb = context.session.store\n const t = kb.findTypeURIs(subject)\n const QU = $rdf.Namespace('http://www.w3.org/2000/10/swap/pim/qif#')\n const WF = $rdf.Namespace('http://www.w3.org/2005/01/wf/flow#')\n if (\n t['http://www.w3.org/ns/pim/trip#Trip'] || // If in any subclass\n subject.uri === 'http://www.w3.org/ns/pim/trip#Trip' ||\n t['http://www.w3.org/2005/01/wf/flow#Task'] ||\n t['http://www.w3.org/2000/10/swap/pim/qif#Transaction'] ||\n // subject.uri == 'http://www.w3.org/2000/10/swap/pim/qif#Transaction' ||\n QU('Transaction') in kb.findSuperClassesNT(subject) ||\n kb.holds(subject, WF('attachment'))\n ) {\n return 'attachments'\n }\n return null\n },\n\n render: function (subject, context) {\n const dom = context.dom\n const kb = context.session.store\n const WF = $rdf.Namespace('http://www.w3.org/2005/01/wf/flow#')\n const QU = $rdf.Namespace('http://www.w3.org/2000/10/swap/pim/qif#')\n\n // ////////////////////////////////////////////////////////////////////////////\n\n const complain = function complain (message) {\n const pre = dom.createElement('pre')\n pre.setAttribute('style', 'background-color: pink')\n div.appendChild(pre)\n pre.appendChild(dom.createTextNode(message))\n }\n\n // Where can we write about this thing?\n //\n // Returns term for document or null\n const findStore = function (kb, subject) {\n if (kb.updater.editable(subject.doc(), kb)) return subject.doc()\n const store = kb.any(subject.doc(), QU('annotationStore'))\n return store\n }\n\n const div = dom.createElement('div')\n const esc = UI.utils.escapeForXML\n div.setAttribute('class', 'attachPane')\n div.innerHTML =\n '

' + esc(UI.utils.label(subject, true)) + ' attachments

' //\n\n const predicate = WF('attachment')\n const range = QU('SupportingDocument')\n\n let subjects, multi\n const options = {}\n let currentMode = 0 // 0 -> Show all; 1 -> Attached; 2 -> unattached\n let currentSubject = null\n let currentObject = null\n const objectType = QU('SupportingDocument')\n\n // Find all members of the class which we know about\n // and sort them by an appropriate property. @@ Move to library\n //\n\n const getSortKeySimple = function (_c) {\n const uriMap = {\n 'http://www.w3.org/2005/01/wf/flow#Task': 'http://purl.org/dc/elements/1.1/created',\n 'http://www.w3.org/ns/pim/trip#Trip': 'http://www.w3.org/2002/12/cal/ical#dtstart',\n 'http://www.w3.org/2000/10/swap/pim/qif#Transaction': 'http://www.w3.org/2000/10/swap/pim/qif#date',\n 'http://www.w3.org/2000/10/swap/pim/qif#SupportingDocument': 'http://purl.org/dc/elements/1.1/date'\n }\n const uri = uriMap[subject.uri]\n return uri ? kb.sym(uri) : kb.any(subject, UI.ns.ui('sortBy'))\n }\n\n const getSortKey = function (c) {\n let k = getSortKeySimple(c.uri)\n if (k) return k\n const sup = kb.findSuperClassesNT(c)\n for (const cl in sup) {\n // note unordered -- could be closest first\n k = getSortKeySimple(kb.fromNT(cl).uri)\n if (k) return k\n }\n return undefined // failure\n }\n\n const getMembersAndSort = function (subject) {\n const sortBy = getSortKey(subject)\n let u, x, key\n const uriHash = kb.findMemberURIs(subject)\n const pairs = []\n const subjects = []\n for (u in uriHash) {\n // @@ TODO: Write away the need for exception on next line\n\n if (Object.prototype.hasOwnProperty.call(uriHash, u)) {\n x = kb.sym(u)\n if (sortBy) {\n key = kb.any(x, sortBy)\n if (!key) {\n // complain(\"No key \"+key+\" sortby \"+sortBy+\" for \"+x)\n key = '8888-12-31'\n } else {\n key = key.value\n }\n } else {\n complain('No sortby ' + sortBy + ' for ' + x)\n key = '9999-12-31'\n }\n // key = (sortBy && kb.any(x, sortBy)) || kb.literal(\"9999-12-31\") // Undated appear future\n // if (!key) complain(\"Sort: '\"+key+\"' No \"+sortBy+\" for \"+x) // Assume just not in this year\n pairs.push([key, x])\n }\n }\n pairs.sort()\n pairs.reverse() // @@ Descending order .. made a toggle?\n for (let i = 0; i < pairs.length; i++) {\n subjects.push(pairs[i][1])\n }\n return subjects\n }\n\n // Set up a triage of many class members against documents or just one\n if (\n subject.uri === 'http://www.w3.org/ns/pim/trip#Trip' ||\n QU('Transaction') in kb.findSuperClassesNT(subject)\n // subject.uri == 'http://www.w3.org/2000/10/swap/pim/qif#Transaction'\n ) {\n multi = true\n subjects = getMembersAndSort(subject)\n } else {\n currentSubject = subject\n currentMode = 1 // Show attached only.\n subjects = [subject]\n multi = false\n }\n\n // var store = findStore(kb, subject)\n // if (!store) complain(\"There is no annotation store for: \"+subject.uri)\n\n // var objects = kb.each(undefined, ns.rdf('type'), range)\n const objects = getMembersAndSort(range)\n if (!objects) complain('objects:' + objects.length)\n\n const deselectObject = function () {\n currentObject = null\n preview.innerHTML = ''\n }\n\n const showFiltered = function (mode) {\n const filtered = mode === 0 ? objects : getFiltered()\n // eslint-enable\n UI.widgets.selectorPanelRefresh(\n objectList,\n dom,\n kb,\n objectType,\n predicate,\n true,\n filtered,\n options,\n showObject,\n linkClicked\n )\n if (filtered.length === 1) {\n currentObject = filtered[0]\n showObject(currentObject, null, true) // @@ (Sure?) if only one select it.\n } else {\n deselectObject()\n }\n\n function getFiltered () {\n return mode === 1\n ? currentSubject === null\n ? objects.filter(y => !!kb.holds(undefined, predicate, y))\n : objects.filter(y => !!kb.holds(currentSubject, predicate, y))\n : objects.filter(y => kb.each(undefined, predicate, y).length === 0)\n }\n }\n\n const setAttachment = function (x, y, value, refresh) {\n if (kb.holds(x, predicate, y) === value) return\n const verb = value ? 'attach' : 'detach'\n // complain(\"Info: starting to \"+verb+\" \" + y.uri + \" to \"+x.uri+ \":\\n\")\n const linkDone3 = function (uri, ok, body) {\n if (ok) {\n // complain(\"Success \"+verb+\" \"+y.uri+\" to \"+x.uri+ \":\\n\"+ body)\n refresh()\n } else {\n complain(\n 'Error: Unable to ' +\n verb +\n ' ' +\n y.uri +\n ' to ' +\n x.uri +\n ':\\n' +\n body\n )\n }\n }\n\n const store = findStore(kb, x)\n if (!store) {\n complain('There is no annotation store for: ' + x.uri)\n } else {\n const sts = [$rdf.st(x, predicate, y, store)]\n if (value) {\n kb.updater.update([], sts, linkDone3)\n } else {\n kb.updater.update(sts, [], linkDone3)\n }\n }\n }\n\n const linkClicked = function (x, event, inverse, refresh) {\n let s, o\n if (inverse) {\n // Objectlist\n if (!currentSubject) {\n complain('No subject for the link has been selected')\n return\n } else {\n s = currentSubject\n o = x\n }\n } else {\n // Subjectlist\n if (!currentObject) {\n complain('No object for the link has been selected')\n return\n } else {\n s = x\n o = currentObject\n }\n }\n setAttachment(s, o, !kb.holds(s, predicate, o), refresh) // @@ toggle\n }\n\n // When you click on a subject, filter the objects connected to the subject in Mode 1\n const showSubject = function (x, event, selected) {\n if (selected) {\n currentSubject = x\n } else {\n currentSubject = null\n if (currentMode === 1) deselectObject()\n } // If all are displayed, refresh would just annoy:\n if (currentMode !== 0) showFiltered(currentMode) // Refresh the objects\n }\n\n if (multi) {\n const subjectList = UI.widgets.selectorPanel(\n dom,\n kb,\n subject,\n predicate,\n false,\n subjects,\n options,\n showSubject,\n linkClicked\n )\n subjectList.setAttribute(\n 'style',\n 'background-color: white; width: 25em; height: 100%; padding: 0 em; overflow:scroll; float:left'\n )\n div.appendChild(subjectList)\n }\n\n const showObject = function (x, event, selected) {\n if (!selected) {\n deselectObject()\n preview.innerHTML = '' // Clean out what is there\n // complain(\"Show object \"+x.uri)\n return\n }\n currentObject = x\n try {\n /*\n var dispalyable = function (kb, x) {\n var cts = kb.fetcher.getHeader(x, 'content-type')\n if (cts) {\n var displayables = ['text/html', 'image/png', 'application/pdf']\n for (var j = 0; j < cts.length; j++) {\n for (var 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 preview.innerHTML = 'Loading ....'\n if (x.uri) {\n kb.fetcher\n .load(x.uri)\n .then(() => {\n const outliner = context.getOutliner(dom)\n const display = outliner.propertyTable(x) // ,table, pane\n preview.innerHTML = ''\n preview.appendChild(display)\n })\n .catch(err => {\n preview.textContent = 'Error loading ' + x.uri + ': ' + err\n })\n }\n /*\n if (dispalyable(kb, x) || x.uri.slice(-4) == \".pdf\" || x.uri.slice(-4) == \".png\" || x.uri.slice(-5) == \".html\" ||\n x.uri.slice(-5) == \".jpeg\") { // @@@@@@ MAJOR KLUDGE! use metadata after HEAD\n preview.innerHTML = ''\n } else {\n }\n */\n } catch (e) {\n preview.innerHTML =\n '' + 'Error:' + e + '' // @@ enc\n }\n }\n\n div.setAttribute(\n 'style',\n 'background-color: white; width:40cm; height:20cm;'\n )\n\n const headerButtons = function (dom, labels, intial, callback) {\n const head = dom.createElement('table')\n let current = intial\n head.setAttribute(\n 'style',\n 'float: left; width: 30em; padding: 0.5em; height: 1.5em; background-color: #ddd; color: #444; font-weight: bold'\n )\n const tr = dom.createElement('tr')\n const style0 = 'border-radius: 0.6em; text-align: center;'\n const style1 = style0 + 'background-color: #ccc; color: black;'\n head.appendChild(tr)\n const setStyles = function () {\n for (i = 0; i < labels.length; i++) {\n buttons[i].setAttribute('style', i === current ? style1 : style0)\n }\n }\n let i, b\n const buttons = []\n for (i = 0; i < labels.length; i++) {\n b = buttons[i] = dom.createElement('td')\n b.textContent = labels[i]\n tr.appendChild(buttons[i])\n const listen = function (b, i) {\n b.addEventListener('click', function (_e) {\n current = i\n setStyles()\n callback(i)\n })\n }\n listen(b, i)\n }\n setStyles()\n return head\n }\n\n const setMode = function (mode) {\n if (mode !== currentMode) {\n currentMode = mode\n deselectObject()\n showFiltered(mode)\n }\n }\n\n const wrapper = dom.createElement('div')\n wrapper.setAttribute(\n 'style',\n ' width: 30em; height: 100%; padding: 0em; float:left;'\n )\n // wrapper.appendChild(head)\n div.appendChild(wrapper)\n wrapper.appendChild(\n headerButtons(\n dom,\n ['all', 'attached', 'not attached'],\n currentMode,\n setMode\n )\n )\n\n const objectList = UI.widgets.selectorPanel(\n dom,\n kb,\n objectType,\n predicate,\n true,\n objects,\n options,\n showObject,\n linkClicked\n )\n objectList.setAttribute(\n 'style',\n 'background-color: #ffe; width: 30em; height: 100%; padding: 0em; overflow:scroll;'\n ) // float:left\n wrapper.appendChild(objectList)\n\n // objectList.insertBefore(head, objectList.firstChild)\n\n const preview = dom.createElement('div')\n preview.setAttribute(\n 'style',\n /* background-color: black; */ 'padding: 0em; margin: 0; height: 100%; overflow:scroll;'\n )\n div.appendChild(preview)\n showFiltered(currentMode)\n\n if (subjects.length > 0 && multi) {\n const stores = {}\n for (let k = 0; k < subjects.length; k++) {\n const store = findStore(kb, subjects[k])\n if (store) stores[store.uri] = subjects[k]\n // if (!store) complain(\"No store for \"+subjects[k].uri)\n }\n for (const storeURI in stores) {\n // var store = findStore(kb,subjects[subjectList.length-1])\n const store = kb.sym(storeURI)\n const mintBox = dom.createElement('div')\n mintBox.setAttribute(\n 'style',\n 'clear: left; width: 20em; margin-top:2em; background-color:#ccc; border-radius: 1em; padding: 1em; font-weight: bold;'\n )\n mintBox.textContent = '+ New ' + UI.utils.label(subject)\n\n mintBox.textContent += ' in ' + UI.utils.label(store)\n const storeLab = dom.createElement('span')\n storeLab.setAttribute(\n 'style',\n 'font-weight: normal; font-size: 80%; color: #777;'\n )\n storeLab.textContent = storeURI\n mintBox.appendChild(dom.createElement('br'))\n mintBox.appendChild(storeLab)\n /*\n var mintButton = dom.createElement('img')\n mintBox.appendChild(mintButton)\n mintButton.setAttribute('src', ...); @@ Invokes master handler\n */\n mintBox.addEventListener(\n 'click',\n function (_event) {\n const thisForm = UI.widgets.promptForNew(\n dom,\n kb,\n subject,\n predicate,\n subject,\n null,\n store,\n function (ok, _body) {\n if (!ok) {\n // callback(ok, body); // @@ if ok, need some form of refresh of the select for the new thing\n } else {\n // Refresh @@\n }\n }\n )\n try {\n div.insertBefore(thisForm, mintBox.nextSibling) // Sigh no insertAfter\n } catch (e) {\n div.appendChild(thisForm)\n }\n // var newObject = thisForm.AJAR_subject\n },\n false\n )\n div.appendChild(mintBox)\n }\n }\n\n // if (!me) complain(\"(You do not have your Web Id set. Set your Web ID to make changes.)\")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AAC;QAC5CoH,OAAO,CAACjH,WAAW,CAACkH,QAAQ,CAAC;QAC7B;AACR;AACA;AACA;AACA;QACQD,OAAO,CAACN,gBAAgB,CACtB,OAAO,EACP,UAAUQ,MAAM,EAAE;UAChB,MAAMC,QAAQ,GAAGhJ,EAAE,CAACsF,OAAO,CAAC2D,YAAY,CACtC5H,GAAG,EACHZ,EAAE,EACFF,OAAO,EACPgC,SAAS,EACThC,OAAO,EACP,IAAI,EACJI,KAAK,EACL,UAAUuF,EAAE,EAAEgD,KAAK,EAAE;YACnB,IAAI,CAAChD,EAAE,EAAE;cACP;YAAA,CACD,MAAM;cACL;YAAA;UAEJ,CACF,CAAC;UACD,IAAI;YACFvE,GAAG,CAACwH,YAAY,CAACH,QAAQ,EAAEH,OAAO,CAACO,WAAW,CAAC,EAAC;UAClD,CAAC,CAAC,OAAO3B,CAAC,EAAE;YACV9F,GAAG,CAACC,WAAW,CAACoH,QAAQ,CAAC;UAC3B;UACA;QACF,CAAC,EACD,KACF,CAAC;QACDrH,GAAG,CAACC,WAAW,CAACiH,OAAO,CAAC;MAC1B;IACF;;IAEA;;IAEA,OAAOlH,GAAG;EACZ;AACF,CAAC,EAAC;;AAEF","ignoreList":[]} \ No newline at end of file diff --git a/dist/audio/audioPane.js b/dist/audio/audioPane.js new file mode 100644 index 00000000..4f177bac --- /dev/null +++ b/dist/audio/audioPane.js @@ -0,0 +1,176 @@ +/* Single audio play Pane + ** + */ +import * as UI from 'solid-ui-jss'; +import * as $rdf from 'rdflib'; +const ns = UI.ns; +export default { + icon: UI.icons.iconBase + 'noun_534313.svg', + name: 'audio', + // Does the subject deserve an audio play pane? + label: function (subject, context) { + const kb = context.session.store; + const typeURIs = kb.findTypeURIs(subject); + const prefix = $rdf.Util.mediaTypeClass('audio/*').uri.split('*')[0]; + for (const t in typeURIs) { + if (t.startsWith(prefix)) return 'Play audio'; + } + return null; + }, + render: function (subject, context) { + const kb = context.session.store; + const dom = context.dom; + const options = { + autoplay: false, + chain: true, + chainAlbums: true, + loop: false + }; + const removeExtension = function (str) { + const dot = str.lastIndexOf('.'); + if (dot < 0) return str; // if any + const slash = str.lastIndexOf('/'); + if (dot < slash) return str; + return str.slice(0, dot); + }; + + // True if there is another file like song.mp3 when this is "song 1.mp3" + // or this is song.m4a + // + const looksRedundant = function (x) { + const folder = kb.any(undefined, ns.ldp('contains'), x); + if (!folder) return false; + const contents = kb.each(folder, ns.ldp('contains')); + if (contents.length < 2) return false; + const thisName = x.uri; + for (let k = 0; k < contents.length; k++) { + const otherName = contents[k].uri; + if (thisName.length > otherName.length && thisName.startsWith(removeExtension(otherName))) { + return true; + } + if (thisName.endsWith('.m4a') && otherName.endsWith('.mp3') && removeExtension(thisName) === removeExtension(otherName)) { + return true; + } + } + return false; + }; + + // Alternative methods could include: + // Accesing metadata in the audio contol, or paring the audio file + const guessNames = function (x) { + const a = x.uri.split('/').slice(-3); // Hope artist, album, track + const decode = function (str) { + try { + return decodeURIComponent(str); + } catch (e) { + return str; + } + }; + artistRow.textContent = decode(a[0]); + albumRow.textContent = decode(a[1]); + trackRow.textContent = decode(removeExtension(a[2])); + }; + const moveOn = function (current, level) { + return new Promise(function (resolve) { + level = level || 0; + if (!options.chain) return resolve(null); + // Ideally navigate graph else cheat with URI munging: + const folder = kb.any(undefined, ns.ldp('contains'), current) || current.dir(); + if (!folder) return resolve(null); + kb.fetcher.load(folder).then(function (_xhr) { + const contents = kb.each(folder, ns.ldp('contains')); // @@ load if not loaded + // if (contents.length < 2) return resolve(null) NO might move on from 1-track album + let j; + contents.sort(); // sort by URI which hopefully will get tracks in order + for (let i = 0; i < contents.length; i++) { + if (current.uri === contents[i].uri) { + j = (i + 1) % contents.length; + if (j === 0) { + if (!options.chainAlbums) { + if (options.loop) { + return resolve(contents[j]); + } + return resolve(null); // No more music needed + } else { + // chain albums + if (level === 1 || !options.chainAlbums) return resolve(null); // limit of navigating treee + moveOn(folder, level + 1).then(function (folder2) { + if (folder2) { + kb.fetcher.load(folder2).then(function (_xhr) { + const contents = kb.each(folder2, ns.ldp('contains')); + if (contents.length === 0) return resolve(null); + contents.sort(); + console.log('New Album: ' + folder2); + return resolve(contents[0]); // Start off new album + }); + } + }); + } + } else { + return resolve(contents[j]); + } + } + } // for + }); + }); + }; + const endedListener = function (event) { + const current = kb.sym(event.target.getAttribute('src')); + if (!options.chain) return; + const tryNext = function (cur) { + const current = cur; + moveOn(current).then(function (next) { + if (!next) { + console.log('No successor to ' + current); + return; + } + if (!looksRedundant(next)) { + console.log('Moving on to ' + next); + guessNames(next); + controlRow.appendChild(audioControl(next, true)); // Force autoplay + controlRow.removeChild(event.target); + } else { + console.log('Ignoring redundant ' + next); + tryNext(next); + } + }); + }; + tryNext(current); + }; + const audioControl = function (song, autoplay) { + const audio = dom.createElement('audio'); + audio.setAttribute('controls', 'yes'); + // get audio with authenticated fetch + kb.fetcher._fetch(song.uri).then(function (response) { + return response.blob(); + }).then(function (myBlob) { + const objectURL = URL.createObjectURL(myBlob); + audio.setAttribute('src', objectURL); // w640 h480 // + }); + if (autoplay) { + audio.setAttribute('autoplay', 'autoplay'); // Make this a personal preference + } + audio.addEventListener('ended', endedListener, false); + return audio; + }; + const div = dom.createElement('div'); + const table = div.appendChild(dom.createElement('table')); + const labelStyle = 'padding: 0.3em; color:white; background-color: black;'; + const artistRow = table.appendChild(dom.createElement('tr')); + artistRow.style.cssText = labelStyle; + const albumRow = table.appendChild(dom.createElement('tr')); + albumRow.style.cssText = labelStyle; + const trackRow = table.appendChild(dom.createElement('tr')); + trackRow.style.cssText = labelStyle; + const controlRow = table.appendChild(dom.createElement('tr')); + guessNames(subject); + controlRow.appendChild(audioControl(subject, options.autoplay)); + if (!kb.holds(undefined, ns.ldp('contains'), subject) && subject.dir()) { + kb.fetcher.load(subject.dir()); // Prefetch enclosing @@ or playlist + } + return div; + } +}; + +// ends +//# sourceMappingURL=audioPane.js.map \ No newline at end of file diff --git a/dist/audio/audioPane.js.map b/dist/audio/audioPane.js.map new file mode 100644 index 00000000..f128efbe --- /dev/null +++ b/dist/audio/audioPane.js.map @@ -0,0 +1 @@ +{"version":3,"file":"audioPane.js","names":["UI","$rdf","ns","icon","icons","iconBase","name","label","subject","context","kb","session","store","typeURIs","findTypeURIs","prefix","Util","mediaTypeClass","uri","split","t","startsWith","render","dom","options","autoplay","chain","chainAlbums","loop","removeExtension","str","dot","lastIndexOf","slash","slice","looksRedundant","x","folder","any","undefined","ldp","contents","each","length","thisName","k","otherName","endsWith","guessNames","a","decode","decodeURIComponent","e","artistRow","textContent","albumRow","trackRow","moveOn","current","level","Promise","resolve","dir","fetcher","load","then","_xhr","j","sort","i","folder2","console","log","endedListener","event","sym","target","getAttribute","tryNext","cur","next","controlRow","appendChild","audioControl","removeChild","song","audio","createElement","setAttribute","_fetch","response","blob","myBlob","objectURL","URL","createObjectURL","addEventListener","div","table","labelStyle","style","cssText","holds"],"sources":["../../src/audio/audioPane.js"],"sourcesContent":["/* Single audio play Pane\n **\n */\nimport * as UI from 'solid-ui-jss'\nimport * as $rdf from 'rdflib'\nconst ns = UI.ns\n\nexport default {\n icon: UI.icons.iconBase + 'noun_534313.svg',\n\n name: 'audio',\n\n // Does the subject deserve an audio play pane?\n label: function (subject, context) {\n const kb = context.session.store\n const typeURIs = kb.findTypeURIs(subject)\n\n const prefix = $rdf.Util.mediaTypeClass('audio/*').uri.split('*')[0]\n for (const t in typeURIs) {\n if (t.startsWith(prefix)) return 'Play audio'\n }\n return null\n },\n\n render: function (subject, context) {\n const kb = context.session.store\n const dom = context.dom\n const options = {\n autoplay: false,\n chain: true,\n chainAlbums: true,\n loop: false\n }\n\n const removeExtension = function (str) {\n const dot = str.lastIndexOf('.')\n if (dot < 0) return str // if any\n const slash = str.lastIndexOf('/')\n if (dot < slash) return str\n return str.slice(0, dot)\n }\n\n // True if there is another file like song.mp3 when this is \"song 1.mp3\"\n // or this is song.m4a\n //\n const looksRedundant = function (x) {\n const folder = kb.any(undefined, ns.ldp('contains'), x)\n if (!folder) return false\n const contents = kb.each(folder, ns.ldp('contains'))\n if (contents.length < 2) return false\n const thisName = x.uri\n for (let k = 0; k < contents.length; k++) {\n const otherName = contents[k].uri\n if (\n thisName.length > otherName.length &&\n thisName.startsWith(removeExtension(otherName))\n ) {\n return true\n }\n if (\n thisName.endsWith('.m4a') &&\n otherName.endsWith('.mp3') &&\n removeExtension(thisName) === removeExtension(otherName)\n ) {\n return true\n }\n }\n return false\n }\n\n // Alternative methods could include:\n // Accesing metadata in the audio contol, or paring the audio file\n const guessNames = function (x) {\n const a = x.uri.split('/').slice(-3) // Hope artist, album, track\n const decode = function (str) {\n try {\n return decodeURIComponent(str)\n } catch (e) {\n return str\n }\n }\n artistRow.textContent = decode(a[0])\n albumRow.textContent = decode(a[1])\n trackRow.textContent = decode(removeExtension(a[2]))\n }\n\n const moveOn = function (current, level) {\n return new Promise(function (resolve) {\n level = level || 0\n if (!options.chain) return resolve(null)\n // Ideally navigate graph else cheat with URI munging:\n const folder =\n kb.any(undefined, ns.ldp('contains'), current) || current.dir()\n if (!folder) return resolve(null)\n kb.fetcher.load(folder).then(function (_xhr) {\n const contents = kb.each(folder, ns.ldp('contains')) // @@ load if not loaded\n // if (contents.length < 2) return resolve(null) NO might move on from 1-track album\n let j\n contents.sort() // sort by URI which hopefully will get tracks in order\n for (let i = 0; i < contents.length; i++) {\n if (current.uri === contents[i].uri) {\n j = (i + 1) % contents.length\n if (j === 0) {\n if (!options.chainAlbums) {\n if (options.loop) {\n return resolve(contents[j])\n }\n return resolve(null) // No more music needed\n } else {\n // chain albums\n if (level === 1 || !options.chainAlbums) return resolve(null) // limit of navigating treee\n moveOn(folder, level + 1).then(function (folder2) {\n if (folder2) {\n kb.fetcher.load(folder2).then(function (_xhr) {\n const contents = kb.each(folder2, ns.ldp('contains'))\n if (contents.length === 0) return resolve(null)\n contents.sort()\n console.log('New Album: ' + folder2)\n return resolve(contents[0]) // Start off new album\n })\n }\n })\n }\n } else {\n return resolve(contents[j])\n }\n }\n } // for\n })\n })\n }\n const endedListener = function (event) {\n const current = kb.sym(event.target.getAttribute('src'))\n if (!options.chain) return\n const tryNext = function (cur) {\n const current = cur\n moveOn(current).then(function (next) {\n if (!next) {\n console.log('No successor to ' + current)\n return\n }\n if (!looksRedundant(next)) {\n console.log('Moving on to ' + next)\n guessNames(next)\n controlRow.appendChild(audioControl(next, true)) // Force autoplay\n controlRow.removeChild(event.target)\n } else {\n console.log('Ignoring redundant ' + next)\n tryNext(next)\n }\n })\n }\n tryNext(current)\n }\n\n const audioControl = function (song, autoplay) {\n const audio = dom.createElement('audio')\n audio.setAttribute('controls', 'yes')\n // get audio with authenticated fetch\n kb.fetcher._fetch(song.uri)\n .then(function (response) {\n return response.blob()\n })\n .then(function (myBlob) {\n const objectURL = URL.createObjectURL(myBlob)\n audio.setAttribute('src', objectURL) // w640 h480 //\n })\n\n if (autoplay) {\n audio.setAttribute('autoplay', 'autoplay') // Make this a personal preference\n }\n audio.addEventListener('ended', endedListener, false)\n return audio\n }\n\n const div = dom.createElement('div')\n const table = div.appendChild(dom.createElement('table'))\n const labelStyle = 'padding: 0.3em; color:white; background-color: black;'\n const artistRow = table.appendChild(dom.createElement('tr'))\n artistRow.style.cssText = labelStyle\n const albumRow = table.appendChild(dom.createElement('tr'))\n albumRow.style.cssText = labelStyle\n const trackRow = table.appendChild(dom.createElement('tr'))\n trackRow.style.cssText = labelStyle\n const controlRow = table.appendChild(dom.createElement('tr'))\n guessNames(subject)\n controlRow.appendChild(audioControl(subject, options.autoplay))\n\n if (!kb.holds(undefined, ns.ldp('contains'), subject) && subject.dir()) {\n kb.fetcher.load(subject.dir()) // Prefetch enclosing @@ or playlist\n }\n\n return div\n }\n}\n\n// ends\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAO,KAAKA,EAAE,MAAM,cAAc;AAClC,OAAO,KAAKC,IAAI,MAAM,QAAQ;AAC9B,MAAMC,EAAE,GAAGF,EAAE,CAACE,EAAE;AAEhB,eAAe;EACbC,IAAI,EAAEH,EAAE,CA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G,CAACgE,aAAa,CAAC,IAAI,CAAC,CAAC;IAC7DvC,UAAU,CAACxC,OAAO,CAAC;IACnByE,UAAU,CAACC,WAAW,CAACC,YAAY,CAAC3E,OAAO,EAAEgB,OAAO,CAACC,QAAQ,CAAC,CAAC;IAE/D,IAAI,CAACf,EAAE,CAAC4F,KAAK,CAAC/D,SAAS,EAAErC,EAAE,CAACsC,GAAG,CAAC,UAAU,CAAC,EAAEhC,OAAO,CAAC,IAAIA,OAAO,CAACsD,GAAG,CAAC,CAAC,EAAE;MACtEpD,EAAE,CAACqD,OAAO,CAACC,IAAI,CAACxD,OAAO,CAACsD,GAAG,CAAC,CAAC,CAAC,EAAC;IACjC;IAEA,OAAOmC,GAAG;EACZ;AACF,CAAC;;AAED","ignoreList":[]} \ No newline at end of file diff --git a/dist/classInstancePane.js b/dist/classInstancePane.js new file mode 100644 index 00000000..b94d0749 --- /dev/null +++ b/dist/classInstancePane.js @@ -0,0 +1,85 @@ +/* Class member Pane + ** + ** This outline pane lists the members of a class + */ + +import * as UI from 'solid-ui-jss'; +import * as $rdf from 'rdflib'; +const ns = UI.ns; +export const classInstancePane = { + icon: UI.icons.originalIconBase + 'tango/22-folder-open.png', + name: 'classInstance', + // Create a new folder in a Solid system, + + audience: [ns.solid('PowerUser')], + label: function (subject, context) { + const kb = context.session.store; + const n = kb.each(undefined, ns.rdf('type'), subject).length; + if (n > 0) return 'List (' + n + ')'; // Show how many in hover text + return null; // Suppress pane otherwise + }, + render: function (subject, context) { + const dom = context.dom; + const outliner = context.getOutliner(dom); + const kb = context.session.store; + const complain = function complain(message, color) { + const pre = dom.createElement('pre'); + pre.setAttribute('style', 'background-color: ' + color || '#eed' + ';'); + div.appendChild(pre); + pre.appendChild(dom.createTextNode(message)); + }; + const div = dom.createElement('div'); + div.setAttribute('class', 'instancePane'); + div.setAttribute('style', ' border-top: solid 1px #777; border-bottom: solid 1px #777; margin-top: 0.5em; margin-bottom: 0.5em '); + + // If this is a class, look for all both explicit and implicit + const sts = kb.statementsMatching(undefined, ns.rdf('type'), subject); + if (sts.length > 0) { + const already = {}; + const more = []; + sts.forEach(st => { + already[st.subject.toNT()] = st; + }); + for (const nt in kb.findMembersNT(subject)) { + if (!already[nt]) { + more.push($rdf.st(kb.fromNT(nt), ns.rdf('type'), subject)); // @@ no provenance + } + } + if (more.length) { + complain('There are ' + sts.length + ' explicit and ' + more.length + ' implicit members of ' + UI.utils.label(subject)); + } + if (subject.sameTerm(ns.rdf('Property'))) { + // / Do not find all properties used as properties .. unless look at kb index + } else if (subject.sameTerm(ns.rdfs('Class'))) { + const uses = kb.statementsMatching(undefined, ns.rdf('type'), undefined); + const usedTypes = {}; + uses.forEach(function (st) { + usedTypes[st.object] = st; + }); // Get unique + const used = []; + for (const i in usedTypes) { + used.push($rdf.st($rdf.sym(i), ns.rdf('type'), ns.rdfs('Class'))); + } + complain('Total of ' + uses.length + ' type statements and ' + used.length + ' unique types.'); + } + if (sts.length > 10) { + const tr = dom.createElement('TR'); + tr.appendChild(dom.createTextNode('' + sts.length)); + // tr.AJAR_statement=sts[i] + div.appendChild(tr); + } + outliner.appendPropertyTRs(div, sts, true, function (_pred) { + return true; + }); + if (more.length) { + complain('Implicit:'); + outliner.appendPropertyTRs(div, more, true, function (_pred) { + return true; + }); + } + } + return div; + } +}; +// ends +//# sourceMappingURL=classInstancePane.js.map \ No newline at end of file diff --git a/dist/classInstancePane.js.map b/dist/classInstancePane.js.map new file mode 100644 index 00000000..d210660b --- /dev/null +++ b/dist/classInstancePane.js.map @@ -0,0 +1 @@ +{"version":3,"file":"classInstancePane.js","names":["UI","$rdf","ns","classInstancePane","icon","icons","originalIconBase","name","audience","solid","label","subject","context","kb","session","store","n","each","undefined","rdf","length","render","dom","outliner","getOutliner","complain","message","color","pre","createElement","setAttribute","div","appendChild","createTextNode","sts","statementsMatching","already","more","forEach","st","toNT","nt","findMembersNT","push","fromNT","utils","sameTerm","rdfs","uses","usedTypes","object","used","i","sym","tr","appendPropertyTRs","_pred"],"sources":["../src/classInstancePane.js"],"sourcesContent":["/* Class member Pane\n **\n ** This outline pane lists the members of a class\n */\n\nimport * as UI from 'solid-ui-jss'\nimport * as $rdf from 'rdflib'\n\nconst ns = UI.ns\n\nexport const classInstancePane = {\n icon: UI.icons.originalIconBase + 'tango/22-folder-open.png',\n\n name: 'classInstance',\n\n // Create a new folder in a Solid system,\n\n audience: [ns.solid('PowerUser')],\n\n label: function (subject, context) {\n const kb = context.session.store\n const n = kb.each(undefined, ns.rdf('type'), subject).length\n if (n > 0) return 'List (' + n + ')' // Show how many in hover text\n return null // Suppress pane otherwise\n },\n\n render: function (subject, context) {\n const dom = context.dom\n const outliner = context.getOutliner(dom)\n const kb = context.session.store\n const complain = function complain (message, color) {\n const pre = dom.createElement('pre')\n pre.setAttribute('style', 'background-color: ' + color || '#eed' + ';')\n div.appendChild(pre)\n pre.appendChild(dom.createTextNode(message))\n }\n const div = dom.createElement('div')\n div.setAttribute('class', 'instancePane')\n div.setAttribute(\n 'style',\n ' border-top: solid 1px #777; border-bottom: solid 1px #777; margin-top: 0.5em; margin-bottom: 0.5em '\n )\n\n // If this is a class, look for all both explicit and implicit\n const sts = kb.statementsMatching(undefined, ns.rdf('type'), subject)\n if (sts.length > 0) {\n const already = {}\n const more = []\n sts.forEach(st => {\n already[st.subject.toNT()] = st\n })\n for (const nt in kb.findMembersNT(subject)) {\n if (!already[nt]) {\n more.push($rdf.st(kb.fromNT(nt), ns.rdf('type'), subject)) // @@ no provenance\n }\n }\n if (more.length) {\n complain(\n 'There are ' +\n sts.length +\n ' explicit and ' +\n more.length +\n ' implicit members of ' +\n UI.utils.label(subject)\n )\n }\n if (subject.sameTerm(ns.rdf('Property'))) {\n // / Do not find all properties used as properties .. unless look at kb index\n } else if (subject.sameTerm(ns.rdfs('Class'))) {\n const uses = kb.statementsMatching(undefined, ns.rdf('type'), undefined)\n const usedTypes = {}\n uses.forEach(function (st) {\n usedTypes[st.object] = st\n }) // Get unique\n const used = []\n for (const i in usedTypes) {\n used.push($rdf.st($rdf.sym(i), ns.rdf('type'), ns.rdfs('Class')))\n }\n complain(\n 'Total of ' +\n uses.length +\n ' type statements and ' +\n used.length +\n ' unique types.'\n )\n }\n\n if (sts.length > 10) {\n const tr = dom.createElement('TR')\n tr.appendChild(dom.createTextNode('' + sts.length))\n // tr.AJAR_statement=sts[i]\n div.appendChild(tr)\n }\n\n outliner.appendPropertyTRs(div, sts, true, function (_pred) {\n return true\n })\n\n if (more.length) {\n complain('Implicit:')\n outliner.appendPropertyTRs(div, more, true, function (_pred) {\n return true\n })\n }\n }\n\n return div\n }\n}\n// ends\n"],"mappings":"AAAA;AACA;AACA;AACA;;AAEA,OAAO,KAAKA,EAAE,MAAM,cAAc;AAClC,OAAO,KAAKC,IAAI,MAAM,QAAQ;AAE9B,MAAMC,EAAE,GAAGF,EAAE,CAACE,EAAE;AAEhB,OAAO,MAAMC,iBAAiB,GAAG;EAC/BC,IAAI,EAAEJ,EAAE,CAACK,KAAK,CAACC,gBAAgB,GAAG,0BAA0B;EAE5DC,IAAI,EAAE,eAAe;EAErB;;EAEAC,QAAQ,EAAE,CAACN,EAAE,CAACO,KAAK,CAAC,WAAW,CAAC,CAAC;EAEjCC,KAAK,EAAE,SAAAA,CAAUC,OAAO,EAAEC,OAAO,EAAE;IACjC,MAAMC,EAAE,GAAGD,OAAO,CAACE,OAAO,CAACC,KAAK;IAChC,MAAMC,CAAC,GAAGH,EAAE,CAACI,IAAI,CAACC,SAAS,EAAEhB,EAAE,CAACiB,GAAG,CAAC,MAAM,CAAC,EAAER,OAAO,CAAC,CAACS,MAAM;IAC5D,IAAIJ,CAAC,GAAG,CAAC,EAAE,OAAO,QAAQ,GAAGA,CAAC,GAAG,GAAG,EAAC;IACrC,OAAO,IAAI,EAAC;EACd,CAAC;EAEDK,MAAM,EAAE,SAAAA,CAAUV,OAAO,EAAEC,OAAO,EAAE;IAClC,MAAMU,GAAG,GAAGV,OAAO,CAACU,GAAG;IACvB,MAAMC,QAAQ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AAIc,GAAG,CAACd,MAAM,GAAG,EAAE,EAAE;QACnB,MAAMkC,EAAE,GAAGhC,GAAG,CAACO,aAAa,CAAC,IAAI,CAAC;QAClCyB,EAAE,CAACtB,WAAW,CAACV,GAAG,CAACW,cAAc,CAAC,EAAE,GAAGC,GAAG,CAACd,MAAM,CAAC,CAAC;QACnD;QACAW,GAAG,CAACC,WAAW,CAACsB,EAAE,CAAC;MACrB;MAEA/B,QAAQ,CAACgC,iBAAiB,CAACxB,GAAG,EAAEG,GAAG,EAAE,IAAI,EAAE,UAAUsB,KAAK,EAAE;QAC1D,OAAO,IAAI;MACb,CAAC,CAAC;MAEF,IAAInB,IAAI,CAACjB,MAAM,EAAE;QACfK,QAAQ,CAAC,WAAW,CAAC;QACrBF,QAAQ,CAACgC,iBAAiB,CAACxB,GAAG,EAAEM,IAAI,EAAE,IAAI,EAAE,UAAUmB,KAAK,EAAE;UAC3D,OAAO,IAAI;QACb,CAAC,CAAC;MACJ;IACF;IAEA,OAAOzB,GAAG;EACZ;AACF,CAAC;AACD","ignoreList":[]} \ No newline at end of file diff --git a/dist/dashboard/basicPreferences.js b/dist/dashboard/basicPreferences.js new file mode 100644 index 00000000..b5f15c93 --- /dev/null +++ b/dist/dashboard/basicPreferences.js @@ -0,0 +1,144 @@ +import { parse } from 'rdflib'; +import { icons, login, ns, widgets } from 'solid-ui-jss'; +/* babel-plugin-inline-import './ontologyData.ttl' */ +const ontologyData = "@prefix rdf: .\n@prefix rdfs: .\n@prefix solid: .\n@prefix foaf: .\n@prefix schema: .\n@prefix ui: .\n@prefix vcard: .\n@prefix : <#>.\n\nsolid:User a rdfs:Class;\n rdfs:label \"user\"@en, \"utilisateur\"@fr;\n rdfs:comment \"\"\"Any person who might use a Solid-based system\"\"\";\n rdfs:subClassOf foaf:Person, schema:Person, vcard:Individual.\n\n# Since these options are opt-in, it is a bit strange to have new users opt in\n# That they are new users - also we do not use this class for anything specific\n# yet\n# solid:NewUser a rdfs:Class;\n# rdfs:label \"new user\"@en;\n# rdfs:comment \"\"\"A person who might use a Solid-based system who has a low\n# level of familiarity with technical details.\"\"\";\n# rdfs:subClassOf solid:User.\n\nsolid:PowerUser a rdfs:Class;\n rdfs:label \"power user\"@en;\n rdfs:comment \"\"\"A person who might use a Solid-based system\n who is prepared to be given a more complex interface in order\n to be provided with more pwerful features.\"\"\";\n rdfs:subClassOf solid:User.\n\n solid:Developer a rdfs:Class;\n rdfs:label \"Developer\";\n rdfs:comment \"\"\"Any person who might use a Solid-based system,\n who has software development skills.\"\"\";\n rdfs:subClassOf solid:User.\n"; +/* babel-plugin-inline-import './preferencesFormText.ttl' */ +const preferencesFormText = "@prefix rdf: .\n@prefix solid: .\n@prefix ui: .\n@prefix : <#>.\n\n:this \"Basic preferences\" ;\n a ui:Form ;\n ui:part :categorizeUser, :privateComment, :personalInformationHeading;\n ui:parts ( :personalInformationHeading :privateComment :categorizeUser ).\n\n:personalInformationHeading a ui:Heading;\n ui:contents \"Personal information\".\n\n:privateComment a ui:Comment;\n ui:contents \"This information is private.\".\n\n:categorizeUser a ui:Classifier;\n ui:label \"Level of user\"; ui:property rdf:type ; ui:category solid:User.\n"; +export const basicPreferencesPane = { + icon: icons.iconBase + 'noun_Sliders_341315_000000.svg', + name: 'basicPreferences', + label: _subject => { + return null; + }, + // Render the pane + // The subject should be the logged in user. + render: (subject, context) => { + const dom = context.dom; + const store = context.session.store; + function complainIfBad(ok, mess) { + if (ok) return; + container.appendChild(widgets.errorMessageBlock(dom, mess, '#fee')); + } + const container = dom.createElement('div'); + const formArea = setupUserTypesSection(container, dom); + function loadData(doc, turtle) { + doc = doc.doc(); // remove # from URI if nec + if (!store.holds(undefined, undefined, undefined, doc)) { + // If not loaded already + ; + parse(turtle, store, doc.uri, 'text/turtle', null); // Load form directly + } + } + const preferencesForm = store.sym('urn:uuid:93774ba1-d3b6-41f2-85b6-4ae27ffd2597#this'); + loadData(preferencesForm, preferencesFormText); + const ontologyExtra = store.sym('urn:uuid:93774ba1-d3b6-41f2-85b6-4ae27ffd2597-ONT'); + loadData(ontologyExtra, ontologyData); + async function doRender() { + const renderContext = await login.ensureLoadedPreferences({ + dom, + div: container + }); + if (!renderContext.preferencesFile) { + // Could be CORS + console.log('Not doing private class preferences as no access to preferences file. ' + renderContext.preferencesFileError); + return; + } + const appendedForm = widgets.appendForm(dom, formArea, {}, renderContext.me, preferencesForm, renderContext.preferencesFile, complainIfBad); + appendedForm.style.borderStyle = 'none'; + const trustedApplicationsView = context.session.paneRegistry.byName('trustedApplications'); + if (trustedApplicationsView) { + container.appendChild(trustedApplicationsView.render(null, context)); + } + + // @@ TODO Remove need for casting as any and bang (!) syntax + addDeleteSection(container, store, renderContext.me, dom); + } + doRender(); + return container; + } +}; +function setupUserTypesSection(container, dom) { + const formContainer = createSection(container, dom, 'User types'); + const description = formContainer.appendChild(dom.createElement('p')); + description.innerText = 'Here you can self-assign user types to help the data browser know which views you would like to access.'; + const userTypesLink = formContainer.appendChild(dom.createElement('a')); + userTypesLink.href = 'https://github.com/solidos/userguide/#role'; + userTypesLink.innerText = 'Read more'; + const formArea = formContainer.appendChild(dom.createElement('div')); + return formArea; +} +export default basicPreferencesPane; + +// ends + +function addDeleteSection(container, store, profile, dom) { + const section = createSection(container, dom, 'Delete account'); + const podServerNodes = store.each(profile, ns.space('storage'), null, profile.doc()); + const podServers = podServerNodes.map(node => node.value); + const list = section.appendChild(dom.createElement('ul')); + podServers.forEach(async server => { + const deletionLink = await generateDeletionLink(server, dom); + if (deletionLink) { + const listItem = list.appendChild(dom.createElement('li')); + listItem.appendChild(deletionLink); + } + }); +} +async function generateDeletionLink(podServer, dom) { + const link = dom.createElement('a'); + link.textContent = `Delete your account at ${podServer}`; + const deletionUrl = await getDeletionUrlForServer(podServer); + if (typeof deletionUrl !== 'string') { + return null; + } + link.href = deletionUrl; + return link; +} + +/** + * Hacky way to get the deletion link to a Pod + * + * This function infers the deletion link by assuming the URL structure of Node Solid server. + * In the future, Solid will hopefully provide a standardised way of discovering the deletion link: + * https://github.com/solidos/data-interoperability-panel/issues/18 + * + * If NSS is in multi-user mode (the case on inrupt.net and solid.community), the deletion URL for + * vincent.dev.inrupt.net would be at dev.inrupt.net/account/delete. In single-user mode, the + * deletion URL would be at vincent.dev.inrupt.net/account/delete. + * + * @param server Pod server containing the user's account. + * @returns URL of the page that Node Solid Server would offer to delete the account, or null if + * the URLs we tried give invalid responses. + */ +async function getDeletionUrlForServer(server) { + const singleUserUrl = new URL(server); + const multiUserUrl = new URL(server); + multiUserUrl.pathname = singleUserUrl.pathname = '/account/delete'; + const hostnameParts = multiUserUrl.hostname.split('.'); + // Remove `vincent.` from `vincent.dev.inrupt.net`, for example: + multiUserUrl.hostname = hostnameParts.slice(1).join('.'); + const multiUserNssResponse = await fetch(multiUserUrl.href, { + method: 'HEAD' + }); + if (multiUserNssResponse.ok) { + return multiUserUrl.href; + } + const singleUserNssResponse = await fetch(singleUserUrl.href, { + method: 'HEAD' + }); + if (singleUserNssResponse.ok) { + return singleUserUrl.href; + } + return null; +} +function createSection(container, dom, title) { + const section = container.appendChild(dom.createElement('div')); + section.style.border = '0.3em solid #418d99'; + section.style.borderRadius = '0.5em'; + section.style.padding = '0.7em'; + section.style.marginTop = '0.7em'; + const titleElement = section.appendChild(dom.createElement('h3')); + titleElement.innerText = title; + return section; +} +//# sourceMappingURL=basicPreferences.js.map \ No newline at end of file diff --git a/dist/dashboard/basicPreferences.js.map b/dist/dashboard/basicPreferences.js.map new file mode 100644 index 00000000..883c23fc --- /dev/null +++ b/dist/dashboard/basicPreferences.js.map @@ -0,0 +1 @@ +{"version":3,"file":"basicPreferences.js","names":["parse","icons","login","ns","widgets","ontologyData","preferencesFormText","basicPreferencesPane","icon","iconBase","name","label","_subject","render","subject","context","dom","store","session","complainIfBad","ok","mess","container","appendChild","errorMessageBlock","createElement","formArea","setupUserTypesSection","loadData","doc","turtle","holds","undefined","uri","preferencesForm","sym","ontologyExtra","doRender","renderContext","ensureLoadedPreferences","div","preferencesFile","console","log","preferencesFileError","appendedForm","appendForm","me","style","borderStyle","trustedApplicationsView","paneRegistry","byName","addDeleteSection","formContainer","createSection","description","innerText","userTypesLink","href","profile","section","podServerNodes","each","space","podServers","map","node","value","list","forEach","server","deletionLink","generateDeletionLink","listItem","podServer","link","textContent","deletionUrl","getDeletionUrlForServer","singleUserUrl","URL","multiUserUrl","pathname","hostnameParts","hostname","split","slice","join","multiUserNssResponse","fetch","method","singleUserNssResponse","title","border","borderRadius","padding","marginTop","titleElement"],"sources":["../../src/dashboard/basicPreferences.ts"],"sourcesContent":["import { PaneDefinition } from 'pane-registry'\nimport { IndexedFormula, NamedNode, parse, Store } from 'rdflib'\nimport { icons, login, ns, widgets } from 'solid-ui-jss'\nimport ontologyData from './ontologyData.ttl'\nimport preferencesFormText from './preferencesFormText.ttl'\n\nexport const basicPreferencesPane: PaneDefinition = {\n icon: icons.iconBase + 'noun_Sliders_341315_000000.svg',\n name: 'basicPreferences',\n label: _subject => {\n return null\n },\n\n // Render the pane\n // The subject should be the logged in user.\n render: (subject, context) => {\n const dom = context.dom\n const store = context.session.store as Store\n\n function complainIfBad (ok: Boolean, mess: any) {\n if (ok) return\n container.appendChild(widgets.errorMessageBlock(dom, mess, '#fee'))\n }\n\n const container = dom.createElement('div')\n\n const formArea = setupUserTypesSection(container, dom)\n\n function loadData (doc: NamedNode, turtle: String) {\n doc = doc.doc() // remove # from URI if nec\n if (!store.holds(undefined, undefined, undefined, doc)) {\n // If not loaded already\n ;(parse as any)(turtle, store, doc.uri, 'text/turtle', null) // Load form directly\n }\n }\n\n const preferencesForm = store.sym(\n 'urn:uuid:93774ba1-d3b6-41f2-85b6-4ae27ffd2597#this'\n )\n loadData(preferencesForm, preferencesFormText)\n\n const ontologyExtra = store.sym(\n 'urn:uuid:93774ba1-d3b6-41f2-85b6-4ae27ffd2597-ONT'\n )\n loadData(ontologyExtra, ontologyData)\n\n async function doRender () {\n const renderContext = await login.ensureLoadedPreferences({\n dom,\n div: container\n })\n if (!renderContext.preferencesFile) {\n // Could be CORS\n console.log(\n 'Not doing private class preferences as no access to preferences file. ' +\n renderContext.preferencesFileError\n )\n return\n }\n const appendedForm = widgets.appendForm(\n dom,\n formArea,\n {},\n renderContext.me,\n preferencesForm,\n renderContext.preferencesFile,\n complainIfBad\n )\n appendedForm.style.borderStyle = 'none'\n\n const trustedApplicationsView = context.session.paneRegistry.byName('trustedApplications')\n if (trustedApplicationsView) {\n container.appendChild(trustedApplicationsView.render(null, context))\n }\n\n // @@ TODO Remove need for casting as any and bang (!) syntax\n addDeleteSection(container, store, renderContext.me!, dom)\n }\n\n doRender()\n\n return container\n }\n}\n\nfunction setupUserTypesSection (\n container: Element,\n dom: HTMLDocument\n): Element {\n const formContainer = createSection(container, dom, 'User types')\n\n const description = formContainer.appendChild(dom.createElement('p'))\n description.innerText = 'Here you can self-assign user types to help the data browser know which views you would like to access.'\n\n const userTypesLink = formContainer.appendChild(dom.createElement('a'))\n userTypesLink.href = 'https://github.com/solidos/userguide/#role'\n userTypesLink.innerText = 'Read more'\n\n const formArea = formContainer.appendChild(dom.createElement('div'))\n\n return formArea\n}\n\nexport default basicPreferencesPane\n\n// ends\n\nfunction addDeleteSection (\n container: HTMLElement,\n store: IndexedFormula,\n profile: NamedNode,\n dom: HTMLDocument\n): void {\n const section = createSection(container, dom, 'Delete account')\n\n const podServerNodes = store.each(profile, ns.space('storage'), null, profile.doc())\n const podServers = podServerNodes.map(node => node.value)\n\n const list = section.appendChild(dom.createElement('ul'))\n\n podServers.forEach(async server => {\n const deletionLink = await generateDeletionLink(server, dom)\n if (deletionLink) {\n const listItem = list.appendChild(dom.createElement('li'))\n listItem.appendChild(deletionLink)\n }\n })\n}\n\nasync function generateDeletionLink (\n podServer: string,\n dom: HTMLDocument\n): Promise {\n const link = dom.createElement('a')\n link.textContent = `Delete your account at ${podServer}`\n const deletionUrl = await getDeletionUrlForServer(podServer)\n if (typeof deletionUrl !== 'string') {\n return null\n }\n link.href = deletionUrl\n return link\n}\n\n/**\n * Hacky way to get the deletion link to a Pod\n *\n * This function infers the deletion link by assuming the URL structure of Node Solid server.\n * In the future, Solid will hopefully provide a standardised way of discovering the deletion link:\n * https://github.com/solidos/data-interoperability-panel/issues/18\n *\n * If NSS is in multi-user mode (the case on inrupt.net and solid.community), the deletion URL for\n * vincent.dev.inrupt.net would be at dev.inrupt.net/account/delete. In single-user mode, the\n * deletion URL would be at vincent.dev.inrupt.net/account/delete.\n *\n * @param server Pod server containing the user's account.\n * @returns URL of the page that Node Solid Server would offer to delete the account, or null if\n * the URLs we tried give invalid responses.\n */\nasync function getDeletionUrlForServer (\n server: string\n): Promise {\n const singleUserUrl = new URL(server)\n const multiUserUrl = new URL(server)\n multiUserUrl.pathname = singleUserUrl.pathname = '/account/delete'\n\n const hostnameParts = multiUserUrl.hostname.split('.')\n // Remove `vincent.` from `vincent.dev.inrupt.net`, for example:\n multiUserUrl.hostname = hostnameParts.slice(1).join('.')\n\n const multiUserNssResponse = await fetch(multiUserUrl.href, {\n method: 'HEAD'\n })\n if (multiUserNssResponse.ok) {\n return multiUserUrl.href\n }\n\n const singleUserNssResponse = await fetch(singleUserUrl.href, {\n method: 'HEAD'\n })\n if (singleUserNssResponse.ok) {\n return singleUserUrl.href\n }\n return null\n}\n\nfunction createSection (\n container: Element,\n dom: HTMLDocument,\n title: string\n): Element {\n const section = container.appendChild(dom.createElement('div'))\n section.style.border = '0.3em solid #418d99'\n section.style.borderRadius = '0.5em'\n section.style.padding = '0.7em'\n section.style.marginTop = '0.7em'\n\n const titleElement = section.appendChild(dom.createElement('h3'))\n titleElement.innerText = title\n\n return section\n}\n"],"mappings":"AACA,SAAoCA,KAAK,QAAe,QAAQ;AAChE,SAASC,KAAK,EAAEC,KAAK,EAAEC,EAAE,EAAEC,OAAO,QAAQ,cAAc;AAAA;AAAA,MAAAC,YAAA;AAAA;AAAA,MAAAC,mBAAA;AAIxD,OAAO,MAAMC,oBAAoC,GAAG;EAClDC,IAAI,EAAEP,KAAK,CAACQ,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OAAO,CAACb,KAAK,CAAC8C,MAAM,GAAG,qBAAqB;EAC5CjC,OAAO,CAACb,KAAK,CAAC+C,YAAY,GAAG,OAAO;EACpClC,OAAO,CAACb,KAAK,CAACgD,OAAO,GAAG,OAAO;EAC/BnC,OAAO,CAACb,KAAK,CAACiD,SAAS,GAAG,OAAO;EAEjC,MAAMC,YAAY,GAAGrC,OAAO,CAACtC,WAAW,CAACP,GAAG,CAACS,aAAa,CAAC,IAAI,CAAC,CAAC;EACjEyE,YAAY,CAACzC,SAAS,GAAGoC,KAAK;EAE9B,OAAOhC,OAAO;AAChB","ignoreList":[]} \ No newline at end of file diff --git a/dist/dashboard/dashboardPane.js b/dist/dashboard/dashboardPane.js new file mode 100644 index 00000000..79b00664 --- /dev/null +++ b/dist/dashboard/dashboardPane.js @@ -0,0 +1,63 @@ +import { icons } from 'solid-ui-jss'; +import { authn, authSession, store } from 'solid-logic-jss'; +import { generateHomepage } from './homepage'; +export const dashboardPane = { + icon: icons.iconBase + 'noun_547570.svg', + name: 'dashboard', + label: subject => { + console.log(); + if (subject.uri === subject.site().uri) { + return 'Dashboard'; + } + return null; + }, + render: (subject, context) => { + console.log('Dashboard Pane Render'); + const dom = context.dom; + const container = dom.createElement('div'); + const runBuildPage = () => { + container.innerHTML = ''; + buildPage(container, authn.currentUser() || null, context, subject); + }; + authSession.events.on('login', () => { + // console.log('On Login') + runBuildPage(); + }); + authSession.events.on('sessionRestore', () => { + // console.log('On Session Restore') + runBuildPage(); + }); + // console.log('Initial Load') + runBuildPage(); + return container; + } +}; +function buildPage(container, webId, context, subject) { + // if uri then SolidOS is a browse.html web app + const uri = new URL(window.location.href).searchParams.get('uri'); + if (webId && (uri || webId.site().uri === subject.site().uri)) { + return buildDashboard(container, context); + } + return buildHomePage(container, subject); +} +function buildDashboard(container, context) { + // console.log('build dashboard') + // @@ TODO get a proper type + const outliner = context.getOutliner(context.dom); + outliner.getDashboard().then(dashboard => container.appendChild(dashboard)); +} +function buildHomePage(container, subject) { + // console.log('build home page') + const wrapper = document.createElement('div'); + container.appendChild(wrapper); + const shadow = wrapper.attachShadow({ + mode: 'open' + }); + const link = document.createElement('link'); + link.rel = 'stylesheet'; + link.href = '/common/css/bootstrap.min.css'; + shadow.appendChild(link); + generateHomepage(subject, store, store.fetcher).then(homepage => shadow.appendChild(homepage)); +} +export default dashboardPane; +//# sourceMappingURL=dashboardPane.js.map \ No newline at end of file diff --git a/dist/dashboard/dashboardPane.js.map b/dist/dashboard/dashboardPane.js.map new file mode 100644 index 00000000..9606767c --- /dev/null +++ b/dist/dashboard/dashboardPane.js.map @@ -0,0 +1 @@ +{"version":3,"file":"dashboardPane.js","names":["icons","authn","authSession","store","generateHomepage","dashboardPane","icon","iconBase","name","label","subject","console","log","uri","site","render","context","dom","container","createElement","runBuildPage","innerHTML","buildPage","currentUser","events","on","webId","URL","window","location","href","searchParams","get","buildDashboard","buildHomePage","outliner","getOutliner","getDashboard","then","dashboard","appendChild","wrapper","document","shadow","attachShadow","mode","link","rel","fetcher","homepage"],"sources":["../../src/dashboard/dashboardPane.ts"],"sourcesContent":["import { icons } from 'solid-ui-jss'\nimport { authn, authSession, store } from 'solid-logic-jss'\nimport { Fetcher, NamedNode } from 'rdflib'\nimport { generateHomepage } from './homepage'\nimport { DataBrowserContext, PaneDefinition } from 'pane-registry'\n\nexport const dashboardPane: PaneDefinition = {\n icon: icons.iconBase + 'noun_547570.svg',\n name: 'dashboard',\n label: subject => {\n console.log()\n if (subject.uri === subject.site().uri) {\n return 'Dashboard'\n }\n return null\n },\n render: (subject, context) => {\n console.log('Dashboard Pane Render')\n const dom = context.dom\n const container = dom.createElement('div')\n const runBuildPage = () => {\n container.innerHTML = ''\n buildPage(\n container,\n authn.currentUser() || null,\n context,\n subject\n )\n }\n\n authSession.events.on('login', () => {\n // console.log('On Login')\n runBuildPage()\n })\n authSession.events.on('sessionRestore', () => {\n // console.log('On Session Restore')\n runBuildPage()\n })\n // console.log('Initial Load')\n runBuildPage()\n\n return container\n }\n}\n\nfunction buildPage (\n container: HTMLElement,\n webId: NamedNode | null,\n context: DataBrowserContext,\n subject: NamedNode\n) {\n // if uri then SolidOS is a browse.html web app\n const uri = (new URL(window.location.href)).searchParams.get('uri')\n if (webId && (uri || webId.site().uri === subject.site().uri)) {\n return buildDashboard(container, context)\n }\n return buildHomePage(container, subject)\n}\n\nfunction buildDashboard (container: HTMLElement, context: DataBrowserContext) {\n // console.log('build dashboard')\n // @@ TODO get a proper type\n const outliner: any = context.getOutliner(context.dom)\n outliner\n .getDashboard()\n .then((dashboard: HTMLElement) => container.appendChild(dashboard))\n}\n\nfunction buildHomePage (container: HTMLElement, subject: NamedNode) {\n // console.log('build home page')\n const wrapper = document.createElement('div')\n container.appendChild(wrapper)\n const shadow = wrapper.attachShadow({ mode: 'open' })\n const link = document.createElement('link')\n link.rel = 'stylesheet'\n link.href = '/common/css/bootstrap.min.css'\n shadow.appendChild(link)\n generateHomepage(subject, store, store.fetcher as Fetcher).then(homepage =>\n shadow.appendChild(homepage)\n )\n}\n\nexport default dashboardPane\n"],"mappings":"AAAA,SAASA,KAAK,QAAQ,cAAc;AACpC,SAASC,KAAK,EAAEC,WAAW,EAAEC,KAAK,QAAQ,iBAAiB;AAE3D,SAASC,gBAAgB,QAAQ,YAAY;AAG7C,OAAO,MAAMC,aAA6B,GAAG;EAC3CC,IAAI,EAAEN,KAAK,CAACO,QAAQ,GAAG,iBAAiB;EACxCC,IAAI,EAAE,WAAW;EACjBC,KAAK,EAAEC,OAAO,IAAI;IAChBC,OAAO,CAACC,GAAG,CAAC,CAAC;IACb,IAAIF,OAAO,CAACG,GAAG,KAAKH,OAAO,CAACI,IAAI,CAAC,CAAC,CAACD,GAAG,EAAE;MACtC,OAAO,WAAW;IACpB;IACA,OAAO,IAAI;EACb,CAAC;EACDE,MAAM,EAAEA,CAACL,OAAO,EAAEM,OAAO,KAAK;IAC5BL,OAAO,CAACC,GAAG,CAAC,uBAAuB,CAAC;IACpC,MAAMK,GAAG,GA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CACdC,IAAI,CAAEC,SAAsB,IAAKrB,SAAS,CAACsB,WAAW,CAACD,SAAS,CAAC,CAAC;AACvE;AAEA,SAASL,aAAaA,CAAEhB,SAAsB,EAAER,OAAkB,EAAE;EAClE;EACA,MAAM+B,OAAO,GAAGC,QAAQ,CAACvB,aAAa,CAAC,KAAK,CAAC;EAC7CD,SAAS,CAACsB,WAAW,CAACC,OAAO,CAAC;EAC9B,MAAME,MAAM,GAAGF,OAAO,CAACG,YAAY,CAAC;IAAEC,IAAI,EAAE;EAAO,CAAC,CAAC;EACrD,MAAMC,IAAI,GAAGJ,QAAQ,CAACvB,aAAa,CAAC,MAAM,CAAC;EAC3C2B,IAAI,CAACC,GAAG,GAAG,YAAY;EACvBD,IAAI,CAAChB,IAAI,GAAG,+BAA+B;EAC3Ca,MAAM,CAACH,WAAW,CAACM,IAAI,CAAC;EACxB1C,gBAAgB,CAACM,OAAO,EAAEP,KAAK,EAAEA,KAAK,CAAC6C,OAAkB,CAAC,CAACV,IAAI,CAACW,QAAQ,IACtEN,MAAM,CAACH,WAAW,CAACS,QAAQ,CAC7B,CAAC;AACH;AAEA,eAAe5C,aAAa","ignoreList":[]} \ No newline at end of file diff --git a/dist/dashboard/homepage.js b/dist/dashboard/homepage.js new file mode 100644 index 00000000..1b1c52ee --- /dev/null +++ b/dist/dashboard/homepage.js @@ -0,0 +1,48 @@ +import { sym } from 'rdflib'; +import { ns } from 'solid-ui-jss'; +export async function generateHomepage(subject, store, fetcher) { + const ownersProfile = await loadProfile(subject, fetcher); + const name = getName(store, ownersProfile); + const wrapper = document.createElement('div'); + wrapper.classList.add('container'); + wrapper.appendChild(createTitle(ownersProfile.uri, name)); + wrapper.appendChild(createDataSection(name)); + return wrapper; +} +function createDataSection(name) { + const dataSection = document.createElement('section'); + const title = document.createElement('h2'); + title.innerText = 'Data'; + dataSection.appendChild(title); + const listGroup = document.createElement('div'); + listGroup.classList.add('list-group'); + dataSection.appendChild(listGroup); + const publicDataLink = document.createElement('a'); + publicDataLink.classList.add('list-group-item'); + publicDataLink.href = window.document.location.href + 'public/'; + publicDataLink.innerText = `View ${name}'s files`; + listGroup.appendChild(publicDataLink); + return dataSection; +} +function createTitle(uri, name) { + const profileLink = document.createElement('a'); + profileLink.href = uri; + profileLink.innerText = name; + const profileLinkPost = document.createElement('span'); + profileLinkPost.innerText = '\'s Pod'; + const title = document.createElement('h1'); + title.appendChild(profileLink); + title.appendChild(profileLinkPost); + return title; +} +async function loadProfile(subject, fetcher) { + const pod = subject.site().uri; + // TODO: This is a hack - we cannot assume that the profile is at this document, but we will live with it for now + const webId = sym(`${pod}profile/card#me`); + await fetcher.load(webId); + return webId; +} +function getName(store, ownersProfile) { + return store.anyValue(ownersProfile, ns.vcard('fn'), null, ownersProfile.doc()) || store.anyValue(ownersProfile, ns.foaf('name'), null, ownersProfile.doc()) || new URL(ownersProfile.uri).host.split('.')[0]; +} +//# sourceMappingURL=homepage.js.map \ No newline at end of file diff --git a/dist/dashboard/homepage.js.map b/dist/dashboard/homepage.js.map new file mode 100644 index 00000000..77b79492 --- /dev/null +++ b/dist/dashboard/homepage.js.map @@ -0,0 +1 @@ +{"version":3,"file":"homepage.js","names":["sym","ns","generateHomepage","subject","store","fetcher","ownersProfile","loadProfile","name","getName","wrapper","document","createElement","classList","add","appendChild","createTitle","uri","createDataSection","dataSection","title","innerText","listGroup","publicDataLink","href","window","location","profileLink","profileLinkPost","pod","site","webId","load","anyValue","vcard","doc","foaf","URL","host","split"],"sources":["../../src/dashboard/homepage.ts"],"sourcesContent":["import { Fetcher, IndexedFormula, NamedNode, sym } from 'rdflib'\nimport { ns } from 'solid-ui-jss'\n\nexport async function generateHomepage (\n subject: NamedNode,\n store: IndexedFormula,\n fetcher: Fetcher\n): Promise {\n const ownersProfile = await loadProfile(subject, fetcher)\n const name = getName(store, ownersProfile)\n\n const wrapper = document.createElement('div')\n wrapper.classList.add('container')\n wrapper.appendChild(createTitle(ownersProfile.uri, name))\n wrapper.appendChild(createDataSection(name))\n\n return wrapper\n}\n\nfunction createDataSection (name: string): HTMLElement {\n const dataSection = document.createElement('section')\n\n const title = document.createElement('h2')\n title.innerText = 'Data'\n dataSection.appendChild(title)\n\n const listGroup = document.createElement('div')\n listGroup.classList.add('list-group')\n dataSection.appendChild(listGroup)\n\n const publicDataLink = document.createElement('a')\n publicDataLink.classList.add('list-group-item')\n publicDataLink.href = window.document.location.href + 'public/'\n publicDataLink.innerText = `View ${name}'s files`\n listGroup.appendChild(publicDataLink)\n\n return dataSection\n}\n\nfunction createTitle (uri: string, name: string): HTMLElement {\n const profileLink = document.createElement('a')\n profileLink.href = uri\n profileLink.innerText = name\n\n const profileLinkPost = document.createElement('span')\n profileLinkPost.innerText = '\\'s Pod'\n\n const title = document.createElement('h1')\n title.appendChild(profileLink)\n title.appendChild(profileLinkPost)\n\n return title\n}\n\nasync function loadProfile (\n subject: NamedNode,\n fetcher: Fetcher\n): Promise {\n const pod = subject.site().uri\n // TODO: This is a hack - we cannot assume that the profile is at this document, but we will live with it for now\n const webId = sym(`${pod}profile/card#me`)\n await fetcher.load(webId)\n return webId\n}\n\nfunction getName (store: IndexedFormula, ownersProfile: NamedNode): string {\n return (\n store.anyValue(ownersProfile, ns.vcard('fn'), null, ownersProfile.doc()) ||\n store.anyValue(ownersProfile, ns.foaf('name'), null, ownersProfile.doc()) ||\n new URL(ownersProfile.uri).host.split('.')[0]\n )\n}\n"],"mappings":"AAAA,SAA6CA,GAAG,QAAQ,QAAQ;AAChE,SAASC,EAAE,QAAQ,cAAc;AAEjC,OAAO,eAAeC,gBAAgBA,CACpCC,OAAkB,EAClBC,KAAqB,EACrBC,OAAgB,EACM;EACtB,MAAMC,aAAa,GAAG,MAAMC,WAAW,CAACJ,OAAO,EAAEE,OAAO,CAAC;EACzD,MAAMG,IAAI,GAAGC,OAAO,CAACL,KAAK,EAAEE,aAAa,CAAC;EAE1C,MAAMI,OAAO,GAAGC,QAAQ,CAACC,aAAa,CAAC,KAAK,CAAC;EAC7CF,O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MAAM,CAAC;EACtDgB,eAAe,CAACP,SAAS,GAAG,SAAS;EAErC,MAAMD,KAAK,GAAGT,QAAQ,CAACC,aAAa,CAAC,IAAI,CAAC;EAC1CQ,KAAK,CAACL,WAAW,CAACY,WAAW,CAAC;EAC9BP,KAAK,CAACL,WAAW,CAACa,eAAe,CAAC;EAElC,OAAOR,KAAK;AACd;AAEA,eAAeb,WAAWA,CACxBJ,OAAkB,EAClBE,OAAgB,EACI;EACpB,MAAMwB,GAAG,GAAG1B,OAAO,CAAC2B,IAAI,CAAC,CAAC,CAACb,GAAG;EAC9B;EACA,MAAMc,KAAK,GAAG/B,GAAG,CAAC,GAAG6B,GAAG,iBAAiB,CAAC;EAC1C,MAAMxB,OAAO,CAAC2B,IAAI,CAACD,KAAK,CAAC;EACzB,OAAOA,KAAK;AACd;AAEA,SAAStB,OAAOA,CAAEL,KAAqB,EAAEE,aAAwB,EAAU;EACzE,OACEF,KAAK,CAAC6B,QAAQ,CAAC3B,aAAa,EAAEL,EAAE,CAACiC,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE5B,aAAa,CAAC6B,GAAG,CAAC,CAAC,CAAC,IACxE/B,KAAK,CAAC6B,QAAQ,CAAC3B,aAAa,EAAEL,EAAE,CAACmC,IAAI,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE9B,aAAa,CAAC6B,GAAG,CAAC,CAAC,CAAC,IACzE,IAAIE,GAAG,CAAC/B,aAAa,CAACW,GAAG,CAAC,CAACqB,IAAI,CAACC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AAEjD","ignoreList":[]} \ No newline at end of file diff --git a/dist/dataContentPane.js b/dist/dataContentPane.js new file mode 100644 index 00000000..05550eb1 --- /dev/null +++ b/dist/dataContentPane.js @@ -0,0 +1,253 @@ +/* Data content Pane + ** + ** This pane shows the content of a particular RDF resource + ** or at least the RDF semantics we attribute to that resource. + */ + +// To do: - Only take data from one graph +// - Only do forwards not backward? +// - Expand automatically all the way down +// - original source view? Use ffox view source + +import * as UI from 'solid-ui-jss'; +import * as $rdf from 'rdflib'; +const ns = UI.ns; +export const dataContentPane = { + icon: UI.icons.originalIconBase + 'rdf_flyer.24.gif', + name: 'dataContents', + audience: [ns.solid('Developer')], + label: function (subject, context) { + if ('http://www.w3.org/2007/ont/link#ProtocolEvent' in context.session.store.findTypeURIs(subject)) { + return null; + } + const n = context.session.store.statementsMatching(undefined, undefined, undefined, subject).length; + if (n === 0) return null; + return 'Data (' + n + ')'; + }, + /* + shouldGetFocus: function(subject) { + return store.whether(subject, UI.ns.rdf('type'), UI.ns.link('RDFDocument')) + }, + */ + statementsAsTables: function statementsAsTables(sts, context, initialRoots) { + const myDocument = context.dom; + // const outliner = context.getOutliner(myDocument) + const rep = myDocument.createElement('table'); + const sz = $rdf.Serializer(context.session.store); + const res = sz.rootSubjects(sts); + let roots = res.roots; + const subjects = res.subjects; + const loopBreakers = res.loopBreakers; + for (const x in loopBreakers) { + console.log('\tdataContentPane: loopbreaker:' + x); + } + const doneBnodes = {}; // For preventing looping + const referencedBnodes = {}; // Bnodes which need to be named alas + + // The property tree for a single subject or anonymous node + function propertyTree(subject) { + // print('Proprty tree for '+subject) + const rep = myDocument.createElement('table'); + let lastPred = null; + const sts = subjects[sz.toStr(subject)]; // relevant statements + if (!sts) { + // No statements in tree + rep.appendChild(myDocument.createTextNode('...')); // just empty bnode as object + return rep; + } + sts.sort(); + let same = 0; + let predicateTD; // The cell which holds the predicate + for (let i = 0; i < sts.length; i++) { + const st = sts[i]; + const tr = myDocument.createElement('tr'); + if (st.predicate.uri !== lastPred) { + if (lastPred && same > 1) { + predicateTD.setAttribute('rowspan', '' + same); + } + predicateTD = myDocument.createElement('td'); + predicateTD.setAttribute('class', 'pred'); + const anchor = myDocument.createElement('a'); + anchor.setAttribute('href', st.predicate.uri); + anchor.addEventListener('click', UI.widgets.openHrefInOutlineMode, true); + anchor.appendChild(myDocument.createTextNode(UI.utils.predicateLabelForXML(st.predicate))); + predicateTD.appendChild(anchor); + tr.appendChild(predicateTD); + lastPred = st.predicate.uri; + same = 0; + } + same++; + const objectTD = myDocument.createElement('td'); + objectTD.appendChild(objectTree(st.object)); + tr.appendChild(objectTD); + rep.appendChild(tr); + } + if (lastPred && same > 1) predicateTD.setAttribute('rowspan', '' + same); + return rep; + } + + // Convert a set of statements into a nested tree of tables + function objectTree(obj) { + let res, anchor; + switch (obj.termType) { + case 'NamedNode': + anchor = myDocument.createElement('a'); + anchor.setAttribute('href', obj.uri); + anchor.addEventListener('click', UI.widgets.openHrefInOutlineMode, true); + anchor.appendChild(myDocument.createTextNode(UI.utils.label(obj))); + return anchor; + case 'Literal': + if (!obj.datatype || !obj.datatype.uri) { + res = myDocument.createElement('div'); + res.setAttribute('style', 'white-space: pre-wrap;'); + res.textContent = obj.value; + return res; + } else if (obj.datatype.uri === 'http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral') { + res = myDocument.createElement('div'); + res.setAttribute('class', 'embeddedXHTML'); + res.innerHTML = obj.value; // Try that @@@ beware embedded dangerous code + return res; + } + return myDocument.createTextNode(obj.value); + // placeholder - could be smarter, + + case 'BlankNode': + { + if (obj.toNT() in doneBnodes) { + // Break infinite recursion + referencedBnodes[obj.toNT()] = true; + const anchor = myDocument.createElement('a'); + anchor.setAttribute('href', '#' + obj.toNT().slice(2)); + anchor.setAttribute('class', 'bnodeRef'); + anchor.textContent = '*' + obj.toNT().slice(3); + return anchor; + } + doneBnodes[obj.toNT()] = true; // Flag to prevent infinite recursion in propertyTree + const newTable = propertyTree(obj); + doneBnodes[obj.toNT()] = newTable; // Track where we mentioned it first + if (UI.utils.ancestor(newTable, 'TABLE') && UI.utils.ancestor(newTable, 'TABLE').style.backgroundColor === 'white') { + newTable.style.backgroundColor = '#eee'; + } else { + newTable.style.backgroundColor = 'white'; + } + return newTable; + } + case 'Collection': + res = myDocument.createElement('table'); + res.setAttribute('class', 'collectionAsTables'); + for (let i = 0; i < obj.elements.length; i++) { + const tr = myDocument.createElement('tr'); + res.appendChild(tr); + tr.appendChild(objectTree(obj.elements[i])); + } + return res; + case 'Graph': + res = context.session.paneRegistry.byName('dataContents').statementsAsTables(obj.statements, context); + res.setAttribute('class', 'nestedFormula'); + return res; + case 'Variable': + res = myDocument.createTextNode('?' + obj.uri); + return res; + } + throw new Error('Unhandled node type: ' + obj.termType); + } + + // roots.sort() + + if (initialRoots) { + roots = initialRoots.concat(roots.filter(function (x) { + for (let i = 0; i < initialRoots.length; i++) { + // Max 2 + if (x.sameTerm(initialRoots[i])) return false; + } + return true; + })); + } + for (let i = 0; i < roots.length; i++) { + const tr = myDocument.createElement('tr'); + tr.setAttribute('style', `background-color: ${i % 2 === 0 ? '#f0f0f0' : 'white'};`); + rep.appendChild(tr); + const subjectTD = myDocument.createElement('td'); + tr.appendChild(subjectTD); + const TDTree = myDocument.createElement('td'); + tr.appendChild(TDTree); + const root = roots[i]; + if (root.termType === 'BlankNode') { + subjectTD.appendChild(myDocument.createTextNode(UI.utils.label(root))); // Don't recurse! + } else { + subjectTD.appendChild(objectTree(root)); // won't have tree + } + TDTree.appendChild(propertyTree(root)); + } + for (const bNT in referencedBnodes) { + // Add number to refer to + const table = doneBnodes[bNT]; + // let tr = myDocument.createElement('tr') + const anchor = myDocument.createElement('a'); + anchor.setAttribute('id', bNT.slice(2)); + anchor.setAttribute('class', 'bnodeDef'); + anchor.textContent = bNT.slice(3) + ')'; + table.insertBefore(anchor, table.firstChild); + } + return rep; + }, + // statementsAsTables + // View the data in a file in user-friendly way + render: function (subject, context) { + const myDocument = context.dom; + function alternativeRendering() { + const sz = $rdf.Serializer(context.session.store); + const res = sz.rootSubjects(sts); + const roots = res.roots; + const p = {}; + p.render = function (s2) { + const div = myDocument.createElement('div'); + div.setAttribute('class', 'withinDocumentPane'); + const plist = kb.statementsMatching(s2, undefined, undefined, subject); + outliner.appendPropertyTRs(div, plist, false, function (_pred, _inverse) { + return true; + }); + return div; + }; + for (let i = 0; i < roots.length; i++) { + const tr = myDocument.createElement('TR'); + const root = roots[i]; + tr.style.verticalAlign = 'top'; + const td = outliner.outlineObjectTD(root, undefined, tr); + tr.appendChild(td); + div.appendChild(tr); + outliner.outlineExpand(td, root, { + pane: p + }); + } + } + function mainRendering() { + const initialRoots = []; // Ordering: start with stuff about this doc + if (kb.holds(subject, undefined, undefined, subject)) { + initialRoots.push(subject); + } + // Then about the primary topic of the document if any + const ps = kb.any(subject, UI.ns.foaf('primaryTopic'), undefined, subject); + if (ps) initialRoots.push(ps); + div.appendChild(context.session.paneRegistry.byName('dataContents').statementsAsTables(sts, context, initialRoots)); + } + const outliner = context.getOutliner(myDocument); + const kb = context.session.store; + const div = myDocument.createElement('div'); + div.setAttribute('class', 'dataContentPane'); + // Because of smushing etc, this will not be a copy of the original source + // We could instead either fetch and re-parse the source, + // or we could keep all the pre-smushed triples. + const sts = kb.statementsMatching(undefined, undefined, undefined, subject); // @@ slow with current store! + + // eslint-disable-next-line no-constant-condition + if (false) { + // keep code + alternativeRendering(); + } else { + mainRendering(); + } + return div; + } +}; +//# sourceMappingURL=dataContentPane.js.map \ No newline at end of file diff --git a/dist/dataContentPane.js.map b/dist/dataContentPane.js.map new file mode 100644 index 00000000..acffcbfa --- /dev/null +++ b/dist/dataContentPane.js.map @@ -0,0 +1 @@ +{"version":3,"file":"dataContentPane.js","names":["UI","$rdf","ns","dataContentPane","icon","icons","originalIconBase","name","audience","solid","label","subject","context","session","store","findTypeURIs","n","statementsMatching","undefined","length","statementsAsTables","sts","initialRoots","myDocument","dom","rep","createElement","sz","Serializer","res","rootSubjects","roots","subjects","loopBreakers","x","console","log","doneBnodes","referencedBnodes","propertyTree","lastPred","toStr","appendChild","createTextNode","sort","same","predicateTD","i","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-jss'\nimport * as $rdf from 'rdflib'\n\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 = $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 = $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 // eslint-disable-next-line no-constant-condition\n if (false) { // keep code\n alternativeRendering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ACF,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/dist/defaultPane.js b/dist/defaultPane.js new file mode 100644 index 00000000..b4c77b7a --- /dev/null +++ b/dist/defaultPane.js @@ -0,0 +1,68 @@ +/* Default Pane + ** + ** This outline pane contains the properties which are + ** normally displayed to the user. See also: internalPane + ** This pane hides the ones considered too low-level for the normal user. + */ + +import * as UI from 'solid-ui-jss'; +import * as $rdf from 'rdflib'; +const ns = UI.ns; +export const defaultPane = { + icon: UI.icons.originalIconBase + 'about.png', + name: 'default', + audience: [ns.solid('Developer')], + label: function (_subject) { + return 'about '; + }, + render: function (subject, context) { + const dom = context.dom; + const filter = function (pred, inverse) { + if (typeof context.session.paneRegistry.byName('internal').predicates[pred.uri] !== 'undefined') { + return false; + } + if (inverse && pred.uri === 'http://www.w3.org/1999/02/22-rdf-syntax-ns#type') { + return false; + } + return true; + }; + const outliner = context.getOutliner(dom); + const kb = context.session.store; + // var outline = outliner; // @@ + UI.log.info('@defaultPane.render, dom is now ' + dom.location); + subject = kb.canon(subject); + const div = dom.createElement('div'); + div.setAttribute('class', 'defaultPane'); + // appendRemoveIcon(div, subject, div) + + let plist = kb.statementsMatching(subject); + outliner.appendPropertyTRs(div, plist, false, filter); + plist = kb.statementsMatching(undefined, undefined, subject); + outliner.appendPropertyTRs(div, plist, true, filter); + if (subject.termType === 'Literal' && subject.value.slice(0, 7) === 'http://') { + outliner.appendPropertyTRs(div, [$rdf.st(kb.sym(subject.value), UI.ns.link('uri'), subject)], true, filter); + } + if (subject.termType === 'NamedNode' && kb.updater.editable($rdf.Util.uri.docpart(subject.uri), kb) || subject.termType === 'BlankNode' && kb.anyStatementMatching(subject) && kb.anyStatementMatching(subject).why && kb.anyStatementMatching(subject).why.uri && kb.updater.editable(kb.anyStatementMatching(subject).why.uri) + // check the document containing something about of the bnode @@ what about as object? + /* ! && HCIoptions["bottom insert highlights"].enabled */) { + const holdingTr = dom.createElement('tr'); // these are to minimize required changes + const holdingTd = dom.createElement('td'); // in userinput.js + holdingTd.setAttribute('colspan', '2'); + holdingTd.setAttribute('notSelectable', 'true'); + const img = dom.createElement('img'); + img.src = UI.icons.originalIconBase + 'tango/22-list-add-new.png'; + img.addEventListener('click', function addNewTripleIconMouseDownListener(e) { + outliner.UserInput.addNewPredicateObject(e); + e.stopPropagation(); + e.preventDefault(); + }); + img.className = 'bottom-border-active'; + // img.addEventListener('click', thisOutline.UserInput.addNewPredicateObject,false) + div.appendChild(holdingTr).appendChild(holdingTd).appendChild(img); + } + return div; + } +}; + +// ends +//# sourceMappingURL=defaultPane.js.map \ No newline at end of file diff --git a/dist/defaultPane.js.map b/dist/defaultPane.js.map new file mode 100644 index 00000000..628eff03 --- /dev/null +++ b/dist/defaultPane.js.map @@ -0,0 +1 @@ +{"version":3,"file":"defaultPane.js","names":["UI","$rdf","ns","defaultPane","icon","icons","originalIconBase","name","audience","solid","label","_subject","render","subject","context","dom","filter","pred","inverse","session","paneRegistry","byName","predicates","uri","outliner","getOutliner","kb","store","log","info","location","canon","div","createElement","setAttribute","plist","statementsMatching","appendPropertyTRs","undefined","termType","value","slice","st","sym","link","updater","editable","Util","docpart","anyStatementMatching","why","holdingTr","holdingTd","img","src","addEventListener","addNewTripleIconMouseDownListener","e","UserInput","addNewPredicateObject","stopPropagation","preventDefault","className","appendChild"],"sources":["../src/defaultPane.js"],"sourcesContent":["/* Default Pane\n **\n ** This outline pane contains the properties which are\n ** normally displayed to the user. See also: internalPane\n ** This pane hides the ones considered too low-level for the normal user.\n */\n\nimport * as UI from 'solid-ui-jss'\nimport * as $rdf from 'rdflib'\n\nconst ns = UI.ns\n\nexport const defaultPane = {\n icon: UI.icons.originalIconBase + 'about.png',\n\n name: 'default',\n\n audience: [ns.solid('Developer')],\n\n label: function (_subject) {\n return 'about '\n },\n\n render: function (subject, context) {\n const dom = context.dom\n\n const filter = function (pred, inverse) {\n if (\n typeof context.session.paneRegistry.byName('internal').predicates[\n pred.uri\n ] !== 'undefined'\n ) {\n return false\n }\n if (\n inverse &&\n pred.uri === 'http://www.w3.org/1999/02/22-rdf-syntax-ns#type'\n ) {\n return false\n }\n return true\n }\n\n const outliner = context.getOutliner(dom)\n const kb = context.session.store\n // var outline = outliner; // @@\n UI.log.info('@defaultPane.render, dom is now ' + dom.location)\n subject = kb.canon(subject)\n const div = dom.createElement('div')\n div.setAttribute('class', 'defaultPane')\n // appendRemoveIcon(div, subject, div)\n\n let plist = kb.statementsMatching(subject)\n outliner.appendPropertyTRs(div, plist, false, filter)\n plist = kb.statementsMatching(undefined, undefined, subject)\n outliner.appendPropertyTRs(div, plist, true, filter)\n if (\n subject.termType === 'Literal' &&\n subject.value.slice(0, 7) === 'http://'\n ) {\n outliner.appendPropertyTRs(\n div,\n [$rdf.st(kb.sym(subject.value), UI.ns.link('uri'), subject)],\n true,\n filter\n )\n }\n if (\n (subject.termType === 'NamedNode' &&\n kb.updater.editable($rdf.Util.uri.docpart(subject.uri), kb)) ||\n (subject.termType === 'BlankNode' &&\n kb.anyStatementMatching(subject) &&\n kb.anyStatementMatching(subject).why &&\n kb.anyStatementMatching(subject).why.uri &&\n kb.updater.editable(kb.anyStatementMatching(subject).why.uri))\n // check the document containing something about of the bnode @@ what about as object?\n /* ! && HCIoptions[\"bottom insert highlights\"].enabled */\n ) {\n const holdingTr = dom.createElement('tr') // these are to minimize required changes\n const holdingTd = dom.createElement('td') // in userinput.js\n holdingTd.setAttribute('colspan', '2')\n holdingTd.setAttribute('notSelectable', 'true')\n const img = dom.createElement('img')\n img.src = UI.icons.originalIconBase + 'tango/22-list-add-new.png'\n img.addEventListener('click', function addNewTripleIconMouseDownListener (\n e\n ) {\n outliner.UserInput.addNewPredicateObject(e)\n e.stopPropagation()\n e.preventDefault()\n })\n img.className = 'bottom-border-active'\n // img.addEventListener('click', thisOutline.UserInput.addNewPredicateObject,false)\n div\n .appendChild(holdingTr)\n .appendChild(holdingTd)\n .appendChild(img)\n }\n return div\n }\n}\n\n// ends\n"],"mappings":"AAAA;AACA;AACA;AACA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oB,CAACpC,OAAO,CAAC,CAACqC,GAAG,CAAC3B,GAAG;IAC9D;IACA,6DACA;MACA,MAAM4B,SAAS,GAAGpC,GAAG,CAACkB,aAAa,CAAC,IAAI,CAAC,EAAC;MAC1C,MAAMmB,SAAS,GAAGrC,GAAG,CAACkB,aAAa,CAAC,IAAI,CAAC,EAAC;MAC1CmB,SAAS,CAAClB,YAAY,CAAC,SAAS,EAAE,GAAG,CAAC;MACtCkB,SAAS,CAAClB,YAAY,CAAC,eAAe,EAAE,MAAM,CAAC;MAC/C,MAAMmB,GAAG,GAAGtC,GAAG,CAACkB,aAAa,CAAC,KAAK,CAAC;MACpCoB,GAAG,CAACC,GAAG,GAAGtD,EAAE,CAACK,KAAK,CAACC,gBAAgB,GAAG,2BAA2B;MACjE+C,GAAG,CAACE,gBAAgB,CAAC,OAAO,EAAE,SAASC,iCAAiCA,CACtEC,CAAC,EACD;QACAjC,QAAQ,CAACkC,SAAS,CAACC,qBAAqB,CAACF,CAAC,CAAC;QAC3CA,CAAC,CAACG,eAAe,CAAC,CAAC;QACnBH,CAAC,CAACI,cAAc,CAAC,CAAC;MACpB,CAAC,CAAC;MACFR,GAAG,CAACS,SAAS,GAAG,sBAAsB;MACtC;MACA9B,GAAG,CACA+B,WAAW,CAACZ,SAAS,CAAC,CACtBY,WAAW,CAACX,SAAS,CAAC,CACtBW,WAAW,CAACV,GAAG,CAAC;IACrB;IACA,OAAOrB,GAAG;EACZ;AACF,CAAC;;AAED","ignoreList":[]} \ No newline at end of file diff --git a/dist/dokieli/dokieliPane.js b/dist/dokieli/dokieliPane.js new file mode 100644 index 00000000..2801c3ae --- /dev/null +++ b/dist/dokieli/dokieliPane.js @@ -0,0 +1,165 @@ +/* Human-readable editable "Dokieli" Pane + ** + ** This outline pane contains the document contents for a Dokieli document + ** The dokeili system allows the user to edit a document including anotations + ** review. It does not use turtle, but RDF/a + */ + +import * as UI from 'solid-ui-jss'; +import * as $rdf from 'rdflib'; +import * as mime from '../utils/mimeTypes'; + +// const DOKIELI_TEMPLATE_URI = 'https://dokie.li/new' // Copy to make new dok + +import DOKIELI_TEMPLATE from './new.js'; // Distributed with this library + +export default { + icon: UI.icons.iconBase + 'dokieli-logo.png', + // @@ improve? more like doccument? + + name: 'Dokieli', + mintClass: UI.ns.solid('DokieliDocument'), + // @@ A better class? + + label: function (subject, context) { + const kb = context.session.store; + const ns = UI.ns; + const allowed = [ + // 'text/plain', + 'text/html', 'application/xhtml+xml' + // 'image/png', 'image/jpeg', 'application/pdf', + // 'video/mp4' + ]; + const hasContentTypeIn = function (kb, x, displayables) { + const cts = kb.fetcher.getHeader(x, 'content-type'); + if (cts) { + for (let j = 0; j < cts.length; j++) { + for (let k = 0; k < displayables.length; k++) { + if (cts[j].indexOf(displayables[k]) >= 0) { + return true; + } + } + } + } + return false; + }; + + // This data coul d come from a fetch OR from ldp comtaimner + const hasContentTypeIn2 = function (kb, x, displayables) { + const t = kb.findTypeURIs(x); + for (let k = 0; k < displayables.length; k++) { + if ($rdf.Util.mediaTypeClass(displayables[k]).uri in t) { + return true; + } + } + return false; + }; + if (!subject.uri) return null; // no bnodes + + const t = kb.findTypeURIs(subject); + if (t[ns.link('WebPage').uri]) return 'view'; + if (hasContentTypeIn(kb, subject, allowed) || hasContentTypeIn2(kb, subject, allowed)) { + return 'Dok'; + } + return null; + }, + // Create a new folder in a Solid system, with a dokieli editable document in it + mintNew: function (context, newPaneOptions) { + const kb = context.session.store; + let newInstance = newPaneOptions.newInstance; + if (!newInstance) { + let uri = newPaneOptions.newBase; + if (uri.endsWith('/')) { + uri = uri.slice(0, -1); + newPaneOptions.newBase = uri; + } + newInstance = kb.sym(uri); + } + const contentType = mime.lookup(newInstance.uri); + if (!contentType || !contentType.includes('html')) { + newInstance = $rdf.sym(newInstance.uri + '.html'); + } + newPaneOptions.newInstance = newInstance; // Save for creation system + + // console.log('New dokieli will make: ' + newInstance) + + let htmlContents = DOKIELI_TEMPLATE; + let filename = newInstance.uri.split('/').slice(-1)[0]; + filename = decodeURIComponent(filename.split('.')[0]); + const encodedTitle = filename.replace(/&/g, '&').replace(//g, '>'); + htmlContents = htmlContents.replace('', '<title>' + encodedTitle); + htmlContents = htmlContents.replace('</article>', '<h1>' + encodedTitle + '</h1></article>'); + // console.log('@@ New HTML for Dok:' + htmlContents) + return new Promise(function (resolve) { + kb.fetcher.webOperation('PUT', newInstance.uri, { + data: htmlContents, + contentType: 'text/html' + }).then(function () { + console.log('new Dokieli document created at ' + newPaneOptions.newInstance); + resolve(newPaneOptions); + }).catch(function (err) { + console.log('Error creating dokieli doc at ' + newPaneOptions.newInstance + ': ' + err); + }); + }); + }, + // Derived from: humanReadablePane .. share code? + render: function (subject, context) { + const myDocument = context.dom; + const div = myDocument.createElement('div'); + const kb = context.session.store; + + // @@ When we can, use CSP to turn off scripts within the iframe + div.setAttribute('class', 'docView'); + const iframe = myDocument.createElement('IFRAME'); + + // Function to set iframe attributes + const setIframeAttributes = (iframe, blob, lines) => { + const objectURL = URL.createObjectURL(blob); + iframe.setAttribute('src', objectURL); + iframe.setAttribute('type', blob.type); + iframe.setAttribute('class', 'doc'); + iframe.setAttribute('style', `border: 1px solid; padding: 1em; height:${lines}em; width:800px; resize: both; overflow: auto;`); + + // Apply sandbox attribute only for HTML files + // @@ NOte beflow - if we set ANY sandbox, then Chrome and Safari won't display it if it is PDF. + // https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe + // You can;'t have any sandbox and allow plugins. + // We could sandbox only HTML files I suppose. + // HTML5 bug: https://lists.w3.org/Archives/Public/public-html/2011Jun/0330.html + if (blob.type === 'text/html' || blob.type === 'application/xhtml+xml') { + iframe.setAttribute('sandbox', 'allow-scripts allow-same-origin'); + } + }; + + // Fetch and process the blob + kb.fetcher._fetch(subject.uri).then(response => response.blob()).then(blob => { + const blobTextPromise = blob.type.startsWith('text') ? blob.text() : Promise.resolve(''); + return blobTextPromise.then(blobText => ({ + blob, + blobText + })); + }).then(({ + blob, + blobText + }) => { + const newLines = blobText.includes('<script src="https://dokie.li/scripts/dokieli.js">') ? -10 : 5; + const lines = Math.min(30, blobText.split(/\n/).length + newLines); + setIframeAttributes(iframe, blob, lines); + }).catch(err => { + console.log('Error fetching or processing blob:', err); + }); + const cts = kb.fetcher.getHeader(subject.doc(), 'content-type'); + const ct = cts ? cts[0].split(';', 1)[0].trim() : null; + if (ct) { + console.log('dokieliPane: c-t:' + ct); + } else { + console.log('dokieliPane: unknown content-type?'); + } + const tr = myDocument.createElement('tr'); + tr.appendChild(iframe); + div.appendChild(tr); + return div; + } +}; +// ends +//# sourceMappingURL=dokieliPane.js.map \ No newline at end of file diff --git a/dist/dokieli/dokieliPane.js.map b/dist/dokieli/dokieliPane.js.map new file mode 100644 index 00000000..d2d3270b --- /dev/null +++ b/dist/dokieli/dokieliPane.js.map @@ -0,0 +1 @@ +{"version":3,"file":"dokieliPane.js","names":["UI","$rdf","mime","DOKIELI_TEMPLATE","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","t","findTypeURIs","Util","mediaTypeClass","uri","link","mintNew","newPaneOptions","newInstance","newBase","endsWith","slice","sym","contentType","lookup","includes","htmlContents","filename","split","decodeURIComponent","encodedTitle","replace","Promise","resolve","webOperation","data","then","console","log","catch","err","render","myDocument","dom","div","createElement","setAttribute","iframe","setIframeAttributes","blob","lines","objectURL","URL","createObjectURL","type","_fetch","response","blobTextPromise","startsWith","text","blobText","newLines","Math","min","doc","ct","trim","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-jss'\nimport * as $rdf from 'rdflib'\nimport * as mime from '../utils/mimeTypes'\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(x)\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, '&')\n .replace(/</g, '<')\n .replace(/>/g, '>')\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 dokieli doc 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\n // Function to set iframe attributes\n const setIframeAttributes = (iframe, blob, lines) => {\n const objectURL = URL.createObjectURL(blob)\n iframe.setAttribute('src', objectURL)\n iframe.setAttribute('type', blob.type)\n iframe.setAttribute('class', 'doc')\n iframe.setAttribute('style', `border: 1px solid; padding: 1em; height:${lines}em; width:800px; resize: both; overflow: auto;`)\n\n // Apply sandbox attribute only for HTML files\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 if (blob.type === 'text/html' || blob.type === 'application/xhtml+xml') {\n iframe.setAttribute('sandbox', 'allow-scripts allow-same-origin')\n }\n }\n\n // Fetch and process the blob\n kb.fetcher._fetch(subject.uri)\n .then(response => response.blob())\n .then(blob => {\n const blobTextPromise = blob.type.startsWith('text') ? blob.text() : Promise.resolve('')\n return blobTextPromise.then(blobText => ({ blob, blobText }))\n })\n .then(({ blob, blobText }) => {\n const newLines = blobText.includes('<script src=\"https://dokie.li/scripts/dokieli.js\">') ? -10 : 5\n const lines = Math.min(30, blobText.split(/\\n/).length + newLines)\n setIframeAttributes(iframe, blob, lines)\n })\n .catch(err => {\n console.log('Error fetching or processing blob:', err)\n })\n\n const cts = kb.fetcher.getHeader(subject.doc(), 'content-type')\n const ct = cts ? cts[0].split(';', 1)[0].trim() : null\n if (ct) {\n console.log('dokieliPane: c-t:' + ct)\n } else {\n console.log('dokieliPane: unknown content-type?')\n }\n\n const tr = myDocument.createElement('tr')\n tr.appendChild(iframe)\n div.appendChild(tr)\n return div\n }\n}\n// ends\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,KAAKA,EAAE,MAAM,cAAc;AAClC,OAAO,KAAKC,IAAI,MAAM,QAAQ;AAC9B,OAAO,KAAKC,IAAI,MAAM,oBAAoB;;AAE1C;;AAEA,OAAOC,gBAAgB,MAAM,UAAU,EAAC;;AAExC,eAAe;EACbC,IAAI,EAAEJ,EAAE,CAACK,KAAK,CAACC,QAAQ,GAAG,kBAAkB;EAAE;;EAE9CC,IAAI,EAAE,SAAS;EAEfC,SAAS,EAAER,EAAE,CAACS,EAAE,CAACC,KAAK,CAAC,iBAAiB,CAAC;EAAE;;EAE3CC,KAAK,EAAE,SAAAA,CAAUC,OAAO,EAAEC,OAAO,EAAE;IACjC,MAAMC,EAAE,GAAGD,OAAO,CAACE,OAAO,CAACC,KAAK;IAChC,MAAMP,EAAE,GAAGT,EAAE,CAACS,EAAE;IAChB,MAAMQ,OAAO,GAAG;IACd;IACA,WAAW,EACX;IACA;IACA;IAAA,CACD;IAED,MAAMC,gBAAgB,GAAG,SAAAA,CAAUJ,EAAE,EAAEK,CAAC,EAAEC,Y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,KAAK,CAAC,IAAI,CAAC,CAACtB,MAAM,GAAGuD,QAAQ,CAAC;MAClEb,mBAAmB,CAACD,MAAM,EAAEE,IAAI,EAAEC,KAAK,CAAC;IAC1C,CAAC,CAAC,CACDX,KAAK,CAACC,GAAG,IAAI;MACZH,OAAO,CAACC,GAAG,CAAC,oCAAoC,EAAEE,GAAG,CAAC;IACxD,CAAC,CAAC;IAEJ,MAAMtC,GAAG,GAAGP,EAAE,CAACQ,OAAO,CAACC,SAAS,CAACX,OAAO,CAACuE,GAAG,CAAC,CAAC,EAAE,cAAc,CAAC;IAC/D,MAAMC,EAAE,GAAG/D,GAAG,GAAGA,GAAG,CAAC,CAAC,CAAC,CAAC0B,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAACsC,IAAI,CAAC,CAAC,GAAG,IAAI;IACtD,IAAID,EAAE,EAAE;MACN5B,OAAO,CAACC,GAAG,CAAC,mBAAmB,GAAG2B,EAAE,CAAC;IACvC,CAAC,MAAM;MACL5B,OAAO,CAACC,GAAG,CAAC,oCAAoC,CAAC;IACnD;IAEA,MAAM6B,EAAE,GAAGzB,UAAU,CAACG,aAAa,CAAC,IAAI,CAAC;IACzCsB,EAAE,CAACC,WAAW,CAACrB,MAAM,CAAC;IACtBH,GAAG,CAACwB,WAAW,CAACD,EAAE,CAAC;IACnB,OAAOvB,GAAG;EACZ;AACF,CAAC;AACD","ignoreList":[]} \ No newline at end of file diff --git a/dist/dokieli/new.js b/dist/dokieli/new.js new file mode 100644 index 00000000..ba146aef --- /dev/null +++ b/dist/dokieli/new.js @@ -0,0 +1,22 @@ +const DOKIELI_TEMPLATE = ` +<!DOCTYPE html> +<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta charset="utf-8" /> + <title> + + + + + + + +
+
+ +
+
+ +`; +export default DOKIELI_TEMPLATE; +//# sourceMappingURL=new.js.map \ No newline at end of file diff --git a/dist/dokieli/new.js.map b/dist/dokieli/new.js.map new file mode 100644 index 00000000..cea2ba51 --- /dev/null +++ b/dist/dokieli/new.js.map @@ -0,0 +1 @@ +{"version":3,"file":"new.js","names":["DOKIELI_TEMPLATE"],"sources":["../../src/dokieli/new.js"],"sourcesContent":["const DOKIELI_TEMPLATE = `\n\n\n \n \n \n \n \n \n \n \n\n \n
\n
\n\n
\n
\n \n`\n\nexport default DOKIELI_TEMPLATE\n"],"mappings":"AAAA,MAAMA,gBAAgB,GAAG;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AAER,eAAeA,gBAAgB","ignoreList":[]} \ No newline at end of file diff --git a/dist/form/pane.js b/dist/form/pane.js new file mode 100644 index 00000000..8b5d1e7b --- /dev/null +++ b/dist/form/pane.js @@ -0,0 +1,178 @@ +/* + ** Pane for running existing forms for any object + ** + */ + +import * as UI from 'solid-ui-jss'; +import { authn } from 'solid-logic-jss'; +import * as $rdf from 'rdflib'; +const ns = UI.ns; +export const formPane = { + icon: UI.icons.iconBase + 'noun_122196.svg', + name: 'form', + audience: [ns.solid('PowerUser')], + // Does the subject deserve this pane? + label: function (subject) { + const n = UI.widgets.formsFor(subject).length; + UI.log.debug('Form pane: forms for ' + subject + ': ' + n); + if (!n) return null; + return '' + n + ' forms'; + }, + render: function (subject, context) { + const kb = context.session.store; + const dom = context.dom; + const mention = function complain(message, style) { + const pre = dom.createElement('p'); + pre.setAttribute('style', style || 'color: grey; background-color: white'); + box.appendChild(pre).textContent = message; + return pre; + }; + const complain = function complain(message, style) { + mention(message, 'style', style || 'color: grey; background-color: #fdd;'); + }; + const complainIfBad = function (ok, body) { + if (ok) { + // setModifiedDate(store, kb, store); + // rerender(box); // Deleted forms at the moment + } else complain('Sorry, failed to save your change:\n' + body); + }; + + // The question of where to store this data about subject + // This in general needs a whole lot more thought + // and it connects to the discoverbility through links + + // const t = kb.findTypeURIs(subject) + + const me = authn.currentUser(); + const box = dom.createElement('div'); + box.setAttribute('class', 'formPane'); + if (!me) { + mention('You are not logged in. If you log in and have ' + 'workspaces then you would be able to select workspace in which ' + 'to put this new information'); + } else { + const ws = kb.each(me, ns.ui('workspace')); + if (ws.length === 0) { + mention('You don\'t seem to have any workspaces defined. ' + 'A workspace is a place on the web (http://..) or in ' + 'the file system (file:///) to store application data.\n'); + } else { + // @@ + } + } + + // Render forms using a given store + + const renderFormsFor = function (store, subject) { + kb.fetcher.nowOrWhenFetched(store.uri, subject, function (ok, body) { + if (!ok) return complain('Cannot load store ' + store.uri + ': ' + body); + + // Render the forms + + const forms = UI.widgets.formsFor(subject); + + // complain('Form for editing this form:'); + for (let i = 0; i < forms.length; i++) { + const form = forms[i]; + const heading = dom.createElement('h4'); + box.appendChild(heading); + if (form.uri) { + const formStore = $rdf.Util.uri.document(form.uri); + if (formStore.uri !== form.uri) { + // The form is a hash-type URI + const e = box.appendChild(UI.widgets.editFormButton(dom, box, form, formStore, complainIfBad)); + e.setAttribute('style', 'float: right;'); + } + } + const anchor = dom.createElement('a'); + anchor.setAttribute('href', form.uri); + heading.appendChild(anchor); + anchor.textContent = UI.utils.label(form, true); + + /* Keep tis as a reminder to let a New one have its URI given by user + mention("Where will this information be stored?") + const ele = dom.createElement('input'); + box.appendChild(ele); + ele.setAttribute('type', 'text'); + ele.setAttribute('size', '72'); + ele.setAttribute('maxlength', '1024'); + ele.setAttribute('style', 'font-size: 80%; color:#222;'); + ele.value = store.uri + */ + + UI.widgets.appendForm(dom, box, {}, subject, form, store, complainIfBad); + } + }); // end: when store loded + }; // renderFormsFor + + // Figure out what store + + // Which places are editable and have stuff about the subject? + + let store = null; + + // 1. The document URI of the subject itself + const docuri = $rdf.Util.uri.docpart(subject.uri); + if (subject.uri !== docuri && kb.updater.editable(docuri, kb)) { + store = subject.doc(); + } // an editable data file with hash + + store = store || kb.any(kb.sym(docuri), ns.link('annotationStore')); + + // 2. where stuff is already stored + if (!store) { + const docs = {}; + const docList = []; + store.statementsMatching(subject).forEach(function (st) { + docs[st.why.uri] = 1; + }); + store.statementsMatching(undefined, undefined, subject).forEach(function (st) { + docs[st.why.uri] = 2; + }); + for (const d in docs) docList.push(docs[d], d); + docList.sort(); + for (let i = 0; i < docList.length; i++) { + const uri = docList[i][1]; + if (uri && store.updater.editable(uri)) { + store = store.sym(uri); + break; + } + } + } + + // 3. In a workspace store + // @@ TODO: Can probably remove _followeach (not done this time because the commit is a very safe refactor) + const _followeach = function (kb, subject, path) { + if (path.length === 0) return [subject]; + const oo = kb.each(subject, path[0]); + let res = []; + for (let i = 0; i < oo.length; i++) { + res = res.concat(_followeach(kb, oo[i], path.slice(1))); + } + return res; + }; + const date = '2014'; // @@@@@@@@@@@@ pass as parameter + + if (store) { + // mention("@@ Ok, we have a store <" + store.uri + ">."); + renderFormsFor(store, subject); + } else { + complain('No suitable store is known, to edit <' + subject.uri + '>.'); + const foobarbaz = UI.login.selectWorkspace(dom, function (ws) { + mention('Workspace selected OK: ' + ws); + const activities = store.each(undefined, ns.space('workspace'), ws); + for (let j = 0; j < activities.length; j++) { + const act = activities[j]; + const subjectDoc2 = store.any(ws, ns.space('store')); + const start = store.any(ws, ns.cal('dtstart')).value(); + const end = store.any(ws, ns.cal('dtend')).value(); + if (subjectDoc2 && start && end && start <= date && end > date) { + renderFormsFor(subjectDoc2, subject); + break; + } else { + complain('Note no suitable annotation store in activity: ' + act); + } + } + }); + box.appendChild(foobarbaz); + } + return box; + } +}; +//# sourceMappingURL=pane.js.map \ No newline at end of file diff --git a/dist/form/pane.js.map b/dist/form/pane.js.map new file mode 100644 index 00000000..acb83f5b --- /dev/null +++ b/dist/form/pane.js.map @@ -0,0 +1 @@ +{"version":3,"file":"pane.js","names":["UI","authn","$rdf","ns","formPane","icon","icons","iconBase","name","audience","solid","label","subject","n","widgets","formsFor","length","log","debug","render","context","kb","session","store","dom","mention","complain","message","style","pre","createElement","setAttribute","box","appendChild","textContent","complainIfBad","ok","body","me","currentUser","ws","each","ui","renderFormsFor","fetcher","nowOrWhenFetched","uri","forms","i","form","heading","formStore","Util","document","e","editFormButton","anchor","utils","appendForm","docuri","docpart","updater","editable","doc","any","sym","link","docs","docList","statementsMatching","forEach","st","why","undefined","d","push","sort","_followeach","path","oo","res","concat","slice","date","foobarbaz","login","selectWorkspace","activities","space","j","act","subjectDoc2","start","cal","value","end"],"sources":["../../src/form/pane.js"],"sourcesContent":["/*\n ** Pane for running existing forms for any object\n **\n */\n\nimport * as UI from 'solid-ui-jss'\nimport { authn } from 'solid-logic-jss'\nimport * as $rdf from 'rdflib'\nconst ns = UI.ns\n\nexport const formPane = {\n icon: UI.icons.iconBase + 'noun_122196.svg',\n\n name: 'form',\n\n audience: [ns.solid('PowerUser')],\n\n // Does the subject deserve this pane?\n label: function (subject) {\n const n = UI.widgets.formsFor(subject).length\n UI.log.debug('Form pane: forms for ' + subject + ': ' + n)\n if (!n) return null\n return '' + n + ' forms'\n },\n\n render: function (subject, context) {\n const kb = context.session.store\n const dom = context.dom\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 // The question of where to store this data about subject\n // This in general needs a whole lot more thought\n // and it connects to the discoverbility through links\n\n // const t = kb.findTypeURIs(subject)\n\n const me = authn.currentUser()\n\n const box = dom.createElement('div')\n box.setAttribute('class', 'formPane')\n\n if (!me) {\n mention(\n 'You are not logged in. If you log in and have ' +\n 'workspaces then you would be able to select workspace in which ' +\n 'to put this new information'\n )\n } else {\n const ws = kb.each(me, ns.ui('workspace'))\n if (ws.length === 0) {\n mention(\n 'You don\\'t seem to have any workspaces defined. ' +\n 'A workspace is a place on the web (http://..) or in ' +\n 'the file system (file:///) to store application data.\\n'\n )\n } else {\n // @@\n }\n }\n\n // Render forms using a given store\n\n const renderFormsFor = function (store, subject) {\n kb.fetcher.nowOrWhenFetched(store.uri, subject, function (ok, body) {\n if (!ok) return complain('Cannot load store ' + store.uri + ': ' + body)\n\n // Render the forms\n\n const forms = UI.widgets.formsFor(subject)\n\n // complain('Form for editing this form:');\n for (let i = 0; i < forms.length; i++) {\n const form = forms[i]\n const heading = dom.createElement('h4')\n box.appendChild(heading)\n if (form.uri) {\n const formStore = $rdf.Util.uri.document(form.uri)\n if (formStore.uri !== form.uri) {\n // The form is a hash-type URI\n const e = box.appendChild(\n UI.widgets.editFormButton(\n dom,\n box,\n form,\n formStore,\n complainIfBad\n )\n )\n e.setAttribute('style', 'float: right;')\n }\n }\n const anchor = dom.createElement('a')\n anchor.setAttribute('href', form.uri)\n heading.appendChild(anchor)\n anchor.textContent = UI.utils.label(form, true)\n\n /* Keep tis as a reminder to let a New one have its URI given by user\n mention(\"Where will this information be stored?\")\n const ele = dom.createElement('input');\n box.appendChild(ele);\n ele.setAttribute('type', 'text');\n ele.setAttribute('size', '72');\n ele.setAttribute('maxlength', '1024');\n ele.setAttribute('style', 'font-size: 80%; color:#222;');\n ele.value = store.uri\n */\n\n UI.widgets.appendForm(\n dom,\n box,\n {},\n subject,\n form,\n store,\n complainIfBad\n )\n }\n }) // end: when store loded\n } // renderFormsFor\n\n // Figure out what store\n\n // Which places are editable and have stuff about the subject?\n\n let store = null\n\n // 1. The document URI of the subject itself\n const docuri = $rdf.Util.uri.docpart(subject.uri)\n if (subject.uri !== docuri && kb.updater.editable(docuri, kb)) {\n store = subject.doc()\n } // an editable data file with hash\n\n store = store || kb.any(kb.sym(docuri), ns.link('annotationStore'))\n\n // 2. where stuff is already stored\n if (!store) {\n const docs = {}\n const docList = []\n store.statementsMatching(subject).forEach(function (st) {\n docs[st.why.uri] = 1\n })\n store\n .statementsMatching(undefined, undefined, subject)\n .forEach(function (st) {\n docs[st.why.uri] = 2\n })\n for (const d in docs) docList.push(docs[d], d)\n docList.sort()\n for (let i = 0; i < docList.length; i++) {\n const uri = docList[i][1]\n if (uri && store.updater.editable(uri)) {\n store = store.sym(uri)\n break\n }\n }\n }\n\n // 3. In a workspace store\n // @@ TODO: Can probably remove _followeach (not done this time because the commit is a very safe refactor)\n const _followeach = function (kb, subject, path) {\n if (path.length === 0) return [subject]\n const oo = kb.each(subject, path[0])\n let res = []\n for (let i = 0; i < oo.length; i++) {\n res = res.concat(_followeach(kb, oo[i], path.slice(1)))\n }\n return res\n }\n\n const date = '2014' // @@@@@@@@@@@@ pass as parameter\n\n if (store) {\n // mention(\"@@ Ok, we have a store <\" + store.uri + \">.\");\n renderFormsFor(store, subject)\n } else {\n complain('No suitable store is known, to edit <' + subject.uri + '>.')\n const foobarbaz = UI.login.selectWorkspace(dom, function (ws) {\n mention('Workspace selected OK: ' + ws)\n\n const activities = store.each(undefined, ns.space('workspace'), ws)\n for (let j = 0; j < activities.length; j++) {\n const act = activities[j]\n\n const subjectDoc2 = store.any(ws, ns.space('store'))\n const start = store.any(ws, ns.cal('dtstart')).value()\n const end = store.any(ws, ns.cal('dtend')).value()\n if (subjectDoc2 && start && end && start <= date && end > date) {\n renderFormsFor(subjectDoc2, subject)\n break\n } else {\n complain('Note no suitable annotation store in activity: ' + act)\n }\n }\n })\n box.appendChild(foobarbaz)\n }\n\n return box\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;;AAEA,OAAO,KAAKA,EAAE,MAAM,cAAc;AAClC,SAASC,KAAK,QAAQ,iBAAiB;AACvC,OAAO,KAAKC,IAAI,MAAM,QAAQ;AAC9B,MAAMC,EAAE,GAAGH,EAAE,CAACG,EAAE;AAEhB,OAAO,MAAMC,QAAQ,GAAG;EACtBC,IAAI,EAAEL,EAAE,CAACM,KAAK,CAACC,QAAQ,GAAG,iBAAiB;EAE3CC,IAAI,EAAE,MAAM;EAEZC,QAAQ,EAAE,CAACN,EAAE,CAACO,KAAK,C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AAErC,EAAE,CAACqF,KAAK,CAAC,OAAO,CAAC,CAAC;UACpD,MAAMI,KAAK,GAAGrE,KAAK,CAACyC,GAAG,CAACxB,EAAE,EAAErC,EAAE,CAAC0F,GAAG,CAAC,SAAS,CAAC,CAAC,CAACC,KAAK,CAAC,CAAC;UACtD,MAAMC,GAAG,GAAGxE,KAAK,CAACyC,GAAG,CAACxB,EAAE,EAAErC,EAAE,CAAC0F,GAAG,CAAC,OAAO,CAAC,CAAC,CAACC,KAAK,CAAC,CAAC;UAClD,IAAIH,WAAW,IAAIC,KAAK,IAAIG,GAAG,IAAIH,KAAK,IAAIT,IAAI,IAAIY,GAAG,GAAGZ,IAAI,EAAE;YAC9DxC,cAAc,CAACgD,WAAW,EAAE/E,OAAO,CAAC;YACpC;UACF,CAAC,MAAM;YACLc,QAAQ,CAAC,iDAAiD,GAAGgE,GAAG,CAAC;UACnE;QACF;MACF,CAAC,CAAC;MACF1D,GAAG,CAACC,WAAW,CAACmD,SAAS,CAAC;IAC5B;IAEA,OAAOpD,GAAG;EACZ;AACF,CAAC","ignoreList":[]} \ No newline at end of file diff --git a/dist/home/homePane.js b/dist/home/homePane.js new file mode 100644 index 00000000..df1734b2 --- /dev/null +++ b/dist/home/homePane.js @@ -0,0 +1,67 @@ +/* Home Pane + ** + ** The home pane is avaiable everywhere and allows a user + ** to + ** - keep track of their stuff + ** - make new things, and possibly + ** - keep track of accounts and workspaces etc + ** + */ + +import { authn } from 'solid-logic-jss'; +import { create, icons, login } from 'solid-ui-jss'; +const HomePaneSource = { + icon: icons.iconBase + 'noun_547570.svg', + // noun_25830 + + global: true, + name: 'home', + // Does the subject deserve an home pane? + // + // yes, always! + // + label: function () { + return 'home'; + }, + render: function (subject, context) { + const dom = context.dom; + const showContent = async function () { + const homePaneContext = { + div, + dom, + statusArea: div, + me + }; + /* + div.appendChild(dom.createElement('h4')).textContent = 'Login status' + var loginStatusDiv = div.appendChild(context.dom.createElement('div')) + // TODO: Find out what the actual type is: + type UriType = unknown; + loginStatusDiv.appendChild(UI.login.loginStatusBox(context.dom, () => { + // Here we know new log in status + })) + */ + div.appendChild(dom.createElement('h4')).textContent = 'Create new thing somewhere'; + const creationDiv = div.appendChild(dom.createElement('div')); + const creationContext = { + div: creationDiv, + dom, + statusArea: div, + me + }; + const relevantPanes = await login.filterAvailablePanes(context.session.paneRegistry.list); + create.newThingUI(creationContext, context, relevantPanes); // newUI Have to pass panes down + + login.registrationList(homePaneContext, {}).then(function () {}); + }; + const div = dom.createElement('div'); + const me = authn.currentUser(); // this will be incorrect if not logged in + + showContent(); + return div; + } +}; // pane object + +// ends +export default HomePaneSource; +//# sourceMappingURL=homePane.js.map \ No newline at end of file diff --git a/dist/home/homePane.js.map b/dist/home/homePane.js.map new file mode 100644 index 00000000..6cbdd066 --- /dev/null +++ b/dist/home/homePane.js.map @@ -0,0 +1 @@ +{"version":3,"file":"homePane.js","names":["authn","create","icons","login","HomePaneSource","icon","iconBase","global","name","label","render","subject","context","dom","showContent","homePaneContext","div","statusArea","me","appendChild","createElement","textContent","creationDiv","creationContext","relevantPanes","filterAvailablePanes","session","paneRegistry","list","newThingUI","registrationList","then","currentUser"],"sources":["../../src/home/homePane.ts"],"sourcesContent":["/* Home Pane\n **\n ** The home pane is avaiable everywhere and allows a user\n ** to\n ** - keep track of their stuff\n ** - make new things, and possibly\n ** - keep track of accounts and workspaces etc\n **\n */\n\nimport { PaneDefinition } from 'pane-registry'\nimport { NamedNode } from 'rdflib'\nimport { authn } from 'solid-logic-jss'\nimport { create, icons, login } from 'solid-ui-jss'\nimport type { CreateContext } from 'solid-ui-jss'\n\nconst HomePaneSource: PaneDefinition = {\n icon: icons.iconBase + 'noun_547570.svg', // noun_25830\n\n global: true,\n\n name: 'home',\n\n // Does the subject deserve an home pane?\n //\n // yes, always!\n //\n label: function () {\n return 'home'\n },\n\n render: function (subject, context) {\n const dom = context.dom\n const showContent = async function () {\n const homePaneContext = { div, dom, statusArea: div, me }\n /*\n div.appendChild(dom.createElement('h4')).textContent = 'Login status'\n var loginStatusDiv = div.appendChild(context.dom.createElement('div'))\n // TODO: Find out what the actual type is:\n type UriType = unknown;\n loginStatusDiv.appendChild(UI.login.loginStatusBox(context.dom, () => {\n // Here we know new log in status\n }))\n */\n div.appendChild(dom.createElement('h4')).textContent =\n 'Create new thing somewhere'\n const creationDiv = div.appendChild(dom.createElement('div'))\n const creationContext: CreateContext = {\n div: creationDiv,\n dom,\n statusArea: div,\n me\n }\n const relevantPanes = await login.filterAvailablePanes(\n context.session.paneRegistry.list\n )\n create.newThingUI(creationContext, context, relevantPanes) // newUI Have to pass panes down\n\n login.registrationList(homePaneContext, {}).then(function () {})\n }\n\n const div = dom.createElement('div')\n const me: NamedNode = authn.currentUser() as NamedNode // this will be incorrect if not logged in\n\n showContent()\n\n return div\n }\n} // pane object\n\n// ends\nexport default HomePaneSource\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,SAASA,KAAK,QAAQ,iBAAiB;AACvC,SAASC,MAAM,EAAEC,KAAK,EAAEC,KAAK,QAAQ,cAAc;AAGnD,MAAMC,cAA8B,GAAG;EACrCC,IAAI,EAAEH,KAAK,CAACI,QAAQ,GAAG,iBAAiB;EAAE;;EAE1CC,MAAM,EAAE,IAAI;EAEZC,IAAI,EAAE,MAAM;EAEZ;EACA;EACA;EACA;EACAC,KAAK,EAAE,SAAAA,CAAA,EAAY;IACjB,OAAO,MAAM;EACf,CAAC;EAEDC,MAAM,EAAE,SAAAA,CAAUC,OAAO,EAAEC,OAAO,EAAE;IAClC,MAAMC,GAAG,GAAGD,OAAO,CAACC,GAAG;IACvB,MAAMC,WAAW,GAAG,eAAAA,CAAA,EAAkB;MACpC,MAAMC,eAAe,GAAG;QAAEC,GAAG;QAAEH,GAAG;QAAEI,UAAU,EAAED,GAAG;QAAEE;MAAG,CAAC;MACzD;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;MACMF,GAAG,CAACG,WAAW,CAACN,GAAG,CAACO,aAAa,CAAC,IAAI,CAAC,CAAC,CAACC,WAAW,GAClD,4BAA4B;MAC9B,MAAMC,WAAW,GAAGN,GAAG,CAACG,WAAW,CAACN,GAAG,CAACO,aAAa,CAAC,KAAK,CAAC,CAAC;MAC7D,MAAMG,eAA8B,GAAG;QACrCP,GAAG,EAAEM,WAAW;QAChBT,GAAG;QACHI,UAAU,EAAED,GAAG;QACfE;MACF,CAAC;MACD,MAAMM,aAAa,GAAG,MAAMrB,KAAK,CAACsB,oBAAoB,CACpDb,OAAO,CAACc,OAAO,CAACC,YAAY,CAACC,IAC/B,CAAC;MACD3B,MAAM,CAAC4B,UAAU,CAACN,eAAe,EAAEX,OAAO,EAAEY,aAAa,CAAC,EAAC;;MAE3DrB,KAAK,CAAC2B,gBAAgB,CAACf,eAAe,EAAE,CAAC,CAAC,CAAC,CAACgB,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;IAClE,CAAC;IAED,MAAMf,GAAG,GAAGH,GAAG,CAACO,aAAa,CAAC,KAAK,CAAC;IACpC,MAAMF,EAAa,GAAGlB,KAAK,CAACgC,WAAW,CAAC,CAAc,EAAC;;IAEvDlB,WAAW,CAAC,CAAC;IAEb,OAAOE,GAAG;EACZ;AACF,CAAC,EAAC;;AAEF;AACA,eAAeZ,cAAc","ignoreList":[]} \ No newline at end of file diff --git a/dist/humanReadablePane.js b/dist/humanReadablePane.js new file mode 100644 index 00000000..438fc627 --- /dev/null +++ b/dist/humanReadablePane.js @@ -0,0 +1,128 @@ +/* Human-readable Pane + ** + ** This outline pane contains the document contents for an HTML document + ** This is for peeking at a page, because the user might not want to leave the data browser. + */ +import { icons, ns } from 'solid-ui-jss'; +import { Util } from 'rdflib'; +import { marked } from 'marked'; +import DOMPurify from 'dompurify'; +const humanReadablePane = { + icon: icons.originalIconBase + 'tango/22-text-x-generic.png', + name: 'humanReadable', + label: function (subject, context) { + const kb = context.session.store; + + // See also the source pane, which has lower precedence. + + const allowed = ['text/plain', 'text/html', 'text/markdown', 'application/xhtml+xml', 'image/png', 'image/jpeg', 'application/pdf', 'video/mp4']; + const hasContentTypeIn = function (kb, x, displayables) { + const cts = kb.fetcher.getHeader(x, 'content-type'); + if (cts) { + for (let j = 0; j < cts.length; j++) { + for (let k = 0; k < displayables.length; k++) { + if (cts[j].indexOf(displayables[k]) >= 0) { + return true; + } + } + } + } + return false; + }; + + // This data could come from a fetch OR from ldp container + const hasContentTypeIn2 = function (kb, x, displayables) { + const t = kb.findTypeURIs(x); + for (let k = 0; k < displayables.length; k++) { + if (Util.mediaTypeClass(displayables[k]).uri in t) { + return true; + } + } + return false; + }; + if (!subject.uri) return null; // no bnodes + + const t = kb.findTypeURIs(subject); + if (t[ns.link('WebPage').uri]) return 'view'; + if (hasContentTypeIn(kb, subject, allowed) || hasContentTypeIn2(kb, subject, allowed)) { + return 'View'; + } + return null; + }, + render: function (subject, context) { + const myDocument = context.dom; + const div = myDocument.createElement('div'); + const kb = context.session.store; + const cts = kb.fetcher.getHeader(subject.doc(), 'content-type'); + const ct = cts ? cts[0].split(';', 1)[0].trim() : null; // remove content-type parameters + if (ct) { + // console.log('humanReadablePane: c-t:' + ct) + } else { + console.log('humanReadablePane: unknown content-type?'); + } + + // @@ When we can, use CSP to turn off scripts within the iframe + div.setAttribute('class', 'docView'); + const element = ct === 'text/markdown' ? 'DIV' : 'IFRAME'; + const frame = myDocument.createElement(element); + const setIframeAttributes = (frame, blob, lines) => { + frame.setAttribute('src', URL.createObjectURL(blob)); + frame.setAttribute('type', blob.type); + frame.setAttribute('class', 'doc'); + frame.setAttribute('style', `border: 1px solid; padding: 1em; height: ${lines}em; width: 800px; resize: both; overflow: auto;`); + + // Apply sandbox attribute only for HTML files + // @@ Note below - if we set ANY sandbox, then Chrome and Safari won't display it if it is PDF. + // https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe + // You can't have any sandbox and allow plugins. + // We could sandbox only HTML files I suppose. + if (blob.type === 'text/html' || blob.type === 'application/xhtml+xml') { + frame.setAttribute('sandbox', 'allow-scripts allow-same-origin'); + } + }; + + // render markdown to html + const markdownHtml = function () { + kb.fetcher.webOperation('GET', subject.uri).then(response => { + const markdownText = response.responseText; + const lines = Math.min(30, markdownText.split(/\n/).length + 5); + const res = marked.parse(markdownText); + const clean = DOMPurify.sanitize(res); + frame.innerHTML = clean; + frame.setAttribute('class', 'doc'); + frame.setAttribute('style', `border: 1px solid; padding: 1em; height: ${lines}em; width: 800px; resize: both; overflow: auto;`); + }).catch(error => { + console.error('Error fetching markdown content:', error); + frame.innerHTML = '

Error loading content

'; + }); + }; + if (ct === 'text/markdown') { + markdownHtml(); + } else { + // Fetch and process the blob + kb.fetcher._fetch(subject.uri).then(response => response.blob()).then(blob => { + const blobTextPromise = blob.type.startsWith('text') ? blob.text() : Promise.resolve(''); + return blobTextPromise.then(blobText => ({ + blob, + blobText + })); + }).then(({ + blob, + blobText + }) => { + const newLines = blobText.includes(' +``` + +## Matching Criteria + +The pane activates when viewing: +- Resources with type `schema:Bookmark` +- Containers with `schema:Bookmark` items + +## Development + +1. Copy this folder to `solid-panes-jss/src/` +2. Add to `registerPanes.js`: + ```javascript + import { bookmarkPane } from './bookmark-pane/lazy.js' + register(bookmarkPane) + ``` +3. Run `npm start` in mashlib-jss +4. Navigate to a bookmark resource diff --git a/examples/bookmark-pane/lazy.js b/examples/bookmark-pane/lazy.js new file mode 100644 index 00000000..41be5390 --- /dev/null +++ b/examples/bookmark-pane/lazy.js @@ -0,0 +1,115 @@ +/** + * Bookmark Pane - Lazy Wrapper + * + * This lightweight wrapper is always loaded. It contains only: + * - Icon and name + * - label() function for type checking + * - Async render() that loads the full implementation on demand + * + * The actual rendering code is in render.js and only loads + * when someone views a bookmark. + */ + +// Import only what's needed for label() checks +import * as UI from 'solid-ui-jss' +import * as $rdf from 'rdflib' + +const ns = UI.ns + +// Define schema namespace for bookmarks +const schema = $rdf.Namespace('http://schema.org/') + +export const bookmarkPane = { + // Unique identifier for this pane + name: 'bookmark', + + // Icon shown in pane selector + icon: UI.icons.iconBase + 'noun_97839.svg', // bookmark icon + + // Optional: restrict to power users + // audience: [ns.solid('PowerUser')], + + /** + * Label function - determines if this pane is relevant + * + * MUST be synchronous and lightweight! + * Called for every subject the user views. + * + * @param {NamedNode} subject - The RDF resource being viewed + * @param {Object} context - Contains session, dom, etc. + * @returns {string|null} - Tooltip string if relevant, null if not + */ + label: function (subject, context) { + const kb = context.session.store + const rdfType = ns.rdf('type') + const bookmarkType = schema('Bookmark') + + // Check if subject is a Bookmark + if (kb.holds(subject, rdfType, bookmarkType)) { + return 'Bookmark' + } + + // Check if subject is a container with bookmarks + if (kb.holds(subject, rdfType, ns.ldp('Container')) || + kb.holds(subject, rdfType, ns.ldp('BasicContainer'))) { + const contents = kb.each(subject, ns.ldp('contains')) + const hasBookmarks = contents.some(item => + kb.holds(item, rdfType, bookmarkType) + ) + if (hasBookmarks) { + return 'Bookmarks' + } + } + + return null + }, + + /** + * Render function - creates the UI + * + * Can be async! The outline manager handles Promise returns. + * Use dynamic import() to load the full implementation. + * + * @param {NamedNode} subject - The RDF resource to render + * @param {Object} context - Contains session, dom, etc. + * @param {Object} options - Additional render options + * @returns {Promise} - The rendered pane + */ + render: async function (subject, context, options) { + try { + const mod = await import( + /* webpackChunkName: "bookmark-pane" */ + './render.js' + ) + return mod.render(subject, context, options) + } catch (e) { + console.error('Bookmark pane error:', e) + const div = document.createElement('div') + div.textContent = 'Error loading bookmark pane: ' + e.message + return div + } + }, + + /** + * MintNew - creates a new bookmark + * + * Called when user wants to create a new instance of this type. + * + * @param {Object} context - Contains session, dom, etc. + * @param {Object} options - Contains newBase (suggested URI base) + * @returns {Promise} - The newly created resource + */ + mintNew: async function (context, options) { + const { mintNew } = await import( + /* webpackChunkName: "bookmark-pane" */ + './render.js' + ) + return mintNew(context, options) + }, + + // RDF class this pane can create + mintClass: schema('Bookmark') +} + +// Also export as default for standalone use +export default bookmarkPane diff --git a/examples/bookmark-pane/render.js b/examples/bookmark-pane/render.js new file mode 100644 index 00000000..c70db26e --- /dev/null +++ b/examples/bookmark-pane/render.js @@ -0,0 +1,322 @@ +/** + * Bookmark Pane - Full Implementation + * + * This file is lazy-loaded only when the user views a bookmark. + * It contains all the heavy logic: UI rendering, RDF queries, updates. + */ +/* global confirm, alert */ + +import * as UI from 'solid-ui-jss' +import * as $rdf from 'rdflib' +import { store } from 'solid-logic-jss' + +const ns = UI.ns +const schema = $rdf.Namespace('http://schema.org/') +const dom = document + +/** + * Render a single bookmark + */ +function renderBookmark (subject, context, container) { + const kb = context.session.store + const div = dom.createElement('div') + div.className = 'bookmark-item' + + // Get bookmark properties + const name = kb.anyValue(subject, schema('name')) || 'Untitled' + const url = kb.any(subject, schema('url')) + const description = kb.anyValue(subject, schema('description')) + const dateCreated = kb.anyValue(subject, schema('dateCreated')) + + // Title + const title = dom.createElement('h3') + title.className = 'bookmark-title' + if (url) { + const link = dom.createElement('a') + link.href = url.uri || url.value + link.target = '_blank' + link.rel = 'noopener noreferrer' + link.textContent = name + title.appendChild(link) + } else { + title.textContent = name + } + div.appendChild(title) + + // URL display + if (url) { + const urlDiv = dom.createElement('div') + urlDiv.className = 'bookmark-url' + urlDiv.textContent = url.uri || url.value + div.appendChild(urlDiv) + } + + // Description + if (description) { + const desc = dom.createElement('p') + desc.className = 'bookmark-description' + desc.textContent = description + div.appendChild(desc) + } + + // Date + if (dateCreated) { + const date = dom.createElement('div') + date.className = 'bookmark-date' + date.textContent = 'Added: ' + new Date(dateCreated).toLocaleDateString() + div.appendChild(date) + } + + // Delete button (if user has write access) + const deleteBtn = dom.createElement('button') + deleteBtn.className = 'bookmark-delete' + deleteBtn.textContent = '×' + deleteBtn.title = 'Delete bookmark' + deleteBtn.onclick = async () => { + if (confirm('Delete this bookmark?')) { + try { + // Remove all triples about this bookmark + const triples = kb.statementsMatching(subject, null, null, subject.doc()) + await store.updater.update(triples, []) + div.remove() + } catch (e) { + alert('Failed to delete: ' + e.message) + } + } + } + div.appendChild(deleteBtn) + + return div +} + +/** + * Render the add bookmark form + */ +function renderAddForm (containerUri, context, onAdd) { + const form = dom.createElement('form') + form.className = 'bookmark-add-form' + + form.innerHTML = ` +

Add Bookmark

+ + + + + ` + + form.onsubmit = async (e) => { + e.preventDefault() + const formData = new FormData(form) + const name = formData.get('name') + const url = formData.get('url') + const description = formData.get('description') + + try { + // Generate unique ID + const id = 'bookmark-' + Date.now() + const bookmarkUri = containerUri + '#' + id + const subject = $rdf.sym(bookmarkUri) + const doc = $rdf.sym(containerUri) + + // Create triples + const ins = [ + $rdf.st(subject, ns.rdf('type'), schema('Bookmark'), doc), + $rdf.st(subject, schema('name'), name, doc), + $rdf.st(subject, schema('url'), $rdf.sym(url), doc), + $rdf.st(subject, schema('dateCreated'), new Date().toISOString(), doc) + ] + + if (description) { + ins.push($rdf.st(subject, schema('description'), description, doc)) + } + + await store.updater.update([], ins) + + // Clear form and refresh + form.reset() + if (onAdd) onAdd(subject) + } catch (e) { + alert('Failed to add bookmark: ' + e.message) + } + } + + return form +} + +/** + * Main render function + */ +export function render (subject, context, options) { + const kb = context.session.store + const div = dom.createElement('div') + div.className = 'bookmark-pane' + + // Add styles + const style = dom.createElement('style') + style.textContent = ` + .bookmark-pane { + padding: 1em; + font-family: system-ui, sans-serif; + } + .bookmark-item { + border: 1px solid #ddd; + border-radius: 8px; + padding: 1em; + margin-bottom: 1em; + position: relative; + background: #fafafa; + } + .bookmark-title { + margin: 0 0 0.5em 0; + font-size: 1.2em; + } + .bookmark-title a { + color: #0066cc; + text-decoration: none; + } + .bookmark-title a:hover { + text-decoration: underline; + } + .bookmark-url { + color: #666; + font-size: 0.9em; + margin-bottom: 0.5em; + } + .bookmark-description { + margin: 0.5em 0; + color: #333; + } + .bookmark-date { + font-size: 0.8em; + color: #999; + } + .bookmark-delete { + position: absolute; + top: 0.5em; + right: 0.5em; + background: #ff4444; + color: white; + border: none; + border-radius: 50%; + width: 24px; + height: 24px; + cursor: pointer; + font-size: 16px; + line-height: 1; + } + .bookmark-delete:hover { + background: #cc0000; + } + .bookmark-add-form { + border: 2px dashed #ccc; + border-radius: 8px; + padding: 1em; + margin-top: 1em; + } + .bookmark-add-form h4 { + margin: 0 0 1em 0; + } + .bookmark-add-form input, + .bookmark-add-form textarea { + display: block; + width: 100%; + padding: 0.5em; + margin-bottom: 0.5em; + border: 1px solid #ccc; + border-radius: 4px; + box-sizing: border-box; + } + .bookmark-add-form button { + background: #0066cc; + color: white; + border: none; + padding: 0.5em 1em; + border-radius: 4px; + cursor: pointer; + } + .bookmark-add-form button:hover { + background: #0055aa; + } + .bookmark-empty { + color: #666; + font-style: italic; + padding: 2em; + text-align: center; + } + ` + div.appendChild(style) + + // Header + const header = dom.createElement('h2') + header.textContent = '🔖 Bookmarks' + div.appendChild(header) + + // Check what we're rendering + const types = kb.findTypeURIs(subject) + const isContainer = types[ns.ldp('Container').uri] || types[ns.ldp('BasicContainer').uri] + const isBookmark = types[schema('Bookmark').uri] + + // Bookmark list container + const list = dom.createElement('div') + list.className = 'bookmark-list' + div.appendChild(list) + + if (isBookmark) { + // Single bookmark view + list.appendChild(renderBookmark(subject, context, list)) + } else if (isContainer) { + // Container with bookmarks + const contents = kb.each(subject, ns.ldp('contains')) + const bookmarks = contents.filter(item => { + const itemTypes = kb.findTypeURIs(item) + return itemTypes[schema('Bookmark').uri] + }) + + if (bookmarks.length === 0) { + const empty = dom.createElement('div') + empty.className = 'bookmark-empty' + empty.textContent = 'No bookmarks yet. Add one below!' + list.appendChild(empty) + } else { + bookmarks.forEach(bookmark => { + list.appendChild(renderBookmark(bookmark, context, list)) + }) + } + + // Add form for containers + const addForm = renderAddForm(subject.uri, context, (newBookmark) => { + // Remove empty message if present + const empty = list.querySelector('.bookmark-empty') + if (empty) empty.remove() + // Add new bookmark to list + list.appendChild(renderBookmark(newBookmark, context, list)) + }) + div.appendChild(addForm) + } + + return div +} + +/** + * Create a new bookmark resource + */ +export async function mintNew (context, options) { + const newBase = options.newBase || context.session.store.any(null, ns.space('preferencesFile'))?.uri + if (!newBase) { + throw new Error('No location specified for new bookmark') + } + + const bookmarkUri = newBase + 'bookmarks.ttl' + const subject = $rdf.sym(bookmarkUri + '#bookmark-' + Date.now()) + const doc = $rdf.sym(bookmarkUri) + + // Create minimal bookmark + const ins = [ + $rdf.st(subject, ns.rdf('type'), schema('Bookmark'), doc), + $rdf.st(subject, schema('name'), 'New Bookmark', doc), + $rdf.st(subject, schema('dateCreated'), new Date().toISOString(), doc) + ] + + await store.updater.update([], ins) + return subject +} diff --git a/jest.config.mjs b/jest.config.mjs index 804b7415..e463039f 100644 --- a/jest.config.mjs +++ b/jest.config.mjs @@ -8,9 +8,14 @@ export default { }, testPathIgnorePatterns: ['/node_modules/', '/dist/'], transform: { - '^.+\\.[tj]sx?$': ['babel-jest', { configFile: './babel.config.mjs' }], + '^.+\\.[tj]sx?$': ['babel-jest', { + presets: [ + ['@babel/preset-env', { targets: { node: 'current' } }], + '@babel/preset-typescript' + ] + }], }, - transformIgnorePatterns: ['/node_modules/(?!lit-html).+\\.js'], + transformIgnorePatterns: ['/node_modules/(?!(lit-html|solid-logic-jss)).+\\.js'], setupFilesAfterEnv: ['./test/helpers/setup.ts'], testMatch: ['**/?(*.)+(spec|test).[tj]s?(x)'], roots: ['/src', '/test'], diff --git a/package-lock.json b/package-lock.json index da338a51..748ccbe3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,25 +1,23 @@ { - "name": "solid-panes", - "version": "4.0.0", + "name": "solid-panes-jss", + "version": "4.0.4", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "solid-panes", - "version": "4.0.0", + "name": "solid-panes-jss", + "version": "4.0.4", "license": "MIT", "dependencies": { "@solid/better-simple-slideshow": "^0.1.0", - "activitystreams-pane": "^1.0.0", - "chat-pane": "^3.0.0", + "chat-pane-jss": "file:../chat-pane-jss", "contacts-pane": "^3.0.0", "dompurify": "^3.2.6", "folder-pane": "^3.0.0", "issue-pane": "^3.0.0", "marked": "^17.0.0", "meeting-pane": "^3.0.0", - "mime-types": "^3.0.1", - "pane-registry": "^3.0.0", + "pane-registry-jss": "file:../pane-registry-jss", "profile-pane": "^2.0.0", "solid-namespace": "^0.5.4", "source-pane": "^3.0.0" @@ -48,11 +46,11 @@ "neostandard": "^0.12.2", "node-polyfill-webpack-plugin": "^4.1.0", "path-browserify": "^1.0.1", - "rdflib": "^2.3.0", + "rdflib": "github:JavaScriptSolidServer/rdflib.js", "react": "^19.1.1", "react-dom": "^19.1.1", - "solid-logic": "^4.0.0", - "solid-ui": "^3.0.0", + "solid-logic-jss": "github:JavaScriptSolidServer/solid-logic-jss", + "solid-ui-jss": "github:JavaScriptSolidServer/solid-ui-jss", "ts-jest": "^29.4.1", "typescript": "^5.9.2", "webpack": "^5.101.0", @@ -60,6 +58,60 @@ "webpack-dev-server": "^5.2.2" } }, + "../chat-pane-jss": { + "version": "3.0.1", + "license": "MIT", + "devDependencies": { + "@babel/cli": "^7.26.4", + "@babel/core": "^7.28.0", + "@babel/preset-env": "^7.28.0", + "@babel/preset-typescript": "^7.27.1", + "@testing-library/dom": "^10.4.1", + "@testing-library/jest-dom": "^6.8.0", + "@types/jest": "^30.0.0", + "@typescript-eslint/parser": "^8.46.2", + "babel-jest": "^30.0.5", + "babel-loader": "^10.0.0", + "buffer": "^6.0.3", + "eslint": "^9.33.0", + "globals": "^17.0.0", + "html-webpack-plugin": "^5.6.3", + "jest": "^30.2.0", + "jest-environment-jsdom": "^30.0.5", + "jest-fetch-mock": "^3.0.3", + "neostandard": "^0.12.2", + "node-polyfill-webpack-plugin": "^4.1.0", + "pane-registry-jss": "file:../pane-registry-jss", + "rdflib": "^2.3.0", + "solid-logic-jss": "file:../solid-logic-jss", + "solid-ui-jss": "file:../solid-ui-jss", + "typescript": "^5.9.2", + "webpack": "^5.101.0", + "webpack-cli": "^6.0.1", + "webpack-dev-server": "^5.2.2" + }, + "peerDependencies": { + "rdflib": "^2.3.0", + "solid-logic-jss": "^2.0.0", + "solid-ui-jss": "^2.0.0" + } + }, + "../pane-registry-jss": { + "version": "3.0.1", + "license": "MIT", + "devDependencies": { + "eslint": "^9.32.0", + "globals": "^17.0.0", + "jest": "^30.2.0", + "neostandard": "^0.12.2", + "rdflib": "^2.3.0", + "solid-logic-jss": "file:../solid-logic-jss" + }, + "peerDependencies": { + "rdflib": "^2.3.0", + "solid-logic-jss": "^2.0.0" + } + }, "node_modules/@adobe/css-tools": { "version": "4.4.4", "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.4.4.tgz", @@ -89,9 +141,9 @@ "license": "ISC" }, "node_modules/@babel/cli": { - "version": "7.28.3", - "resolved": "https://registry.npmjs.org/@babel/cli/-/cli-7.28.3.tgz", - "integrity": "sha512-n1RU5vuCX0CsaqaXm9I0KUCNKNQMy5epmzl/xdSSm70bSqhg9GWhgeosypyQLc0bK24+Xpk1WGzZlI9pJtkZdg==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/cli/-/cli-7.28.6.tgz", + "integrity": "sha512-6EUNcuBbNkj08Oj4gAZ+BUU8yLCgKzgVX4gaTh09Ya2C8ICM4P+G30g4m3akRxSYAp3A/gnWchrNst7px4/nUQ==", "dev": true, "license": "MIT", "dependencies": { @@ -119,13 +171,13 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz", - "integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.28.6.tgz", + "integrity": "sha512-JYgintcMjRiCvS8mMECzaEn+m3PfoQiyqukOMCCVQtoJGYJw8j/8LBJEiqkHLkfwCcs74E3pbAUFNg7d9VNJ+Q==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-validator-identifier": "^7.27.1", + "@babel/helper-validator-identifier": "^7.28.5", "js-tokens": "^4.0.0", "picocolors": "^1.1.1" }, @@ -134,9 +186,9 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.28.5.tgz", - "integrity": "sha512-6uFXyCayocRbqhZOB+6XcuZbkMNimwfVGFji8CTZnCzOHVGvDqzvitu1re2AU5LROliz7eQPhB8CpAMvnx9EjA==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.28.6.tgz", + "integrity": "sha512-2lfu57JtzctfIrcGMz992hyLlByuzgIk58+hhGCxjKZ3rWI82NnVLjXcaTqkI2NvlcvOskZaiZ5kjUALo3Lpxg==", "dev": true, "license": "MIT", "engines": { @@ -144,22 +196,21 @@ } }, "node_modules/@babel/core": { - "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.28.5.tgz", - "integrity": "sha512-e7jT4DxYvIDLk1ZHmU/m/mB19rex9sv0c2ftBtjSBv+kVM/902eh0fINUzD7UwLLNR+jU585GxUJ8/EBfAM5fw==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.28.6.tgz", + "integrity": "sha512-H3mcG6ZDLTlYfaSNi0iOKkigqMFvkTKlGUYlD8GW7nNOYRrevuA46iTypPyv+06V3fEmvvazfntkBU34L0azAw==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { - "@babel/code-frame": "^7.27.1", - "@babel/generator": "^7.28.5", - "@babel/helper-compilation-targets": "^7.27.2", - "@babel/helper-module-transforms": "^7.28.3", - "@babel/helpers": "^7.28.4", - "@babel/parser": "^7.28.5", - "@babel/template": "^7.27.2", - "@babel/traverse": "^7.28.5", - "@babel/types": "^7.28.5", + "@babel/code-frame": "^7.28.6", + "@babel/generator": "^7.28.6", + "@babel/helper-compilation-targets": "^7.28.6", + "@babel/helper-module-transforms": "^7.28.6", + "@babel/helpers": "^7.28.6", + "@babel/parser": "^7.28.6", + "@babel/template": "^7.28.6", + "@babel/traverse": "^7.28.6", + "@babel/types": "^7.28.6", "@jridgewell/remapping": "^2.3.5", "convert-source-map": "^2.0.0", "debug": "^4.1.0", @@ -176,14 +227,14 @@ } }, "node_modules/@babel/generator": { - "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.28.5.tgz", - "integrity": "sha512-3EwLFhZ38J4VyIP6WNtt2kUdW9dokXA9Cr4IVIFHuCpZ3H8/YFOl5JjZHisrn1fATPBmKKqXzDFvh9fUwHz6CQ==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.28.6.tgz", + "integrity": "sha512-lOoVRwADj8hjf7al89tvQ2a1lf53Z+7tiXMgpZJL3maQPDxh0DgLMN62B2MKUOFcoodBHLMbDM6WAbKgNy5Suw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/parser": "^7.28.5", - "@babel/types": "^7.28.5", + "@babel/parser": "^7.28.6", + "@babel/types": "^7.28.6", "@jridgewell/gen-mapping": "^0.3.12", "@jridgewell/trace-mapping": "^0.3.28", "jsesc": "^3.0.2" @@ -206,13 +257,13 @@ } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.27.2", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.2.tgz", - "integrity": "sha512-2+1thGUUWWjLTYTHZWK1n8Yga0ijBz1XAhUXcKy81rd5g6yh7hGqMp45v7cadSbEHc9G3OTv45SyneRN3ps4DQ==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.28.6.tgz", + "integrity": "sha512-JYtls3hqi15fcx5GaSNL7SCTJ2MNmjrkHXg4FSpOA/grxK8KwyZ5bubHsCq8FXCkua6xhuaaBit+3b7+VZRfcA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/compat-data": "^7.27.2", + "@babel/compat-data": "^7.28.6", "@babel/helper-validator-option": "^7.27.1", "browserslist": "^4.24.0", "lru-cache": "^5.1.1", @@ -223,18 +274,18 @@ } }, "node_modules/@babel/helper-create-class-features-plugin": { - "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.28.5.tgz", - "integrity": "sha512-q3WC4JfdODypvxArsJQROfupPBq9+lMwjKq7C33GhbFYJsufD0yd/ziwD+hJucLeWsnFPWZjsU2DNFqBPE7jwQ==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.28.6.tgz", + "integrity": "sha512-dTOdvsjnG3xNT9Y0AUg1wAl38y+4Rl4sf9caSQZOXdNqVn+H+HbbJ4IyyHaIqNR6SW9oJpA/RuRjsjCw2IdIow==", "dev": true, "license": "MIT", "dependencies": { "@babel/helper-annotate-as-pure": "^7.27.3", "@babel/helper-member-expression-to-functions": "^7.28.5", "@babel/helper-optimise-call-expression": "^7.27.1", - "@babel/helper-replace-supers": "^7.27.1", + "@babel/helper-replace-supers": "^7.28.6", "@babel/helper-skip-transparent-expression-wrappers": "^7.27.1", - "@babel/traverse": "^7.28.5", + "@babel/traverse": "^7.28.6", "semver": "^6.3.1" }, "engines": { @@ -304,29 +355,29 @@ } }, "node_modules/@babel/helper-module-imports": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.27.1.tgz", - "integrity": "sha512-0gSFWUPNXNopqtIPQvlD5WgXYI5GY2kP2cCvoT8kczjbfcfuIljTbcWrulD1CIPIX2gt1wghbDy08yE1p+/r3w==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.28.6.tgz", + "integrity": "sha512-l5XkZK7r7wa9LucGw9LwZyyCUscb4x37JWTPz7swwFE/0FMQAGpiWUZn8u9DzkSBWEcK25jmvubfpw2dnAMdbw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/traverse": "^7.27.1", - "@babel/types": "^7.27.1" + "@babel/traverse": "^7.28.6", + "@babel/types": "^7.28.6" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.28.3", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.28.3.tgz", - "integrity": "sha512-gytXUbs8k2sXS9PnQptz5o0QnpLL51SwASIORY6XaBKF88nsOT0Zw9szLqlSGQDP/4TljBAD5y98p2U1fqkdsw==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.28.6.tgz", + "integrity": "sha512-67oXFAYr2cDLDVGLXTEABjdBJZ6drElUSI7WKp70NrpyISso3plG9SAGEF6y7zbha/wOzUByWWTJvEDVNIUGcA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-module-imports": "^7.27.1", - "@babel/helper-validator-identifier": "^7.27.1", - "@babel/traverse": "^7.28.3" + "@babel/helper-module-imports": "^7.28.6", + "@babel/helper-validator-identifier": "^7.28.5", + "@babel/traverse": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -349,9 +400,9 @@ } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.27.1.tgz", - "integrity": "sha512-1gn1Up5YXka3YYAHGKpbideQ5Yjf1tDa9qYcgysz+cNCXukyLl6DjPXhD3VRwSb8c0J9tA4b2+rHEZtc6R0tlw==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.28.6.tgz", + "integrity": "sha512-S9gzZ/bz83GRysI7gAD4wPT/AI3uCnY+9xn+Mx/KPs2JwHJIz1W8PZkg2cqyt3RNOBM8ejcXhV6y8Og7ly/Dug==", "dev": true, "license": "MIT", "engines": { @@ -377,15 +428,15 @@ } }, "node_modules/@babel/helper-replace-supers": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.27.1.tgz", - "integrity": "sha512-7EHz6qDZc8RYS5ElPoShMheWvEgERonFCs7IAonWLLUTXW59DP14bCZt89/GKyreYn8g3S83m21FelHKbeDCKA==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.28.6.tgz", + "integrity": "sha512-mq8e+laIk94/yFec3DxSjCRD2Z0TAjhVbEJY3UQrlwVo15Lmt7C2wAUbK4bjnTs4APkwsYLTahXRraQXhb1WCg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-member-expression-to-functions": "^7.27.1", + "@babel/helper-member-expression-to-functions": "^7.28.5", "@babel/helper-optimise-call-expression": "^7.27.1", - "@babel/traverse": "^7.27.1" + "@babel/traverse": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -439,42 +490,42 @@ } }, "node_modules/@babel/helper-wrap-function": { - "version": "7.28.3", - "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.28.3.tgz", - "integrity": "sha512-zdf983tNfLZFletc0RRXYrHrucBEg95NIFMkn6K9dbeMYnsgHaSBGcQqdsCSStG2PYwRre0Qc2NNSCXbG+xc6g==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.28.6.tgz", + "integrity": "sha512-z+PwLziMNBeSQJonizz2AGnndLsP2DeGHIxDAn+wdHOGuo4Fo1x1HBPPXeE9TAOPHNNWQKCSlA2VZyYyyibDnQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/template": "^7.27.2", - "@babel/traverse": "^7.28.3", - "@babel/types": "^7.28.2" + "@babel/template": "^7.28.6", + "@babel/traverse": "^7.28.6", + "@babel/types": "^7.28.6" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helpers": { - "version": "7.28.4", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.28.4.tgz", - "integrity": "sha512-HFN59MmQXGHVyYadKLVumYsA9dBFun/ldYxipEjzA4196jpLZd8UjEEBLkbEkvfYreDqJhZxYAWFPtrfhNpj4w==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.28.6.tgz", + "integrity": "sha512-xOBvwq86HHdB7WUDTfKfT/Vuxh7gElQ+Sfti2Cy6yIWNW05P8iUslOVcZ4/sKbE+/jQaukQAdz/gf3724kYdqw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/template": "^7.27.2", - "@babel/types": "^7.28.4" + "@babel/template": "^7.28.6", + "@babel/types": "^7.28.6" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/parser": { - "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.5.tgz", - "integrity": "sha512-KKBU1VGYR7ORr3At5HAtUQ+TV3SzRCXmA/8OdDZiLDBIZxVyzXuztPjfLd3BV1PRAQGCMWWSHYhL0F8d5uHBDQ==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.6.tgz", + "integrity": "sha512-TeR9zWR18BvbfPmGbLampPMW+uW1NZnJlRuuHso8i87QZNq2JRF9i6RgxRqtEq+wQGsS19NNTWr2duhnE49mfQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.28.5" + "@babel/types": "^7.28.6" }, "bin": { "parser": "bin/babel-parser.js" @@ -551,14 +602,14 @@ } }, "node_modules/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": { - "version": "7.28.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/-/plugin-bugfix-v8-static-class-fields-redefine-readonly-7.28.3.tgz", - "integrity": "sha512-b6YTX108evsvE4YgWyQ921ZAFFQm3Bn+CA3+ZXlNVnPhx+UfsVURoPjfGAPCjBgrqo30yX/C2nZGX96DxvR9Iw==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/-/plugin-bugfix-v8-static-class-fields-redefine-readonly-7.28.6.tgz", + "integrity": "sha512-a0aBScVTlNaiUe35UtfxAN7A/tehvvG4/ByO6+46VPKTRSlfnAFsgKy0FUh+qAkQrDTmhDkT+IBOKlOoMUxQ0g==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.27.1", - "@babel/traverse": "^7.28.3" + "@babel/helper-plugin-utils": "^7.28.6", + "@babel/traverse": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -636,13 +687,13 @@ } }, "node_modules/@babel/plugin-syntax-import-assertions": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.27.1.tgz", - "integrity": "sha512-UT/Jrhw57xg4ILHLFnzFpPDlMbcdEicaAtjPQpbj9wa8T4r5KVWCimHcL/460g8Ht0DMxDyjsLgiWSkVjnwPFg==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.28.6.tgz", + "integrity": "sha512-pSJUpFHdx9z5nqTSirOCMtYVP2wFgoWhP0p3g8ONK/4IHhLIBd0B9NYqAvIUAhq+OkhO4VM1tENCt0cjlsNShw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.27.1" + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -652,13 +703,13 @@ } }, "node_modules/@babel/plugin-syntax-import-attributes": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.27.1.tgz", - "integrity": "sha512-oFT0FrKHgF53f4vOsZGi2Hh3I35PfSmVs4IBFLFj4dnafP+hIWDLg3VyKmUHfLoLHlyxY4C7DGtmHuJgn+IGww==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.28.6.tgz", + "integrity": "sha512-jiLC0ma9XkQT3TKJ9uYvlakm66Pamywo+qwL+oL8HJOvc6TWdZXVfhqJr8CCzbSGUAbDOzlGHJC1U+vRfLQDvw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.27.1" + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -694,13 +745,13 @@ } }, "node_modules/@babel/plugin-syntax-jsx": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.27.1.tgz", - "integrity": "sha512-y8YTNIeKoyhGd9O0Jiyzyyqk8gdjnumGTQPsz0xOZOQ2RmkVJeZ1vmmfIvFEKqucBG6axJGBZDE/7iI5suUI/w==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.28.6.tgz", + "integrity": "sha512-wgEmr06G6sIpqr8YDwA2dSRTE3bJ+V0IfpzfSY3Lfgd7YWOaAdlykvJi13ZKBt8cZHfgH1IXN+CL656W3uUa4w==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.27.1" + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -820,13 +871,13 @@ } }, "node_modules/@babel/plugin-syntax-typescript": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.27.1.tgz", - "integrity": "sha512-xfYCBMxveHrRMnAWl1ZlPXOZjzkN82THFvLhQhFXFt81Z5HnN+EtUkZhv/zcKpmT3fzmWZB0ywiBrbC3vogbwQ==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.28.6.tgz", + "integrity": "sha512-+nDNmQye7nlnuuHDboPbGm00Vqg3oO8niRRL27/4LYHUsHYh0zJ1xWOz0uRwNFmM1Avzk8wZbc6rdiYhomzv/A==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.27.1" + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -869,15 +920,15 @@ } }, "node_modules/@babel/plugin-transform-async-generator-functions": { - "version": "7.28.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.28.0.tgz", - "integrity": "sha512-BEOdvX4+M765icNPZeidyADIvQ1m1gmunXufXxvRESy/jNNyfovIqUyE7MVgGBjWktCoJlzvFA1To2O4ymIO3Q==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.28.6.tgz", + "integrity": "sha512-9knsChgsMzBV5Yh3kkhrZNxH3oCYAfMBkNNaVN4cP2RVlFPe8wYdwwcnOsAbkdDoV9UjFtOXWrWB52M8W4jNeA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.27.1", + "@babel/helper-plugin-utils": "^7.28.6", "@babel/helper-remap-async-to-generator": "^7.27.1", - "@babel/traverse": "^7.28.0" + "@babel/traverse": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -887,14 +938,14 @@ } }, "node_modules/@babel/plugin-transform-async-to-generator": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.27.1.tgz", - "integrity": "sha512-NREkZsZVJS4xmTr8qzE5y8AfIPqsdQfRuUiLRTEzb7Qii8iFWCyDKaUV2c0rCuh4ljDZ98ALHP/PetiBV2nddA==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.28.6.tgz", + "integrity": "sha512-ilTRcmbuXjsMmcZ3HASTe4caH5Tpo93PkTxF9oG2VZsSWsahydmcEHhix9Ik122RcTnZnUzPbmux4wh1swfv7g==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-module-imports": "^7.27.1", - "@babel/helper-plugin-utils": "^7.27.1", + "@babel/helper-module-imports": "^7.28.6", + "@babel/helper-plugin-utils": "^7.28.6", "@babel/helper-remap-async-to-generator": "^7.27.1" }, "engines": { @@ -921,13 +972,13 @@ } }, "node_modules/@babel/plugin-transform-block-scoping": { - "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.28.5.tgz", - "integrity": "sha512-45DmULpySVvmq9Pj3X9B+62Xe+DJGov27QravQJU1LLcapR6/10i+gYVAucGGJpHBp5mYxIMK4nDAT/QDLr47g==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.28.6.tgz", + "integrity": "sha512-tt/7wOtBmwHPNMPu7ax4pdPz6shjFrmHDghvNC+FG9Qvj7D6mJcoRQIF5dy4njmxR941l6rgtvfSB2zX3VlUIw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.27.1" + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -937,14 +988,14 @@ } }, "node_modules/@babel/plugin-transform-class-properties": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.27.1.tgz", - "integrity": "sha512-D0VcalChDMtuRvJIu3U/fwWjf8ZMykz5iZsg77Nuj821vCKI3zCyRLwRdWbsuJ/uRwZhZ002QtCqIkwC/ZkvbA==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.28.6.tgz", + "integrity": "sha512-dY2wS3I2G7D697VHndN91TJr8/AAfXQNt5ynCTI/MpxMsSzHp+52uNivYT5wCPax3whc47DR8Ba7cmlQMg24bw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.27.1", - "@babel/helper-plugin-utils": "^7.27.1" + "@babel/helper-create-class-features-plugin": "^7.28.6", + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -954,14 +1005,14 @@ } }, "node_modules/@babel/plugin-transform-class-static-block": { - "version": "7.28.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.28.3.tgz", - "integrity": "sha512-LtPXlBbRoc4Njl/oh1CeD/3jC+atytbnf/UqLoqTDcEYGUPj022+rvfkbDYieUrSj3CaV4yHDByPE+T2HwfsJg==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.28.6.tgz", + "integrity": "sha512-rfQ++ghVwTWTqQ7w8qyDxL1XGihjBss4CmTgGRCTAC9RIbhVpyp4fOeZtta0Lbf+dTNIVJer6ych2ibHwkZqsQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.28.3", - "@babel/helper-plugin-utils": "^7.27.1" + "@babel/helper-create-class-features-plugin": "^7.28.6", + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -971,18 +1022,18 @@ } }, "node_modules/@babel/plugin-transform-classes": { - "version": "7.28.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.28.4.tgz", - "integrity": "sha512-cFOlhIYPBv/iBoc+KS3M6et2XPtbT2HiCRfBXWtfpc9OAyostldxIf9YAYB6ypURBBbx+Qv6nyrLzASfJe+hBA==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.28.6.tgz", + "integrity": "sha512-EF5KONAqC5zAqT783iMGuM2ZtmEBy+mJMOKl2BCvPZ2lVrwvXnB6o+OBWCS+CoeCCpVRF2sA2RBKUxvT8tQT5Q==", "dev": true, "license": "MIT", "dependencies": { "@babel/helper-annotate-as-pure": "^7.27.3", - "@babel/helper-compilation-targets": "^7.27.2", + "@babel/helper-compilation-targets": "^7.28.6", "@babel/helper-globals": "^7.28.0", - "@babel/helper-plugin-utils": "^7.27.1", - "@babel/helper-replace-supers": "^7.27.1", - "@babel/traverse": "^7.28.4" + "@babel/helper-plugin-utils": "^7.28.6", + "@babel/helper-replace-supers": "^7.28.6", + "@babel/traverse": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -992,14 +1043,14 @@ } }, "node_modules/@babel/plugin-transform-computed-properties": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.27.1.tgz", - "integrity": "sha512-lj9PGWvMTVksbWiDT2tW68zGS/cyo4AkZ/QTp0sQT0mjPopCmrSkzxeXkznjqBxzDI6TclZhOJbBmbBLjuOZUw==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.28.6.tgz", + "integrity": "sha512-bcc3k0ijhHbc2lEfpFHgx7eYw9KNXqOerKWfzbxEHUGKnS3sz9C4CNL9OiFN1297bDNfUiSO7DaLzbvHQQQ1BQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.27.1", - "@babel/template": "^7.27.1" + "@babel/helper-plugin-utils": "^7.28.6", + "@babel/template": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -1026,14 +1077,14 @@ } }, "node_modules/@babel/plugin-transform-dotall-regex": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.27.1.tgz", - "integrity": "sha512-gEbkDVGRvjj7+T1ivxrfgygpT7GUd4vmODtYpbs0gZATdkX8/iSnOtZSxiZnsgm1YjTgjI6VKBGSJJevkrclzw==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.28.6.tgz", + "integrity": "sha512-SljjowuNKB7q5Oayv4FoPzeB74g3QgLt8IVJw9ADvWy3QnUb/01aw8I4AVv8wYnPvQz2GDDZ/g3GhcNyDBI4Bg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.27.1", - "@babel/helper-plugin-utils": "^7.27.1" + "@babel/helper-create-regexp-features-plugin": "^7.28.5", + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -1059,14 +1110,14 @@ } }, "node_modules/@babel/plugin-transform-duplicate-named-capturing-groups-regex": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-named-capturing-groups-regex/-/plugin-transform-duplicate-named-capturing-groups-regex-7.27.1.tgz", - "integrity": "sha512-hkGcueTEzuhB30B3eJCbCYeCaaEQOmQR0AdvzpD4LoN0GXMWzzGSuRrxR2xTnCrvNbVwK9N6/jQ92GSLfiZWoQ==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-named-capturing-groups-regex/-/plugin-transform-duplicate-named-capturing-groups-regex-7.28.6.tgz", + "integrity": "sha512-5suVoXjC14lUN6ZL9OLKIHCNVWCrqGqlmEp/ixdXjvgnEl/kauLvvMO/Xw9NyMc95Joj1AeLVPVMvibBgSoFlA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.27.1", - "@babel/helper-plugin-utils": "^7.27.1" + "@babel/helper-create-regexp-features-plugin": "^7.28.5", + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -1092,14 +1143,14 @@ } }, "node_modules/@babel/plugin-transform-explicit-resource-management": { - "version": "7.28.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-explicit-resource-management/-/plugin-transform-explicit-resource-management-7.28.0.tgz", - "integrity": "sha512-K8nhUcn3f6iB+P3gwCv/no7OdzOZQcKchW6N389V6PD8NUWKZHzndOd9sPDVbMoBsbmjMqlB4L9fm+fEFNVlwQ==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-explicit-resource-management/-/plugin-transform-explicit-resource-management-7.28.6.tgz", + "integrity": "sha512-Iao5Konzx2b6g7EPqTy40UZbcdXE126tTxVFr/nAIj+WItNxjKSYTEw3RC+A2/ZetmdJsgueL1KhaMCQHkLPIg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.27.1", - "@babel/plugin-transform-destructuring": "^7.28.0" + "@babel/helper-plugin-utils": "^7.28.6", + "@babel/plugin-transform-destructuring": "^7.28.5" }, "engines": { "node": ">=6.9.0" @@ -1109,13 +1160,13 @@ } }, "node_modules/@babel/plugin-transform-exponentiation-operator": { - "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.28.5.tgz", - "integrity": "sha512-D4WIMaFtwa2NizOp+dnoFjRez/ClKiC2BqqImwKd1X28nqBtZEyCYJ2ozQrrzlxAFrcrjxo39S6khe9RNDlGzw==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.28.6.tgz", + "integrity": "sha512-WitabqiGjV/vJ0aPOLSFfNY1u9U3R7W36B03r5I2KoNix+a3sOhJ3pKFB3R5It9/UiK78NiO0KE9P21cMhlPkw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.27.1" + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -1176,13 +1227,13 @@ } }, "node_modules/@babel/plugin-transform-json-strings": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.27.1.tgz", - "integrity": "sha512-6WVLVJiTjqcQauBhn1LkICsR2H+zm62I3h9faTDKt1qP4jn2o72tSvqMwtGFKGTpojce0gJs+76eZ2uCHRZh0Q==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.28.6.tgz", + "integrity": "sha512-Nr+hEN+0geQkzhbdgQVPoqr47lZbm+5fCUmO70722xJZd0Mvb59+33QLImGj6F+DkK3xgDi1YVysP8whD6FQAw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.27.1" + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -1208,13 +1259,13 @@ } }, "node_modules/@babel/plugin-transform-logical-assignment-operators": { - "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.28.5.tgz", - "integrity": "sha512-axUuqnUTBuXyHGcJEVVh9pORaN6wC5bYfE7FGzPiaWa3syib9m7g+/IT/4VgCOe2Upef43PHzeAvcrVek6QuuA==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.28.6.tgz", + "integrity": "sha512-+anKKair6gpi8VsM/95kmomGNMD0eLz1NQ8+Pfw5sAwWH9fGYXT50E55ZpV0pHUHWf6IUTWPM+f/7AAff+wr9A==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.27.1" + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -1257,14 +1308,14 @@ } }, "node_modules/@babel/plugin-transform-modules-commonjs": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.27.1.tgz", - "integrity": "sha512-OJguuwlTYlN0gBZFRPqwOGNWssZjfIUdS7HMYtN8c1KmwpwHFBwTeFZrg9XZa+DFTitWOW5iTAG7tyCUPsCCyw==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.28.6.tgz", + "integrity": "sha512-jppVbf8IV9iWWwWTQIxJMAJCWBuuKx71475wHwYytrRGQ2CWiDvYlADQno3tcYpS/T2UUWFQp3nVtYfK/YBQrA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-module-transforms": "^7.27.1", - "@babel/helper-plugin-utils": "^7.27.1" + "@babel/helper-module-transforms": "^7.28.6", + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -1343,13 +1394,13 @@ } }, "node_modules/@babel/plugin-transform-nullish-coalescing-operator": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.27.1.tgz", - "integrity": "sha512-aGZh6xMo6q9vq1JGcw58lZ1Z0+i0xB2x0XaauNIUXd6O1xXc3RwoWEBlsTQrY4KQ9Jf0s5rgD6SiNkaUdJegTA==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.28.6.tgz", + "integrity": "sha512-3wKbRgmzYbw24mDJXT7N+ADXw8BC/imU9yo9c9X9NKaLF1fW+e5H1U5QjMUBe4Qo4Ox/o++IyUkl1sVCLgevKg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.27.1" + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -1359,13 +1410,13 @@ } }, "node_modules/@babel/plugin-transform-numeric-separator": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.27.1.tgz", - "integrity": "sha512-fdPKAcujuvEChxDBJ5c+0BTaS6revLV7CJL08e4m3de8qJfNIuCc2nc7XJYOjBoTMJeqSmwXJ0ypE14RCjLwaw==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.28.6.tgz", + "integrity": "sha512-SJR8hPynj8outz+SlStQSwvziMN4+Bq99it4tMIf5/Caq+3iOc0JtKyse8puvyXkk3eFRIA5ID/XfunGgO5i6w==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.27.1" + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -1375,17 +1426,17 @@ } }, "node_modules/@babel/plugin-transform-object-rest-spread": { - "version": "7.28.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.28.4.tgz", - "integrity": "sha512-373KA2HQzKhQCYiRVIRr+3MjpCObqzDlyrM6u4I201wL8Mp2wHf7uB8GhDwis03k2ti8Zr65Zyyqs1xOxUF/Ew==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.28.6.tgz", + "integrity": "sha512-5rh+JR4JBC4pGkXLAcYdLHZjXudVxWMXbB6u6+E9lRL5TrGVbHt1TjxGbZ8CkmYw9zjkB7jutzOROArsqtncEA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-compilation-targets": "^7.27.2", - "@babel/helper-plugin-utils": "^7.27.1", - "@babel/plugin-transform-destructuring": "^7.28.0", + "@babel/helper-compilation-targets": "^7.28.6", + "@babel/helper-plugin-utils": "^7.28.6", + "@babel/plugin-transform-destructuring": "^7.28.5", "@babel/plugin-transform-parameters": "^7.27.7", - "@babel/traverse": "^7.28.4" + "@babel/traverse": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -1412,13 +1463,13 @@ } }, "node_modules/@babel/plugin-transform-optional-catch-binding": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.27.1.tgz", - "integrity": "sha512-txEAEKzYrHEX4xSZN4kJ+OfKXFVSWKB2ZxM9dpcE3wT7smwkNmXo5ORRlVzMVdJbD+Q8ILTgSD7959uj+3Dm3Q==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.28.6.tgz", + "integrity": "sha512-R8ja/Pyrv0OGAvAXQhSTmWyPJPml+0TMqXlO5w+AsMEiwb2fg3WkOvob7UxFSL3OIttFSGSRFKQsOhJ/X6HQdQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.27.1" + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -1428,13 +1479,13 @@ } }, "node_modules/@babel/plugin-transform-optional-chaining": { - "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.28.5.tgz", - "integrity": "sha512-N6fut9IZlPnjPwgiQkXNhb+cT8wQKFlJNqcZkWlcTqkcqx6/kU4ynGmLFoa4LViBSirn05YAwk+sQBbPfxtYzQ==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.28.6.tgz", + "integrity": "sha512-A4zobikRGJTsX9uqVFdafzGkqD30t26ck2LmOzAuLL8b2x6k3TIqRiT2xVvA9fNmFeTX484VpsdgmKNA0bS23w==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.27.1", + "@babel/helper-plugin-utils": "^7.28.6", "@babel/helper-skip-transparent-expression-wrappers": "^7.27.1" }, "engines": { @@ -1461,14 +1512,14 @@ } }, "node_modules/@babel/plugin-transform-private-methods": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.27.1.tgz", - "integrity": "sha512-10FVt+X55AjRAYI9BrdISN9/AQWHqldOeZDUoLyif1Kn05a56xVBXb8ZouL8pZ9jem8QpXaOt8TS7RHUIS+GPA==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.28.6.tgz", + "integrity": "sha512-piiuapX9CRv7+0st8lmuUlRSmX6mBcVeNQ1b4AYzJxfCMuBfB0vBXDiGSmm03pKJw1v6cZ8KSeM+oUnM6yAExg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.27.1", - "@babel/helper-plugin-utils": "^7.27.1" + "@babel/helper-create-class-features-plugin": "^7.28.6", + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -1478,15 +1529,15 @@ } }, "node_modules/@babel/plugin-transform-private-property-in-object": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.27.1.tgz", - "integrity": "sha512-5J+IhqTi1XPa0DXF83jYOaARrX+41gOewWbkPyjMNRDqgOCqdffGh8L3f/Ek5utaEBZExjSAzcyjmV9SSAWObQ==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.28.6.tgz", + "integrity": "sha512-b97jvNSOb5+ehyQmBpmhOCiUC5oVK4PMnpRvO7+ymFBoqYjeDHIU9jnrNUuwHOiL9RpGDoKBpSViarV+BU+eVA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-annotate-as-pure": "^7.27.1", - "@babel/helper-create-class-features-plugin": "^7.27.1", - "@babel/helper-plugin-utils": "^7.27.1" + "@babel/helper-annotate-as-pure": "^7.27.3", + "@babel/helper-create-class-features-plugin": "^7.28.6", + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -1512,13 +1563,13 @@ } }, "node_modules/@babel/plugin-transform-regenerator": { - "version": "7.28.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.28.4.tgz", - "integrity": "sha512-+ZEdQlBoRg9m2NnzvEeLgtvBMO4tkFBw5SQIUgLICgTrumLoU7lr+Oghi6km2PFj+dbUt2u1oby2w3BDO9YQnA==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.28.6.tgz", + "integrity": "sha512-eZhoEZHYQLL5uc1gS5e9/oTknS0sSSAtd5TkKMUp3J+S/CaUjagc0kOUPsEbDmMeva0nC3WWl4SxVY6+OBuxfw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.27.1" + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -1528,14 +1579,14 @@ } }, "node_modules/@babel/plugin-transform-regexp-modifiers": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regexp-modifiers/-/plugin-transform-regexp-modifiers-7.27.1.tgz", - "integrity": "sha512-TtEciroaiODtXvLZv4rmfMhkCv8jx3wgKpL68PuiPh2M4fvz5jhsA7697N1gMvkvr/JTF13DrFYyEbY9U7cVPA==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regexp-modifiers/-/plugin-transform-regexp-modifiers-7.28.6.tgz", + "integrity": "sha512-QGWAepm9qxpaIs7UM9FvUSnCGlb8Ua1RhyM4/veAxLwt3gMat/LSGrZixyuj4I6+Kn9iwvqCyPTtbdxanYoWYg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.27.1", - "@babel/helper-plugin-utils": "^7.27.1" + "@babel/helper-create-regexp-features-plugin": "^7.28.5", + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -1577,13 +1628,13 @@ } }, "node_modules/@babel/plugin-transform-spread": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.27.1.tgz", - "integrity": "sha512-kpb3HUqaILBJcRFVhFUs6Trdd4mkrzcGXss+6/mxUd273PfbWqSDHRzMT2234gIg2QYfAjvXLSquP1xECSg09Q==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.28.6.tgz", + "integrity": "sha512-9U4QObUC0FtJl05AsUcodau/RWDytrU6uKgkxu09mLR9HLDAtUMoPuuskm5huQsoktmsYpI+bGmq+iapDcriKA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.27.1", + "@babel/helper-plugin-utils": "^7.28.6", "@babel/helper-skip-transparent-expression-wrappers": "^7.27.1" }, "engines": { @@ -1642,17 +1693,17 @@ } }, "node_modules/@babel/plugin-transform-typescript": { - "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.28.5.tgz", - "integrity": "sha512-x2Qa+v/CuEoX7Dr31iAfr0IhInrVOWZU/2vJMJ00FOR/2nM0BcBEclpaf9sWCDc+v5e9dMrhSH8/atq/kX7+bA==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.28.6.tgz", + "integrity": "sha512-0YWL2RFxOqEm9Efk5PvreamxPME8OyY0wM5wh5lHjF+VtVhdneCWGzZeSqzOfiobVqQaNCd2z0tQvnI9DaPWPw==", "dev": true, "license": "MIT", "dependencies": { "@babel/helper-annotate-as-pure": "^7.27.3", - "@babel/helper-create-class-features-plugin": "^7.28.5", - "@babel/helper-plugin-utils": "^7.27.1", + "@babel/helper-create-class-features-plugin": "^7.28.6", + "@babel/helper-plugin-utils": "^7.28.6", "@babel/helper-skip-transparent-expression-wrappers": "^7.27.1", - "@babel/plugin-syntax-typescript": "^7.27.1" + "@babel/plugin-syntax-typescript": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -1678,14 +1729,14 @@ } }, "node_modules/@babel/plugin-transform-unicode-property-regex": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-property-regex/-/plugin-transform-unicode-property-regex-7.27.1.tgz", - "integrity": "sha512-uW20S39PnaTImxp39O5qFlHLS9LJEmANjMG7SxIhap8rCHqu0Ik+tLEPX5DKmHn6CsWQ7j3lix2tFOa5YtL12Q==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-property-regex/-/plugin-transform-unicode-property-regex-7.28.6.tgz", + "integrity": "sha512-4Wlbdl/sIZjzi/8St0evF0gEZrgOswVO6aOzqxh1kDZOl9WmLrHq2HtGhnOJZmHZYKP8WZ1MDLCt5DAWwRo57A==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.27.1", - "@babel/helper-plugin-utils": "^7.27.1" + "@babel/helper-create-regexp-features-plugin": "^7.28.5", + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -1712,14 +1763,14 @@ } }, "node_modules/@babel/plugin-transform-unicode-sets-regex": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.27.1.tgz", - "integrity": "sha512-EtkOujbc4cgvb0mlpQefi4NTPBzhSIevblFevACNLUspmrALgmEBdL/XfnyyITfd8fKBZrZys92zOWcik7j9Tw==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.28.6.tgz", + "integrity": "sha512-/wHc/paTUmsDYN7SZkpWxogTOBNnlx7nBQYfy6JJlCT7G3mVhltk3e++N7zV0XfgGsrqBxd4rJQt9H16I21Y1Q==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.27.1", - "@babel/helper-plugin-utils": "^7.27.1" + "@babel/helper-create-regexp-features-plugin": "^7.28.5", + "@babel/helper-plugin-utils": "^7.28.6" }, "engines": { "node": ">=6.9.0" @@ -1729,76 +1780,76 @@ } }, "node_modules/@babel/preset-env": { - "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.28.5.tgz", - "integrity": "sha512-S36mOoi1Sb6Fz98fBfE+UZSpYw5mJm0NUHtIKrOuNcqeFauy1J6dIvXm2KRVKobOSaGq4t/hBXdN4HGU3wL9Wg==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.28.6.tgz", + "integrity": "sha512-GaTI4nXDrs7l0qaJ6Rg06dtOXTBCG6TMDB44zbqofCIC4PqC7SEvmFFtpxzCDw9W5aJ7RKVshgXTLvLdBFV/qw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/compat-data": "^7.28.5", - "@babel/helper-compilation-targets": "^7.27.2", - "@babel/helper-plugin-utils": "^7.27.1", + "@babel/compat-data": "^7.28.6", + "@babel/helper-compilation-targets": "^7.28.6", + "@babel/helper-plugin-utils": "^7.28.6", "@babel/helper-validator-option": "^7.27.1", "@babel/plugin-bugfix-firefox-class-in-computed-class-key": "^7.28.5", "@babel/plugin-bugfix-safari-class-field-initializer-scope": "^7.27.1", "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.27.1", "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.27.1", - "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "^7.28.3", + "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "^7.28.6", "@babel/plugin-proposal-private-property-in-object": "7.21.0-placeholder-for-preset-env.2", - "@babel/plugin-syntax-import-assertions": "^7.27.1", - "@babel/plugin-syntax-import-attributes": "^7.27.1", + "@babel/plugin-syntax-import-assertions": "^7.28.6", + "@babel/plugin-syntax-import-attributes": "^7.28.6", "@babel/plugin-syntax-unicode-sets-regex": "^7.18.6", "@babel/plugin-transform-arrow-functions": "^7.27.1", - "@babel/plugin-transform-async-generator-functions": "^7.28.0", - "@babel/plugin-transform-async-to-generator": "^7.27.1", + "@babel/plugin-transform-async-generator-functions": "^7.28.6", + "@babel/plugin-transform-async-to-generator": "^7.28.6", "@babel/plugin-transform-block-scoped-functions": "^7.27.1", - "@babel/plugin-transform-block-scoping": "^7.28.5", - "@babel/plugin-transform-class-properties": "^7.27.1", - "@babel/plugin-transform-class-static-block": "^7.28.3", - "@babel/plugin-transform-classes": "^7.28.4", - "@babel/plugin-transform-computed-properties": "^7.27.1", + "@babel/plugin-transform-block-scoping": "^7.28.6", + "@babel/plugin-transform-class-properties": "^7.28.6", + "@babel/plugin-transform-class-static-block": "^7.28.6", + "@babel/plugin-transform-classes": "^7.28.6", + "@babel/plugin-transform-computed-properties": "^7.28.6", "@babel/plugin-transform-destructuring": "^7.28.5", - "@babel/plugin-transform-dotall-regex": "^7.27.1", + "@babel/plugin-transform-dotall-regex": "^7.28.6", "@babel/plugin-transform-duplicate-keys": "^7.27.1", - "@babel/plugin-transform-duplicate-named-capturing-groups-regex": "^7.27.1", + "@babel/plugin-transform-duplicate-named-capturing-groups-regex": "^7.28.6", "@babel/plugin-transform-dynamic-import": "^7.27.1", - "@babel/plugin-transform-explicit-resource-management": "^7.28.0", - "@babel/plugin-transform-exponentiation-operator": "^7.28.5", + "@babel/plugin-transform-explicit-resource-management": "^7.28.6", + "@babel/plugin-transform-exponentiation-operator": "^7.28.6", "@babel/plugin-transform-export-namespace-from": "^7.27.1", "@babel/plugin-transform-for-of": "^7.27.1", "@babel/plugin-transform-function-name": "^7.27.1", - "@babel/plugin-transform-json-strings": "^7.27.1", + "@babel/plugin-transform-json-strings": "^7.28.6", "@babel/plugin-transform-literals": "^7.27.1", - "@babel/plugin-transform-logical-assignment-operators": "^7.28.5", + "@babel/plugin-transform-logical-assignment-operators": "^7.28.6", "@babel/plugin-transform-member-expression-literals": "^7.27.1", "@babel/plugin-transform-modules-amd": "^7.27.1", - "@babel/plugin-transform-modules-commonjs": "^7.27.1", + "@babel/plugin-transform-modules-commonjs": "^7.28.6", "@babel/plugin-transform-modules-systemjs": "^7.28.5", "@babel/plugin-transform-modules-umd": "^7.27.1", "@babel/plugin-transform-named-capturing-groups-regex": "^7.27.1", "@babel/plugin-transform-new-target": "^7.27.1", - "@babel/plugin-transform-nullish-coalescing-operator": "^7.27.1", - "@babel/plugin-transform-numeric-separator": "^7.27.1", - "@babel/plugin-transform-object-rest-spread": "^7.28.4", + "@babel/plugin-transform-nullish-coalescing-operator": "^7.28.6", + "@babel/plugin-transform-numeric-separator": "^7.28.6", + "@babel/plugin-transform-object-rest-spread": "^7.28.6", "@babel/plugin-transform-object-super": "^7.27.1", - "@babel/plugin-transform-optional-catch-binding": "^7.27.1", - "@babel/plugin-transform-optional-chaining": "^7.28.5", + "@babel/plugin-transform-optional-catch-binding": "^7.28.6", + "@babel/plugin-transform-optional-chaining": "^7.28.6", "@babel/plugin-transform-parameters": "^7.27.7", - "@babel/plugin-transform-private-methods": "^7.27.1", - "@babel/plugin-transform-private-property-in-object": "^7.27.1", + "@babel/plugin-transform-private-methods": "^7.28.6", + "@babel/plugin-transform-private-property-in-object": "^7.28.6", "@babel/plugin-transform-property-literals": "^7.27.1", - "@babel/plugin-transform-regenerator": "^7.28.4", - "@babel/plugin-transform-regexp-modifiers": "^7.27.1", + "@babel/plugin-transform-regenerator": "^7.28.6", + "@babel/plugin-transform-regexp-modifiers": "^7.28.6", "@babel/plugin-transform-reserved-words": "^7.27.1", "@babel/plugin-transform-shorthand-properties": "^7.27.1", - "@babel/plugin-transform-spread": "^7.27.1", + "@babel/plugin-transform-spread": "^7.28.6", "@babel/plugin-transform-sticky-regex": "^7.27.1", "@babel/plugin-transform-template-literals": "^7.27.1", "@babel/plugin-transform-typeof-symbol": "^7.27.1", "@babel/plugin-transform-unicode-escapes": "^7.27.1", - "@babel/plugin-transform-unicode-property-regex": "^7.27.1", + "@babel/plugin-transform-unicode-property-regex": "^7.28.6", "@babel/plugin-transform-unicode-regex": "^7.27.1", - "@babel/plugin-transform-unicode-sets-regex": "^7.27.1", + "@babel/plugin-transform-unicode-sets-regex": "^7.28.6", "@babel/preset-modules": "0.1.6-no-external-plugins", "babel-plugin-polyfill-corejs2": "^0.4.14", "babel-plugin-polyfill-corejs3": "^0.13.0", @@ -1849,42 +1900,42 @@ } }, "node_modules/@babel/runtime": { - "version": "7.28.4", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.28.4.tgz", - "integrity": "sha512-Q/N6JNWvIvPnLDvjlE1OUBLPQHH6l3CltCEsHIujp45zQUSSh8K+gHnaEX45yAT1nyngnINhvWtzN+Nb9D8RAQ==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.28.6.tgz", + "integrity": "sha512-05WQkdpL9COIMz4LjTxGpPNCdlpyimKppYNoJ5Di5EUObifl8t4tuLuUBBZEpoLYOmfvIWrsp9fCl0HoPRVTdA==", "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/template": { - "version": "7.27.2", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.27.2.tgz", - "integrity": "sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.28.6.tgz", + "integrity": "sha512-YA6Ma2KsCdGb+WC6UpBVFJGXL58MDA6oyONbjyF/+5sBgxY/dwkhLogbMT2GXXyU84/IhRw/2D1Os1B/giz+BQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.27.1", - "@babel/parser": "^7.27.2", - "@babel/types": "^7.27.1" + "@babel/code-frame": "^7.28.6", + "@babel/parser": "^7.28.6", + "@babel/types": "^7.28.6" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.28.5.tgz", - "integrity": "sha512-TCCj4t55U90khlYkVV/0TfkJkAkUg3jZFA3Neb7unZT8CPok7iiRfaX0F+WnqWqt7OxhOn0uBKXCw4lbL8W0aQ==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.28.6.tgz", + "integrity": "sha512-fgWX62k02qtjqdSNTAGxmKYY/7FSL9WAS1o2Hu5+I5m9T0yxZzr4cnrfXQ/MX0rIifthCSs6FKTlzYbJcPtMNg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.27.1", - "@babel/generator": "^7.28.5", + "@babel/code-frame": "^7.28.6", + "@babel/generator": "^7.28.6", "@babel/helper-globals": "^7.28.0", - "@babel/parser": "^7.28.5", - "@babel/template": "^7.27.2", - "@babel/types": "^7.28.5", + "@babel/parser": "^7.28.6", + "@babel/template": "^7.28.6", + "@babel/types": "^7.28.6", "debug": "^4.3.1" }, "engines": { @@ -1892,9 +1943,9 @@ } }, "node_modules/@babel/types": { - "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.5.tgz", - "integrity": "sha512-qQ5m48eI/MFLQ5PxQj4PFaprjyCTLI37ElWMmNs0K8Lk3dVeOdNpB3ks8jc7yM5CDmVC73eMVk/trk3fgmrUpA==", + "version": "7.28.6", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.6.tgz", + "integrity": "sha512-0ZrskXVEHSWIqZM/sQZ4EV3jZJXRkio/WCxaqKZP1g//CEWEPSfeZFcms4XeKBCHU0ZKnIkdJeU/kF+eRp5lBg==", "dev": true, "license": "MIT", "dependencies": { @@ -2000,7 +2051,6 @@ } ], "license": "MIT", - "peer": true, "engines": { "node": ">=18" }, @@ -2024,24 +2074,10 @@ } ], "license": "MIT", - "peer": true, "engines": { "node": ">=18" } }, - "node_modules/@digitalbazaar/http-client": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@digitalbazaar/http-client/-/http-client-4.2.0.tgz", - "integrity": "sha512-OGju/GYp0V72qlZ/Pd4jGEwqBwT/Za/tw+Z3AC7lgMheGqsbhTZrtc5iLz9z59G/Q53QyE2fnjHV8N9wjBpiWA==", - "license": "BSD-3-Clause", - "dependencies": { - "ky": "^1.7.5", - "undici": "^6.21.2" - }, - "engines": { - "node": ">=18.0" - } - }, "node_modules/@discoveryjs/json-ext": { "version": "0.6.3", "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.6.3.tgz", @@ -2053,9 +2089,9 @@ } }, "node_modules/@emnapi/core": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.7.1.tgz", - "integrity": "sha512-o1uhUASyo921r2XtHYOHy7gdkGLge8ghBEQHMWmyJFoXlpU58kIrhhN3w26lpQb6dspetweapMn2CSNwQ8I4wg==", + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.8.1.tgz", + "integrity": "sha512-AvT9QFpxK0Zd8J0jopedNm+w/2fIzvtPKPjqyw9jwvBaReTTqPBk9Hixaz7KbjimP+QNz605/XnjFcDAL2pqBg==", "dev": true, "license": "MIT", "optional": true, @@ -2065,9 +2101,9 @@ } }, "node_modules/@emnapi/runtime": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.7.1.tgz", - "integrity": "sha512-PVtJr5CmLwYAU9PZDMITZoR5iAOShYREoR45EyyLrbntV50mdePTgUn4AmOw90Ifcj+x2kRjdzr1HP3RrNiHGA==", + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.8.1.tgz", + "integrity": "sha512-mehfKSMWjjNol8659Z8KxEMrdSJDDot5SXMq00dM8BN4o+CLNXQ0xH2V7EchNHV4RmbZLmmPdEaXZc5H2FXmDg==", "dev": true, "license": "MIT", "optional": true, @@ -2086,25 +2122,10 @@ "tslib": "^2.4.0" } }, - "node_modules/@emotion/is-prop-valid": { - "version": "0.7.3", - "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-0.7.3.tgz", - "integrity": "sha512-uxJqm/sqwXw3YPA5GXX365OBcJGFtxUVkB6WyezqFHlNe9jqUWH5ur2O2M8dGBz61kn1g3ZBlzUunFQXQIClhA==", - "license": "MIT", - "dependencies": { - "@emotion/memoize": "0.7.1" - } - }, - "node_modules/@emotion/memoize": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.7.1.tgz", - "integrity": "sha512-Qv4LTqO11jepd5Qmlp3M1YEjBumoTHcHFdgPTQ+sFlIL5myi/7xu/POwP7IRu6odBdmLXdtIs1D6TuW6kbwbbg==", - "license": "MIT" - }, "node_modules/@eslint-community/eslint-utils": { - "version": "4.9.0", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.0.tgz", - "integrity": "sha512-ayVFHdtZ+hsq1t2Dy24wCmGXGe4q9Gu3smhLYALJrr473ZH27MsnSL+LKUlimp4BWJqMDMLmPpx/Q9R3OAlL4g==", + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.1.tgz", + "integrity": "sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ==", "dev": true, "license": "MIT", "dependencies": { @@ -2326,15 +2347,6 @@ "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, - "node_modules/@frogcat/ttl2jsonld": { - "version": "0.0.10", - "resolved": "https://registry.npmjs.org/@frogcat/ttl2jsonld/-/ttl2jsonld-0.0.10.tgz", - "integrity": "sha512-0NLM96V3ziZkkOlhixSZiXe8CzewECVNtSj04s2hW2e65SgzQPzM12VWSovuRIy+2UJA2Bjkf9405yrty9tgcg==", - "license": "MIT", - "bin": { - "ttl2jsonld": "bin/cli.js" - } - }, "node_modules/@humanfs/core": { "version": "0.19.1", "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", @@ -2403,6 +2415,7 @@ "resolved": "https://registry.npmjs.org/@inrupt/oidc-client/-/oidc-client-1.11.6.tgz", "integrity": "sha512-1rCTk1T6pdm/7gKozutZutk7jwmYBADlnkGGoI5ypke099NOCa5KFXjkQpbjsps0PRkKZ+0EaR70XN5+xqmViA==", "license": "Apache-2.0", + "peer": true, "dependencies": { "acorn": "^7.4.1", "base64-js": "^1.5.1", @@ -2416,6 +2429,7 @@ "resolved": "https://registry.npmjs.org/@inrupt/oidc-client-ext/-/oidc-client-ext-3.1.1.tgz", "integrity": "sha512-vftKD2u5nufZTFkdUDMS3Uxj5xNQwArP11OFaALFkq6/3RwCAhe3lwOv8hNzL7Scv98T+KbAErBM0TwGGrS69g==", "license": "MIT", + "peer": true, "dependencies": { "@inrupt/oidc-client": "^1.11.6", "@inrupt/solid-client-authn-core": "^3.1.1", @@ -2428,6 +2442,7 @@ "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", "license": "MIT", + "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -2440,6 +2455,7 @@ "resolved": "https://registry.npmjs.org/@inrupt/solid-client-authn-browser/-/solid-client-authn-browser-3.1.1.tgz", "integrity": "sha512-Wd7TREmvdhTp+Sk88ei3hlg54sG1fNqkkPkuS+2tDBkcsXaViRQAEugVyh5pWRkd1xSFKrEzftb7UYEG4mJ0CQ==", "license": "MIT", + "peer": true, "dependencies": { "@inrupt/oidc-client-ext": "^3.1.1", "@inrupt/solid-client-authn-core": "^3.1.1", @@ -2453,6 +2469,7 @@ "resolved": "https://registry.npmjs.org/@inrupt/solid-client-authn-core/-/solid-client-authn-core-3.1.1.tgz", "integrity": "sha512-1oDSQCh/pVtPlTyvLQ2uwHo+hpLJF7izg82tjB+Ge8jqGYwkQyId0BrfncpCk//uJXxgRIcfAQp2MhXYbZo80Q==", "license": "MIT", + "peer": true, "dependencies": { "events": "^3.3.0", "jose": "^5.1.3", @@ -3370,6 +3387,165 @@ "node": ">=12.4.0" } }, + "node_modules/@peculiar/asn1-cms": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@peculiar/asn1-cms/-/asn1-cms-2.6.0.tgz", + "integrity": "sha512-2uZqP+ggSncESeUF/9Su8rWqGclEfEiz1SyU02WX5fUONFfkjzS2Z/F1Li0ofSmf4JqYXIOdCAZqIXAIBAT1OA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@peculiar/asn1-schema": "^2.6.0", + "@peculiar/asn1-x509": "^2.6.0", + "@peculiar/asn1-x509-attr": "^2.6.0", + "asn1js": "^3.0.6", + "tslib": "^2.8.1" + } + }, + "node_modules/@peculiar/asn1-csr": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@peculiar/asn1-csr/-/asn1-csr-2.6.0.tgz", + "integrity": "sha512-BeWIu5VpTIhfRysfEp73SGbwjjoLL/JWXhJ/9mo4vXnz3tRGm+NGm3KNcRzQ9VMVqwYS2RHlolz21svzRXIHPQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@peculiar/asn1-schema": "^2.6.0", + "@peculiar/asn1-x509": "^2.6.0", + "asn1js": "^3.0.6", + "tslib": "^2.8.1" + } + }, + "node_modules/@peculiar/asn1-ecc": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@peculiar/asn1-ecc/-/asn1-ecc-2.6.0.tgz", + "integrity": "sha512-FF3LMGq6SfAOwUG2sKpPXblibn6XnEIKa+SryvUl5Pik+WR9rmRA3OCiwz8R3lVXnYnyRkSZsSLdml8H3UiOcw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@peculiar/asn1-schema": "^2.6.0", + "@peculiar/asn1-x509": "^2.6.0", + "asn1js": "^3.0.6", + "tslib": "^2.8.1" + } + }, + "node_modules/@peculiar/asn1-pfx": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@peculiar/asn1-pfx/-/asn1-pfx-2.6.0.tgz", + "integrity": "sha512-rtUvtf+tyKGgokHHmZzeUojRZJYPxoD/jaN1+VAB4kKR7tXrnDCA/RAWXAIhMJJC+7W27IIRGe9djvxKgsldCQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@peculiar/asn1-cms": "^2.6.0", + "@peculiar/asn1-pkcs8": "^2.6.0", + "@peculiar/asn1-rsa": "^2.6.0", + "@peculiar/asn1-schema": "^2.6.0", + "asn1js": "^3.0.6", + "tslib": "^2.8.1" + } + }, + "node_modules/@peculiar/asn1-pkcs8": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@peculiar/asn1-pkcs8/-/asn1-pkcs8-2.6.0.tgz", + "integrity": "sha512-KyQ4D8G/NrS7Fw3XCJrngxmjwO/3htnA0lL9gDICvEQ+GJ+EPFqldcJQTwPIdvx98Tua+WjkdKHSC0/Km7T+lA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@peculiar/asn1-schema": "^2.6.0", + "@peculiar/asn1-x509": "^2.6.0", + "asn1js": "^3.0.6", + "tslib": "^2.8.1" + } + }, + "node_modules/@peculiar/asn1-pkcs9": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@peculiar/asn1-pkcs9/-/asn1-pkcs9-2.6.0.tgz", + "integrity": "sha512-b78OQ6OciW0aqZxdzliXGYHASeCvvw5caqidbpQRYW2mBtXIX2WhofNXTEe7NyxTb0P6J62kAAWLwn0HuMF1Fw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@peculiar/asn1-cms": "^2.6.0", + "@peculiar/asn1-pfx": "^2.6.0", + "@peculiar/asn1-pkcs8": "^2.6.0", + "@peculiar/asn1-schema": "^2.6.0", + "@peculiar/asn1-x509": "^2.6.0", + "@peculiar/asn1-x509-attr": "^2.6.0", + "asn1js": "^3.0.6", + "tslib": "^2.8.1" + } + }, + "node_modules/@peculiar/asn1-rsa": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@peculiar/asn1-rsa/-/asn1-rsa-2.6.0.tgz", + "integrity": "sha512-Nu4C19tsrTsCp9fDrH+sdcOKoVfdfoQQ7S3VqjJU6vedR7tY3RLkQ5oguOIB3zFW33USDUuYZnPEQYySlgha4w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@peculiar/asn1-schema": "^2.6.0", + "@peculiar/asn1-x509": "^2.6.0", + "asn1js": "^3.0.6", + "tslib": "^2.8.1" + } + }, + "node_modules/@peculiar/asn1-schema": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@peculiar/asn1-schema/-/asn1-schema-2.6.0.tgz", + "integrity": "sha512-xNLYLBFTBKkCzEZIw842BxytQQATQv+lDTCEMZ8C196iJcJJMBUZxrhSTxLaohMyKK8QlzRNTRkUmanucnDSqg==", + "dev": true, + "license": "MIT", + "dependencies": { + "asn1js": "^3.0.6", + "pvtsutils": "^1.3.6", + "tslib": "^2.8.1" + } + }, + "node_modules/@peculiar/asn1-x509": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@peculiar/asn1-x509/-/asn1-x509-2.6.0.tgz", + "integrity": "sha512-uzYbPEpoQiBoTq0/+jZtpM6Gq6zADBx+JNFP3yqRgziWBxQ/Dt/HcuvRfm9zJTPdRcBqPNdaRHTVwpyiq6iNMA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@peculiar/asn1-schema": "^2.6.0", + "asn1js": "^3.0.6", + "pvtsutils": "^1.3.6", + "tslib": "^2.8.1" + } + }, + "node_modules/@peculiar/asn1-x509-attr": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@peculiar/asn1-x509-attr/-/asn1-x509-attr-2.6.0.tgz", + "integrity": "sha512-MuIAXFX3/dc8gmoZBkwJWxUWOSvG4MMDntXhrOZpJVMkYX+MYc/rUAU2uJOved9iJEoiUx7//3D8oG83a78UJA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@peculiar/asn1-schema": "^2.6.0", + "@peculiar/asn1-x509": "^2.6.0", + "asn1js": "^3.0.6", + "tslib": "^2.8.1" + } + }, + "node_modules/@peculiar/x509": { + "version": "1.14.3", + "resolved": "https://registry.npmjs.org/@peculiar/x509/-/x509-1.14.3.tgz", + "integrity": "sha512-C2Xj8FZ0uHWeCXXqX5B4/gVFQmtSkiuOolzAgutjTfseNOHT3pUjljDZsTSxXFGgio54bCzVFqmEOUrIVk8RDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@peculiar/asn1-cms": "^2.6.0", + "@peculiar/asn1-csr": "^2.6.0", + "@peculiar/asn1-ecc": "^2.6.0", + "@peculiar/asn1-pkcs9": "^2.6.0", + "@peculiar/asn1-rsa": "^2.6.0", + "@peculiar/asn1-schema": "^2.6.0", + "@peculiar/asn1-x509": "^2.6.0", + "pvtsutils": "^1.3.6", + "reflect-metadata": "^0.2.2", + "tslib": "^2.8.1", + "tsyringe": "^4.10.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, "node_modules/@pkgjs/parseargs": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", @@ -3404,9 +3580,9 @@ } }, "node_modules/@sinclair/typebox": { - "version": "0.34.41", - "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.34.41.tgz", - "integrity": "sha512-6gS8pZzSXdyRHTIqoqSVknxolr1kzfy4/CeDnrzsVz8TTIWUbOBr6gnzOmTYJ3eXQNh4IYHIGi5aIL7sOZ2G/g==", + "version": "0.34.47", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.34.47.tgz", + "integrity": "sha512-ZGIBQ+XDvO5JQku9wmwtabcVTHJsgSWAHYtVuM9pBNNR5E88v6Jcj/llpmsjivig5X8A8HHOb4/mbEKPS5EvAw==", "dev": true, "license": "MIT" }, @@ -3663,9 +3839,9 @@ } }, "node_modules/@types/express-serve-static-core": { - "version": "4.19.7", - "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.19.7.tgz", - "integrity": "sha512-FvPtiIf1LfhzsaIXhv/PHan/2FeQBbtBDtfX2QfvPxdUelMDEckK08SM6nqo1MIZY3RUlfA+HV8+hFUSio78qg==", + "version": "4.19.8", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.19.8.tgz", + "integrity": "sha512-02S5fmqeoKzVZCHPZid4b8JH2eM5HzQLZWN2FohQEy/0eXTq8VXZfSN6Pcr3F6N9R/vNrj7cpgbhjie6m/1tCA==", "dev": true, "license": "MIT", "dependencies": { @@ -3799,24 +3975,14 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "24.10.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-24.10.1.tgz", - "integrity": "sha512-GNWcUTRBgIRJD5zj+Tq0fKOJ5XZajIiBroOF0yvj2bSU1WvNdYS/dn9UxwsujGW4JX06dnHyjV2y9rRaybH0iQ==", + "version": "25.0.9", + "resolved": "https://registry.npmjs.org/@types/node/-/node-25.0.9.tgz", + "integrity": "sha512-/rpCXHlCWeqClNBwUhDcusJxXYDjZTyE8v5oTO7WbL8eij2nKhUeU89/6xgjU7N4/Vh3He0BtyhJdQbDyhiXAw==", "license": "MIT", "dependencies": { "undici-types": "~7.16.0" } }, - "node_modules/@types/node-forge": { - "version": "1.3.14", - "resolved": "https://registry.npmjs.org/@types/node-forge/-/node-forge-1.3.14.tgz", - "integrity": "sha512-mhVF2BnD4BO+jtOp7z1CdzaK4mbuK0LLQYAvdOLqHTavxFNq4zA1EmYkpnFjP8HOUzedfQkRnp0E2ulSAYSzAw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, "node_modules/@types/qs": { "version": "6.14.0", "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.14.0.tgz", @@ -3946,21 +4112,20 @@ "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.48.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.48.0.tgz", - "integrity": "sha512-XxXP5tL1txl13YFtrECECQYeZjBZad4fyd3cFV4a19LkAY/bIp9fev3US4S5fDVV2JaYFiKAZ/GRTOLer+mbyQ==", + "version": "8.53.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.53.0.tgz", + "integrity": "sha512-eEXsVvLPu8Z4PkFibtuFJLJOTAV/nPdgtSjkGoPpddpFk3/ym2oy97jynY6ic2m6+nc5M8SE1e9v/mHKsulcJg==", "dev": true, "license": "MIT", "dependencies": { - "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.48.0", - "@typescript-eslint/type-utils": "8.48.0", - "@typescript-eslint/utils": "8.48.0", - "@typescript-eslint/visitor-keys": "8.48.0", - "graphemer": "^1.4.0", - "ignore": "^7.0.0", + "@eslint-community/regexpp": "^4.12.2", + "@typescript-eslint/scope-manager": "8.53.0", + "@typescript-eslint/type-utils": "8.53.0", + "@typescript-eslint/utils": "8.53.0", + "@typescript-eslint/visitor-keys": "8.53.0", + "ignore": "^7.0.5", "natural-compare": "^1.4.0", - "ts-api-utils": "^2.1.0" + "ts-api-utils": "^2.4.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -3970,7 +4135,7 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^8.48.0", + "@typescript-eslint/parser": "^8.53.0", "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <6.0.0" } @@ -3986,170 +4151,40 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "8.51.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.51.0.tgz", - "integrity": "sha512-3xP4XzzDNQOIqBMWogftkwxhg5oMKApqY0BAflmLZiFYHqyhSOxv/cd/zPQLTcCXr4AkaKb25joocY0BD1WC6A==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/scope-manager": "8.51.0", - "@typescript-eslint/types": "8.51.0", - "@typescript-eslint/typescript-estree": "8.51.0", - "@typescript-eslint/visitor-keys": "8.51.0", - "debug": "^4.3.4" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <6.0.0" - } - }, - "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/project-service": { - "version": "8.51.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.51.0.tgz", - "integrity": "sha512-Luv/GafO07Z7HpiI7qeEW5NW8HUtZI/fo/kE0YbtQEFpJRUuR0ajcWfCE5bnMvL7QQFrmT/odMe8QZww8X2nfQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/tsconfig-utils": "^8.51.0", - "@typescript-eslint/types": "^8.51.0", - "debug": "^4.3.4" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "typescript": ">=4.8.4 <6.0.0" - } - }, - "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager": { - "version": "8.51.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.51.0.tgz", - "integrity": "sha512-JhhJDVwsSx4hiOEQPeajGhCWgBMBwVkxC/Pet53EpBVs7zHHtayKefw1jtPaNRXpI9RA2uocdmpdfE7T+NrizA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.51.0", - "@typescript-eslint/visitor-keys": "8.51.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/tsconfig-utils": { - "version": "8.51.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.51.0.tgz", - "integrity": "sha512-Qi5bSy/vuHeWyir2C8u/uqGMIlIDu8fuiYWv48ZGlZ/k+PRPHtaAu7erpc7p5bzw2WNNSniuxoMSO4Ar6V9OXw==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "typescript": ">=4.8.4 <6.0.0" - } - }, - "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types": { - "version": "8.51.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.51.0.tgz", - "integrity": "sha512-TizAvWYFM6sSscmEakjY3sPqGwxZRSywSsPEiuZF6d5GmGD9Gvlsv0f6N8FvAAA0CD06l3rIcWNbsN1e5F/9Ag==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree": { - "version": "8.51.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.51.0.tgz", - "integrity": "sha512-1qNjGqFRmlq0VW5iVlcyHBbCjPB7y6SxpBkrbhNWMy/65ZoncXCEPJxkRZL8McrseNH6lFhaxCIaX+vBuFnRng==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/project-service": "8.51.0", - "@typescript-eslint/tsconfig-utils": "8.51.0", - "@typescript-eslint/types": "8.51.0", - "@typescript-eslint/visitor-keys": "8.51.0", - "debug": "^4.3.4", - "minimatch": "^9.0.4", - "semver": "^7.6.0", - "tinyglobby": "^0.2.15", - "ts-api-utils": "^2.2.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "typescript": ">=4.8.4 <6.0.0" - } - }, - "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys": { - "version": "8.51.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.51.0.tgz", - "integrity": "sha512-mM/JRQOzhVN1ykejrvwnBRV3+7yTKK8tVANVN3o1O0t0v7o+jqdVu9crPy5Y9dov15TJk/FTIgoUGHrTOVL3Zg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.51.0", - "eslint-visitor-keys": "^4.2.1" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/parser/node_modules/semver": { - "version": "7.7.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", - "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" + "version": "8.53.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.53.0.tgz", + "integrity": "sha512-npiaib8XzbjtzS2N4HlqPvlpxpmZ14FjSJrteZpPxGUaYPlvhzlzUZ4mZyABo0EFrOWnvyd0Xxroq//hKhtAWg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/scope-manager": "8.53.0", + "@typescript-eslint/types": "8.53.0", + "@typescript-eslint/typescript-estree": "8.53.0", + "@typescript-eslint/visitor-keys": "8.53.0", + "debug": "^4.4.3" }, "engines": { - "node": ">=10" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" } }, "node_modules/@typescript-eslint/project-service": { - "version": "8.48.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.48.0.tgz", - "integrity": "sha512-Ne4CTZyRh1BecBf84siv42wv5vQvVmgtk8AuiEffKTUo3DrBaGYZueJSxxBZ8fjk/N3DrgChH4TOdIOwOwiqqw==", + "version": "8.53.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.53.0.tgz", + "integrity": "sha512-Bl6Gdr7NqkqIP5yP9z1JU///Nmes4Eose6L1HwpuVHwScgDPPuEWbUVhvlZmb8hy0vX9syLk5EGNL700WcBlbg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/tsconfig-utils": "^8.48.0", - "@typescript-eslint/types": "^8.48.0", - "debug": "^4.3.4" + "@typescript-eslint/tsconfig-utils": "^8.53.0", + "@typescript-eslint/types": "^8.53.0", + "debug": "^4.4.3" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -4163,14 +4198,14 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.48.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.48.0.tgz", - "integrity": "sha512-uGSSsbrtJrLduti0Q1Q9+BF1/iFKaxGoQwjWOIVNJv0o6omrdyR8ct37m4xIl5Zzpkp69Kkmvom7QFTtue89YQ==", + "version": "8.53.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.53.0.tgz", + "integrity": "sha512-kWNj3l01eOGSdVBnfAF2K1BTh06WS0Yet6JUgb9Cmkqaz3Jlu0fdVUjj9UI8gPidBWSMqDIglmEXifSgDT/D0g==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.48.0", - "@typescript-eslint/visitor-keys": "8.48.0" + "@typescript-eslint/types": "8.53.0", + "@typescript-eslint/visitor-keys": "8.53.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -4181,9 +4216,9 @@ } }, "node_modules/@typescript-eslint/tsconfig-utils": { - "version": "8.48.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.48.0.tgz", - "integrity": "sha512-WNebjBdFdyu10sR1M4OXTt2OkMd5KWIL+LLfeH9KhgP+jzfDV/LI3eXzwJ1s9+Yc0Kzo2fQCdY/OpdusCMmh6w==", + "version": "8.53.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.53.0.tgz", + "integrity": "sha512-K6Sc0R5GIG6dNoPdOooQ+KtvT5KCKAvTcY8h2rIuul19vxH5OTQk7ArKkd4yTzkw66WnNY0kPPzzcmWA+XRmiA==", "dev": true, "license": "MIT", "engines": { @@ -4198,17 +4233,17 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.48.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.48.0.tgz", - "integrity": "sha512-zbeVaVqeXhhab6QNEKfK96Xyc7UQuoFWERhEnj3mLVnUWrQnv15cJNseUni7f3g557gm0e46LZ6IJ4NJVOgOpw==", + "version": "8.53.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.53.0.tgz", + "integrity": "sha512-BBAUhlx7g4SmcLhn8cnbxoxtmS7hcq39xKCgiutL3oNx1TaIp+cny51s8ewnKMpVUKQUGb41RAUWZ9kxYdovuw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.48.0", - "@typescript-eslint/typescript-estree": "8.48.0", - "@typescript-eslint/utils": "8.48.0", - "debug": "^4.3.4", - "ts-api-utils": "^2.1.0" + "@typescript-eslint/types": "8.53.0", + "@typescript-eslint/typescript-estree": "8.53.0", + "@typescript-eslint/utils": "8.53.0", + "debug": "^4.4.3", + "ts-api-utils": "^2.4.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -4223,9 +4258,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.48.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.48.0.tgz", - "integrity": "sha512-cQMcGQQH7kwKoVswD1xdOytxQR60MWKM1di26xSUtxehaDs/32Zpqsu5WJlXTtTTqyAVK8R7hvsUnIXRS+bjvA==", + "version": "8.53.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.53.0.tgz", + "integrity": "sha512-Bmh9KX31Vlxa13+PqPvt4RzKRN1XORYSLlAE+sO1i28NkisGbTtSLFVB3l7PWdHtR3E0mVMuC7JilWJ99m2HxQ==", "dev": true, "license": "MIT", "engines": { @@ -4237,21 +4272,21 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.48.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.48.0.tgz", - "integrity": "sha512-ljHab1CSO4rGrQIAyizUS6UGHHCiAYhbfcIZ1zVJr5nMryxlXMVWS3duFPSKvSUbFPwkXMFk1k0EMIjub4sRRQ==", + "version": "8.53.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.53.0.tgz", + "integrity": "sha512-pw0c0Gdo7Z4xOG987u3nJ8akL9093yEEKv8QTJ+Bhkghj1xyj8cgPaavlr9rq8h7+s6plUJ4QJYw2gCZodqmGw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/project-service": "8.48.0", - "@typescript-eslint/tsconfig-utils": "8.48.0", - "@typescript-eslint/types": "8.48.0", - "@typescript-eslint/visitor-keys": "8.48.0", - "debug": "^4.3.4", - "minimatch": "^9.0.4", - "semver": "^7.6.0", + "@typescript-eslint/project-service": "8.53.0", + "@typescript-eslint/tsconfig-utils": "8.53.0", + "@typescript-eslint/types": "8.53.0", + "@typescript-eslint/visitor-keys": "8.53.0", + "debug": "^4.4.3", + "minimatch": "^9.0.5", + "semver": "^7.7.3", "tinyglobby": "^0.2.15", - "ts-api-utils": "^2.1.0" + "ts-api-utils": "^2.4.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -4278,16 +4313,16 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.48.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.48.0.tgz", - "integrity": "sha512-yTJO1XuGxCsSfIVt1+1UrLHtue8xz16V8apzPYI06W0HbEbEWHxHXgZaAgavIkoh+GeV6hKKd5jm0sS6OYxWXQ==", + "version": "8.53.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.53.0.tgz", + "integrity": "sha512-XDY4mXTez3Z1iRDI5mbRhH4DFSt46oaIFsLg+Zn97+sYrXACziXSQcSelMybnVZ5pa1P6xYkPr5cMJyunM1ZDA==", "dev": true, "license": "MIT", "dependencies": { - "@eslint-community/eslint-utils": "^4.7.0", - "@typescript-eslint/scope-manager": "8.48.0", - "@typescript-eslint/types": "8.48.0", - "@typescript-eslint/typescript-estree": "8.48.0" + "@eslint-community/eslint-utils": "^4.9.1", + "@typescript-eslint/scope-manager": "8.53.0", + "@typescript-eslint/types": "8.53.0", + "@typescript-eslint/typescript-estree": "8.53.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -4302,13 +4337,13 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.48.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.48.0.tgz", - "integrity": "sha512-T0XJMaRPOH3+LBbAfzR2jalckP1MSG/L9eUtY0DEzUyVaXJ/t6zN0nR7co5kz0Jko/nkSYCBRkz1djvjajVTTg==", + "version": "8.53.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.53.0.tgz", + "integrity": "sha512-LZ2NqIHFhvFwxG0qZeLL9DvdNAHPGCY5dIRwBhyYeU+LfLhcStE1ImjsuTG/WaVh3XysGaeLW8Rqq7cGkPCFvw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.48.0", + "@typescript-eslint/types": "8.53.0", "eslint-visitor-keys": "^4.2.1" }, "engines": { @@ -4803,15 +4838,6 @@ } } }, - "node_modules/@xmldom/xmldom": { - "version": "0.8.11", - "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.11.tgz", - "integrity": "sha512-cQzWCtO6C8TQiYl1ruKNn2U6Ao4o4WBBcbL61yJl84x+j5sOWWFU9X7DpND8XZG3daDppSsigMdfAIl2upQBRw==", - "license": "MIT", - "engines": { - "node": ">=10.0.0" - } - }, "node_modules/@xtuc/ieee754": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", @@ -4826,18 +4852,6 @@ "dev": true, "license": "Apache-2.0" }, - "node_modules/abort-controller": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", - "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", - "license": "MIT", - "dependencies": { - "event-target-shim": "^5.0.0" - }, - "engines": { - "node": ">=6.5" - } - }, "node_modules/accepts": { "version": "1.3.8", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", @@ -4891,7 +4905,6 @@ "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "dev": true, "license": "MIT", - "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -4922,24 +4935,6 @@ "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, - "node_modules/activitystreams-pane": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/activitystreams-pane/-/activitystreams-pane-1.0.0.tgz", - "integrity": "sha512-hdayUTYNeJalu7mY7RoXHag5SbuNz3uC55E1jC+obJ/tvIl5QqroEONxqGsDCr4qDQ1UEQPuPsOckUOJWl4eXQ==", - "license": "MIT", - "dependencies": { - "pane-registry": "^3.0.0", - "react": "^19.2.0", - "react-dom": "^19.2.0", - "react-jss": "^10.10.0", - "timeago.js": "^4.0.2" - }, - "peerDependencies": { - "rdflib": "^2.3.0", - "solid-logic": "^4.0.0", - "solid-ui": "^3.0.0" - } - }, "node_modules/agent-base": { "version": "7.1.4", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.4.tgz", @@ -5260,6 +5255,21 @@ "dev": true, "license": "MIT" }, + "node_modules/asn1js": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/asn1js/-/asn1js-3.0.7.tgz", + "integrity": "sha512-uLvq6KJu04qoQM6gvBfKFjlh6Gl0vOKQuR5cJMDHQkmwfMOQeN3F3SHCv9SNYSL+CRoHvOGFfllDlVz03GQjvQ==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "pvtsutils": "^1.3.6", + "pvutils": "^1.1.3", + "tslib": "^2.8.1" + }, + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/assert": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/assert/-/assert-2.1.0.tgz", @@ -5506,9 +5516,9 @@ "license": "MIT" }, "node_modules/baseline-browser-mapping": { - "version": "2.9.11", - "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.9.11.tgz", - "integrity": "sha512-Sg0xJUNDU1sJNGdfGWhVHX0kkZ+HWcvmVymJbj6NSgZZmW/8S9Y2HQ5euytnIgakgxN6papOAWiwDo1ctFDcoQ==", + "version": "2.9.15", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.9.15.tgz", + "integrity": "sha512-kX8h7K2srmDyYnXRIppo4AH/wYgzWVCs+eKr3RusRSQ5PvRYoEFmR/I0PbdTjKFAoKqp5+kbxnNTFO9jOfSVJg==", "dev": true, "license": "Apache-2.0", "bin": { @@ -5543,24 +5553,24 @@ "license": "MIT" }, "node_modules/body-parser": { - "version": "1.20.3", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", - "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==", + "version": "1.20.4", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.4.tgz", + "integrity": "sha512-ZTgYYLMOXY9qKU/57FAo8F+HA2dGX7bqGc71txDRC1rS4frdFI5R7NhluHxH6M0YItAP0sHB4uqAOcYKxO6uGA==", "dev": true, "license": "MIT", "dependencies": { - "bytes": "3.1.2", + "bytes": "~3.1.2", "content-type": "~1.0.5", "debug": "2.6.9", "depd": "2.0.0", - "destroy": "1.2.0", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "on-finished": "2.4.1", - "qs": "6.13.0", - "raw-body": "2.5.2", + "destroy": "~1.2.0", + "http-errors": "~2.0.1", + "iconv-lite": "~0.4.24", + "on-finished": "~2.4.1", + "qs": "~6.14.0", + "raw-body": "~2.5.3", "type-is": "~1.6.18", - "unpipe": "1.0.0" + "unpipe": "~1.0.0" }, "engines": { "node": ">= 0.8", @@ -5584,22 +5594,6 @@ "dev": true, "license": "MIT" }, - "node_modules/body-parser/node_modules/qs": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", - "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "side-channel": "^1.0.6" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/bonjour-service": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/bonjour-service/-/bonjour-service-1.3.0.tgz", @@ -5811,7 +5805,6 @@ } ], "license": "MIT", - "peer": true, "dependencies": { "baseline-browser-mapping": "^2.9.0", "caniuse-lite": "^1.0.30001759", @@ -5853,6 +5846,7 @@ "version": "6.0.3", "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "dev": true, "funding": [ { "type": "github", @@ -5920,6 +5914,16 @@ "node": ">= 0.8" } }, + "node_modules/bytestreamjs": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/bytestreamjs/-/bytestreamjs-2.0.1.tgz", + "integrity": "sha512-U1Z/ob71V/bXfVABvNr/Kumf5VyeQRBEm6Txb0PQ6S7V5GpBM3w4Cbqz/xPDicR5tN0uvDifng8C+5qECeGwyQ==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/call-bind": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz", @@ -6001,9 +6005,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001761", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001761.tgz", - "integrity": "sha512-JF9ptu1vP2coz98+5051jZ4PwQgd2ni8A+gYSN7EA7dPKIMf0pDlSUxhdmVOaV3/fYK5uWBkgSXJaRLr4+3A6g==", + "version": "1.0.30001764", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001764.tgz", + "integrity": "sha512-9JGuzl2M+vPL+pz70gtMF9sHdMFbY9FJaQBi186cHKH3pSzDvzoUJUPV6fqiKIMyXbud9ZLg4F3Yza1vJ1+93g==", "dev": true, "funding": [ { @@ -6021,15 +6025,6 @@ ], "license": "CC-BY-4.0" }, - "node_modules/canonicalize": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/canonicalize/-/canonicalize-2.1.0.tgz", - "integrity": "sha512-F705O3xrsUtgt98j7leetNhTWPe+5S72rlL5O4jA1pKqBVQ/dT1O1D6PFxmSXvc0SUOinWS57DKx0I3CHrXJHQ==", - "license": "Apache-2.0", - "bin": { - "canonicalize": "bin/canonicalize.js" - } - }, "node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -6057,16 +6052,9 @@ "node": ">=10" } }, - "node_modules/chat-pane": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/chat-pane/-/chat-pane-3.0.0.tgz", - "integrity": "sha512-Zr2BXbSDInVOgz1CrdmBxiziJUhCkeDAxfpTtlEnpMn13gZsg9p2AmMTmxV+yKCZZpQJCkOURU5Z+XKb3uOIZw==", - "license": "MIT", - "peerDependencies": { - "rdflib": "^2.3.0", - "solid-logic": "^4.0.0", - "solid-ui": "^3.0.0" - } + "node_modules/chat-pane-jss": { + "resolved": "../chat-pane-jss", + "link": true }, "node_modules/chokidar": { "version": "3.6.0", @@ -6135,9 +6123,9 @@ } }, "node_modules/cjs-module-lexer": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.1.1.tgz", - "integrity": "sha512-+CmxIZ/L2vNcEfvNtLdU0ZQ6mbq3FZnwAP2PPTiKP+1QOoKwlKlPgb8UKV0Dds7QVaMnHm+FwSft2VB0s/SLjQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.2.0.tgz", + "integrity": "sha512-4bHTS2YuzUvtoLjdy+98ykbNB5jS0+07EvFNXerqZQJ89F7DI6ET7OQo/HJuW6K0aVsKA9hj9/RVb2kQVOrPDQ==", "dev": true, "license": "MIT" }, @@ -6238,9 +6226,9 @@ } }, "node_modules/comment-parser": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.4.1.tgz", - "integrity": "sha512-buhp5kePrmda3vhc5B9t7pUQXAb2Tnd0qgpkIhPhkHXxJpiPJ11H0ZEU0oBpJ2QztSbzG/ZxMj/CHsYJqRHmyg==", + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.4.4.tgz", + "integrity": "sha512-0D6qSQ5IkeRrGJFHRClzaMOenMeT0gErz3zIw3AprKMqhRN6LNU2jQOdkPG/FZ+8bCgXE1VidrgSzlBBDZRr8A==", "dev": true, "license": "MIT", "engines": { @@ -6371,9 +6359,9 @@ "license": "MIT" }, "node_modules/cookie": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz", - "integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==", + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz", + "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==", "dev": true, "license": "MIT", "engines": { @@ -6381,9 +6369,9 @@ } }, "node_modules/cookie-signature": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.7.tgz", + "integrity": "sha512-NXdYc3dLr47pBkpUCHtKSwIOQXLVn8dZEuywboCOJY/osA0wFSLlSawr3KN8qXJEyX66FcONTH8EIlVuK0yyFA==", "dev": true, "license": "MIT" }, @@ -6393,6 +6381,7 @@ "integrity": "sha512-c3Q2VVkGAUyupsjRnaNX6u8Dq2vAdzm9iuPj5FW0fRxzlxgq9Q39MDq10IvmQSpLgHQNyQzQmOo6bgGHmH3NNg==", "hasInstallScript": true, "license": "MIT", + "peer": true, "funding": { "type": "opencollective", "url": "https://opencollective.com/core-js" @@ -6529,18 +6518,8 @@ "version": "4.2.0", "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.2.0.tgz", "integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==", - "license": "MIT" - }, - "node_modules/css-jss": { - "version": "10.10.0", - "resolved": "https://registry.npmjs.org/css-jss/-/css-jss-10.10.0.tgz", - "integrity": "sha512-YyMIS/LsSKEGXEaVJdjonWe18p4vXLo8CMA4FrW/kcaEyqdIGKCFXao31gbJddXEdIxSXFFURWrenBJPlKTgAA==", "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.3.1", - "jss": "^10.10.0", - "jss-preset-default": "^10.10.0" - } + "peer": true }, "node_modules/css-select": { "version": "4.3.0", @@ -6559,16 +6538,6 @@ "url": "https://github.com/sponsors/fb55" } }, - "node_modules/css-vendor": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/css-vendor/-/css-vendor-2.0.8.tgz", - "integrity": "sha512-x9Aq0XTInxrkuFeHKbYC7zWY8ai7qJ04Kxd9MnvbC1uO5DagxoHQjm4JvG+vCdXOoFtCjbL2XSZfxmoYa9uQVQ==", - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.8.3", - "is-in-browser": "^1.0.2" - } - }, "node_modules/css-what": { "version": "6.2.2", "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.2.2.tgz", @@ -6603,12 +6572,6 @@ "node": ">=18" } }, - "node_modules/csstype": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz", - "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==", - "license": "MIT" - }, "node_modules/data-urls": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-5.0.0.tgz", @@ -6712,9 +6675,9 @@ "license": "MIT" }, "node_modules/dedent": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.7.0.tgz", - "integrity": "sha512-HGFtf8yhuhGhqO07SV79tRp+br4MnbdjeVxotpn1QBl30pcLLCQjX5b2295ll0fv8RKDKsmWYrl05usHM9CewQ==", + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.7.1.tgz", + "integrity": "sha512-9JmrhGZpOlEgOLdQgSm0zxFaYoQon408V1v49aqTWuXENVlnCuY9JBZcXZiCsZQWDjTm5Qf/nIvAy77mXDAjEg==", "dev": true, "license": "MIT", "peerDependencies": { @@ -7140,9 +7103,9 @@ } }, "node_modules/enhanced-resolve": { - "version": "5.18.3", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.3.tgz", - "integrity": "sha512-d4lC8xfavMeBjzGr2vECC3fsGXziXZQyJxD868h2M/mBI3PwAuODxAkLkq5HYuvrPYcUtiLzsTo8U3PgX3Ocww==", + "version": "5.18.4", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.4.tgz", + "integrity": "sha512-LgQMM4WXU3QI+SYgEc2liRgznaD5ojbmY3sb8LxyguVkIg5FxdpTkvk72te2R38/TGKxH634oLxXRGY6d7AP+Q==", "dev": true, "license": "MIT", "dependencies": { @@ -7190,9 +7153,9 @@ } }, "node_modules/es-abstract": { - "version": "1.24.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.24.0.tgz", - "integrity": "sha512-WSzPgsdLtTcQwm4CROfS5ju2Wa1QQcVeT37jFjYzdFz1r9ahadC8B8/a4qxJxM+09F18iumCdRmlr96ZYkQvEg==", + "version": "1.24.1", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.24.1.tgz", + "integrity": "sha512-zHXBLhP+QehSSbsS9Pt23Gg964240DPd6QCf8WpkqEXxQ7fhdZzYsocOr5u7apWonsS5EjZDmTF+/slGMyasvw==", "dev": true, "license": "MIT", "dependencies": { @@ -7279,27 +7242,27 @@ } }, "node_modules/es-iterator-helpers": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.2.1.tgz", - "integrity": "sha512-uDn+FE1yrDzyC0pCo961B2IHbdM8y/ACZsKD4dG6WqrjV53BADjwa7D+1aom2rsNVfLyDgU/eigvlJGJ08OQ4w==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.2.2.tgz", + "integrity": "sha512-BrUQ0cPTB/IwXj23HtwHjS9n7O4h9FX94b4xc5zlTHxeLgTAdzYUDyy6KdExAl9lbN5rtfe44xpjpmj9grxs5w==", "dev": true, "license": "MIT", "dependencies": { "call-bind": "^1.0.8", - "call-bound": "^1.0.3", + "call-bound": "^1.0.4", "define-properties": "^1.2.1", - "es-abstract": "^1.23.6", + "es-abstract": "^1.24.1", "es-errors": "^1.3.0", - "es-set-tostringtag": "^2.0.3", + "es-set-tostringtag": "^2.1.0", "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.6", + "get-intrinsic": "^1.3.0", "globalthis": "^1.0.4", "gopd": "^1.2.0", "has-property-descriptors": "^1.0.2", "has-proto": "^1.2.0", "has-symbols": "^1.1.0", "internal-slot": "^1.1.0", - "iterator.prototype": "^1.1.4", + "iterator.prototype": "^1.1.5", "safe-array-concat": "^1.1.3" }, "engines": { @@ -7579,7 +7542,6 @@ "integrity": "sha512-vPZZsiOKaBAIATpFE2uMI4w5IRwdv/FpQ+qZZMR4E+PeOcM4OeoEbqxRMnywdxP19TyB/3h6QBB0EWon7letSQ==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@typescript-eslint/types": "^8.35.0", "comment-parser": "^1.4.1", @@ -7625,9 +7587,9 @@ } }, "node_modules/eslint-plugin-n": { - "version": "17.23.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-17.23.1.tgz", - "integrity": "sha512-68PealUpYoHOBh332JLLD9Sj7OQUDkFpmcfqt8R9sySfFSeuGJjMTJQvCRRB96zO3A/PELRLkPrzsHmzEFQQ5A==", + "version": "17.23.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-17.23.2.tgz", + "integrity": "sha512-RhWBeb7YVPmNa2eggvJooiuehdL76/bbfj/OJewyoGT80qn5PXdz8zMOTO6YHOsI7byPt7+Ighh/i/4a5/v7hw==", "dev": true, "license": "MIT", "dependencies": { @@ -7871,9 +7833,9 @@ } }, "node_modules/esquery": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", - "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.7.0.tgz", + "integrity": "sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==", "dev": true, "license": "BSD-3-Clause", "dependencies": { @@ -7926,15 +7888,6 @@ "node": ">= 0.6" } }, - "node_modules/event-target-shim": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", - "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, "node_modules/eventemitter3": { "version": "4.0.7", "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", @@ -8015,40 +7968,40 @@ } }, "node_modules/express": { - "version": "4.21.2", - "resolved": "https://registry.npmjs.org/express/-/express-4.21.2.tgz", - "integrity": "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==", + "version": "4.22.1", + "resolved": "https://registry.npmjs.org/express/-/express-4.22.1.tgz", + "integrity": "sha512-F2X8g9P1X7uCPZMA3MVf9wcTqlyNp7IhH5qPCI0izhaOIYXaW9L535tGA3qmjRzpH+bZczqq7hVKxTR4NWnu+g==", "dev": true, "license": "MIT", "dependencies": { "accepts": "~1.3.8", "array-flatten": "1.1.1", - "body-parser": "1.20.3", - "content-disposition": "0.5.4", + "body-parser": "~1.20.3", + "content-disposition": "~0.5.4", "content-type": "~1.0.4", - "cookie": "0.7.1", - "cookie-signature": "1.0.6", + "cookie": "~0.7.1", + "cookie-signature": "~1.0.6", "debug": "2.6.9", "depd": "2.0.0", "encodeurl": "~2.0.0", "escape-html": "~1.0.3", "etag": "~1.8.1", - "finalhandler": "1.3.1", - "fresh": "0.5.2", - "http-errors": "2.0.0", + "finalhandler": "~1.3.1", + "fresh": "~0.5.2", + "http-errors": "~2.0.0", "merge-descriptors": "1.0.3", "methods": "~1.1.2", - "on-finished": "2.4.1", + "on-finished": "~2.4.1", "parseurl": "~1.3.3", - "path-to-regexp": "0.1.12", + "path-to-regexp": "~0.1.12", "proxy-addr": "~2.0.7", - "qs": "6.13.0", + "qs": "~6.14.0", "range-parser": "~1.2.1", "safe-buffer": "5.2.1", - "send": "0.19.0", - "serve-static": "1.16.2", + "send": "~0.19.0", + "serve-static": "~1.16.2", "setprototypeof": "1.2.0", - "statuses": "2.0.1", + "statuses": "~2.0.1", "type-is": "~1.6.18", "utils-merge": "1.0.1", "vary": "~1.1.2" @@ -8078,22 +8031,6 @@ "dev": true, "license": "MIT" }, - "node_modules/express/node_modules/qs": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", - "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "side-channel": "^1.0.6" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -8192,18 +8129,18 @@ } }, "node_modules/finalhandler": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.1.tgz", - "integrity": "sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.2.tgz", + "integrity": "sha512-aA4RyPcd3badbdABGDuTXCMTtOneUCAYH/gxoYRTZlIJdF0YPWuGqiAsIrhNnnqdXGswYk6dGujem4w80UJFhg==", "dev": true, "license": "MIT", "dependencies": { "debug": "2.6.9", "encodeurl": "~2.0.0", "escape-html": "~1.0.3", - "on-finished": "2.4.1", + "on-finished": "~2.4.1", "parseurl": "~1.3.3", - "statuses": "2.0.1", + "statuses": "~2.0.2", "unpipe": "~1.0.0" }, "engines": { @@ -8703,13 +8640,6 @@ "dev": true, "license": "ISC" }, - "node_modules/graphemer": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", - "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", - "dev": true, - "license": "MIT" - }, "node_modules/handle-thing": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-2.0.1.tgz", @@ -8880,21 +8810,6 @@ "minimalistic-crypto-utils": "^1.0.1" } }, - "node_modules/hoist-non-react-statics": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", - "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==", - "license": "BSD-3-Clause", - "dependencies": { - "react-is": "^16.7.0" - } - }, - "node_modules/hoist-non-react-statics/node_modules/react-is": { - "version": "16.13.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", - "license": "MIT" - }, "node_modules/hpack.js": { "version": "2.1.6", "resolved": "https://registry.npmjs.org/hpack.js/-/hpack.js-2.1.6.tgz", @@ -9001,9 +8916,9 @@ } }, "node_modules/html-webpack-plugin": { - "version": "5.6.5", - "resolved": "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-5.6.5.tgz", - "integrity": "sha512-4xynFbKNNk+WlzXeQQ+6YYsH2g7mpfPszQZUi3ovKlj+pDmngQ7vRXjrrmGROabmKwyQkcgcX5hqfOwHbFmK5g==", + "version": "5.6.6", + "resolved": "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-5.6.6.tgz", + "integrity": "sha512-bLjW01UTrvoWTJQL5LsMRo1SypHW80FTm12OJRSnr3v6YHNhfe+1r0MYUZJMACxnCHURVnBWRwAsWs2yPU9Ezw==", "dev": true, "license": "MIT", "dependencies": { @@ -9071,20 +8986,24 @@ "license": "MIT" }, "node_modules/http-errors": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", - "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz", + "integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==", "dev": true, "license": "MIT", "dependencies": { - "depd": "2.0.0", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "toidentifier": "1.0.1" + "depd": "~2.0.0", + "inherits": "~2.0.4", + "setprototypeof": "~1.2.0", + "statuses": "~2.0.2", + "toidentifier": "~1.0.1" }, "engines": { "node": ">= 0.8" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, "node_modules/http-parser-js": { @@ -9189,12 +9108,6 @@ "node": ">=10.18" } }, - "node_modules/hyphenate-style-name": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/hyphenate-style-name/-/hyphenate-style-name-1.1.0.tgz", - "integrity": "sha512-WDC/ui2VVRrz3jOVi+XtjqkDjiVjTtFaAGiW37k6b+ohyQ5wYDOGkvCZa8+H0nx3gyvv0+BST9xuOgIyGQ00gw==", - "license": "BSD-3-Clause" - }, "node_modules/iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", @@ -9212,6 +9125,7 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true, "funding": [ { "type": "github", @@ -9648,12 +9562,6 @@ "node": ">=0.10.0" } }, - "node_modules/is-in-browser": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/is-in-browser/-/is-in-browser-1.1.3.tgz", - "integrity": "sha512-FeXIBgG/CPGd/WUxuEyvgGTEfwiG9Z4EKGxjNMRqviiIIfsmgrpnHLffEDdwUHqNva1VEW91o3xBT/m8Elgl9g==", - "license": "MIT" - }, "node_modules/is-inside-container": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz", @@ -10164,7 +10072,6 @@ "integrity": "sha512-F26gjC0yWN8uAA5m5Ss8ZQf5nDHWGlN/xWZIh8S5SRbsEKBovwZhxGd6LJlbZYxBgCYOtreSUyb8hpXyGC5O4A==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@jest/core": "30.2.0", "@jest/types": "30.2.0", @@ -11221,6 +11128,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true, "license": "MIT" }, "node_modules/js-yaml": { @@ -11243,7 +11151,6 @@ "integrity": "sha512-Cvc9WUhxSMEo4McES3P7oK3QaXldCfNWp7pl2NNeiIFlCoLr3kfq9kb1fxftiwk1FLV7CvpvDfonxtzUDeSOPg==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "cssstyle": "^4.2.1", "data-urls": "^5.0.0", @@ -11312,223 +11219,24 @@ "dev": true, "license": "MIT" }, - "node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true, - "license": "MIT" - }, - "node_modules/json5": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", - "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", - "dev": true, - "license": "MIT", - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/jsonld": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/jsonld/-/jsonld-9.0.0.tgz", - "integrity": "sha512-pjMIdkXfC1T2wrX9B9i2uXhGdyCmgec3qgMht+TDj+S0qX3bjWMQUfL7NeqEhuRTi8G5ESzmL9uGlST7nzSEWg==", - "license": "BSD-3-Clause", - "dependencies": { - "@digitalbazaar/http-client": "^4.2.0", - "canonicalize": "^2.1.0", - "lru-cache": "^6.0.0", - "rdf-canonize": "^5.0.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/jsonld/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/jsonld/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "license": "ISC" - }, - "node_modules/jss": { - "version": "10.10.0", - "resolved": "https://registry.npmjs.org/jss/-/jss-10.10.0.tgz", - "integrity": "sha512-cqsOTS7jqPsPMjtKYDUpdFC0AbhYFLTcuGRqymgmdJIeQ8cH7+AgX7YSgQy79wXloZq2VvATYxUOUQEvS1V/Zw==", - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.3.1", - "csstype": "^3.0.2", - "is-in-browser": "^1.1.3", - "tiny-warning": "^1.0.2" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/jss" - } - }, - "node_modules/jss-plugin-camel-case": { - "version": "10.10.0", - "resolved": "https://registry.npmjs.org/jss-plugin-camel-case/-/jss-plugin-camel-case-10.10.0.tgz", - "integrity": "sha512-z+HETfj5IYgFxh1wJnUAU8jByI48ED+v0fuTuhKrPR+pRBYS2EDwbusU8aFOpCdYhtRc9zhN+PJ7iNE8pAWyPw==", - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.3.1", - "hyphenate-style-name": "^1.0.3", - "jss": "10.10.0" - } - }, - "node_modules/jss-plugin-compose": { - "version": "10.10.0", - "resolved": "https://registry.npmjs.org/jss-plugin-compose/-/jss-plugin-compose-10.10.0.tgz", - "integrity": "sha512-F5kgtWpI2XfZ3Z8eP78tZEYFdgTIbpA/TMuX3a8vwrNolYtN1N4qJR/Ob0LAsqIwCMLojtxN7c7Oo/+Vz6THow==", - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.3.1", - "jss": "10.10.0", - "tiny-warning": "^1.0.2" - } - }, - "node_modules/jss-plugin-default-unit": { - "version": "10.10.0", - "resolved": "https://registry.npmjs.org/jss-plugin-default-unit/-/jss-plugin-default-unit-10.10.0.tgz", - "integrity": "sha512-SvpajxIECi4JDUbGLefvNckmI+c2VWmP43qnEy/0eiwzRUsafg5DVSIWSzZe4d2vFX1u9nRDP46WCFV/PXVBGQ==", - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.3.1", - "jss": "10.10.0" - } - }, - "node_modules/jss-plugin-expand": { - "version": "10.10.0", - "resolved": "https://registry.npmjs.org/jss-plugin-expand/-/jss-plugin-expand-10.10.0.tgz", - "integrity": "sha512-ymT62W2OyDxBxr7A6JR87vVX9vTq2ep5jZLIdUSusfBIEENLdkkc0lL/Xaq8W9s3opUq7R0sZQpzRWELrfVYzA==", - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.3.1", - "jss": "10.10.0" - } - }, - "node_modules/jss-plugin-extend": { - "version": "10.10.0", - "resolved": "https://registry.npmjs.org/jss-plugin-extend/-/jss-plugin-extend-10.10.0.tgz", - "integrity": "sha512-sKYrcMfr4xxigmIwqTjxNcHwXJIfvhvjTNxF+Tbc1NmNdyspGW47Ey6sGH8BcQ4FFQhLXctpWCQSpDwdNmXSwg==", - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.3.1", - "jss": "10.10.0", - "tiny-warning": "^1.0.2" - } - }, - "node_modules/jss-plugin-global": { - "version": "10.10.0", - "resolved": "https://registry.npmjs.org/jss-plugin-global/-/jss-plugin-global-10.10.0.tgz", - "integrity": "sha512-icXEYbMufiNuWfuazLeN+BNJO16Ge88OcXU5ZDC2vLqElmMybA31Wi7lZ3lf+vgufRocvPj8443irhYRgWxP+A==", - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.3.1", - "jss": "10.10.0" - } - }, - "node_modules/jss-plugin-nested": { - "version": "10.10.0", - "resolved": "https://registry.npmjs.org/jss-plugin-nested/-/jss-plugin-nested-10.10.0.tgz", - "integrity": "sha512-9R4JHxxGgiZhurDo3q7LdIiDEgtA1bTGzAbhSPyIOWb7ZubrjQe8acwhEQ6OEKydzpl8XHMtTnEwHXCARLYqYA==", - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.3.1", - "jss": "10.10.0", - "tiny-warning": "^1.0.2" - } - }, - "node_modules/jss-plugin-props-sort": { - "version": "10.10.0", - "resolved": "https://registry.npmjs.org/jss-plugin-props-sort/-/jss-plugin-props-sort-10.10.0.tgz", - "integrity": "sha512-5VNJvQJbnq/vRfje6uZLe/FyaOpzP/IH1LP+0fr88QamVrGJa0hpRRyAa0ea4U/3LcorJfBFVyC4yN2QC73lJg==", - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.3.1", - "jss": "10.10.0" - } - }, - "node_modules/jss-plugin-rule-value-function": { - "version": "10.10.0", - "resolved": "https://registry.npmjs.org/jss-plugin-rule-value-function/-/jss-plugin-rule-value-function-10.10.0.tgz", - "integrity": "sha512-uEFJFgaCtkXeIPgki8ICw3Y7VMkL9GEan6SqmT9tqpwM+/t+hxfMUdU4wQ0MtOiMNWhwnckBV0IebrKcZM9C0g==", - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.3.1", - "jss": "10.10.0", - "tiny-warning": "^1.0.2" - } - }, - "node_modules/jss-plugin-rule-value-observable": { - "version": "10.10.0", - "resolved": "https://registry.npmjs.org/jss-plugin-rule-value-observable/-/jss-plugin-rule-value-observable-10.10.0.tgz", - "integrity": "sha512-ZLMaYrR3QE+vD7nl3oNXuj79VZl9Kp8/u6A1IbTPDcuOu8b56cFdWRZNZ0vNr8jHewooEeq2doy8Oxtymr2ZPA==", - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.3.1", - "jss": "10.10.0", - "symbol-observable": "^1.2.0" - } - }, - "node_modules/jss-plugin-template": { - "version": "10.10.0", - "resolved": "https://registry.npmjs.org/jss-plugin-template/-/jss-plugin-template-10.10.0.tgz", - "integrity": "sha512-ocXZBIOJOA+jISPdsgkTs8wwpK6UbsvtZK5JI7VUggTD6LWKbtoxUzadd2TpfF+lEtlhUmMsCkTRNkITdPKa6w==", - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.3.1", - "jss": "10.10.0", - "tiny-warning": "^1.0.2" - } - }, - "node_modules/jss-plugin-vendor-prefixer": { - "version": "10.10.0", - "resolved": "https://registry.npmjs.org/jss-plugin-vendor-prefixer/-/jss-plugin-vendor-prefixer-10.10.0.tgz", - "integrity": "sha512-UY/41WumgjW8r1qMCO8l1ARg7NHnfRVWRhZ2E2m0DMYsr2DD91qIXLyNhiX83hHswR7Wm4D+oDYNC1zWCJWtqg==", - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.3.1", - "css-vendor": "^2.0.8", - "jss": "10.10.0" - } + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true, + "license": "MIT" }, - "node_modules/jss-preset-default": { - "version": "10.10.0", - "resolved": "https://registry.npmjs.org/jss-preset-default/-/jss-preset-default-10.10.0.tgz", - "integrity": "sha512-GL175Wt2FGhjE+f+Y3aWh+JioL06/QWFgZp53CbNNq6ZkVU0TDplD8Bxm9KnkotAYn3FlplNqoW5CjyLXcoJ7Q==", + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.3.1", - "jss": "10.10.0", - "jss-plugin-camel-case": "10.10.0", - "jss-plugin-compose": "10.10.0", - "jss-plugin-default-unit": "10.10.0", - "jss-plugin-expand": "10.10.0", - "jss-plugin-extend": "10.10.0", - "jss-plugin-global": "10.10.0", - "jss-plugin-nested": "10.10.0", - "jss-plugin-props-sort": "10.10.0", - "jss-plugin-rule-value-function": "10.10.0", - "jss-plugin-rule-value-observable": "10.10.0", - "jss-plugin-template": "10.10.0", - "jss-plugin-vendor-prefixer": "10.10.0" + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" } }, "node_modules/jsx-ast-utils": { @@ -11567,18 +11275,6 @@ "node": ">=0.10.0" } }, - "node_modules/ky": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/ky/-/ky-1.14.1.tgz", - "integrity": "sha512-hYje4L9JCmpEQBtudo+v52X5X8tgWXUYyPcxKSuxQNboqufecl9VMWjGiucAFH060AwPXHZuH+WB2rrqfkmafw==", - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sindresorhus/ky?sponsor=1" - } - }, "node_modules/launch-editor": { "version": "2.12.0", "resolved": "https://registry.npmjs.org/launch-editor/-/launch-editor-2.12.0.tgz", @@ -11622,9 +11318,9 @@ "license": "MIT" }, "node_modules/lit-html": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/lit-html/-/lit-html-3.3.1.tgz", - "integrity": "sha512-S9hbyDu/vs1qNrithiNyeyv64c9yqiW9l+DBgI18fL+MTvOtWoFR0FWiyq1TxaYef5wNlpEmzlXoBlZEO+WjoA==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/lit-html/-/lit-html-3.3.2.tgz", + "integrity": "sha512-Qy9hU88zcmaxBXcc10ZpdK7cOLXvXpRoBxERdtqV9QOrfpMZZ6pSYP91LhpPtap3sFMUiL7Tw2RImbe0Al2/kw==", "license": "BSD-3-Clause", "dependencies": { "@types/trusted-types": "^2.0.2" @@ -11692,6 +11388,7 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "dev": true, "license": "MIT", "dependencies": { "js-tokens": "^3.0.0 || ^4.0.0" @@ -11827,9 +11524,9 @@ } }, "node_modules/memfs": { - "version": "4.51.0", - "resolved": "https://registry.npmjs.org/memfs/-/memfs-4.51.0.tgz", - "integrity": "sha512-4zngfkVM/GpIhC8YazOsM6E8hoB33NP0BCESPOA6z7qaL6umPJNqkO8CNYaLV2FB2MV6H1O3x2luHHOSqppv+A==", + "version": "4.53.0", + "resolved": "https://registry.npmjs.org/memfs/-/memfs-4.53.0.tgz", + "integrity": "sha512-TKFRsKjJA30iAc9ZeGH/77v5nLcNUD0GBOL/tAj4O63RPIKNxGDZ54ZyuQM4KjEKEj7gfer/Ta1xAzB+HrEnrA==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -12036,35 +11733,6 @@ "multicast-dns": "cli.js" } }, - "node_modules/n3": { - "version": "1.26.0", - "resolved": "https://registry.npmjs.org/n3/-/n3-1.26.0.tgz", - "integrity": "sha512-SQknS0ua90rN+3RHuk8BeIqeYyqIH/+ecViZxX08jR4j6MugqWRjtONl3uANG/crWXnOM2WIqBJtjIhVYFha+w==", - "license": "MIT", - "dependencies": { - "buffer": "^6.0.3", - "readable-stream": "^4.0.0" - }, - "engines": { - "node": ">=12.0" - } - }, - "node_modules/n3/node_modules/readable-stream": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.7.0.tgz", - "integrity": "sha512-oIGGmcpTLwPga8Bn6/Z75SVaH1z5dUut2ibSyAMVhmUggWpmDn2dapB0n7f8nwaSiRtepAsfJyfXIO5DCVAODg==", - "license": "MIT", - "dependencies": { - "abort-controller": "^3.0.0", - "buffer": "^6.0.3", - "events": "^3.3.0", - "process": "^0.11.10", - "string_decoder": "^1.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, "node_modules/napi-postinstall": { "version": "0.3.4", "resolved": "https://registry.npmjs.org/napi-postinstall/-/napi-postinstall-0.3.4.tgz", @@ -12162,6 +11830,7 @@ "version": "2.7.0", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "dev": true, "license": "MIT", "dependencies": { "whatwg-url": "^5.0.0" @@ -12182,34 +11851,27 @@ "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "dev": true, "license": "MIT" }, "node_modules/node-fetch/node_modules/webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "dev": true, "license": "BSD-2-Clause" }, "node_modules/node-fetch/node_modules/whatwg-url": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dev": true, "license": "MIT", "dependencies": { "tr46": "~0.0.3", "webidl-conversions": "^3.0.0" } }, - "node_modules/node-forge": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.2.tgz", - "integrity": "sha512-6xKiQ+cph9KImrRh0VsjH2d8/GXA4FIMlgU4B757iI1ApvcyA9VlouP0yZJha01V+huImO+kKMU7ih+2+E14fw==", - "dev": true, - "license": "(BSD-3-Clause OR GPL-2.0)", - "engines": { - "node": ">= 6.13.0" - } - }, "node_modules/node-int64": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", @@ -12368,9 +12030,9 @@ } }, "node_modules/nwsapi": { - "version": "2.2.22", - "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.22.tgz", - "integrity": "sha512-ujSMe1OWVn55euT1ihwCI1ZcAaAU3nxUiDwfDQldc51ZXaB9m2AyOn6/jh1BLe2t/G8xd6uKG1UBF2aZJeg2SQ==", + "version": "2.2.23", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.23.tgz", + "integrity": "sha512-7wfH4sLbt4M0gCDzGE6vzQBo0bfTKjU7Sfpqy/7gs1qBfYz2vEJH6vXcBKpO3+6Yu1telwd0t9HpyOoLEQQbIQ==", "dev": true, "license": "MIT" }, @@ -12378,6 +12040,7 @@ "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -12699,6 +12362,10 @@ "solid-logic": "^4.0.0" } }, + "node_modules/pane-registry-jss": { + "resolved": "../pane-registry-jss", + "link": true + }, "node_modules/param-case": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/param-case/-/param-case-3.0.4.tgz", @@ -13011,6 +12678,37 @@ "node": ">=8" } }, + "node_modules/pkijs": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/pkijs/-/pkijs-3.3.3.tgz", + "integrity": "sha512-+KD8hJtqQMYoTuL1bbGOqxb4z+nZkTAwVdNtWwe8Tc2xNbEmdJYIYoc6Qt0uF55e6YW6KuTHw1DjQ18gMhzepw==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@noble/hashes": "1.4.0", + "asn1js": "^3.0.6", + "bytestreamjs": "^2.0.1", + "pvtsutils": "^1.3.6", + "pvutils": "^1.1.3", + "tslib": "^2.8.1" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/pkijs/node_modules/@noble/hashes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", + "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/pngjs": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/pngjs/-/pngjs-5.0.0.tgz", @@ -13083,6 +12781,7 @@ "version": "0.11.10", "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", + "dev": true, "license": "MIT", "engines": { "node": ">= 0.6.0" @@ -13123,6 +12822,7 @@ "version": "15.8.1", "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", + "dev": true, "license": "MIT", "dependencies": { "loose-envify": "^1.4.0", @@ -13134,6 +12834,7 @@ "version": "16.13.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", + "dev": true, "license": "MIT" }, "node_modules/proxy-addr": { @@ -13206,6 +12907,26 @@ ], "license": "MIT" }, + "node_modules/pvtsutils": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/pvtsutils/-/pvtsutils-1.3.6.tgz", + "integrity": "sha512-PLgQXQ6H2FWCaeRak8vvk1GW462lMxB5s3Jm673N82zI4vqtVUPuZdffdZbPDFRoU8kAhItWFtPCWiPpp4/EDg==", + "dev": true, + "license": "MIT", + "dependencies": { + "tslib": "^2.8.1" + } + }, + "node_modules/pvutils": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/pvutils/-/pvutils-1.1.5.tgz", + "integrity": "sha512-KTqnxsgGiQ6ZAzZCVlJH5eOjSnvlyEgx1m8bkRJfOhmGRqfo5KLvmAlACQkrjEtOQ4B7wF9TdSLIs9O90MX9xA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=16.0.0" + } + }, "node_modules/qrcode": { "version": "1.5.4", "resolved": "https://registry.npmjs.org/qrcode/-/qrcode-1.5.4.tgz", @@ -13342,9 +13063,9 @@ } }, "node_modules/qs": { - "version": "6.14.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.0.tgz", - "integrity": "sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==", + "version": "6.14.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.1.tgz", + "integrity": "sha512-4EK3+xJl8Ts67nLYNwqw/dsFVnCf+qR7RgXSK9jEEm9unao3njwMDdmsdvoKBKHzxd7tCYz5e5M+SnMjdtXGQQ==", "dev": true, "license": "BSD-3-Clause", "dependencies": { @@ -13397,79 +13118,62 @@ } }, "node_modules/raw-body": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", - "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.3.tgz", + "integrity": "sha512-s4VSOf6yN0rvbRZGxs8Om5CWj6seneMwK3oDb4lWDH0UPhWcxwOWw5+qk24bxq87szX1ydrwylIOp2uG1ojUpA==", "dev": true, "license": "MIT", "dependencies": { - "bytes": "3.1.2", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" + "bytes": "~3.1.2", + "http-errors": "~2.0.1", + "iconv-lite": "~0.4.24", + "unpipe": "~1.0.0" }, "engines": { "node": ">= 0.8" } }, - "node_modules/rdf-canonize": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/rdf-canonize/-/rdf-canonize-5.0.0.tgz", - "integrity": "sha512-g8OUrgMXAR9ys/ZuJVfBr05sPPoMA7nHIVs8VEvg9QwM5W4GR2qSFEEHjsyHF1eWlBaf8Ev40WNjQFQ+nJTO3w==", - "license": "BSD-3-Clause", - "dependencies": { - "setimmediate": "^1.0.5" - }, - "engines": { - "node": ">=18" - } - }, "node_modules/rdflib": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/rdflib/-/rdflib-2.3.2.tgz", - "integrity": "sha512-oYgR6oEPt62lAyz+Tkut6F24izh80l+qmkYHpF4nYFmBGzgURjTMidYseQnsYot4hMMUXE+lAz4boX02vZDQ8g==", + "version": "2.3.5", + "resolved": "git+ssh://git@github.com/JavaScriptSolidServer/rdflib.js.git#e7d16daf268d044736ba3233757ddaca0d43620d", "license": "MIT", - "peer": true, "dependencies": { "@babel/runtime": "^7.28.4", - "@frogcat/ttl2jsonld": "^0.0.10", "@rdfjs/types": "^2.0.1", - "@xmldom/xmldom": "^0.8.11", - "cross-fetch": "^4.1.0", - "jsonld": "^9.0.0", - "n3": "^1.26.0", "solid-namespace": "^0.5.4" - } - }, - "node_modules/rdflib/node_modules/cross-fetch": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-4.1.0.tgz", - "integrity": "sha512-uKm5PU+MHTootlWEY+mZ4vvXoCn4fLQxT9dSc1sXVMSFkINTJVN8cAQROpwcKm8bJ/c7rgZVIBWzH5T78sNZZw==", - "license": "MIT", - "dependencies": { - "node-fetch": "^2.7.0" + }, + "peerDependencies": { + "@frogcat/ttl2jsonld": "^0.0.10", + "@xmldom/xmldom": "^0.8.11", + "jsonld": "^9.0.0" + }, + "peerDependenciesMeta": { + "@frogcat/ttl2jsonld": { + "optional": true + }, + "@xmldom/xmldom": { + "optional": true + }, + "jsonld": { + "optional": true + } } }, "node_modules/react": { "version": "19.2.3", "resolved": "https://registry.npmjs.org/react/-/react-19.2.3.tgz", "integrity": "sha512-Ku/hhYbVjOQnXDZFv2+RibmLFGwFdeeKHFcOTlrt7xplBnya5OGn/hIRDsqDiSUcfORsDC7MPxwork8jBwsIWA==", + "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=0.10.0" } }, - "node_modules/react-display-name": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/react-display-name/-/react-display-name-0.2.5.tgz", - "integrity": "sha512-I+vcaK9t4+kypiSgaiVWAipqHRXYmZIuAiS8vzFvXHHXVigg/sMKwlRgLy6LH2i3rmP+0Vzfl5lFsFRwF1r3pg==", - "license": "MIT" - }, "node_modules/react-dom": { "version": "19.2.3", "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.3.tgz", "integrity": "sha512-yELu4WmLPw5Mr/lmeEpox5rw3RETacE++JgHqQzd2dg+YbJuat3jH4ingc+WPZhxaoFzdv9y33G+F7Nl5O0GBg==", + "dev": true, "license": "MIT", "dependencies": { "scheduler": "^0.27.0" @@ -13485,28 +13189,6 @@ "dev": true, "license": "MIT" }, - "node_modules/react-jss": { - "version": "10.10.0", - "resolved": "https://registry.npmjs.org/react-jss/-/react-jss-10.10.0.tgz", - "integrity": "sha512-WLiq84UYWqNBF6579/uprcIUnM1TSywYq6AIjKTTTG5ziJl9Uy+pwuvpN3apuyVwflMbD60PraeTKT7uWH9XEQ==", - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.3.1", - "@emotion/is-prop-valid": "^0.7.3", - "css-jss": "10.10.0", - "hoist-non-react-statics": "^3.2.0", - "is-in-browser": "^1.1.3", - "jss": "10.10.0", - "jss-preset-default": "10.10.0", - "prop-types": "^15.6.0", - "shallow-equal": "^1.2.0", - "theming": "^3.3.0", - "tiny-warning": "^1.0.2" - }, - "peerDependencies": { - "react": ">=16.8.6" - } - }, "node_modules/readable-stream": { "version": "3.6.2", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", @@ -13562,6 +13244,13 @@ "node": ">=8" } }, + "node_modules/reflect-metadata": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.2.2.tgz", + "integrity": "sha512-urBwgfrvVP/eAyXx4hluJivBKzuEbSQs9rKWCrCkbSxNv8mxPcUZKeuoF3Uy4mJl3Lwprp6yy5/39VWigZ4K6Q==", + "dev": true, + "license": "Apache-2.0" + }, "node_modules/reflect.getprototypeof": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.10.tgz", @@ -13990,6 +13679,7 @@ "version": "0.27.0", "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.27.0.tgz", "integrity": "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==", + "dev": true, "license": "MIT" }, "node_modules/schema-utils": { @@ -14018,7 +13708,6 @@ "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -14058,17 +13747,17 @@ "license": "MIT" }, "node_modules/selfsigned": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-2.4.1.tgz", - "integrity": "sha512-th5B4L2U+eGLq1TVh7zNRGBapioSORUeymIydxgFpwww9d2qyKvtuPU2jJuHvYAwwqi2Y596QBL3eEqcPEYL8Q==", + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-5.5.0.tgz", + "integrity": "sha512-ftnu3TW4+3eBfLRFnDEkzGxSF/10BJBkaLJuBHZX0kiPS7bRdlpZGu6YGt4KngMkdTwJE6MbjavFpqHvqVt+Ew==", "dev": true, "license": "MIT", "dependencies": { - "@types/node-forge": "^1.3.0", - "node-forge": "^1" + "@peculiar/x509": "^1.14.2", + "pkijs": "^3.3.3" }, "engines": { - "node": ">=10" + "node": ">=18" } }, "node_modules/semver": { @@ -14082,25 +13771,25 @@ } }, "node_modules/send": { - "version": "0.19.0", - "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz", - "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==", + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/send/-/send-0.19.2.tgz", + "integrity": "sha512-VMbMxbDeehAxpOtWJXlcUS5E8iXh6QmN+BkRX1GARS3wRaXEEgzCcB10gTQazO42tpNIya8xIyNx8fll1OFPrg==", "dev": true, "license": "MIT", "dependencies": { "debug": "2.6.9", "depd": "2.0.0", "destroy": "1.2.0", - "encodeurl": "~1.0.2", + "encodeurl": "~2.0.0", "escape-html": "~1.0.3", "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "2.0.0", + "fresh": "~0.5.2", + "http-errors": "~2.0.1", "mime": "1.6.0", "ms": "2.1.3", - "on-finished": "2.4.1", + "on-finished": "~2.4.1", "range-parser": "~1.2.1", - "statuses": "2.0.1" + "statuses": "~2.0.2" }, "engines": { "node": ">= 0.8.0" @@ -14123,21 +13812,12 @@ "dev": true, "license": "MIT" }, - "node_modules/send/node_modules/encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, "node_modules/serialize-javascript": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz", "integrity": "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==", "license": "BSD-3-Clause", + "peer": true, "dependencies": { "randombytes": "^2.1.0" } @@ -14252,16 +13932,16 @@ } }, "node_modules/serve-static": { - "version": "1.16.2", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz", - "integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==", + "version": "1.16.3", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.3.tgz", + "integrity": "sha512-x0RTqQel6g5SY7Lg6ZreMmsOzncHFU7nhnRWkKgWuMTu5NN0DR5oruckMqRvacAN9d5w6ARnRBXl9xhDCgfMeA==", "dev": true, "license": "MIT", "dependencies": { "encodeurl": "~2.0.0", "escape-html": "~1.0.3", "parseurl": "~1.3.3", - "send": "0.19.0" + "send": "~0.19.1" }, "engines": { "node": ">= 0.8.0" @@ -14326,6 +14006,7 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==", + "dev": true, "license": "MIT" }, "node_modules/setprototypeof": { @@ -14369,12 +14050,6 @@ "node": ">=8" } }, - "node_modules/shallow-equal": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/shallow-equal/-/shallow-equal-1.2.1.tgz", - "integrity": "sha512-S4vJDjHHMBaiZuT9NPb616CSmLf618jawtv3sufLl6ivK8WocjAo58cXwbRV1cgqxH0Qbv+iUt6m05eqEa2IRA==", - "license": "MIT" - }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -14540,12 +14215,37 @@ "rdflib": "^2.3.0" } }, + "node_modules/solid-logic-jss": { + "version": "4.1.1", + "resolved": "git+ssh://git@github.com/JavaScriptSolidServer/solid-logic-jss.git#fa33b353118e5dc3f7845b959e40c2135237134c", + "dev": true, + "license": "MIT", + "dependencies": { + "solid-namespace": "^0.5.4", + "solid-oidc": "github:JavaScriptSolidServer/solid-oidc" + }, + "peerDependencies": { + "rdflib": "github:JavaScriptSolidServer/rdflib.js" + } + }, "node_modules/solid-namespace": { "version": "0.5.4", "resolved": "https://registry.npmjs.org/solid-namespace/-/solid-namespace-0.5.4.tgz", "integrity": "sha512-oPAv8xIg2MOLz069JRdvsSbYCpQN+umPJJ9LBFPzCrYuSw+dW4TMUOTDxTWS5xy+B3XN4+Fx3iIS5Jm8abm4Mg==", "license": "MIT" }, + "node_modules/solid-oidc": { + "version": "0.0.4", + "resolved": "git+ssh://git@github.com/JavaScriptSolidServer/solid-oidc.git#fe7d838f37255ed02f6bb2ac6bece6ee941d19b0", + "dev": true, + "license": "MIT", + "dependencies": { + "jose": "^5.9.6" + }, + "engines": { + "node": ">=14" + } + }, "node_modules/solid-ui": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/solid-ui/-/solid-ui-3.0.1.tgz", @@ -14566,7 +14266,28 @@ }, "peerDependencies": { "rdflib": "^2.3.0", - "solid-logic": "^4.0.0" + "solid-logic": "^4.0.1" + } + }, + "node_modules/solid-ui-jss": { + "version": "3.0.4", + "resolved": "git+ssh://git@github.com/JavaScriptSolidServer/solid-ui-jss.git#dc6b97308f191aadbfde23858a348377973aa07a", + "dev": true, + "license": "MIT", + "dependencies": { + "@noble/curves": "^1.9.6", + "@noble/hashes": "^1.8.0", + "escape-html": "^1.0.3", + "pane-registry": "^3.0.0", + "solid-namespace": "^0.5.4", + "uuid": "^11.1.0" + }, + "optionalDependencies": { + "fsevents": "*" + }, + "peerDependencies": { + "rdflib": "github:JavaScriptSolidServer/rdflib.js", + "solid-logic-jss": "github:JavaScriptSolidServer/solid-logic-jss" } }, "node_modules/source-map": { @@ -14681,9 +14402,9 @@ } }, "node_modules/statuses": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", - "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz", + "integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==", "dev": true, "license": "MIT", "engines": { @@ -14732,6 +14453,7 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, "license": "MIT", "dependencies": { "safe-buffer": "~5.2.0" @@ -14977,15 +14699,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/symbol-observable": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.2.0.tgz", - "integrity": "sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/symbol-tree": { "version": "3.2.4", "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", @@ -14994,9 +14707,9 @@ "license": "MIT" }, "node_modules/synckit": { - "version": "0.11.11", - "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.11.11.tgz", - "integrity": "sha512-MeQTA1r0litLUf0Rp/iisCaL8761lKAZHaimlbGK4j0HysC4PLfqygQj9srcs0m2RdtDYnF8UuYyKpbjHYp7Jw==", + "version": "0.11.12", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.11.12.tgz", + "integrity": "sha512-Bh7QjT8/SuKUIfObSXNHNSK6WHo6J1tHCqJsuaFDP7gP0fkzSfTxI8y85JrppZ0h8l0maIgc2tfuZQ6/t3GtnQ==", "dev": true, "license": "MIT", "dependencies": { @@ -15024,9 +14737,9 @@ } }, "node_modules/terser": { - "version": "5.44.1", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.44.1.tgz", - "integrity": "sha512-t/R3R/n0MSwnnazuPpPNVO60LX0SKL45pyl9YlvxIdkH0Of7D5qM2EVe+yASRIlY5pZ73nclYJfNANGWPwFDZw==", + "version": "5.46.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.46.0.tgz", + "integrity": "sha512-jTwoImyr/QbOWFFso3YoU3ik0jBBDJ6JTOQiy/J2YxVJdZCc+5u7skhNwiOR3FQIygFqVUPHl7qbbxtjW2K3Qg==", "dev": true, "license": "BSD-2-Clause", "dependencies": { @@ -15175,24 +14888,6 @@ "node": "*" } }, - "node_modules/theming": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/theming/-/theming-3.3.0.tgz", - "integrity": "sha512-u6l4qTJRDaWZsqa8JugaNt7Xd8PPl9+gonZaIe28vAhqgHMIG/DOyFPqiKN/gQLQYj05tHv+YQdNILL4zoiAVA==", - "license": "MIT", - "dependencies": { - "hoist-non-react-statics": "^3.3.0", - "prop-types": "^15.5.8", - "react-display-name": "^0.2.4", - "tiny-warning": "^1.0.2" - }, - "engines": { - "node": ">=8" - }, - "peerDependencies": { - "react": ">=16.3" - } - }, "node_modules/thingies": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/thingies/-/thingies-2.5.0.tgz", @@ -15217,12 +14912,6 @@ "dev": true, "license": "MIT" }, - "node_modules/timeago.js": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/timeago.js/-/timeago.js-4.0.2.tgz", - "integrity": "sha512-a7wPxPdVlQL7lqvitHGGRsofhdwtkoSXPGATFuSOA2i1ZNQEPLrGnj68vOp2sOJTCFAQVXPeNMX/GctBaO9L2w==", - "license": "MIT" - }, "node_modules/timers-browserify": { "version": "2.0.12", "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.12.tgz", @@ -15236,12 +14925,6 @@ "node": ">=0.6.0" } }, - "node_modules/tiny-warning": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/tiny-warning/-/tiny-warning-1.0.3.tgz", - "integrity": "sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA==", - "license": "MIT" - }, "node_modules/tinyglobby": { "version": "0.2.15", "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz", @@ -15283,7 +14966,6 @@ "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=12" }, @@ -15410,9 +15092,9 @@ } }, "node_modules/ts-api-utils": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.3.0.tgz", - "integrity": "sha512-6eg3Y9SF7SsAvGzRHQvvc1skDAhwI4YQ32ui1scxD1Ccr0G5qIIbUBT3pFTKX8kmWIQClHobtUdNuaBgwdfdWg==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.4.0.tgz", + "integrity": "sha512-3TaVTaAv2gTiMB35i3FiGJaRfwb3Pyn/j3m/bfAvGe8FB7CF6u+LMYqYlDh7reQf7UNvoTvdfAqHGmPGOSsPmA==", "dev": true, "license": "MIT", "engines": { @@ -15542,8 +15224,27 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", "dev": true, - "license": "0BSD", - "peer": true + "license": "0BSD" + }, + "node_modules/tsyringe": { + "version": "4.10.0", + "resolved": "https://registry.npmjs.org/tsyringe/-/tsyringe-4.10.0.tgz", + "integrity": "sha512-axr3IdNuVIxnaK5XGEUFTu3YmAQ6lllgrvqfEoR16g/HGnYY/6We4oWENtAnzK6/LpJ2ur9PAb80RBt7/U4ugw==", + "dev": true, + "license": "MIT", + "dependencies": { + "tslib": "^1.9.3" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/tsyringe/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true, + "license": "0BSD" }, "node_modules/tty-browserify": { "version": "0.0.1", @@ -15718,41 +15419,16 @@ } }, "node_modules/typescript-eslint": { - "version": "8.48.0", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.48.0.tgz", - "integrity": "sha512-fcKOvQD9GUn3Xw63EgiDqhvWJ5jsyZUaekl3KVpGsDJnN46WJTe3jWxtQP9lMZm1LJNkFLlTaWAxK2vUQR+cqw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/eslint-plugin": "8.48.0", - "@typescript-eslint/parser": "8.48.0", - "@typescript-eslint/typescript-estree": "8.48.0", - "@typescript-eslint/utils": "8.48.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <6.0.0" - } - }, - "node_modules/typescript-eslint/node_modules/@typescript-eslint/parser": { - "version": "8.48.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.48.0.tgz", - "integrity": "sha512-jCzKdm/QK0Kg4V4IK/oMlRZlY+QOcdjv89U2NgKHZk1CYTj82/RVSx1mV/0gqCVMJ/DA+Zf/S4NBWNF8GQ+eqQ==", + "version": "8.53.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.53.0.tgz", + "integrity": "sha512-xHURCQNxZ1dsWn0sdOaOfCSQG0HKeqSj9OexIxrz6ypU6wHYOdX2I3D2b8s8wFSsSOYJb+6q283cLiLlkEsBYw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/scope-manager": "8.48.0", - "@typescript-eslint/types": "8.48.0", - "@typescript-eslint/typescript-estree": "8.48.0", - "@typescript-eslint/visitor-keys": "8.48.0", - "debug": "^4.3.4" + "@typescript-eslint/eslint-plugin": "8.53.0", + "@typescript-eslint/parser": "8.53.0", + "@typescript-eslint/typescript-estree": "8.53.0", + "@typescript-eslint/utils": "8.53.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -15799,15 +15475,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/undici": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/undici/-/undici-6.22.0.tgz", - "integrity": "sha512-hU/10obOIu62MGYjdskASR3CUAiYaFTtC9Pa6vHyf//mAipSvSQg6od2CnJswq7fvzNS3zJhxoRkgNVaHurWKw==", - "license": "MIT", - "engines": { - "node": ">=18.17" - } - }, "node_modules/undici-types": { "version": "7.16.0", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz", @@ -16081,9 +15748,9 @@ } }, "node_modules/watchpack": { - "version": "2.4.4", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.4.tgz", - "integrity": "sha512-c5EGNOiyxxV5qmTtAB7rbiXxi1ooX1pQKMLX/MIabJjRA0SJBQOjKF+KSVfHkr9U1cADPon0mRiVe/riyaiDUA==", + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.5.1.tgz", + "integrity": "sha512-Zn5uXdcFNIA1+1Ei5McRd+iRzfhENPCe7LeABkJtNulSxjma+l7ltNx55BWZkRlwRnpOgHqxnjyaDgJnNXnqzg==", "dev": true, "license": "MIT", "dependencies": { @@ -16120,7 +15787,6 @@ "integrity": "sha512-Qphch25abbMNtekmEGJmeRUhLDbe+QfiWTiqpKYkpCOWY64v9eyl+KRRLmqOFA2AvKPpc9DC6+u2n76tQLBoaA==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@types/eslint-scope": "^3.7.7", "@types/estree": "^1.0.8", @@ -16170,7 +15836,6 @@ "integrity": "sha512-MfwFQ6SfwinsUVi0rNJm7rHZ31GyTcpVE5pgVA3hwFRb7COD4TzjUUwhGWKfO50+xdc2MQPuEBBJoqIMGt3JDw==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@discoveryjs/json-ext": "^0.6.1", "@webpack-cli/configtest": "^3.0.1", @@ -16249,15 +15914,15 @@ } }, "node_modules/webpack-dev-server": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-5.2.2.tgz", - "integrity": "sha512-QcQ72gh8a+7JO63TAx/6XZf/CWhgMzu5m0QirvPfGvptOusAxG12w2+aua1Jkjr7hzaWDnJ2n6JFeexMHI+Zjg==", + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-5.2.3.tgz", + "integrity": "sha512-9Gyu2F7+bg4Vv+pjbovuYDhHX+mqdqITykfzdM9UyKqKHlsE5aAjRhR+oOEfXW5vBeu8tarzlJFIZva4ZjAdrQ==", "dev": true, "license": "MIT", "dependencies": { "@types/bonjour": "^3.5.13", "@types/connect-history-api-fallback": "^1.5.4", - "@types/express": "^4.17.21", + "@types/express": "^4.17.25", "@types/express-serve-static-core": "^4.17.21", "@types/serve-index": "^1.9.4", "@types/serve-static": "^1.15.5", @@ -16267,9 +15932,9 @@ "bonjour-service": "^1.2.1", "chokidar": "^3.6.0", "colorette": "^2.0.10", - "compression": "^1.7.4", + "compression": "^1.8.1", "connect-history-api-fallback": "^2.0.0", - "express": "^4.21.2", + "express": "^4.22.1", "graceful-fs": "^4.2.6", "http-proxy-middleware": "^2.0.9", "ipaddr.js": "^2.1.0", @@ -16277,7 +15942,7 @@ "open": "^10.0.3", "p-retry": "^6.2.0", "schema-utils": "^4.2.0", - "selfsigned": "^2.4.1", + "selfsigned": "^5.5.0", "serve-index": "^1.9.1", "sockjs": "^0.3.24", "spdy": "^4.0.2", @@ -16407,6 +16072,7 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-3.1.1.tgz", "integrity": "sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==", + "deprecated": "Use @exodus/bytes instead for a more spec-conformant and faster implementation", "dev": true, "license": "MIT", "dependencies": { @@ -16543,9 +16209,9 @@ "license": "ISC" }, "node_modules/which-typed-array": { - "version": "1.1.19", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.19.tgz", - "integrity": "sha512-rEvr90Bck4WZt9HHFC4DJMsjvu7x+r6bImz0/BrbWb7A2djJ8hnZMrWnHo9F8ssv0OMErasDhftrfROTyqSDrw==", + "version": "1.1.20", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.20.tgz", + "integrity": "sha512-LYfpUkmqwl0h9A2HL09Mms427Q1RZWuOHsukfVcKRq9q95iQxdw0ix1JQrqbcDR9PH1QDwf5Qo8OZb5lksZ8Xg==", "dev": true, "license": "MIT", "dependencies": { @@ -16660,9 +16326,9 @@ } }, "node_modules/ws": { - "version": "8.18.3", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.3.tgz", - "integrity": "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==", + "version": "8.19.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.19.0.tgz", + "integrity": "sha512-blAT2mjOEIi0ZzruJfIhb3nps74PRWTCz1IjglWEEpQl5XS/UNama6u2/rjFkDDouqr4L67ry+1aGIALViWjDg==", "dev": true, "license": "MIT", "engines": { diff --git a/package.json b/package.json index 5908fdad..3904bad4 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { - "name": "solid-panes", - "version": "4.0.0", - "description": "Solid-compatible Panes: applets and views for the mashlib and databrowser", + "name": "solid-panes-jss", + "version": "4.0.4", + "description": "Solid-compatible Panes (JSS variant with minimal solid-oidc authentication)", "main": "dist/index.js", "types": "dist/index.d.ts", "sideEffects": false, @@ -12,9 +12,9 @@ ], "scripts": { "clean": "rm -rf dist src/versionInfo.ts", - "build": "npm run clean && npm run build-version && npm run typecheck && npm run build-dist && npm run postbuild-js", - "build-version": "./timestamp.sh > src/versionInfo.ts && eslint 'src/versionInfo.ts' --fix", - "build-dist": "npm run build-js && npm run build-types", + "build": "npm run clean && npm run build-version && npm run build-dist && npm run postbuild-js", + "build-version": "./timestamp.sh > src/versionInfo.ts", + "build-dist": "npm run build-js", "build-js": "babel src --out-dir dist --extensions '.ts,.js' --source-maps", "build-types": "tsc --emitDeclarationOnly", "postbuild-js": "rm -f dist/versionInfo.d.ts dist/versionInfo.d.ts.map", @@ -34,7 +34,7 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/solidos/solid-panes.git" + "url": "git+https://github.com/JavaScriptSolidServer/solid-panes-jss.git" }, "keywords": [ "solid", @@ -52,29 +52,25 @@ "author": "Tim Berners-Lee ", "license": "MIT", "bugs": { - "url": "https://github.com/solidos/solid-panes/issues" + "url": "https://github.com/JavaScriptSolidServer/solid-panes-jss/issues" }, - "homepage": "https://github.com/solidos/solid-panes", + "homepage": "https://github.com/JavaScriptSolidServer/solid-panes-jss", "dependencies": { "@solid/better-simple-slideshow": "^0.1.0", - "activitystreams-pane": "^1.0.0", - "chat-pane": "^3.0.0", + "chat-pane-jss": "file:../chat-pane-jss", "contacts-pane": "^3.0.0", "dompurify": "^3.2.6", "folder-pane": "^3.0.0", "issue-pane": "^3.0.0", "marked": "^17.0.0", "meeting-pane": "^3.0.0", - "mime-types": "^3.0.1", - "pane-registry": "^3.0.0", + "pane-registry-jss": "file:../pane-registry-jss", "profile-pane": "^2.0.0", "solid-namespace": "^0.5.4", "source-pane": "^3.0.0" }, "overrides": { - "rdflib": "$rdflib", - "solid-logic": "$solid-logic", - "solid-ui": "$solid-ui" + "rdflib": "$rdflib" }, "devDependencies": { "@babel/cli": "^7.28.0", @@ -100,11 +96,11 @@ "neostandard": "^0.12.2", "node-polyfill-webpack-plugin": "^4.1.0", "path-browserify": "^1.0.1", - "rdflib": "^2.3.0", + "rdflib": "github:JavaScriptSolidServer/rdflib.js", "react": "^19.1.1", "react-dom": "^19.1.1", - "solid-logic": "^4.0.0", - "solid-ui": "^3.0.0", + "solid-logic-jss": "github:JavaScriptSolidServer/solid-logic-jss", + "solid-ui-jss": "github:JavaScriptSolidServer/solid-ui-jss", "ts-jest": "^29.4.1", "typescript": "^5.9.2", "webpack": "^5.101.0", diff --git a/src/RDFXMLPane.js b/src/RDFXMLPane.js index 34fd4a94..413b60d9 100644 --- a/src/RDFXMLPane.js +++ b/src/RDFXMLPane.js @@ -5,7 +5,7 @@ ** in generated N3 syntax. */ -import * as UI from 'solid-ui' +import * as UI from 'solid-ui-jss' import * as $rdf from 'rdflib' const ns = UI.ns diff --git a/src/activitystreams/activitystreamsPane.js b/src/activitystreams/activitystreamsPane.js new file mode 100644 index 00000000..150ebba7 --- /dev/null +++ b/src/activitystreams/activitystreamsPane.js @@ -0,0 +1,283 @@ +/** + * ActivityStreams Pane - Vanilla JS rewrite + * + * Displays as:Note content as a styled card. + * Replaces the React-based activitystreams-pane package (~11MB -> ~3KB) + */ + +import * as UI from 'solid-ui-jss' +import { sym } from 'rdflib' + +const ns = UI.ns + +// Styles for the note card +const styles = { + card: ` + font-family: sans-serif; + display: flex; + flex-wrap: wrap; + border-radius: 4px; + flex-direction: column; + justify-content: center; + padding: 1em; + box-shadow: 0 1px 5px rgba(0,0,0,0.2); + transition: all .25s ease-in-out; + max-width: 632px; + `, + content: ` + font-size: larger; + margin: 0.5em 0; + `, + date: ` + color: rgba(0, 0, 0, 0.6); + margin: 0.5em 0; + `, + attribution: ` + display: flex; + align-items: center; + font-weight: bold; + `, + attributionLink: ` + color: black; + text-decoration: none; + `, + attributionImage: ` + margin-right: 5px; + width: 47px; + height: 47px; + border-radius: 5px; + object-fit: cover; + ` +} + +/** + * Format a date as relative time (e.g., "2 hours ago") + */ +function timeAgo (date) { + const seconds = Math.floor((new Date() - date) / 1000) + + const intervals = [ + { label: 'year', seconds: 31536000 }, + { label: 'month', seconds: 2592000 }, + { label: 'week', seconds: 604800 }, + { label: 'day', seconds: 86400 }, + { label: 'hour', seconds: 3600 }, + { label: 'minute', seconds: 60 } + ] + + for (const interval of intervals) { + const count = Math.floor(seconds / interval.seconds) + if (count >= 1) { + return `${count} ${interval.label}${count > 1 ? 's' : ''} ago` + } + } + return 'just now' +} + +/** + * Format date for display + */ +function formatDate (date) { + if (!date) return null + const formatted = date.toLocaleDateString(undefined, { + year: 'numeric', + month: '2-digit', + day: '2-digit', + hour: '2-digit', + minute: '2-digit' + }) + return `${timeAgo(date)} · ${formatted}` +} + +/** + * Check if node is a Person type + */ +function isPerson (store, node) { + const types = store.findTypeURIs(node) + return types[ns.as('Person').uri] || + types[ns.foaf('Person').uri] || + types[ns.vcard('Individual').uri] || + types[ns.schema('Person').uri] +} + +/** + * Read person's image URL from store + */ +function readImageSrc (store, node) { + const image = store.anyValue(node, ns.as('image')) + if (image) { + return store.anyValue(sym(image), ns.as('url')) || null + } + return store.anyValue(node, ns.foaf('img')) || + store.anyValue(node, ns.vcard('hasPhoto')) || + null +} + +/** + * Read attribution (author) info from store + */ +function readAttribution (store, subject) { + const attributedTo = store.any(subject, ns.as('attributedTo')) + + if (!attributedTo || !attributedTo.uri) { + return { type: 'none' } + } + + if (isPerson(store, attributedTo)) { + const name = store.anyValue(attributedTo, ns.as('name')) || + store.anyValue(attributedTo, ns.foaf('name')) || + store.anyValue(attributedTo, ns.vcard('fn')) || + store.anyValue(attributedTo, ns.schema('name')) || + '' + return { + type: 'person', + webId: attributedTo.uri, + name, + imageSrc: readImageSrc(store, attributedTo) + } + } + + return { type: 'link', uri: attributedTo.uri } +} + +/** + * Read note data from store + */ +function readNote (store, subject) { + const content = store.any(subject, ns.as('content')) + const published = store.any(subject, ns.as('published')) + + if (!content) return null + + return { + content: content.value, + published: published ? new Date(published.value) : null, + attribution: readAttribution(store, subject) + } +} + +/** + * Create the attribution element + */ +function createAttributionElement (doc, attribution) { + const container = doc.createElement('div') + container.setAttribute('style', styles.attribution) + + if (attribution.type === 'none') { + return container + } + + if (attribution.type === 'link') { + const link = doc.createElement('a') + link.setAttribute('href', attribution.uri) + link.setAttribute('style', styles.attributionLink) + link.textContent = attribution.uri + container.appendChild(link) + return container + } + + if (attribution.type === 'person') { + if (attribution.imageSrc) { + const img = doc.createElement('img') + img.setAttribute('src', attribution.imageSrc) + img.setAttribute('alt', attribution.name) + img.setAttribute('style', styles.attributionImage) + container.appendChild(img) + } + + const link = doc.createElement('a') + link.setAttribute('href', attribution.webId) + link.setAttribute('style', styles.attributionLink) + link.textContent = attribution.name || attribution.webId + link.addEventListener('mouseover', () => { + link.style.textDecoration = 'underline' + }) + link.addEventListener('mouseout', () => { + link.style.textDecoration = 'none' + }) + container.appendChild(link) + } + + return container +} + +/** + * Create the note card element + */ +function createNoteCard (doc, note) { + const card = doc.createElement('div') + card.setAttribute('style', styles.card) + + // Attribution (author) + card.appendChild(createAttributionElement(doc, note.attribution)) + + // Content + const content = doc.createElement('p') + content.setAttribute('style', styles.content) + content.textContent = note.content + card.appendChild(content) + + // Date + if (note.published) { + const dateEl = doc.createElement('p') + dateEl.setAttribute('style', styles.date) + dateEl.textContent = formatDate(note.published) + card.appendChild(dateEl) + } + + return card +} + +/** + * The ActivityStreams Pane + */ +export default { + icon: UI.icons.iconBase + 'noun_15695.svg', + + name: 'activitystreams', + + label: function (subject, context) { + const store = context.session.store + const types = store.findTypeURIs(subject) + if (types[ns.as('Note').uri]) { + return 'Note' + } + return null + }, + + render: function (subject, context) { + const doc = context.dom + const store = context.session.store + const container = doc.createElement('div') + + const note = readNote(store, subject) + + if (!note) { + const msg = doc.createElement('p') + msg.textContent = 'Unable to read note content.' + container.appendChild(msg) + return container + } + + // Render initial card + container.appendChild(createNoteCard(doc, note)) + + // If attribution is just a link, try to fetch and update + if (note.attribution.type === 'link') { + const attributionNode = sym(note.attribution.uri) + store.fetcher.load(attributionNode).then(() => { + // Re-read attribution after fetch + const updatedAttribution = readAttribution(store, subject) + if (updatedAttribution.type === 'person') { + note.attribution = updatedAttribution + container.innerHTML = '' + container.appendChild(createNoteCard(doc, note)) + } + }).catch(() => { + // Keep original link attribution on error + }) + } + + return container + } +} diff --git a/src/argument/argumentPane.js b/src/argument/argumentPane.js index 027ec181..240e9615 100644 --- a/src/argument/argumentPane.js +++ b/src/argument/argumentPane.js @@ -6,8 +6,8 @@ ** Should allow editing the data too */ -import { store } from 'solid-logic' -import * as UI from 'solid-ui' +import { store } from 'solid-logic-jss' +import * as UI from 'solid-ui-jss' import * as panes from 'pane-registry' // console.log('@@@ argument pane icon at ' + (module.__dirname || __dirname) + '/icon_argument.png') diff --git a/src/attach/attachPane.js b/src/attach/attachPane.js index 53631b5a..19056eca 100644 --- a/src/attach/attachPane.js +++ b/src/attach/attachPane.js @@ -8,7 +8,7 @@ ** */ -import * as UI from 'solid-ui' +import * as UI from 'solid-ui-jss' import * as $rdf from 'rdflib' export default { diff --git a/src/audio/audioPane.js b/src/audio/audioPane.js index 43fd1ddc..0a415cf2 100644 --- a/src/audio/audioPane.js +++ b/src/audio/audioPane.js @@ -1,7 +1,7 @@ /* Single audio play Pane ** */ -import * as UI from 'solid-ui' +import * as UI from 'solid-ui-jss' import * as $rdf from 'rdflib' const ns = UI.ns diff --git a/src/classInstancePane.js b/src/classInstancePane.js index 7bb15e07..4908877b 100644 --- a/src/classInstancePane.js +++ b/src/classInstancePane.js @@ -3,7 +3,7 @@ ** This outline pane lists the members of a class */ -import * as UI from 'solid-ui' +import * as UI from 'solid-ui-jss' import * as $rdf from 'rdflib' const ns = UI.ns diff --git a/src/dashboard/basicPreferences.ts b/src/dashboard/basicPreferences.ts index 5523d220..fe5ad2c2 100644 --- a/src/dashboard/basicPreferences.ts +++ b/src/dashboard/basicPreferences.ts @@ -1,6 +1,6 @@ import { PaneDefinition } from 'pane-registry' import { IndexedFormula, NamedNode, parse, Store } from 'rdflib' -import { icons, login, ns, widgets } from 'solid-ui' +import { icons, login, ns, widgets } from 'solid-ui-jss' import ontologyData from './ontologyData.ttl' import preferencesFormText from './preferencesFormText.ttl' diff --git a/src/dashboard/dashboardPane.ts b/src/dashboard/dashboardPane.ts index 6ce29165..80597030 100644 --- a/src/dashboard/dashboardPane.ts +++ b/src/dashboard/dashboardPane.ts @@ -1,5 +1,5 @@ -import { icons } from 'solid-ui' -import { authn, authSession, store } from 'solid-logic' +import { icons } from 'solid-ui-jss' +import { authn, authSession, store } from 'solid-logic-jss' import { Fetcher, NamedNode } from 'rdflib' import { generateHomepage } from './homepage' import { DataBrowserContext, PaneDefinition } from 'pane-registry' diff --git a/src/dashboard/homepage.ts b/src/dashboard/homepage.ts index bc64e9dc..961c5ba9 100644 --- a/src/dashboard/homepage.ts +++ b/src/dashboard/homepage.ts @@ -1,5 +1,5 @@ import { Fetcher, IndexedFormula, NamedNode, sym } from 'rdflib' -import { ns } from 'solid-ui' +import { ns } from 'solid-ui-jss' export async function generateHomepage ( subject: NamedNode, diff --git a/src/dataContentPane.js b/src/dataContentPane.js index 749ebc75..98b55aae 100644 --- a/src/dataContentPane.js +++ b/src/dataContentPane.js @@ -9,7 +9,7 @@ // - Expand automatically all the way down // - original source view? Use ffox view source -import * as UI from 'solid-ui' +import * as UI from 'solid-ui-jss' import * as $rdf from 'rdflib' const ns = UI.ns diff --git a/src/defaultPane.js b/src/defaultPane.js index e243f262..e77a524d 100644 --- a/src/defaultPane.js +++ b/src/defaultPane.js @@ -5,7 +5,7 @@ ** This pane hides the ones considered too low-level for the normal user. */ -import * as UI from 'solid-ui' +import * as UI from 'solid-ui-jss' import * as $rdf from 'rdflib' const ns = UI.ns diff --git a/src/dokieli/dokieliPane.js b/src/dokieli/dokieliPane.js index cc993c65..7f32db6f 100644 --- a/src/dokieli/dokieliPane.js +++ b/src/dokieli/dokieliPane.js @@ -5,9 +5,9 @@ ** review. It does not use turtle, but RDF/a */ -import * as UI from 'solid-ui' +import * as UI from 'solid-ui-jss' import * as $rdf from 'rdflib' -import * as mime from 'mime-types' +import * as mime from '../utils/mimeTypes' // const DOKIELI_TEMPLATE_URI = 'https://dokie.li/new' // Copy to make new dok diff --git a/src/form/pane.js b/src/form/pane.js index 373b1b7c..ca65848a 100644 --- a/src/form/pane.js +++ b/src/form/pane.js @@ -3,8 +3,8 @@ ** */ -import * as UI from 'solid-ui' -import { authn } from 'solid-logic' +import * as UI from 'solid-ui-jss' +import { authn } from 'solid-logic-jss' import * as $rdf from 'rdflib' const ns = UI.ns diff --git a/src/home/homePane.ts b/src/home/homePane.ts index 92d17fe0..10806960 100644 --- a/src/home/homePane.ts +++ b/src/home/homePane.ts @@ -10,9 +10,9 @@ import { PaneDefinition } from 'pane-registry' import { NamedNode } from 'rdflib' -import { authn } from 'solid-logic' -import { create, icons, login } from 'solid-ui' -import type { CreateContext } from 'solid-ui' +import { authn } from 'solid-logic-jss' +import { create, icons, login } from 'solid-ui-jss' +import type { CreateContext } from 'solid-ui-jss' const HomePaneSource: PaneDefinition = { icon: icons.iconBase + 'noun_547570.svg', // noun_25830 diff --git a/src/humanReadablePane.js b/src/humanReadablePane.js index b3edd892..37060ed1 100644 --- a/src/humanReadablePane.js +++ b/src/humanReadablePane.js @@ -3,7 +3,7 @@ ** This outline pane contains the document contents for an HTML document ** This is for peeking at a page, because the user might not want to leave the data browser. */ -import { icons, ns } from 'solid-ui' +import { icons, ns } from 'solid-ui-jss' import { Util } from 'rdflib' import { marked } from 'marked' import DOMPurify from 'dompurify' diff --git a/src/imagePane.js b/src/imagePane.js index a8b3f819..9b62d2c6 100644 --- a/src/imagePane.js +++ b/src/imagePane.js @@ -2,7 +2,7 @@ ** ** This outline pane contains the document contents for an Image document */ -import * as UI from 'solid-ui' +import * as UI from 'solid-ui-jss' export const imagePane = { icon: UI.icons.originalIconBase + 'tango/22-image-x-generic.png', diff --git a/src/index.ts b/src/index.ts index 19ab9a77..f9a17a10 100644 --- a/src/index.ts +++ b/src/index.ts @@ -11,9 +11,9 @@ */ import versionInfo from './versionInfo' -import * as UI from 'solid-ui' +import * as UI from 'solid-ui-jss' import { LiveStore } from 'rdflib' -import { solidLogicSingleton, store } from 'solid-logic' +import { solidLogicSingleton, store } from 'solid-logic-jss' import OutlineManager from './outline/manager.js' import { registerPanes } from './registerPanes.js' import { diff --git a/src/internal/internalPane.ts b/src/internal/internalPane.ts index b041634a..46595e91 100644 --- a/src/internal/internalPane.ts +++ b/src/internal/internalPane.ts @@ -5,7 +5,7 @@ */ /* global alert confirm */ -import { icons, ns, widgets } from 'solid-ui' +import { icons, ns, widgets } from 'solid-ui-jss' import { BlankNode, IndexedFormula, literal, NamedNode, st, sym, Variable, Store } from 'rdflib' import { PaneDefinition } from 'pane-registry' diff --git a/src/lazy/activityPane.js b/src/lazy/activityPane.js new file mode 100644 index 00000000..cb6a8328 --- /dev/null +++ b/src/lazy/activityPane.js @@ -0,0 +1,26 @@ +/** + * Lazy-loaded activity streams pane wrapper + */ +import * as UI from 'solid-ui-jss' + +const ns = UI.ns + +export const activityStreamsPane = { + icon: UI.icons.iconBase + 'noun_15695.svg', + name: 'activitystreams', + + label: function (subject, context) { + const kb = context.session.store + const types = kb.findTypeURIs(subject) + + if (types[ns.as('Note').uri]) return 'Note' + + return null + }, + + render: async function (subject, context) { + const mod = await import(/* webpackChunkName: "activity-pane" */ '../activitystreams/activitystreamsPane.js') + const realPane = mod.default || mod + return realPane.render(subject, context) + } +} diff --git a/src/lazy/bookmarkPane.js b/src/lazy/bookmarkPane.js new file mode 100644 index 00000000..73697b50 --- /dev/null +++ b/src/lazy/bookmarkPane.js @@ -0,0 +1,115 @@ +/** + * Bookmark Pane - Lazy Wrapper + * + * This lightweight wrapper is always loaded. It contains only: + * - Icon and name + * - label() function for type checking + * - Async render() that loads the full implementation on demand + * + * The actual rendering code is in render.js and only loads + * when someone views a bookmark. + */ + +// Import only what's needed for label() checks +import * as UI from 'solid-ui-jss' +import * as $rdf from 'rdflib' + +const ns = UI.ns + +// Define schema namespace for bookmarks +const schema = $rdf.Namespace('http://schema.org/') + +export const bookmarkPane = { + // Unique identifier for this pane + name: 'bookmark', + + // Icon shown in pane selector + icon: UI.icons.iconBase + 'noun_97839.svg', // bookmark icon + + // Optional: restrict to power users + // audience: [ns.solid('PowerUser')], + + /** + * Label function - determines if this pane is relevant + * + * MUST be synchronous and lightweight! + * Called for every subject the user views. + * + * @param {NamedNode} subject - The RDF resource being viewed + * @param {Object} context - Contains session, dom, etc. + * @returns {string|null} - Tooltip string if relevant, null if not + */ + label: function (subject, context) { + const kb = context.session.store + const rdfType = ns.rdf('type') + const bookmarkType = schema('Bookmark') + + // Check if subject is a Bookmark + if (kb.holds(subject, rdfType, bookmarkType)) { + return 'Bookmark' + } + + // Check if subject is a container with bookmarks + if (kb.holds(subject, rdfType, ns.ldp('Container')) || + kb.holds(subject, rdfType, ns.ldp('BasicContainer'))) { + const contents = kb.each(subject, ns.ldp('contains')) + const hasBookmarks = contents.some(item => + kb.holds(item, rdfType, bookmarkType) + ) + if (hasBookmarks) { + return 'Bookmarks' + } + } + + return null + }, + + /** + * Render function - creates the UI + * + * Can be async! The outline manager handles Promise returns. + * Use dynamic import() to load the full implementation. + * + * @param {NamedNode} subject - The RDF resource to render + * @param {Object} context - Contains session, dom, etc. + * @param {Object} options - Additional render options + * @returns {Promise} - The rendered pane + */ + render: async function (subject, context, options) { + try { + const mod = await import( + /* webpackChunkName: "bookmark-pane" */ + './bookmarkRender.js' + ) + return mod.render(subject, context, options) + } catch (e) { + console.error('Bookmark pane error:', e) + const div = document.createElement('div') + div.textContent = 'Error loading bookmark pane: ' + e.message + return div + } + }, + + /** + * MintNew - creates a new bookmark + * + * Called when user wants to create a new instance of this type. + * + * @param {Object} context - Contains session, dom, etc. + * @param {Object} options - Contains newBase (suggested URI base) + * @returns {Promise} - The newly created resource + */ + mintNew: async function (context, options) { + const { mintNew } = await import( + /* webpackChunkName: "bookmark-pane" */ + './bookmarkRender.js' + ) + return mintNew(context, options) + }, + + // RDF class this pane can create + mintClass: schema('Bookmark') +} + +// Also export as default for standalone use +export default bookmarkPane diff --git a/src/lazy/bookmarkRender.js b/src/lazy/bookmarkRender.js new file mode 100644 index 00000000..c70db26e --- /dev/null +++ b/src/lazy/bookmarkRender.js @@ -0,0 +1,322 @@ +/** + * Bookmark Pane - Full Implementation + * + * This file is lazy-loaded only when the user views a bookmark. + * It contains all the heavy logic: UI rendering, RDF queries, updates. + */ +/* global confirm, alert */ + +import * as UI from 'solid-ui-jss' +import * as $rdf from 'rdflib' +import { store } from 'solid-logic-jss' + +const ns = UI.ns +const schema = $rdf.Namespace('http://schema.org/') +const dom = document + +/** + * Render a single bookmark + */ +function renderBookmark (subject, context, container) { + const kb = context.session.store + const div = dom.createElement('div') + div.className = 'bookmark-item' + + // Get bookmark properties + const name = kb.anyValue(subject, schema('name')) || 'Untitled' + const url = kb.any(subject, schema('url')) + const description = kb.anyValue(subject, schema('description')) + const dateCreated = kb.anyValue(subject, schema('dateCreated')) + + // Title + const title = dom.createElement('h3') + title.className = 'bookmark-title' + if (url) { + const link = dom.createElement('a') + link.href = url.uri || url.value + link.target = '_blank' + link.rel = 'noopener noreferrer' + link.textContent = name + title.appendChild(link) + } else { + title.textContent = name + } + div.appendChild(title) + + // URL display + if (url) { + const urlDiv = dom.createElement('div') + urlDiv.className = 'bookmark-url' + urlDiv.textContent = url.uri || url.value + div.appendChild(urlDiv) + } + + // Description + if (description) { + const desc = dom.createElement('p') + desc.className = 'bookmark-description' + desc.textContent = description + div.appendChild(desc) + } + + // Date + if (dateCreated) { + const date = dom.createElement('div') + date.className = 'bookmark-date' + date.textContent = 'Added: ' + new Date(dateCreated).toLocaleDateString() + div.appendChild(date) + } + + // Delete button (if user has write access) + const deleteBtn = dom.createElement('button') + deleteBtn.className = 'bookmark-delete' + deleteBtn.textContent = '×' + deleteBtn.title = 'Delete bookmark' + deleteBtn.onclick = async () => { + if (confirm('Delete this bookmark?')) { + try { + // Remove all triples about this bookmark + const triples = kb.statementsMatching(subject, null, null, subject.doc()) + await store.updater.update(triples, []) + div.remove() + } catch (e) { + alert('Failed to delete: ' + e.message) + } + } + } + div.appendChild(deleteBtn) + + return div +} + +/** + * Render the add bookmark form + */ +function renderAddForm (containerUri, context, onAdd) { + const form = dom.createElement('form') + form.className = 'bookmark-add-form' + + form.innerHTML = ` +

Add Bookmark

+ + + + + ` + + form.onsubmit = async (e) => { + e.preventDefault() + const formData = new FormData(form) + const name = formData.get('name') + const url = formData.get('url') + const description = formData.get('description') + + try { + // Generate unique ID + const id = 'bookmark-' + Date.now() + const bookmarkUri = containerUri + '#' + id + const subject = $rdf.sym(bookmarkUri) + const doc = $rdf.sym(containerUri) + + // Create triples + const ins = [ + $rdf.st(subject, ns.rdf('type'), schema('Bookmark'), doc), + $rdf.st(subject, schema('name'), name, doc), + $rdf.st(subject, schema('url'), $rdf.sym(url), doc), + $rdf.st(subject, schema('dateCreated'), new Date().toISOString(), doc) + ] + + if (description) { + ins.push($rdf.st(subject, schema('description'), description, doc)) + } + + await store.updater.update([], ins) + + // Clear form and refresh + form.reset() + if (onAdd) onAdd(subject) + } catch (e) { + alert('Failed to add bookmark: ' + e.message) + } + } + + return form +} + +/** + * Main render function + */ +export function render (subject, context, options) { + const kb = context.session.store + const div = dom.createElement('div') + div.className = 'bookmark-pane' + + // Add styles + const style = dom.createElement('style') + style.textContent = ` + .bookmark-pane { + padding: 1em; + font-family: system-ui, sans-serif; + } + .bookmark-item { + border: 1px solid #ddd; + border-radius: 8px; + padding: 1em; + margin-bottom: 1em; + position: relative; + background: #fafafa; + } + .bookmark-title { + margin: 0 0 0.5em 0; + font-size: 1.2em; + } + .bookmark-title a { + color: #0066cc; + text-decoration: none; + } + .bookmark-title a:hover { + text-decoration: underline; + } + .bookmark-url { + color: #666; + font-size: 0.9em; + margin-bottom: 0.5em; + } + .bookmark-description { + margin: 0.5em 0; + color: #333; + } + .bookmark-date { + font-size: 0.8em; + color: #999; + } + .bookmark-delete { + position: absolute; + top: 0.5em; + right: 0.5em; + background: #ff4444; + color: white; + border: none; + border-radius: 50%; + width: 24px; + height: 24px; + cursor: pointer; + font-size: 16px; + line-height: 1; + } + .bookmark-delete:hover { + background: #cc0000; + } + .bookmark-add-form { + border: 2px dashed #ccc; + border-radius: 8px; + padding: 1em; + margin-top: 1em; + } + .bookmark-add-form h4 { + margin: 0 0 1em 0; + } + .bookmark-add-form input, + .bookmark-add-form textarea { + display: block; + width: 100%; + padding: 0.5em; + margin-bottom: 0.5em; + border: 1px solid #ccc; + border-radius: 4px; + box-sizing: border-box; + } + .bookmark-add-form button { + background: #0066cc; + color: white; + border: none; + padding: 0.5em 1em; + border-radius: 4px; + cursor: pointer; + } + .bookmark-add-form button:hover { + background: #0055aa; + } + .bookmark-empty { + color: #666; + font-style: italic; + padding: 2em; + text-align: center; + } + ` + div.appendChild(style) + + // Header + const header = dom.createElement('h2') + header.textContent = '🔖 Bookmarks' + div.appendChild(header) + + // Check what we're rendering + const types = kb.findTypeURIs(subject) + const isContainer = types[ns.ldp('Container').uri] || types[ns.ldp('BasicContainer').uri] + const isBookmark = types[schema('Bookmark').uri] + + // Bookmark list container + const list = dom.createElement('div') + list.className = 'bookmark-list' + div.appendChild(list) + + if (isBookmark) { + // Single bookmark view + list.appendChild(renderBookmark(subject, context, list)) + } else if (isContainer) { + // Container with bookmarks + const contents = kb.each(subject, ns.ldp('contains')) + const bookmarks = contents.filter(item => { + const itemTypes = kb.findTypeURIs(item) + return itemTypes[schema('Bookmark').uri] + }) + + if (bookmarks.length === 0) { + const empty = dom.createElement('div') + empty.className = 'bookmark-empty' + empty.textContent = 'No bookmarks yet. Add one below!' + list.appendChild(empty) + } else { + bookmarks.forEach(bookmark => { + list.appendChild(renderBookmark(bookmark, context, list)) + }) + } + + // Add form for containers + const addForm = renderAddForm(subject.uri, context, (newBookmark) => { + // Remove empty message if present + const empty = list.querySelector('.bookmark-empty') + if (empty) empty.remove() + // Add new bookmark to list + list.appendChild(renderBookmark(newBookmark, context, list)) + }) + div.appendChild(addForm) + } + + return div +} + +/** + * Create a new bookmark resource + */ +export async function mintNew (context, options) { + const newBase = options.newBase || context.session.store.any(null, ns.space('preferencesFile'))?.uri + if (!newBase) { + throw new Error('No location specified for new bookmark') + } + + const bookmarkUri = newBase + 'bookmarks.ttl' + const subject = $rdf.sym(bookmarkUri + '#bookmark-' + Date.now()) + const doc = $rdf.sym(bookmarkUri) + + // Create minimal bookmark + const ins = [ + $rdf.st(subject, ns.rdf('type'), schema('Bookmark'), doc), + $rdf.st(subject, schema('name'), 'New Bookmark', doc), + $rdf.st(subject, schema('dateCreated'), new Date().toISOString(), doc) + ] + + await store.updater.update([], ins) + return subject +} diff --git a/src/lazy/chatPane.js b/src/lazy/chatPane.js new file mode 100644 index 00000000..03d70327 --- /dev/null +++ b/src/lazy/chatPane.js @@ -0,0 +1,84 @@ +/** + * Lazy-loaded chat pane wrappers + * + * Only loads chat-pane (and its UI.messageArea/infiniteMessageArea deps) + * when the pane is actually rendered. This allows chat to be code-split + * into a separate chunk. + */ +import * as UI from 'solid-ui-jss' + +const ns = UI.ns + +/** + * Long Chat Pane - lazy wrapper + * Used for LongChat, Thread, and message types + */ +export const longChatPane = { + icon: UI.icons.iconBase + 'noun_1689339.svg', + name: 'long chat', + + // Label determines if pane is relevant - must be sync + label: function (subject, context) { + const kb = context.session.store + if (kb.holds(subject, ns.rdf('type'), ns.meeting('LongChat'))) { + return 'Chat channel' + } + if (kb.holds(subject, ns.rdf('type'), ns.sioc('Thread'))) { + return 'Thread' + } + // Message detection + if (kb.any(subject, ns.sioc('content')) && kb.any(subject, ns.dct('created'))) { + return 'message' + } + return null + }, + + // Lazy render - loads chat-pane chunk only when needed + render: async function (subject, context) { + const { longChatPane: realPane } = await import(/* webpackChunkName: "chat-pane" */ 'chat-pane') + return realPane.render(subject, context) + }, + + // Lazy mintNew + mintNew: async function (context, newPaneOptions) { + const { longChatPane: realPane } = await import(/* webpackChunkName: "chat-pane" */ 'chat-pane') + return realPane.mintNew(context, newPaneOptions) + }, + + mintClass: ns.meeting('LongChat') +} + +/** + * Short Chat Pane - lazy wrapper + * Used for wf:message based chats and meeting chats + */ +export const shortChatPane = { + icon: UI.icons.iconBase + 'noun_346319.svg', + name: 'chat', + + label: function (subject, context) { + const kb = context.session.store + const n = kb.each(subject, ns.wf('message')).length + if (n > 0) return 'Chat (' + n + ')' + + if (kb.holds(subject, ns.rdf('type'), ns.meeting('Chat'))) { + return 'Meeting chat' + } + if (kb.holds(undefined, ns.rdf('type'), ns.foaf('ChatChannel'), subject)) { + return 'IRC log' + } + return null + }, + + render: async function (subject, context) { + const { shortChatPane: realPane } = await import(/* webpackChunkName: "chat-pane" */ 'chat-pane') + return realPane.render(subject, context) + }, + + mintNew: async function (context, newPaneOptions) { + const { shortChatPane: realPane } = await import(/* webpackChunkName: "chat-pane" */ 'chat-pane') + return realPane.mintNew(context, newPaneOptions) + }, + + mintClass: ns.meeting('Chat') +} diff --git a/src/lazy/contactsPane.js b/src/lazy/contactsPane.js new file mode 100644 index 00000000..9a2aeea6 --- /dev/null +++ b/src/lazy/contactsPane.js @@ -0,0 +1,44 @@ +/** + * Lazy-loaded contacts pane wrapper + */ +import * as UI from 'solid-ui-jss' + +const ns = UI.ns + +export const contactsPane = { + icon: UI.icons.iconBase + 'noun_99101.svg', + name: 'contact', + + label: function (subject, context) { + const dominated = subject.uri.endsWith('/profile/card') + const dominated2 = subject.uri.endsWith('/profile/card#me') + if (dominated || dominated2) return null // Let profile pane handle + + const kb = context.session.store + const types = kb.findTypeURIs(subject) + + if (types[ns.vcard('AddressBook').uri]) return 'Address Book' + if (types[ns.vcard('Group').uri]) return 'Group' + if (types[ns.vcard('Individual').uri]) return 'Contact' + if (types[ns.foaf('Person').uri]) return 'Person' + + return null + }, + + render: async function (subject, context) { + const mod = await import(/* webpackChunkName: "contacts-pane" */ 'contacts-pane') + const realPane = mod.default || mod + return realPane.render(subject, context) + }, + + mintNew: async function (context, options) { + const mod = await import(/* webpackChunkName: "contacts-pane" */ 'contacts-pane') + const realPane = mod.default || mod + if (realPane.mintNew) { + return realPane.mintNew(context, options) + } + return null + }, + + mintClass: ns.vcard('AddressBook') +} diff --git a/src/lazy/dashboardPane.js b/src/lazy/dashboardPane.js new file mode 100644 index 00000000..51645946 --- /dev/null +++ b/src/lazy/dashboardPane.js @@ -0,0 +1,56 @@ +/** + * Lazy-loaded dashboard and preferences panes + */ +import * as UI from 'solid-ui-jss' + +const ns = UI.ns + +export const dashboardPane = { + icon: UI.icons.iconBase + 'noun_547570.svg', + name: 'dashboard', + + label: function (subject, context) { + // Dashboard only shows for site root + if (subject.site && subject.uri === subject.site().uri) { + return 'Dashboard' + } + return null + }, + + render: async function (subject, context) { + const mod = await import(/* webpackChunkName: "dashboard-pane" */ '../dashboard/dashboardPane') + const realPane = mod.default || mod + return realPane.render(subject, context) + } +} + +export const basicPreferencesPane = { + icon: UI.icons.iconBase + 'noun_547570.svg', + name: 'basicPreferences', + + label: function (subject, context) { + return null // Controlled by dashboard + }, + + render: async function (subject, context) { + const mod = await import(/* webpackChunkName: "dashboard-pane" */ '../dashboard/basicPreferences') + const realPane = mod.default || mod + return realPane.render(subject, context) + } +} + +export const trustedApplicationsPane = { + icon: UI.icons.iconBase + 'noun_15177.svg', + name: 'trustedApplications', + global: true, + + label: function (subject, context) { + return null // Global pane, doesn't match subjects + }, + + render: async function (subject, context) { + const mod = await import(/* webpackChunkName: "dashboard-pane" */ '../trustedApplications/trustedApplications.view') + const realPane = mod.default || mod + return realPane.render(subject, context) + } +} diff --git a/src/lazy/dokieliPane.js b/src/lazy/dokieliPane.js new file mode 100644 index 00000000..f04b0d77 --- /dev/null +++ b/src/lazy/dokieliPane.js @@ -0,0 +1,36 @@ +/** + * Lazy-loaded dokieli pane wrapper + */ +import * as UI from 'solid-ui-jss' + +const ns = UI.ns + +export const dokieliPane = { + icon: UI.icons.iconBase + 'dokieli-logo.png', + name: 'Dokieli', + + label: function (subject, context) { + const kb = context.session.store + const types = kb.findTypeURIs(subject) + + if (types[ns.link('WebPage').uri]) return 'view' + + // Check content-type + const contentType = kb.anyValue(subject, ns.httph('content-type')) + if (contentType) { + if (contentType.includes('text/html') || contentType.includes('application/xhtml+xml')) { + return 'Dok' + } + } + + return null + }, + + render: async function (subject, context) { + const mod = await import(/* webpackChunkName: "dokieli-pane" */ '../dokieli/dokieliPane.js') + const realPane = mod.default || mod + return realPane.render(subject, context) + }, + + mintClass: ns.solid('DokieliDocument') +} diff --git a/src/lazy/folderPane.js b/src/lazy/folderPane.js new file mode 100644 index 00000000..2c00264d --- /dev/null +++ b/src/lazy/folderPane.js @@ -0,0 +1,31 @@ +/** + * Lazy-loaded folder pane wrapper + */ +import * as UI from 'solid-ui-jss' + +const ns = UI.ns + +export const folderPane = { + icon: UI.icons.originalIconBase + 'tango/22-folder.png', + name: 'folder', + + label: function (subject, context) { + const dominated = subject.uri.endsWith('/profile/card') + const dominated2 = subject.uri.endsWith('/profile/card#me') + if (dominated || dominated2) return null + + const kb = context.session.store + const types = kb.findTypeURIs(subject) + + if (types[ns.ldp('Container').uri]) return 'Folder' + if (types[ns.ldp('BasicContainer').uri]) return 'Folder' + + return null + }, + + render: async function (subject, context) { + const mod = await import(/* webpackChunkName: "folder-pane" */ 'folder-pane') + const realPane = mod.default || mod + return realPane.render(subject, context) + } +} diff --git a/src/lazy/formPane.js b/src/lazy/formPane.js new file mode 100644 index 00000000..a87d78c2 --- /dev/null +++ b/src/lazy/formPane.js @@ -0,0 +1,31 @@ +/** + * Lazy-loaded form pane wrapper + */ +import * as UI from 'solid-ui-jss' + +const ns = UI.ns + +export const formPane = { + icon: UI.icons.iconBase + 'noun_122196.svg', + name: 'form', + audience: [ns.solid('PowerUser')], + + label: function (subject, context) { + // Check if there are forms for this subject + // This requires UI.widgets.formsFor which is heavyweight + // So we do a lightweight check first + const kb = context.session.store + const dominated = kb.each(subject, ns.rdf('type')) + if (dominated.length === 0) return null + + // Let the actual pane determine if forms exist + // This is a lightweight hint that forms might be relevant + return null // Forms pane handles its own matching + }, + + render: async function (subject, context) { + const mod = await import(/* webpackChunkName: "form-pane" */ '../form/pane.js') + const realPane = mod.formPane || mod.default || mod + return realPane.render(subject, context) + } +} diff --git a/src/lazy/homePane.js b/src/lazy/homePane.js new file mode 100644 index 00000000..07058774 --- /dev/null +++ b/src/lazy/homePane.js @@ -0,0 +1,20 @@ +/** + * Lazy-loaded home pane wrapper + */ +import * as UI from 'solid-ui-jss' + +export const homePane = { + icon: UI.icons.iconBase + 'noun_547570.svg', + name: 'home', + global: true, + + label: function (subject, context) { + return 'home' + }, + + render: async function (subject, context) { + const mod = await import(/* webpackChunkName: "home-pane" */ '../home/homePane') + const realPane = mod.default || mod + return realPane.render(subject, context) + } +} diff --git a/src/lazy/index.js b/src/lazy/index.js new file mode 100644 index 00000000..7406b266 --- /dev/null +++ b/src/lazy/index.js @@ -0,0 +1,54 @@ +/** + * Lazy-loaded pane wrappers + * + * All panes are loaded on-demand when first rendered. + * Only the lightweight label() functions are loaded upfront. + */ + +// Chat pane (already existed) +export { longChatPane, shortChatPane } from './chatPane.js' + +// Profile & contacts +export { profilePane, editProfilePane } from './profilePane.js' +export { contactsPane } from './contactsPane.js' + +// Issues & meetings +export { issuePane } from './issuePane.js' +export { meetingPane } from './meetingPane.js' + +// Content panes +export { folderPane } from './folderPane.js' +export { padPane } from './padPane.js' +export { sourcePane } from './sourcePane.js' + +// Media panes +export { imagePane, videoPane, audioPane, playlistPane } from './mediaPane.js' + +// Financial panes +export { transactionPane, financialPeriodPane, tripPane } from './transactionPane.js' + +// Scheduling +export { schedulePane } from './schedulePane.js' + +// Content views +export { slideshowPane } from './slideshowPane.js' +export { dokieliPane } from './dokieliPane.js' +export { socialPane } from './socialPane.js' + +// Dashboard & preferences +export { dashboardPane, basicPreferencesPane, trustedApplicationsPane } from './dashboardPane.js' + +// Activity & forms +export { activityStreamsPane } from './activityPane.js' +export { formPane } from './formPane.js' +export { tabbedPane } from './tabbedPane.js' + +// Sharing & internals +export { sharingPane } from './sharingPane.js' +export { internalPane } from './internalPane.js' + +// Global panes +export { homePane } from './homePane.js' + +// Example panes +export { bookmarkPane } from './bookmarkPane.js' diff --git a/src/lazy/internalPane.js b/src/lazy/internalPane.js new file mode 100644 index 00000000..914b6176 --- /dev/null +++ b/src/lazy/internalPane.js @@ -0,0 +1,23 @@ +/** + * Lazy-loaded internal pane wrapper + */ +import * as UI from 'solid-ui-jss' + +const ns = UI.ns + +export const internalPane = { + icon: UI.icons.iconBase + 'noun_1689339.svg', + name: 'internal', + audience: [ns.solid('Developer')], + + label: function (subject, context) { + // Internal pane always available for developers + return 'Internal' + }, + + render: async function (subject, context) { + const mod = await import(/* webpackChunkName: "internal-pane" */ '../internal/internalPane') + const realPane = mod.default || mod + return realPane.render(subject, context) + } +} diff --git a/src/lazy/issuePane.js b/src/lazy/issuePane.js new file mode 100644 index 00000000..bdf3c20a --- /dev/null +++ b/src/lazy/issuePane.js @@ -0,0 +1,39 @@ +/** + * Lazy-loaded issue pane wrapper + */ +import * as UI from 'solid-ui-jss' + +const ns = UI.ns + +export const issuePane = { + icon: UI.icons.iconBase + 'noun_97839.svg', + name: 'issue', + + label: function (subject, context) { + const kb = context.session.store + const types = kb.findTypeURIs(subject) + + if (types[ns.wf('Tracker').uri]) return 'Issue Tracker' + if (types[ns.wf('Issue').uri]) return 'Issue' + if (types[ns.wf('Task').uri]) return 'Task' + + return null + }, + + render: async function (subject, context) { + const mod = await import(/* webpackChunkName: "issue-pane" */ 'issue-pane') + const realPane = mod.default || mod + return realPane.render(subject, context) + }, + + mintNew: async function (context, options) { + const mod = await import(/* webpackChunkName: "issue-pane" */ 'issue-pane') + const realPane = mod.default || mod + if (realPane.mintNew) { + return realPane.mintNew(context, options) + } + return null + }, + + mintClass: ns.wf('Tracker') +} diff --git a/src/lazy/mediaPane.js b/src/lazy/mediaPane.js new file mode 100644 index 00000000..dda447c1 --- /dev/null +++ b/src/lazy/mediaPane.js @@ -0,0 +1,108 @@ +/** + * Lazy-loaded media panes (image, video, audio) + */ +import * as UI from 'solid-ui-jss' + +const ns = UI.ns + +export const imagePane = { + icon: UI.icons.originalIconBase + 'tango/22-image-x-generic.png', + name: 'image', + + label: function (subject, context) { + const dominated = subject.uri.endsWith('/profile/card') + const dominated2 = subject.uri.endsWith('/profile/card#me') + if (dominated || dominated2) return null + + const dominated3 = subject.uri.includes('.pdf') + if (dominated3) return null // PDF handled separately + + const kb = context.session.store + const types = kb.findTypeURIs(subject) + + if (types['http://purl.org/dc/terms/Image']) return 'View image' + + // Check content-type + const dominated4 = kb.anyValue(subject, ns.httph('content-type')) + if (dominated4 && dominated4.startsWith('image/')) return 'View image' + + return null + }, + + render: async function (subject, context) { + const mod = await import(/* webpackChunkName: "media-pane" */ '../imagePane.js') + const realPane = mod.imagePane || mod.default || mod + return realPane.render(subject, context) + } +} + +export const videoPane = { + icon: UI.icons.iconBase + 'noun_1619.svg', + name: 'video', + + label: function (subject, context) { + const kb = context.session.store + const dominated = kb.anyValue(subject, ns.httph('content-type')) + if (dominated && dominated.startsWith('video/')) return 'Play video' + + const types = kb.findTypeURIs(subject) + for (const type of Object.keys(types)) { + if (type.includes('video')) return 'Play video' + } + + return null + }, + + render: async function (subject, context) { + const mod = await import(/* webpackChunkName: "media-pane" */ '../video/videoPane.js') + const realPane = mod.default || mod + return realPane.render(subject, context) + } +} + +export const audioPane = { + icon: UI.icons.iconBase + 'noun_534313.svg', + name: 'audio', + + label: function (subject, context) { + const kb = context.session.store + const dominated = kb.anyValue(subject, ns.httph('content-type')) + if (dominated && dominated.startsWith('audio/')) return 'Play audio' + + const types = kb.findTypeURIs(subject) + for (const type of Object.keys(types)) { + if (type.includes('audio')) return 'Play audio' + } + + return null + }, + + render: async function (subject, context) { + const mod = await import(/* webpackChunkName: "media-pane" */ '../audio/audioPane.js') + const realPane = mod.default || mod + return realPane.render(subject, context) + } +} + +export const playlistPane = { + icon: UI.icons.iconBase + 'noun_1619.svg', + name: 'playlistSlot', + audience: [ns.solid('PowerUser')], + + label: function (subject, context) { + const kb = context.session.store + const types = kb.findTypeURIs(subject) + + if (types['http://purl.org/ontology/pbo/core#PlaylistSlot']) { + return 'Playlist slot' + } + + return null + }, + + render: async function (subject, context) { + const mod = await import(/* webpackChunkName: "media-pane" */ '../playlist/playlistPane.js') + const realPane = mod.default || mod + return realPane.render(subject, context) + } +} diff --git a/src/lazy/meetingPane.js b/src/lazy/meetingPane.js new file mode 100644 index 00000000..d90419c0 --- /dev/null +++ b/src/lazy/meetingPane.js @@ -0,0 +1,38 @@ +/** + * Lazy-loaded meeting pane wrapper + */ +import * as UI from 'solid-ui-jss' + +const ns = UI.ns + +export const meetingPane = { + icon: UI.icons.iconBase + 'noun_66617.svg', + name: 'meeting', + + label: function (subject, context) { + const kb = context.session.store + const types = kb.findTypeURIs(subject) + + if (types[ns.meeting('Meeting').uri]) return 'Meeting' + if (types[ns.meeting('Agenda').uri]) return 'Agenda' + + return null + }, + + render: async function (subject, context) { + const mod = await import(/* webpackChunkName: "meeting-pane" */ 'meeting-pane') + const realPane = mod.default || mod + return realPane.render(subject, context) + }, + + mintNew: async function (context, options) { + const mod = await import(/* webpackChunkName: "meeting-pane" */ 'meeting-pane') + const realPane = mod.default || mod + if (realPane.mintNew) { + return realPane.mintNew(context, options) + } + return null + }, + + mintClass: ns.meeting('Meeting') +} diff --git a/src/lazy/padPane.js b/src/lazy/padPane.js new file mode 100644 index 00000000..ed5f1d22 --- /dev/null +++ b/src/lazy/padPane.js @@ -0,0 +1,37 @@ +/** + * Lazy-loaded pad (notepad) pane wrapper + */ +import * as UI from 'solid-ui-jss' + +const ns = UI.ns + +export const padPane = { + icon: UI.icons.iconBase + 'noun_79217.svg', + name: 'pad', + + label: function (subject, context) { + const kb = context.session.store + const types = kb.findTypeURIs(subject) + + if (types[ns.pad('Notepad').uri]) return 'Notepad' + + return null + }, + + render: async function (subject, context) { + const mod = await import(/* webpackChunkName: "pad-pane" */ '../pad/padPane') + const realPane = mod.default || mod + return realPane.render(subject, context) + }, + + mintNew: async function (context, options) { + const mod = await import(/* webpackChunkName: "pad-pane" */ '../pad/padPane') + const realPane = mod.default || mod + if (realPane.mintNew) { + return realPane.mintNew(context, options) + } + return null + }, + + mintClass: ns.pad('Notepad') +} diff --git a/src/lazy/profilePane.js b/src/lazy/profilePane.js new file mode 100644 index 00000000..62eb840f --- /dev/null +++ b/src/lazy/profilePane.js @@ -0,0 +1,49 @@ +/** + * Lazy-loaded profile pane wrapper + */ +import * as UI from 'solid-ui-jss' + +const ns = UI.ns + +export const profilePane = { + icon: UI.icons.iconBase + 'noun_15059.svg', + name: 'profile', + + label: function (subject, context) { + const dominated = subject.uri.endsWith('/profile/card') + const dominated2 = subject.uri.endsWith('/profile/card#me') + if (dominated || dominated2) return 'Profile' + + const kb = context.session.store + const types = kb.findTypeURIs(subject) + if (types[ns.foaf('Person').uri] || types[ns.vcard('Individual').uri]) { + return 'Profile' + } + return null + }, + + render: async function (subject, context) { + const profilePaneMod = await import(/* webpackChunkName: "profile-pane" */ 'profile-pane') + const realPane = profilePaneMod.default || profilePaneMod + return realPane.render(subject, context) + } +} + +export const editProfilePane = { + icon: UI.icons.iconBase + 'noun_15059.svg', + name: 'editProfile', + + label: function (subject, context) { + // Editor pane - only shows when editing own profile + return null // Controlled by profile pane + }, + + render: async function (subject, context) { + const profilePaneMod = await import(/* webpackChunkName: "profile-pane" */ 'profile-pane') + const realPane = profilePaneMod.default || profilePaneMod + if (realPane.editor) { + return realPane.editor.render(subject, context) + } + return null + } +} diff --git a/src/lazy/schedulePane.js b/src/lazy/schedulePane.js new file mode 100644 index 00000000..48f74128 --- /dev/null +++ b/src/lazy/schedulePane.js @@ -0,0 +1,40 @@ +/** + * Lazy-loaded schedule pane wrapper + */ +import * as UI from 'solid-ui-jss' + +const ns = UI.ns + +export const schedulePane = { + icon: UI.icons.iconBase + 'noun_346777.svg', + name: 'schedule', + audience: [ns.solid('PowerUser')], + + label: function (subject, context) { + const kb = context.session.store + const types = kb.findTypeURIs(subject) + + if (types['http://www.w3.org/ns/pim/schedule#SchedulableEvent']) { + return 'Scheduling poll' + } + + return null + }, + + render: async function (subject, context) { + const mod = await import(/* webpackChunkName: "schedule-pane" */ '../schedule/schedulePane.js') + const realPane = mod.schedulePane || mod.default || mod + return realPane.render(subject, context) + }, + + mintNew: async function (context, options) { + const mod = await import(/* webpackChunkName: "schedule-pane" */ '../schedule/schedulePane.js') + const realPane = mod.schedulePane || mod.default || mod + if (realPane.mintNew) { + return realPane.mintNew(context, options) + } + return null + }, + + mintClass: ns.sched('SchedulableEvent') +} diff --git a/src/lazy/sharingPane.js b/src/lazy/sharingPane.js new file mode 100644 index 00000000..36dca13d --- /dev/null +++ b/src/lazy/sharingPane.js @@ -0,0 +1,28 @@ +/** + * Lazy-loaded sharing pane wrapper + */ +import * as UI from 'solid-ui-jss' + +const ns = UI.ns + +export const sharingPane = { + icon: UI.icons.iconBase + 'padlock-timbl.svg', + name: 'sharing', + + label: function (subject, context) { + const kb = context.session.store + const types = kb.findTypeURIs(subject) + + if (types[ns.ldp('Resource').uri]) return 'Sharing' + if (types[ns.ldp('Container').uri]) return 'Sharing' + if (types[ns.ldp('BasicContainer').uri]) return 'Sharing' + + return null + }, + + render: async function (subject, context) { + const mod = await import(/* webpackChunkName: "sharing-pane" */ '../sharing/sharingPane') + const realPane = mod.default || mod + return realPane.render(subject, context) + } +} diff --git a/src/lazy/slideshowPane.js b/src/lazy/slideshowPane.js new file mode 100644 index 00000000..cf28768d --- /dev/null +++ b/src/lazy/slideshowPane.js @@ -0,0 +1,40 @@ +/** + * Lazy-loaded slideshow pane wrapper + */ +import * as UI from 'solid-ui-jss' + +const ns = UI.ns + +export const slideshowPane = { + icon: UI.icons.iconBase + 'noun_138712.svg', + name: 'slideshow', + audience: [ns.solid('PowerUser')], + + label: function (subject, context) { + const kb = context.session.store + const types = kb.findTypeURIs(subject) + + if (!types[ns.ldp('Container').uri] && !types[ns.ldp('BasicContainer').uri]) { + return null + } + + // Check if container has images + const dominated = kb.each(subject, ns.ldp('contains')) + let imageCount = 0 + for (const res of dominated) { + const dominated2 = kb.findTypeURIs(res) + if (dominated2['http://purl.org/dc/terms/Image']) { + imageCount++ + } + } + + if (imageCount > 0) return 'Slideshow' + return null + }, + + render: async function (subject, context) { + const mod = await import(/* webpackChunkName: "slideshow-pane" */ '../slideshow/slideshowPane.js') + const realPane = mod.slideshowPane || mod.default || mod + return realPane.render(subject, context) + } +} diff --git a/src/lazy/socialPane.js b/src/lazy/socialPane.js new file mode 100644 index 00000000..c096b675 --- /dev/null +++ b/src/lazy/socialPane.js @@ -0,0 +1,31 @@ +/** + * Lazy-loaded social pane wrapper + */ +import * as UI from 'solid-ui-jss' + +const ns = UI.ns + +export const socialPane = { + icon: UI.icons.originalIconBase + 'foaf/foafTiny.gif', + name: 'social', + + label: function (subject, context) { + const dominated = subject.uri.endsWith('/profile/card') + const dominated2 = subject.uri.endsWith('/profile/card#me') + if (dominated || dominated2) return null // Let profile pane handle + + const kb = context.session.store + const types = kb.findTypeURIs(subject) + + if (types[ns.foaf('Person').uri]) return 'Friends' + if (types[ns.vcard('Individual').uri]) return 'Friends' + + return null + }, + + render: async function (subject, context) { + const mod = await import(/* webpackChunkName: "social-pane" */ '../socialPane.js') + const realPane = mod.socialPane || mod.default || mod + return realPane.render(subject, context) + } +} diff --git a/src/lazy/sourcePane.js b/src/lazy/sourcePane.js new file mode 100644 index 00000000..51c66ac4 --- /dev/null +++ b/src/lazy/sourcePane.js @@ -0,0 +1,39 @@ +/** + * Lazy-loaded source pane wrapper + */ +import * as UI from 'solid-ui-jss' + +const ns = UI.ns + +export const sourcePane = { + icon: UI.icons.originalIconBase + 'tango/22-text-x-generic.png', + name: 'source', + + label: function (subject, context) { + const dominated = subject.uri.endsWith('/profile/card') + const dominated2 = subject.uri.endsWith('/profile/card#me') + if (dominated || dominated2) return null + + const kb = context.session.store + const dominated3 = kb.anyValue(subject, ns.httph('content-type')) + if (dominated3) { + // Source pane handles text-based content + if (dominated3.includes('text/') || + dominated3.includes('application/json') || + dominated3.includes('application/ld+json') || + dominated3.includes('application/xml') || + dominated3.includes('turtle') || + dominated3.includes('n3')) { + return 'Source' + } + } + + return null + }, + + render: async function (subject, context) { + const mod = await import(/* webpackChunkName: "source-pane" */ 'source-pane') + const realPane = mod.default || mod + return realPane.render(subject, context) + } +} diff --git a/src/lazy/tabbedPane.js b/src/lazy/tabbedPane.js new file mode 100644 index 00000000..6fa0435b --- /dev/null +++ b/src/lazy/tabbedPane.js @@ -0,0 +1,27 @@ +/** + * Lazy-loaded tabbed pane wrapper + */ +import * as UI from 'solid-ui-jss' + +const ns = UI.ns + +export const tabbedPane = { + icon: UI.icons.iconBase + 'noun_688606.svg', + name: 'tabbed', + audience: [ns.solid('PowerUser')], + + label: function (subject, context) { + const kb = context.session.store + const types = kb.findTypeURIs(subject) + + if (types[ns.meeting('Cluster').uri]) return 'Tabbed' + + return null + }, + + render: async function (subject, context) { + const mod = await import(/* webpackChunkName: "tabbed-pane" */ '../tabbed/tabbedPane') + const realPane = mod.default || mod + return realPane.render(subject, context) + } +} diff --git a/src/lazy/transactionPane.js b/src/lazy/transactionPane.js new file mode 100644 index 00000000..dff6c89c --- /dev/null +++ b/src/lazy/transactionPane.js @@ -0,0 +1,88 @@ +/** + * Lazy-loaded transaction panes (transaction, financial period, trip) + */ +import * as UI from 'solid-ui-jss' + +const ns = UI.ns + +export const transactionPane = { + icon: UI.icons.iconBase + 'noun_106746.svg', + name: 'transaction', + audience: [ns.solid('PowerUser')], + + label: function (subject, context) { + const dominated = subject.uri.endsWith('/profile/card') + const dominated2 = subject.uri.endsWith('/profile/card#me') + if (dominated || dominated2) return null + + const kb = context.session.store + const dominated3 = kb.any(subject, ns.qu('amount')) + if (dominated3) return '$$$' + + const types = kb.findTypeURIs(subject) + if (types[ns.qu('Transaction').uri]) return '$$' + if (types['http://www.w3.org/ns/pim/trip#Trip']) return 'Trip $' + + return null + }, + + render: async function (subject, context) { + const mod = await import(/* webpackChunkName: "transaction-pane" */ '../transaction/pane.js') + const realPane = mod.default || mod + return realPane.render(subject, context) + } +} + +export const financialPeriodPane = { + icon: UI.icons.iconBase + 'noun_106746.svg', + name: 'period', + audience: [ns.solid('PowerUser')], + + label: function (subject, context) { + const kb = context.session.store + const types = kb.findTypeURIs(subject) + + if (types['http://www.w3.org/ns/pim/trip#Trip']) return 'Trip expenses' + + // Check if it's a container with transactions + const dominated = kb.anyValue(subject, ns.httph('content-type')) + if (dominated && dominated.includes('container')) { + const dominated2 = kb.each(subject, ns.ldp('contains')) + for (const res of dominated2) { + const types2 = kb.findTypeURIs(res) + if (types2[ns.qu('Transaction').uri]) return 'Financial period' + } + } + + return null + }, + + render: async function (subject, context) { + const mod = await import(/* webpackChunkName: "transaction-pane" */ '../transaction/period.js') + const realPane = mod.default || mod + return realPane.render(subject, context) + } +} + +export const tripPane = { + icon: UI.icons.iconBase + 'noun_62007.svg', + name: 'travel expenses', + audience: [ns.solid('PowerUser')], + + label: function (subject, context) { + const kb = context.session.store + const dominated = kb.findSuperClassesNT(subject) + if (dominated[ns.qu('Transaction').uri]) return 'by Trip' + + const types = kb.findTypeURIs(subject) + if (types['http://www.w3.org/ns/pim/trip#Trip']) return 'Trip $' + + return null + }, + + render: async function (subject, context) { + const mod = await import(/* webpackChunkName: "transaction-pane" */ '../trip/tripPane.js') + const realPane = mod.default || mod + return realPane.render(subject, context) + } +} diff --git a/src/mainPage/footer.ts b/src/mainPage/footer.ts index 77045023..bb39e343 100644 --- a/src/mainPage/footer.ts +++ b/src/mainPage/footer.ts @@ -1,5 +1,5 @@ import { LiveStore } from 'rdflib' -import { initFooter } from 'solid-ui' +import { initFooter } from 'solid-ui-jss' /** * links in the footer diff --git a/src/mainPage/header.ts b/src/mainPage/header.ts index 61aa0170..e2f43f0f 100644 --- a/src/mainPage/header.ts +++ b/src/mainPage/header.ts @@ -1,5 +1,5 @@ -import { authSession, authn } from 'solid-logic' -import { icons, initHeader } from 'solid-ui' +import { authSession, authn } from 'solid-logic-jss' +import { icons, initHeader } from 'solid-ui-jss' /** * menu icons */ diff --git a/src/microblogPane/microblogPane.js b/src/microblogPane/microblogPane.js index cd69ff23..9fdf94b7 100644 --- a/src/microblogPane/microblogPane.js +++ b/src/microblogPane/microblogPane.js @@ -3,8 +3,8 @@ Charles McKenzie */ /* global alert */ -import { authn, store } from 'solid-logic' -import * as UI from 'solid-ui' +import { authn, store } from 'solid-logic-jss' +import * as UI from 'solid-ui-jss' import * as $rdf from 'rdflib' export default { diff --git a/src/n3Pane.js b/src/n3Pane.js index ee8d2c21..e7a9a811 100644 --- a/src/n3Pane.js +++ b/src/n3Pane.js @@ -4,7 +4,7 @@ ** or at least the RDF semantics we attribute to that resource, ** in generated N3 syntax. */ -import * as UI from 'solid-ui' +import * as UI from 'solid-ui-jss' import * as $rdf from 'rdflib' const ns = UI.ns diff --git a/src/outline/context.ts b/src/outline/context.ts index dffe4f83..d32b4826 100644 --- a/src/outline/context.ts +++ b/src/outline/context.ts @@ -1,6 +1,6 @@ import { DataBrowserContext, PaneRegistry } from 'pane-registry' import { getOutliner } from '../index' -import { SolidLogic } from 'solid-logic' +import { SolidLogic } from 'solid-logic-jss' import { LiveStore } from 'rdflib' export function createContext ( @@ -15,7 +15,8 @@ export function createContext ( session: { paneRegistry, store, - logic + // Cast to any to bridge solid-logic-jss and solid-logic type differences + logic: logic as any } } } diff --git a/src/outline/manager.js b/src/outline/manager.js index abce7861..469b08cf 100644 --- a/src/outline/manager.js +++ b/src/outline/manager.js @@ -4,8 +4,8 @@ */ import * as paneRegistry from 'pane-registry' import * as $rdf from 'rdflib' -import * as UI from 'solid-ui' -import { authn, authSession, store } from 'solid-logic' +import * as UI from 'solid-ui-jss' +import { authn, authSession, store } from 'solid-logic-jss' import { propertyViews } from './propertyViews' import { outlineIcons } from './outlineIcons.js' // @@ chec import { UserInput } from './userInput.js' @@ -641,32 +641,54 @@ export default function (context) { } } const renderPane = function (pane) { - let paneDiv UI.log.info('outline: Rendering pane (2): ' + pane.name) - try { - paneDiv = pane.render(subject, context, options) - } catch (e) { - // Easier debugging for pane developers - paneDiv = dom.createElement('div') - paneDiv.setAttribute('class', 'exceptionPane') + const second = containingTable.firstChild.nextSibling + const row = dom.createElement('tr') + const cell = row.appendChild(dom.createElement('td')) + + // Helper to handle the rendered result + const handleRendered = (paneDiv) => { + cell.appendChild(paneDiv) + if ( + pane.requireQueryButton && + dom.getElementById('queryButton') + ) { + dom.getElementById('queryButton').removeAttribute('style') + } + } + + // Helper for errors + const handleError = (e) => { + const errorDiv = dom.createElement('div') + errorDiv.setAttribute('class', 'exceptionPane') const pre = dom.createElement('pre') - paneDiv.appendChild(pre) - pre.appendChild( - dom.createTextNode(UI.utils.stackString(e)) - ) + errorDiv.appendChild(pre) + pre.appendChild(dom.createTextNode(UI.utils.stackString(e))) + return errorDiv } - if ( - pane.requireQueryButton && - dom.getElementById('queryButton') - ) { - dom.getElementById('queryButton').removeAttribute('style') + try { + const result = pane.render(subject, context, options) + // Handle async render (returns Promise) + if (result && typeof result.then === 'function') { + const loading = dom.createElement('div') + loading.textContent = 'Loading ' + pane.name + '...' + cell.appendChild(loading) + result.then(paneDiv => { + cell.removeChild(loading) + handleRendered(paneDiv) + }).catch(e => { + cell.removeChild(loading) + handleRendered(handleError(e)) + }) + } else { + handleRendered(result) + } + } catch (e) { + handleRendered(handleError(e)) } - const second = containingTable.firstChild.nextSibling - const row = dom.createElement('tr') - const cell = row.appendChild(dom.createElement('td')) - cell.appendChild(paneDiv) + if (second) containingTable.insertBefore(row, second) else containingTable.appendChild(row) row.pane = pane @@ -820,30 +842,56 @@ export default function (context) { table.appendChild(tr1) if (tr1.firstPane) { - let paneDiv - try { - UI.log.info('outline: Rendering pane (1): ' + tr1.firstPane.name) - paneDiv = tr1.firstPane.render(subject, context, options) - } catch (e) { - // Easier debugging for pane developers - paneDiv = dom.createElement('div') - paneDiv.setAttribute('class', 'exceptionPane') + const pane = tr1.firstPane + UI.log.info('outline: Rendering pane (1): ' + pane.name) + + const row = dom.createElement('tr') + const cell = row.appendChild(dom.createElement('td')) + + // Helper to handle the rendered result + const handleRendered = (paneDiv) => { + cell.appendChild(paneDiv) + if ( + pane.requireQueryButton && + dom.getElementById('queryButton') + ) { + dom.getElementById('queryButton').removeAttribute('style') + } + } + + // Helper for errors + const handleError = (e) => { + const errorDiv = dom.createElement('div') + errorDiv.setAttribute('class', 'exceptionPane') const pre = dom.createElement('pre') - paneDiv.appendChild(pre) + errorDiv.appendChild(pre) pre.appendChild(dom.createTextNode(UI.utils.stackString(e))) + return errorDiv } - const row = dom.createElement('tr') - const cell = row.appendChild(dom.createElement('td')) - cell.appendChild(paneDiv) - if ( - tr1.firstPane.requireQueryButton && - dom.getElementById('queryButton') - ) { - dom.getElementById('queryButton').removeAttribute('style') + try { + const result = pane.render(subject, context, options) + // Handle async render (returns Promise) + if (result && typeof result.then === 'function') { + const loading = dom.createElement('div') + loading.textContent = 'Loading ' + pane.name + '...' + cell.appendChild(loading) + result.then(paneDiv => { + cell.removeChild(loading) + handleRendered(paneDiv) + }).catch(e => { + cell.removeChild(loading) + handleRendered(handleError(e)) + }) + } else { + handleRendered(result) + } + } catch (e) { + handleRendered(handleError(e)) } + table.appendChild(row) - row.pane = tr1.firstPane + row.pane = pane row.paneButton = tr1.paneButton } }) diff --git a/src/outline/outlineIcons.js b/src/outline/outlineIcons.js index ea0445be..a829fc33 100644 --- a/src/outline/outlineIcons.js +++ b/src/outline/outlineIcons.js @@ -1,6 +1,6 @@ // This is a system of tracking tooltip phrases used by the tabulator outliner -import * as UI from 'solid-ui' +import * as UI from 'solid-ui-jss' export const outlineIcons = {} diff --git a/src/outline/propertyViews.ts b/src/outline/propertyViews.ts index d352268c..95777221 100644 --- a/src/outline/propertyViews.ts +++ b/src/outline/propertyViews.ts @@ -1,4 +1,4 @@ -import { ns } from 'solid-ui' +import { ns } from 'solid-ui-jss' import viewAsImage from './viewAsImage' import viewAsMbox from './viewAsMbox' diff --git a/src/outline/queryByExample.js b/src/outline/queryByExample.js index 9f7ddd76..28de16c6 100644 --- a/src/outline/queryByExample.js +++ b/src/outline/queryByExample.js @@ -6,8 +6,8 @@ // to find all other places which had the same pattern. // Fields could be optional by pressing th ewhite optoional button -import { store } from 'solid-logic' -import * as UI from 'solid-ui' +import { store } from 'solid-logic-jss' +import * as UI from 'solid-ui-jss' import * as $rdf from 'rdflib' const optionalSubqueriesIndex = [] diff --git a/src/outline/userInput.js b/src/outline/userInput.js index cdc24588..b6c1eff9 100644 --- a/src/outline/userInput.js +++ b/src/outline/userInput.js @@ -11,8 +11,8 @@ request: 'from' 'to' 'message' 'Request' */ -import * as UI from 'solid-ui' -import { store } from 'solid-logic' +import * as UI from 'solid-ui-jss' +import { store } from 'solid-logic-jss' import * as panes from 'pane-registry' import * as $rdf from 'rdflib' diff --git a/src/outline/viewAsImage.ts b/src/outline/viewAsImage.ts index 3921ba9e..38cb733b 100644 --- a/src/outline/viewAsImage.ts +++ b/src/outline/viewAsImage.ts @@ -1,4 +1,4 @@ -import * as UI from 'solid-ui' +import * as UI from 'solid-ui-jss' export default (dom) => function viewAsImage (obj) { const img = UI.utils.AJARImage( diff --git a/src/pad/padPane.ts b/src/pad/padPane.ts index 7003d960..4c1a3217 100644 --- a/src/pad/padPane.ts +++ b/src/pad/padPane.ts @@ -1,5 +1,5 @@ -import { icons, ns, pad, widgets, login } from 'solid-ui' -import { authn, AppDetails } from 'solid-logic' +import { icons, ns, pad, widgets, login } from 'solid-ui-jss' +import { authn, AppDetails } from 'solid-logic-jss' import { graph, log, NamedNode, Namespace, sym, serialize, Store } from 'rdflib' import { PaneDefinition } from 'pane-registry' /* pad Pane diff --git a/src/playlist/playlistPane.js b/src/playlist/playlistPane.js index 99236eff..03a7a6cb 100644 --- a/src/playlist/playlistPane.js +++ b/src/playlist/playlistPane.js @@ -3,7 +3,7 @@ ** This pane allows playlists and playlists slots to be viewed ** seeAlso: http://smiy.sourceforge.net/pbo/spec/playbackontology.html */ -import * as UI from 'solid-ui' +import * as UI from 'solid-ui-jss' import * as $rdf from 'rdflib' const ns = UI.ns diff --git a/src/registerPanes.js b/src/registerPanes.js index dff80c37..843034f9 100644 --- a/src/registerPanes.js +++ b/src/registerPanes.js @@ -1,147 +1,165 @@ -import profilePane from 'profile-pane' -// import editProfileView from './profile/editProfile.view' -import trustedApplications from './trustedApplications/trustedApplications.view' -import dashboardPane from './dashboard/dashboardPane' -import basicPreferences from './dashboard/basicPreferences' -import issuePane from 'issue-pane' -import contactsPane from 'contacts-pane' -import activityStreamsPane from 'activitystreams-pane' -import padPane from './pad/padPane' -// import argumentPane from './argument/argumentPane.js' -import transactionPane from './transaction/pane.js' -import financialPeriodPane from './transaction/period.js' -import meetingPane from 'meeting-pane' -import tabbedPane from './tabbed/tabbedPane' -import { longChatPane, shortChatPane } from 'chat-pane' -import { schedulePane } from './schedule/schedulePane.js' -// import publicationPane from './publication/publicationPane.js' -import tripPane from './trip/tripPane.js' -import { imagePane } from './imagePane.js' -import playListPane from './playlist/playlistPane.js' -import videoPane from './video/videoPane.js' -import audioPane from './audio/audioPane.js' -import dokieliPane from './dokieli/dokieliPane.js' -import folderPane from 'folder-pane' +/** + * Register all panes with the pane registry + * + * Panes are lazy-loaded - only the lightweight label() functions run upfront. + * The actual pane code is loaded on-demand when render() is called. + */ + +// Lazy-loaded pane wrappers +import { + // Chat + longChatPane, + shortChatPane, + // Profile & contacts + profilePane, + editProfilePane, + contactsPane, + // Issues & meetings + issuePane, + meetingPane, + // Content panes + folderPane, + padPane, + sourcePane, + // Media panes + imagePane, + videoPane, + audioPane, + playlistPane, + // Financial panes + transactionPane, + financialPeriodPane, + tripPane, + // Scheduling + schedulePane, + // Content views + slideshowPane, + dokieliPane, + socialPane, + // Dashboard & preferences + dashboardPane, + basicPreferencesPane, + trustedApplicationsPane, + // Activity & forms + activityStreamsPane, + formPane, + tabbedPane, + // Sharing & internals + sharingPane, + internalPane, + // Global panes + homePane, + // Example panes + bookmarkPane +} from './lazy/index.js' + +// Core panes that are always loaded (small, essential) import { classInstancePane } from './classInstancePane.js' -import { slideshowPane } from './slideshow/slideshowPane.js' -import { socialPane } from './socialPane.js' -import humanReadablePane from './humanReadablePane.js' - import { dataContentPane } from './dataContentPane.js' -import sourcePane from 'source-pane' import { n3Pane } from './n3Pane.js' import { RDFXMLPane } from './RDFXMLPane.js' -import { formPane } from './form/pane.js' import { tableViewPane } from './tableViewPane.js' import { defaultPane } from './defaultPane.js' +import humanReadablePane from './humanReadablePane.js' import uiPane from './ui/pane.js' -import sharingPane from './sharing/sharingPane' -import internalPane from './internal/internalPane' - -import homePane from './home/homePane' - export function registerPanes (register) { /* Note that the earliest panes have priority. So the most specific ones are first. ** */ - // Developer designed: - register(profilePane) // View someone's public profile - dominates all other panes. - const editProfileView = profilePane.editor - if (!editProfileView) { - console.log('@@@ editProfileView', 'profilePane is not providing an editor pane') - } + // === LAZY-LOADED PANES === - register(editProfileView) // Edit my profile. + // Profile panes - high priority for person URIs + register(profilePane) + register(editProfilePane) - register(trustedApplications) // must be registered before basicPreferences + // Preferences - must be before basicPreferences + register(trustedApplicationsPane) register(dashboardPane) - register(basicPreferences) + register(basicPreferencesPane) + + // Issue tracking register(issuePane) + + // Contacts register(contactsPane) + + // Activity streams register(activityStreamsPane) + // Notepad register(padPane) - // register(argumentPane) // A position in an argument tree + // Financial register(transactionPane) register(financialPeriodPane) + // Meetings register(meetingPane) register(tabbedPane) - register(longChatPane) // Long pane must have prio in case short pane tries to do a long pane - register(shortChatPane) // was './chat/chatPane.js' + // Chat - lazy-loaded + register(longChatPane) + register(shortChatPane) - // register(publicationPane) // Suppress for now - - register(schedulePane) // doodle poll + // Scheduling + register(schedulePane) + // Trip expenses register(tripPane) - // register(require('./airPane.js')) - - // Content views - register(imagePane) // Basic image view - register(playListPane) // Basic playlist view + // Media panes + register(imagePane) + register(playlistPane) + register(videoPane) + register(audioPane) - register(videoPane) // Video clip player - register(audioPane) // Audio clip player - - register(dokieliPane) // Should be above dataContentPane - register(folderPane) // Should be above dataContentPane - register(classInstancePane) // Should be above dataContentPane - // register(require('./dynamic/dynamicPanes.js')) // warp etc warp broken 2017/8 + // Document panes + register(dokieliPane) + register(folderPane) + register(classInstancePane) // Core - not lazy register(slideshowPane) + // Example panes - must be before dataContentPane + register(bookmarkPane) + + // Social register(socialPane) - register(humanReadablePane) // A web page as a web page -- how to escape to tabr? - // register(require('markdown-pane').Pane) // replaced by markdown in humanReadablePane + // Human readable (web pages) + register(humanReadablePane) // Core - not lazy + + // === CORE PANES (always loaded) === - register(dataContentPane) // Preferred for a data file - register(sourcePane) // edit source + // Data content pane - essential for RDF browsing + register(dataContentPane) + + // Source viewing - lazy + register(sourcePane) + + // RDF format panes - core register(n3Pane) register(RDFXMLPane) - // User configured - data driven + // Forms - lazy register(formPane) - // Generic: - + // Table view - core register(tableViewPane) - // Fallback totally generic: + // Default fallback - core, always needed register(defaultPane) + // UI pane - core register(uiPane) - // register(require("categoryPane.js")) // Not useful enough - // register(require("pubsPane.js")) // not finished - - // @@ jambo commented these things out to pare things down temporarily. - // Note must use // not /* to comment out to make sure expander sees it - // register(require("lawPane.js")) - - // register(require('./microblogPane/microblogPane.js')) - - // register(require("./social/pane.js")) // competitor to other social - // register(require("./airPane.js")) - // register(require("./lawPane.js")) - // register(require("pushbackPane.js")) - // register(require("CVPane.js")) - // register(require("photoPane.js")) - // register(require("tagPane.js")) - // register(require("photoImportPane.js")) - - // The sharing pane is fairly generic and administrative 201 + // Sharing - lazy register(sharingPane) - // The internals pane is always (almost?) the last as it is the least user-friendly + // Internal/developer - lazy register(internalPane) - register(homePane) // This is a global pane - - // ENDS + // Home - global, lazy + register(homePane) } diff --git a/src/schedule/schedulePane.js b/src/schedule/schedulePane.js index 46fe40a6..0df650a7 100644 --- a/src/schedule/schedulePane.js +++ b/src/schedule/schedulePane.js @@ -4,8 +4,8 @@ */ /* global alert */ -import * as UI from 'solid-ui' -import { authn } from 'solid-logic' +import * as UI from 'solid-ui-jss' +import { authn } from 'solid-logic-jss' import * as $rdf from 'rdflib' import formText from './formsForSchedule.ttl' diff --git a/src/sharing/sharingPane.ts b/src/sharing/sharingPane.ts index e3b8a4b3..424f61c6 100644 --- a/src/sharing/sharingPane.ts +++ b/src/sharing/sharingPane.ts @@ -8,7 +8,7 @@ ** like "this" where the string is seen by the user and so I18n is an issue. */ -import { aclControl, icons, ns } from 'solid-ui' +import { aclControl, icons, ns } from 'solid-ui-jss' const sharingPane = { icon: icons.iconBase + 'padlock-timbl.svg', diff --git a/src/slideshow/slideshowPane.js b/src/slideshow/slideshowPane.js index 0720bfad..a4abe24b 100644 --- a/src/slideshow/slideshowPane.js +++ b/src/slideshow/slideshowPane.js @@ -1,7 +1,7 @@ /* slideshow Pane ** */ -import * as UI from 'solid-ui' +import * as UI from 'solid-ui-jss' import makeBSS from '@solid/better-simple-slideshow' const ns = UI.ns diff --git a/src/socialPane.js b/src/socialPane.js index ee432446..877c412e 100644 --- a/src/socialPane.js +++ b/src/socialPane.js @@ -8,8 +8,8 @@ ** -- todo: use common code to get username and load profile and set 'me' */ -import * as UI from 'solid-ui' -import { authn } from 'solid-logic' +import * as UI from 'solid-ui-jss' +import { authn } from 'solid-logic-jss' import * as $rdf from 'rdflib' export const socialPane = { diff --git a/src/tabbed/tabbedPane.ts b/src/tabbed/tabbedPane.ts index fa8dbe7b..91238791 100644 --- a/src/tabbed/tabbedPane.ts +++ b/src/tabbed/tabbedPane.ts @@ -5,7 +5,7 @@ */ import { Store } from 'rdflib' import { PaneDefinition } from 'pane-registry' -import { icons, ns, tabs, widgets } from 'solid-ui' +import { icons, ns, tabs, widgets } from 'solid-ui-jss' const TabbedPane: PaneDefinition = { icon: icons.iconBase + 'noun_688606.svg', diff --git a/src/tableViewPane.js b/src/tableViewPane.js index 2e0c9cb9..c0aa5f6d 100644 --- a/src/tableViewPane.js +++ b/src/tableViewPane.js @@ -15,7 +15,7 @@ // /////////////////////////////////////////////////////////////////// // Table view pane -- view of a class as a table of properties of class members -import * as UI from 'solid-ui' +import * as UI from 'solid-ui-jss' export const tableViewPane = { icon: UI.icons.originalIconBase + 'table.png', diff --git a/src/transaction/pane.js b/src/transaction/pane.js index bd6f3b1c..fe65d32c 100644 --- a/src/transaction/pane.js +++ b/src/transaction/pane.js @@ -5,7 +5,7 @@ ** trips, etc */ -import * as UI from 'solid-ui' +import * as UI from 'solid-ui-jss' import * as $rdf from 'rdflib' const ns = UI.ns diff --git a/src/transaction/period.js b/src/transaction/period.js index c93962dc..87558c36 100644 --- a/src/transaction/period.js +++ b/src/transaction/period.js @@ -5,7 +5,7 @@ ** trips, etc */ -import * as UI from 'solid-ui' +import * as UI from 'solid-ui-jss' const ns = UI.ns export default { diff --git a/src/trip/tripPane.js b/src/trip/tripPane.js index 5b827cf3..ff595b78 100644 --- a/src/trip/tripPane.js +++ b/src/trip/tripPane.js @@ -8,7 +8,7 @@ ** trips, etc */ -import * as UI from 'solid-ui' +import * as UI from 'solid-ui-jss' import * as $rdf from 'rdflib' const ns = UI.ns diff --git a/src/trustedApplications/trustedApplications.dom.ts b/src/trustedApplications/trustedApplications.dom.ts index 404b870c..34c117bd 100644 --- a/src/trustedApplications/trustedApplications.dom.ts +++ b/src/trustedApplications/trustedApplications.dom.ts @@ -1,6 +1,6 @@ import { NamedNode, Statement, sym } from 'rdflib' -import { ns } from 'solid-ui' -import { store } from 'solid-logic' +import { ns } from 'solid-ui-jss' +import { store } from 'solid-logic-jss' import { generateRandomString, getStatementsToAdd, getStatementsToDelete } from './trustedApplications.utils' interface FormElements { diff --git a/src/trustedApplications/trustedApplications.view.ts b/src/trustedApplications/trustedApplications.view.ts index 9cfe21bd..d6c6bd38 100644 --- a/src/trustedApplications/trustedApplications.view.ts +++ b/src/trustedApplications/trustedApplications.view.ts @@ -1,7 +1,7 @@ import { PaneDefinition } from 'pane-registry' import { NamedNode } from 'rdflib' -import { icons, login, widgets } from 'solid-ui' -import { store } from 'solid-logic' +import { icons, login, widgets } from 'solid-ui-jss' +import { store } from 'solid-logic-jss' import { createApplicationTable, createContainer, createText } from './trustedApplications.dom' const thisColor = '#418d99' diff --git a/src/ui/pane.js b/src/ui/pane.js index 9a0a4381..fb0cb4a5 100644 --- a/src/ui/pane.js +++ b/src/ui/pane.js @@ -2,7 +2,7 @@ ** */ -import * as UI from 'solid-ui' +import * as UI from 'solid-ui-jss' import * as $rdf from 'rdflib' const ns = UI.ns diff --git a/src/utils/mimeTypes.ts b/src/utils/mimeTypes.ts new file mode 100644 index 00000000..8894aad9 --- /dev/null +++ b/src/utils/mimeTypes.ts @@ -0,0 +1,46 @@ +/** + * Lightweight MIME type lookup + * Replaces the heavy mime-types package (146KB) + */ + +const extToMime: Record = { + // Web documents + html: 'text/html', + htm: 'text/html', + css: 'text/css', + js: 'text/javascript', + json: 'application/json', + xml: 'text/xml', + txt: 'text/plain', + md: 'text/markdown', + + // RDF + ttl: 'text/turtle', + n3: 'text/n3', + rdf: 'application/rdf+xml', + jsonld: 'application/ld+json', + + // Images + jpg: 'image/jpeg', + jpeg: 'image/jpeg', + png: 'image/png', + gif: 'image/gif', + svg: 'image/svg+xml', + webp: 'image/webp', + + // Media + mp3: 'audio/mpeg', + mp4: 'video/mp4', + webm: 'video/webm', + + // Documents + pdf: 'application/pdf', +} + +export function lookup (filename: string): string | false { + const ext = filename.split('.').pop()?.toLowerCase() + if (!ext) return false + return extToMime[ext] || false +} + +export default { lookup } diff --git a/src/video/videoPane.js b/src/video/videoPane.js index 47a36e27..2dc423eb 100644 --- a/src/video/videoPane.js +++ b/src/video/videoPane.js @@ -1,7 +1,7 @@ /* Single video play Pane ** */ -import * as UI from 'solid-ui' +import * as UI from 'solid-ui-jss' import * as $rdf from 'rdflib' export default { diff --git a/test/unit/test-import-export/edit-importer.js b/test/unit/test-import-export/edit-importer.js index 9934d158..ba3e8ec4 100644 --- a/test/unit/test-import-export/edit-importer.js +++ b/test/unit/test-import-export/edit-importer.js @@ -10,8 +10,8 @@ ** or standalone script adding onto existing mashlib. */ -// import UI from 'solid-ui' -// import solidUi, { SolidUi } from 'solid-ui' +// import UI from 'solid-ui-jss' +// import solidUi, { SolidUi } from 'solid-ui-jss' // @@ TODO: Write away the need for exception on next line const thisPane = { foo: 'bar' }