@wordpress/media-fields 0.23.0 → 0.24.0
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/build/alt_text/index.cjs +31 -57
- package/build/alt_text/index.cjs.map +1 -7
- package/build/attached_to/edit.cjs +98 -133
- package/build/attached_to/edit.cjs.map +1 -7
- package/build/attached_to/index.cjs +33 -38
- package/build/attached_to/index.cjs.map +1 -7
- package/build/attached_to/view.cjs +25 -46
- package/build/attached_to/view.cjs.map +1 -7
- package/build/author/index.cjs +43 -56
- package/build/author/index.cjs.map +1 -7
- package/build/author/view.cjs +67 -74
- package/build/author/view.cjs.map +1 -7
- package/build/caption/index.cjs +21 -39
- package/build/caption/index.cjs.map +1 -7
- package/build/date_added/index.cjs +13 -34
- package/build/date_added/index.cjs.map +1 -7
- package/build/date_modified/index.cjs +13 -34
- package/build/date_modified/index.cjs.map +1 -7
- package/build/description/index.cjs +22 -40
- package/build/description/index.cjs.map +1 -7
- package/build/filename/index.cjs +33 -39
- package/build/filename/index.cjs.map +1 -7
- package/build/filename/view.cjs +23 -51
- package/build/filename/view.cjs.map +1 -7
- package/build/filesize/index.cjs +54 -83
- package/build/filesize/index.cjs.map +1 -7
- package/build/index.cjs +111 -63
- package/build/media_dimensions/index.cjs +19 -42
- package/build/media_dimensions/index.cjs.map +1 -7
- package/build/media_thumbnail/index.cjs +30 -36
- package/build/media_thumbnail/index.cjs.map +1 -7
- package/build/media_thumbnail/view.cjs +117 -162
- package/build/media_thumbnail/view.cjs.map +1 -7
- package/build/mime_type/index.cjs +16 -37
- package/build/mime_type/index.cjs.map +1 -7
- package/build/types.cjs +4 -18
- package/build/utils/get-media-type-from-mime-type.cjs +41 -56
- package/build/utils/get-media-type-from-mime-type.cjs.map +1 -7
- package/build/utils/get-raw-content.cjs +23 -38
- package/build/utils/get-raw-content.cjs.map +1 -7
- package/build/utils/get-rendered-content.cjs +23 -38
- package/build/utils/get-rendered-content.cjs.map +1 -7
- package/build-module/alt_text/index.mjs +25 -35
- package/build-module/alt_text/index.mjs.map +1 -7
- package/build-module/attached_to/edit.mjs +88 -110
- package/build-module/attached_to/edit.mjs.map +1 -7
- package/build-module/attached_to/index.mjs +12 -14
- package/build-module/attached_to/index.mjs.map +1 -7
- package/build-module/attached_to/view.mjs +19 -24
- package/build-module/attached_to/view.mjs.map +1 -7
- package/build-module/author/index.mjs +23 -32
- package/build-module/author/index.mjs.map +1 -7
- package/build-module/author/view.mjs +47 -53
- package/build-module/author/view.mjs.map +1 -7
- package/build-module/caption/index.mjs +16 -18
- package/build-module/caption/index.mjs.map +1 -7
- package/build-module/date_added/index.mjs +10 -14
- package/build-module/date_added/index.mjs.map +1 -7
- package/build-module/date_modified/index.mjs +10 -14
- package/build-module/date_modified/index.mjs.map +1 -7
- package/build-module/description/index.mjs +16 -18
- package/build-module/description/index.mjs.map +1 -7
- package/build-module/filename/index.mjs +13 -15
- package/build-module/filename/index.mjs.map +1 -7
- package/build-module/filename/view.mjs +16 -28
- package/build-module/filename/view.mjs.map +1 -7
- package/build-module/filesize/index.mjs +50 -63
- package/build-module/filesize/index.mjs.map +1 -7
- package/build-module/index.mjs +13 -28
- package/build-module/media_dimensions/index.mjs +15 -22
- package/build-module/media_dimensions/index.mjs.map +1 -7
- package/build-module/media_thumbnail/index.mjs +11 -13
- package/build-module/media_thumbnail/index.mjs.map +1 -7
- package/build-module/media_thumbnail/view.mjs +94 -136
- package/build-module/media_thumbnail/view.mjs.map +1 -7
- package/build-module/mime_type/index.mjs +13 -17
- package/build-module/mime_type/index.mjs.map +1 -7
- package/build-module/types.mjs +0 -1
- package/build-module/utils/get-media-type-from-mime-type.mjs +37 -32
- package/build-module/utils/get-media-type-from-mime-type.mjs.map +1 -7
- package/build-module/utils/get-raw-content.mjs +19 -14
- package/build-module/utils/get-raw-content.mjs.map +1 -7
- package/build-module/utils/get-rendered-content.mjs +19 -14
- package/build-module/utils/get-rendered-content.mjs.map +1 -7
- package/package.json +14 -14
- package/build/index.cjs.map +0 -7
- package/build/types.cjs.map +0 -7
- package/build-module/index.mjs.map +0 -7
- package/build-module/types.mjs.map +0 -7
package/build-module/types.mjs
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=types.mjs.map
|
|
@@ -1,35 +1,40 @@
|
|
|
1
|
-
// packages/media-fields/src/utils/get-media-type-from-mime-type.ts
|
|
2
1
|
import { __ } from "@wordpress/i18n";
|
|
3
|
-
import { audio,
|
|
2
|
+
import { audio, file, image, video } from "@wordpress/icons";
|
|
3
|
+
// packages/media-fields/src/utils/get-media-type-from-mime-type.ts
|
|
4
|
+
/**
|
|
5
|
+
* Get the media type from a mime type, including an icon.
|
|
6
|
+
* TODO - media types should be formalized somewhere.
|
|
7
|
+
*
|
|
8
|
+
* References:
|
|
9
|
+
* https://developer.wordpress.org/reference/functions/wp_mime_type_icon/
|
|
10
|
+
* https://developer.wordpress.org/reference/hooks/mime_types/
|
|
11
|
+
* https://developer.wordpress.org/reference/functions/wp_get_mime_types/
|
|
12
|
+
*
|
|
13
|
+
* @param mimeType - The mime type to get the media type from.
|
|
14
|
+
* @return The media type.
|
|
15
|
+
*/
|
|
4
16
|
function getMediaTypeFromMimeType(mimeType) {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
return {
|
|
27
|
-
type: "application",
|
|
28
|
-
label: __("Application"),
|
|
29
|
-
icon: file
|
|
30
|
-
};
|
|
17
|
+
if (mimeType.startsWith("image/")) return {
|
|
18
|
+
type: "image",
|
|
19
|
+
label: __("Image"),
|
|
20
|
+
icon: image
|
|
21
|
+
};
|
|
22
|
+
if (mimeType.startsWith("video/")) return {
|
|
23
|
+
type: "video",
|
|
24
|
+
label: __("Video"),
|
|
25
|
+
icon: video
|
|
26
|
+
};
|
|
27
|
+
if (mimeType.startsWith("audio/")) return {
|
|
28
|
+
type: "audio",
|
|
29
|
+
label: __("Audio"),
|
|
30
|
+
icon: audio
|
|
31
|
+
};
|
|
32
|
+
return {
|
|
33
|
+
type: "application",
|
|
34
|
+
label: __("Application"),
|
|
35
|
+
icon: file
|
|
36
|
+
};
|
|
31
37
|
}
|
|
32
|
-
export {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
//# sourceMappingURL=get-media-type-from-mime-type.mjs.map
|
|
38
|
+
export { getMediaTypeFromMimeType };
|
|
39
|
+
|
|
40
|
+
//# sourceMappingURL=get-media-type-from-mime-type.mjs.map
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/utils/get-media-type-from-mime-type.ts"],
|
|
4
|
-
"sourcesContent": ["import { __ } from '@wordpress/i18n';\nimport { audio, video, image, file } from '@wordpress/icons';\nimport type { MediaType } from '../types';\n\n/**\n * Get the media type from a mime type, including an icon.\n * TODO - media types should be formalized somewhere.\n *\n * References:\n * https://developer.wordpress.org/reference/functions/wp_mime_type_icon/\n * https://developer.wordpress.org/reference/hooks/mime_types/\n * https://developer.wordpress.org/reference/functions/wp_get_mime_types/\n *\n * @param mimeType - The mime type to get the media type from.\n * @return The media type.\n */\nexport function getMediaTypeFromMimeType( mimeType: string ): MediaType {\n\tif ( mimeType.startsWith( 'image/' ) ) {\n\t\treturn {\n\t\t\ttype: 'image',\n\t\t\tlabel: __( 'Image' ),\n\t\t\ticon: image,\n\t\t};\n\t}\n\n\tif ( mimeType.startsWith( 'video/' ) ) {\n\t\treturn {\n\t\t\ttype: 'video',\n\t\t\tlabel: __( 'Video' ),\n\t\t\ticon: video,\n\t\t};\n\t}\n\n\tif ( mimeType.startsWith( 'audio/' ) ) {\n\t\treturn {\n\t\t\ttype: 'audio',\n\t\t\tlabel: __( 'Audio' ),\n\t\t\ticon: audio,\n\t\t};\n\t}\n\n\treturn {\n\t\ttype: 'application',\n\t\tlabel: __( 'Application' ),\n\t\ticon: file,\n\t};\n}\n"],
|
|
5
|
-
"mappings": ";AAAA,SAAS,UAAU;AACnB,SAAS,OAAO,OAAO,OAAO,YAAY;AAenC,SAAS,yBAA0B,UAA8B;AACvE,MAAK,SAAS,WAAY,QAAS,GAAI;AACtC,WAAO;AAAA,MACN,MAAM;AAAA,MACN,OAAO,GAAI,OAAQ;AAAA,MACnB,MAAM;AAAA,IACP;AAAA,EACD;AAEA,MAAK,SAAS,WAAY,QAAS,GAAI;AACtC,WAAO;AAAA,MACN,MAAM;AAAA,MACN,OAAO,GAAI,OAAQ;AAAA,MACnB,MAAM;AAAA,IACP;AAAA,EACD;AAEA,MAAK,SAAS,WAAY,QAAS,GAAI;AACtC,WAAO;AAAA,MACN,MAAM;AAAA,MACN,OAAO,GAAI,OAAQ;AAAA,MACnB,MAAM;AAAA,IACP;AAAA,EACD;AAEA,SAAO;AAAA,IACN,MAAM;AAAA,IACN,OAAO,GAAI,aAAc;AAAA,IACzB,MAAM;AAAA,EACP;AACD;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
1
|
+
{"version":3,"file":"get-media-type-from-mime-type.mjs","names":[],"sources":["../../src/utils/get-media-type-from-mime-type.ts"],"sourcesContent":["import { __ } from '@wordpress/i18n';\nimport { audio, video, image, file } from '@wordpress/icons';\nimport type { MediaType } from '../types';\n\n/**\n * Get the media type from a mime type, including an icon.\n * TODO - media types should be formalized somewhere.\n *\n * References:\n * https://developer.wordpress.org/reference/functions/wp_mime_type_icon/\n * https://developer.wordpress.org/reference/hooks/mime_types/\n * https://developer.wordpress.org/reference/functions/wp_get_mime_types/\n *\n * @param mimeType - The mime type to get the media type from.\n * @return The media type.\n */\nexport function getMediaTypeFromMimeType( mimeType: string ): MediaType {\n\tif ( mimeType.startsWith( 'image/' ) ) {\n\t\treturn {\n\t\t\ttype: 'image',\n\t\t\tlabel: __( 'Image' ),\n\t\t\ticon: image,\n\t\t};\n\t}\n\n\tif ( mimeType.startsWith( 'video/' ) ) {\n\t\treturn {\n\t\t\ttype: 'video',\n\t\t\tlabel: __( 'Video' ),\n\t\t\ticon: video,\n\t\t};\n\t}\n\n\tif ( mimeType.startsWith( 'audio/' ) ) {\n\t\treturn {\n\t\t\ttype: 'audio',\n\t\t\tlabel: __( 'Audio' ),\n\t\t\ticon: audio,\n\t\t};\n\t}\n\n\treturn {\n\t\ttype: 'application',\n\t\tlabel: __( 'Application' ),\n\t\ticon: file,\n\t};\n}\n"],"mappings":";;;;;;;;;;;;;;;AAgBA,SAAgB,yBAA0B,UAA8B;CACvE,IAAK,SAAS,WAAY,QAAS,GAClC,OAAO;EACN,MAAM;EACN,OAAO,GAAI,OAAQ;EACnB,MAAM;CACP;CAGD,IAAK,SAAS,WAAY,QAAS,GAClC,OAAO;EACN,MAAM;EACN,OAAO,GAAI,OAAQ;EACnB,MAAM;CACP;CAGD,IAAK,SAAS,WAAY,QAAS,GAClC,OAAO;EACN,MAAM;EACN,OAAO,GAAI,OAAQ;EACnB,MAAM;CACP;CAGD,OAAO;EACN,MAAM;EACN,OAAO,GAAI,aAAc;EACzB,MAAM;CACP;AACD"}
|
|
@@ -1,17 +1,22 @@
|
|
|
1
1
|
// packages/media-fields/src/utils/get-raw-content.ts
|
|
2
|
+
/**
|
|
3
|
+
* Utility function to extract raw content from either a string or an object
|
|
4
|
+
* containing raw and rendered properties.
|
|
5
|
+
*
|
|
6
|
+
* This handles the inconsistency in WordPress REST API responses where
|
|
7
|
+
* some fields like caption and description can be either:
|
|
8
|
+
* - A simple string
|
|
9
|
+
* - An object with { raw: string, rendered: string }
|
|
10
|
+
*
|
|
11
|
+
* @param content - The content to extract raw value from
|
|
12
|
+
* @return The raw content string, or empty string if content is falsy
|
|
13
|
+
*/
|
|
2
14
|
function getRawContent(content) {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
return content;
|
|
8
|
-
}
|
|
9
|
-
if (typeof content === "object" && "raw" in content) {
|
|
10
|
-
return content.raw || "";
|
|
11
|
-
}
|
|
12
|
-
return "";
|
|
15
|
+
if (!content) return "";
|
|
16
|
+
if (typeof content === "string") return content;
|
|
17
|
+
if (typeof content === "object" && "raw" in content) return content.raw || "";
|
|
18
|
+
return "";
|
|
13
19
|
}
|
|
14
|
-
export {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
//# sourceMappingURL=get-raw-content.mjs.map
|
|
20
|
+
export { getRawContent };
|
|
21
|
+
|
|
22
|
+
//# sourceMappingURL=get-raw-content.mjs.map
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/utils/get-raw-content.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Utility function to extract raw content from either a string or an object\n * containing raw and rendered properties.\n *\n * This handles the inconsistency in WordPress REST API responses where\n * some fields like caption and description can be either:\n * - A simple string\n * - An object with { raw: string, rendered: string }\n *\n * @param content - The content to extract raw value from\n * @return The raw content string, or empty string if content is falsy\n */\nexport function getRawContent(\n\tcontent: string | { raw: string; rendered: string } | undefined | null\n): string {\n\tif ( ! content ) {\n\t\treturn '';\n\t}\n\n\t// If it's a string, return it directly\n\tif ( typeof content === 'string' ) {\n\t\treturn content;\n\t}\n\n\t// If it's an object with raw property, return the raw value\n\tif ( typeof content === 'object' && 'raw' in content ) {\n\t\treturn content.raw || '';\n\t}\n\n\t// Fallback to empty string\n\treturn '';\n}\n"],
|
|
5
|
-
"mappings": ";AAYO,SAAS,cACf,SACS;AACT,MAAK,CAAE,SAAU;AAChB,WAAO;AAAA,EACR;AAGA,MAAK,OAAO,YAAY,UAAW;AAClC,WAAO;AAAA,EACR;AAGA,MAAK,OAAO,YAAY,YAAY,SAAS,SAAU;AACtD,WAAO,QAAQ,OAAO;AAAA,EACvB;AAGA,SAAO;AACR;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
1
|
+
{"version":3,"file":"get-raw-content.mjs","names":[],"sources":["../../src/utils/get-raw-content.ts"],"sourcesContent":["/**\n * Utility function to extract raw content from either a string or an object\n * containing raw and rendered properties.\n *\n * This handles the inconsistency in WordPress REST API responses where\n * some fields like caption and description can be either:\n * - A simple string\n * - An object with { raw: string, rendered: string }\n *\n * @param content - The content to extract raw value from\n * @return The raw content string, or empty string if content is falsy\n */\nexport function getRawContent(\n\tcontent: string | { raw: string; rendered: string } | undefined | null\n): string {\n\tif ( ! content ) {\n\t\treturn '';\n\t}\n\n\t// If it's a string, return it directly\n\tif ( typeof content === 'string' ) {\n\t\treturn content;\n\t}\n\n\t// If it's an object with raw property, return the raw value\n\tif ( typeof content === 'object' && 'raw' in content ) {\n\t\treturn content.raw || '';\n\t}\n\n\t// Fallback to empty string\n\treturn '';\n}\n"],"mappings":";;;;;;;;;;;;;AAYA,SAAgB,cACf,SACS;CACT,IAAK,CAAE,SACN,OAAO;CAIR,IAAK,OAAO,YAAY,UACvB,OAAO;CAIR,IAAK,OAAO,YAAY,YAAY,SAAS,SAC5C,OAAO,QAAQ,OAAO;CAIvB,OAAO;AACR"}
|
|
@@ -1,17 +1,22 @@
|
|
|
1
1
|
// packages/media-fields/src/utils/get-rendered-content.ts
|
|
2
|
+
/**
|
|
3
|
+
* Utility function to extract rendered content from either a string or an object
|
|
4
|
+
* containing raw and rendered properties.
|
|
5
|
+
*
|
|
6
|
+
* This handles the inconsistency in WordPress REST API responses where
|
|
7
|
+
* some fields like caption and description can be either:
|
|
8
|
+
* - A simple string
|
|
9
|
+
* - An object with { raw: string, rendered: string }
|
|
10
|
+
*
|
|
11
|
+
* @param content - The content to extract raw value from
|
|
12
|
+
* @return The rendered content string, falling back to raw or empty string if content is falsy
|
|
13
|
+
*/
|
|
2
14
|
function getRenderedContent(content) {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
return content;
|
|
8
|
-
}
|
|
9
|
-
if (typeof content === "object") {
|
|
10
|
-
return content.rendered || content.raw || "";
|
|
11
|
-
}
|
|
12
|
-
return "";
|
|
15
|
+
if (!content) return "";
|
|
16
|
+
if (typeof content === "string") return content;
|
|
17
|
+
if (typeof content === "object") return content.rendered || content.raw || "";
|
|
18
|
+
return "";
|
|
13
19
|
}
|
|
14
|
-
export {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
//# sourceMappingURL=get-rendered-content.mjs.map
|
|
20
|
+
export { getRenderedContent };
|
|
21
|
+
|
|
22
|
+
//# sourceMappingURL=get-rendered-content.mjs.map
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/utils/get-rendered-content.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Utility function to extract rendered content from either a string or an object\n * containing raw and rendered properties.\n *\n * This handles the inconsistency in WordPress REST API responses where\n * some fields like caption and description can be either:\n * - A simple string\n * - An object with { raw: string, rendered: string }\n *\n * @param content - The content to extract raw value from\n * @return The rendered content string, falling back to raw or empty string if content is falsy\n */\nexport function getRenderedContent(\n\tcontent: string | { raw: string; rendered: string } | undefined | null\n): string {\n\tif ( ! content ) {\n\t\treturn '';\n\t}\n\n\t// If it's a string, return it directly\n\tif ( typeof content === 'string' ) {\n\t\treturn content;\n\t}\n\n\t// If it's an object with raw property, return the raw value\n\tif ( typeof content === 'object' ) {\n\t\treturn content.rendered || content.raw || '';\n\t}\n\n\t// Fallback to empty string\n\treturn '';\n}\n"],
|
|
5
|
-
"mappings": ";AAYO,SAAS,mBACf,SACS;AACT,MAAK,CAAE,SAAU;AAChB,WAAO;AAAA,EACR;AAGA,MAAK,OAAO,YAAY,UAAW;AAClC,WAAO;AAAA,EACR;AAGA,MAAK,OAAO,YAAY,UAAW;AAClC,WAAO,QAAQ,YAAY,QAAQ,OAAO;AAAA,EAC3C;AAGA,SAAO;AACR;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
1
|
+
{"version":3,"file":"get-rendered-content.mjs","names":[],"sources":["../../src/utils/get-rendered-content.ts"],"sourcesContent":["/**\n * Utility function to extract rendered content from either a string or an object\n * containing raw and rendered properties.\n *\n * This handles the inconsistency in WordPress REST API responses where\n * some fields like caption and description can be either:\n * - A simple string\n * - An object with { raw: string, rendered: string }\n *\n * @param content - The content to extract raw value from\n * @return The rendered content string, falling back to raw or empty string if content is falsy\n */\nexport function getRenderedContent(\n\tcontent: string | { raw: string; rendered: string } | undefined | null\n): string {\n\tif ( ! content ) {\n\t\treturn '';\n\t}\n\n\t// If it's a string, return it directly\n\tif ( typeof content === 'string' ) {\n\t\treturn content;\n\t}\n\n\t// If it's an object with raw property, return the raw value\n\tif ( typeof content === 'object' ) {\n\t\treturn content.rendered || content.raw || '';\n\t}\n\n\t// Fallback to empty string\n\treturn '';\n}\n"],"mappings":";;;;;;;;;;;;;AAYA,SAAgB,mBACf,SACS;CACT,IAAK,CAAE,SACN,OAAO;CAIR,IAAK,OAAO,YAAY,UACvB,OAAO;CAIR,IAAK,OAAO,YAAY,UACvB,OAAO,QAAQ,YAAY,QAAQ,OAAO;CAI3C,OAAO;AACR"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/media-fields",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.24.0",
|
|
4
4
|
"description": "Reusable field definitions for displaying and editing media attachment properties in WordPress.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -46,24 +46,24 @@
|
|
|
46
46
|
"src/**/*.scss"
|
|
47
47
|
],
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@wordpress/base-styles": "^
|
|
50
|
-
"@wordpress/components": "^
|
|
51
|
-
"@wordpress/compose": "^9.
|
|
52
|
-
"@wordpress/core-data": "^9.
|
|
53
|
-
"@wordpress/data": "^11.
|
|
54
|
-
"@wordpress/dataviews": "^
|
|
55
|
-
"@wordpress/element": "^10.
|
|
56
|
-
"@wordpress/i18n": "^7.
|
|
57
|
-
"@wordpress/icons": "^
|
|
58
|
-
"@wordpress/ui": "^0.
|
|
59
|
-
"@wordpress/url": "^5.
|
|
49
|
+
"@wordpress/base-styles": "^15.0.0",
|
|
50
|
+
"@wordpress/components": "^44.0.0",
|
|
51
|
+
"@wordpress/compose": "^9.1.0",
|
|
52
|
+
"@wordpress/core-data": "^9.1.0",
|
|
53
|
+
"@wordpress/data": "^11.1.0",
|
|
54
|
+
"@wordpress/dataviews": "^22.0.0",
|
|
55
|
+
"@wordpress/element": "^10.1.0",
|
|
56
|
+
"@wordpress/i18n": "^7.1.0",
|
|
57
|
+
"@wordpress/icons": "^20.0.0",
|
|
58
|
+
"@wordpress/ui": "^0.26.0",
|
|
59
|
+
"@wordpress/url": "^5.1.0",
|
|
60
60
|
"clsx": "^2.1.1"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"@testing-library/dom": "^10.4.2",
|
|
64
64
|
"@testing-library/jest-dom": "^7.0.1",
|
|
65
65
|
"@testing-library/react": "^16.3.3",
|
|
66
|
-
"vitest": "^5.0.
|
|
66
|
+
"vitest": "^5.0.5"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
69
|
"@types/react": "^18 || ^19",
|
|
@@ -82,5 +82,5 @@
|
|
|
82
82
|
"publishConfig": {
|
|
83
83
|
"access": "public"
|
|
84
84
|
},
|
|
85
|
-
"gitHead": "
|
|
85
|
+
"gitHead": "9b70363b9f93cff0583a1f3153738d383cf5a49e"
|
|
86
86
|
}
|
package/build/index.cjs.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/index.ts"],
|
|
4
|
-
"sourcesContent": ["export { default as altTextField } from './alt_text';\nexport { default as attachedToField } from './attached_to';\nexport { default as authorField } from './author';\nexport { default as captionField } from './caption';\nexport { default as dateAddedField } from './date_added';\nexport { default as dateModifiedField } from './date_modified';\nexport { default as descriptionField } from './description';\nexport { default as filenameField } from './filename';\nexport { default as filesizeField } from './filesize';\nexport { default as mediaDimensionsField } from './media_dimensions';\nexport { default as mediaThumbnailField } from './media_thumbnail';\nexport { default as mimeTypeField } from './mime_type';\n\nexport type {\n\tMediaItem,\n\tMediaKind,\n\tMediaType,\n\tMediaItemUpdatable,\n} from './types';\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAwC;AACxC,yBAA2C;AAC3C,oBAAuC;AACvC,qBAAwC;AACxC,wBAA0C;AAC1C,2BAA6C;AAC7C,yBAA4C;AAC5C,sBAAyC;AACzC,sBAAyC;AACzC,8BAAgD;AAChD,6BAA+C;AAC/C,uBAAyC;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
package/build/types.cjs.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/types.ts"],
|
|
4
|
-
"sourcesContent": ["import type { Attachment, Updatable, Post, User } from '@wordpress/core-data';\n\nexport type MediaKind = 'image' | 'video' | 'audio' | 'application';\n\nexport interface MediaType {\n\ttype: MediaKind;\n\tlabel: string;\n\ticon: React.JSX.Element;\n}\n\n// TODO: Update the Attachment type separately.\nexport interface MediaItem extends Attachment< 'edit' > {\n\t// featured_media is not in the Attachment type. See https://github.com/WordPress/gutenberg/blob/trunk/packages/core-data/src/entity-types/attachment.ts#L10\n\tfeatured_media: number;\n\t_embedded?: {\n\t\t// TODO: Include wp:attached-to properly, and backport PHP changes from wordpress-develop to support this.\n\t\t'wp:attached-to'?: Post[] | Partial< Post >[];\n\t\tauthor?: User[] | Partial< User >[];\n\t};\n}\n\nexport type MediaItemUpdatable = Updatable< Attachment >;\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;AAAA;AAAA;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/index.ts"],
|
|
4
|
-
"sourcesContent": ["export { default as altTextField } from './alt_text';\nexport { default as attachedToField } from './attached_to';\nexport { default as authorField } from './author';\nexport { default as captionField } from './caption';\nexport { default as dateAddedField } from './date_added';\nexport { default as dateModifiedField } from './date_modified';\nexport { default as descriptionField } from './description';\nexport { default as filenameField } from './filename';\nexport { default as filesizeField } from './filesize';\nexport { default as mediaDimensionsField } from './media_dimensions';\nexport { default as mediaThumbnailField } from './media_thumbnail';\nexport { default as mimeTypeField } from './mime_type';\n\nexport type {\n\tMediaItem,\n\tMediaKind,\n\tMediaType,\n\tMediaItemUpdatable,\n} from './types';\n"],
|
|
5
|
-
"mappings": ";AAAA,SAAoB,WAAXA,gBAA+B;AACxC,SAAoB,WAAXA,gBAAkC;AAC3C,SAAoB,WAAXA,gBAA8B;AACvC,SAAoB,WAAXA,gBAA+B;AACxC,SAAoB,WAAXA,gBAAiC;AAC1C,SAAoB,WAAXA,gBAAoC;AAC7C,SAAoB,WAAXA,gBAAmC;AAC5C,SAAoB,WAAXA,gBAAgC;AACzC,SAAoB,WAAXA,iBAAgC;AACzC,SAAoB,WAAXA,iBAAuC;AAChD,SAAoB,WAAXA,iBAAsC;AAC/C,SAAoB,WAAXA,iBAAgC;",
|
|
6
|
-
"names": ["default"]
|
|
7
|
-
}
|