solid-ui 2.4.14 → 2.4.15-fb2b21e1

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.
Files changed (50) hide show
  1. package/lib/acl/access-groups.d.ts +1 -2
  2. package/lib/acl/access-groups.d.ts.map +1 -1
  3. package/lib/acl/access-groups.js +4 -1
  4. package/lib/acl/access-groups.js.map +1 -1
  5. package/lib/acl/acl.d.ts +1 -2
  6. package/lib/acl/acl.d.ts.map +1 -1
  7. package/lib/acl/acl.js +6 -2
  8. package/lib/acl/acl.js.map +1 -1
  9. package/lib/footer/index.d.ts +20 -0
  10. package/lib/footer/index.d.ts.map +1 -0
  11. package/lib/footer/index.js +147 -0
  12. package/lib/footer/index.js.map +1 -0
  13. package/lib/footer/styleMap.d.ts +8 -0
  14. package/lib/footer/styleMap.d.ts.map +1 -0
  15. package/lib/footer/styleMap.js +15 -0
  16. package/lib/footer/styleMap.js.map +1 -0
  17. package/lib/header/index.d.ts +11 -8
  18. package/lib/header/index.d.ts.map +1 -1
  19. package/lib/header/index.js +81 -69
  20. package/lib/header/index.js.map +1 -1
  21. package/lib/header/styleMap.d.ts +0 -2
  22. package/lib/header/styleMap.d.ts.map +1 -1
  23. package/lib/header/styleMap.js +1 -5
  24. package/lib/header/styleMap.js.map +1 -1
  25. package/lib/index.d.ts +3 -2
  26. package/lib/index.d.ts.map +1 -1
  27. package/lib/index.js +10 -1
  28. package/lib/index.js.map +1 -1
  29. package/lib/logic.d.ts +2 -2
  30. package/lib/logic.d.ts.map +1 -1
  31. package/lib/logic.js +16 -12
  32. package/lib/logic.js.map +1 -1
  33. package/lib/{header/headerHelpers.d.ts → utils/headerFooterHelpers.d.ts} +11 -3
  34. package/lib/utils/headerFooterHelpers.d.ts.map +1 -0
  35. package/lib/utils/headerFooterHelpers.js +189 -0
  36. package/lib/utils/headerFooterHelpers.js.map +1 -0
  37. package/lib/versionInfo.js +4 -4
  38. package/lib/versionInfo.js.map +1 -1
  39. package/lib/webpack-bundle.js +16998 -326
  40. package/lib/webpack-bundle.js.map +1 -1
  41. package/lib/widgets/forms/autocomplete/autocompleteField.js +9 -5
  42. package/lib/widgets/forms/autocomplete/autocompleteField.js.map +1 -1
  43. package/lib/widgets/forms/autocomplete/language.js +3 -1
  44. package/lib/widgets/forms/autocomplete/language.js.map +1 -1
  45. package/lib/widgets/forms/autocomplete/publicData.js +15 -8
  46. package/lib/widgets/forms/autocomplete/publicData.js.map +1 -1
  47. package/package.json +5 -4
  48. package/lib/header/headerHelpers.d.ts.map +0 -1
  49. package/lib/header/headerHelpers.js +0 -96
  50. package/lib/header/headerHelpers.js.map +0 -1
package/lib/index.d.ts CHANGED
@@ -30,7 +30,8 @@ import * as utils from './utils';
30
30
  import * as widgets from './widgets/index';
31
31
  import versionInfo from './versionInfo';
32
32
  import { initHeader } from './header';
33
+ import { initFooter } from './footer';
33
34
  declare const dom: Document | null;
34
- declare const store: import("solid-logic").LiveStore;
35
- export { ns, rdf, acl, aclControl, authn, create, dom, icons, language, log, matrix, media, messageArea, infiniteMessageArea, pad, participation, preferences, solidLogicSingleton, store, style, table, tabs, utils, widgets, versionInfo, initHeader };
35
+ declare const store: rdf.LiveStore;
36
+ export { ns, rdf, acl, aclControl, authn, create, dom, icons, language, log, matrix, media, messageArea, infiniteMessageArea, pad, participation, preferences, solidLogicSingleton, store, style, table, tabs, utils, widgets, versionInfo, initHeader, initFooter };
36
37
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AA2BA;;;;GAIG;AAEH;;;GAGG;AAGH,OAAO,KAAK,GAAG,MAAM,QAAQ,CAAA;AAE7B,OAAO,KAAK,EAAE,MAAM,MAAM,CAAA;AAC1B,OAAO,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AACrC,OAAO,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,CAAA;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAErC,QAAA,MAAM,GAAG,iBAAkC,CAAA;AAC3C,QAAA,MAAM,KAAK,eAA4B,CAAA;AAkCvC,OAAO,EACL,EAAE,EACF,GAAG,EACH,GAAG,EACH,UAAU,EACV,KAAK,EACL,MAAM,EACN,GAAG,EACH,KAAK,EACL,QAAQ,EACR,GAAG,EACH,MAAM,EACN,KAAK,EACL,WAAW,EACX,mBAAmB,EACnB,GAAG,EACH,aAAa,EACb,WAAW,EACX,mBAAmB,EACnB,KAAK,EACL,KAAK,EACL,KAAK,EACL,IAAI,EACJ,KAAK,EACL,OAAO,EACP,WAAW,EACX,UAAU,EACV,UAAU,EACX,CAAA"}
package/lib/index.js CHANGED
@@ -81,6 +81,12 @@ Object.defineProperty(exports, "infiniteMessageArea", {
81
81
  return _infinite.infiniteMessageArea;
82
82
  }
83
83
  });
