@plaudit/gutenberg-api-extensions 2.24.1 → 2.25.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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type SimpleNativeProperty } from "./simple-native-property-api";
|
|
2
|
-
import type { PickableOptions } from "../controls
|
|
2
|
+
import type { PickableOptions } from "../controls";
|
|
3
3
|
import type { ColorPaletteCSNPConfig, ToggleGroupPropertyCSNPConfig } from "./common-native-property-constructors";
|
|
4
4
|
type BaseLayeredBlockStyleLayer = {
|
|
5
5
|
name: string;
|
|
@@ -24,7 +24,7 @@ type LayeredBlockStyleSelectOrRadioLayer = BaseLayeredBlockStyleLayer & {
|
|
|
24
24
|
};
|
|
25
25
|
export type LayeredBlockStyleLayer = LayeredBlockStyleColorLayer | LayeredBlockStyleToggleLayer | LayeredBlockStyleSelectOrRadioLayer;
|
|
26
26
|
export interface LayeredBlockStylesConfig {
|
|
27
|
-
block: `${string}/${string}`;
|
|
27
|
+
block: `${string}/${string}`[] | `${string}/${string}`;
|
|
28
28
|
layers: LayeredBlockStyleLayer[];
|
|
29
29
|
}
|
|
30
30
|
export declare function registerLayeredBlockStyles(config: LayeredBlockStylesConfig): void;
|
|
@@ -2,8 +2,10 @@ import { registerSimpleNativeProperties } from "./simple-native-property-api";
|
|
|
2
2
|
import { installGutenbergExtensions } from "../index";
|
|
3
3
|
export function registerLayeredBlockStyles(config) {
|
|
4
4
|
const layeredBlockStyles = window.plauditLayeredBlockStyles ?? (window.plauditLayeredBlockStyles = new Map());
|
|
5
|
-
const
|
|
6
|
-
|
|
5
|
+
for (const block of Array.isArray(config.block) ? config.block : [config.block]) {
|
|
6
|
+
const existing = layeredBlockStyles.get(block);
|
|
7
|
+
layeredBlockStyles.set(block, existing ? [...existing, ...config.layers] : config.layers);
|
|
8
|
+
}
|
|
7
9
|
registerSimpleNativeProperties({
|
|
8
10
|
block: config.block,
|
|
9
11
|
properties: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layered-styles-api.js","sourceRoot":"","sources":["../../src/blocks/layered-styles-api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,8BAA8B,EAA4B,MAAM,8BAA8B,CAAC;AAQvG,OAAO,EAAC,0BAA0B,EAAC,MAAM,UAAU,CAAC;AA+BpD,MAAM,UAAU,0BAA0B,CAAC,MAAgC;IAC1E,MAAM,kBAAkB,GAAqD,MAAc,CAAC,yBAAyB,IAAI,CAAE,MAAc,CAAC,yBAAyB,GAAG,IAAI,GAAG,EAAE,CAAC,CAAC;IACjL,MAAM,
|
|
1
|
+
{"version":3,"file":"layered-styles-api.js","sourceRoot":"","sources":["../../src/blocks/layered-styles-api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,8BAA8B,EAA4B,MAAM,8BAA8B,CAAC;AAQvG,OAAO,EAAC,0BAA0B,EAAC,MAAM,UAAU,CAAC;AA+BpD,MAAM,UAAU,0BAA0B,CAAC,MAAgC;IAC1E,MAAM,kBAAkB,GAAqD,MAAc,CAAC,yBAAyB,IAAI,CAAE,MAAc,CAAC,yBAAyB,GAAG,IAAI,GAAG,EAAE,CAAC,CAAC;IACjL,KAAK,MAAM,KAAK,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;QACjF,MAAM,QAAQ,GAAG,kBAAkB,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QAC/C,kBAAkB,CAAC,GAAG,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,GAAG,QAAQ,EAAE,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAC3F,CAAC;IACD,8BAA8B,CAAC;QAC9B,KAAK,EAAE,MAAM,CAAC,KAAK;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,EAAC,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,IAAI,EAAC,CAAC;gCAC3D,CAAC;qCAAM,CAAC;oCACP,OAAO,EAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,IAAI,EAAC,CAAC;gCACnD,CAAC;4BACF,CAAC,CAAC;yBACwB,CAAC;oBAC7B,KAAK,OAAO;wBACX,OAAO;4BACN,GAAG,WAAW;4BACd,OAAO,EAAE,OAAO;4BAChB,OAAO,EAAE,KAAK,CAAC,OAAO;4BACtB,WAAW,EAAE,KAAK;yBACS,CAAC;oBAC9B,KAAK,QAAQ;wBACZ,OAAO;4BACN,GAAG,WAAW;4BACd,OAAO,EAAE,QAAQ;4BACjB,OAAO,EAAE,KAAK,CAAC,OAAO;yBACM,CAAC;gBAChC,CAAC;YACF,CAAC,CAAC;SACF;KACD,CAAC,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,gCAAgC;IAC/C,0BAA0B,EAAE,CAAC;AAC9B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plaudit/gutenberg-api-extensions",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.25.0",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"prepublishOnly": "rm -rf build && mkdir build && tsc",
|
|
6
6
|
"build": "tsc",
|
|
@@ -25,25 +25,25 @@
|
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@wordpress/block-editor": "^12.
|
|
29
|
-
"@wordpress/blocks": "^12.
|
|
30
|
-
"@wordpress/components": "^27.
|
|
31
|
-
"@wordpress/compose": "^6.
|
|
32
|
-
"@wordpress/core-data": "^6.
|
|
33
|
-
"@wordpress/data": "^9.
|
|
34
|
-
"@wordpress/editor": "^13.
|
|
35
|
-
"@wordpress/element": "^5.
|
|
36
|
-
"@wordpress/hooks": "^3.
|
|
37
|
-
"@wordpress/i18n": "^4.
|
|
28
|
+
"@wordpress/block-editor": "^12.22.0",
|
|
29
|
+
"@wordpress/blocks": "^12.31.0",
|
|
30
|
+
"@wordpress/components": "^27.2.0",
|
|
31
|
+
"@wordpress/compose": "^6.31.0",
|
|
32
|
+
"@wordpress/core-data": "^6.31.0",
|
|
33
|
+
"@wordpress/data": "^9.24.0",
|
|
34
|
+
"@wordpress/editor": "^13.31.0",
|
|
35
|
+
"@wordpress/element": "^5.31.0",
|
|
36
|
+
"@wordpress/hooks": "^3.54.0",
|
|
37
|
+
"@wordpress/i18n": "^4.54.0",
|
|
38
38
|
"react": "^18.2.0",
|
|
39
39
|
"react-dom": "^18.2.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@types/react": "18.2.65",
|
|
43
|
-
"@types/wordpress__block-editor": "^11.5.
|
|
43
|
+
"@types/wordpress__block-editor": "^11.5.13",
|
|
44
44
|
"@types/wordpress__blocks": "^12.5.13",
|
|
45
45
|
"@types/wordpress__editor": "^13.6.7",
|
|
46
|
-
"typescript": "^5.4.
|
|
46
|
+
"typescript": "^5.4.3"
|
|
47
47
|
},
|
|
48
48
|
"overrides": {
|
|
49
49
|
"@types/react": "$@types/react"
|