@singlebase/elements 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/authui-display-C2o9gApg.cjs +961 -0
- package/dist/authui-display-C2o9gApg.cjs.map +1 -0
- package/dist/{authui-display-BM_F3-5e.js → authui-display-CRUABt43.js} +1009 -862
- package/dist/authui-display-CRUABt43.js.map +1 -0
- package/dist/authui.cjs +1 -1
- package/dist/authui.js +2 -2
- package/dist/{chat-ezUmd9II.cjs → chat-BWcGH9lr.cjs} +2 -2
- package/dist/chat-BWcGH9lr.cjs.map +1 -0
- package/dist/{chat-BH_3e1jT.js → chat-t4o5FsxM.js} +5 -5
- package/dist/chat-t4o5FsxM.js.map +1 -0
- package/dist/chat.cjs +1 -1
- package/dist/chat.js +1 -1
- package/dist/elements/authui-account.d.ts +0 -1
- package/dist/elements/authui-buttons.d.ts +1 -1
- package/dist/elements/authui.d.ts +25 -1
- package/dist/elements/chat.d.ts +3 -3
- package/dist/index.cjs +1 -1
- package/dist/index.js +3 -3
- package/dist/messages.d.ts +34 -3
- package/dist/singlebase-elements.min.js +2197 -2021
- package/dist/singlebase-elements.min.js.map +1 -1
- package/dist/{uploader-COP8PkJ6.cjs → uploader-C57vgFME.cjs} +27 -1
- package/dist/uploader-C57vgFME.cjs.map +1 -0
- package/dist/{uploader-tdMU9Gxv.js → uploader-Cz9yfzfV.js} +27 -1
- package/dist/uploader-Cz9yfzfV.js.map +1 -0
- package/dist/uploader.cjs +1 -1
- package/dist/uploader.js +1 -1
- package/dist/utils/auth-errors.d.ts +7 -0
- package/dist/utils/oauth.d.ts +24 -0
- package/dist/utils/password.d.ts +16 -0
- package/package.json +3 -3
- package/dist/authui-display-BM_F3-5e.js.map +0 -1
- package/dist/authui-display-CMVHTNFz.cjs +0 -956
- package/dist/authui-display-CMVHTNFz.cjs.map +0 -1
- package/dist/chat-BH_3e1jT.js.map +0 -1
- package/dist/chat-ezUmd9II.cjs.map +0 -1
- package/dist/uploader-COP8PkJ6.cjs.map +0 -1
- package/dist/uploader-tdMU9Gxv.js.map +0 -1
package/dist/chat.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chat-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chat-BWcGH9lr.cjs");Object.defineProperty(exports,"SinglebaseChat",{enumerable:!0,get:()=>e.SinglebaseChat});exports.adaptBlocks=e.adaptBlocks;exports.citedNumbers=e.citedNumbers;exports.defaultChatMessages=e.defaultChatMessages;exports.describeSource=e.describeSource;exports.parseInline=e.parseInline;exports.parseMarkdown=e.parseMarkdown;exports.resolveChatMessages=e.resolveChatMessages;exports.settleStreaming=e.settleStreaming;exports.splitFollowups=e.splitFollowups;exports.svgDataUrl=e.svgDataUrl;
|
|
2
2
|
//# sourceMappingURL=chat.cjs.map
|
package/dist/chat.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as e, a as r, c as t, d as l, b as o, p, e as d, r as g, s as i, f as c, g as n } from "./chat-
|
|
1
|
+
import { S as e, a as r, c as t, d as l, b as o, p, e as d, r as g, s as i, f as c, g as n } from "./chat-t4o5FsxM.js";
|
|
2
2
|
export {
|
|
3
3
|
e as SinglebaseChat,
|
|
4
4
|
r as adaptBlocks,
|
|
@@ -38,7 +38,6 @@ export declare class SinglebaseAccountScreen extends SinglebaseFormBase {
|
|
|
38
38
|
private accessor emailCode;
|
|
39
39
|
private accessor emailError;
|
|
40
40
|
private accessor emailSaved;
|
|
41
|
-
private accessor curPass;
|
|
42
41
|
private accessor newPass;
|
|
43
42
|
private accessor confirmPass;
|
|
44
43
|
private settingsCtl;
|
|
@@ -20,7 +20,7 @@ export declare class SinglebaseAuthButtons extends SinglebaseFormBase {
|
|
|
20
20
|
accessor intent: OAuthIntent;
|
|
21
21
|
/** link: the provider to connect to the signed-in account. */
|
|
22
22
|
accessor provider: string;
|
|
23
|
-
/** link:
|
|
23
|
+
/** link: label override. By default it's the project's `provider_name`. */
|
|
24
24
|
accessor providerName: string;
|
|
25
25
|
/** Inside a card that already supplies chrome, drop this element's own. */
|
|
26
26
|
accessor embedded: boolean;
|
|
@@ -108,7 +108,6 @@ export declare class SinglebaseAuthScreen extends SinglebaseElementBase {
|
|
|
108
108
|
private accessor emailError;
|
|
109
109
|
private accessor passError;
|
|
110
110
|
private accessor newPassError;
|
|
111
|
-
private accessor attempts;
|
|
112
111
|
private accessor needsMfaCode;
|
|
113
112
|
private settingsCtl;
|
|
114
113
|
private bridge;
|
|
@@ -153,8 +152,16 @@ export declare class SinglebaseAuthScreen extends SinglebaseElementBase {
|
|
|
153
152
|
private get redirectParam();
|
|
154
153
|
/** Navigates to the post-login destination if there is a safe one. */
|
|
155
154
|
private followRedirect;
|
|
155
|
+
/**
|
|
156
|
+
* Only the OAuth return counts: `?access_code=`, `?error=oauth_denied` or
|
|
157
|
+
* `?oauth_error=<CODE>`. Any other `?error=` belongs to the host page.
|
|
158
|
+
*/
|
|
156
159
|
private get isOAuthCallback();
|
|
157
160
|
private accessor callbackDone;
|
|
161
|
+
/** Where the OAuth return stands once its URL has been cleaned. */
|
|
162
|
+
private accessor callbackPhase;
|
|
163
|
+
/** "{name} is now connected", after a provider link completes. */
|
|
164
|
+
private accessor linkNotice;
|
|
158
165
|
/** Strips the provider's parameters so a reload cannot replay the exchange. */
|
|
159
166
|
private cleanCallbackUrl;
|
|
160
167
|
/**
|
|
@@ -173,6 +180,17 @@ export declare class SinglebaseAuthScreen extends SinglebaseElementBase {
|
|
|
173
180
|
private setScreen;
|
|
174
181
|
private withLoading;
|
|
175
182
|
private describeError;
|
|
183
|
+
/**
|
|
184
|
+
* The message for a code the backend sent back on the redirect. The code is
|
|
185
|
+
* only ever looked up, never shown, so a crafted URL can't put text on the page.
|
|
186
|
+
*/
|
|
187
|
+
private describeOAuthError;
|
|
188
|
+
/** The requirements hint under a field that creates a password. */
|
|
189
|
+
private get passwordHint();
|
|
190
|
+
/** The placeholder for a field that creates a password. */
|
|
191
|
+
private get newPasswordHint();
|
|
192
|
+
/** The project's password rules, checked wherever a password is created. */
|
|
193
|
+
private checkNewPassword;
|
|
176
194
|
private get codeValue();
|
|
177
195
|
private onSubmit;
|
|
178
196
|
private abortController;
|
|
@@ -206,6 +224,12 @@ export declare class SinglebaseAuthScreen extends SinglebaseElementBase {
|
|
|
206
224
|
private onInterstitialSignOut;
|
|
207
225
|
/** The Terms/Privacy consent line, rendered only when the host supplies a link. */
|
|
208
226
|
private renderConsent;
|
|
227
|
+
/**
|
|
228
|
+
* The OAuth return is handled after the first render, not during it: state
|
|
229
|
+
* set while rendering is dropped, so the widget wouldn't leave the callback
|
|
230
|
+
* screen once the URL is cleaned.
|
|
231
|
+
*/
|
|
232
|
+
protected updated(changed: PropertyValues): void;
|
|
209
233
|
protected render(): typeof nothing | import("lit").TemplateResult<1>;
|
|
210
234
|
}
|
|
211
235
|
declare global {
|
package/dist/elements/chat.d.ts
CHANGED
|
@@ -204,9 +204,9 @@ export declare class SinglebaseChat extends LitElement {
|
|
|
204
204
|
*/
|
|
205
205
|
accessor docsets: string | string[];
|
|
206
206
|
/**
|
|
207
|
-
* How attached files reach the service: `
|
|
208
|
-
*
|
|
209
|
-
*
|
|
207
|
+
* How attached files reach the service: `payload` (as `attachments`, which
|
|
208
|
+
* the service keeps on the chat for later turns) or `retrieval` (with this
|
|
209
|
+
* message only).
|
|
210
210
|
*/
|
|
211
211
|
accessor attachmentsMode: "retrieval" | "payload";
|
|
212
212
|
/** With attachments-mode="payload": keep attached files on the chat. */
|
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./authui-display-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./authui-display-C2o9gApg.cjs"),r=require("./uploader-C57vgFME.cjs"),s=require("@singlebase/core"),a=require("./files-4T62wkwj.cjs"),t=require("./chat-BWcGH9lr.cjs");exports.AuthController=e.AuthController;exports.SettingsController=e.SettingsController;Object.defineProperty(exports,"SinglebaseAccountScreen",{enumerable:!0,get:()=>e.SinglebaseAccountScreen});Object.defineProperty(exports,"SinglebaseAuthButtons",{enumerable:!0,get:()=>e.SinglebaseAuthButtons});Object.defineProperty(exports,"SinglebaseAuthDisplay",{enumerable:!0,get:()=>e.SinglebaseAuthDisplay});Object.defineProperty(exports,"SinglebaseAuthGuard",{enumerable:!0,get:()=>e.SinglebaseAuthGuard});Object.defineProperty(exports,"SinglebaseAuthScreen",{enumerable:!0,get:()=>e.SinglebaseAuthScreen});exports.defaultMessages=e.defaultMessages;exports.fullNameOf=e.fullNameOf;exports.initialsOf=e.initialsOf;exports.isGuestScreen=e.isGuestScreen;exports.isProtectedScreen=e.isProtectedScreen;exports.isScreen=e.isScreen;exports.resolveMessages=e.resolveMessages;Object.defineProperty(exports,"SinglebaseUploader",{enumerable:!0,get:()=>r.SinglebaseUploader});exports.inspectFile=r.inspectFile;exports.isInspectable=r.isInspectable;exports.resolveRedirectTarget=r.resolveRedirectTarget;Object.defineProperty(exports,"OPERATORS",{enumerable:!0,get:()=>s.OPERATORS});Object.defineProperty(exports,"matchesPredicate",{enumerable:!0,get:()=>s.matchesPredicate});Object.defineProperty(exports,"validatePredicate",{enumerable:!0,get:()=>s.validatePredicate});exports.TOKEN_DEFAULTS=a.TOKEN_DEFAULTS;exports.defaultUploadMessages=a.defaultUploadMessages;exports.resolveUploadMessages=a.resolveUploadMessages;Object.defineProperty(exports,"SinglebaseChat",{enumerable:!0,get:()=>t.SinglebaseChat});exports.adaptBlocks=t.adaptBlocks;exports.citedNumbers=t.citedNumbers;exports.defaultChatMessages=t.defaultChatMessages;exports.describeSource=t.describeSource;exports.parseInline=t.parseInline;exports.parseMarkdown=t.parseMarkdown;exports.resolveChatMessages=t.resolveChatMessages;exports.settleStreaming=t.settleStreaming;exports.splitFollowups=t.splitFollowups;exports.svgDataUrl=t.svgDataUrl;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { A as a, S as r, a as t, b as l, c as i, d as o, e as n, f as c, g as S, i as d, h as g, j as p, k as u, r as f } from "./authui-display-
|
|
2
|
-
import { S as h, i as m, a as A, r as M } from "./uploader-
|
|
1
|
+
import { A as a, S as r, a as t, b as l, c as i, d as o, e as n, f as c, g as S, i as d, h as g, j as p, k as u, r as f } from "./authui-display-CRUABt43.js";
|
|
2
|
+
import { S as h, i as m, a as A, r as M } from "./uploader-Cz9yfzfV.js";
|
|
3
3
|
import { OPERATORS as x, matchesPredicate as C, validatePredicate as O } from "@singlebase/core";
|
|
4
4
|
import { T as U, d as P, r as k } from "./files-DS-H-3yN.js";
|
|
5
|
-
import { S as E, a as F, c as N, d as R, b as w, p as B, e as G, r as I, s as j, f as y, g as K } from "./chat-
|
|
5
|
+
import { S as E, a as F, c as N, d as R, b as w, p as B, e as G, r as I, s as j, f as y, g as K } from "./chat-t4o5FsxM.js";
|
|
6
6
|
export {
|
|
7
7
|
a as AuthController,
|
|
8
8
|
x as OPERATORS,
|
package/dist/messages.d.ts
CHANGED
|
@@ -45,9 +45,16 @@ export interface SinglebaseAuthMessages {
|
|
|
45
45
|
passwordPlaceholder: string;
|
|
46
46
|
newPasswordLabel: string;
|
|
47
47
|
newPasswordPlaceholder: string;
|
|
48
|
+
newPasswordPlaceholderPlain: string;
|
|
49
|
+
passwordRulesLabel: string;
|
|
50
|
+
passwordRuleLength: string;
|
|
51
|
+
passwordRuleMinLength: string;
|
|
52
|
+
passwordRuleLowercase: string;
|
|
53
|
+
passwordRuleUppercase: string;
|
|
54
|
+
passwordRuleNumber: string;
|
|
55
|
+
passwordRuleSymbol: string;
|
|
48
56
|
confirmPasswordLabel: string;
|
|
49
57
|
confirmPasswordPlaceholder: string;
|
|
50
|
-
currentPasswordLabel: string;
|
|
51
58
|
firstNameLabel: string;
|
|
52
59
|
firstNamePlaceholder: string;
|
|
53
60
|
lastNameLabel: string;
|
|
@@ -63,7 +70,6 @@ export interface SinglebaseAuthMessages {
|
|
|
63
70
|
footActionSignUp: string;
|
|
64
71
|
resendQuestion: string;
|
|
65
72
|
resendCta: string;
|
|
66
|
-
oauthPrimaryLabel: string;
|
|
67
73
|
oauthContinueWith: string;
|
|
68
74
|
blockedTitleDisabled: string;
|
|
69
75
|
blockedTitleUnavailable: string;
|
|
@@ -115,10 +121,28 @@ export interface SinglebaseAuthMessages {
|
|
|
115
121
|
codeSentNeutral: string;
|
|
116
122
|
invalidEmailError: string;
|
|
117
123
|
requiredError: string;
|
|
118
|
-
|
|
124
|
+
passwordTooShortError: string;
|
|
125
|
+
passwordTooLongError: string;
|
|
126
|
+
passwordNeedsLowercaseError: string;
|
|
127
|
+
passwordNeedsUppercaseError: string;
|
|
128
|
+
passwordNeedsNumberError: string;
|
|
129
|
+
passwordNeedsSymbolError: string;
|
|
130
|
+
invalidPasswordMessage: string;
|
|
119
131
|
passwordMatchError: string;
|
|
132
|
+
invalidCodeError: string;
|
|
133
|
+
invalidCredentialsError: string;
|
|
134
|
+
codeResentNotice: string;
|
|
135
|
+
confirmNewPasswordLabel: string;
|
|
136
|
+
notSignedInNote: string;
|
|
137
|
+
connectProviderLabel: string;
|
|
138
|
+
digitLabel: string;
|
|
139
|
+
accountCreatedNotice: string;
|
|
140
|
+
inviteCodeLabel: string;
|
|
141
|
+
submittingStatus: string;
|
|
142
|
+
doneStatus: string;
|
|
120
143
|
codeIncompleteError: string;
|
|
121
144
|
invalidPhoneError: string;
|
|
145
|
+
firstNameRequiredError: string;
|
|
122
146
|
notYetSupported: string;
|
|
123
147
|
alreadySignedInTitle: string;
|
|
124
148
|
alreadySignedInSub: string;
|
|
@@ -140,6 +164,13 @@ export interface SinglebaseAuthMessages {
|
|
|
140
164
|
oauthCallbackTitle: string;
|
|
141
165
|
oauthCallbackSub: string;
|
|
142
166
|
oauthDenied: string;
|
|
167
|
+
oauthRetryMessage: string;
|
|
168
|
+
oauthUnavailableMessage: string;
|
|
169
|
+
oauthVerifiedEmailMessage: string;
|
|
170
|
+
providerConnectedNotice: string;
|
|
171
|
+
signInToLinkMessage: string;
|
|
172
|
+
providerAlreadyLinkedMessage: string;
|
|
173
|
+
oauthNoAccountMessage: string;
|
|
143
174
|
}
|
|
144
175
|
export declare const defaultMessages: SinglebaseAuthMessages;
|
|
145
176
|
export declare function resolveMessages(overrides?: Partial<SinglebaseAuthMessages>): SinglebaseAuthMessages;
|