@pod-os/elements 0.12.1-d8a8144.0 → 0.12.1-e34e3c6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{index-8c116b24.js → index-cc1b1b95.js} +127 -2
- package/dist/cjs/ion-app_26.cjs.entry.js +1 -1
- package/dist/cjs/pos-container-contents.cjs.entry.js +1 -1
- package/dist/cjs/pos-subjects.cjs.entry.js +1 -1
- package/dist/components/index8.js +127 -2
- package/dist/elements/elements.esm.js +1 -1
- package/dist/elements/{p-7eafab7c.entry.js → p-1997d089.entry.js} +1 -1
- package/dist/elements/{p-da85c9fc.js → p-5f2e3cfd.js} +2 -2
- package/dist/elements/{p-6b7c2114.entry.js → p-61b08f64.entry.js} +1 -1
- package/dist/elements/{p-c1e9bc5e.entry.js → p-a97a5a75.entry.js} +1 -1
- package/dist/esm/{index-9e91fad4.js → index-707911b5.js} +127 -2
- package/dist/esm/ion-app_26.entry.js +1 -1
- package/dist/esm/pos-container-contents.entry.js +1 -1
- package/dist/esm/pos-subjects.entry.js +1 -1
- package/package.json +1 -1
|
@@ -30962,6 +30962,59 @@ var require_queue_microtask = __commonJS({
|
|
|
30962
30962
|
}
|
|
30963
30963
|
});
|
|
30964
30964
|
|
|
30965
|
+
// ../node_modules/slugify/slugify.js
|
|
30966
|
+
var require_slugify = __commonJS({
|
|
30967
|
+
"../node_modules/slugify/slugify.js"(exports, module2) {
|
|
30968
|
+
(function(name6, root, factory) {
|
|
30969
|
+
if (typeof exports === "object") {
|
|
30970
|
+
module2.exports = factory();
|
|
30971
|
+
module2.exports["default"] = factory();
|
|
30972
|
+
} else if (typeof define === "function" && define.amd) {
|
|
30973
|
+
define(factory);
|
|
30974
|
+
} else {
|
|
30975
|
+
root[name6] = factory();
|
|
30976
|
+
}
|
|
30977
|
+
})("slugify", exports, function() {
|
|
30978
|
+
var charMap = JSON.parse(`{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","\xA2":"cent","\xA3":"pound","\xA4":"currency","\xA5":"yen","\xA9":"(c)","\xAA":"a","\xAE":"(r)","\xBA":"o","\xC0":"A","\xC1":"A","\xC2":"A","\xC3":"A","\xC4":"A","\xC5":"A","\xC6":"AE","\xC7":"C","\xC8":"E","\xC9":"E","\xCA":"E","\xCB":"E","\xCC":"I","\xCD":"I","\xCE":"I","\xCF":"I","\xD0":"D","\xD1":"N","\xD2":"O","\xD3":"O","\xD4":"O","\xD5":"O","\xD6":"O","\xD8":"O","\xD9":"U","\xDA":"U","\xDB":"U","\xDC":"U","\xDD":"Y","\xDE":"TH","\xDF":"ss","\xE0":"a","\xE1":"a","\xE2":"a","\xE3":"a","\xE4":"a","\xE5":"a","\xE6":"ae","\xE7":"c","\xE8":"e","\xE9":"e","\xEA":"e","\xEB":"e","\xEC":"i","\xED":"i","\xEE":"i","\xEF":"i","\xF0":"d","\xF1":"n","\xF2":"o","\xF3":"o","\xF4":"o","\xF5":"o","\xF6":"o","\xF8":"o","\xF9":"u","\xFA":"u","\xFB":"u","\xFC":"u","\xFD":"y","\xFE":"th","\xFF":"y","\u0100":"A","\u0101":"a","\u0102":"A","\u0103":"a","\u0104":"A","\u0105":"a","\u0106":"C","\u0107":"c","\u010C":"C","\u010D":"c","\u010E":"D","\u010F":"d","\u0110":"DJ","\u0111":"dj","\u0112":"E","\u0113":"e","\u0116":"E","\u0117":"e","\u0118":"e","\u0119":"e","\u011A":"E","\u011B":"e","\u011E":"G","\u011F":"g","\u0122":"G","\u0123":"g","\u0128":"I","\u0129":"i","\u012A":"i","\u012B":"i","\u012E":"I","\u012F":"i","\u0130":"I","\u0131":"i","\u0136":"k","\u0137":"k","\u013B":"L","\u013C":"l","\u013D":"L","\u013E":"l","\u0141":"L","\u0142":"l","\u0143":"N","\u0144":"n","\u0145":"N","\u0146":"n","\u0147":"N","\u0148":"n","\u014C":"O","\u014D":"o","\u0150":"O","\u0151":"o","\u0152":"OE","\u0153":"oe","\u0154":"R","\u0155":"r","\u0158":"R","\u0159":"r","\u015A":"S","\u015B":"s","\u015E":"S","\u015F":"s","\u0160":"S","\u0161":"s","\u0162":"T","\u0163":"t","\u0164":"T","\u0165":"t","\u0168":"U","\u0169":"u","\u016A":"u","\u016B":"u","\u016E":"U","\u016F":"u","\u0170":"U","\u0171":"u","\u0172":"U","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017A":"z","\u017B":"Z","\u017C":"z","\u017D":"Z","\u017E":"z","\u018F":"E","\u0192":"f","\u01A0":"O","\u01A1":"o","\u01AF":"U","\u01B0":"u","\u01C8":"LJ","\u01C9":"lj","\u01CB":"NJ","\u01CC":"nj","\u0218":"S","\u0219":"s","\u021A":"T","\u021B":"t","\u0259":"e","\u02DA":"o","\u0386":"A","\u0388":"E","\u0389":"H","\u038A":"I","\u038C":"O","\u038E":"Y","\u038F":"W","\u0390":"i","\u0391":"A","\u0392":"B","\u0393":"G","\u0394":"D","\u0395":"E","\u0396":"Z","\u0397":"H","\u0398":"8","\u0399":"I","\u039A":"K","\u039B":"L","\u039C":"M","\u039D":"N","\u039E":"3","\u039F":"O","\u03A0":"P","\u03A1":"R","\u03A3":"S","\u03A4":"T","\u03A5":"Y","\u03A6":"F","\u03A7":"X","\u03A8":"PS","\u03A9":"W","\u03AA":"I","\u03AB":"Y","\u03AC":"a","\u03AD":"e","\u03AE":"h","\u03AF":"i","\u03B0":"y","\u03B1":"a","\u03B2":"b","\u03B3":"g","\u03B4":"d","\u03B5":"e","\u03B6":"z","\u03B7":"h","\u03B8":"8","\u03B9":"i","\u03BA":"k","\u03BB":"l","\u03BC":"m","\u03BD":"n","\u03BE":"3","\u03BF":"o","\u03C0":"p","\u03C1":"r","\u03C2":"s","\u03C3":"s","\u03C4":"t","\u03C5":"y","\u03C6":"f","\u03C7":"x","\u03C8":"ps","\u03C9":"w","\u03CA":"i","\u03CB":"y","\u03CC":"o","\u03CD":"y","\u03CE":"w","\u0401":"Yo","\u0402":"DJ","\u0404":"Ye","\u0406":"I","\u0407":"Yi","\u0408":"J","\u0409":"LJ","\u040A":"NJ","\u040B":"C","\u040F":"DZ","\u0410":"A","\u0411":"B","\u0412":"V","\u0413":"G","\u0414":"D","\u0415":"E","\u0416":"Zh","\u0417":"Z","\u0418":"I","\u0419":"J","\u041A":"K","\u041B":"L","\u041C":"M","\u041D":"N","\u041E":"O","\u041F":"P","\u0420":"R","\u0421":"S","\u0422":"T","\u0423":"U","\u0424":"F","\u0425":"H","\u0426":"C","\u0427":"Ch","\u0428":"Sh","\u0429":"Sh","\u042A":"U","\u042B":"Y","\u042C":"","\u042D":"E","\u042E":"Yu","\u042F":"Ya","\u0430":"a","\u0431":"b","\u0432":"v","\u0433":"g","\u0434":"d","\u0435":"e","\u0436":"zh","\u0437":"z","\u0438":"i","\u0439":"j","\u043A":"k","\u043B":"l","\u043C":"m","\u043D":"n","\u043E":"o","\u043F":"p","\u0440":"r","\u0441":"s","\u0442":"t","\u0443":"u","\u0444":"f","\u0445":"h","\u0446":"c","\u0447":"ch","\u0448":"sh","\u0449":"sh","\u044A":"u","\u044B":"y","\u044C":"","\u044D":"e","\u044E":"yu","\u044F":"ya","\u0451":"yo","\u0452":"dj","\u0454":"ye","\u0456":"i","\u0457":"yi","\u0458":"j","\u0459":"lj","\u045A":"nj","\u045B":"c","\u045D":"u","\u045F":"dz","\u0490":"G","\u0491":"g","\u0492":"GH","\u0493":"gh","\u049A":"KH","\u049B":"kh","\u04A2":"NG","\u04A3":"ng","\u04AE":"UE","\u04AF":"ue","\u04B0":"U","\u04B1":"u","\u04BA":"H","\u04BB":"h","\u04D8":"AE","\u04D9":"ae","\u04E8":"OE","\u04E9":"oe","\u0531":"A","\u0532":"B","\u0533":"G","\u0534":"D","\u0535":"E","\u0536":"Z","\u0537":"E'","\u0538":"Y'","\u0539":"T'","\u053A":"JH","\u053B":"I","\u053C":"L","\u053D":"X","\u053E":"C'","\u053F":"K","\u0540":"H","\u0541":"D'","\u0542":"GH","\u0543":"TW","\u0544":"M","\u0545":"Y","\u0546":"N","\u0547":"SH","\u0549":"CH","\u054A":"P","\u054B":"J","\u054C":"R'","\u054D":"S","\u054E":"V","\u054F":"T","\u0550":"R","\u0551":"C","\u0553":"P'","\u0554":"Q'","\u0555":"O''","\u0556":"F","\u0587":"EV","\u0621":"a","\u0622":"aa","\u0623":"a","\u0624":"u","\u0625":"i","\u0626":"e","\u0627":"a","\u0628":"b","\u0629":"h","\u062A":"t","\u062B":"th","\u062C":"j","\u062D":"h","\u062E":"kh","\u062F":"d","\u0630":"th","\u0631":"r","\u0632":"z","\u0633":"s","\u0634":"sh","\u0635":"s","\u0636":"dh","\u0637":"t","\u0638":"z","\u0639":"a","\u063A":"gh","\u0641":"f","\u0642":"q","\u0643":"k","\u0644":"l","\u0645":"m","\u0646":"n","\u0647":"h","\u0648":"w","\u0649":"a","\u064A":"y","\u064B":"an","\u064C":"on","\u064D":"en","\u064E":"a","\u064F":"u","\u0650":"e","\u0652":"","\u0660":"0","\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u067E":"p","\u0686":"ch","\u0698":"zh","\u06A9":"k","\u06AF":"g","\u06CC":"y","\u06F0":"0","\u06F1":"1","\u06F2":"2","\u06F3":"3","\u06F4":"4","\u06F5":"5","\u06F6":"6","\u06F7":"7","\u06F8":"8","\u06F9":"9","\u0E3F":"baht","\u10D0":"a","\u10D1":"b","\u10D2":"g","\u10D3":"d","\u10D4":"e","\u10D5":"v","\u10D6":"z","\u10D7":"t","\u10D8":"i","\u10D9":"k","\u10DA":"l","\u10DB":"m","\u10DC":"n","\u10DD":"o","\u10DE":"p","\u10DF":"zh","\u10E0":"r","\u10E1":"s","\u10E2":"t","\u10E3":"u","\u10E4":"f","\u10E5":"k","\u10E6":"gh","\u10E7":"q","\u10E8":"sh","\u10E9":"ch","\u10EA":"ts","\u10EB":"dz","\u10EC":"ts","\u10ED":"ch","\u10EE":"kh","\u10EF":"j","\u10F0":"h","\u1E62":"S","\u1E63":"s","\u1E80":"W","\u1E81":"w","\u1E82":"W","\u1E83":"w","\u1E84":"W","\u1E85":"w","\u1E9E":"SS","\u1EA0":"A","\u1EA1":"a","\u1EA2":"A","\u1EA3":"a","\u1EA4":"A","\u1EA5":"a","\u1EA6":"A","\u1EA7":"a","\u1EA8":"A","\u1EA9":"a","\u1EAA":"A","\u1EAB":"a","\u1EAC":"A","\u1EAD":"a","\u1EAE":"A","\u1EAF":"a","\u1EB0":"A","\u1EB1":"a","\u1EB2":"A","\u1EB3":"a","\u1EB4":"A","\u1EB5":"a","\u1EB6":"A","\u1EB7":"a","\u1EB8":"E","\u1EB9":"e","\u1EBA":"E","\u1EBB":"e","\u1EBC":"E","\u1EBD":"e","\u1EBE":"E","\u1EBF":"e","\u1EC0":"E","\u1EC1":"e","\u1EC2":"E","\u1EC3":"e","\u1EC4":"E","\u1EC5":"e","\u1EC6":"E","\u1EC7":"e","\u1EC8":"I","\u1EC9":"i","\u1ECA":"I","\u1ECB":"i","\u1ECC":"O","\u1ECD":"o","\u1ECE":"O","\u1ECF":"o","\u1ED0":"O","\u1ED1":"o","\u1ED2":"O","\u1ED3":"o","\u1ED4":"O","\u1ED5":"o","\u1ED6":"O","\u1ED7":"o","\u1ED8":"O","\u1ED9":"o","\u1EDA":"O","\u1EDB":"o","\u1EDC":"O","\u1EDD":"o","\u1EDE":"O","\u1EDF":"o","\u1EE0":"O","\u1EE1":"o","\u1EE2":"O","\u1EE3":"o","\u1EE4":"U","\u1EE5":"u","\u1EE6":"U","\u1EE7":"u","\u1EE8":"U","\u1EE9":"u","\u1EEA":"U","\u1EEB":"u","\u1EEC":"U","\u1EED":"u","\u1EEE":"U","\u1EEF":"u","\u1EF0":"U","\u1EF1":"u","\u1EF2":"Y","\u1EF3":"y","\u1EF4":"Y","\u1EF5":"y","\u1EF6":"Y","\u1EF7":"y","\u1EF8":"Y","\u1EF9":"y","\u2013":"-","\u2018":"'","\u2019":"'","\u201C":"\\"","\u201D":"\\"","\u201E":"\\"","\u2020":"+","\u2022":"*","\u2026":"...","\u20A0":"ecu","\u20A2":"cruzeiro","\u20A3":"french franc","\u20A4":"lira","\u20A5":"mill","\u20A6":"naira","\u20A7":"peseta","\u20A8":"rupee","\u20A9":"won","\u20AA":"new shequel","\u20AB":"dong","\u20AC":"euro","\u20AD":"kip","\u20AE":"tugrik","\u20AF":"drachma","\u20B0":"penny","\u20B1":"peso","\u20B2":"guarani","\u20B3":"austral","\u20B4":"hryvnia","\u20B5":"cedi","\u20B8":"kazakhstani tenge","\u20B9":"indian rupee","\u20BA":"turkish lira","\u20BD":"russian ruble","\u20BF":"bitcoin","\u2120":"sm","\u2122":"tm","\u2202":"d","\u2206":"delta","\u2211":"sum","\u221E":"infinity","\u2665":"love","\u5143":"yuan","\u5186":"yen","\uFDFC":"rial","\uFEF5":"laa","\uFEF7":"laa","\uFEF9":"lai","\uFEFB":"la"}`);
|
|
30979
|
+
var locales = JSON.parse('{"bg":{"\u0419":"Y","\u0426":"Ts","\u0429":"Sht","\u042A":"A","\u042C":"Y","\u0439":"y","\u0446":"ts","\u0449":"sht","\u044A":"a","\u044C":"y"},"de":{"\xC4":"AE","\xE4":"ae","\xD6":"OE","\xF6":"oe","\xDC":"UE","\xFC":"ue","\xDF":"ss","%":"prozent","&":"und","|":"oder","\u2211":"summe","\u221E":"unendlich","\u2665":"liebe"},"es":{"%":"por ciento","&":"y","<":"menor que",">":"mayor que","|":"o","\xA2":"centavos","\xA3":"libras","\xA4":"moneda","\u20A3":"francos","\u2211":"suma","\u221E":"infinito","\u2665":"amor"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","\xA2":"centime","\xA3":"livre","\xA4":"devise","\u20A3":"franc","\u2211":"somme","\u221E":"infini","\u2665":"amour"},"pt":{"%":"porcento","&":"e","<":"menor",">":"maior","|":"ou","\xA2":"centavo","\u2211":"soma","\xA3":"libra","\u221E":"infinito","\u2665":"amor"},"uk":{"\u0418":"Y","\u0438":"y","\u0419":"Y","\u0439":"y","\u0426":"Ts","\u0446":"ts","\u0425":"Kh","\u0445":"kh","\u0429":"Shch","\u0449":"shch","\u0413":"H","\u0433":"h"},"vi":{"\u0110":"D","\u0111":"d"},"da":{"\xD8":"OE","\xF8":"oe","\xC5":"AA","\xE5":"aa","%":"procent","&":"og","|":"eller","$":"dollar","<":"mindre end",">":"st\xF8rre end"},"nb":{"&":"og","\xC5":"AA","\xC6":"AE","\xD8":"OE","\xE5":"aa","\xE6":"ae","\xF8":"oe"},"it":{"&":"e"},"nl":{"&":"en"},"sv":{"&":"och","\xC5":"AA","\xC4":"AE","\xD6":"OE","\xE5":"aa","\xE4":"ae","\xF6":"oe"}}');
|
|
30980
|
+
function replace(string, options) {
|
|
30981
|
+
if (typeof string !== "string") {
|
|
30982
|
+
throw new Error("slugify: string argument expected");
|
|
30983
|
+
}
|
|
30984
|
+
options = typeof options === "string" ? { replacement: options } : options || {};
|
|
30985
|
+
var locale = locales[options.locale] || {};
|
|
30986
|
+
var replacement = options.replacement === void 0 ? "-" : options.replacement;
|
|
30987
|
+
var trim = options.trim === void 0 ? true : options.trim;
|
|
30988
|
+
var slug = string.normalize().split("").reduce(function(result4, ch) {
|
|
30989
|
+
var appendChar = locale[ch];
|
|
30990
|
+
if (appendChar === void 0)
|
|
30991
|
+
appendChar = charMap[ch];
|
|
30992
|
+
if (appendChar === void 0)
|
|
30993
|
+
appendChar = ch;
|
|
30994
|
+
if (appendChar === replacement)
|
|
30995
|
+
appendChar = " ";
|
|
30996
|
+
return result4 + appendChar.replace(options.remove || /[^\w\s$*_+~.()'"!\-:@]+/g, "");
|
|
30997
|
+
}, "");
|
|
30998
|
+
if (options.strict) {
|
|
30999
|
+
slug = slug.replace(/[^A-Za-z0-9\s]/g, "");
|
|
31000
|
+
}
|
|
31001
|
+
if (trim) {
|
|
31002
|
+
slug = slug.trim();
|
|
31003
|
+
}
|
|
31004
|
+
slug = slug.replace(/\s+/g, replacement);
|
|
31005
|
+
if (options.lower) {
|
|
31006
|
+
slug = slug.toLowerCase();
|
|
31007
|
+
}
|
|
31008
|
+
return slug;
|
|
31009
|
+
}
|
|
31010
|
+
replace.extend = function(customMap) {
|
|
31011
|
+
Object.assign(charMap, customMap);
|
|
31012
|
+
};
|
|
31013
|
+
return replace;
|
|
31014
|
+
});
|
|
31015
|
+
}
|
|
31016
|
+
});
|
|
31017
|
+
|
|
30965
31018
|
// src/authentication/index.ts
|
|
30966
31019
|
var import_solid_client_authn_browser = __toESM(require_dist3());
|
|
30967
31020
|
var BrowserSession = class {
|
|
@@ -43812,6 +43865,7 @@ var Thing = class {
|
|
|
43812
43865
|
};
|
|
43813
43866
|
|
|
43814
43867
|
// src/Store.ts
|
|
43868
|
+
console.log("PodOS changed 2");
|
|
43815
43869
|
var Store = class {
|
|
43816
43870
|
constructor(session4) {
|
|
43817
43871
|
this.graph = graph2();
|
|
@@ -43823,7 +43877,16 @@ var Store = class {
|
|
|
43823
43877
|
* @param uri
|
|
43824
43878
|
*/
|
|
43825
43879
|
fetch(uri5) {
|
|
43826
|
-
return this.fetcher.load(namedNode2(uri5), {
|
|
43880
|
+
return this.fetcher.load(namedNode2(uri5), {
|
|
43881
|
+
// force fetching due to
|
|
43882
|
+
// https://github.com/linkeddata/rdflib.js/issues/247
|
|
43883
|
+
// and
|
|
43884
|
+
// https://github.com/linkeddata/rdflib.js/issues/441
|
|
43885
|
+
force: true,
|
|
43886
|
+
// explicitly omit credentials due to
|
|
43887
|
+
// https://github.com/pod-os/PodOS/issues/17
|
|
43888
|
+
credentials: "omit"
|
|
43889
|
+
});
|
|
43827
43890
|
}
|
|
43828
43891
|
/**
|
|
43829
43892
|
* Retrieve the thing identified by the given URI from the store
|
|
@@ -43842,7 +43905,40 @@ var Store = class {
|
|
|
43842
43905
|
addPropertyValue(thing, property2, value5) {
|
|
43843
43906
|
return this.updater.update(
|
|
43844
43907
|
[],
|
|
43845
|
-
[st2(namedNode2(thing.uri), namedNode2(property2), lit2(value5), namedNode2(thing.uri).doc())]
|
|
43908
|
+
[st2(namedNode2(thing.uri), namedNode2(property2), lit2(value5), namedNode2(thing.uri).doc())],
|
|
43909
|
+
void 0,
|
|
43910
|
+
false,
|
|
43911
|
+
{
|
|
43912
|
+
// explicitly omit credentials due to
|
|
43913
|
+
// https://github.com/pod-os/PodOS/issues/17
|
|
43914
|
+
credentials: "omit"
|
|
43915
|
+
}
|
|
43916
|
+
);
|
|
43917
|
+
}
|
|
43918
|
+
addNewThing(uri5, name6, type4) {
|
|
43919
|
+
return this.updater.update(
|
|
43920
|
+
[],
|
|
43921
|
+
[
|
|
43922
|
+
st2(
|
|
43923
|
+
namedNode2(uri5),
|
|
43924
|
+
namedNode2("https://www.w3.org/1999/02/22-rdf-syntax-ns#type"),
|
|
43925
|
+
namedNode2(type4),
|
|
43926
|
+
namedNode2(uri5).doc()
|
|
43927
|
+
),
|
|
43928
|
+
st2(
|
|
43929
|
+
namedNode2(uri5),
|
|
43930
|
+
namedNode2("http://www.w3.org/2000/01/rdf-schema#label"),
|
|
43931
|
+
lit2(name6),
|
|
43932
|
+
namedNode2(uri5).doc()
|
|
43933
|
+
)
|
|
43934
|
+
],
|
|
43935
|
+
void 0,
|
|
43936
|
+
false,
|
|
43937
|
+
{
|
|
43938
|
+
// explicitly omit credentials due to
|
|
43939
|
+
// https://github.com/pod-os/PodOS/issues/17
|
|
43940
|
+
credentials: "omit"
|
|
43941
|
+
}
|
|
43846
43942
|
);
|
|
43847
43943
|
}
|
|
43848
43944
|
};
|
|
@@ -55549,6 +55645,28 @@ function listKnownTerms() {
|
|
|
55549
55645
|
return createListOfTerms(index_es_exports);
|
|
55550
55646
|
}
|
|
55551
55647
|
|
|
55648
|
+
// src/uri/UriService.ts
|
|
55649
|
+
var import_slugify = __toESM(require_slugify());
|
|
55650
|
+
var UriService = class {
|
|
55651
|
+
// We expect to use the store for calculating the uris for things
|
|
55652
|
+
// e.g. looking up locations in type index
|
|
55653
|
+
constructor(store) {
|
|
55654
|
+
this.store = store;
|
|
55655
|
+
}
|
|
55656
|
+
/**
|
|
55657
|
+
* Proposes a URI for a new thing based on what the referenceUri identifies:
|
|
55658
|
+
* - if a container, the new URI is in this container
|
|
55659
|
+
* - if a file, the new URI is in the same container as said file
|
|
55660
|
+
* - if a non-information-resource, the new URI is in the same container as that resource
|
|
55661
|
+
* @param referenceUri
|
|
55662
|
+
* @param name (will be slugified)
|
|
55663
|
+
*/
|
|
55664
|
+
proposeUriForNewThing(referenceUri, name6) {
|
|
55665
|
+
const filename = (0, import_slugify.default)(name6, { lower: true });
|
|
55666
|
+
return `${new URL(filename, referenceUri)}#it`;
|
|
55667
|
+
}
|
|
55668
|
+
};
|
|
55669
|
+
|
|
55552
55670
|
// src/rdf-document/RdfDocument.ts
|
|
55553
55671
|
var RdfDocument = class extends Thing {
|
|
55554
55672
|
constructor(uri5, store, editable = false) {
|
|
@@ -55603,6 +55721,7 @@ var PodOS = class {
|
|
|
55603
55721
|
constructor() {
|
|
55604
55722
|
this.session = new BrowserSession();
|
|
55605
55723
|
this.store = new Store(this.session);
|
|
55724
|
+
this.uriService = new UriService(this.store);
|
|
55606
55725
|
this.fileFetcher = new FileFetcher(this.session);
|
|
55607
55726
|
}
|
|
55608
55727
|
handleIncomingRedirect() {
|
|
@@ -55620,6 +55739,12 @@ var PodOS = class {
|
|
|
55620
55739
|
listKnownTerms() {
|
|
55621
55740
|
return listKnownTerms();
|
|
55622
55741
|
}
|
|
55742
|
+
addNewThing(uri5, name6, type4) {
|
|
55743
|
+
return this.store.addNewThing(uri5, name6, type4);
|
|
55744
|
+
}
|
|
55745
|
+
proposeUriForNewThing(referenceUri, name6) {
|
|
55746
|
+
return this.uriService.proposeUriForNewThing(referenceUri, name6);
|
|
55747
|
+
}
|
|
55623
55748
|
trackSession(callback) {
|
|
55624
55749
|
return this.session.trackSession((session4) => {
|
|
55625
55750
|
this.store.updater.flagAuthorizationMetadata();
|
|
@@ -12,7 +12,7 @@ const index$2 = require('./index-c82a0027.js');
|
|
|
12
12
|
const keyboardController = require('./keyboard-controller-a934d106.js');
|
|
13
13
|
const index$3 = require('./index-4e78c1d2.js');
|
|
14
14
|
const BrokenFile = require('./BrokenFile-cfda711f.js');
|
|
15
|
-
const index$4 = require('./index-
|
|
15
|
+
const index$4 = require('./index-cc1b1b95.js');
|
|
16
16
|
const overlays = require('./overlays-5d99746a.js');
|
|
17
17
|
const ResourceAware = require('./ResourceAware-f1aac952.js');
|
|
18
18
|
const PodOsAware = require('./PodOsAware-003a2763.js');
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-db5db51f.js');
|
|
6
|
-
const index$1 = require('./index-
|
|
6
|
+
const index$1 = require('./index-cc1b1b95.js');
|
|
7
7
|
const ResourceAware = require('./ResourceAware-f1aac952.js');
|
|
8
8
|
|
|
9
9
|
const PosContainerContents = class {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-db5db51f.js');
|
|
6
|
-
const index$1 = require('./index-
|
|
6
|
+
const index$1 = require('./index-cc1b1b95.js');
|
|
7
7
|
const ResourceAware = require('./ResourceAware-f1aac952.js');
|
|
8
8
|
|
|
9
9
|
const PosSubjects = class {
|
|
@@ -30960,6 +30960,59 @@ var require_queue_microtask = __commonJS({
|
|
|
30960
30960
|
}
|
|
30961
30961
|
});
|
|
30962
30962
|
|
|
30963
|
+
// ../node_modules/slugify/slugify.js
|
|
30964
|
+
var require_slugify = __commonJS({
|
|
30965
|
+
"../node_modules/slugify/slugify.js"(exports, module2) {
|
|
30966
|
+
(function(name6, root, factory) {
|
|
30967
|
+
if (typeof exports === "object") {
|
|
30968
|
+
module2.exports = factory();
|
|
30969
|
+
module2.exports["default"] = factory();
|
|
30970
|
+
} else if (typeof define === "function" && define.amd) {
|
|
30971
|
+
define(factory);
|
|
30972
|
+
} else {
|
|
30973
|
+
root[name6] = factory();
|
|
30974
|
+
}
|
|
30975
|
+
})("slugify", exports, function() {
|
|
30976
|
+
var charMap = JSON.parse(`{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","\xA2":"cent","\xA3":"pound","\xA4":"currency","\xA5":"yen","\xA9":"(c)","\xAA":"a","\xAE":"(r)","\xBA":"o","\xC0":"A","\xC1":"A","\xC2":"A","\xC3":"A","\xC4":"A","\xC5":"A","\xC6":"AE","\xC7":"C","\xC8":"E","\xC9":"E","\xCA":"E","\xCB":"E","\xCC":"I","\xCD":"I","\xCE":"I","\xCF":"I","\xD0":"D","\xD1":"N","\xD2":"O","\xD3":"O","\xD4":"O","\xD5":"O","\xD6":"O","\xD8":"O","\xD9":"U","\xDA":"U","\xDB":"U","\xDC":"U","\xDD":"Y","\xDE":"TH","\xDF":"ss","\xE0":"a","\xE1":"a","\xE2":"a","\xE3":"a","\xE4":"a","\xE5":"a","\xE6":"ae","\xE7":"c","\xE8":"e","\xE9":"e","\xEA":"e","\xEB":"e","\xEC":"i","\xED":"i","\xEE":"i","\xEF":"i","\xF0":"d","\xF1":"n","\xF2":"o","\xF3":"o","\xF4":"o","\xF5":"o","\xF6":"o","\xF8":"o","\xF9":"u","\xFA":"u","\xFB":"u","\xFC":"u","\xFD":"y","\xFE":"th","\xFF":"y","\u0100":"A","\u0101":"a","\u0102":"A","\u0103":"a","\u0104":"A","\u0105":"a","\u0106":"C","\u0107":"c","\u010C":"C","\u010D":"c","\u010E":"D","\u010F":"d","\u0110":"DJ","\u0111":"dj","\u0112":"E","\u0113":"e","\u0116":"E","\u0117":"e","\u0118":"e","\u0119":"e","\u011A":"E","\u011B":"e","\u011E":"G","\u011F":"g","\u0122":"G","\u0123":"g","\u0128":"I","\u0129":"i","\u012A":"i","\u012B":"i","\u012E":"I","\u012F":"i","\u0130":"I","\u0131":"i","\u0136":"k","\u0137":"k","\u013B":"L","\u013C":"l","\u013D":"L","\u013E":"l","\u0141":"L","\u0142":"l","\u0143":"N","\u0144":"n","\u0145":"N","\u0146":"n","\u0147":"N","\u0148":"n","\u014C":"O","\u014D":"o","\u0150":"O","\u0151":"o","\u0152":"OE","\u0153":"oe","\u0154":"R","\u0155":"r","\u0158":"R","\u0159":"r","\u015A":"S","\u015B":"s","\u015E":"S","\u015F":"s","\u0160":"S","\u0161":"s","\u0162":"T","\u0163":"t","\u0164":"T","\u0165":"t","\u0168":"U","\u0169":"u","\u016A":"u","\u016B":"u","\u016E":"U","\u016F":"u","\u0170":"U","\u0171":"u","\u0172":"U","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017A":"z","\u017B":"Z","\u017C":"z","\u017D":"Z","\u017E":"z","\u018F":"E","\u0192":"f","\u01A0":"O","\u01A1":"o","\u01AF":"U","\u01B0":"u","\u01C8":"LJ","\u01C9":"lj","\u01CB":"NJ","\u01CC":"nj","\u0218":"S","\u0219":"s","\u021A":"T","\u021B":"t","\u0259":"e","\u02DA":"o","\u0386":"A","\u0388":"E","\u0389":"H","\u038A":"I","\u038C":"O","\u038E":"Y","\u038F":"W","\u0390":"i","\u0391":"A","\u0392":"B","\u0393":"G","\u0394":"D","\u0395":"E","\u0396":"Z","\u0397":"H","\u0398":"8","\u0399":"I","\u039A":"K","\u039B":"L","\u039C":"M","\u039D":"N","\u039E":"3","\u039F":"O","\u03A0":"P","\u03A1":"R","\u03A3":"S","\u03A4":"T","\u03A5":"Y","\u03A6":"F","\u03A7":"X","\u03A8":"PS","\u03A9":"W","\u03AA":"I","\u03AB":"Y","\u03AC":"a","\u03AD":"e","\u03AE":"h","\u03AF":"i","\u03B0":"y","\u03B1":"a","\u03B2":"b","\u03B3":"g","\u03B4":"d","\u03B5":"e","\u03B6":"z","\u03B7":"h","\u03B8":"8","\u03B9":"i","\u03BA":"k","\u03BB":"l","\u03BC":"m","\u03BD":"n","\u03BE":"3","\u03BF":"o","\u03C0":"p","\u03C1":"r","\u03C2":"s","\u03C3":"s","\u03C4":"t","\u03C5":"y","\u03C6":"f","\u03C7":"x","\u03C8":"ps","\u03C9":"w","\u03CA":"i","\u03CB":"y","\u03CC":"o","\u03CD":"y","\u03CE":"w","\u0401":"Yo","\u0402":"DJ","\u0404":"Ye","\u0406":"I","\u0407":"Yi","\u0408":"J","\u0409":"LJ","\u040A":"NJ","\u040B":"C","\u040F":"DZ","\u0410":"A","\u0411":"B","\u0412":"V","\u0413":"G","\u0414":"D","\u0415":"E","\u0416":"Zh","\u0417":"Z","\u0418":"I","\u0419":"J","\u041A":"K","\u041B":"L","\u041C":"M","\u041D":"N","\u041E":"O","\u041F":"P","\u0420":"R","\u0421":"S","\u0422":"T","\u0423":"U","\u0424":"F","\u0425":"H","\u0426":"C","\u0427":"Ch","\u0428":"Sh","\u0429":"Sh","\u042A":"U","\u042B":"Y","\u042C":"","\u042D":"E","\u042E":"Yu","\u042F":"Ya","\u0430":"a","\u0431":"b","\u0432":"v","\u0433":"g","\u0434":"d","\u0435":"e","\u0436":"zh","\u0437":"z","\u0438":"i","\u0439":"j","\u043A":"k","\u043B":"l","\u043C":"m","\u043D":"n","\u043E":"o","\u043F":"p","\u0440":"r","\u0441":"s","\u0442":"t","\u0443":"u","\u0444":"f","\u0445":"h","\u0446":"c","\u0447":"ch","\u0448":"sh","\u0449":"sh","\u044A":"u","\u044B":"y","\u044C":"","\u044D":"e","\u044E":"yu","\u044F":"ya","\u0451":"yo","\u0452":"dj","\u0454":"ye","\u0456":"i","\u0457":"yi","\u0458":"j","\u0459":"lj","\u045A":"nj","\u045B":"c","\u045D":"u","\u045F":"dz","\u0490":"G","\u0491":"g","\u0492":"GH","\u0493":"gh","\u049A":"KH","\u049B":"kh","\u04A2":"NG","\u04A3":"ng","\u04AE":"UE","\u04AF":"ue","\u04B0":"U","\u04B1":"u","\u04BA":"H","\u04BB":"h","\u04D8":"AE","\u04D9":"ae","\u04E8":"OE","\u04E9":"oe","\u0531":"A","\u0532":"B","\u0533":"G","\u0534":"D","\u0535":"E","\u0536":"Z","\u0537":"E'","\u0538":"Y'","\u0539":"T'","\u053A":"JH","\u053B":"I","\u053C":"L","\u053D":"X","\u053E":"C'","\u053F":"K","\u0540":"H","\u0541":"D'","\u0542":"GH","\u0543":"TW","\u0544":"M","\u0545":"Y","\u0546":"N","\u0547":"SH","\u0549":"CH","\u054A":"P","\u054B":"J","\u054C":"R'","\u054D":"S","\u054E":"V","\u054F":"T","\u0550":"R","\u0551":"C","\u0553":"P'","\u0554":"Q'","\u0555":"O''","\u0556":"F","\u0587":"EV","\u0621":"a","\u0622":"aa","\u0623":"a","\u0624":"u","\u0625":"i","\u0626":"e","\u0627":"a","\u0628":"b","\u0629":"h","\u062A":"t","\u062B":"th","\u062C":"j","\u062D":"h","\u062E":"kh","\u062F":"d","\u0630":"th","\u0631":"r","\u0632":"z","\u0633":"s","\u0634":"sh","\u0635":"s","\u0636":"dh","\u0637":"t","\u0638":"z","\u0639":"a","\u063A":"gh","\u0641":"f","\u0642":"q","\u0643":"k","\u0644":"l","\u0645":"m","\u0646":"n","\u0647":"h","\u0648":"w","\u0649":"a","\u064A":"y","\u064B":"an","\u064C":"on","\u064D":"en","\u064E":"a","\u064F":"u","\u0650":"e","\u0652":"","\u0660":"0","\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u067E":"p","\u0686":"ch","\u0698":"zh","\u06A9":"k","\u06AF":"g","\u06CC":"y","\u06F0":"0","\u06F1":"1","\u06F2":"2","\u06F3":"3","\u06F4":"4","\u06F5":"5","\u06F6":"6","\u06F7":"7","\u06F8":"8","\u06F9":"9","\u0E3F":"baht","\u10D0":"a","\u10D1":"b","\u10D2":"g","\u10D3":"d","\u10D4":"e","\u10D5":"v","\u10D6":"z","\u10D7":"t","\u10D8":"i","\u10D9":"k","\u10DA":"l","\u10DB":"m","\u10DC":"n","\u10DD":"o","\u10DE":"p","\u10DF":"zh","\u10E0":"r","\u10E1":"s","\u10E2":"t","\u10E3":"u","\u10E4":"f","\u10E5":"k","\u10E6":"gh","\u10E7":"q","\u10E8":"sh","\u10E9":"ch","\u10EA":"ts","\u10EB":"dz","\u10EC":"ts","\u10ED":"ch","\u10EE":"kh","\u10EF":"j","\u10F0":"h","\u1E62":"S","\u1E63":"s","\u1E80":"W","\u1E81":"w","\u1E82":"W","\u1E83":"w","\u1E84":"W","\u1E85":"w","\u1E9E":"SS","\u1EA0":"A","\u1EA1":"a","\u1EA2":"A","\u1EA3":"a","\u1EA4":"A","\u1EA5":"a","\u1EA6":"A","\u1EA7":"a","\u1EA8":"A","\u1EA9":"a","\u1EAA":"A","\u1EAB":"a","\u1EAC":"A","\u1EAD":"a","\u1EAE":"A","\u1EAF":"a","\u1EB0":"A","\u1EB1":"a","\u1EB2":"A","\u1EB3":"a","\u1EB4":"A","\u1EB5":"a","\u1EB6":"A","\u1EB7":"a","\u1EB8":"E","\u1EB9":"e","\u1EBA":"E","\u1EBB":"e","\u1EBC":"E","\u1EBD":"e","\u1EBE":"E","\u1EBF":"e","\u1EC0":"E","\u1EC1":"e","\u1EC2":"E","\u1EC3":"e","\u1EC4":"E","\u1EC5":"e","\u1EC6":"E","\u1EC7":"e","\u1EC8":"I","\u1EC9":"i","\u1ECA":"I","\u1ECB":"i","\u1ECC":"O","\u1ECD":"o","\u1ECE":"O","\u1ECF":"o","\u1ED0":"O","\u1ED1":"o","\u1ED2":"O","\u1ED3":"o","\u1ED4":"O","\u1ED5":"o","\u1ED6":"O","\u1ED7":"o","\u1ED8":"O","\u1ED9":"o","\u1EDA":"O","\u1EDB":"o","\u1EDC":"O","\u1EDD":"o","\u1EDE":"O","\u1EDF":"o","\u1EE0":"O","\u1EE1":"o","\u1EE2":"O","\u1EE3":"o","\u1EE4":"U","\u1EE5":"u","\u1EE6":"U","\u1EE7":"u","\u1EE8":"U","\u1EE9":"u","\u1EEA":"U","\u1EEB":"u","\u1EEC":"U","\u1EED":"u","\u1EEE":"U","\u1EEF":"u","\u1EF0":"U","\u1EF1":"u","\u1EF2":"Y","\u1EF3":"y","\u1EF4":"Y","\u1EF5":"y","\u1EF6":"Y","\u1EF7":"y","\u1EF8":"Y","\u1EF9":"y","\u2013":"-","\u2018":"'","\u2019":"'","\u201C":"\\"","\u201D":"\\"","\u201E":"\\"","\u2020":"+","\u2022":"*","\u2026":"...","\u20A0":"ecu","\u20A2":"cruzeiro","\u20A3":"french franc","\u20A4":"lira","\u20A5":"mill","\u20A6":"naira","\u20A7":"peseta","\u20A8":"rupee","\u20A9":"won","\u20AA":"new shequel","\u20AB":"dong","\u20AC":"euro","\u20AD":"kip","\u20AE":"tugrik","\u20AF":"drachma","\u20B0":"penny","\u20B1":"peso","\u20B2":"guarani","\u20B3":"austral","\u20B4":"hryvnia","\u20B5":"cedi","\u20B8":"kazakhstani tenge","\u20B9":"indian rupee","\u20BA":"turkish lira","\u20BD":"russian ruble","\u20BF":"bitcoin","\u2120":"sm","\u2122":"tm","\u2202":"d","\u2206":"delta","\u2211":"sum","\u221E":"infinity","\u2665":"love","\u5143":"yuan","\u5186":"yen","\uFDFC":"rial","\uFEF5":"laa","\uFEF7":"laa","\uFEF9":"lai","\uFEFB":"la"}`);
|
|
30977
|
+
var locales = JSON.parse('{"bg":{"\u0419":"Y","\u0426":"Ts","\u0429":"Sht","\u042A":"A","\u042C":"Y","\u0439":"y","\u0446":"ts","\u0449":"sht","\u044A":"a","\u044C":"y"},"de":{"\xC4":"AE","\xE4":"ae","\xD6":"OE","\xF6":"oe","\xDC":"UE","\xFC":"ue","\xDF":"ss","%":"prozent","&":"und","|":"oder","\u2211":"summe","\u221E":"unendlich","\u2665":"liebe"},"es":{"%":"por ciento","&":"y","<":"menor que",">":"mayor que","|":"o","\xA2":"centavos","\xA3":"libras","\xA4":"moneda","\u20A3":"francos","\u2211":"suma","\u221E":"infinito","\u2665":"amor"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","\xA2":"centime","\xA3":"livre","\xA4":"devise","\u20A3":"franc","\u2211":"somme","\u221E":"infini","\u2665":"amour"},"pt":{"%":"porcento","&":"e","<":"menor",">":"maior","|":"ou","\xA2":"centavo","\u2211":"soma","\xA3":"libra","\u221E":"infinito","\u2665":"amor"},"uk":{"\u0418":"Y","\u0438":"y","\u0419":"Y","\u0439":"y","\u0426":"Ts","\u0446":"ts","\u0425":"Kh","\u0445":"kh","\u0429":"Shch","\u0449":"shch","\u0413":"H","\u0433":"h"},"vi":{"\u0110":"D","\u0111":"d"},"da":{"\xD8":"OE","\xF8":"oe","\xC5":"AA","\xE5":"aa","%":"procent","&":"og","|":"eller","$":"dollar","<":"mindre end",">":"st\xF8rre end"},"nb":{"&":"og","\xC5":"AA","\xC6":"AE","\xD8":"OE","\xE5":"aa","\xE6":"ae","\xF8":"oe"},"it":{"&":"e"},"nl":{"&":"en"},"sv":{"&":"och","\xC5":"AA","\xC4":"AE","\xD6":"OE","\xE5":"aa","\xE4":"ae","\xF6":"oe"}}');
|
|
30978
|
+
function replace(string, options) {
|
|
30979
|
+
if (typeof string !== "string") {
|
|
30980
|
+
throw new Error("slugify: string argument expected");
|
|
30981
|
+
}
|
|
30982
|
+
options = typeof options === "string" ? { replacement: options } : options || {};
|
|
30983
|
+
var locale = locales[options.locale] || {};
|
|
30984
|
+
var replacement = options.replacement === void 0 ? "-" : options.replacement;
|
|
30985
|
+
var trim = options.trim === void 0 ? true : options.trim;
|
|
30986
|
+
var slug = string.normalize().split("").reduce(function(result4, ch) {
|
|
30987
|
+
var appendChar = locale[ch];
|
|
30988
|
+
if (appendChar === void 0)
|
|
30989
|
+
appendChar = charMap[ch];
|
|
30990
|
+
if (appendChar === void 0)
|
|
30991
|
+
appendChar = ch;
|
|
30992
|
+
if (appendChar === replacement)
|
|
30993
|
+
appendChar = " ";
|
|
30994
|
+
return result4 + appendChar.replace(options.remove || /[^\w\s$*_+~.()'"!\-:@]+/g, "");
|
|
30995
|
+
}, "");
|
|
30996
|
+
if (options.strict) {
|
|
30997
|
+
slug = slug.replace(/[^A-Za-z0-9\s]/g, "");
|
|
30998
|
+
}
|
|
30999
|
+
if (trim) {
|
|
31000
|
+
slug = slug.trim();
|
|
31001
|
+
}
|
|
31002
|
+
slug = slug.replace(/\s+/g, replacement);
|
|
31003
|
+
if (options.lower) {
|
|
31004
|
+
slug = slug.toLowerCase();
|
|
31005
|
+
}
|
|
31006
|
+
return slug;
|
|
31007
|
+
}
|
|
31008
|
+
replace.extend = function(customMap) {
|
|
31009
|
+
Object.assign(charMap, customMap);
|
|
31010
|
+
};
|
|
31011
|
+
return replace;
|
|
31012
|
+
});
|
|
31013
|
+
}
|
|
31014
|
+
});
|
|
31015
|
+
|
|
30963
31016
|
// src/authentication/index.ts
|
|
30964
31017
|
var import_solid_client_authn_browser = __toESM(require_dist3());
|
|
30965
31018
|
var BrowserSession = class {
|
|
@@ -43810,6 +43863,7 @@ var Thing = class {
|
|
|
43810
43863
|
};
|
|
43811
43864
|
|
|
43812
43865
|
// src/Store.ts
|
|
43866
|
+
console.log("PodOS changed 2");
|
|
43813
43867
|
var Store = class {
|
|
43814
43868
|
constructor(session4) {
|
|
43815
43869
|
this.graph = graph2();
|
|
@@ -43821,7 +43875,16 @@ var Store = class {
|
|
|
43821
43875
|
* @param uri
|
|
43822
43876
|
*/
|
|
43823
43877
|
fetch(uri5) {
|
|
43824
|
-
return this.fetcher.load(namedNode2(uri5), {
|
|
43878
|
+
return this.fetcher.load(namedNode2(uri5), {
|
|
43879
|
+
// force fetching due to
|
|
43880
|
+
// https://github.com/linkeddata/rdflib.js/issues/247
|
|
43881
|
+
// and
|
|
43882
|
+
// https://github.com/linkeddata/rdflib.js/issues/441
|
|
43883
|
+
force: true,
|
|
43884
|
+
// explicitly omit credentials due to
|
|
43885
|
+
// https://github.com/pod-os/PodOS/issues/17
|
|
43886
|
+
credentials: "omit"
|
|
43887
|
+
});
|
|
43825
43888
|
}
|
|
43826
43889
|
/**
|
|
43827
43890
|
* Retrieve the thing identified by the given URI from the store
|
|
@@ -43840,7 +43903,40 @@ var Store = class {
|
|
|
43840
43903
|
addPropertyValue(thing, property2, value5) {
|
|
43841
43904
|
return this.updater.update(
|
|
43842
43905
|
[],
|
|
43843
|
-
[st2(namedNode2(thing.uri), namedNode2(property2), lit2(value5), namedNode2(thing.uri).doc())]
|
|
43906
|
+
[st2(namedNode2(thing.uri), namedNode2(property2), lit2(value5), namedNode2(thing.uri).doc())],
|
|
43907
|
+
void 0,
|
|
43908
|
+
false,
|
|
43909
|
+
{
|
|
43910
|
+
// explicitly omit credentials due to
|
|
43911
|
+
// https://github.com/pod-os/PodOS/issues/17
|
|
43912
|
+
credentials: "omit"
|
|
43913
|
+
}
|
|
43914
|
+
);
|
|
43915
|
+
}
|
|
43916
|
+
addNewThing(uri5, name6, type4) {
|
|
43917
|
+
return this.updater.update(
|
|
43918
|
+
[],
|
|
43919
|
+
[
|
|
43920
|
+
st2(
|
|
43921
|
+
namedNode2(uri5),
|
|
43922
|
+
namedNode2("https://www.w3.org/1999/02/22-rdf-syntax-ns#type"),
|
|
43923
|
+
namedNode2(type4),
|
|
43924
|
+
namedNode2(uri5).doc()
|
|
43925
|
+
),
|
|
43926
|
+
st2(
|
|
43927
|
+
namedNode2(uri5),
|
|
43928
|
+
namedNode2("http://www.w3.org/2000/01/rdf-schema#label"),
|
|
43929
|
+
lit2(name6),
|
|
43930
|
+
namedNode2(uri5).doc()
|
|
43931
|
+
)
|
|
43932
|
+
],
|
|
43933
|
+
void 0,
|
|
43934
|
+
false,
|
|
43935
|
+
{
|
|
43936
|
+
// explicitly omit credentials due to
|
|
43937
|
+
// https://github.com/pod-os/PodOS/issues/17
|
|
43938
|
+
credentials: "omit"
|
|
43939
|
+
}
|
|
43844
43940
|
);
|
|
43845
43941
|
}
|
|
43846
43942
|
};
|
|
@@ -55547,6 +55643,28 @@ function listKnownTerms() {
|
|
|
55547
55643
|
return createListOfTerms(index_es_exports);
|
|
55548
55644
|
}
|
|
55549
55645
|
|
|
55646
|
+
// src/uri/UriService.ts
|
|
55647
|
+
var import_slugify = __toESM(require_slugify());
|
|
55648
|
+
var UriService = class {
|
|
55649
|
+
// We expect to use the store for calculating the uris for things
|
|
55650
|
+
// e.g. looking up locations in type index
|
|
55651
|
+
constructor(store) {
|
|
55652
|
+
this.store = store;
|
|
55653
|
+
}
|
|
55654
|
+
/**
|
|
55655
|
+
* Proposes a URI for a new thing based on what the referenceUri identifies:
|
|
55656
|
+
* - if a container, the new URI is in this container
|
|
55657
|
+
* - if a file, the new URI is in the same container as said file
|
|
55658
|
+
* - if a non-information-resource, the new URI is in the same container as that resource
|
|
55659
|
+
* @param referenceUri
|
|
55660
|
+
* @param name (will be slugified)
|
|
55661
|
+
*/
|
|
55662
|
+
proposeUriForNewThing(referenceUri, name6) {
|
|
55663
|
+
const filename = (0, import_slugify.default)(name6, { lower: true });
|
|
55664
|
+
return `${new URL(filename, referenceUri)}#it`;
|
|
55665
|
+
}
|
|
55666
|
+
};
|
|
55667
|
+
|
|
55550
55668
|
// src/rdf-document/RdfDocument.ts
|
|
55551
55669
|
var RdfDocument = class extends Thing {
|
|
55552
55670
|
constructor(uri5, store, editable = false) {
|
|
@@ -55601,6 +55719,7 @@ var PodOS = class {
|
|
|
55601
55719
|
constructor() {
|
|
55602
55720
|
this.session = new BrowserSession();
|
|
55603
55721
|
this.store = new Store(this.session);
|
|
55722
|
+
this.uriService = new UriService(this.store);
|
|
55604
55723
|
this.fileFetcher = new FileFetcher(this.session);
|
|
55605
55724
|
}
|
|
55606
55725
|
handleIncomingRedirect() {
|
|
@@ -55618,6 +55737,12 @@ var PodOS = class {
|
|
|
55618
55737
|
listKnownTerms() {
|
|
55619
55738
|
return listKnownTerms();
|
|
55620
55739
|
}
|
|
55740
|
+
addNewThing(uri5, name6, type4) {
|
|
55741
|
+
return this.store.addNewThing(uri5, name6, type4);
|
|
55742
|
+
}
|
|
55743
|
+
proposeUriForNewThing(referenceUri, name6) {
|
|
55744
|
+
return this.uriService.proposeUriForNewThing(referenceUri, name6);
|
|
55745
|
+
}
|
|
55621
55746
|
trackSession(callback) {
|
|
55622
55747
|
return this.session.trackSession((session4) => {
|
|
55623
55748
|
this.store.updater.flagAuthorizationMetadata();
|