@openviking/react 0.1.6 → 0.1.8-beta.10.1.g8e5299efeb0a

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.
Files changed (172) hide show
  1. package/README.md +13 -1
  2. package/dist/1~0.js +57 -0
  3. package/dist/2~0.js +6 -5
  4. package/dist/3c~0.js +10 -4
  5. package/dist/3~0.js +189 -13
  6. package/dist/5~0.js +181 -0
  7. package/dist/6~0.js +48 -0
  8. package/dist/ae~0.js +8 -1
  9. package/dist/ark-message-list-view~0.js +9 -4
  10. package/dist/a~0.js +12 -6
  11. package/dist/c7r~0.js +50 -0
  12. package/dist/ck~0.js +3 -0
  13. package/dist/client/paths.d.ts +6 -0
  14. package/dist/client/provider.d.ts +6 -1
  15. package/dist/components/agent-connect/style.css +224 -35
  16. package/dist/components/api-key-login-form/api-key-login-form.d.ts +2 -0
  17. package/dist/components/api-key-login-form/index.d.ts +3 -0
  18. package/dist/components/api-key-login-form/style.css +438 -0
  19. package/dist/components/api-key-login-form/style.js +0 -0
  20. package/dist/components/api-key-login-form/types.d.ts +7 -0
  21. package/dist/components/api-key-login-form.js +1 -0
  22. package/dist/components/directory-tour/directory-tour-intro.d.ts +3 -0
  23. package/dist/components/directory-tour/index.d.ts +2 -1
  24. package/dist/components/directory-tour/style.css +367 -39
  25. package/dist/components/directory-tour/tour-card.d.ts +14 -0
  26. package/dist/components/directory-tour/types.d.ts +24 -1
  27. package/dist/components/directory-tour/use-tour-anchor.d.ts +1 -0
  28. package/dist/components/directory-tour/use-tour-position.d.ts +4 -1
  29. package/dist/components/directory-tour/use-tour-theme.d.ts +2 -0
  30. package/dist/components/directory-tour.js +53 -2
  31. package/dist/components/email-login-form/email-login-form.d.ts +2 -0
  32. package/dist/components/email-login-form/index.d.ts +3 -0
  33. package/dist/components/email-login-form/style.css +438 -0
  34. package/dist/components/email-login-form/style.js +0 -0
  35. package/dist/components/email-login-form/types.d.ts +11 -0
  36. package/dist/components/email-login-form.js +1 -0
  37. package/dist/components/experience-dashboard/experience-impact.d.ts +3 -1
  38. package/dist/components/experience-dashboard/style.css +229 -12
  39. package/dist/components/experience-dashboard.js +1 -1
  40. package/dist/components/file-browser-entries/style.css +331 -80
  41. package/dist/components/file-preview/file-preview-header.d.ts +4 -21
  42. package/dist/components/file-preview/file-preview-toolbar.d.ts +7 -0
  43. package/dist/components/file-preview/locales/en-US.d.ts +9 -0
  44. package/dist/components/file-preview/locales/zh-CN.d.ts +9 -0
  45. package/dist/components/file-preview/style.css +335 -76
  46. package/dist/components/file-preview/types.d.ts +14 -21
  47. package/dist/components/file-tree/file-tree-toolbar.d.ts +3 -3
  48. package/dist/components/file-tree/locales/en-US.d.ts +3 -0
  49. package/dist/components/file-tree/locales/zh-CN.d.ts +3 -0
  50. package/dist/components/file-tree/style.css +313 -86
  51. package/dist/components/file-tree/types.d.ts +13 -4
  52. package/dist/components/invitation-confirmation/index.d.ts +3 -0
  53. package/dist/components/invitation-confirmation/invitation-confirmation.d.ts +2 -0
  54. package/dist/components/invitation-confirmation/style.css +438 -0
  55. package/dist/components/invitation-confirmation/style.js +0 -0
  56. package/dist/components/invitation-confirmation/types.d.ts +20 -0
  57. package/dist/components/invitation-confirmation.js +1 -0
  58. package/dist/components/login-method-selector/index.d.ts +2 -0
  59. package/dist/components/login-method-selector/login-method-selector.d.ts +2 -0
  60. package/dist/components/login-method-selector/style.css +438 -0
  61. package/dist/components/login-method-selector/style.js +0 -0
  62. package/dist/components/login-method-selector/types.d.ts +14 -0
  63. package/dist/components/login-method-selector.js +1 -0
  64. package/dist/components/password-reset-request-form/index.d.ts +3 -0
  65. package/dist/components/password-reset-request-form/password-reset-request-form.d.ts +2 -0
  66. package/dist/components/password-reset-request-form/style.css +438 -0
  67. package/dist/components/password-reset-request-form/style.js +0 -0
  68. package/dist/components/password-reset-request-form/types.d.ts +13 -0
  69. package/dist/components/password-reset-request-form.js +1 -0
  70. package/dist/components/password-setup-form/index.d.ts +3 -0
  71. package/dist/components/password-setup-form/password-setup-form.d.ts +2 -0
  72. package/dist/components/password-setup-form/style.css +438 -0
  73. package/dist/components/password-setup-form/style.js +0 -0
  74. package/dist/components/password-setup-form/types.d.ts +10 -0
  75. package/dist/components/password-setup-form.js +1 -0
  76. package/dist/components/scope-switcher/style.css +368 -37
  77. package/dist/components/style.css +13071 -7474
  78. package/dist/components/tui/style.css +271 -35
  79. package/dist/components/viking-bot/interaction/style.css +143 -22
  80. package/dist/components/viking-bot/style.css +951 -295
  81. package/dist/components/wiki-dashboard/index.d.ts +1 -1
  82. package/dist/components/wiki-dashboard/style.css +241 -14
  83. package/dist/components/wiki-dashboard/types.d.ts +12 -16
  84. package/dist/components/wiki-dashboard/wiki-action-button.d.ts +2 -9
  85. package/dist/components/wiki-dashboard/wiki-conflict-card.d.ts +3 -10
  86. package/dist/c~0.js +16 -8
  87. package/dist/d~0.js +28 -0
  88. package/dist/ep~0.js +493 -0
  89. package/dist/e~0.js +33 -328
  90. package/dist/fi~0.js +13 -28
  91. package/dist/fj~0.js +38 -69
  92. package/dist/fl~0.js +710 -0
  93. package/dist/f~0.js +61 -685
  94. package/dist/g~0.js +135 -0
  95. package/dist/icons/index.d.ts +2 -0
  96. package/dist/icons.js +1 -1
  97. package/dist/index.d.ts +12 -0
  98. package/dist/index.js +9 -3
  99. package/dist/k~0.js +44 -4
  100. package/dist/l5~0.js +3813 -0
  101. package/dist/lk~0.js +5 -2
  102. package/dist/l~0.js +49 -2369
  103. package/dist/modules/console/style.css +1485 -351
  104. package/dist/modules/file-browser/acl/acl-add-principal.d.ts +12 -0
  105. package/dist/modules/file-browser/acl/acl-candidate.d.ts +8 -0
  106. package/dist/modules/file-browser/acl/acl-client.d.ts +13 -0
  107. package/dist/modules/file-browser/acl/acl-confirmation.d.ts +6 -0
  108. package/dist/modules/file-browser/acl/acl-entry.d.ts +13 -0
  109. package/dist/modules/file-browser/acl/acl-labels.d.ts +47 -0
  110. package/dist/modules/file-browser/acl/acl-menu.d.ts +10 -0
  111. package/dist/modules/file-browser/acl/acl-modal.d.ts +17 -0
  112. package/dist/modules/file-browser/acl/acl-model.d.ts +17 -0
  113. package/dist/modules/file-browser/acl/acl-principal-tabs.d.ts +6 -0
  114. package/dist/modules/file-browser/acl/acl-tag.d.ts +7 -0
  115. package/dist/modules/file-browser/acl/locales/en-US.d.ts +44 -0
  116. package/dist/modules/file-browser/acl/locales/zh-CN.d.ts +44 -0
  117. package/dist/modules/file-browser/acl/use-acl-principals.d.ts +17 -0
  118. package/dist/modules/file-browser/acl/use-acl-report.d.ts +27 -0
  119. package/dist/modules/file-browser/acl-types.d.ts +86 -0
  120. package/dist/modules/file-browser/dashboard-model.d.ts +3 -0
  121. package/dist/modules/file-browser/file-browser-detail-icons.d.ts +0 -6
  122. package/dist/modules/file-browser/file-browser-detail.d.ts +5 -23
  123. package/dist/modules/file-browser/file-browser-labels.d.ts +1 -1
  124. package/dist/modules/file-browser/file-browser-search.d.ts +20 -0
  125. package/dist/modules/file-browser/file-browser-toolbar.d.ts +3 -10
  126. package/dist/modules/file-browser/file-browser-tree-pane.d.ts +2 -6
  127. package/dist/modules/file-browser/file-browser.d.ts +1 -1
  128. package/dist/modules/file-browser/fs-directories.d.ts +1 -0
  129. package/dist/modules/file-browser/fs-file-editing.d.ts +4 -0
  130. package/dist/modules/file-browser/fs-model.d.ts +3 -1
  131. package/dist/modules/file-browser/fs-preview-images.d.ts +3 -0
  132. package/dist/modules/file-browser/fs-read-file.d.ts +1 -1
  133. package/dist/modules/file-browser/index.d.ts +1 -0
  134. package/dist/modules/file-browser/locales/en-US.d.ts +5 -0
  135. package/dist/modules/file-browser/locales/zh-CN.d.ts +5 -0
  136. package/dist/modules/file-browser/style.css +2595 -703
  137. package/dist/modules/file-browser/types.d.ts +22 -20
  138. package/dist/modules/file-browser/use-file-browser-acl.d.ts +16 -0
  139. package/dist/modules/file-browser/use-file-browser.d.ts +5 -7
  140. package/dist/modules/file-browser/use-fs-tree.d.ts +1 -0
  141. package/dist/modules/file-browser/wiki-dashboard-pane.d.ts +2 -4
  142. package/dist/modules/file-browser.js +1 -1
  143. package/dist/modules/scope-cascade/style.css +537 -37
  144. package/dist/modules/style.css +12429 -8855
  145. package/dist/n~0.js +61 -37
  146. package/dist/p0~0.js +27 -0
  147. package/dist/p~0.js +34 -25
  148. package/dist/rt~0.js +107 -4
  149. package/dist/r~0.js +1 -1
  150. package/dist/shared/auth/agreements.d.ts +10 -0
  151. package/dist/shared/auth/fields.d.ts +15 -0
  152. package/dist/shared/auth/form-frame.d.ts +12 -0
  153. package/dist/shared/auth/locales/en-US.d.ts +24 -0
  154. package/dist/shared/auth/locales/zh-CN.d.ts +24 -0
  155. package/dist/shared/auth/types.d.ts +61 -0
  156. package/dist/shared/auth/use-auth-labels.d.ts +3 -0
  157. package/dist/shared/auth/use-form.d.ts +8 -0
  158. package/dist/shared/components/button/button.d.ts +20 -0
  159. package/dist/shared/components/input/input.d.ts +17 -0
  160. package/dist/shared/components/modal/locales/en-US.d.ts +4 -0
  161. package/dist/shared/components/modal/locales/zh-CN.d.ts +4 -0
  162. package/dist/shared/components/modal/modal.d.ts +2 -0
  163. package/dist/shared/components/modal/types.d.ts +18 -0
  164. package/dist/shared/components/overlay/lock-body-scroll.d.ts +1 -0
  165. package/dist/style.css +15477 -6258
  166. package/dist/s~0.js +16 -0
  167. package/dist/u~0.js +15 -6
  168. package/dist/viking-bot-composer~0.js +29 -11
  169. package/dist/viking-bot-interaction~0.js +2 -1
  170. package/package.json +34 -3
  171. package/dist/modules/file-browser/fs-selection.d.ts +0 -4
  172. package/dist/o~0.js +0 -106
