@wordpress-flow/cli 1.0.1 → 1.0.3
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/dist/index.js +26 -8
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -117092,6 +117092,22 @@ declare global {
|
|
|
117092
117092
|
interface MDXProvidedComponents {
|
|
117093
117093
|
${componentMappings.map((mapping) => ` ${mapping}`).join(`
|
|
117094
117094
|
`)}
|
|
117095
|
+
/** WordPress FSE block wrapper - use for any WordPress core block */
|
|
117096
|
+
WP: React.ComponentType<{
|
|
117097
|
+
/** WordPress block name (without 'core/' prefix, e.g., 'post-title', 'site-title') */
|
|
117098
|
+
name: string;
|
|
117099
|
+
/** Additional props passed to the WordPress block */
|
|
117100
|
+
[key: string]: any;
|
|
117101
|
+
}>;
|
|
117102
|
+
/** WordPress shortcode wrapper */
|
|
117103
|
+
Shortcode: React.ComponentType<{
|
|
117104
|
+
/** Shortcode name (e.g., 'contact-form-7', 'gallery') */
|
|
117105
|
+
name: string;
|
|
117106
|
+
/** Shortcode content (for enclosing shortcodes) */
|
|
117107
|
+
children?: React.ReactNode;
|
|
117108
|
+
/** Shortcode attributes */
|
|
117109
|
+
[key: string]: any;
|
|
117110
|
+
}>;
|
|
117095
117111
|
}
|
|
117096
117112
|
}
|
|
117097
117113
|
|
|
@@ -117130,25 +117146,27 @@ export {};
|
|
|
117130
117146
|
}
|
|
117131
117147
|
convertSingleAttribute(attr) {
|
|
117132
117148
|
const type = attr.type || "any";
|
|
117149
|
+
const optional = attr.default !== undefined;
|
|
117133
117150
|
switch (type) {
|
|
117134
117151
|
case "string":
|
|
117135
|
-
return { type: "string" };
|
|
117152
|
+
return { type: "string", optional };
|
|
117136
117153
|
case "number":
|
|
117137
|
-
return { type: "number" };
|
|
117154
|
+
return { type: "number", optional };
|
|
117138
117155
|
case "boolean":
|
|
117139
|
-
return { type: "boolean" };
|
|
117156
|
+
return { type: "boolean", optional };
|
|
117140
117157
|
case "array":
|
|
117141
|
-
return { type: "any[]" };
|
|
117158
|
+
return { type: "any[]", optional };
|
|
117142
117159
|
case "object":
|
|
117143
117160
|
if (this.isMediaObject(attr)) {
|
|
117144
117161
|
return {
|
|
117145
|
-
type: "{ id
|
|
117146
|
-
description: "Media object with image details"
|
|
117162
|
+
type: "{ id?: number; url: string; alt?: string; width?: number; height?: number }",
|
|
117163
|
+
description: "Media object with image details",
|
|
117164
|
+
optional
|
|
117147
117165
|
};
|
|
117148
117166
|
}
|
|
117149
|
-
return { type: "{ [key: string]: any }" };
|
|
117167
|
+
return { type: "{ [key: string]: any }", optional };
|
|
117150
117168
|
default:
|
|
117151
|
-
return { type: "any" };
|
|
117169
|
+
return { type: "any", optional };
|
|
117152
117170
|
}
|
|
117153
117171
|
}
|
|
117154
117172
|
isMediaObject(attr) {
|