chat-pane 2.4.22 → 2.4.23
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/LICENSE.md +0 -0
- package/README.md +3 -0
- package/dist/index.html +0 -0
- package/dist/longChatPane.js +59 -85
- package/dist/longChatPane.js.map +1 -1
- package/dist/main.js +59 -89
- package/dist/main.js.map +1 -1
- package/dist/shortChatPane.js +59 -85
- package/dist/shortChatPane.js.map +1 -1
- package/lib/create.js +0 -0
- package/lib/create.js.map +0 -0
- package/lib/longChatPane.js +0 -0
- package/lib/longChatPane.js.map +0 -0
- package/lib/main.js +0 -0
- package/lib/main.js.map +0 -0
- package/lib/shortChatPane.js +0 -0
- package/lib/shortChatPane.js.map +0 -0
- package/package.json +12 -11
- package/src/create.ts +0 -0
- package/src/longChatPane.js +0 -0
- package/src/main.js +0 -0
- package/src/shortChatPane.js +0 -0
package/dist/shortChatPane.js
CHANGED
|
@@ -5012,7 +5012,10 @@ function removeOidcQueryParam(redirectUrl) {
|
|
|
5012
5012
|
cleanedUrl.searchParams.delete("code");
|
|
5013
5013
|
cleanedUrl.searchParams.delete("state");
|
|
5014
5014
|
cleanedUrl.hash = "";
|
|
5015
|
-
|
|
5015
|
+
if (redirectUrl.includes(`${cleanedUrl.origin}/`)) {
|
|
5016
|
+
return cleanedUrl.href;
|
|
5017
|
+
}
|
|
5018
|
+
return `${cleanedUrl.origin}${cleanedUrl.href.substring(cleanedUrl.origin.length + 1)}`;
|
|
5016
5019
|
}
|
|
5017
5020
|
async function clearOidcPersistentStorage() {
|
|
5018
5021
|
const client = new _inrupt_oidc_client__WEBPACK_IMPORTED_MODULE_0__.OidcClient({
|
|
@@ -5680,7 +5683,7 @@ class IssuerConfigFetcher {
|
|
|
5680
5683
|
}
|
|
5681
5684
|
async fetchConfig(issuer) {
|
|
5682
5685
|
let issuerConfig;
|
|
5683
|
-
const openIdConfigUrl = new URL(exports.WELL_KNOWN_OPENID_CONFIG, issuer).href;
|
|
5686
|
+
const openIdConfigUrl = new URL(exports.WELL_KNOWN_OPENID_CONFIG, issuer.endsWith("/") ? issuer : `${issuer}/`).href;
|
|
5684
5687
|
const issuerConfigRequestBody = await window.fetch(openIdConfigUrl);
|
|
5685
5688
|
try {
|
|
5686
5689
|
issuerConfig = processConfig(await issuerConfigRequestBody.json());
|
|
@@ -5857,12 +5860,6 @@ class AuthCodeRedirectHandler {
|
|
|
5857
5860
|
webId: tokens.webId,
|
|
5858
5861
|
isLoggedIn: "true",
|
|
5859
5862
|
}, { secure: true });
|
|
5860
|
-
url.searchParams.delete("code");
|
|
5861
|
-
await this.storageUtility.setForUser(storedSessionId, {
|
|
5862
|
-
redirectUrl: url.toString(),
|
|
5863
|
-
}, {
|
|
5864
|
-
secure: false,
|
|
5865
|
-
});
|
|
5866
5863
|
const sessionInfo = await this.sessionInfoManager.get(storedSessionId);
|
|
5867
5864
|
if (!sessionInfo) {
|
|
5868
5865
|
throw new Error(`Could not retrieve session: [${storedSessionId}].`);
|
|
@@ -31704,7 +31701,6 @@ var BlankNode = /*#__PURE__*/function (_Node) {
|
|
|
31704
31701
|
function getId(id) {
|
|
31705
31702
|
if (id) {
|
|
31706
31703
|
if (typeof id !== 'string') {
|
|
31707
|
-
console.log('Bad blank id:', id);
|
|
31708
31704
|
throw new Error('Bad id argument to new blank node: ' + id);
|
|
31709
31705
|
}
|
|
31710
31706
|
if (id.includes('#')) {
|
|
@@ -33331,7 +33327,7 @@ var Fetcher = /*#__PURE__*/function () {
|
|
|
33331
33327
|
size: 0,
|
|
33332
33328
|
timeout: 0
|
|
33333
33329
|
};
|
|
33334
|
-
console.log('Fetcher: <' + actualProxyURI + '> Non-HTTP fetch exception: ' + error)
|
|
33330
|
+
// console.log('Fetcher: <' + actualProxyURI + '> Non-HTTP fetch exception: ' + error)
|
|
33335
33331
|
return _this5.handleError(dummyResponse, docuri, options); // possible credentials retry
|
|
33336
33332
|
// return this.failFetch(options, 'fetch failed: ' + error, 999, dummyResponse) // Fake status code: fetch exception
|
|
33337
33333
|
|
|
@@ -33392,25 +33388,21 @@ var Fetcher = /*#__PURE__*/function () {
|
|
|
33392
33388
|
if (fetchResponse.ok) {
|
|
33393
33389
|
userCallback(true, 'OK', fetchResponse);
|
|
33394
33390
|
} else {
|
|
33395
|
-
// console.log('@@@ fetcher.js Should not take this path !!!!!!!!!!!!')
|
|
33396
33391
|
var oops = 'HTTP error: Status ' + fetchResponse.status + ' (' + fetchResponse.statusText + ')';
|
|
33397
33392
|
if (fetchResponse.responseText) {
|
|
33398
33393
|
oops += ' ' + fetchResponse.responseText; // not in 404, dns error, nock failure
|
|
33399
33394
|
}
|
|
33400
33395
|
|
|
33401
|
-
console.log(oops + ' fetching ' + uri);
|
|
33402
33396
|
userCallback(false, oops, fetchResponse);
|
|
33403
33397
|
}
|
|
33404
33398
|
} else {
|
|
33405
33399
|
var _oops = '@@ nowOrWhenFetched: no response object!';
|
|
33406
|
-
console.log(_oops);
|
|
33407
33400
|
userCallback(false, _oops);
|
|
33408
33401
|
}
|
|
33409
33402
|
}
|
|
33410
33403
|
}, function (err) {
|
|
33411
33404
|
var message = err.message || err.statusText;
|
|
33412
33405
|
message = 'Failed to load <' + uri + '> ' + message;
|
|
33413
|
-
console.log(message);
|
|
33414
33406
|
if (err.response && err.response.status) {
|
|
33415
33407
|
message += ' status: ' + err.response.status;
|
|
33416
33408
|
}
|
|
@@ -33649,45 +33641,42 @@ var Fetcher = /*#__PURE__*/function () {
|
|
|
33649
33641
|
return fetcher.load(doc);
|
|
33650
33642
|
case 6:
|
|
33651
33643
|
response = _context2.sent;
|
|
33652
|
-
_context2.next =
|
|
33644
|
+
_context2.next = 26;
|
|
33653
33645
|
break;
|
|
33654
33646
|
case 9:
|
|
33655
33647
|
_context2.prev = 9;
|
|
33656
33648
|
_context2.t0 = _context2["catch"](3);
|
|
33657
33649
|
if (!(_context2.t0.response.status === 404)) {
|
|
33658
|
-
_context2.next =
|
|
33650
|
+
_context2.next = 25;
|
|
33659
33651
|
break;
|
|
33660
33652
|
}
|
|
33661
|
-
|
|
33662
|
-
_context2.
|
|
33663
|
-
_context2.next = 16;
|
|
33653
|
+
_context2.prev = 12;
|
|
33654
|
+
_context2.next = 15;
|
|
33664
33655
|
return fetcher.webOperation('PUT', doc.value, {
|
|
33665
33656
|
data: data,
|
|
33666
33657
|
contentType: contentType
|
|
33667
33658
|
});
|
|
33668
|
-
case
|
|
33659
|
+
case 15:
|
|
33669
33660
|
response = _context2.sent;
|
|
33670
|
-
_context2.next =
|
|
33661
|
+
_context2.next = 21;
|
|
33671
33662
|
break;
|
|
33672
|
-
case
|
|
33673
|
-
_context2.prev =
|
|
33674
|
-
_context2.t1 = _context2["catch"](
|
|
33675
|
-
console.log('createIfNotExists doc FAILED: ' + doc + ': ' + _context2.t1);
|
|
33663
|
+
case 18:
|
|
33664
|
+
_context2.prev = 18;
|
|
33665
|
+
_context2.t1 = _context2["catch"](12);
|
|
33676
33666
|
throw _context2.t1;
|
|
33677
|
-
case
|
|
33667
|
+
case 21:
|
|
33678
33668
|
delete fetcher.requested[doc.value]; // delete cached 404 error
|
|
33679
33669
|
// console.log('createIfNotExists doc created ok ' + doc)
|
|
33680
33670
|
return _context2.abrupt("return", response);
|
|
33681
|
-
case
|
|
33682
|
-
console.log('createIfNotExists doc load error NOT 404: ' + doc + ': ' + _context2.t0);
|
|
33671
|
+
case 25:
|
|
33683
33672
|
throw _context2.t0;
|
|
33684
|
-
case
|
|
33673
|
+
case 26:
|
|
33685
33674
|
return _context2.abrupt("return", response);
|
|
33686
|
-
case
|
|
33675
|
+
case 27:
|
|
33687
33676
|
case "end":
|
|
33688
33677
|
return _context2.stop();
|
|
33689
33678
|
}
|
|
33690
|
-
}, _callee2, this, [[3, 9], [
|
|
33679
|
+
}, _callee2, this, [[3, 9], [12, 18]]);
|
|
33691
33680
|
}));
|
|
33692
33681
|
function createIfNotExists(_x4) {
|
|
33693
33682
|
return _createIfNotExists.apply(this, arguments);
|
|
@@ -33996,7 +33985,8 @@ var Fetcher = /*#__PURE__*/function () {
|
|
|
33996
33985
|
}, {
|
|
33997
33986
|
key: "retryNoCredentials",
|
|
33998
33987
|
value: function retryNoCredentials(docuri, options) {
|
|
33999
|
-
console.log('Fetcher: CORS: RETRYING with NO CREDENTIALS for ' + options.resource)
|
|
33988
|
+
// console.log('Fetcher: CORS: RETRYING with NO CREDENTIALS for ' + options.resource)
|
|
33989
|
+
|
|
34000
33990
|
options.retriedWithNoCredentials = true; // protect against being called twice
|
|
34001
33991
|
|
|
34002
33992
|
delete this.requested[docuri]; // forget the original request happened
|
|
@@ -34041,7 +34031,7 @@ var Fetcher = /*#__PURE__*/function () {
|
|
|
34041
34031
|
// Now attempt retry via proxy
|
|
34042
34032
|
var proxyUri = Fetcher.crossSiteProxy(docuri);
|
|
34043
34033
|
if (proxyUri && !options.proxyUsed) {
|
|
34044
|
-
console.log('web: Direct failed so trying proxy ' + proxyUri)
|
|
34034
|
+
// console.log('web: Direct failed so trying proxy ' + proxyUri)
|
|
34045
34035
|
return this.redirectToProxy(proxyUri, options);
|
|
34046
34036
|
}
|
|
34047
34037
|
}
|
|
@@ -34114,7 +34104,7 @@ var Fetcher = /*#__PURE__*/function () {
|
|
|
34114
34104
|
|
|
34115
34105
|
// Check for masked errors (CORS, etc)
|
|
34116
34106
|
if (response.status === 0) {
|
|
34117
|
-
console.log('Masked error - status 0 for ' + docuri)
|
|
34107
|
+
// console.log('Masked error - status 0 for ' + docuri)
|
|
34118
34108
|
return this.handleError(response, docuri, options);
|
|
34119
34109
|
}
|
|
34120
34110
|
if (response.status >= 400) {
|
|
@@ -35001,7 +34991,6 @@ var Formula = /*#__PURE__*/function (_Node) {
|
|
|
35001
34991
|
while (todo.length) {
|
|
35002
34992
|
follow(todo.shift());
|
|
35003
34993
|
}
|
|
35004
|
-
// console.log('' + result.length + ' statements about ' + subject)
|
|
35005
34994
|
return result;
|
|
35006
34995
|
}
|
|
35007
34996
|
|
|
@@ -35158,10 +35147,10 @@ var Formula = /*#__PURE__*/function (_Node) {
|
|
|
35158
35147
|
var statementsCopy = this.statements.map(function (ea) {
|
|
35159
35148
|
return ea.substitute(bindings);
|
|
35160
35149
|
});
|
|
35161
|
-
console.log('Formula subs statmnts:' + statementsCopy)
|
|
35150
|
+
// console.log('Formula subs statmnts:' + statementsCopy)
|
|
35162
35151
|
var y = new Formula();
|
|
35163
35152
|
y.addAll(statementsCopy);
|
|
35164
|
-
console.log('indexed-form subs formula:' + y)
|
|
35153
|
+
// console.log('indexed-form subs formula:' + y)
|
|
35165
35154
|
return y;
|
|
35166
35155
|
}
|
|
35167
35156
|
}, {
|
|
@@ -37973,7 +37962,6 @@ var Node = /*#__PURE__*/function () {
|
|
|
37973
37962
|
(0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__["default"])(Node, [{
|
|
37974
37963
|
key: "substitute",
|
|
37975
37964
|
value: function substitute(bindings) {
|
|
37976
|
-
console.log('@@@ node substitute' + this);
|
|
37977
37965
|
return this;
|
|
37978
37966
|
}
|
|
37979
37967
|
|
|
@@ -42384,7 +42372,7 @@ var Statement = /*#__PURE__*/function () {
|
|
|
42384
42372
|
key: "substitute",
|
|
42385
42373
|
value: function substitute(bindings) {
|
|
42386
42374
|
var y = new Statement(this.subject.substitute(bindings), this.predicate.substitute(bindings), this.object.substitute(bindings), (0,_default_graph__WEBPACK_IMPORTED_MODULE_3__.isDefaultGraph)(this.graph) ? this.graph : this.graph.substitute(bindings)); // 2016
|
|
42387
|
-
console.log('@@@ statement substitute:' + y)
|
|
42375
|
+
// console.log('@@@ statement substitute:' + y)
|
|
42388
42376
|
return y;
|
|
42389
42377
|
}
|
|
42390
42378
|
|
|
@@ -46509,7 +46497,7 @@ var SolidAuthnLogic = /** @class */ (function () {
|
|
|
46509
46497
|
*/
|
|
46510
46498
|
SolidAuthnLogic.prototype.checkUser = function (setUserCallback) {
|
|
46511
46499
|
return __awaiter(this, void 0, void 0, function () {
|
|
46512
|
-
var preLoginRedirectHash, postLoginRedirectHash, curUrl, me, webId;
|
|
46500
|
+
var preLoginRedirectHash, redirectUrl, postLoginRedirectHash, curUrl, me, webId;
|
|
46513
46501
|
return __generator(this, function (_a) {
|
|
46514
46502
|
switch (_a.label) {
|
|
46515
46503
|
case 0:
|
|
@@ -46521,20 +46509,16 @@ var SolidAuthnLogic = /** @class */ (function () {
|
|
|
46521
46509
|
if (document.location.toString() !== url)
|
|
46522
46510
|
history.replaceState(null, '', url);
|
|
46523
46511
|
});
|
|
46524
|
-
|
|
46525
|
-
|
|
46526
|
-
*/
|
|
46512
|
+
redirectUrl = new URL(window.location.href);
|
|
46513
|
+
redirectUrl.hash = '';
|
|
46527
46514
|
return [4 /*yield*/, this.session
|
|
46528
46515
|
.handleIncomingRedirect({
|
|
46529
46516
|
restorePreviousSession: true,
|
|
46530
|
-
url:
|
|
46517
|
+
url: redirectUrl.href
|
|
46531
46518
|
})
|
|
46532
46519
|
// Check to see if a hash was stored in local storage
|
|
46533
46520
|
];
|
|
46534
46521
|
case 1:
|
|
46535
|
-
/**
|
|
46536
|
-
* Handle a successful authentication redirect
|
|
46537
|
-
*/
|
|
46538
46522
|
_a.sent();
|
|
46539
46523
|
postLoginRedirectHash = window.localStorage.getItem('preLoginRedirectHash');
|
|
46540
46524
|
if (postLoginRedirectHash) {
|
|
@@ -55974,7 +55958,7 @@ function renderSignInPopup(dom) {
|
|
|
55974
55958
|
issuerPopupBoxTopMenu.appendChild(issuerPopupBoxCloseButton);
|
|
55975
55959
|
var loginToIssuer = /*#__PURE__*/function () {
|
|
55976
55960
|
var _ref = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(issuerUri) {
|
|
55977
|
-
var preLoginRedirectHash;
|
|
55961
|
+
var preLoginRedirectHash, locationUrl;
|
|
55978
55962
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
55979
55963
|
while (1) switch (_context.prev = _context.next) {
|
|
55980
55964
|
case 0:
|
|
@@ -55986,23 +55970,25 @@ function renderSignInPopup(dom) {
|
|
|
55986
55970
|
}
|
|
55987
55971
|
window.localStorage.setItem('loginIssuer', issuerUri);
|
|
55988
55972
|
// Login
|
|
55989
|
-
|
|
55973
|
+
locationUrl = new URL(window.location.href);
|
|
55974
|
+
locationUrl.hash = ''; // remove hash part
|
|
55975
|
+
_context.next = 8;
|
|
55990
55976
|
return _solidLogic.authSession.login({
|
|
55991
|
-
redirectUrl:
|
|
55977
|
+
redirectUrl: locationUrl.href,
|
|
55992
55978
|
oidcIssuer: issuerUri
|
|
55993
55979
|
});
|
|
55994
|
-
case 6:
|
|
55995
|
-
_context.next = 11;
|
|
55996
|
-
break;
|
|
55997
55980
|
case 8:
|
|
55998
|
-
_context.
|
|
55981
|
+
_context.next = 13;
|
|
55982
|
+
break;
|
|
55983
|
+
case 10:
|
|
55984
|
+
_context.prev = 10;
|
|
55999
55985
|
_context.t0 = _context["catch"](0);
|
|
56000
55986
|
(0, _log.alert)(_context.t0.message);
|
|
56001
|
-
case
|
|
55987
|
+
case 13:
|
|
56002
55988
|
case "end":
|
|
56003
55989
|
return _context.stop();
|
|
56004
55990
|
}
|
|
56005
|
-
}, _callee, null, [[0,
|
|
55991
|
+
}, _callee, null, [[0, 10]]);
|
|
56006
55992
|
}));
|
|
56007
55993
|
return function loginToIssuer(_x11) {
|
|
56008
55994
|
return _ref.apply(this, arguments);
|
|
@@ -61938,10 +61924,10 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
61938
61924
|
}));
|
|
61939
61925
|
exports.versionInfo = void 0;
|
|
61940
61926
|
var versionInfo = {
|
|
61941
|
-
buildTime: '2023-
|
|
61942
|
-
commit: '
|
|
61927
|
+
buildTime: '2023-03-17T10:43:05Z',
|
|
61928
|
+
commit: '5b3471ff0bc08942d334b9bc9a6992adcb5cdb6b',
|
|
61943
61929
|
npmInfo: {
|
|
61944
|
-
'solid-ui': '2.4.
|
|
61930
|
+
'solid-ui': '2.4.27',
|
|
61945
61931
|
npm: '8.19.4',
|
|
61946
61932
|
node: '16.19.1',
|
|
61947
61933
|
v8: '9.4.146.26-node.24',
|
|
@@ -75179,33 +75165,21 @@ class RemoteJWKSet extends _local_js__WEBPACK_IMPORTED_MODULE_3__.LocalJWKSet {
|
|
|
75179
75165
|
}
|
|
75180
75166
|
async reload() {
|
|
75181
75167
|
if (this._pendingFetch && (0,_runtime_env_js__WEBPACK_IMPORTED_MODULE_1__.isCloudflareWorkers)()) {
|
|
75182
|
-
|
|
75183
|
-
const isDone = () => {
|
|
75184
|
-
if (this._pendingFetch === undefined) {
|
|
75185
|
-
resolve();
|
|
75186
|
-
}
|
|
75187
|
-
else {
|
|
75188
|
-
setTimeout(isDone, 5);
|
|
75189
|
-
}
|
|
75190
|
-
};
|
|
75191
|
-
isDone();
|
|
75192
|
-
});
|
|
75193
|
-
}
|
|
75194
|
-
if (!this._pendingFetch) {
|
|
75195
|
-
this._pendingFetch = (0,_runtime_fetch_jwks_js__WEBPACK_IMPORTED_MODULE_0__["default"])(this._url, this._timeoutDuration, this._options)
|
|
75196
|
-
.then((json) => {
|
|
75197
|
-
if (!(0,_local_js__WEBPACK_IMPORTED_MODULE_3__.isJWKSLike)(json)) {
|
|
75198
|
-
throw new _util_errors_js__WEBPACK_IMPORTED_MODULE_2__.JWKSInvalid('JSON Web Key Set malformed');
|
|
75199
|
-
}
|
|
75200
|
-
this._jwks = { keys: json.keys };
|
|
75201
|
-
this._jwksTimestamp = Date.now();
|
|
75202
|
-
this._pendingFetch = undefined;
|
|
75203
|
-
})
|
|
75204
|
-
.catch((err) => {
|
|
75205
|
-
this._pendingFetch = undefined;
|
|
75206
|
-
throw err;
|
|
75207
|
-
});
|
|
75168
|
+
this._pendingFetch = undefined;
|
|
75208
75169
|
}
|
|
75170
|
+
this._pendingFetch || (this._pendingFetch = (0,_runtime_fetch_jwks_js__WEBPACK_IMPORTED_MODULE_0__["default"])(this._url, this._timeoutDuration, this._options)
|
|
75171
|
+
.then((json) => {
|
|
75172
|
+
if (!(0,_local_js__WEBPACK_IMPORTED_MODULE_3__.isJWKSLike)(json)) {
|
|
75173
|
+
throw new _util_errors_js__WEBPACK_IMPORTED_MODULE_2__.JWKSInvalid('JSON Web Key Set malformed');
|
|
75174
|
+
}
|
|
75175
|
+
this._jwks = { keys: json.keys };
|
|
75176
|
+
this._jwksTimestamp = Date.now();
|
|
75177
|
+
this._pendingFetch = undefined;
|
|
75178
|
+
})
|
|
75179
|
+
.catch((err) => {
|
|
75180
|
+
this._pendingFetch = undefined;
|
|
75181
|
+
throw err;
|
|
75182
|
+
}));
|
|
75209
75183
|
await this._pendingFetch;
|
|
75210
75184
|
}
|
|
75211
75185
|
}
|