@@ -0,0 +1,12 @@
1
+ import type { OvIdentityValue } from '../../../client/types.js';
2
+ import type { FileBrowserAclContext, FileBrowserAclEntry, FileBrowserAclOptions } from '../acl-types.js';
3
+ import type { AclText } from './acl-labels.js';
4
+ export declare function AclAddPrincipal({ entries, text, disabled, context, accountId, options, onAdd, }: {
5
+ entries: FileBrowserAclEntry[];
6
+ text: AclText;
7
+ disabled: boolean;
8
+ context: FileBrowserAclContext;
9
+ accountId?: OvIdentityValue;
10
+ options?: FileBrowserAclOptions;
11
+ onAdd: (entries: FileBrowserAclEntry[]) => void;
12
+ }): import("react").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import type { FileBrowserAclLevel } from '../acl-types.js';
2
+ import type { AclText } from './acl-labels.js';
3
+ export declare function AclCandidate({ principal, level, text, onChange, }: {
4
+ principal: string;
5
+ level?: FileBrowserAclLevel;
6
+ text: AclText;
7
+ onChange: (level?: FileBrowserAclLevel) => void;
8
+ }): import("react").JSX.Element;
@@ -0,0 +1,13 @@
1
+ import type { OvClient, OvIdentityValue, OvRequestOptions } from '../../../client/types.js';
2
+ import type { FileBrowserAclContext, FileBrowserAclPrincipalPage, FileBrowserAclReport } from '../acl-types.js';
3
+ export declare const readAcl: (client: OvClient, uri: string, options: OvRequestOptions) => Promise<FileBrowserAclReport>;
4
+ export declare function readPermission(client: OvClient, uri: string, options: OvRequestOptions): Promise<import("../acl-types.js").FileBrowserAclLevel | undefined>;
5
+ export declare function writeAcl(client: OvClient, uri: string, options: OvRequestOptions, change?: Pick<FileBrowserAclReport, 'direct_entries'> & {
6
+ mode: 'inherit' | 'restricted';
7
+ }): Promise<FileBrowserAclReport>;
8
+ export declare function identityValue(value: OvIdentityValue | undefined): Promise<string>;
9
+ export declare function listPrincipals(query: {
10
+ type: 'user' | 'group';
11
+ keyword: string;
12
+ page: number;
13
+ }, context: FileBrowserAclContext, accountId: OvIdentityValue | undefined): Promise<FileBrowserAclPrincipalPage>;
@@ -0,0 +1,6 @@
1
+ import type { AclText } from './acl-labels.js';
2
+ import type { AclModel } from './use-acl-report.js';
3
+ export declare function AclConfirmation({ model, text, }: {
4
+ model: AclModel;
5
+ text: AclText;
6
+ }): import("react").JSX.Element;
@@ -0,0 +1,13 @@
1
+ import type { FileBrowserAclEntry, FileBrowserAclLevel } from '../acl-types.js';
2
+ import type { AclText } from './acl-labels.js';
3
+ export declare function AclAvatar({ principal }: {
4
+ principal: string;
5
+ }): import("react").JSX.Element;
6
+ export declare function AclEntry({ entry, source, text, disabled, onChange, onRemove, }: {
7
+ entry: FileBrowserAclEntry;
8
+ source?: string;
9
+ text: AclText;
10
+ disabled: boolean;
11
+ onChange: (level: FileBrowserAclLevel) => void;
12
+ onRemove: () => void;
13
+ }): import("react").JSX.Element;
@@ -0,0 +1,47 @@
1
+ import { type Locale } from '../../../shared/locale.js';
2
+ import type { FileBrowserAclLabels, FileBrowserAclLevel } from '../acl-types.js';
3
+ export type AclText = Required<FileBrowserAclLabels>;
4
+ export declare const aclLabels: (locale: Locale, labels?: FileBrowserAclLabels) => {
5
+ title: string;
6
+ manage: string;
7
+ read: string;
8
+ write: string;
9
+ manageLevel: string;
10
+ readDescription: string;
11
+ writeDescription: string;
12
+ manageDescription: string;
13
+ effectivePermission: string;
14
+ addPrincipal: string;
15
+ search: string;
16
+ users: string;
17
+ groups: string;
18
+ allUsers: string;
19
+ administrator: string;
20
+ administratorDescription: string;
21
+ direct: string;
22
+ inherited: string;
23
+ remove: string;
24
+ add: string;
25
+ cancel: string;
26
+ confirm: string;
27
+ close: string;
28
+ retry: string;
29
+ loadMore: string;
30
+ loading: string;
31
+ saving: string;
32
+ saved: string;
33
+ loadFailed: string;
34
+ saveFailed: string;
35
+ principalsFailed: string;
36
+ empty: string;
37
+ noMatches: string;
38
+ restricted: string;
39
+ restore: string;
40
+ stopTitle: string;
41
+ stopDescription: string;
42
+ restoreTitle: string;
43
+ restoreDescription: string;
44
+ restoreRemoved: string;
45
+ readOnly: string;
46
+ };
47
+ export declare const levelLabel: (level: FileBrowserAclLevel, text: AclText) => string;
@@ -0,0 +1,10 @@
1
+ import type { FileBrowserAclLevel } from '../acl-types.js';
2
+ import { type AclText } from './acl-labels.js';
3
+ export declare function AclMenu({ level, text, name, disabled, onChange, onRemove, }: {
4
+ level: FileBrowserAclLevel;
5
+ text: AclText;
6
+ name: string;
7
+ disabled?: boolean;
8
+ onChange: (level: FileBrowserAclLevel) => void;
9
+ onRemove?: () => void;
10
+ }): import("react").JSX.Element;
@@ -0,0 +1,17 @@
1
+ import { type RefObject } from 'react';
2
+ import type { Locale } from '../../../shared/locale.js';
3
+ import type { OvIdentityValue } from '../../../client/types.js';
4
+ import type { FileBrowserAclContext, FileBrowserAclOptions, FileBrowserAclReport } from '../acl-types.js';
5
+ import { type AclText } from './acl-labels.js';
6
+ export declare function AclModal({ uri, open, text, locale, context, triggerRef, accountId, options, onClose, onUpdated, }: {
7
+ uri: string;
8
+ open: boolean;
9
+ text: AclText;
10
+ locale: Locale;
11
+ context: FileBrowserAclContext;
12
+ triggerRef: RefObject<HTMLButtonElement | null>;
13
+ accountId?: OvIdentityValue;
14
+ options?: FileBrowserAclOptions;
15
+ onClose: () => void;
16
+ onUpdated: (report: FileBrowserAclReport) => void;
17
+ }): import("react").JSX.Element;
@@ -0,0 +1,17 @@
1
+ import type { FileBrowserAclEntry as Entry, FileBrowserAclLevel as Level, FileBrowserAclReport as Report } from '../acl-types.js';
2
+ export declare const LEVELS: readonly Level[];
3
+ export declare const isLevel: (value: unknown) => value is Level;
4
+ export declare function isAclTarget(uri: string | null): uri is string;
5
+ export declare function normalizeEntries(entries: readonly Entry[]): Entry[];
6
+ export declare function parseReport(value: unknown, uri: string): Report;
7
+ /** Increases preserve inheritance; reducing an inherited grant needs a restricted boundary. */
8
+ export declare function planChange(report: Report, next: Entry[]): {
9
+ entries: Entry[];
10
+ mode: 'restricted';
11
+ confirmation: boolean;
12
+ } | {
13
+ entries: Entry[];
14
+ mode: 'inherit';
15
+ confirmation: boolean;
16
+ };
17
+ export declare function restoreDiff(report: Report): Entry[];
@@ -0,0 +1,6 @@
1
+ import type { AclText } from './acl-labels.js';
2
+ export declare function AclPrincipalTabs({ type, text, onChange, }: {
3
+ type: 'user' | 'group';
4
+ text: AclText;
5
+ onChange: (type: 'user' | 'group') => void;
6
+ }): import("react").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import type { FileBrowserAclLevel } from '../acl-types.js';
2
+ import { type AclText } from './acl-labels.js';
3
+ export declare function AclTag({ level, text, onManage, }: {
4
+ level: FileBrowserAclLevel;
5
+ text: AclText;
6
+ onManage: () => void;
7
+ }): import("react").JSX.Element;
@@ -0,0 +1,44 @@
1
+ declare const _default: {
2
+ title: string;
3
+ manage: string;
4
+ read: string;
5
+ write: string;
6
+ manageLevel: string;
7
+ readDescription: string;
8
+ writeDescription: string;
9
+ manageDescription: string;
10
+ effectivePermission: string;
11
+ addPrincipal: string;
12
+ search: string;
13
+ users: string;
14
+ groups: string;
15
+ allUsers: string;
16
+ administrator: string;
17
+ administratorDescription: string;
18
+ direct: string;
19
+ inherited: string;
20
+ remove: string;
21
+ add: string;
22
+ cancel: string;
23
+ confirm: string;
24
+ close: string;
25
+ retry: string;
26
+ loadMore: string;
27
+ loading: string;
28
+ saving: string;
29
+ saved: string;
30
+ loadFailed: string;
31
+ saveFailed: string;
32
+ principalsFailed: string;
33
+ empty: string;
34
+ noMatches: string;
35
+ restricted: string;
36
+ restore: string;
37
+ stopTitle: string;
38
+ stopDescription: string;
39
+ restoreTitle: string;
40
+ restoreDescription: string;
41
+ restoreRemoved: string;
42
+ readOnly: string;
43
+ };
44
+ export default _default;
@@ -0,0 +1,44 @@
1
+ declare const _default: {
2
+ title: string;
3
+ manage: string;
4
+ read: string;
5
+ write: string;
6
+ manageLevel: string;
7
+ readDescription: string;
8
+ writeDescription: string;
9
+ manageDescription: string;
10
+ effectivePermission: string;
11
+ addPrincipal: string;
12
+ search: string;
13
+ users: string;
14
+ groups: string;
15
+ allUsers: string;
16
+ administrator: string;
17
+ administratorDescription: string;
18
+ direct: string;
19
+ inherited: string;
20
+ remove: string;
21
+ add: string;
22
+ cancel: string;
23
+ confirm: string;
24
+ close: string;
25
+ retry: string;
26
+ loadMore: string;
27
+ loading: string;
28
+ saving: string;
29
+ saved: string;
30
+ loadFailed: string;
31
+ saveFailed: string;
32
+ principalsFailed: string;
33
+ empty: string;
34
+ noMatches: string;
35
+ restricted: string;
36
+ restore: string;
37
+ stopTitle: string;
38
+ stopDescription: string;
39
+ restoreTitle: string;
40
+ restoreDescription: string;
41
+ restoreRemoved: string;
42
+ readOnly: string;
43
+ };
44
+ export default _default;
@@ -0,0 +1,17 @@
1
+ import type { OvIdentityValue } from '../../../client/types.js';
2
+ import type { FileBrowserAclContext, FileBrowserAclOptions } from '../acl-types.js';
3
+ export declare function useAclPrincipals({ open, type, keyword, context, accountId, options, }: {
4
+ open: boolean;
5
+ type: 'user' | 'group';
6
+ keyword: string;
7
+ context: FileBrowserAclContext;
8
+ accountId?: OvIdentityValue;
9
+ options?: FileBrowserAclOptions;
10
+ }): {
11
+ items: string[];
12
+ loading: boolean;
13
+ error: Error | undefined;
14
+ hasMore: boolean;
15
+ more: () => void;
16
+ retry: () => void;
17
+ };
@@ -0,0 +1,27 @@
1
+ import type { FileBrowserAclContext, FileBrowserAclEntry, FileBrowserAclReport } from '../acl-types.js';
2
+ type Confirmation = {
3
+ kind: 'restrict';
4
+ entries: FileBrowserAclEntry[];
5
+ } | {
6
+ kind: 'restore';
7
+ };
8
+ export declare function useAclReport({ uri, context, open, readOnly, onUpdated, }: {
9
+ uri: string;
10
+ context: FileBrowserAclContext;
11
+ open: boolean;
12
+ readOnly: boolean;
13
+ onUpdated: (report: FileBrowserAclReport) => void;
14
+ }): {
15
+ report: FileBrowserAclReport | undefined;
16
+ confirmation: Confirmation | undefined;
17
+ error: Error | undefined;
18
+ phase: "loading" | "ready" | "saving";
19
+ saved: boolean;
20
+ retry: () => void;
21
+ change: (entries: FileBrowserAclEntry[]) => void;
22
+ restore: () => void;
23
+ cancel: () => void;
24
+ confirm: () => void;
25
+ };
26
+ export type AclModel = ReturnType<typeof useAclReport>;
27
+ export {};
@@ -0,0 +1,86 @@
1
+ import type { OvClient, OvRequestOptions } from '../../client/types.js';
2
+ export type FileBrowserAclLevel = 'read' | 'write' | 'manage';
3
+ export interface FileBrowserAclEntry {
4
+ principal: string;
5
+ level: FileBrowserAclLevel;
6
+ }
7
+ export interface FileBrowserAclReport {
8
+ uri: string;
9
+ acl_mode: 'none' | 'inherit' | 'restricted';
10
+ direct_entries: FileBrowserAclEntry[];
11
+ inherited_entries: FileBrowserAclEntry[];
12
+ effective_entries: FileBrowserAclEntry[];
13
+ }
14
+ export interface FileBrowserAclContext {
15
+ client: OvClient;
16
+ requestOptions: OvRequestOptions;
17
+ }
18
+ export interface FileBrowserAclPrincipalPage {
19
+ principals: string[];
20
+ hasMore: boolean;
21
+ }
22
+ /** Optional integration where a service has additional permission metadata. */
23
+ export interface FileBrowserAclOptions {
24
+ /** 禁止授权修改,仍可查看。Prevent mutations while retaining the grant list. */
25
+ readOnly?: boolean;
26
+ /**
27
+ * 自身有效权限;默认先读 fs/stat.permission,缺失时仅探测管理权限。
28
+ * Own effective level. Defaults to fs/stat.permission, then a manage-only ACL probe.
29
+ * No particular user ID is assumed to be an administrator.
30
+ */
31
+ resolvePermission?: (uri: string, context: FileBrowserAclContext) => Promise<FileBrowserAclLevel | undefined>;
32
+ /**
33
+ * 可选候选目录;默认调用原生账号用户/用户组接口,不读取密钥。
34
+ * Optional principal directory; defaults to native account APIs without credentials.
35
+ */
36
+ listPrincipals?: (query: {
37
+ type: 'user' | 'group';
38
+ keyword: string;
39
+ page: number;
40
+ }, context: FileBrowserAclContext) => Promise<FileBrowserAclPrincipalPage>;
41
+ /** 保存成功后的通知;失败不触发。Notification after a successful ACL mutation. */
42
+ onChange?: (report: FileBrowserAclReport) => void;
43
+ }
44
+ export interface FileBrowserAclLabels {
45
+ title?: string;
46
+ manage?: string;
47
+ read?: string;
48
+ write?: string;
49
+ manageLevel?: string;
50
+ readDescription?: string;
51
+ writeDescription?: string;
52
+ manageDescription?: string;
53
+ effectivePermission?: string;
54
+ addPrincipal?: string;
55
+ search?: string;
56
+ users?: string;
57
+ groups?: string;
58
+ allUsers?: string;
59
+ administrator?: string;
60
+ administratorDescription?: string;
61
+ direct?: string;
62
+ inherited?: string;
63
+ remove?: string;
64
+ add?: string;
65
+ cancel?: string;
66
+ confirm?: string;
67
+ close?: string;
68
+ retry?: string;
69
+ loadMore?: string;
70
+ loading?: string;
71
+ saving?: string;
72
+ saved?: string;
73
+ loadFailed?: string;
74
+ saveFailed?: string;
75
+ principalsFailed?: string;
76
+ empty?: string;
77
+ noMatches?: string;
78
+ restricted?: string;
79
+ restore?: string;
80
+ stopTitle?: string;
81
+ stopDescription?: string;
82
+ restoreTitle?: string;
83
+ restoreDescription?: string;
84
+ restoreRemoved?: string;
85
+ readOnly?: string;
86
+ }
@@ -1,3 +1,4 @@
1
+ import type { FilePreviewTab } from '../../components/file-preview/index.js';
1
2
  import type { FileTreeRow } from '../../components/file-tree/index.js';
