@openviking/react 0.1.4 → 0.1.5
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 +3 -1
- package/dist/28~0.js +15 -0
- package/dist/2~0.js +6 -3
- package/dist/3c~0.js +3 -1
- package/dist/3~0.js +3 -1
- package/dist/ae~0.js +6 -2
- package/dist/a~0.js +77 -70
- package/dist/client/provider.d.ts +10 -6
- package/dist/components/agent-connect/agent-connect-code-block.d.ts +14 -0
- package/dist/components/agent-connect/agent-connect-copy.d.ts +3 -0
- package/dist/components/agent-connect/agent-connect-design.d.ts +1 -1
- package/dist/components/agent-connect/agent-connect-installer.d.ts +1 -0
- package/dist/components/agent-connect/agent-connect-instructions-view.d.ts +4 -6
- package/dist/components/agent-connect/agent-connect-instructions.d.ts +13 -0
- package/dist/components/agent-connect/agent-connect-markdown.d.ts +8 -2
- package/dist/components/agent-connect/agent-connect-mask.d.ts +10 -0
- package/dist/components/agent-connect/agent-connect.d.ts +1 -1
- package/dist/components/agent-connect/locales/en-US.d.ts +3 -0
- package/dist/components/agent-connect/style.css +115 -1
- package/dist/components/agent-connect/types.d.ts +5 -3
- package/dist/components/agent-connect/use-agent-connect-copy.d.ts +6 -0
- package/dist/components/directory-tour/types.d.ts +2 -1
- package/dist/components/file-browser-entries/file-browser-entries.d.ts +1 -1
- package/dist/components/file-browser-entries/style.css +115 -1
- package/dist/components/file-browser-entries/types.d.ts +2 -2
- package/dist/components/file-preview/types.d.ts +2 -2
- package/dist/components/file-tree/types.d.ts +2 -2
- package/dist/components/scope-switcher/scope-switcher.d.ts +2 -2
- package/dist/components/scope-switcher/types.d.ts +5 -5
- package/dist/components/style.css +230 -2
- package/dist/components/tui/tui.d.ts +1 -1
- package/dist/components/tui/types.d.ts +2 -2
- package/dist/components/viking-bot/ark-message-list-view.d.ts +4 -1
- package/dist/components/viking-bot/interaction/types.d.ts +2 -2
- package/dist/components/viking-bot/interaction/viking-bot-interaction.d.ts +1 -1
- package/dist/components/viking-bot/session-actions.d.ts +2 -2
- package/dist/components/viking-bot/types.d.ts +7 -7
- package/dist/components/viking-bot/viking-bot.d.ts +1 -1
- package/dist/c~0.js +168 -154
- package/dist/e~0.js +3 -1
- package/dist/f~0.js +13 -7
- package/dist/lk~0.js +4 -1
- package/dist/l~0.js +77 -71
- package/dist/modules/console/console.d.ts +1 -1
- package/dist/modules/console/types.d.ts +2 -2
- package/dist/modules/console/use-console.d.ts +1 -1
- package/dist/modules/file-browser/file-browser.d.ts +1 -1
- package/dist/modules/file-browser/style.css +115 -1
- package/dist/modules/file-browser/types.d.ts +2 -2
- package/dist/modules/file-browser/use-file-browser.d.ts +3 -3
- package/dist/modules/scope-cascade/scope-cascade.d.ts +2 -2
- package/dist/modules/scope-cascade/types.d.ts +2 -2
- package/dist/modules/style.css +115 -1
- package/dist/n~0.js +3 -1
- package/dist/shared/locale-context.d.ts +8 -0
- package/dist/style.css +345 -3
- package/dist/u~0.js +324 -96
- package/dist/viking-bot-composer~0.js +3 -1
- package/dist/viking-bot-interaction~0.js +3 -1
- package/package.json +3 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { ConsoleOptions, ConsoleResult } from './types.js';
|
|
2
2
|
/** Native command execution and draft orchestration, with or without Console. */
|
|
3
|
-
export declare function useConsole({ mode: controlledMode, defaultMode, locale, scopeKey, onModeChange, requestOptions, }?: ConsoleOptions): ConsoleResult;
|
|
3
|
+
export declare function useConsole({ mode: controlledMode, defaultMode, locale: localeProp, scopeKey, onModeChange, requestOptions, }?: ConsoleOptions): ConsoleResult;
|
|
@@ -12,4 +12,4 @@ export type { FileBrowserActions, FileBrowserApi, FileBrowserLabels, FileBrowser
|
|
|
12
12
|
* tree; loading and coordination live in {@link useFileBrowser}, and this only
|
|
13
13
|
* assembles the view.
|
|
14
14
|
*/
|
|
15
|
-
export declare function FileBrowser({ uri, defaultUri, rootUri, defaultExpandedUri, locale, agentConnect, onUriChange, onImportResources, renderImportResources, labels, requestOptions, className, style, ...rest }: FileBrowserProps): import("react").JSX.Element;
|
|
15
|
+
export declare function FileBrowser({ uri, defaultUri, rootUri, defaultExpandedUri, locale: localeProp, agentConnect, onUriChange, onImportResources, renderImportResources, labels, requestOptions, className, style, ...rest }: FileBrowserProps): import("react").JSX.Element;
|
|
@@ -598,6 +598,93 @@
|
|
|
598
598
|
--ov-ui-connect-notice-default: var(--ov-ui-text-2-default);
|
|
599
599
|
}
|
|
600
600
|
|
|
601
|
+
.ov-agent-connect__code-block {
|
|
602
|
+
border: 1px solid var(--ov-ui-agent-connect-border);
|
|
603
|
+
background: var(--ov-ui-agent-connect-bg);
|
|
604
|
+
white-space: normal;
|
|
605
|
+
border-radius: 8px;
|
|
606
|
+
margin-bottom: 12px;
|
|
607
|
+
overflow: hidden;
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
.ov-agent-connect__code-block:last-child {
|
|
611
|
+
margin-bottom: 0;
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
.ov-agent-connect__code-header {
|
|
615
|
+
border-bottom: 1px solid var(--ov-ui-agent-connect-border);
|
|
616
|
+
color: var(--ov-ui-agent-connect-muted);
|
|
617
|
+
justify-content: space-between;
|
|
618
|
+
align-items: center;
|
|
619
|
+
gap: 8px;
|
|
620
|
+
padding: 6px 12px;
|
|
621
|
+
font-size: 12px;
|
|
622
|
+
display: flex;
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
.ov-agent-connect__code-actions {
|
|
626
|
+
align-items: center;
|
|
627
|
+
gap: 12px;
|
|
628
|
+
display: flex;
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
.ov-agent-connect__code-actions button {
|
|
632
|
+
width: 24px;
|
|
633
|
+
height: 24px;
|
|
634
|
+
color: var(--ov-ui-agent-connect-secondary);
|
|
635
|
+
background: none;
|
|
636
|
+
border: 0;
|
|
637
|
+
border-radius: 4px;
|
|
638
|
+
justify-content: center;
|
|
639
|
+
align-items: center;
|
|
640
|
+
padding: 4px;
|
|
641
|
+
font-size: 12px;
|
|
642
|
+
display: inline-flex;
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
.ov-agent-connect__code-actions button:hover {
|
|
646
|
+
color: var(--ov-ui-agent-connect-primary);
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
.ov-agent-connect__code-actions button:disabled {
|
|
650
|
+
opacity: .6;
|
|
651
|
+
cursor: wait;
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
.ov-agent-connect__code-actions svg {
|
|
655
|
+
width: 16px;
|
|
656
|
+
height: 16px;
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
.ov-agent-connect .ov-agent-connect__code-block pre {
|
|
660
|
+
white-space: pre-wrap;
|
|
661
|
+
overflow-wrap: anywhere;
|
|
662
|
+
background: none;
|
|
663
|
+
border-radius: 0;
|
|
664
|
+
margin: 0;
|
|
665
|
+
padding: 12px;
|
|
666
|
+
font-size: 12px;
|
|
667
|
+
line-height: 20px;
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
.ov-agent-connect__code-block code {
|
|
671
|
+
font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
.ov-agent-connect__code-block > .ov-agent-connect__feedback:not(:empty) {
|
|
675
|
+
padding: 0 12px 8px;
|
|
676
|
+
display: block;
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
.ov-agent-connect__code-feedback {
|
|
680
|
+
clip-path: inset(50%);
|
|
681
|
+
white-space: nowrap;
|
|
682
|
+
width: 1px;
|
|
683
|
+
height: 1px;
|
|
684
|
+
position: absolute;
|
|
685
|
+
overflow: hidden;
|
|
686
|
+
}
|
|
687
|
+
|
|
601
688
|
.ov-agent-connect {
|
|
602
689
|
--ov-ui-agent-connect-text: var(--ov-ui-color-text-1, var(--ov-ui-text-1-default));
|
|
603
690
|
--ov-ui-agent-connect-secondary: var(--ov-ui-color-text-2, var(--ov-ui-text-2-default));
|
|
@@ -928,7 +1015,7 @@
|
|
|
928
1015
|
white-space: normal;
|
|
929
1016
|
}
|
|
930
1017
|
|
|
931
|
-
.ov-agent-connect__markdown :where(p, pre, h5, table) {
|
|
1018
|
+
.ov-agent-connect__markdown :where(p, pre, h5, table, ul, ol, blockquote, details) {
|
|
932
1019
|
margin: 0 0 12px;
|
|
933
1020
|
}
|
|
934
1021
|
|
|
@@ -940,6 +1027,33 @@
|
|
|
940
1027
|
white-space: pre-wrap;
|
|
941
1028
|
}
|
|
942
1029
|
|
|
1030
|
+
.ov-agent-connect__markdown :where(ul, ol) {
|
|
1031
|
+
padding-left: 24px;
|
|
1032
|
+
}
|
|
1033
|
+
|
|
1034
|
+
.ov-agent-connect__markdown ul {
|
|
1035
|
+
list-style-type: disc;
|
|
1036
|
+
}
|
|
1037
|
+
|
|
1038
|
+
.ov-agent-connect__markdown ol {
|
|
1039
|
+
list-style-type: decimal;
|
|
1040
|
+
}
|
|
1041
|
+
|
|
1042
|
+
.ov-agent-connect__markdown blockquote {
|
|
1043
|
+
border-left: 2px solid var(--ov-ui-agent-connect-border);
|
|
1044
|
+
margin-left: 0;
|
|
1045
|
+
padding-left: 12px;
|
|
1046
|
+
}
|
|
1047
|
+
|
|
1048
|
+
.ov-agent-connect__markdown summary {
|
|
1049
|
+
cursor: pointer;
|
|
1050
|
+
}
|
|
1051
|
+
|
|
1052
|
+
.ov-agent-connect__markdown summary:focus-visible {
|
|
1053
|
+
outline: 2px solid var(--ov-ui-agent-connect-primary);
|
|
1054
|
+
outline-offset: 2px;
|
|
1055
|
+
}
|
|
1056
|
+
|
|
943
1057
|
.ov-agent-connect__markdown h5 {
|
|
944
1058
|
color: var(--ov-ui-agent-connect-text);
|
|
945
1059
|
font-size: 14px;
|
|
@@ -92,8 +92,8 @@ export interface FileBrowserLabels {
|
|
|
92
92
|
* belongs to `console`.
|
|
93
93
|
*/
|
|
94
94
|
export interface FileBrowserProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onSelect' | 'children'> {
|
|
95
|
-
/**
|
|
96
|
-
locale
|
|
95
|
+
/** 可选文案语言;继承上层,最终默认英文。Optional locale; inherits or defaults to en-US. */
|
|
96
|
+
locale?: Locale;
|
|
97
97
|
/**
|
|
98
98
|
* 受控的当前资源 URI。传入时由宿主决定当前资源,模块只上报切换意图。
|
|
99
99
|
*
|
|
@@ -3,7 +3,7 @@ import type { OvRequestOptions } from '../../client/types.js';
|
|
|
3
3
|
import type { FileBrowserApi } from './types.js';
|
|
4
4
|
export interface UseFileBrowserOptions {
|
|
5
5
|
rootUri: string;
|
|
6
|
-
/** Built-in copy
|
|
6
|
+
/** Built-in copy; inherits the Provider locale, otherwise en-US. */
|
|
7
7
|
locale?: Locale;
|
|
8
8
|
/**
|
|
9
9
|
* 宿主是否受控地持有当前资源。受控时 `currentUri` 就是唯一事实;非受控时
|
|
@@ -34,7 +34,7 @@ export interface UseFileBrowserOptions {
|
|
|
34
34
|
l1: string;
|
|
35
35
|
failure: string;
|
|
36
36
|
};
|
|
37
|
-
/**
|
|
37
|
+
/** 字符数文案;省略时跟随语言。Character count copy; follows the resolved locale. */
|
|
38
38
|
formatCharacterCount?: (count: number) => string;
|
|
39
39
|
/** 首次加载后自动展开到的路径。Path to expand to after the first load. */
|
|
40
40
|
defaultExpandedUri?: string;
|
|
@@ -51,4 +51,4 @@ export interface UseFileBrowserOptions {
|
|
|
51
51
|
* a directory row expands the tree, while a file row or a search result opens
|
|
52
52
|
* the preview.
|
|
53
53
|
*/
|
|
54
|
-
export declare function useFileBrowser({ rootUri, locale, controlled, summaryLabels, formatCharacterCount, defaultExpandedUri, currentUri, requestOptions, onUriChange, }: UseFileBrowserOptions): FileBrowserApi;
|
|
54
|
+
export declare function useFileBrowser({ rootUri, locale: localeProp, controlled, summaryLabels, formatCharacterCount, defaultExpandedUri, currentUri, requestOptions, onUriChange, }: UseFileBrowserOptions): FileBrowserApi;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { ScopeCascadeProps } from './types.js';
|
|
2
|
-
/** Only leaf selectors subscribe
|
|
3
|
-
export declare function ScopeCascade({ controller, locale, labels, levelNames, retryLabel, ...props }: ScopeCascadeProps): import("react").JSX.Element;
|
|
2
|
+
/** Only leaf selectors subscribe to request state; this wrapper resolves language. */
|
|
3
|
+
export declare function ScopeCascade({ controller, locale: localeProp, labels, levelNames: names, retryLabel, ...props }: ScopeCascadeProps): import("react").JSX.Element;
|
|
@@ -33,8 +33,8 @@ export interface ScopeCascadeController {
|
|
|
33
33
|
}
|
|
34
34
|
export interface ScopeCascadeProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
35
35
|
controller: ScopeCascadeController;
|
|
36
|
-
/**
|
|
37
|
-
locale
|
|
36
|
+
/** 可选文案语言;继承上层,最终默认英文。Optional locale; inherits or defaults to en-US. */
|
|
37
|
+
locale?: Locale;
|
|
38
38
|
/** Accessible names and placeholders, in library / space / user order. */
|
|
39
39
|
levelNames?: readonly [string, string, string];
|
|
40
40
|
retryLabel?: string;
|
package/dist/modules/style.css
CHANGED
|
@@ -691,6 +691,93 @@
|
|
|
691
691
|
--ov-ui-connect-notice-default: var(--ov-ui-text-2-default);
|
|
692
692
|
}
|
|
693
693
|
|
|
694
|
+
.ov-agent-connect__code-block {
|
|
695
|
+
border: 1px solid var(--ov-ui-agent-connect-border);
|
|
696
|
+
background: var(--ov-ui-agent-connect-bg);
|
|
697
|
+
white-space: normal;
|
|
698
|
+
border-radius: 8px;
|
|
699
|
+
margin-bottom: 12px;
|
|
700
|
+
overflow: hidden;
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
.ov-agent-connect__code-block:last-child {
|
|
704
|
+
margin-bottom: 0;
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
.ov-agent-connect__code-header {
|
|
708
|
+
border-bottom: 1px solid var(--ov-ui-agent-connect-border);
|
|
709
|
+
color: var(--ov-ui-agent-connect-muted);
|
|
710
|
+
justify-content: space-between;
|
|
711
|
+
align-items: center;
|
|
712
|
+
gap: 8px;
|
|
713
|
+
padding: 6px 12px;
|
|
714
|
+
font-size: 12px;
|
|
715
|
+
display: flex;
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
.ov-agent-connect__code-actions {
|
|
719
|
+
align-items: center;
|
|
720
|
+
gap: 12px;
|
|
721
|
+
display: flex;
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
.ov-agent-connect__code-actions button {
|
|
725
|
+
width: 24px;
|
|
726
|
+
height: 24px;
|
|
727
|
+
color: var(--ov-ui-agent-connect-secondary);
|
|
728
|
+
background: none;
|
|
729
|
+
border: 0;
|
|
730
|
+
border-radius: 4px;
|
|
731
|
+
justify-content: center;
|
|
732
|
+
align-items: center;
|
|
733
|
+
padding: 4px;
|
|
734
|
+
font-size: 12px;
|
|
735
|
+
display: inline-flex;
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
.ov-agent-connect__code-actions button:hover {
|
|
739
|
+
color: var(--ov-ui-agent-connect-primary);
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
.ov-agent-connect__code-actions button:disabled {
|
|
743
|
+
opacity: .6;
|
|
744
|
+
cursor: wait;
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
.ov-agent-connect__code-actions svg {
|
|
748
|
+
width: 16px;
|
|
749
|
+
height: 16px;
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
.ov-agent-connect .ov-agent-connect__code-block pre {
|
|
753
|
+
white-space: pre-wrap;
|
|
754
|
+
overflow-wrap: anywhere;
|
|
755
|
+
background: none;
|
|
756
|
+
border-radius: 0;
|
|
757
|
+
margin: 0;
|
|
758
|
+
padding: 12px;
|
|
759
|
+
font-size: 12px;
|
|
760
|
+
line-height: 20px;
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
.ov-agent-connect__code-block code {
|
|
764
|
+
font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
.ov-agent-connect__code-block > .ov-agent-connect__feedback:not(:empty) {
|
|
768
|
+
padding: 0 12px 8px;
|
|
769
|
+
display: block;
|
|
770
|
+
}
|
|
771
|
+
|
|
772
|
+
.ov-agent-connect__code-feedback {
|
|
773
|
+
clip-path: inset(50%);
|
|
774
|
+
white-space: nowrap;
|
|
775
|
+
width: 1px;
|
|
776
|
+
height: 1px;
|
|
777
|
+
position: absolute;
|
|
778
|
+
overflow: hidden;
|
|
779
|
+
}
|
|
780
|
+
|
|
694
781
|
.ov-agent-connect {
|
|
695
782
|
--ov-ui-agent-connect-text: var(--ov-ui-color-text-1, var(--ov-ui-text-1-default));
|
|
696
783
|
--ov-ui-agent-connect-secondary: var(--ov-ui-color-text-2, var(--ov-ui-text-2-default));
|
|
@@ -1021,7 +1108,7 @@
|
|
|
1021
1108
|
white-space: normal;
|
|
1022
1109
|
}
|
|
1023
1110
|
|
|
1024
|
-
.ov-agent-connect__markdown :where(p, pre, h5, table) {
|
|
1111
|
+
.ov-agent-connect__markdown :where(p, pre, h5, table, ul, ol, blockquote, details) {
|
|
1025
1112
|
margin: 0 0 12px;
|
|
1026
1113
|
}
|
|
1027
1114
|
|
|
@@ -1033,6 +1120,33 @@
|
|
|
1033
1120
|
white-space: pre-wrap;
|
|
1034
1121
|
}
|
|
1035
1122
|
|
|
1123
|
+
.ov-agent-connect__markdown :where(ul, ol) {
|
|
1124
|
+
padding-left: 24px;
|
|
1125
|
+
}
|
|
1126
|
+
|
|
1127
|
+
.ov-agent-connect__markdown ul {
|
|
1128
|
+
list-style-type: disc;
|
|
1129
|
+
}
|
|
1130
|
+
|
|
1131
|
+
.ov-agent-connect__markdown ol {
|
|
1132
|
+
list-style-type: decimal;
|
|
1133
|
+
}
|
|
1134
|
+
|
|
1135
|
+
.ov-agent-connect__markdown blockquote {
|
|
1136
|
+
border-left: 2px solid var(--ov-ui-agent-connect-border);
|
|
1137
|
+
margin-left: 0;
|
|
1138
|
+
padding-left: 12px;
|
|
1139
|
+
}
|
|
1140
|
+
|
|
1141
|
+
.ov-agent-connect__markdown summary {
|
|
1142
|
+
cursor: pointer;
|
|
1143
|
+
}
|
|
1144
|
+
|
|
1145
|
+
.ov-agent-connect__markdown summary:focus-visible {
|
|
1146
|
+
outline: 2px solid var(--ov-ui-agent-connect-primary);
|
|
1147
|
+
outline-offset: 2px;
|
|
1148
|
+
}
|
|
1149
|
+
|
|
1036
1150
|
.ov-agent-connect__markdown h5 {
|
|
1037
1151
|
color: var(--ov-ui-agent-connect-text);
|
|
1038
1152
|
font-size: 14px;
|
package/dist/n~0.js
CHANGED
|
@@ -5,6 +5,7 @@ import { resolveLocale, mergeLabels } from "./nx~0.js";
|
|
|
5
5
|
import { FolderOpenIcon, FolderIcon, ChevronRightIcon, DocumentIcon } from "./k~0.js";
|
|
6
6
|
import { useOverlayPosition } from "./o~0.js";
|
|
7
7
|
import { searchreact } from "./p~0.js";
|
|
8
|
+
import { useLocale } from "./28~0.js";
|
|
8
9
|
const messages = {
|
|
9
10
|
search: 'Search files…',
|
|
10
11
|
refresh: 'Refresh file tree',
|
|
@@ -904,7 +905,8 @@ function FileTreeSpinner({ className, ...rest }) {
|
|
|
904
905
|
function findRow(root, id) {
|
|
905
906
|
return root?.querySelector(`[${FILE_TREE_ROW_ATTRIBUTE}="${CSS.escape(id)}"]`) ?? null;
|
|
906
907
|
}
|
|
907
|
-
const file_tree_FileTree = /*#__PURE__*/ forwardRef(function({ rows, locale, operations, selectedId, search, refresh, isReady = true, loadingFallback, errorFallback, emptyFallback, slots, labels, getRowAttributes, renderDashboard, renderRowTooltip, renderRowIcon, onSelect, onToggleExpand, onLoadMore, onRetry, onOpenRetentionSettings, onSearch, onRefresh, className, ...rest }, ref) {
|
|
908
|
+
const file_tree_FileTree = /*#__PURE__*/ forwardRef(function({ rows, locale: localeProp, operations, selectedId, search, refresh, isReady = true, loadingFallback, errorFallback, emptyFallback, slots, labels, getRowAttributes, renderDashboard, renderRowTooltip, renderRowIcon, onSelect, onToggleExpand, onLoadMore, onRetry, onOpenRetentionSettings, onSearch, onRefresh, className, ...rest }, ref) {
|
|
909
|
+
const locale = useLocale(localeProp);
|
|
908
910
|
const rootRef = useRef(null);
|
|
909
911
|
const text = resolveFileTreeLabels(locale, labels);
|
|
910
912
|
const actions = useFileTreeActions({
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { Locale } from './locale.js';
|
|
3
|
+
/** A local prop overrides the nearest language scope without changing requests. */
|
|
4
|
+
export declare function useLocale(locale?: Locale): Locale;
|
|
5
|
+
export declare function LocaleProvider({ locale, children, }: {
|
|
6
|
+
locale?: Locale;
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
}): import("react").JSX.Element;
|