@webx-ui/module-media 0.3.0 → 0.4.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/README.md CHANGED
@@ -9,12 +9,12 @@ pnpm add @webx-ui/module-media
9
9
  ```
10
10
 
11
11
  ```ts
12
- import { createAdmin } from '@webx-ui/admin'
12
+ import { createAdmin } from '@webx-ui/module-admin'
13
13
  import { auth } from '@webx-ui/module-auth'
14
14
  import { media } from '@webx-ui/module-media'
15
15
 
16
16
  import '@webx-ui/core/style.css'
17
- import '@webx-ui/admin/style.css'
17
+ import '@webx-ui/module-admin/style.css'
18
18
  import '@webx-ui/module-media/style.css'
19
19
 
20
20
  createAdmin({
@@ -75,7 +75,7 @@ adjustments are switched off until the server can be told about them.
75
75
 
76
76
  ```ts
77
77
  import { createMediaApi } from '@webx-ui/module-media'
78
- import { useAdmin } from '@webx-ui/admin'
78
+ import { useAdmin } from '@webx-ui/module-admin'
79
79
 
80
80
  const api = createMediaApi(useAdmin())
81
81
  const page = await api.files({ q: 'sofa', type: 'image' })
@@ -1,4 +1,4 @@
1
- import { MediaKind, MediaValue } from './types';
1
+ import { MediaAspect, MediaKind, MediaValue } from './types';
2
2
  /**
3
3
  * A picture on a form, with the words this entity uses for it.
4
4
  *
@@ -15,7 +15,15 @@ type __VLS_Props = {
15
15
  accept?: MediaKind | null;
16
16
  /** Off for a decorative picture, where a caption is noise. */
17
17
  captions?: boolean;
18
- /** Height of the frame — a number in pixels, or any CSS length. */
18
+ /**
19
+ * Shape of the frame: one of the presets, any `width / height`, or `null` for a fixed
20
+ * height instead.
21
+ *
22
+ * A field that holds a cover and a field that holds an avatar are not the same shape, and
23
+ * the frame should say which before anything is in it.
24
+ */
25
+ aspect?: MediaAspect | null;
26
+ /** Height of the frame when there is no aspect — a number in pixels, or any CSS length. */
19
27
  height?: number | string;
20
28
  disabled?: boolean;
21
29
  };
@@ -32,5 +40,6 @@ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {},
32
40
  height: number | string;
33
41
  captions: boolean;
34
42
  accept: MediaKind | null;
43
+ aspect: MediaAspect | null;
35
44
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
36
45
  export default _default;
package/dist/api.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { AdminContext } from '@webx-ui/admin';
1
+ import { AdminContext } from '@webx-ui/module-admin';
2
2
  import { EditOperations, FileQuery, MediaDirectory, MediaFile, MediaPage } from './types';
3
3
  export interface MediaApi {
4
4
  directories(): Promise<MediaDirectory[]>;
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { AdminModule } from '@webx-ui/admin';
1
+ import { AdminModule } from '@webx-ui/module-admin';
2
2
  import { mediaMessages } from './messages';
3
3
  export interface MediaOptions {
4
4
  /** Where the section lives inside the panel. */
@@ -19,4 +19,4 @@ export { default as WxMediaManager } from './MediaManager';
19
19
  export { default as WxMediaPage } from './MediaPage';
20
20
  export { default as WxMediaPicker } from './MediaPicker';
21
21
  export { default as WxMediaField } from './MediaField';
22
- export type { DirectoryNotEmpty, EditOperations, FileQuery, MediaDirectory, MediaFile, MediaKind, MediaPage, MediaValue, } from './types';
22
+ export type { DirectoryNotEmpty, EditOperations, FileQuery, MediaDirectory, MediaFile, MediaAspect, MediaKind, MediaPage, MediaValue, } from './types';