2
3
  export interface FileBrowserDashboard {
3
4
  kind: 'experience' | 'wiki';
@@ -12,3 +13,5 @@ export declare function resolveDashboard(uri: string, rows: readonly FileTreeRow
12
13
  to: string;
13
14
  conflicts_num?: number;
14
15
  }[]): FileBrowserDashboard | undefined;
16
+ /** Keep the normal tabs when no board is open, and suppress all detail tabs for blocked resources. */
17
+ export declare function mergeDashboardTab(tabs: readonly FilePreviewTab[] | null, dashboard: FilePreviewTab | undefined, blocked: boolean): readonly FilePreviewTab[] | null;
@@ -1,10 +1,4 @@
1
- /** 复制图标。Copy icon. */
2
- export declare function CopyIcon({ size }: {
3
- size?: number;
4
- }): import("react").JSX.Element;
5
1
  /** 历史图标。History icon. */
6
2
  export declare function HistoryIcon(): import("react").JSX.Element;
7
3
  /** 看板图标。Dashboard icon. */
8
4
  export declare function DashboardIcon(): import("react").JSX.Element;
9
- /** 下载图标。Download icon. */
10
- export declare function DownloadIcon(): import("react").JSX.Element;
@@ -1,34 +1,16 @@
1
1
  import type { Locale } from '../../shared/locale.js';
