@panneau/media 5.0.0-alpha.7 → 5.0.0-alpha.8

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.
@@ -1,6 +1,6 @@
1
1
  import type { ReactNode } from 'react';
2
2
  import type { MediaReference } from '@panneau/protocol';
3
- import type { EditedImage } from './editor/types';
3
+ import type { EditedImage } from './editor/types.js';
4
4
  /** The image of a reference, as the editor reads it, or null when its media can't be edited. */
5
5
  export declare function editedImageOf(reference: MediaReference): EditedImage | null;
6
6
  /**
@@ -1,7 +1,7 @@
1
1
  import type { DataAdapter } from '@panneau/data';
2
2
  import { type FieldEntryProps, type FieldProps, type UploadSource } from '@panneau/fields';
3
3
  import type { Definition, Field, MediaReference } from '@panneau/protocol';
4
- import type { MediaSource } from './picker/types';
4
+ import type { MediaSource } from './picker/types.js';
5
5
  /** What the media field needs from an adapter: `@panneau/data`'s `DataAdapter` has it. */
6
6
  export type MediaAdapter = Pick<DataAdapter, 'create' | 'get'>;
7
7
  export interface MediaFieldBaseProps extends Omit<FieldProps<never>, 'value' | 'onChange'> {
@@ -1,4 +1,4 @@
1
- import type { ImageEditorDialogProps, ImageEditorProps } from './types';
1
+ import type { ImageEditorDialogProps, ImageEditorProps } from './types.js';
2
2
  /**
3
3
  * The image editor (decision 0031): the image as it will be rendered, with the overlay of a tool
4
4
  * over it, the tool's options on the side, and the result. It edits a transform for one use, over
@@ -1,7 +1,7 @@
1
1
  import type { ReactNode } from 'react';
2
2
  import type { MediaTransform } from '@panneau/protocol';
3
- import { type Rect, type Size } from './geometry';
4
- import type { EditedImage, TransformBase } from './types';
3
+ import { type Rect, type Size } from './geometry.js';
4
+ import type { EditedImage, TransformBase } from './types.js';
5
5
  export declare const viewBox: (rect: Rect) => string;
6
6
  /** The media's own transform, or null when it has no edits. */
7
7
  export declare function ownTransform(image: EditedImage): MediaTransform | null;
@@ -1,5 +1,5 @@
1
- export { ImageEditor, ImageEditorDialog } from './ImageEditor';
2
- export { useImageEditorTools } from './tools';
3
- export type { EditedImage, ImageEditorDialogProps, ImageEditorProps, ImageEditorTool, ImageEditorToolContext, TransformBase, } from './types';
4
- export type { Point, Rect, Size } from './geometry';
1
+ export { ImageEditor, ImageEditorDialog } from './ImageEditor.js';
2
+ export { useImageEditorTools } from './tools.js';
3
+ export type { EditedImage, ImageEditorDialogProps, ImageEditorProps, ImageEditorTool, ImageEditorToolContext, TransformBase, } from './types.js';
4
+ export type { Point, Rect, Size } from './geometry.js';
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1,4 +1,4 @@
1
- import type { ImageEditorTool } from './types';
1
+ import type { ImageEditorTool } from './types.js';
2
2
  /**
3
3
  * The tools of the editor by default: crop, rotate (with flips) and focal point. A product passes
4
4
  * them to `ImageEditor`'s `tools` with its own, or without the ones a field doesn't offer.
@@ -1,7 +1,7 @@
1
1
  import type { ReactNode } from 'react';
2
2
  import type { MediaTransform } from '@panneau/protocol';
3
3
  import type { IconComponent } from '@panneau/ui';
4
- import type { Point, Rect, Size } from './geometry';
4
+ import type { Point, Rect, Size } from './geometry.js';
5
5
  /**
6
6
  * What a transform for one use starts from (decision 0031): the media's own transform, or the
7
7
  * original file.
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- export { ImageField, type ImageFieldProps, type ImageOptions, MediaField, type MediaAdapter, type MediaFieldBaseProps, MediaFieldEntry, type MediaFieldProps, type MultipleMediaFieldProps, type SingleMediaFieldProps, getImageOptions, getLibrary, isProcessing, toMediaReference, toMediaReferences, } from './MediaField';
2
- export { mediaPlugin } from './plugin';
3
- export { type MediaLibrary, type MediaSourceAdapter, createResourceMediaSource, } from './resourceSource';
4
- export type { MediaPage, MediaQuery, MediaRequestOptions, MediaSort, MediaSource, MediaType, PickerMedia, } from './picker/types';
1
+ export { ImageField, type ImageFieldProps, type ImageOptions, MediaField, type MediaAdapter, type MediaFieldBaseProps, MediaFieldEntry, type MediaFieldProps, type MultipleMediaFieldProps, type SingleMediaFieldProps, getImageOptions, getLibrary, isProcessing, toMediaReference, toMediaReferences, } from './MediaField.js';
2
+ export { mediaPlugin } from './plugin.js';
3
+ export { type MediaLibrary, type MediaSourceAdapter, createResourceMediaSource, } from './resourceSource.js';
4
+ export type { MediaPage, MediaQuery, MediaRequestOptions, MediaSort, MediaSource, MediaType, PickerMedia, } from './picker/types.js';
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import type { Field } from '@panneau/protocol';
2
- import type { PickerMedia } from './types';
2
+ import type { PickerMedia } from './types.js';
3
3
  export interface MediaDetailsProps {
4
4
  item: PickerMedia | null;
5
5
  /** The fields the details edit: empty when the source can't update its media. */
@@ -1,4 +1,4 @@
1
- import type { PickerMedia } from './types';
1
+ import type { PickerMedia } from './types.js';
2
2
  /** The status badge of a media being processed, or whose processing failed. */
3
3
  export declare function StatusBadge({ item }: {
4
4
  item: PickerMedia;
@@ -1,4 +1,4 @@
1
- import type { MediaPickerProps } from './types';
1
+ import type { MediaPickerProps } from './types.js';
2
2
  /**
3
3
  * The media picker (decision 0027): browse the libraries given as sources, upload to them, and
4
4
  * pick one media, or several with `multiple`. It returns references with their library
@@ -1,6 +1,6 @@
1
1
  import type { Filter, FilterValue } from '@panneau/protocol';
2
- import type { MediaSort } from './types';
3
- import type { BrowseQuery } from './useMediaBrowser';
2
+ import type { MediaSort } from './types.js';
3
+ import type { BrowseQuery } from './useMediaBrowser.js';
4
4
  export interface PickerToolbarProps {
5
5
  query: BrowseQuery;
6
6
  onQueryChange: (query: BrowseQuery) => void;
@@ -1,5 +1,5 @@
1
1
  import type { usePanneauIntl } from '@panneau/ui';
2
- import type { MediaSort, MediaType, PickerMedia } from './types';
2
+ import type { MediaSort, MediaType, PickerMedia } from './types.js';
3
3
  type Intl = ReturnType<typeof usePanneauIntl>;
4
4
  /** The extension of a media's file, in capitals (`JPG`), or its type. */
5
5
  export declare function extensionOf(item: PickerMedia): string;
@@ -1,3 +1,3 @@
1
- export { MediaPicker } from './MediaPicker';
2
- export type { MediaPage, MediaPickerProps, MediaQuery, MediaRequestOptions, MediaSort, MediaSource, MediaType, PickerMedia, } from './types';
1
+ export { MediaPicker } from './MediaPicker.js';
2
+ export type { MediaPage, MediaPickerProps, MediaQuery, MediaRequestOptions, MediaSort, MediaSource, MediaType, PickerMedia, } from './types.js';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import type { FilterValue } from '@panneau/protocol';
2
- import type { MediaQuery, MediaSource, MediaType, PickerMedia } from './types';
2
+ import type { MediaQuery, MediaSource, MediaType, PickerMedia } from './types.js';
3
3
  /** What the user chose to see in a source. */
4
4
  export interface BrowseQuery {
5
5
  q: string;
@@ -1,6 +1,6 @@
1
1
  import type { DataAdapter } from '@panneau/data';
2
2
  import type { Resource } from '@panneau/protocol';
3
- import type { MediaSource } from './picker/types';
3
+ import type { MediaSource } from './picker/types.js';
4
4
  /** What a library source needs of an adapter: `@panneau/data`'s `DataAdapter` has it. */
5
5
  export type MediaSourceAdapter = Pick<DataAdapter, 'list' | 'get' | 'create' | 'update'>;
6
6
  /** The library resource a source reads: a resource of kind `media` of the definition. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@panneau/media",
3
- "version": "5.0.0-alpha.7",
3
+ "version": "5.0.0-alpha.8",
4
4
  "description": "The media of Panneau: the media field, which makes media of uploads and follows their ingest.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -34,9 +34,9 @@
34
34
  "dist"
35
35
  ],
36
36
  "scripts": {
37
- "build": "vite build && tsc -p tsconfig.build.json",
37
+ "build": "vite build && node ../../scripts/declarations.js",
38
38
  "typecheck": "tsc --noEmit",
39
- "api": "tsc -p tsconfig.build.json && node ../../scripts/api-report.js"
39
+ "api": "node ../../scripts/declarations.js && node ../../scripts/api-report.js"
40
40
  },
41
41
  "publishConfig": {
42
42
  "access": "public"
@@ -48,12 +48,12 @@
48
48
  "react-intl": "^12.0.0"
49
49
  },
50
50
  "dependencies": {
51
- "@panneau/core": "5.0.0-alpha.7",
52
- "@panneau/data": "5.0.0-alpha.7",
53
- "@panneau/fields": "5.0.0-alpha.7",
54
- "@panneau/intl": "5.0.0-alpha.7",
55
- "@panneau/protocol": "5.0.0-alpha.7",
56
- "@panneau/ui": "5.0.0-alpha.7",
51
+ "@panneau/core": "5.0.0-alpha.8",
52
+ "@panneau/data": "5.0.0-alpha.8",
53
+ "@panneau/fields": "5.0.0-alpha.8",
54
+ "@panneau/intl": "5.0.0-alpha.8",
55
+ "@panneau/protocol": "5.0.0-alpha.8",
56
+ "@panneau/ui": "5.0.0-alpha.8",
57
57
  "lucide-react": "^1.57.0"
58
58
  }
59
59
  }