@openviking/react 0.1.7 → 0.1.8-beta.11.1.gc6def608a25e
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/README.md +11 -1
- package/dist/1~0.js +57 -0
- package/dist/3~0.js +171 -5
- package/dist/5~0.js +181 -0
- package/dist/6~0.js +48 -0
- package/dist/ark-message-list-view~0.js +50 -8
- package/dist/components/agent-connect/style.css +4 -2
- package/dist/components/api-key-login-form/api-key-login-form.d.ts +2 -0
- package/dist/components/api-key-login-form/index.d.ts +3 -0
- package/dist/components/api-key-login-form/style.css +438 -0
- package/dist/components/api-key-login-form/style.js +0 -0
- package/dist/components/api-key-login-form/types.d.ts +7 -0
- package/dist/components/api-key-login-form.js +1 -0
- package/dist/components/directory-tour/directory-tour-intro.d.ts +3 -0
- package/dist/components/directory-tour/index.d.ts +2 -1
- package/dist/components/directory-tour/style.css +154 -26
- package/dist/components/directory-tour/tour-card.d.ts +14 -0
- package/dist/components/directory-tour/types.d.ts +24 -1
- package/dist/components/directory-tour/use-tour-anchor.d.ts +1 -0
- package/dist/components/directory-tour/use-tour-position.d.ts +4 -1
- package/dist/components/directory-tour/use-tour-theme.d.ts +2 -0
- package/dist/components/directory-tour.js +52 -1
- package/dist/components/email-login-form/email-login-form.d.ts +2 -0
- package/dist/components/email-login-form/index.d.ts +3 -0
- package/dist/components/email-login-form/style.css +438 -0
- package/dist/components/email-login-form/style.js +0 -0
- package/dist/components/email-login-form/types.d.ts +11 -0
- package/dist/components/email-login-form.js +1 -0
- package/dist/components/experience-dashboard/experience-impact.d.ts +3 -1
- package/dist/components/experience-dashboard/style.css +4 -2
- package/dist/components/file-browser-entries/style.css +12 -6
- package/dist/components/file-preview/file-preview-header.d.ts +4 -21
- package/dist/components/file-preview/file-preview-toolbar.d.ts +7 -0
- package/dist/components/file-preview/locales/en-US.d.ts +9 -0
- package/dist/components/file-preview/locales/zh-CN.d.ts +9 -0
- package/dist/components/file-preview/style.css +116 -2
- package/dist/components/file-preview/types.d.ts +14 -21
- package/dist/components/file-tree/style.css +4 -2
- package/dist/components/invitation-confirmation/index.d.ts +3 -0
- package/dist/components/invitation-confirmation/invitation-confirmation.d.ts +2 -0
- package/dist/components/invitation-confirmation/style.css +438 -0
- package/dist/components/invitation-confirmation/style.js +0 -0
- package/dist/components/invitation-confirmation/types.d.ts +20 -0
- package/dist/components/invitation-confirmation.js +1 -0
- package/dist/components/login-method-selector/index.d.ts +2 -0
- package/dist/components/login-method-selector/login-method-selector.d.ts +2 -0
- package/dist/components/login-method-selector/style.css +438 -0
- package/dist/components/login-method-selector/style.js +0 -0
- package/dist/components/login-method-selector/types.d.ts +14 -0
- package/dist/components/login-method-selector.js +1 -0
- package/dist/components/password-reset-request-form/index.d.ts +3 -0
- package/dist/components/password-reset-request-form/password-reset-request-form.d.ts +2 -0
- package/dist/components/password-reset-request-form/style.css +438 -0
- package/dist/components/password-reset-request-form/style.js +0 -0
- package/dist/components/password-reset-request-form/types.d.ts +13 -0
- package/dist/components/password-reset-request-form.js +1 -0
- package/dist/components/password-setup-form/index.d.ts +3 -0
- package/dist/components/password-setup-form/password-setup-form.d.ts +2 -0
- package/dist/components/password-setup-form/style.css +438 -0
- package/dist/components/password-setup-form/style.js +0 -0
- package/dist/components/password-setup-form/types.d.ts +10 -0
- package/dist/components/password-setup-form.js +1 -0
- package/dist/components/scope-switcher/style.css +4 -2
- package/dist/components/scope-switcher.js +1 -1
- package/dist/components/style.css +3120 -79
- package/dist/components/tui/style.css +8 -4
- package/dist/components/viking-bot/bot-popover.d.ts +2 -1
- package/dist/components/viking-bot/composer-reference-tags.d.ts +8 -0
- package/dist/components/viking-bot/composer-references.d.ts +0 -5
- package/dist/components/viking-bot/locales/en-US.d.ts +1 -0
- package/dist/components/viking-bot/locales/zh-CN.d.ts +1 -0
- package/dist/components/viking-bot/model.d.ts +1 -0
- package/dist/components/viking-bot/popover-tab-navigation.d.ts +3 -0
- package/dist/components/viking-bot/style.css +166 -27
- package/dist/components/viking-bot/types.d.ts +3 -1
- package/dist/components/viking-bot/user-message-group.d.ts +9 -0
- package/dist/components/wiki-dashboard/index.d.ts +1 -1
- package/dist/components/wiki-dashboard/style.css +16 -4
- package/dist/components/wiki-dashboard/types.d.ts +12 -16
- package/dist/components/wiki-dashboard/wiki-action-button.d.ts +2 -9
- package/dist/components/wiki-dashboard/wiki-conflict-card.d.ts +3 -10
- package/dist/c~0.js +77 -6
- package/dist/d~0.js +28 -0
- package/dist/ep~0.js +281 -133
- package/dist/fi~0.js +339 -0
- package/dist/fj~0.js +32 -67
- package/dist/fl~0.js +3 -2
- package/dist/f~0.js +63 -326
- package/dist/g~0.js +135 -0
- package/dist/icons/index.d.ts +2 -0
- package/dist/icons/viking-bot-icons.d.ts +1 -1
- package/dist/icons.js +1 -1
- package/dist/index.d.ts +12 -0
- package/dist/index.js +8 -2
- package/dist/k~0.js +44 -4
- package/dist/l5~0.js +3813 -0
- package/dist/lg~0.js +41 -1
- package/dist/lk~0.js +1 -1
- package/dist/l~0.js +54 -3811
- package/dist/modules/console/style.css +182 -35
- package/dist/modules/file-browser/file-browser-detail-icons.d.ts +0 -6
- package/dist/modules/file-browser/file-browser-detail.d.ts +2 -23
- package/dist/modules/file-browser/file-browser.d.ts +1 -1
- package/dist/modules/file-browser/fs-file-editing.d.ts +4 -0
- package/dist/modules/file-browser/fs-preview-images.d.ts +3 -0
- package/dist/modules/file-browser/fs-read-file.d.ts +1 -1
- package/dist/modules/file-browser/style.css +156 -70
- package/dist/modules/file-browser/types.d.ts +2 -0
- package/dist/modules/file-browser/use-file-browser-acl.d.ts +1 -0
- package/dist/modules/file-browser/wiki-dashboard-pane.d.ts +2 -4
- package/dist/modules/file-browser.js +1 -1
- package/dist/modules/scope-cascade/style.css +4 -2
- package/dist/modules/style.css +346 -109
- package/dist/n~0.js +1 -1
- package/dist/p0~0.js +27 -0
- package/dist/p~0.js +34 -25
- package/dist/shared/auth/agreements.d.ts +10 -0
- package/dist/shared/auth/fields.d.ts +15 -0
- package/dist/shared/auth/form-frame.d.ts +12 -0
- package/dist/shared/auth/locales/en-US.d.ts +24 -0
- package/dist/shared/auth/locales/zh-CN.d.ts +24 -0
- package/dist/shared/auth/types.d.ts +61 -0
- package/dist/shared/auth/use-auth-labels.d.ts +3 -0
- package/dist/shared/auth/use-form.d.ts +8 -0
- package/dist/style.css +3690 -410
- package/dist/viking-bot-composer~0.js +86 -29
- package/package.json +32 -2
package/dist/n~0.js
CHANGED
|
@@ -4,7 +4,7 @@ import { resolveLocale, mergeLabels } from "./nx~0.js";
|
|
|
4
4
|
import { FolderOpenIcon, FolderIcon, ChevronRightIcon, DocumentIcon } from "./k~0.js";
|
|
5
5
|
import { Popover } from "./r~0.js";
|
|
6
6
|
import { button_Button } from "./e~0.js";
|
|
7
|
-
import { searchreact } from "./
|
|
7
|
+
import { searchreact } from "./p0~0.js";
|
|
8
8
|
import { Tooltip } from "./rt~0.js";
|
|
9
9
|
import { useLocale } from "./28~0.js";
|
|
10
10
|
const messages = {
|
package/dist/p0~0.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
const SvgSearch = (props)=>/*#__PURE__*/ jsx("svg", {
|
|
4
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
5
|
+
width: 16,
|
|
6
|
+
height: 16,
|
|
7
|
+
fill: "none",
|
|
8
|
+
viewBox: "0 0 16 16",
|
|
9
|
+
...props,
|
|
10
|
+
children: /*#__PURE__*/ jsxs("g", {
|
|
11
|
+
stroke: "currentColor",
|
|
12
|
+
strokeWidth: 1.2,
|
|
13
|
+
children: [
|
|
14
|
+
/*#__PURE__*/ jsx("circle", {
|
|
15
|
+
cx: 7.167,
|
|
16
|
+
cy: 7.167,
|
|
17
|
+
r: 4.667
|
|
18
|
+
}),
|
|
19
|
+
/*#__PURE__*/ jsx("path", {
|
|
20
|
+
strokeLinecap: "round",
|
|
21
|
+
d: "m10.667 10.667 3 3"
|
|
22
|
+
})
|
|
23
|
+
]
|
|
24
|
+
})
|
|
25
|
+
});
|
|
26
|
+
const searchreact = SvgSearch;
|
|
27
|
+
export { searchreact };
|
package/dist/p~0.js
CHANGED
|
@@ -1,27 +1,36 @@
|
|
|
1
|
-
import { jsx
|
|
2
|
-
import "react";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useId } from "react";
|
|
3
|
+
import { useAuthLabels, Field } from "./g~0.js";
|
|
4
|
+
import { useForm, FormFrame } from "./5~0.js";
|
|
5
|
+
function ApiKeyLoginForm({ alternateLogin, onSubmit, locale, labels: overrides, ...options }) {
|
|
6
|
+
const id = useId();
|
|
7
|
+
const labels = useAuthLabels(locale, overrides);
|
|
8
|
+
const form = useForm({
|
|
9
|
+
apiKey: ''
|
|
10
|
+
}, ({ apiKey })=>({
|
|
11
|
+
apiKey: apiKey.trim() ? void 0 : {
|
|
12
|
+
key: 'required'
|
|
13
|
+
}
|
|
14
|
+
}));
|
|
15
|
+
return /*#__PURE__*/ jsx(FormFrame, {
|
|
16
|
+
...options,
|
|
17
|
+
labels: labels,
|
|
18
|
+
submitLabel: labels.login,
|
|
19
|
+
validate: form.validate,
|
|
20
|
+
secondaryAction: alternateLogin,
|
|
21
|
+
onSubmit: ()=>onSubmit?.({
|
|
22
|
+
apiKey: form.values.apiKey
|
|
23
|
+
}),
|
|
24
|
+
children: /*#__PURE__*/ jsx(Field, {
|
|
25
|
+
id: `${id}-key`,
|
|
26
|
+
label: labels.apiKey,
|
|
27
|
+
labels: labels,
|
|
28
|
+
value: form.values.apiKey,
|
|
29
|
+
secret: true,
|
|
30
|
+
autoComplete: "off",
|
|
31
|
+
error: form.errors.apiKey,
|
|
32
|
+
onChange: (value)=>form.update('apiKey', value)
|
|
24
33
|
})
|
|
25
34
|
});
|
|
26
|
-
|
|
27
|
-
export {
|
|
35
|
+
}
|
|
36
|
+
export { ApiKeyLoginForm };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { AuthAgreements, AuthLabels } from './types.js';
|
|
2
|
+
export declare function AgreementLinks({ agreements }: {
|
|
3
|
+
agreements: AuthAgreements;
|
|
4
|
+
}): import("react").JSX.Element;
|
|
5
|
+
export declare function AgreementDialog({ agreements, labels, onCancel, onAgree, }: {
|
|
6
|
+
agreements: AuthAgreements;
|
|
7
|
+
labels: AuthLabels;
|
|
8
|
+
onCancel: () => void;
|
|
9
|
+
onAgree: () => void;
|
|
10
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { InputHTMLAttributes } from 'react';
|
|
2
|
+
import type { AuthAction, AuthIssue, AuthLabels } from './types.js';
|
|
3
|
+
export declare function Action({ action }: {
|
|
4
|
+
action?: AuthAction;
|
|
5
|
+
}): import("react").JSX.Element | null;
|
|
6
|
+
interface FieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'onChange'> {
|
|
7
|
+
label: string;
|
|
8
|
+
error?: AuthIssue;
|
|
9
|
+
secret?: boolean;
|
|
10
|
+
labels: AuthLabels;
|
|
11
|
+
action?: AuthAction;
|
|
12
|
+
onChange: (value: string) => void;
|
|
13
|
+
}
|
|
14
|
+
export declare function Field({ label, error, secret, labels, action, onChange, id, ...input }: FieldProps): import("react").JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { AuthAction, AuthFormOptions, AuthLabels } from './types.js';
|
|
3
|
+
interface Props extends AuthFormOptions {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
labels: AuthLabels;
|
|
6
|
+
submitLabel: string;
|
|
7
|
+
validate: () => boolean;
|
|
8
|
+
onSubmit: () => void;
|
|
9
|
+
secondaryAction?: AuthAction;
|
|
10
|
+
}
|
|
11
|
+
export declare function FormFrame({ children, labels, submitLabel, validate, onSubmit, secondaryAction, ...options }: Props): import("react").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
declare const messages: {
|
|
2
|
+
email: string;
|
|
3
|
+
password: string;
|
|
4
|
+
apiKey: string;
|
|
5
|
+
newPassword: string;
|
|
6
|
+
confirmation: string;
|
|
7
|
+
showPassword: string;
|
|
8
|
+
hidePassword: string;
|
|
9
|
+
required: string;
|
|
10
|
+
invalidEmail: string;
|
|
11
|
+
mismatch: string;
|
|
12
|
+
login: string;
|
|
13
|
+
send: string;
|
|
14
|
+
resend: string;
|
|
15
|
+
confirm: string;
|
|
16
|
+
agreementPrefix: string;
|
|
17
|
+
agreementTitle: string;
|
|
18
|
+
agreementDescription: string;
|
|
19
|
+
agree: string;
|
|
20
|
+
cancel: string;
|
|
21
|
+
account: string;
|
|
22
|
+
acceptInvitation: string;
|
|
23
|
+
};
|
|
24
|
+
export default messages;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
declare const messages: {
|
|
2
|
+
email: string;
|
|
3
|
+
password: string;
|
|
4
|
+
apiKey: string;
|
|
5
|
+
newPassword: string;
|
|
6
|
+
confirmation: string;
|
|
7
|
+
showPassword: string;
|
|
8
|
+
hidePassword: string;
|
|
9
|
+
required: string;
|
|
10
|
+
invalidEmail: string;
|
|
11
|
+
mismatch: string;
|
|
12
|
+
login: string;
|
|
13
|
+
send: string;
|
|
14
|
+
resend: string;
|
|
15
|
+
confirm: string;
|
|
16
|
+
agreementPrefix: string;
|
|
17
|
+
agreementTitle: string;
|
|
18
|
+
agreementDescription: string;
|
|
19
|
+
agree: string;
|
|
20
|
+
cancel: string;
|
|
21
|
+
account: string;
|
|
22
|
+
acceptInvitation: string;
|
|
23
|
+
};
|
|
24
|
+
export default messages;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { Locale } from '../locale.js';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
export interface AuthAction {
|
|
4
|
+
label: string;
|
|
5
|
+
onClick?: () => void;
|
|
6
|
+
}
|
|
7
|
+
export interface AuthAgreements {
|
|
8
|
+
items: readonly {
|
|
9
|
+
label: string;
|
|
10
|
+
href: string;
|
|
11
|
+
}[];
|
|
12
|
+
confirmation?: {
|
|
13
|
+
title?: string;
|
|
14
|
+
description?: string;
|
|
15
|
+
confirmText?: string;
|
|
16
|
+
cancelText?: string;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export interface AuthLabels {
|
|
20
|
+
email: string;
|
|
21
|
+
password: string;
|
|
22
|
+
apiKey: string;
|
|
23
|
+
newPassword: string;
|
|
24
|
+
confirmation: string;
|
|
25
|
+
showPassword: string;
|
|
26
|
+
hidePassword: string;
|
|
27
|
+
required: string;
|
|
28
|
+
invalidEmail: string;
|
|
29
|
+
mismatch: string;
|
|
30
|
+
login: string;
|
|
31
|
+
send: string;
|
|
32
|
+
resend: string;
|
|
33
|
+
confirm: string;
|
|
34
|
+
agreementPrefix: string;
|
|
35
|
+
agreementTitle: string;
|
|
36
|
+
agreementDescription: string;
|
|
37
|
+
agree: string;
|
|
38
|
+
cancel: string;
|
|
39
|
+
account: string;
|
|
40
|
+
}
|
|
41
|
+
export interface AuthFormOptions {
|
|
42
|
+
loading?: boolean;
|
|
43
|
+
error?: ReactNode;
|
|
44
|
+
disabled?: boolean;
|
|
45
|
+
agreements?: AuthAgreements;
|
|
46
|
+
back?: AuthAction;
|
|
47
|
+
className?: string;
|
|
48
|
+
title?: ReactNode;
|
|
49
|
+
description?: ReactNode;
|
|
50
|
+
locale?: Locale;
|
|
51
|
+
labels?: Partial<AuthLabels>;
|
|
52
|
+
}
|
|
53
|
+
export interface AuthMessages extends AuthLabels {
|
|
54
|
+
acceptInvitation: string;
|
|
55
|
+
}
|
|
56
|
+
/** Store a validation issue independently of its localized display text. */
|
|
57
|
+
export type AuthIssue = {
|
|
58
|
+
key: 'required' | 'invalidEmail' | 'mismatch';
|
|
59
|
+
} | {
|
|
60
|
+
message: string;
|
|
61
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { AuthIssue } from './types.js';
|
|
2
|
+
export declare function useForm<T extends Record<string, string>>(initial: T, validate: (values: T) => Partial<Record<keyof T, AuthIssue>>): {
|
|
3
|
+
values: T;
|
|
4
|
+
errors: Partial<Record<keyof T, AuthIssue>>;
|
|
5
|
+
update: (key: keyof T, value: string) => void;
|
|
6
|
+
validate: () => boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare const validEmail: (value: string) => boolean;
|