2
2
  import { type FilePreviewTab } from '../../components/file-preview/index.js';
3
+ import type { ReactNode } from 'react';
3
4
  import type { FileBrowserLabels } from './types.js';
4
- /**
5
- * 详情区:页签行与正文。分段器(预览 / 源码)与右侧图标按钮由这里渲染,通过
6
- * `slots.actions` 拿到预览的视图状态。
7
- *
8
- * 目录的摘要层级不在这里——它是 `directory` 页签内部的一层,由组件自己渲染。
9
- *
10
- * The detail pane: tab row and body. The segmented control (preview / source) and
11
- * the icon buttons on the right are rendered here, reading the view state from the
12
- * preview through `slots.actions`.
13
- *
14
- * A directory's summary levels are not here: they are a layer inside the
15
- * `directory` tab, rendered by the component itself.
16
- */
17
5
  export interface FileBrowserDetailProps {
18
6
  tabs: readonly FilePreviewTab[];
19
7
  activeKey: string | null;
20
8
  locale: Locale;
21
9
  labels?: FileBrowserLabels['preview'];
22
10
  footer?: string;
23
- /** 分段器与图标按钮的文案。Copy for the segmented control and icon buttons. */
24
- viewLabels: {
25
- preview: string;
26
- source: string;
27
- copyPath: string;
28
- copyContent: string;
29
- download: string;
30
- viewSwitch: string;
31
- };
11
+ titleExtra?: ReactNode;
12
+ extraActions?: ReactNode;
13
+ readOnly?: boolean;
32
14
  onActiveKeyChange: (key: string) => void;
33
15
  }
