@orthacms/media-admin 0.4.3 → 0.5.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/package.json +10 -10
- package/dist/lib/components/MediaBreadcrumbs/index.d.ts +0 -11
- package/dist/lib/components/MediaBreadcrumbs/index.d.ts.map +0 -1
- package/dist/lib/components/MediaTable/MediaAssetRow/index.d.ts +0 -17
- package/dist/lib/components/MediaTable/MediaAssetRow/index.d.ts.map +0 -1
- package/dist/lib/components/MediaTable/MediaFolderRow/index.d.ts +0 -16
- package/dist/lib/components/MediaTable/MediaFolderRow/index.d.ts.map +0 -1
- package/dist/lib/components/MediaTable/index.d.ts +0 -26
- package/dist/lib/components/MediaTable/index.d.ts.map +0 -1
- package/dist/lib/hooks/useWysiwygAssetPicker/index.d.ts +0 -23
- package/dist/lib/hooks/useWysiwygAssetPicker/index.d.ts.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orthacms/media-admin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"description": "@orthacms/media-admin — part of Ortha CMS.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://github.com/ortha-source/ortha-cms/tree/main/packages/media/admin",
|
|
@@ -25,15 +25,15 @@
|
|
|
25
25
|
"dist"
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@orthacms/bootstrap-admin": "^0.
|
|
29
|
-
"@orthacms/content-admin": "^0.
|
|
30
|
-
"@orthacms/content-domain": "^0.
|
|
31
|
-
"@orthacms/design-system": "^0.
|
|
32
|
-
"@orthacms/identity-admin": "^0.
|
|
33
|
-
"@orthacms/insights-admin": "^0.
|
|
34
|
-
"@orthacms/utils-admin": "^0.
|
|
35
|
-
"@orthacms/workspaces-admin": "^0.
|
|
36
|
-
"@orthacms/wysiwyg-admin": "^0.
|
|
28
|
+
"@orthacms/bootstrap-admin": "^0.5.1",
|
|
29
|
+
"@orthacms/content-admin": "^0.5.1",
|
|
30
|
+
"@orthacms/content-domain": "^0.5.1",
|
|
31
|
+
"@orthacms/design-system": "^0.5.1",
|
|
32
|
+
"@orthacms/identity-admin": "^0.5.1",
|
|
33
|
+
"@orthacms/insights-admin": "^0.5.1",
|
|
34
|
+
"@orthacms/utils-admin": "^0.5.1",
|
|
35
|
+
"@orthacms/workspaces-admin": "^0.5.1",
|
|
36
|
+
"@orthacms/wysiwyg-admin": "^0.5.1",
|
|
37
37
|
"@tanstack/react-query": "^5.0.0",
|
|
38
38
|
"lucide-react": "^1.17.0",
|
|
39
39
|
"react-intl": "^7.0.0",
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { MediaFolder } from '../../types/mediaFolder';
|
|
2
|
-
/**
|
|
3
|
-
* The folder path above the browser — "All media" followed by each ancestor up
|
|
4
|
-
* to the open folder, chevron-separated. Every crumb but the last is a button
|
|
5
|
-
* that navigates to that folder; the last is the current location (not a link).
|
|
6
|
-
*/
|
|
7
|
-
export declare function MediaBreadcrumbs({ breadcrumbs, onNavigate }: {
|
|
8
|
-
breadcrumbs: MediaFolder[];
|
|
9
|
-
onNavigate: (folderId: string) => void;
|
|
10
|
-
}): import("react").JSX.Element;
|
|
11
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/MediaBreadcrumbs/index.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAQ3D;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,EAC7B,WAAW,EACX,UAAU,EACb,EAAE;IACC,WAAW,EAAE,WAAW,EAAE,CAAC;IAC3B,UAAU,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;CAC1C,+BA8CA"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { MediaAsset } from '../../../types/mediaAsset';
|
|
2
|
-
import { type AssetActionKind } from '../../AssetActionsMenu';
|
|
3
|
-
/**
|
|
4
|
-
* One asset row in the list view — a leading select checkbox, a mini thumbnail +
|
|
5
|
-
* clickable name, the kind badge, size, dimensions, and last-modified date, plus
|
|
6
|
-
* the shared ⋯ menu. Clicking the name opens the detail drawer.
|
|
7
|
-
*/
|
|
8
|
-
export declare function MediaAssetRow({ asset, selected, onToggleSelect, onAction, canCreate, canUpdate, canDelete }: {
|
|
9
|
-
asset: MediaAsset;
|
|
10
|
-
selected: boolean;
|
|
11
|
-
onToggleSelect: (id: string) => void;
|
|
12
|
-
onAction: (kind: AssetActionKind, asset: MediaAsset) => void;
|
|
13
|
-
canCreate: boolean;
|
|
14
|
-
canUpdate: boolean;
|
|
15
|
-
canDelete: boolean;
|
|
16
|
-
}): import("react").JSX.Element;
|
|
17
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/components/MediaTable/MediaAssetRow/index.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAG5D,OAAO,EAEH,KAAK,eAAe,EACvB,MAAM,wBAAwB,CAAC;AAWhC;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,EAC1B,KAAK,EACL,QAAQ,EACR,cAAc,EACd,QAAQ,EACR,SAAS,EACT,SAAS,EACT,SAAS,EACZ,EAAE;IACC,KAAK,EAAE,UAAU,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,cAAc,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,QAAQ,EAAE,CAAC,IAAI,EAAE,eAAe,EAAE,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;IAC7D,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;CACtB,+BA6EA"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { MediaFolder } from '../../../types/mediaFolder';
|
|
2
|
-
/**
|
|
3
|
-
* One folder row in the list view — a folder glyph + clickable name that opens
|
|
4
|
-
* the folder, a "Folder" badge, and its item count, with the shared folder ⋯
|
|
5
|
-
* menu. Folders aren't selectable, so the leading checkbox cell stays empty.
|
|
6
|
-
*/
|
|
7
|
-
export declare function MediaFolderRow({ folder, assetCount, onOpen, onRename, onDelete, canUpdate, canDelete }: {
|
|
8
|
-
folder: MediaFolder;
|
|
9
|
-
assetCount: number;
|
|
10
|
-
onOpen: (folderId: string) => void;
|
|
11
|
-
onRename: (folder: MediaFolder) => void;
|
|
12
|
-
onDelete: (folder: MediaFolder) => void;
|
|
13
|
-
canUpdate: boolean;
|
|
14
|
-
canDelete: boolean;
|
|
15
|
-
}): import("react").JSX.Element;
|
|
16
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/components/MediaTable/MediaFolderRow/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAc9D;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,EAC3B,MAAM,EACN,UAAU,EACV,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,SAAS,EACZ,EAAE;IACC,MAAM,EAAE,WAAW,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,QAAQ,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;IACxC,QAAQ,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;IACxC,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;CACtB,+BA+DA"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import type { MediaAsset } from '../../types/mediaAsset';
|
|
2
|
-
import type { MediaFolder } from '../../types/mediaFolder';
|
|
3
|
-
import type { AssetActionKind } from '../AssetActionsMenu';
|
|
4
|
-
/**
|
|
5
|
-
* The list view of the open folder — a table with folder rows above asset rows.
|
|
6
|
-
* The header carries a select-all checkbox (toggling every visible asset) and
|
|
7
|
-
* columns that progressively hide on narrower viewports. Purely presentational:
|
|
8
|
-
* selection and actions dispatch up to the page.
|
|
9
|
-
*/
|
|
10
|
-
export declare function MediaTable({ folders, assets, folderCounts, selectedIds, allSelected, onToggleAll, onOpenFolder, onRenameFolder, onDeleteFolder, onToggleSelect, onAssetAction, canCreate, canUpdate, canDelete }: {
|
|
11
|
-
folders: MediaFolder[];
|
|
12
|
-
assets: MediaAsset[];
|
|
13
|
-
folderCounts: Map<string, number>;
|
|
14
|
-
selectedIds: Set<string>;
|
|
15
|
-
allSelected: boolean;
|
|
16
|
-
onToggleAll: () => void;
|
|
17
|
-
onOpenFolder: (folderId: string) => void;
|
|
18
|
-
onRenameFolder: (folder: MediaFolder) => void;
|
|
19
|
-
onDeleteFolder: (folder: MediaFolder) => void;
|
|
20
|
-
onToggleSelect: (id: string) => void;
|
|
21
|
-
onAssetAction: (kind: AssetActionKind, asset: MediaAsset) => void;
|
|
22
|
-
canCreate: boolean;
|
|
23
|
-
canUpdate: boolean;
|
|
24
|
-
canDelete: boolean;
|
|
25
|
-
}): import("react").JSX.Element;
|
|
26
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/MediaTable/index.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAe3D;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,EACvB,OAAO,EACP,MAAM,EACN,YAAY,EACZ,WAAW,EACX,WAAW,EACX,WAAW,EACX,YAAY,EACZ,cAAc,EACd,cAAc,EACd,cAAc,EACd,aAAa,EACb,SAAS,EACT,SAAS,EACT,SAAS,EACZ,EAAE;IACC,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,MAAM,EAAE,UAAU,EAAE,CAAC;IACrB,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAClC,WAAW,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACzB,WAAW,EAAE,OAAO,CAAC;IACrB,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,YAAY,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,cAAc,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;IAC9C,cAAc,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;IAC9C,cAAc,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,aAAa,EAAE,CAAC,IAAI,EAAE,eAAe,EAAE,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;IAClE,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;CACtB,+BAuEA"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { AssetPicker } from '@ortha-cms/content-admin';
|
|
2
|
-
/** Stable id of this contribution, so the slot registration reads once. */
|
|
3
|
-
export declare const WYSIWYG_ASSET_PICKER_ID = "media.assetPicker";
|
|
4
|
-
/**
|
|
5
|
-
* The Media Library, offered to content-admin's rich-text field as an
|
|
6
|
-
* {@link AssetPicker} — how an image block in a `wysiwyg` field gets a URL from
|
|
7
|
-
* the library instead of only from a pasted link.
|
|
8
|
-
*
|
|
9
|
-
* The editor's port is a **promise**, and the library's picker is a **dialog**,
|
|
10
|
-
* so this adapts one to the other: `pick()` opens the dialog and parks the
|
|
11
|
-
* resolver until the author confirms or dismisses. Everything a dialog needs to
|
|
12
|
-
* exist — the open flag, the mounted element — stays here; the editor sees one
|
|
13
|
-
* async function and knows nothing about React trees.
|
|
14
|
-
*
|
|
15
|
-
* The picked asset's URL is stored **as the image's `src`**, not as an asset id.
|
|
16
|
-
* That is the whole contract of the field: its value is HTML any consumer can
|
|
17
|
-
* render, with nothing to resolve. It also means an asset deleted from the
|
|
18
|
-
* library leaves a dead image in a document — worth stating plainly, because the
|
|
19
|
-
* alternative (an id the delivery layer resolves) would make the stored value
|
|
20
|
-
* unusable without this CMS.
|
|
21
|
-
*/
|
|
22
|
-
export declare function useWysiwygAssetPicker(): AssetPicker;
|
|
23
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/hooks/useWysiwygAssetPicker/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAqB,MAAM,0BAA0B,CAAC;AAK/E,2EAA2E;AAC3E,eAAO,MAAM,uBAAuB,sBAAsB,CAAC;AAK3D;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,qBAAqB,IAAI,WAAW,CA4CnD"}
|