solid-panes 3.5.18-dfef39a9 → 3.5.19-123fedba

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 (84) hide show
  1. package/dev/loader.ts +11 -11
  2. package/lib/argument/argumentPane.js +7 -15
  3. package/lib/argument/argumentPane.js.map +1 -1
  4. package/lib/dashboard/basicPreferences.d.ts.map +1 -1
  5. package/lib/dashboard/basicPreferences.js +6 -6
  6. package/lib/dashboard/basicPreferences.js.map +1 -1
  7. package/lib/dashboard/dashboardPane.d.ts.map +1 -1
  8. package/lib/dashboard/dashboardPane.js +4 -6
  9. package/lib/dashboard/dashboardPane.js.map +1 -1
  10. package/lib/dataContentPane.js +1 -1
  11. package/lib/dataContentPane.js.map +1 -1
  12. package/lib/form/pane.js +6 -15
  13. package/lib/form/pane.js.map +1 -1
  14. package/lib/home/homePane.d.ts.map +1 -1
  15. package/lib/home/homePane.js +5 -7
  16. package/lib/home/homePane.js.map +1 -1
  17. package/lib/index.d.ts +3 -7
  18. package/lib/index.d.ts.map +1 -1
  19. package/lib/index.js +4 -15
  20. package/lib/index.js.map +1 -1
  21. package/lib/mainPage/header.d.ts.map +1 -1
  22. package/lib/mainPage/header.js +2 -4
  23. package/lib/mainPage/header.js.map +1 -1
  24. package/lib/microblogPane/microblogPane.js +14 -16
  25. package/lib/microblogPane/microblogPane.js.map +1 -1
  26. package/lib/outline/dragDrop.js +6 -16
  27. package/lib/outline/dragDrop.js.map +1 -1
  28. package/lib/outline/licenseOptions.js +5 -12
  29. package/lib/outline/licenseOptions.js.map +1 -1
  30. package/lib/outline/manager.js +21 -29
  31. package/lib/outline/manager.js.map +1 -1
  32. package/lib/outline/queryByExample.js +6 -14
  33. package/lib/outline/queryByExample.js.map +1 -1
  34. package/lib/outline/userInput.js +80 -90
  35. package/lib/outline/userInput.js.map +1 -1
  36. package/lib/pad/padPane.d.ts.map +1 -1
  37. package/lib/pad/padPane.js +4 -6
  38. package/lib/pad/padPane.js.map +1 -1
  39. package/lib/profile/editProfile.view.d.ts.map +1 -1
  40. package/lib/profile/editProfile.view.js +3 -3
  41. package/lib/profile/editProfile.view.js.map +1 -1
  42. package/lib/schedule/schedulePane.js +14 -26
  43. package/lib/schedule/schedulePane.js.map +1 -1
  44. package/lib/socialPane.js +6 -16
  45. package/lib/socialPane.js.map +1 -1
  46. package/lib/transaction/pane.js +1 -1
  47. package/lib/transaction/pane.js.map +1 -1
  48. package/lib/transaction/period.js +1 -1
  49. package/lib/transaction/period.js.map +1 -1
  50. package/lib/trip/tripPane.js +1 -1
  51. package/lib/trip/tripPane.js.map +1 -1
  52. package/lib/trustedApplications/trustedApplications.dom.d.ts.map +1 -1
  53. package/lib/trustedApplications/trustedApplications.dom.js +9 -11
  54. package/lib/trustedApplications/trustedApplications.dom.js.map +1 -1
  55. package/lib/trustedApplications/trustedApplications.view.d.ts.map +1 -1
  56. package/lib/trustedApplications/trustedApplications.view.js +3 -5
  57. package/lib/trustedApplications/trustedApplications.view.js.map +1 -1
  58. package/lib/versionInfo.js +3 -3
  59. package/lib/versionInfo.js.map +1 -1
  60. package/package.json +13 -14
  61. package/src/argument/argumentPane.js +5 -5
  62. package/src/dashboard/basicPreferences.ts +5 -4
  63. package/src/dashboard/dashboardPane.ts +3 -4
  64. package/src/dataContentPane.js +1 -1
  65. package/src/form/pane.js +4 -5
  66. package/src/home/homePane.ts +6 -7
  67. package/src/index.ts +18 -24
  68. package/src/mainPage/header.ts +2 -3
  69. package/src/microblogPane/microblogPane.js +8 -9
  70. package/src/outline/dragDrop.js +4 -5
  71. package/src/outline/licenseOptions.js +5 -4
  72. package/src/outline/manager.js +21 -22
  73. package/src/outline/queryByExample.js +4 -4
  74. package/src/outline/userInput.js +72 -72
  75. package/src/pad/padPane.ts +3 -3
  76. package/src/profile/editProfile.view.ts +8 -5
  77. package/src/schedule/schedulePane.js +13 -14
  78. package/src/socialPane.js +4 -5
  79. package/src/transaction/pane.js +1 -1
  80. package/src/transaction/period.js +1 -1
  81. package/src/trip/tripPane.js +1 -1
  82. package/src/trustedApplications/trustedApplications.dom.ts +1 -2
  83. package/src/trustedApplications/trustedApplications.view.ts +4 -4
  84. package/src/versionInfo.ts +3 -3
@@ -5,8 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports["default"] = void 0;
7
7
 