34
- export declare function FileBrowserDetail({ tabs, activeKey, locale, labels, footer, viewLabels, onActiveKeyChange, }: FileBrowserDetailProps): import("react").JSX.Element;
16
+ export declare function FileBrowserDetail({ tabs, activeKey, locale, labels, footer, titleExtra, extraActions, readOnly, onActiveKeyChange, }: FileBrowserDetailProps): import("react").JSX.Element;
@@ -3,7 +3,7 @@ import type { FilePreviewLabels } from '../../components/file-preview/index.js';
3
3
  import type { FileTreeLabels } from '../../components/file-tree/index.js';
4
4
  import type { FileBrowserLabels } from './types.js';
5
5
  /** 模块外壳自己渲染的文案,其余透传给树与预览。 */
6
- export type ShellLabels = Omit<FileBrowserLabels, 'tree' | 'preview' | 'entries' | 'dashboard'>;
6
+ export type ShellLabels = Omit<FileBrowserLabels, 'tree' | 'preview' | 'entries' | 'dashboard' | 'acl'>;
7
7
  /**
8
8
  * 模块外壳的内置文案。树与预览的默认值留在各自组件里,模块不重复一份。
9
9
  * Built-in copy of the module shell. The tree and the preview keep their own
@@ -0,0 +1,20 @@
1
+ import { type RefObject } from 'react';
2
+ import type { OvRequestOptions } from '../../client/types.js';
3
+ import type { Locale } from '../../shared/locale.js';
4
+ import type { ResolvedLabels } from './file-browser-labels.js';
5
+ interface FileBrowserSearchProps {
6
+ open: boolean;
7
+ rootUri: string;
8
+ triggerRef: RefObject<HTMLElement | null>;
9
+ locale: Locale;
10
+ text: ResolvedLabels;
11
+ requestOptions?: OvRequestOptions;
12
+ onClose: () => void;
13
+ }
14
+ /**
15
+ * TODO: 占位搜索弹窗,目前只提交关键词并展示原生接口结果。
16
+ * 后续补齐筛选、分页、结果定位和快捷键;此视图仅供 FileBrowser 内部使用。
17
+ * Placeholder: query submission and results only; richer search interactions follow.
18
+ */
19
+ export declare function FileBrowserSearch({ open, rootUri, triggerRef, locale, text, requestOptions, onClose, }: FileBrowserSearchProps): import("react").JSX.Element;
20
+ export {};
@@ -1,17 +1,10 @@
1
- /**
2
- * 搜索行:搜索框与刷新按钮。内置的连接与导入入口位于上一行。
3
- *
4
- * The search row: the search box and refresh button. Built-in connection and import
5
- * entries occupy the row above.
6
- */
1
+ /** Host-owned search intent and module-owned refresh share the file-tree controls. */
7
2
  export interface FileBrowserToolbarProps {
8
- searchId: string;
9
- query: string;
10
3
  refreshing: boolean;
11
4
  canRefresh: boolean;
12
5
  placeholder: string;
13
6
  refreshLabel: string;
14
- onQueryChange: (value: string) => void;
7
+ onSearch?: () => void;
15
8
  onRefresh: () => void;
16
9
  }
