@wordpress/list-reusable-blocks 5.40.1-next.v.202602241322.0 → 5.40.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/build-types/components/import-dropdown/index.d.ts +7 -0
- package/build-types/components/import-dropdown/index.d.ts.map +1 -0
- package/build-types/components/import-form/index.d.ts +7 -0
- package/build-types/components/import-form/index.d.ts.map +1 -0
- package/build-types/index.d.ts +2 -0
- package/build-types/index.d.ts.map +1 -0
- package/build-types/utils/export.d.ts +8 -0
- package/build-types/utils/export.d.ts.map +1 -0
- package/build-types/utils/file.d.ts +8 -0
- package/build-types/utils/file.d.ts.map +1 -0
- package/build-types/utils/import.d.ts +10 -0
- package/build-types/utils/import.d.ts.map +1 -0
- package/build-types/utils/types.d.ts +45 -0
- package/build-types/utils/types.d.ts.map +1 -0
- package/package.json +9 -9
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internal dependencies
|
|
3
|
+
*/
|
|
4
|
+
import type { ImportDropdownProps } from '../../utils/types';
|
|
5
|
+
declare function ImportDropdown({ onUpload }: ImportDropdownProps): import("react").JSX.Element;
|
|
6
|
+
export default ImportDropdown;
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/import-dropdown/index.tsx"],"names":[],"mappings":"AAOA;;GAEG;AACH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAG7D,iBAAS,cAAc,CAAE,EAAE,QAAQ,EAAE,EAAE,mBAAmB,+BAqBzD;eAEc,cAAc"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ImportFormProps } from '../../utils/types';
|
|
2
|
+
declare function ImportForm({ instanceId, onUpload }: ImportFormProps): import("react").JSX.Element;
|
|
3
|
+
declare const _default: (props: import("@wordpress/compose").WithoutInjectedProps<typeof ImportForm, {
|
|
4
|
+
instanceId: string | number;
|
|
5
|
+
}>) => import("react").JSX.Element;
|
|
6
|
+
export default _default;
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/import-form/index.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,eAAe,EAAiB,MAAM,mBAAmB,CAAC;AAExE,iBAAS,UAAU,CAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,EAAE,eAAe,+BAqF7D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"export.d.ts","sourceRoot":"","sources":["../../src/utils/export.ts"],"names":[],"mappings":"AAgBA;;;;GAIG;AACH,iBAAe,mBAAmB,CAAE,EAAE,EAAE,MAAM,GAAI,OAAO,CAAE,IAAI,CAAE,CA2BhE;eAEc,mBAAmB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../src/utils/file.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,YAAY,CAAE,IAAI,EAAE,IAAI,GAAI,OAAO,CAAE,MAAM,CAAE,CAQ5D"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ReusableBlock } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Import a reusable block from a JSON file.
|
|
4
|
+
*
|
|
5
|
+
* @param file - File to import
|
|
6
|
+
* @return Promise returning the imported reusable block
|
|
7
|
+
*/
|
|
8
|
+
declare function importReusableBlock(file: File): Promise<ReusableBlock>;
|
|
9
|
+
export default importReusableBlock;
|
|
10
|
+
//# sourceMappingURL=import.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"import.d.ts","sourceRoot":"","sources":["../../src/utils/import.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAGX,aAAa,EAEb,MAAM,SAAS,CAAC;AAEjB;;;;;GAKG;AACH,iBAAe,mBAAmB,CAAE,IAAI,EAAE,IAAI,GAAI,OAAO,CAAE,aAAa,CAAE,CAyCzE;eAEc,mBAAmB"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import type { Post as CorePost, Type } from '@wordpress/core-data';
|
|
5
|
+
export interface ImportDropdownProps {
|
|
6
|
+
onUpload: (data: ReusableBlock) => void;
|
|
7
|
+
}
|
|
8
|
+
export interface ImportFormProps {
|
|
9
|
+
instanceId: string | number;
|
|
10
|
+
onUpload: (reusableBlock: ReusableBlock) => void;
|
|
11
|
+
}
|
|
12
|
+
export type PostType = Type;
|
|
13
|
+
export type Post = CorePost & {
|
|
14
|
+
wp_pattern_sync_status?: string;
|
|
15
|
+
};
|
|
16
|
+
export interface ParsedContent {
|
|
17
|
+
__file: string;
|
|
18
|
+
title: string;
|
|
19
|
+
content: string;
|
|
20
|
+
syncStatus?: string;
|
|
21
|
+
[key: string]: unknown;
|
|
22
|
+
}
|
|
23
|
+
export interface ReusableBlockMeta {
|
|
24
|
+
wp_pattern_sync_status?: string;
|
|
25
|
+
}
|
|
26
|
+
export interface ReusableBlockData {
|
|
27
|
+
title: string;
|
|
28
|
+
content: string;
|
|
29
|
+
status: string;
|
|
30
|
+
meta?: ReusableBlockMeta;
|
|
31
|
+
}
|
|
32
|
+
export interface ReusableBlock {
|
|
33
|
+
id: number;
|
|
34
|
+
title: {
|
|
35
|
+
raw: string;
|
|
36
|
+
rendered: string;
|
|
37
|
+
};
|
|
38
|
+
content: {
|
|
39
|
+
raw: string;
|
|
40
|
+
rendered: string;
|
|
41
|
+
};
|
|
42
|
+
status: string;
|
|
43
|
+
[key: string]: unknown;
|
|
44
|
+
}
|
|
45
|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AM,CAAC;KACjB,CAAC;IACF,MAAM,EAAE,MAAM,CAAC;IACf,CAAE,GAAG,EAAE,MAAM,GAAI,OAAO,CAAC;CACzB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/list-reusable-blocks",
|
|
3
|
-
"version": "5.40.1
|
|
3
|
+
"version": "5.40.1",
|
|
4
4
|
"description": "Adding Export/Import support to the reusable blocks listing.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -43,13 +43,13 @@
|
|
|
43
43
|
},
|
|
44
44
|
"wpScript": true,
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@wordpress/api-fetch": "^7.40.1
|
|
47
|
-
"@wordpress/base-styles": "^6.16.1
|
|
48
|
-
"@wordpress/blob": "^4.40.1
|
|
49
|
-
"@wordpress/components": "^32.
|
|
50
|
-
"@wordpress/compose": "^7.40.1
|
|
51
|
-
"@wordpress/element": "^6.40.1
|
|
52
|
-
"@wordpress/i18n": "^6.13.1
|
|
46
|
+
"@wordpress/api-fetch": "^7.40.1",
|
|
47
|
+
"@wordpress/base-styles": "^6.16.1",
|
|
48
|
+
"@wordpress/blob": "^4.40.1",
|
|
49
|
+
"@wordpress/components": "^32.2.1",
|
|
50
|
+
"@wordpress/compose": "^7.40.1",
|
|
51
|
+
"@wordpress/element": "^6.40.1",
|
|
52
|
+
"@wordpress/i18n": "^6.13.1",
|
|
53
53
|
"change-case": "^4.1.2"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"publishConfig": {
|
|
60
60
|
"access": "public"
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "adb6623c9f32490cfc73c7ac7f122578c1f10c65"
|
|
63
63
|
}
|