84
+ Object.defineProperty(exports, "initFooter", {
85
+ enumerable: true,
86
+ get: function get() {
87
+ return _footer.initFooter;
88
+ }
89
+ });
84
90
  Object.defineProperty(exports, "initHeader", {
85
91
  enumerable: true,
86
92
  get: function get() {
@@ -197,6 +203,8 @@ var _versionInfo = _interopRequireDefault(require("./versionInfo"));
197
203
 
198
204
  var _header = require("./header");
199
205
 
206
+ var _footer = require("./footer");
207
+
200
208
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
201
209
 
202
210
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
@@ -249,7 +257,8 @@ if (typeof window !== 'undefined') {
249
257
  utils: utils,
250
258
  widgets: widgets,
251
259
  versionInfo: _versionInfo["default"],
252
- initHeader: _header.initHeader
260
+ initHeader: _header.initHeader,
261
+ initFooter: _footer.initFooter
253
262
  }; // Simpler access by non-node scripts
254
263
  }
255
264
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":["dom","window","document","store","solidLogicSingleton","UI","ns","rdf","acl","aclControl","authn","create","icons","language","log","matrix","media","messageArea","infiniteMessageArea","pad","participation","preferences","style","table","tabs","utils","widgets","versionInfo","initHeader"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;;;;AAEA;;;;AACA;;AACA;;AACA;;AAIA;;AACA;;;;AACA;;;;AACA;;AACA;;AAEA;;AAEA;;AAEA;;;;AAEA;;;;AAEA;;;;AAEA;;AAEA;;;;AAEA;;AACA;;;;AAEA;;;;AACA;;;;AACA;;AACA;;;;;;AAnC8B;AAC9B;AAKA;AACA;AACA;AAMA;AAEA;AAEA;AAEA;AAEA;AAEA;AAEA;AAEA;AAGA;AAMA,IA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opyright (c) 2015-2016 Solid\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\nIf you would like to know more about the solid Solid project, please see\nhttps://github.com/solid/solid\n*/\n'use strict'\n/**\n * Provides a Solid client helper object (which exposes various static modules).\n * @module solidUi.js\n * @main solidUi.js\n */\n\n/**\n * @class SolidUi\n * @static\n */\n\n// REMOVE @ts-ignore as you migrate files to TypeScript\nimport * as rdf from 'rdflib' // pull in first avoid cross-refs\n// @ts-ignore\nimport * as ns from './ns'\nimport { acl, aclControl } from './acl/index'\nimport { authn } from './authn/index'\nimport { create } from './create/index'\n// @ts-ignore\n// import * as debug from '../debug'\n// @ts-ignore\nimport { icons } from './iconBase'\nimport * as language from './widgets/forms/autocomplete/language'\nimport * as log from './log'\nimport { matrix } from './matrix/index'\nimport { media } from './media/index'\n// @ts-ignore\nimport { messageArea } from './messageArea'\n// @ts-ignore\nimport { infiniteMessageArea } from './chat/infinite'\n// @ts-ignore\nimport * as pad from './pad'\n// @ts-ignore\nimport * as participation from './participation'\n// @ts-ignore\nimport * as preferences from './preferences'\n// @ts-ignore\nimport { solidLogicSingleton } from './logic'\n// @ts-ignore\nimport * as style from './style'\n// @ts-ignore\nimport { renderTableViewPane as table } from './table'\nimport * as tabs from './tabs'\n// @ts-ignore\nimport * as utils from './utils'\nimport * as widgets from './widgets/index'\nimport versionInfo from './versionInfo'\nimport { initHeader } from './header'\n\nconst dom = window ? window.document : null // Idea that UI.dom can be adapted in non-browser environments\nconst store = solidLogicSingleton.store\n\nif (typeof window !== 'undefined') {\n ;(<any>window).UI = {\n ns,\n rdf,\n acl,\n aclControl,\n authn,\n create,\n dom,\n icons,\n language,\n log,\n matrix,\n media,\n messageArea,\n infiniteMessageArea,\n pad,\n participation,\n preferences,\n solidLogicSingleton,\n store,\n style,\n table,\n tabs,\n utils,\n widgets,\n versionInfo,\n initHeader\n } // Simpler access by non-node scripts\n}\n\nexport {\n ns,\n rdf,\n acl,\n aclControl,\n authn,\n create,\n dom,\n icons,\n language,\n log,\n matrix,\n media,\n messageArea,\n infiniteMessageArea,\n pad,\n participation,\n preferences,\n solidLogicSingleton,\n store,\n style,\n table,\n tabs,\n utils,\n widgets,\n versionInfo,\n initHeader\n}\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../src/index.ts"],"names":["dom","window","document","store","solidLogicSingleton","UI","ns","rdf","acl","aclControl","authn","create","icons","language","log","matrix","media","messageArea","infiniteMessageArea","pad","participation","preferences","style","table","tabs","utils","widgets","versionInfo","initHeader","initFooter"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;;;;AAEA;;;;AACA;;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BkB;AAsBlBC,IAAAA,IAAI,EAAJA,IAtBkB;AAuBlBC,IAAAA,KAAK,EAALA,KAvBkB;AAwBlBC,IAAAA,OAAO,EAAPA,OAxBkB;AAyBlBC,IAAAA,WAAW,EAAXA,uBAzBkB;AA0BlBC,IAAAA,UAAU,EAAVA,kBA1BkB;AA2BlBC,IAAAA,UAAU,EAAVA;AA3BkB,GAAnB,CADgC,CA6B/B;AACH","sourcesContent":["/*\nThe MIT License (MIT)\n\nCopyright (c) 2015-2016 Solid\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\nIf you would like to know more about the solid Solid project, please see\nhttps://github.com/solid/solid\n*/\n'use strict'\n/**\n * Provides a Solid client helper object (which exposes various static modules).\n * @module solidUi.js\n * @main solidUi.js\n */\n\n/**\n * @class SolidUi\n * @static\n */\n\n// REMOVE @ts-ignore as you migrate files to TypeScript\nimport * as rdf from 'rdflib' // pull in first avoid cross-refs\n// @ts-ignore\nimport * as ns from './ns'\nimport { acl, aclControl } from './acl/index'\nimport { authn } from './authn/index'\nimport { create } from './create/index'\n// @ts-ignore\n// import * as debug from '../debug'\n// @ts-ignore\nimport { icons } from './iconBase'\nimport * as language from './widgets/forms/autocomplete/language'\nimport * as log from './log'\nimport { matrix } from './matrix/index'\nimport { media } from './media/index'\n// @ts-ignore\nimport { messageArea } from './messageArea'\n// @ts-ignore\nimport { infiniteMessageArea } from './chat/infinite'\n// @ts-ignore\nimport * as pad from './pad'\n// @ts-ignore\nimport * as participation from './participation'\n// @ts-ignore\nimport * as preferences from './preferences'\n// @ts-ignore\nimport { solidLogicSingleton } from './logic'\n// @ts-ignore\nimport * as style from './style'\n// @ts-ignore\nimport { renderTableViewPane as table } from './table'\nimport * as tabs from './tabs'\n// @ts-ignore\nimport * as utils from './utils'\nimport * as widgets from './widgets/index'\nimport versionInfo from './versionInfo'\nimport { initHeader } from './header'\nimport { initFooter } from './footer'\n\nconst dom = window ? window.document : null // Idea that UI.dom can be adapted in non-browser environments\nconst store = solidLogicSingleton.store\n\nif (typeof window !== 'undefined') {\n ;(<any>window).UI = {\n ns,\n rdf,\n acl,\n aclControl,\n authn,\n create,\n dom,\n icons,\n language,\n log,\n matrix,\n media,\n messageArea,\n infiniteMessageArea,\n pad,\n participation,\n preferences,\n solidLogicSingleton,\n store,\n style,\n table,\n tabs,\n utils,\n widgets,\n versionInfo,\n initHeader,\n initFooter\n } // Simpler access by non-node scripts\n}\n\nexport {\n ns,\n rdf,\n acl,\n aclControl,\n authn,\n create,\n dom,\n icons,\n language,\n log,\n matrix,\n media,\n messageArea,\n infiniteMessageArea,\n pad,\n participation,\n preferences,\n solidLogicSingleton,\n store,\n style,\n table,\n tabs,\n utils,\n widgets,\n versionInfo,\n initHeader,\n initFooter\n}\n"],"file":"index.js"}
package/lib/logic.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { SolidLogic } from 'solid-logic';
2
2
  export declare const solidLogicSingleton: SolidLogic;
3
- export declare const store: import("solid-logic").LiveStore;
4
- export declare const kb: import("solid-logic").LiveStore;
3
+ export declare const store: import("rdflib").LiveStore;
4
+ export declare const kb: import("rdflib").LiveStore;
5
5
  export declare const authn: import("solid-logic/lib/authn").AuthnLogic;
6
6
  export declare const chat: import("solid-logic/lib/chat/ChatLogic").ChatLogic;
7
7
  export declare const profile: import("solid-logic/lib/profile/ProfileLogic").ProfileLogic;
@@ -1 +1 @@
1
- {"version":3,"file":"logic.d.ts","sourceRoot":"","sources":["../src/logic.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAUxC,eAAO,MAAM,mBAAmB,YAAkD,CAAA;AAGlF,eAAO,MAAM,KAAK,iCAA4B,CAAA;AAC9C,eAAO,MAAM,EAAE,iCAAQ,CAAA;AAEvB,eAAO,MAAM,KAAK,4CAA4B,CAAA;AAC9C,eAAO,MAAM,IAAI,oDAA2B,CAAA;AAI5C,eAAO,MAAM,OAAO,6DAA8B,CAAA"}
1
+ {"version":3,"file":"logic.d.ts","sourceRoot":"","sources":["../src/logic.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAYxC,eAAO,MAAM,mBAAmB,YAAoD,CAAA;AAGpF,eAAO,MAAM,KAAK,4BAA4B,CAAA;AAC9C,eAAO,MAAM,EAAE,4BAAQ,CAAA;AAEvB,eAAO,MAAM,KAAK,4CAA4B,CAAA;AAC9C,eAAO,MAAM,IAAI,oDAA2B,CAAA;AAI5C,eAAO,MAAM,OAAO,6DAA8B,CAAA"}
package/lib/logic.js CHANGED
@@ -25,37 +25,41 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
25
25
 
26
26
  // This module of solid-ui has a main quadstore for the app to use
27
27
  //
28
- var fetcher = /*#__PURE__*/function () {
29
- var _ref = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(url, requestInit) {
28
+ function thisFetch(_x, _x2) {
29
+ return _thisFetch.apply(this, arguments);
30
+ }
31
+
32
+ function _thisFetch() {
33
+ _thisFetch = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(url, requestInit) {
34
+ var omitCreds;
30
35
  return _regenerator["default"].wrap(function _callee$(_context) {
31
36
  while (1) {
32
37
  switch (_context.prev = _context.next) {
33
38
  case 0:
34
- if (!_authSession["default"].info.webId) {
35
- _context.next = 4;
39
+ omitCreds = requestInit && requestInit.credentials && requestInit.credentials === 'omit';
40
+
41
+ if (!(_authSession["default"].info.webId && !omitCreds)) {
42
+ _context.next = 5;
36
43
  break;
37
44
  }
38
45
 
39
46
  return _context.abrupt("return", _authSession["default"].fetch(url, requestInit));
40
47
 
41
- case 4:
48
+ case 5:
42
49
  return _context.abrupt("return", window.fetch(url, requestInit));
43
50
 
44
- case 5:
51
+ case 6:
45
52
  case "end":
46
53
  return _context.stop();
47
54
  }
48
55
  }
49
56
  }, _callee);
50
57
  }));
51
-
52
- return function fetcher(_x, _x2) {
53
- return _ref.apply(this, arguments);
54
- };
55
- }();
58
+ return _thisFetch.apply(this, arguments);
59
+ }
56
60
 
57
61
  var solidLogicSingleton = new _solidLogic.SolidLogic({
58
- fetch: fetcher
62
+ fetch: thisFetch
59
63
  }, _authSession["default"]); // Make this directly accessible as it is what you need most of the time
60
64
 
61
65
  exports.solidLogicSingleton = solidLogicSingleton;
package/lib/logic.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/logic.ts"],"names":["fetcher","url","requestInit","authSession","info","webId","fetch","window","solidLogicSingleton","SolidLogic","store","kb","authn","chat","profile","debug","log"],"mappings":";;;;;;;;;;;;;;;AAGA;;AACA;;AACA;;;;;;AALA;AACA;AAMA,IAAMA,OAAO;AAAA,2FAAG,iBAAOC,GAAP,EAAYC,WAAZ;AAAA;AAAA;AAAA;AAAA;AAAA,iBACVC,wBAAYC,IAAZ,CAAiBC,KADP;AAAA;AAAA;AAAA;;AAAA,6CAELF,wBAAYG,KAAZ,CAAkBL,GAAlB,EAAuBC,WAAvB,CAFK;;AAAA;AAAA,6CAILK,MAAM,CAACD,KAAP,CAAaL,GAAb,EAAkBC,WAAlB,CAJK;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAAH;;AAAA,kBAAPF,OAAO;AAAA;AAAA;AAAA,GAAb;;AAQO,IAAMQ,mBAAmB,GAAG,IAAIC,sBAAJ,CAAe;AAAEH,EAAAA,KAAK,EAAEN;AAAT,CAAf,EAAmCG,uBAAnC,CAA5B,C,CAEP;;;AACO,IAAMO,KAAK,GAAGF,mBAAmB,CAACE,KAAlC;;AACA,IAAMC,EAAE,GAAGD,KAAX,C,CAAiB;;;AAEjB,IAAME,KAAK,GAAGJ,mBAAmB,CAACI,KAAlC;;AACA,IAAMC,IAAI,GAAGL,mBAAmB,CAACK,IAAjC,C,CAEP;;;AAEO,IAAMC,OAAO,GAAGN,mBAAmB,CAACM,OAApC;;AAEPC,KAAK,CAACC,GAAN,CAAU,+BAAV,E,CAEA","sourcesContent":["// This module of solid-ui has a main quadstore for the app to use\n//\n\nimport * as debug from './debug'\nimport authSession from './authn/authSession'\nimport { SolidLogic } from 'solid-logic'\n\nconst fetcher = async (url, requestInit) => {\n if (authSession.info.webId) {\n return authSession.fetch(url, requestInit)\n } else {\n return window.fetch(url, requestInit)\n }\n}\n\nexport const solidLogicSingleton = new SolidLogic({ fetch: fetcher }, authSession)\n\n// Make this directly accessible as it is what you need most of the time\nexport const store = solidLogicSingleton.store\nexport const kb = store // Very commonly used synonym of store - Knowledge Base\n\nexport const authn = solidLogicSingleton.authn\nexport const chat = solidLogicSingleton.chat\n\n// export const language = solidLogicSingleton.language // Does not work\n\nexport const profile = solidLogicSingleton.profile\n\ndebug.log('Unique quadstore initialized.')\n\n// ends\n"],"file":"logic.js"}
1
+ {"version":3,"sources":["../src/logic.ts"],"names":["thisFetch","url","requestInit","omitCreds","credentials","authSession","info","webId","fetch","window","solidLogicSingleton","SolidLogic","store","kb","authn","chat","profile","debug","log"],"mappings":";;;;;;;;;;;;;;;AAGA;;AACA;;AACA;;;;;;AALA;AACA;SAMeA,S;;;;;6FAAf,iBAA0BC,GAA1B,EAA+BC,WAA/B;AAAA;AAAA;AAAA;AAAA;AAAA;AACQC,YAAAA,SADR,GACoBD,WAAW,IAAIA,WAAW,CAACE,WAA3B,IAA0CF,WAAW,CAACE,WAAZ,KAA4B,MAD1F;;AAAA,kBAEMC,wBAAYC,IAAZ,CAAiBC,KAAjB,IAA0B,CAACJ,SAFjC;AAAA;AAAA;AAAA;;AAAA,6CAIWE,wBAAYG,KAAZ,CAAkBP,GAAlB,EAAuBC,WAAvB,CAJX;;AAAA;AAAA,6CAMWO,MAAM,CAACD,KAAP,CAAaP,GAAb,EAAkBC,WAAlB,CANX;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,G;;;;AAUO,IAAMQ,mBAAmB,GAAG,IAAIC,sBAAJ,CAAe;AAAEH,EAAAA,KAAK,EAAER;AAAT,CAAf,EAAqCK,uBAArC,CAA5B,C,CAEP;;;AACO,IAAMO,KAAK,GAAGF,mBAAmB,CAACE,KAAlC;;AACA,IAAMC,EAAE,GAAGD,KAAX,C,CAAiB;;;AAEjB,IAAME,KAAK,GAAGJ,mBAAmB,CAACI,KAAlC;;AACA,IAAMC,IAAI,GAAGL,mBAAmB,CAACK,IAAjC,C,CAEP;;;AAEO,IAAMC,OAAO,GAAGN,mBAAmB,CAACM,OAApC;;AAEPC,KAAK,CAACC,GAAN,CAAU,+BAAV,E,CAEA","sourcesContent":["// This module of solid-ui has a main quadstore for the app to use\n//\n\nimport * as debug from './debug'\nimport authSession from './authn/authSession'\nimport { SolidLogic } from 'solid-logic'\n\nasync function thisFetch (url, requestInit) {\n const omitCreds = requestInit && requestInit.credentials && requestInit.credentials === 'omit'\n if (authSession.info.webId && !omitCreds) { // see https://github.com/solid/solidos/issues/114\n // In fact ftech should respect crentials omit itself\n return authSession.fetch(url, requestInit)\n } else {\n return window.fetch(url, requestInit)\n }\n}\n\nexport const solidLogicSingleton = new SolidLogic({ fetch: thisFetch }, authSession)\n\n// Make this directly accessible as it is what you need most of the time\nexport const store = solidLogicSingleton.store\nexport const kb = store // Very commonly used synonym of store - Knowledge Base\n\nexport const authn = solidLogicSingleton.authn\nexport const chat = solidLogicSingleton.chat\n\n// export const language = solidLogicSingleton.language // Does not work\n\nexport const profile = solidLogicSingleton.profile\n\ndebug.log('Unique quadstore initialized.')\n\n// ends\n"],"file":"logic.js"}
@@ -1,4 +1,4 @@
1
- import { NamedNode } from 'rdflib';
1
+ import { IndexedFormula, NamedNode } from 'rdflib';
2
2
  declare type ThrottleOptions = {
3
3
  leading?: boolean;
4
4
  throttling?: boolean;
@@ -7,14 +7,22 @@ declare type ThrottleOptions = {
7
7
  /**
8
8
  * @ignore exporting this only for the unit test
9
9
  */
10
- export declare function addStyleClassToElement(element: any, styleClasses: string[]): void;
10
+ export declare function addStyleClassToElement(element: any, styleClasses: string[], type?: string): void;
11
11
  /**
12
12
  * @ignore exporting this only for the unit test
13
13
  */
14
14
  export declare function getPod(): NamedNode;
15
+ /**
16
+ * @ignore exporting this only for the unit test
17
+ */
18
+ export declare function getPodOwner(pod: NamedNode, store: IndexedFormula): Promise<NamedNode | null>;
19
+ /**
20
+ * @ignore exporting this only for the unit test
21
+ */
22
+ export declare function getName(store: IndexedFormula, user: NamedNode): string;
15
23
  /**
16
24
  * @ignore exporting this only for the unit test
17
25
  */
18
26
  export declare function throttle(func: Function, wait: number, options?: ThrottleOptions): (...args: any[]) => any;
19
27
  export {};
20
- //# sourceMappingURL=headerHelpers.d.ts.map
28
+ //# sourceMappingURL=headerFooterHelpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"headerFooterHelpers.d.ts","sourceRoot":"","sources":["../../src/utils/headerFooterHelpers.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,SAAS,EAAO,MAAM,QAAQ,CAAA;AAMvD,aAAK,eAAe,GAAG;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB,CAAA;AAYD;;GAEG;AACH,wBAAgB,sBAAsB,CAAE,OAAO,EAAE,GAAG,EAAE,YAAY,EAAE,MAAM,EAAE,EAAE,IAAI,CAAC,EAAE,MAAM,QAM1F;AACD;;GAEG;AACH,wBAAgB,MAAM,IAAK,SAAS,CAGnC;AACD;;GAEG;AACH,wBAAsB,WAAW,CAAE,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,cAAc,GAAG,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC,CAqBnG;AACD;;GAEG;AACH,wBAAgB,OAAO,CAAE,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,SAAS,GAAG,MAAM,CAIvE;AACD;;GAEG;AACH,wBAAgB,QAAQ,CAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,eAAoB,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAgC9G"}
@@ -0,0 +1,189 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.addStyleClassToElement = addStyleClassToElement;
9
+ exports.getName = getName;
10
+ exports.getPod = getPod;
11
+ exports.getPodOwner = getPodOwner;
12
+ exports.throttle = throttle;
13
+
14
+ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
15
+
16
+ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
17
+
18
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
19
+
20
+ var _rdflib = require("rdflib");
21
+
22
+ var _ = require("..");
23
+
24
+ var _styleMap = require("../header/styleMap");
25
+
26
+ var _styleMap2 = require("../footer/styleMap");
27
+
28
+ var _jss = require("../jss");
29
+
30
+ /*
31
+ Copied from mashlib/src/global/metadata.ts
32
+ */
33
+
34
+ /**
35
+ * @internal
36
+ */
37
+ function getStyle(styleClass, type) {
38
+ if (type && type === 'footer') {
39
+ return _styleMap2.styleMap[styleClass];
40
+ } else {
41
+ return _styleMap.styleMap[styleClass];
42
+ }
43
+ }
44
+ /**
45
+ * @ignore exporting this only for the unit test
46
+ */
47
+
48
+
49
+ function addStyleClassToElement(element, styleClasses, type) {
50
+ styleClasses.forEach(function (styleClass) {
51
+ var style = getStyle(styleClass, type);
52
+
53
+ var _getClasses = (0, _jss.getClasses)(document.head, (0, _defineProperty2["default"])({}, styleClass, style)),
54
+ classes = _getClasses.classes;
55
+
56
+ element.classList.add(classes[styleClass]);
57
+ });
58
+ }
59
+ /**
60
+ * @ignore exporting this only for the unit test
61
+ */
62
+
63
+
64
+ function getPod() {
65
+ // @@ TODO: This is given that mashlib runs on NSS - might need to change when we want it to run on other Pod servers
66
+ return (0, _rdflib.sym)(document.location.origin).site();
67
+ }
68
+ /**
69
+ * @ignore exporting this only for the unit test
70
+ */
71
+
72
+
73
+ function getPodOwner(_x, _x2) {
74
+ return _getPodOwner.apply(this, arguments);
75
+ }
76
+ /**
77
+ * @ignore exporting this only for the unit test
78
+ */
79
+
80
+
81
+ function _getPodOwner() {
82
+ _getPodOwner = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(pod, store) {
83
+ var podOwner, storageIsListedInPodOwnersProfile;
84
+ return _regenerator["default"].wrap(function _callee$(_context) {
85
+ while (1) {
86
+ switch (_context.prev = _context.next) {
87
+ case 0:
88
+ // @@ TODO: This is given the structure that NSS provides - might need to change for other Pod servers
89
+ podOwner = (0, _rdflib.sym)("".concat(pod.uri, "profile/card#me"));
90
+ _context.prev = 1;
91
+
92
+ if (!store.fetcher) {
93
+ _context.next = 7;
94
+ break;
95
+ }
96
+
97
+ _context.next = 5;
98
+ return store.fetcher.load(podOwner.doc());
99
+
100
+ case 5:
101
+ _context.next = 8;
102
+ break;
103
+
104
+ case 7:
105
+ throw new Error('There was a problem loading the Fetcher');
106
+
107
+ case 8:
108
+ _context.next = 13;
109
+ break;
110
+
111
+ case 10:
112
+ _context.prev = 10;
113
+ _context.t0 = _context["catch"](1);
114
+ throw new Error('Did NOT find pod owners profile at ' + podOwner);
115
+
116
+ case 13:
117
+ if (!podOwner) {
118
+ _context.next = 17;
119
+ break;
120
+ }
121
+
122
+ storageIsListedInPodOwnersProfile = store.holds(podOwner, _.ns.space('storage'), pod, podOwner.doc());
123
+
124
+ if (storageIsListedInPodOwnersProfile) {
125
+ _context.next = 17;
126
+ break;
127
+ }
128
+
129
+ throw new Error("** Pod owner ".concat(podOwner, " does NOT list pod ").concat(pod, " as storage"));
130
+
131
+ case 17:
132
+ return _context.abrupt("return", podOwner);
133
+
134
+ case 18:
135
+ case "end":
136
+ return _context.stop();
137
+ }
138
+ }
139
+ }, _callee, null, [[1, 10]]);
140
+ }));
141
+ return _getPodOwner.apply(this, arguments);
142
+ }
143
+
144
+ function getName(store, user) {
145
+ return store.anyValue(user, _.ns.vcard('fn'), null, user.doc()) || store.anyValue(user, _.ns.foaf('name'), null, user.doc()) || user.uri;
146
+ }
147
+ /**
148
+ * @ignore exporting this only for the unit test
149
+ */
150
+
151
+
152
+ function throttle(func, wait) {
153
+ var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
154
+ var context, args, result;
155
+ var timeout = null;
156
+ var previous = 0;
157
+
158
+ var later = function later() {
159
+ previous = !options.leading ? 0 : Date.now();
160
+ timeout = null;
161
+ result = func.apply(context, args);
162
+ if (!timeout) context = args = null;
163
+ };
164
+
165
+ return function () {
166
+ var now = Date.now();
167
+ if (!previous && !options.leading) previous = now;
168
+ var remaining = wait - (now - previous); // @ts-ignore
169
+
170
+ context = this;
171
+ args = arguments;
172
+
173
+ if (remaining <= 0 || remaining > wait) {
174
+ if (timeout) {
175
+ clearTimeout(timeout);
176
+ timeout = null;
177
+ }
178
+
179
+ previous = now;
180
+ result = func.apply(context, args);
181
+ if (!timeout) context = args = null;
182
+ } else if (!timeout && options.trailing !== false) {
183
+ timeout = setTimeout(later, remaining);
184
+ }
185
+
186
+ return result;
187
+ };
188
+ }
189
+ //# sourceMappingURL=headerFooterHelpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/utils/headerFooterHelpers.ts"],"names":["getStyle","styleClass","type","footerStyleMap","headerStyleMap","addStyleClassToElement","element","styleClasses","forEach","style","document","head","classes","classList","add","getPod","location","origin","site","getPodOwner","pod","store","podOwner","uri","fetcher","load","doc","Error","storageIsListedInPodOwnersProfile","holds","ns","space","getName","user","anyValue","vcard","foaf","throttle","func","wait","options","context","args","result","timeout","previous","later","leading","Date","now","apply","remaining","arguments","clearTimeout","trailing","setTimeout"],"mappings":";;;;;;;;;;;;;;;;;;;AAGA;;AACA;;AACA;;AACA;;AACA;;AAPA;AACA;AACA;;AAYA;AACA;AACA;AACA,SAASA,QAAT,CAAmBC,UAAnB,EAA+BC,IAA/B,EAAsC;AACpC,MAAIA,IAAI,IAAIA,IAAI,KAAK,QAArB,EAA+B;AAC7B,WAAOC,oBAAeF,UAAf,CAAP;AACD,GAFD,MAEO;AACL,WAAOG,mBAAeH,UAAf,CAAP;AACD;AACF;AAED;AACA;AACA;;;AACO,SAASI,sBAAT,CAAiCC,OAAjC,EAA+CC,YAA/C,EAAuEL,IAAvE,EAAsF;AAC3FK,EAAAA,YAAY,CAACC,OAAb,CAAqB,UAACP,UAAD,EAAgB;AACnC,QAAMQ,KAAK,GAAGT,QAAQ,CAACC,UAAD,EAAaC,IAAb,CAAtB;;AACA,sBAAoB,qBAAWQ,QAAQ,CAACC,IAApB,uCAA6BV,UAA7B,EAA0CQ,KAA1C,EAApB;AAAA,QAAQG,OAAR,eAAQA,OAAR;;AACAN,IAAAA,OAAO,CAACO,SAAR,CAAkBC,GAAlB,CAAsBF,OAAO,CAACX,UAAD,CAA7B;AACD,GAJD;AAKD;AACD;AACA;AACA;;;AACO,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T,OAAX,EAAoBC,IAApB,CAAT;AACA,UAAI,CAACE,OAAL,EAAcH,OAAO,GAAGC,IAAI,GAAG,IAAjB;AACf,KARD,MAQO,IAAI,CAACE,OAAD,IAAYJ,OAAO,CAACc,QAAR,KAAqB,KAArC,EAA4C;AACjDV,MAAAA,OAAO,GAAGW,UAAU,CAACT,KAAD,EAAQK,SAAR,CAApB;AACD;;AACD,WAAOR,MAAP;AACD,GAnBD;AAoBD","sourcesContent":["/*\n Copied from mashlib/src/global/metadata.ts\n */\nimport { IndexedFormula, NamedNode, sym } from 'rdflib'\nimport { ns } from '..'\nimport { styleMap as headerStyleMap } from '../header/styleMap'\nimport { styleMap as footerStyleMap } from '../footer/styleMap'\nimport { getClasses } from '../jss'\n\ntype ThrottleOptions = {\n leading?: boolean;\n throttling?: boolean;\n trailing?: boolean;\n}\n/**\n * @internal\n */\nfunction getStyle (styleClass, type?) {\n if (type && type === 'footer') {\n return footerStyleMap[styleClass]\n } else {\n return headerStyleMap[styleClass]\n }\n}\n\n/**\n * @ignore exporting this only for the unit test\n */\nexport function addStyleClassToElement (element: any, styleClasses: string[], type?: string) {\n styleClasses.forEach((styleClass) => {\n const style = getStyle(styleClass, type)\n const { classes } = getClasses(document.head, { [styleClass]: style })\n element.classList.add(classes[styleClass])\n })\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport function getPod (): NamedNode {\n // @@ TODO: This is given that mashlib runs on NSS - might need to change when we want it to run on other Pod servers\n return sym(document.location.origin).site()\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport async function getPodOwner (pod: NamedNode, store: IndexedFormula): Promise<NamedNode | null> {\n // @@ TODO: This is given the structure that NSS provides - might need to change for other Pod servers\n const podOwner = sym(`${pod.uri}profile/card#me`)\n\n try {\n if (store.fetcher) {\n await store.fetcher.load(podOwner.doc())\n } else {\n throw new Error('There was a problem loading the Fetcher')\n }\n // @@ TODO: check back links to storage\n } catch (err) {\n throw new Error('Did NOT find pod owners profile at ' + podOwner)\n }\n if (podOwner) {\n const storageIsListedInPodOwnersProfile = store.holds(podOwner, ns.space('storage'), pod, podOwner.doc())\n if (!storageIsListedInPodOwnersProfile) {\n throw new Error(`** Pod owner ${podOwner} does NOT list pod ${pod} as storage`)\n }\n }\n return podOwner\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport function getName (store: IndexedFormula, user: NamedNode): string {\n return store.anyValue(user, ns.vcard('fn'), null, user.doc()) ||\n store.anyValue(user, ns.foaf('name'), null, user.doc()) ||\n user.uri\n}\n/**\n * @ignore exporting this only for the unit test\n */\nexport function throttle (func: Function, wait: number, options: ThrottleOptions = {}): (...args: any[]) => any {\n let context: any,\n args: any,\n result: any\n let timeout: any = null\n let previous = 0\n const later = function () {\n previous = !options.leading ? 0 : Date.now()\n timeout = null\n result = func.apply(context, args)\n if (!timeout) context = args = null\n }\n return function () {\n const now = Date.now()\n if (!previous && !options.leading) previous = now\n const remaining = wait - (now - previous)\n // @ts-ignore\n context = this\n args = arguments\n if (remaining <= 0 || remaining > wait) {\n if (timeout) {\n clearTimeout(timeout)\n timeout = null\n }\n previous = now\n result = func.apply(context, args)\n if (!timeout) context = args = null\n } else if (!timeout && options.trailing !== false) {\n timeout = setTimeout(later, remaining)\n }\n return result\n }\n}\n"],"file":"headerFooterHelpers.js"}
@@ -5,10 +5,10 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports["default"] = void 0;
7
7
  var _default = {
8
- buildTime: '2021-12-27T11:33:36Z',
9
- commit: '5a8f87a9a6c3dafc183343930dd4d0b406ce35c6',
8
+ buildTime: '2022-01-27T19:22:56Z',
9
+ commit: 'fb2b21e1e0c28c850c52cb27596b0bd4d509a104',
10
10
  npmInfo: {
11
- 'solid-ui': '2.4.14',
11
+ 'solid-ui': '2.4.15',
12
12
  npm: '6.14.15',
13
13
  ares: '1.18.1',
14
14
  brotli: '1.0.9',
@@ -18,7 +18,7 @@ var _default = {
18
18
  modules: '83',
19
19
  napi: '8',
20
20
  nghttp2: '1.42.0',
21
- node: '14.18.2',
21
+ node: '14.18.3',
22
22
  openssl: '1.1.1l',
23
23
  tz: '2021a',
24
24
  unicode: '13.0',
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/versionInfo.ts"],"names":["buildTime","commit","npmInfo","npm","ares","brotli","cldr","icu","llhttp","modules","napi","nghttp2","node","openssl","tz","unicode","uv","v8","zlib"],"mappings":";;;;;;eAAe;AACbA,EAAAA,SAAS,EAAE,sBADE;AAEbC,EAAAA,MAAM,EAAE,0CAFK;AAGbC,EAAAA,OAAO,EACT;AACE,gBAAY,QADd;AAEEC,IAAAA,GAAG,EAAE,SAFP;AAGEC,IAAAA,IAAI,EAAE,QAHR;AAIEC,IAAAA,MAAM,EAAE,OAJV;AAKEC,IAAAA,IAAI,EAAE,MALR;AAMEC,IAAAA,GAAG,EAAE,MANP;AAOEC,IAAAA,MAAM,EAAE,OAPV;AAQEC,IAAAA,OAAO,EAAE,IARX;AASEC,IAAAA,IAAI,EAAE,GATR;AAUEC,IAAAA,OAAO,EAAE,QAVX;AAWEC,IAAAA,IAAI,EAAE,SAXR;AAYEC,IAAAA,OAAO,EAAE,QAZX;AAaEC,IAAAA,EAAE,EAAE,OAbN;AAcEC,IAAAA,OAAO,EAAE,MAdX;AAeEC,IAAAA,EAAE,EAAE,QAfN;AAgBEC,IAAAA,EAAE,EAAE,oBAhBN;AAiBEC,IAAAA,IAAI,EAAE;AAjBR;AAJe,C","sourcesContent":["export default {\n buildTime: '2021-12-27T11:33:36Z',\n commit: '5a8f87a9a6c3dafc183343930dd4d0b406ce35c6',\n npmInfo:\n{\n 'solid-ui': '2.4.14',\n npm: '6.14.15',\n ares: '1.18.1',\n brotli: '1.0.9',\n cldr: '39.0',\n icu: '69.1',\n llhttp: '2.1.4',\n modules: '83',\n napi: '8',\n nghttp2: '1.42.0',\n node: '14.18.2',\n openssl: '1.1.1l',\n tz: '2021a',\n unicode: '13.0',\n uv: '1.42.0',\n v8: '8.4.371.23-node.85',\n zlib: '1.2.11'\n}\n}\n"],"file":"versionInfo.js"}
1
+ {"version":3,"sources":["../src/versionInfo.ts"],"names":["buildTime","commit","npmInfo","npm","ares","brotli","cldr","icu","llhttp","modules","napi","nghttp2","node","openssl","tz","unicode","uv","v8","zlib"],"mappings":";;;;;;eAAe;AACbA,EAAAA,SAAS,EAAE,sBADE;AAEbC,EAAAA,MAAM,EAAE,0CAFK;AAGbC,EAAAA,OAAO,EACT;AACE,gBAAY,QADd;AAEEC,IAAAA,GAAG,EAAE,SAFP;AAGEC,IAAAA,IAAI,EAAE,QAHR;AAIEC,IAAAA,MAAM,EAAE,OAJV;AAKEC,IAAAA,IAAI,EAAE,MALR;AAMEC,IAAAA,GAAG,EAAE,MANP;AAOEC,IAAAA,MAAM,EAAE,OAPV;AAQEC,IAAAA,OAAO,EAAE,IARX;AASEC,IAAAA,IAAI,EAAE,GATR;AAUEC,IAAAA,OAAO,EAAE,QAVX;AAWEC,IAAAA,IAAI,EAAE,SAXR;AAYEC,IAAAA,OAAO,EAAE,QAZX;AAaEC,IAAAA,EAAE,EAAE,OAbN;AAcEC,IAAAA,OAAO,EAAE,MAdX;AAeEC,IAAAA,EAAE,EAAE,QAfN;AAgBEC,IAAAA,EAAE,EAAE,oBAhBN;AAiBEC,IAAAA,IAAI,EAAE;AAjBR;AAJe,C","sourcesContent":["export default {\n buildTime: '2022-01-27T19:22:56Z',\n commit: 'fb2b21e1e0c28c850c52cb27596b0bd4d509a104',\n npmInfo:\n{\n 'solid-ui': '2.4.15',\n npm: '6.14.15',\n ares: '1.18.1',\n brotli: '1.0.9',\n cldr: '39.0',\n icu: '69.1',\n llhttp: '2.1.4',\n modules: '83',\n napi: '8',\n nghttp2: '1.42.0',\n node: '14.18.3',\n openssl: '1.1.1l',\n tz: '2021a',\n unicode: '13.0',\n uv: '1.42.0',\n v8: '8.4.371.23-node.85',\n zlib: '1.2.11'\n}\n}\n"],"file":"versionInfo.js"}