17
- export declare function FileBrowserToolbar({ searchId, query, refreshing, canRefresh, placeholder, refreshLabel, onQueryChange, onRefresh, }: FileBrowserToolbarProps): import("react").JSX.Element;
10
+ export declare function FileBrowserToolbar({ refreshing, canRefresh, placeholder, refreshLabel, onSearch, onRefresh, }: FileBrowserToolbarProps): import("react").JSX.Element;
@@ -18,16 +18,12 @@ export interface FileBrowserTreePaneProps {
18
18
  entries: Pick<FileBrowserEntriesProps, 'agentConnect' | 'onImportResources' | 'renderImportResources' | 'labels'>;
19
19
  locale: Locale;
20
20
  dashboardLabels?: FileBrowserDashboardLabels;
21
- searchId: string;
21
+ onSearch?: () => void;
22
22
  browser: FileBrowserApi;
23
23
  treeLabels: FileTreeLabels | undefined;
24
24
  searchPlaceholder: string;
25
25
  refreshLabel: string;
26
- searchLoading: string;
27
- searchEmpty: string;
28
- /** 搜索失败时的结论文案。Conclusion shown when the search request fails. */
29
- searchErrorLabel: string;
30
26
  /** 失败态里的重试按钮。Retry button of the failure state. */
31
27
  retryLabel: string;
32
28
  }