8
- var _solidLogic = require("solid-logic");
9
-
10
8
  var _solidUi = require("solid-ui");
11
9
 
12
10
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
@@ -46,7 +44,7 @@ var HomePaneSource = {
46
44
  var loginStatusDiv = div.appendChild(context.dom.createElement('div'))
47
45
  // TODO: Find out what the actual type is:
48
46
  type UriType = unknown;
49
- loginStatusDiv.appendChild(UI.login.loginStatusBox(context.dom, () => {
47
+ loginStatusDiv.appendChild(UI.authn.loginStatusBox(context.dom, () => {
50
48
  // Here we know new log in status
51
49
  }))
52
50
  */
@@ -60,7 +58,7 @@ var HomePaneSource = {
60
58
  me: me
61
59
  };
62
60
  _context.next = 6;
63
- return _solidUi.login.filterAvailablePanes(context.session.paneRegistry.list);
61
+ return _solidUi.authn.filterAvailablePanes(context.session.paneRegistry.list);
64
62
 
65
63
  case 6:
66
64
  relevantPanes = _context.sent;
@@ -70,13 +68,13 @@ var HomePaneSource = {
70
68
 
71
69
  div.appendChild(dom.createElement('h4')).textContent = 'Private things'; // TODO: Replace by a common, representative interface
72
70
 
73
- _solidUi.login.registrationList(homePaneContext, {
71
+ _solidUi.authn.registrationList(homePaneContext, {
74
72
  "private": true
75
73
  }).then(function (authContext) {
76
74
  div.appendChild(dom.createElement('h4')).textContent = 'Public things';
77
75
  div.appendChild(dom.createElement('p')).textContent = 'Things in this list are visible to others.';
78
76
 
79
- _solidUi.login.registrationList(authContext, {
77
+ _solidUi.authn.registrationList(authContext, {
80
78
  "public": true
81
79
  }).then(function () {// done
82
80
  });
@@ -97,7 +95,7 @@ var HomePaneSource = {
97
95
 
98
96
  var div = dom.createElement('div');
99
97
 
100
- var me = _solidLogic.authn.currentUser(); // this will be incorrect if not logged in
98
+ var me = _solidUi.authn.currentUser(); // this will be incorrect if not logged in
101
99
 
102
100
 
103
101
  showContent();
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/home/homePane.ts"],"names":["HomePaneSource","icon","icons","iconBase","global","name","label","render","subject","context","dom","showContent","homePaneContext","div","statusArea","me","appendChild","createElement","textContent","creationDiv","creationContext","login","filterAvailablePanes","session","paneRegistry","list","relevantPanes","create","newThingUI","registrationList","then","authContext","authn","currentUser"],"mappings":";;;;;;;AAYA;;AACA;;;;;;AAGA,IAAMA,cAA8B,GAAG;AACrCC,EAAAA,IAAI,EAAEC,eAAMC,QAAN,GAAiB,iBADc;AACK;AAE1CC,EAAAA,MAAM,EAAE,IAH6B;AAKrCC,EAAAA,IAAI,EAAE,MAL+B;AAOrC;AACA;AACA;AACA;AACAC,EAAAA,KAAK,EAAE,iBAAY;AACjB,WAAO,MAAP;AACD,GAboC;AAerCC,EAAAA,MAAM,EAAE,gBAAUC,OAAV,EAAmBC,OAAnB,EAA4B;AAClC,QAAMC,GAAG,GAAGD,OAAO,CAACC,GAApB;;AACA,QAAMC,WAAW;AAAA,yEAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AACZC,gBAAAA,eADY,GACM;AAAEC,kBAAAA,GAAG,EAAEA,GAAP;AAAYH,kBAAAA,GAAG,EAAEA,GAAjB;AAAsBI,kBAAAA,UAAU,EAAED,GAAlC;AAAuCE,kBAAAA,EAAE,EAAEA;AAA3C,iBADN;AAElB;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACMF,gBAAAA,GAAG,CAACG,WAAJ,CAAgBN,GAAG,CAACO,aAAJ,CAAkB,IAAlB,CAAhB,EAAyCC,WAAzC,GACE,4BADF;AAEMC,gBAAAA,WAbY,GAaEN,GAAG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AAZ;;AACA,QAAMF,EAAa,GAAGiB,kBAAMC,WAAN,EAAtB,CA5CkC,CA4CqB;;;AAEvDtB,IAAAA,WAAW;AAEX,WAAOE,GAAP;AACD;AAhEoC,CAAvC,C,CAiEE;AAEF;;eACeb,c","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'\nimport { create, icons, login } from 'solid-ui'\nimport { CreateContext } from 'solid-ui/lib/create/types'\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: div, dom: dom, statusArea: div, me: 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: dom,\n statusArea: div,\n me: 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 div.appendChild(dom.createElement('h4')).textContent = 'Private things'\n // TODO: Replace by a common, representative interface\n login\n .registrationList(homePaneContext, { private: true })\n .then(function (authContext) {\n div.appendChild(dom.createElement('h4')).textContent = 'Public things'\n div.appendChild(dom.createElement('p')).textContent =\n 'Things in this list are visible to others.'\n login\n .registrationList(authContext, { public: true })\n .then(function () {\n // done\n })\n })\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"],"file":"homePane.js"}
1
+ {"version":3,"sources":["../../src/home/homePane.ts"],"names":["HomePaneSource","icon","icons","iconBase","global","name","label","render","subject","context","dom","showContent","homePaneContext","div","statusArea","me","appendChild","createElement","textContent","creationDiv","creationContext","authn","filterAvailablePanes","session","paneRegistry","list","relevantPanes","create","newThingUI","registrationList","then","authContext","currentUser"],"mappings":";;;;;;;AAUA;;;;;;AAKA,IAAMA,cAA8B,GAAG;AACrCC,EAAAA,IAAI,EAAEC,eAAMC,QAAN,GAAiB,iBADc;AACK;AAE1CC,EAAAA,MAAM,EAAE,IAH6B;AAKrCC,EAAAA,IAAI,EAAE,MAL+B;AAOrC;AACA;AACA;AACA;AACAC,EAAAA,KAAK,EAAE,iBAAY;AACjB,WAAO,MAAP;AACD,GAboC;AAerCC,EAAAA,MAAM,EAAE,gBAAUC,OAAV,EAAmBC,OAAnB,EAA4B;AAClC,QAAMC,GAAG,GAAGD,OAAO,CAACC,GAApB;;AACA,QAAMC,WAAW;AAAA,yEAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AACZC,gBAAAA,eADY,GACM;AAAEC,kBAAAA,GAAG,EAAEA,GAAP;AAAYH,kBAAAA,GAAG,EAAEA,GAAjB;AAAsBI,kBAAAA,UAAU,EAAED,GAAlC;AAAuCE,kBAAAA,EAAE,EAAEA;AAA3C,iBADN;AAElB;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACMF,gBAAAA,GAAG,CAACG,WAAJ,CAAgBN,GAAG,CAACO,aAAJ,CAAkB,IAAlB,CAAhB,EAAyCC,WAAzC,GACE,4BADF;AAEMC,gBAAAA,WAbY,GAaEN,GAAG,CAACG,WAAJ,CAAgBN,GAAG,CAACO,aAAJ,CAAkB,KAA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CA5CkC,CA4CqB;;;AAEvDrB,IAAAA,WAAW;AAEX,WAAOE,GAAP;AACD;AAhEoC,CAAvC,C,CAiEE;AAEF;;eACeb,c","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 { authn, create, icons } from 'solid-ui'\nimport { PaneDefinition } from 'pane-registry'\nimport { CreateContext } from 'solid-ui/lib/create/types'\nimport { NamedNode } from 'rdflib'\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: div, dom: dom, statusArea: div, me: 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.authn.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: dom,\n statusArea: div,\n me: me\n }\n const relevantPanes = await authn.filterAvailablePanes(\n context.session.paneRegistry.list\n )\n create.newThingUI(creationContext, context, relevantPanes) // newUI Have to pass panes down\n\n div.appendChild(dom.createElement('h4')).textContent = 'Private things'\n // TODO: Replace by a common, representative interface\n authn\n .registrationList(homePaneContext, { private: true })\n .then(function (authContext) {\n div.appendChild(dom.createElement('h4')).textContent = 'Public things'\n div.appendChild(dom.createElement('p')).textContent =\n 'Things in this list are visible to others.'\n authn\n .registrationList(authContext, { public: true })\n .then(function () {\n // done\n })\n })\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"],"file":"homePane.js"}
package/lib/index.d.ts CHANGED
@@ -1,12 +1,8 @@
1
1
  import versionInfo from './versionInfo';
2
2
  import * as UI from 'solid-ui';
3
3
  import OutlineManager from './outline/manager.js';
4
- import { list, paneForIcon, paneForPredicate, register, byName } from 'pane-registry';
5
4
  import initMainPage from './mainPage';
6
- declare function getOutliner(dom: any): any;
7
- export { OutlineManager, getOutliner, UI, versionInfo, initMainPage, list, // from paneRegistry
8
- paneForIcon, // from paneRegistry
9
- paneForPredicate, // from paneRegistry
10
- register, // from paneRegistry
11
- byName };
5
+ export declare function getOutliner(dom: any): any;
6
+ export { list, paneForIcon, paneForPredicate, register, byName } from 'pane-registry';
7
+ export { OutlineManager, UI, versionInfo, initMainPage };
12
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAYA,OAAO,WAAW,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,EAAE,MAAM,UAAU,CAAA;AAG9B,OAAO,cAAc,MAAM,sBAAsB,CAAA;AAEjD,OAAO,EACL,IAAI,EACJ,WAAW,EACX,gBAAgB,EAChB,QAAQ,EACR,MAAM,EACP,MAAM,eAAe,CAAA;AAEtB,OAAO,YAAY,MAAM,YAAY,CAAA;AAErC,iBAAS,WAAW,CAAE,GAAG,KAAA,OAWxB;AAaD,OAAO,EACL,cAAc,EACd,WAAW,EACX,EAAE,EACF,WAAW,EACX,YAAY,EACZ,IAAI,EAAE,oBAAoB;AAC1B,WAAW,EAAE,oBAAoB;AACjC,gBAAgB,EAAE,oBAAoB;AACtC,QAAQ,EAAE,oBAAoB;AAC9B,MAAM,EACP,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAcA,OAAO,WAAW,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,EAAE,MAAM,UAAU,CAAA;AAE9B,OAAO,cAAc,MAAM,sBAAsB,CAAA;AAUjD,OAAO,YAAY,MAAM,YAAY,CAAA;AAErC,wBAAgB,WAAW,CAAE,GAAG,KAAA,OAW/B;AAOD,OAAO,EACL,IAAI,EACJ,WAAW,EACX,gBAAgB,EAChB,QAAQ,EACR,MAAM,EACP,MAAM,eAAe,CAAA;AAWtB,OAAO,EAAE,cAAc,EAAE,EAAE,EAAE,WAAW,EAAE,YAAY,EAAE,CAAA"}
package/lib/index.js CHANGED
@@ -62,8 +62,6 @@ var UI = _interopRequireWildcard(require("solid-ui"));
62
62
 
63
63
  exports.UI = UI;
64
64
 
65
- var _solidLogic = require("solid-logic");
66
-
67
65
  var _manager = _interopRequireDefault(require("./outline/manager.js"));
68
66
 
69
67
  var _registerPanes = _interopRequireDefault(require("./registerPanes.js"));
@@ -91,6 +89,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
91
89
  ** relevant to a given subject, returning null if not.
92
90
  ** If it is relevant, then it returns a suitable tooltip for a control which selects the pane
93
91
  */
92
+ // create the unique UI module on which to attach panes (no, don't attach as UI dot panes any more)
93
+ // var UI = require('solid-ui') // Note we will add the panes register to this.
94
94
  function getOutliner(dom) {
95
95
  if (!dom.outlineManager) {
96
96
  var context = (0, _context.createContext)(dom, {
@@ -99,7 +99,7 @@ function getOutliner(dom) {
99
99
  paneForPredicate: _paneRegistry.paneForPredicate,
100
100
  register: _paneRegistry.register,
101
101
  byName: _paneRegistry.byName
102
- }, _solidLogic.store, _solidLogic.solidLogicSingleton);
102
+ }, UI.store, UI.solidLogicSingleton);
103
103
  dom.outlineManager = new _manager["default"](context);
104
104
  }
105
105
 
@@ -112,16 +112,5 @@ if (typeof window !== 'undefined') {
112
112
 
113
113
  (0, _registerPanes["default"])(function (cjsOrEsModule) {
114
114
  return (0, _paneRegistry.register)(cjsOrEsModule["default"] || cjsOrEsModule);
115
- }); // This has common outline mode functionality for the default and other other panes
116
- // A separate outline manager is required per DOM in cases like a browser extension
117
- // where there are many occurrences of window and of window.document
118
- // But each DOM should have just one outline manager.
119
-
120
- // export for simpler access by non-node scripts
121
- if (typeof window !== 'undefined') {
122
- ;
123
- window.panes = {
124
- getOutliner: getOutliner
125
- };
126
- }
115
+ });
127
116
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":["getOutliner","dom","outlineManager","context","list","paneForIcon","paneForPredicate","register","byName","store","solidLogicSingleton","OutlineManager","window","document","cjsOrEsModule","panes"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA;;AACA;;;;AAEA;;AACA;;AACA;;AACA;;AAOA;;AACA;;;;;;;;AA1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAkBA,SAASA,WAAT,CAAsBC,GAAtB,EAA2B;AACzB,MAAI,CAACA,GAAG,CAACC,cAAT,EAAyB;AACvB,QAAMC,OAAO,GAAG,4BACdF,GADc,EAEd;AAAEG,MAAAA,IAAI,EAAJA,kBAAF;AAAQC,MAAAA,WAAW,EAAXA,yBAAR;AAAqBC,MAAAA,gBAAgB,EAAhBA,8BAArB;AAAuCC,MAAAA,QAAQ,EAARA,sBAAvC;AAAiDC,MAAAA,MAAM,EAANA;AAAjD,KAFc,EAGRC,iBAHQ,EAIRC,+BAJQ,CAAhB;AAMAT,IAAAA,GAAG,CAACC,cAAJ,GAAqB,IAAIS,mBAAJ,CAAmBR,OAAnB,CAArB;AACD;;AACD,SAAOF,GAAG,CAACC,cAAX;AACD;;AAED,IAAI,OAAOU,MAAP,KAAkB,WAAtB,EAAmC;AACjCZ,EAAAA,WAAW,CAACY,MAAM,CAACC,QAAR,CAAX;AACD;;AAED,+BAAc,UAACC,aAAD;AAAA,SAAwB,4BAASA,aAAa,WAAb,IAAyBA,aAAlC,CAAxB;AAAA,CAAd,E,CAEA;AACA;AACA;AACA;;AAeA;AACA,IAAI,OAAOF,MAAP,KAAkB,WAAtB,EAAmC;AACjC;AAAOA,EAAAA,MAAN,CAAcG,KAAd,GAAsB;AACrBf,IAAAA,WAAW,EAAXA;AADqB,GAAtB;AAGF","sourcesContent":["/* SOLID PANES\n **\n ** Panes are regions of the outline view in which a particular subject is\n ** displayed in a particular way.\n ** Different panes about the same subject are typically stacked vertically.\n ** Panes may be used naked or with a pane selection header.\n **\n ** The label() method has two functions: it determines whether the pane is\n ** relevant to a given subject, returning null if not.\n ** If it is relevant, then it returns a suitable tooltip for a control which selects the pane\n */\n\nimport versionInfo from './versionInfo'\nimport * as UI from 'solid-ui'\nimport { LiveStore } from 'rdflib'\nimport { solidLogicSingleton, store } from 'solid-logic'\nimport OutlineManager from './outline/manager.js'\nimport registerPanes from './registerPanes.js'\nimport {\n list,\n paneForIcon,\n paneForPredicate,\n register,\n byName\n} from 'pane-registry'\nimport { createContext } from './outline/context'\nimport initMainPage from './mainPage'\n\nfunction getOutliner (dom) {\n if (!dom.outlineManager) {\n const context = createContext(\n dom,\n { list, paneForIcon, paneForPredicate, register, byName },\n store as LiveStore,\n solidLogicSingleton\n )\n dom.outlineManager = new OutlineManager(context)\n }\n return dom.outlineManager\n}\n\nif (typeof window !== 'undefined') {\n getOutliner(window.document)\n}\n\nregisterPanes((cjsOrEsModule: any) => register(cjsOrEsModule.default || cjsOrEsModule))\n\n// This has common outline mode functionality for the default and other other panes\n// A separate outline manager is required per DOM in cases like a browser extension\n// where there are many occurrences of window and of window.document\n// But each DOM should have just one outline manager.\n\nexport {\n OutlineManager,\n getOutliner,\n UI,\n versionInfo,\n initMainPage,\n list, // from paneRegistry\n paneForIcon, // from paneRegistry\n paneForPredicate, // from paneRegistry\n register, // from paneRegistry\n byName // from paneRegistry\n}\n\n// export for simpler access by non-node scripts\nif (typeof window !== 'undefined') {\n ;(<any>window).panes = {\n getOutliner\n }\n}\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../src/index.ts"],"names":["getOutliner","dom","outlineManager","context","list","paneForIcon","paneForPredicate","register","byName","UI","store","solidLogicSingleton","OutlineManager","window","document","cjsOrEsModule"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcA;;AACA;;;;AAEA;;AACA;;AACA;;AAOA;;AACA;;;;;;;;AA3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAgBO,SAASA,WAAT,CAAsBC,GAAtB,EAA2B;AAChC,MAAI,CAACA,GAAG,CAACC,cAAT,EAAyB;AACvB,QAAMC,OAAO,GAAG,4BACdF,GADc,EAEd;AAAEG,MAAAA,IAAI,EAAJA,kBAAF;AAAQC,MAAAA,WAAW,EAAXA,yBAAR;AAAqBC,MAAAA,gBAAgB,EAAhBA,8BAArB;AAAuCC,MAAAA,QAAQ,EAARA,sBAAvC;AAAiDC,MAAAA,MAAM,EAANA;AAAjD,KAFc,EAGRC,EAAE,CAACC,KAHK,EAIRD,EAAE,CAACE,mBAJK,CAAhB;AAMAV,IAAAA,GAAG,CAACC,cAAJ,GAAqB,IAAIU,mBAAJ,CAAmBT,OAAnB,CAArB;AACD;;AACD,SAAOF,GAAG,CAACC,cAAX;AACD;;AACD,IAAI,OAAOW,MAAP,KAAkB,WAAtB,EAAmC;AACjCb,EAAAA,WAAW,CAACa,MAAM,CAACC,QAAR,CAAX;AACD;;AAED,+BAAc,UAACC,aAAD;AAAA,SAAwB,4BAASA,aAAa,WAAb,IAAyBA,aAAlC,CAAxB;AAAA,CAAd","sourcesContent":["/* SOLID PANES\n **\n ** Panes are regions of the outline view in which a particular subject is\n ** displayed in a particular way.\n ** Different panes about the same subject are typically stacked vertically.\n ** Panes may be used naked or with a pane selection header.\n **\n ** The label() method has two functions: it determines whether the pane is\n ** relevant to a given subject, returning null if not.\n ** If it is relevant, then it returns a suitable tooltip for a control which selects the pane\n */\n\n// create the unique UI module on which to attach panes (no, don't attach as UI dot panes any more)\n// var UI = require('solid-ui') // Note we will add the panes register to this.\nimport versionInfo from './versionInfo'\nimport * as UI from 'solid-ui'\nimport { LiveStore } from 'rdflib'\nimport OutlineManager from './outline/manager.js'\nimport registerPanes from './registerPanes.js'\nimport {\n list,\n paneForIcon,\n paneForPredicate,\n register,\n byName\n} from 'pane-registry'\nimport { createContext } from './outline/context'\nimport initMainPage from './mainPage'\n\nexport function getOutliner (dom) {\n if (!dom.outlineManager) {\n const context = createContext(\n dom,\n { list, paneForIcon, paneForPredicate, register, byName },\n UI.store as LiveStore,\n UI.solidLogicSingleton\n )\n dom.outlineManager = new OutlineManager(context)\n }\n return dom.outlineManager\n}\nif (typeof window !== 'undefined') {\n getOutliner(window.document)\n}\n\nregisterPanes((cjsOrEsModule: any) => register(cjsOrEsModule.default || cjsOrEsModule))\n\nexport {\n list,\n paneForIcon,\n paneForPredicate,\n register,\n byName\n} from 'pane-registry'\n\n// We attach the solid-UI lower-level system for convenience\n// Currently most panes are built using it anyway.\n// It also gives access to rdflib as panes.UI.rdf\n\n// This has common outline mode functionality for the default and other other panes\n// A separate outline manager is required per DOM in cases like a browser extension\n// where there are many occurrences of window and of window.document\n// But each DOM should have just one outline manager.\n\nexport { OutlineManager, UI, versionInfo, initMainPage }\n"],"file":"index.js"}
@@ -1 +1 @@
1
- {"version":3,"file":"header.d.ts","sourceRoot":"","sources":["../../src/mainPage/header.ts"],"names":[],"mappings":"AAqBA,wBAAsB,YAAY,CAAE,KAAK,KAAA,EAAE,QAAQ,KAAA,iBAElD"}
1
+ {"version":3,"file":"header.d.ts","sourceRoot":"","sources":["../../src/mainPage/header.ts"],"names":[],"mappings":"AAoBA,wBAAsB,YAAY,CAAE,KAAK,KAAA,EAAE,QAAQ,KAAA,iBAElD"}
@@ -5,8 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.createHeader = createHeader;
7
7
 
8
- var _solidLogic = require("solid-logic");
9
-
10
8
  var _solidUi = require("solid-ui");
11
9
 
12
10
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
@@ -101,7 +99,7 @@ function _setUserMenu() {
101
99
  logOut = {
102
100
  label: LOG_OUT_MENU_ITEM,
103
101
  onclick: function onclick() {
104
- _solidLogic.authSession.logout();
102
+ _solidUi.authn.authSession.logout();
105
103
  }
106
104
  }; // the order of the menu is important here, show profile first and logout last
107
105
 
@@ -127,7 +125,7 @@ function _setUserMenu() {
127
125
  }
128
126
 
129
127
  function openUserProfile(outliner) {
130
- outliner.GotoSubject(_solidLogic.authn.currentUser(), true, undefined, true, undefined);
128
+ outliner.GotoSubject(_solidUi.authn.currentUser(), true, undefined, true, undefined);
131
129
  location.reload();
132
130
  }
133
131
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/mainPage/header.ts"],"names":["HELP_MENU_ICON","icons","iconBase","SOLID_ICON_URL","USER_GUIDE_MENU_ITEM","REPORT_A_PROBLEM_MENU_ITEM","SHOW_YOUR_PROFILE_MENU_ITEM","LOG_OUT_MENU_ITEM","USER_GUIDE_MENU_URL","REPORT_A_PROBLEM_MENU_URL","createHeader","store","outliner","initHeader","setUserMenu","setHeaderOptions","helpMenuList","label","url","target","headerOptions","logo","helpIcon","showProfile","onclick","openUserProfile","logOut","authSession","logout","userMenuList","getMenuItems","concat","push","GotoSubject","authn","currentUser","undefined","location","reload","getDashboardItems","items","map","element","openDashboardPane","tabName","paneName","pane","showDashboard"],"mappings":";;;;;;;AAAA;;AACA;;;;;;AACA;AACA;AACA;AACA,IAAMA,cAAc,GAAGC,eAAMC,QAAN,GAAiB,eAAxC;AACA,IAAMC,cAAc,GAAG,sDAAvB;AAEA;AACA;AACA;;AACA,IAAMC,oBAAoB,GAAG,YAA7B;AACA,IAAMC,0BAA0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nimport { icons, initHeader } from 'solid-ui'\n/**\n * menu icons\n*/\nconst HELP_MENU_ICON = icons.iconBase + 'noun_help.svg'\nconst SOLID_ICON_URL = 'https://solidproject.org/assets/img/solid-emblem.svg'\n\n/**\n * menu elements\n*/\nconst USER_GUIDE_MENU_ITEM = 'User guide'\nconst REPORT_A_PROBLEM_MENU_ITEM = 'Report a problem'\nconst SHOW_YOUR_PROFILE_MENU_ITEM = 'Show your profile'\nconst LOG_OUT_MENU_ITEM = 'Log out'\n/**\n * URLS\n */\nconst USER_GUIDE_MENU_URL = 'https://solid.github.io/userguide/'\nconst REPORT_A_PROBLEM_MENU_URL = 'https://github.com/solid/solidos/issues'\n\nexport async function createHeader (store, outliner) {\n initHeader(store, await setUserMenu(outliner), setHeaderOptions())\n}\n\nfunction setHeaderOptions () {\n const helpMenuList = [\n { label: USER_GUIDE_MENU_ITEM, url: USER_GUIDE_MENU_URL, target: '_blank' },\n { label: REPORT_A_PROBLEM_MENU_ITEM, url: REPORT_A_PROBLEM_MENU_URL, target: '_blank' }\n ]\n const headerOptions = { logo: SOLID_ICON_URL, helpIcon: HELP_MENU_ICON, helpMenuList: helpMenuList }\n\n return headerOptions\n}\n\nasync function setUserMenu (outliner: any) {\n const showProfile = {\n label: SHOW_YOUR_PROFILE_MENU_ITEM,\n onclick: () => openUserProfile(outliner)\n }\n\n const logOut = {\n label: LOG_OUT_MENU_ITEM,\n onclick: () => {\n authSession.logout()\n }\n }\n\n // the order of the menu is important here, show profile first and logout last\n let userMenuList = [showProfile]\n userMenuList = userMenuList.concat(await getMenuItems(outliner))\n userMenuList.push(logOut)\n\n return userMenuList\n}\n\nfunction openUserProfile (outliner: any) {\n outliner.GotoSubject(authn.currentUser(), true, undefined, true, undefined)\n location.reload()\n}\n\nasync function getMenuItems (outliner: any) {\n const items = await outliner.getDashboardItems()\n return items.map((element) => {\n return {\n label: element.label,\n onclick: () => openDashboardPane(outliner, element.tabName || element.paneName)\n }\n })\n}\n\nasync function openDashboardPane (outliner: any, pane: string): Promise<void> {\n outliner.showDashboard({\n pane\n })\n}\n"],"file":"header.js"}
1
+ {"version":3,"sources":["../../src/mainPage/header.ts"],"names":["HELP_MENU_ICON","icons","iconBase","SOLID_ICON_URL","USER_GUIDE_MENU_ITEM","REPORT_A_PROBLEM_MENU_ITEM","SHOW_YOUR_PROFILE_MENU_ITEM","LOG_OUT_MENU_ITEM","USER_GUIDE_MENU_URL","REPORT_A_PROBLEM_MENU_URL","createHeader","store","outliner","initHeader","setUserMenu","setHeaderOptions","helpMenuList","label","url","target","headerOptions","logo","helpIcon","showProfile","onclick","openUserProfile","logOut","authn","authSession","logout","userMenuList","getMenuItems","concat","push","GotoSubject","currentUser","undefined","location","reload","getDashboardItems","items","map","element","openDashboardPane","tabName","paneName","pane","showDashboard"],"mappings":";;;;;;;AAAA;;;;;;AACA;AACA;AACA;AACA,IAAMA,cAAc,GAAGC,eAAMC,QAAN,GAAiB,eAAxC;AACA,IAAMC,cAAc,GAAG,sDAAvB;AAEA;AACA;AACA;;AACA,IAAMC,oBAAoB,GAAG,YAA7B;AACA,IAAMC,0BAA0B,GAAG,kBAAnC;AACA,IAAMC,2BAA2B,GAAG,mBAApC;AACA,IAAMC,iBAAiB,GAAG,SAA1B;AACA;AACA;AACA;;AACA,IAAMC,mBAAmB,GAAG,oCAA5B;AACA,IAAMC,yBAAyB,GAAG,yCAAlC;;SAEsBC,Y;;;;;0EAAf,iBAA6BC,KAA7B,EAAoCC,QAApC;AAAA;AAAA;AAAA;AAAA;AAAA,0BACLC,mBADK;AAAA,0BACMF,KADN;AAAA;AAAA,mBACmBG,WAAW,CAACF,QAAD,CAD9B;;AAAA;AAAA;AAAA,0BAC0CG,gBAAgB,EAD1D;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,G;;;;AAIP,SAASA,gBAAT,GAA6B;AAC3B,MAAMC,YAAY,GAAG,CACnB;AAAEC,IAAAA,KAAK,EAAEb,oBAAT;AAA+Bc,IAAAA,G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;0EAAf,kBAA6BnB,QAA7B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBACsBA,QAAQ,CAAC2B,iBAAT,EADtB;;AAAA;AACQC,YAAAA,KADR;AAAA,8CAESA,KAAK,CAACC,GAAN,CAAU,UAACC,OAAD,EAAa;AAC5B,qBAAO;AACLzB,gBAAAA,KAAK,EAAEyB,OAAO,CAACzB,KADV;AAELO,gBAAAA,OAAO,EAAE;AAAA,yBAAMmB,iBAAiB,CAAC/B,QAAD,EAAW8B,OAAO,CAACE,OAAR,IAAmBF,OAAO,CAACG,QAAtC,CAAvB;AAAA;AAFJ,eAAP;AAID,aALM,CAFT;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,G;;;;SAUeF,iB;;;;;+EAAf,kBAAkC/B,QAAlC,EAAiDkC,IAAjD;AAAA;AAAA;AAAA;AAAA;AACElC,YAAAA,QAAQ,CAACmC,aAAT,CAAuB;AACrBD,cAAAA,IAAI,EAAJA;AADqB,aAAvB;;AADF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,G","sourcesContent":["import { icons, authn, initHeader } from 'solid-ui'\n/**\n * menu icons\n*/\nconst HELP_MENU_ICON = icons.iconBase + 'noun_help.svg'\nconst SOLID_ICON_URL = 'https://solidproject.org/assets/img/solid-emblem.svg'\n\n/**\n * menu elements\n*/\nconst USER_GUIDE_MENU_ITEM = 'User guide'\nconst REPORT_A_PROBLEM_MENU_ITEM = 'Report a problem'\nconst SHOW_YOUR_PROFILE_MENU_ITEM = 'Show your profile'\nconst LOG_OUT_MENU_ITEM = 'Log out'\n/**\n * URLS\n */\nconst USER_GUIDE_MENU_URL = 'https://solid.github.io/userguide/'\nconst REPORT_A_PROBLEM_MENU_URL = 'https://github.com/solid/solidos/issues'\n\nexport async function createHeader (store, outliner) {\n initHeader(store, await setUserMenu(outliner), setHeaderOptions())\n}\n\nfunction setHeaderOptions () {\n const helpMenuList = [\n { label: USER_GUIDE_MENU_ITEM, url: USER_GUIDE_MENU_URL, target: '_blank' },\n { label: REPORT_A_PROBLEM_MENU_ITEM, url: REPORT_A_PROBLEM_MENU_URL, target: '_blank' }\n ]\n const headerOptions = { logo: SOLID_ICON_URL, helpIcon: HELP_MENU_ICON, helpMenuList: helpMenuList }\n\n return headerOptions\n}\n\nasync function setUserMenu (outliner: any) {\n const showProfile = {\n label: SHOW_YOUR_PROFILE_MENU_ITEM,\n onclick: () => openUserProfile(outliner)\n }\n\n const logOut = {\n label: LOG_OUT_MENU_ITEM,\n onclick: () => {\n authn.authSession.logout()\n }\n }\n\n // the order of the menu is important here, show profile first and logout last\n let userMenuList = [showProfile]\n userMenuList = userMenuList.concat(await getMenuItems(outliner))\n userMenuList.push(logOut)\n\n return userMenuList\n}\n\nfunction openUserProfile (outliner: any) {\n outliner.GotoSubject(authn.currentUser(), true, undefined, true, undefined)\n location.reload()\n}\n\nasync function getMenuItems (outliner: any) {\n const items = await outliner.getDashboardItems()\n return items.map((element) => {\n return {\n label: element.label,\n onclick: () => openDashboardPane(outliner, element.tabName || element.paneName)\n }\n })\n}\n\nasync function openDashboardPane (outliner: any, pane: string): Promise<void> {\n outliner.showDashboard({\n pane\n })\n}\n"],"file":"header.js"}
@@ -1,20 +1,20 @@
1
1
  "use strict";
2
2
 
3
- var _solidLogic = require("solid-logic");
4
-
5
- var UI = _interopRequireWildcard(require("solid-ui"));
6
-
7
- 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); }
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
8
4
 
9
- 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; }
5
+ /*
6
+ Microblog pane
7
+ Charles McKenzie <charles2@mit.edu>
8
+ */
10
9
 
11
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
10
+ /* global alert */
11
+ var UI = require('solid-ui');
12
12
 
13
13
  module.exports = {
14
14
  icon: UI.icons.originalIconBase + 'microblog/microblog.png',
15
15
  name: 'microblogPane',
16
16
  label: function label(subject) {
17
- if (_solidLogic.store.whether(subject, UI.ns.rdf('type'), UI.ns.foaf('Person'))) {
17
+ if (UI.store.whether(subject, UI.ns.rdf('type'), UI.ns.foaf('Person'))) {
18
18
  return 'Microblog';
19
19
  } else {
20
20
  return null;
@@ -29,9 +29,9 @@ module.exports = {
29
29
  var FOAF = UI.rdf.Namespace('http://xmlns.com/foaf/0.1/');
30
30
  var terms = UI.rdf.Namespace('http://purl.org/dc/terms/');
31
31
  var RDF = UI.ns.rdf;
32
- var kb = _solidLogic.store;
32
+ var kb = UI.store;
33
33
  var charCount = 140;
34
- var sf = _solidLogic.store.fetcher; //* **********************************************
34
+ var sf = UI.store.fetcher; //* **********************************************
35
35
  // BACK END
36
36
  //* **********************************************
37
37
 
@@ -142,7 +142,7 @@ module.exports = {
142
142
  // in case the user's foaf was not writable. add it to the store
143
143
  // this will probably need to change.
144
144
 
145
- var theUser = _solidLogic.authn.currentUser();
145
+ var theUser = UI.authn.currentUser();
146
146
 
147
147
  if (theUser) {
148
148
  var theAccount = UI.preferences.get('acct');
@@ -235,8 +235,7 @@ module.exports = {
235
235
  };
236
236
 
237
237
  Microblog.prototype.getMyURI = function () {
238
- var me = _solidLogic.authn.currentUser();
239
-
238
+ var me = UI.authn.currentUser();
240
239
  console.log(me);
241
240
  var myMicroblog = kb.any(kb.sym(me), FOAF('holdsAccount'));
242
241
  console.log('\n\n' + myMicroblog);
@@ -354,8 +353,7 @@ module.exports = {
354
353
  } else if (resourceType.uri === SIOC('User').uri) {
355
354
  this.thisIsMe = s.uri === mb.getMyURI();
356
355
  } else if (resourceType.uri === FOAF('Person').uri) {
357
- var me = _solidLogic.authn.currentUser();
358
-
356
+ var me = UI.authn.currentUser();
359
357
  var meUri = me && me.uri;
360
358
  this.thisIsMe = s.uri === meUri;
361
359
  } else {
@@ -662,7 +660,7 @@ module.exports = {
662
660
  for (var c in creators) {
663
661
  if (kb.whether(creators[c], RDF('type'), SIOC('User')) && kb.whether(kb.any(creators[c], SIOC('creator_of')), RDF('type'), SIOCt('Microblog'))) {
664
662
  creator = creators[c]; // var mb = kb.sym(creator.uri.split("#")[0]);
665
- // store.fetcher.refresh(mb);
663
+ // UI.store.fetcher.refresh(mb);
666
664
 
667
665
  break; // TODO add support for more than one microblog in same foaf
668
666
  }