@webx-ui/module-media 0.0.1
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/LICENSE +21 -0
- package/README.md +86 -0
- package/dist/DirectoryTree.d.ts +21 -0
- package/dist/FileGrid.d.ts +33 -0
- package/dist/MediaField.d.ts +28 -0
- package/dist/MediaManager.d.ts +29 -0
- package/dist/MediaPage.d.ts +2 -0
- package/dist/MediaPicker.d.ts +19 -0
- package/dist/MediaToolbar.d.ts +38 -0
- package/dist/MoveDialog.d.ts +15 -0
- package/dist/NameDialog.d.ts +20 -0
- package/dist/api.d.ts +23 -0
- package/dist/i18n.d.ts +8 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.js +985 -0
- package/dist/index.js.map +1 -0
- package/dist/messages.d.ts +9 -0
- package/dist/openMediaPicker.d.ts +21 -0
- package/dist/style.css +1 -0
- package/dist/types.d.ts +83 -0
- package/package.json +66 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 webx-ui
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# @webx-ui/module-media
|
|
2
|
+
|
|
3
|
+
The file manager of a [WebX UI](https://github.com/webx-ui/webx-ui) admin panel: folders, files,
|
|
4
|
+
uploads, previews and an image editor. Pairs with
|
|
5
|
+
[`webx-ui/module-media`](https://packagist.org/packages/webx-ui/module-media) on the server.
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pnpm add @webx-ui/module-media
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
import { createAdmin } from '@webx-ui/admin'
|
|
13
|
+
import { auth } from '@webx-ui/module-auth'
|
|
14
|
+
import { media } from '@webx-ui/module-media'
|
|
15
|
+
|
|
16
|
+
import '@webx-ui/core/style.css'
|
|
17
|
+
import '@webx-ui/admin/style.css'
|
|
18
|
+
import '@webx-ui/module-media/style.css'
|
|
19
|
+
|
|
20
|
+
createAdmin({
|
|
21
|
+
basePath: '/cms',
|
|
22
|
+
modules: [media()],
|
|
23
|
+
plugins: [auth()],
|
|
24
|
+
}).mount()
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
The section appears once both halves are installed — the server reports the module, and this
|
|
28
|
+
lists its front end.
|
|
29
|
+
|
|
30
|
+
## Picking a file from a form
|
|
31
|
+
|
|
32
|
+
```ts
|
|
33
|
+
import { openMediaPicker } from '@webx-ui/module-media'
|
|
34
|
+
|
|
35
|
+
const file = await openMediaPicker({ accept: 'image' })
|
|
36
|
+
// `undefined` when the dialog was closed.
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Or as a field, which keeps the words this entity uses for the picture beside the reference to it:
|
|
40
|
+
|
|
41
|
+
```vue
|
|
42
|
+
<script setup lang="ts">
|
|
43
|
+
import { ref } from 'vue'
|
|
44
|
+
import { WxMediaField, type MediaValue } from '@webx-ui/module-media'
|
|
45
|
+
|
|
46
|
+
const cover = ref<MediaValue | null>(null)
|
|
47
|
+
</script>
|
|
48
|
+
|
|
49
|
+
<template>
|
|
50
|
+
<wx-media-field v-model="cover" label="Cover" />
|
|
51
|
+
</template>
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
`MediaValue` is `{ path, alt, title }`. **`alt` and `title` belong to the entity, not to the
|
|
55
|
+
file** — one picture used by two articles needs two captions. The address is worked out from
|
|
56
|
+
`path` when the page is drawn, so the library can move to another disk without touching a single
|
|
57
|
+
article.
|
|
58
|
+
|
|
59
|
+
## What it draws
|
|
60
|
+
|
|
61
|
+
`WxMediaManager` is the section itself: a folder tree, a grid of cards with rubber-band
|
|
62
|
+
selection, upload, search, a type filter and paging. `WxMediaPicker` is the same manager in a
|
|
63
|
+
dialog — deliberately the same, because a picker that browses differently is a second thing to
|
|
64
|
+
learn.
|
|
65
|
+
|
|
66
|
+
Previews come from the server's thumbnail endpoint rather than from the files, so a grid of forty
|
|
67
|
+
photographs is forty thumbnails.
|
|
68
|
+
|
|
69
|
+
Editing a picture sends **operations** — crop, rotate, flip, resize — rather than the canvas's
|
|
70
|
+
own result: the canvas works on a preview, and the server applies them to the original at full
|
|
71
|
+
size, over the same key, so links already written into content keep working. Filters and
|
|
72
|
+
adjustments are switched off until the server can be told about them.
|
|
73
|
+
|
|
74
|
+
## API client
|
|
75
|
+
|
|
76
|
+
```ts
|
|
77
|
+
import { createMediaApi } from '@webx-ui/module-media'
|
|
78
|
+
import { useAdmin } from '@webx-ui/admin'
|
|
79
|
+
|
|
80
|
+
const api = createMediaApi(useAdmin())
|
|
81
|
+
const page = await api.files({ q: 'sofa', type: 'image' })
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Licence
|
|
85
|
+
|
|
86
|
+
MIT.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { MediaDirectory } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* The folders, on the left.
|
|
4
|
+
*
|
|
5
|
+
* The root carries a translated label rather than the title it was given in the database: it is
|
|
6
|
+
* the library itself, and an editor should not have to know it is a row.
|
|
7
|
+
*/
|
|
8
|
+
type __VLS_Props = {
|
|
9
|
+
directories: MediaDirectory[];
|
|
10
|
+
};
|
|
11
|
+
type __VLS_PublicProps = {
|
|
12
|
+
'selected'?: number | null;
|
|
13
|
+
} & __VLS_Props;
|
|
14
|
+
declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
15
|
+
move: (id: number, parentId: number) => any;
|
|
16
|
+
"update:selected": (value: number | null) => any;
|
|
17
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
18
|
+
onMove?: ((id: number, parentId: number) => any) | undefined;
|
|
19
|
+
"onUpdate:selected"?: ((value: number | null) => any) | undefined;
|
|
20
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
21
|
+
export default _default;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { MediaApi } from './api';
|
|
2
|
+
import { MediaFile } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* The files, as cards, with a rubber band over them.
|
|
5
|
+
*
|
|
6
|
+
* Previews come from the server's thumbnail endpoint rather than the files themselves: a grid of
|
|
7
|
+
* forty photographs is forty full-size images otherwise, and on a phone that is the difference
|
|
8
|
+
* between a screen and a wait.
|
|
9
|
+
*/
|
|
10
|
+
type __VLS_Props = {
|
|
11
|
+
files: MediaFile[];
|
|
12
|
+
api: MediaApi;
|
|
13
|
+
query?: string;
|
|
14
|
+
/** A picker takes one file; the manager selects to act on a batch. */
|
|
15
|
+
single?: boolean;
|
|
16
|
+
};
|
|
17
|
+
type __VLS_PublicProps = {
|
|
18
|
+
'selected'?: number[];
|
|
19
|
+
} & __VLS_Props;
|
|
20
|
+
declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
21
|
+
"update:selected": (value: number[]) => any;
|
|
22
|
+
open: (file: MediaFile) => any;
|
|
23
|
+
rename: (file: MediaFile, name: string) => any;
|
|
24
|
+
edit: (file: MediaFile) => any;
|
|
25
|
+
remove: (file: MediaFile) => any;
|
|
26
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
27
|
+
"onUpdate:selected"?: ((value: number[]) => any) | undefined;
|
|
28
|
+
onOpen?: ((file: MediaFile) => any) | undefined;
|
|
29
|
+
onRename?: ((file: MediaFile, name: string) => any) | undefined;
|
|
30
|
+
onEdit?: ((file: MediaFile) => any) | undefined;
|
|
31
|
+
onRemove?: ((file: MediaFile) => any) | undefined;
|
|
32
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
33
|
+
export default _default;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { MediaKind, MediaValue } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* A picture on a form, with the words this entity uses for it.
|
|
4
|
+
*
|
|
5
|
+
* `alt` and `title` live here rather than on the file because one picture is used by two
|
|
6
|
+
* articles and needs two captions. What the field stores is the key and those words; the
|
|
7
|
+
* address is worked out when the page is drawn, so moving the library to another disk changes
|
|
8
|
+
* nothing here.
|
|
9
|
+
*/
|
|
10
|
+
type __VLS_Props = {
|
|
11
|
+
label?: string;
|
|
12
|
+
accept?: MediaKind | null;
|
|
13
|
+
/** Off for a decorative picture, where a caption is noise. */
|
|
14
|
+
captions?: boolean;
|
|
15
|
+
};
|
|
16
|
+
type __VLS_PublicProps = {
|
|
17
|
+
modelValue?: MediaValue | null;
|
|
18
|
+
} & __VLS_Props;
|
|
19
|
+
declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
20
|
+
"update:modelValue": (value: MediaValue | null) => any;
|
|
21
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
22
|
+
"onUpdate:modelValue"?: ((value: MediaValue | null) => any) | undefined;
|
|
23
|
+
}>, {
|
|
24
|
+
label: string;
|
|
25
|
+
accept: MediaKind | null;
|
|
26
|
+
captions: boolean;
|
|
27
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
28
|
+
export default _default;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { MediaFile, MediaKind } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* The library: folders on the left, files on the right, a row of icons over both.
|
|
4
|
+
*
|
|
5
|
+
* Everything the screen does is one request and a reload of the part that changed — there is no
|
|
6
|
+
* cache here on purpose. A library is edited by several people, and a panel that believes its
|
|
7
|
+
* own copy shows a folder that was emptied an hour ago.
|
|
8
|
+
*
|
|
9
|
+
* The width that decides the layout is this component's own, not the window's: the same manager
|
|
10
|
+
* is a page, half of a picker dialog, and a phone.
|
|
11
|
+
*/
|
|
12
|
+
type __VLS_Props = {
|
|
13
|
+
/** A picker hands one file back instead of managing the library. */
|
|
14
|
+
picking?: boolean;
|
|
15
|
+
/** Only these kinds can be chosen, when picking. */
|
|
16
|
+
accept?: MediaKind | null;
|
|
17
|
+
};
|
|
18
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
19
|
+
pick: (file: MediaFile) => any;
|
|
20
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
21
|
+
onPick?: ((file: MediaFile) => any) | undefined;
|
|
22
|
+
}>, {
|
|
23
|
+
picking: boolean;
|
|
24
|
+
accept: MediaKind | null;
|
|
25
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
26
|
+
root: HTMLDivElement;
|
|
27
|
+
picker: HTMLInputElement;
|
|
28
|
+
}, HTMLDivElement>;
|
|
29
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLElement>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { MediaKind } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* The library as a dialog, for a form that needs a picture.
|
|
4
|
+
*
|
|
5
|
+
* The same manager, not a second one: a picker that browses differently from the manager is a
|
|
6
|
+
* second thing to learn and a second thing to keep working.
|
|
7
|
+
*/
|
|
8
|
+
type __VLS_Props = {
|
|
9
|
+
accept?: MediaKind | null;
|
|
10
|
+
title?: string;
|
|
11
|
+
/** Opened to manage the library rather than to choose from it. */
|
|
12
|
+
manage?: boolean;
|
|
13
|
+
};
|
|
14
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
15
|
+
title: string;
|
|
16
|
+
accept: MediaKind | null;
|
|
17
|
+
manage: boolean;
|
|
18
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
19
|
+
export default _default;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { MediaKind } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* One row of icons over the files.
|
|
4
|
+
*
|
|
5
|
+
* Actions rather than labelled buttons: the row has to survive a phone and a picker dialog half
|
|
6
|
+
* the width of a window, and a row of words does not. What each icon means is a tooltip away,
|
|
7
|
+
* and what is chosen is said in the icon's own label.
|
|
8
|
+
*/
|
|
9
|
+
type __VLS_Props = {
|
|
10
|
+
canUpload: boolean;
|
|
11
|
+
canManage: boolean;
|
|
12
|
+
selected: number;
|
|
13
|
+
/** Narrow screens get the folders behind a button instead of beside the files. */
|
|
14
|
+
compact: boolean;
|
|
15
|
+
};
|
|
16
|
+
type __VLS_PublicProps = {
|
|
17
|
+
'search'?: string;
|
|
18
|
+
'type'?: MediaKind | 'all';
|
|
19
|
+
'sort'?: string;
|
|
20
|
+
} & __VLS_Props;
|
|
21
|
+
declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
22
|
+
move: () => any;
|
|
23
|
+
remove: () => any;
|
|
24
|
+
upload: () => any;
|
|
25
|
+
folders: () => any;
|
|
26
|
+
"update:search": (value: string) => any;
|
|
27
|
+
"update:type": (value: MediaKind | "all") => any;
|
|
28
|
+
"update:sort": (value: string) => any;
|
|
29
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
30
|
+
onMove?: (() => any) | undefined;
|
|
31
|
+
onRemove?: (() => any) | undefined;
|
|
32
|
+
onUpload?: (() => any) | undefined;
|
|
33
|
+
onFolders?: (() => any) | undefined;
|
|
34
|
+
"onUpdate:search"?: ((value: string) => any) | undefined;
|
|
35
|
+
"onUpdate:type"?: ((value: MediaKind | "all") => any) | undefined;
|
|
36
|
+
"onUpdate:sort"?: ((value: string) => any) | undefined;
|
|
37
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLElement>;
|
|
38
|
+
export default _default;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { MediaDirectory } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Where to put the selected files.
|
|
4
|
+
*
|
|
5
|
+
* A list of folders rather than a box to type in: an editor knows a folder by its name and its
|
|
6
|
+
* place in the tree, and has no reason to ever learn that it also has a number.
|
|
7
|
+
*/
|
|
8
|
+
type __VLS_Props = {
|
|
9
|
+
directories: MediaDirectory[];
|
|
10
|
+
/** The folder they are in now, which is not worth offering. */
|
|
11
|
+
from?: number | null;
|
|
12
|
+
count: number;
|
|
13
|
+
};
|
|
14
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
export default _default;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A name, asked for properly.
|
|
3
|
+
*
|
|
4
|
+
* `window.prompt` is not an option: a browser is free to refuse it — an embedded frame usually
|
|
5
|
+
* does — and then the button simply does nothing, which is exactly how "new folder" looked.
|
|
6
|
+
*/
|
|
7
|
+
type __VLS_Props = {
|
|
8
|
+
title: string;
|
|
9
|
+
label?: string;
|
|
10
|
+
value?: string;
|
|
11
|
+
confirmText?: string;
|
|
12
|
+
};
|
|
13
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
14
|
+
label: string;
|
|
15
|
+
value: string;
|
|
16
|
+
confirmText: string;
|
|
17
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
18
|
+
input: HTMLDivElement;
|
|
19
|
+
}, any>;
|
|
20
|
+
export default _default;
|
package/dist/api.d.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { AdminContext } from '@webx-ui/admin';
|
|
2
|
+
import { EditOperations, FileQuery, MediaDirectory, MediaFile, MediaPage } from './types';
|
|
3
|
+
export interface MediaApi {
|
|
4
|
+
directories(): Promise<MediaDirectory[]>;
|
|
5
|
+
createDirectory(parentId: number, title: string): Promise<MediaDirectory>;
|
|
6
|
+
renameDirectory(id: number, title: string): Promise<MediaDirectory>;
|
|
7
|
+
moveDirectory(id: number, parentId: number): Promise<MediaDirectory>;
|
|
8
|
+
/** Without `force` the server refuses a folder that holds anything, and says what it holds. */
|
|
9
|
+
deleteDirectory(id: number, force?: boolean): Promise<void>;
|
|
10
|
+
files(query?: FileQuery): Promise<MediaPage>;
|
|
11
|
+
file(id: number): Promise<MediaFile>;
|
|
12
|
+
upload(directoryId: number, files: File[], onProgress?: (percent: number) => void): Promise<MediaFile[]>;
|
|
13
|
+
rename(id: number, name: string): Promise<MediaFile>;
|
|
14
|
+
move(ids: number[], directoryId: number): Promise<number>;
|
|
15
|
+
remove(ids: number[]): Promise<number>;
|
|
16
|
+
removeOne(id: number): Promise<void>;
|
|
17
|
+
edit(id: number, operations: EditOperations): Promise<MediaFile>;
|
|
18
|
+
copy(id: number): Promise<MediaFile>;
|
|
19
|
+
restoreOriginal(id: number): Promise<MediaFile>;
|
|
20
|
+
/** The address of a preview at a size the server allows. */
|
|
21
|
+
thumb(file: MediaFile, width: number, height?: number, fit?: 'cover' | 'contain'): string | null;
|
|
22
|
+
}
|
|
23
|
+
export declare function createMediaApi(admin: AdminContext): MediaApi;
|
package/dist/i18n.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Put this package's English under the panel's dictionary, once per panel.
|
|
3
|
+
*
|
|
4
|
+
* The server's translations land on top of it when they arrive. What this prevents is the half
|
|
5
|
+
* second — or the whole session, in a panel assembled without a server — where a screen shows
|
|
6
|
+
* `manager.upload` instead of a word.
|
|
7
|
+
*/
|
|
8
|
+
export declare function useMediaMessages(): void;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { AdminModule } from '@webx-ui/admin';
|
|
2
|
+
import { mediaMessages } from './messages';
|
|
3
|
+
export interface MediaOptions {
|
|
4
|
+
/** Where the section lives inside the panel. */
|
|
5
|
+
path?: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* The file manager as a section of the panel.
|
|
9
|
+
*
|
|
10
|
+
* The id matches the module the server reports, which is what makes the entry appear in the
|
|
11
|
+
* navigation: a section shows up when both halves are installed, and stays out of the way when
|
|
12
|
+
* only one is.
|
|
13
|
+
*/
|
|
14
|
+
export declare function media(options?: MediaOptions): AdminModule;
|
|
15
|
+
export { mediaMessages };
|
|
16
|
+
export { createMediaApi, type MediaApi } from './api';
|
|
17
|
+
export { openMediaLibrary, openMediaPicker, type MediaPickerOptions } from './openMediaPicker';
|
|
18
|
+
export { default as WxMediaManager } from './MediaManager';
|
|
19
|
+
export { default as WxMediaPage } from './MediaPage';
|
|
20
|
+
export { default as WxMediaPicker } from './MediaPicker';
|
|
21
|
+
export { default as WxMediaField } from './MediaField';
|
|
22
|
+
export type { DirectoryNotEmpty, EditOperations, FileQuery, MediaDirectory, MediaFile, MediaKind, MediaPage, MediaValue, } from './types';
|