33
- export declare function FileBrowserTreePane({ entries, locale, dashboardLabels, searchId, browser, treeLabels, searchPlaceholder, refreshLabel, searchLoading, searchEmpty, searchErrorLabel, retryLabel, }: FileBrowserTreePaneProps): import("react").JSX.Element;
29
+ export declare function FileBrowserTreePane({ entries, locale, dashboardLabels, onSearch, browser, treeLabels, searchPlaceholder, refreshLabel, retryLabel, }: FileBrowserTreePaneProps): import("react").JSX.Element;
@@ -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: localeProp, agentConnect, dashboardKinds, renderDashboard, 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, dashboardKinds, renderDashboard, acl, readOnly, onUriChange, onImportResources, renderImportResources, labels, requestOptions, className, style, ...rest }: FileBrowserProps): import("react").JSX.Element;
@@ -38,4 +38,5 @@ export declare function useTreeMetadata(rootUri: string, dirs: Record<string, Di
38
38
  metadataRows: (import("../../components/file-tree/types.js").FileTreeEntryRow & {
39
39
  tags?: readonly string[];
40
40
  })[];
41
+ accessOf: (uri: string | null) => "container" | "denied" | undefined;
41
42
  };
@@ -0,0 +1,4 @@
1
+ import type { OvClient, OvRequestOptions } from '../../client/types.js';
2
+ import type { FilePreviewEditing } from '../../components/file-preview/index.js';
3
+ /** Load the full file before editing; the preview can contain only its first page. */
4
+ export declare function createFileEditing(client: OvClient, uri: string, name: string, options: OvRequestOptions, onSave?: () => void): FilePreviewEditing | undefined;
@@ -13,6 +13,8 @@ export interface FsEntry {
13
13
  modTime?: string;
14
14
  abstract?: string;
15
15
  tags?: readonly string[];
16
+ access?: 'denied' | 'container';
17
+ permission?: 'read' | 'write' | 'manage';
16
18
  }
