@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
|
@@ -8,6 +8,7 @@ import { resolveVikingBotLabels, BotPopover, useQuickInput, QuickInputs } from "
|
|
|
8
8
|
import { usePortalTheme } from "./9~0.js";
|
|
9
9
|
import { input_Input } from "./c7r~0.js";
|
|
10
10
|
import { FileTree as file_tree_FileTree } from "./n~0.js";
|
|
11
|
+
import { getFileTypeColor, getFileTypeIcon, resolveFileTypeIconKey } from "./k~0.js";
|
|
11
12
|
import { useLocale } from "./28~0.js";
|
|
12
13
|
const SvgSend = (props)=>/*#__PURE__*/ jsx("svg", {
|
|
13
14
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -307,34 +308,92 @@ function ReferenceButton({ locale, config, disabled, labels, senderRef }) {
|
|
|
307
308
|
})
|
|
308
309
|
}, disabled ? 'disabled' : 'enabled');
|
|
309
310
|
}
|
|
310
|
-
|
|
311
|
+
const VISIBLE_LIMIT = 5;
|
|
312
|
+
function ReferenceTag({ item, labels, disabled, onRemove, onOpenUri }) {
|
|
313
|
+
const FileIcon = getFileTypeIcon(item.name);
|
|
314
|
+
const iconKey = resolveFileTypeIconKey(item.name);
|
|
315
|
+
const path = /*#__PURE__*/ jsx("span", {
|
|
316
|
+
className: "ov-viking-bot__reference-path",
|
|
317
|
+
title: item.uri,
|
|
318
|
+
children: item.uri
|
|
319
|
+
});
|
|
320
|
+
return /*#__PURE__*/ jsxs("span", {
|
|
321
|
+
className: "ov-viking-bot__reference-tag",
|
|
322
|
+
children: [
|
|
323
|
+
'directory' === item.type ? /*#__PURE__*/ jsx(VikingBotIcon, {
|
|
324
|
+
name: "contextFolder",
|
|
325
|
+
width: 14,
|
|
326
|
+
height: 14
|
|
327
|
+
}) : /*#__PURE__*/ jsx(FileIcon, {
|
|
328
|
+
className: "ov-viking-bot__reference-icon",
|
|
329
|
+
width: 14,
|
|
330
|
+
height: 14,
|
|
331
|
+
"aria-hidden": "true",
|
|
332
|
+
focusable: "false",
|
|
333
|
+
style: {
|
|
334
|
+
'--ov-ui-viking-bot-reference-icon-light': getFileTypeColor(iconKey),
|
|
335
|
+
'--ov-ui-viking-bot-reference-icon-dark': getFileTypeColor(iconKey, 'dark')
|
|
336
|
+
}
|
|
337
|
+
}),
|
|
338
|
+
onOpenUri ? /*#__PURE__*/ jsx("button", {
|
|
339
|
+
type: "button",
|
|
340
|
+
className: "ov-viking-bot__reference-open",
|
|
341
|
+
"aria-label": labels.openReference.replace('{uri}', item.uri),
|
|
342
|
+
onClick: ()=>onOpenUri(item.uri),
|
|
343
|
+
children: path
|
|
344
|
+
}) : path,
|
|
345
|
+
/*#__PURE__*/ jsx("button", {
|
|
346
|
+
type: "button",
|
|
347
|
+
className: "ov-viking-bot__reference-remove",
|
|
348
|
+
disabled: disabled,
|
|
349
|
+
"aria-label": `${labels.removeReference}: ${item.uri}`,
|
|
350
|
+
onClick: onRemove,
|
|
351
|
+
children: /*#__PURE__*/ jsx(VikingBotIcon, {
|
|
352
|
+
name: "contextClose",
|
|
353
|
+
width: 14,
|
|
354
|
+
height: 14
|
|
355
|
+
})
|
|
356
|
+
})
|
|
357
|
+
]
|
|
358
|
+
});
|
|
359
|
+
}
|
|
360
|
+
function ReferenceTags({ config, labels, disabled, onOpenUri }) {
|
|
311
361
|
if (!config?.selected.length) return null;
|
|
312
|
-
|
|
362
|
+
const items = config.selected;
|
|
363
|
+
const remaining = items.slice(VISIBLE_LIMIT);
|
|
364
|
+
const renderTag = (item, index)=>/*#__PURE__*/ jsx(ReferenceTag, {
|
|
365
|
+
item: item,
|
|
366
|
+
labels: labels,
|
|
367
|
+
disabled: disabled,
|
|
368
|
+
onOpenUri: onOpenUri,
|
|
369
|
+
onRemove: ()=>config.onChange(items.filter((_, position)=>position !== index))
|
|
370
|
+
}, `${item.uri}:${index}`);
|
|
371
|
+
return /*#__PURE__*/ jsx("div", {
|
|
313
372
|
className: "ov-viking-bot__reference-tags",
|
|
314
|
-
children:
|
|
373
|
+
children: items.slice(0, VISIBLE_LIMIT).map((item, index)=>/*#__PURE__*/ jsxs("div", {
|
|
374
|
+
className: "ov-viking-bot__reference-row",
|
|
315
375
|
children: [
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
children:
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
})
|
|
376
|
+
renderTag(item, index),
|
|
377
|
+
index === VISIBLE_LIMIT - 1 && remaining.length > 0 ? /*#__PURE__*/ jsx(BotPopover, {
|
|
378
|
+
label: labels.reference,
|
|
379
|
+
placement: "top",
|
|
380
|
+
hover: true,
|
|
381
|
+
trigger: (props)=>/*#__PURE__*/ jsxs("button", {
|
|
382
|
+
...props,
|
|
383
|
+
type: "button",
|
|
384
|
+
className: "ov-viking-bot__reference-more",
|
|
385
|
+
children: [
|
|
386
|
+
"+",
|
|
387
|
+
remaining.length
|
|
388
|
+
]
|
|
389
|
+
}),
|
|
390
|
+
children: ()=>/*#__PURE__*/ jsx("div", {
|
|
391
|
+
className: "ov-viking-bot__reference-overflow",
|
|
392
|
+
children: remaining.map((entry, position)=>renderTag(entry, position + VISIBLE_LIMIT))
|
|
393
|
+
})
|
|
394
|
+
}) : null
|
|
336
395
|
]
|
|
337
|
-
}, item.uri))
|
|
396
|
+
}, `${item.uri}:${index}`))
|
|
338
397
|
});
|
|
339
398
|
}
|
|
340
399
|
function ComposerFooter({ locale, references, senderRef, labels, disabled, filesDisabled, accept, onFiles, actions, submit }) {
|
|
@@ -393,7 +452,7 @@ function composerCaret(sender) {
|
|
|
393
452
|
const { doc, selection } = editor.state;
|
|
394
453
|
return doc.textBetween(0, selection.from, '\n', '\n').length;
|
|
395
454
|
}
|
|
396
|
-
const viking_bot_composer_VikingBotComposerView = /*#__PURE__*/ forwardRef(function({ value, locale: localeProp, className, attachments = [], disabled, disabledReason, isSending, variant = 'default', accept, maxAttachments = 10, actions, quickInputs, onQuickInputSelect, references, onValueChange, onFilesAdded, onAttachmentRemove, onSend, onCancel, labels: overrides }, ref) {
|
|
455
|
+
const viking_bot_composer_VikingBotComposerView = /*#__PURE__*/ forwardRef(function({ value, locale: localeProp, className, attachments = [], disabled, disabledReason, isSending, variant = 'default', accept, maxAttachments = 10, actions, quickInputs, onQuickInputSelect, references, onValueChange, onFilesAdded, onAttachmentRemove, onOpenUri, onSend, onCancel, labels: overrides }, ref) {
|
|
397
456
|
const locale = useLocale(localeProp);
|
|
398
457
|
const labels = resolveVikingBotLabels(locale, overrides);
|
|
399
458
|
const senderRef = useRef(null);
|
|
@@ -417,11 +476,8 @@ const viking_bot_composer_VikingBotComposerView = /*#__PURE__*/ forwardRef(funct
|
|
|
417
476
|
value
|
|
418
477
|
]);
|
|
419
478
|
const reportFiles = useCallback((files)=>{
|
|
420
|
-
if (
|
|
421
|
-
const accepted = files.slice(0, remaining);
|
|
422
|
-
if (accepted.length) onFilesAdded(accepted);
|
|
479
|
+
if (files.length && remaining) onFilesAdded?.(files.slice(0, remaining));
|
|
423
480
|
}, [
|
|
424
|
-
limitReached,
|
|
425
481
|
onFilesAdded,
|
|
426
482
|
remaining
|
|
427
483
|
]);
|
|
@@ -498,6 +554,7 @@ const viking_bot_composer_VikingBotComposerView = /*#__PURE__*/ forwardRef(funct
|
|
|
498
554
|
/*#__PURE__*/ jsx(ReferenceTags, {
|
|
499
555
|
config: references,
|
|
500
556
|
labels: labels,
|
|
557
|
+
onOpenUri: onOpenUri,
|
|
501
558
|
disabled: disabled || isSending
|
|
502
559
|
}),
|
|
503
560
|
/*#__PURE__*/ jsx(ComposerAttachments, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openviking/react",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8-beta.11.1.gc6def608a25e",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -107,7 +107,37 @@
|
|
|
107
107
|
"types": "./dist/components/experience-dashboard/index.d.ts",
|
|
108
108
|
"import": "./dist/components/experience-dashboard.js"
|
|
109
109
|
},
|
|
110
|
-
"./components/experience-dashboard/style.css": "./dist/components/experience-dashboard/style.css"
|
|
110
|
+
"./components/experience-dashboard/style.css": "./dist/components/experience-dashboard/style.css",
|
|
111
|
+
"./components/email-login-form": {
|
|
112
|
+
"types": "./dist/components/email-login-form/index.d.ts",
|
|
113
|
+
"import": "./dist/components/email-login-form.js"
|
|
114
|
+
},
|
|
115
|
+
"./components/email-login-form/style.css": "./dist/components/email-login-form/style.css",
|
|
116
|
+
"./components/api-key-login-form": {
|
|
117
|
+
"types": "./dist/components/api-key-login-form/index.d.ts",
|
|
118
|
+
"import": "./dist/components/api-key-login-form.js"
|
|
119
|
+
},
|
|
120
|
+
"./components/api-key-login-form/style.css": "./dist/components/api-key-login-form/style.css",
|
|
121
|
+
"./components/password-reset-request-form": {
|
|
122
|
+
"types": "./dist/components/password-reset-request-form/index.d.ts",
|
|
123
|
+
"import": "./dist/components/password-reset-request-form.js"
|
|
124
|
+
},
|
|
125
|
+
"./components/password-reset-request-form/style.css": "./dist/components/password-reset-request-form/style.css",
|
|
126
|
+
"./components/password-setup-form": {
|
|
127
|
+
"types": "./dist/components/password-setup-form/index.d.ts",
|
|
128
|
+
"import": "./dist/components/password-setup-form.js"
|
|
129
|
+
},
|
|
130
|
+
"./components/password-setup-form/style.css": "./dist/components/password-setup-form/style.css",
|
|
131
|
+
"./components/login-method-selector": {
|
|
132
|
+
"types": "./dist/components/login-method-selector/index.d.ts",
|
|
133
|
+
"import": "./dist/components/login-method-selector.js"
|
|
134
|
+
},
|
|
135
|
+
"./components/login-method-selector/style.css": "./dist/components/login-method-selector/style.css",
|
|
136
|
+
"./components/invitation-confirmation": {
|
|
137
|
+
"types": "./dist/components/invitation-confirmation/index.d.ts",
|
|
138
|
+
"import": "./dist/components/invitation-confirmation.js"
|
|
139
|
+
},
|
|
140
|
+
"./components/invitation-confirmation/style.css": "./dist/components/invitation-confirmation/style.css"
|
|
111
141
|
},
|
|
112
142
|
"scripts": {
|
|
113
143
|
"dev": "rslib build --watch",
|