17
19
  /** 一个目录已加载的子节点与分页状态。 */
18
20
  export interface DirState {
@@ -113,4 +115,4 @@ export declare function flattenTree(uri: string, depth: number, dirs: Record<str
113
115
  /** 请求被取消时不需要写回状态。A cancelled request has no state to write. */
114
116
  export declare function isAbort(error: unknown): boolean;
115
117
  /** 把任意抛出物归一成 Error。Normalises a thrown value into an Error. */
116
- export declare function toError(cause: unknown): Error;
118
+ export declare const toError: (cause: unknown) => Error;
@@ -0,0 +1,3 @@
1
+ import type { OvClient, OvRequestOptions } from '../../client/types.js';
2
+ import type { FilePreviewFileTab } from '../../components/file-preview/index.js';
3
+ export declare function createPreviewImageResolver(client: OvClient, uri: string, directory: boolean, options: OvRequestOptions): NonNullable<FilePreviewFileTab['resolveImage']>;
@@ -11,4 +11,4 @@ export declare const MAX_LINES = 2000;
11
11
  * through `content/download` for the raw bytes: the former returns content as
12
12
  * text, so a binary file only yields mojibake and images or PDFs never render.
13
13
  */
14
- export declare function readFile(client: OvClient, uri: string, options: OvRequestOptions, openParent?: (uri: string) => Promise<void>): Promise<FilePreviewFileTab>;
14
+ export declare function readFile(client: OvClient, uri: string, options: OvRequestOptions, openParent?: (uri: string) => Promise<void>, onSave?: () => void): Promise<FilePreviewFileTab>;
@@ -1,3 +1,4 @@
1
1
  export { FileBrowser } from './file-browser.js';
2
2
  export type { FileBrowserLabels, FileBrowserDashboardLabels, FileBrowserProps, } from './types.js';
3
3
  export type { FileBrowserDashboard } from './dashboard-model.js';
4
+ export type { FileBrowserAclLevel, FileBrowserAclEntry, FileBrowserAclReport, FileBrowserAclContext, FileBrowserAclPrincipalPage, FileBrowserAclOptions, FileBrowserAclLabels, } from './acl-types.js';
@@ -1,10 +1,15 @@
1
1
  declare const messages: {
2
2
  formatCharacterCount: (count: number) => string;
3
+ accessDenied: string;
4
+ traverseOnly: string;
3
5
  empty: string;
4
6
  error: string;
5
7
  retry: string;
6
8
  refresh: string;
7
9
  searchPlaceholder: string;
10
+ searchTitle: string;
11
+ searchAction: string;
12
+ searchHint: string;
8
13
  searchEmpty: string;
9
14
  searchFailed: string;
10
15
  loading: string;
@@ -1,10 +1,15 @@
1
1
  declare const messages: {
2
2
  formatCharacterCount: (count: number) => string;
3
+ accessDenied: string;
4
+ traverseOnly: string;
3
5
  empty: string;
4
6
  error: string;
5
7
  retry: string;
6
8
  refresh: string;
7
9
  searchPlaceholder: string;
10
+ searchTitle: string;
11
+ searchAction: string;
12
+ searchHint: string;
8
13
  searchEmpty: string;
9
14
  searchFailed: string;
10
15
  loading: string;