@marvalt/wparser 0.1.6 → 0.1.8

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.
@@ -0,0 +1,30 @@
1
+ import React from 'react';
2
+ import type { WordPressBlock } from '../types';
3
+ export interface SectionWrapperProps {
4
+ children: React.ReactNode;
5
+ /** Background color variant */
6
+ background?: 'light' | 'dark' | 'transparent';
7
+ /** Vertical spacing between sections */
8
+ spacing?: 'none' | 'small' | 'medium' | 'large';
9
+ /** Container width */
10
+ container?: 'full' | 'wide' | 'contained';
11
+ /** Additional CSS classes */
12
+ className?: string;
13
+ /** Optional block reference for extracting additional props */
14
+ block?: WordPressBlock;
15
+ }
16
+ /**
17
+ * Generic section wrapper component for consistent spacing and layout
18
+ *
19
+ * Usage in component mappings:
20
+ * ```ts
21
+ * {
22
+ * pattern: { name: 'core/cover' },
23
+ * component: HeroSection,
24
+ * wrapper: SectionWrapper,
25
+ * extractProps: (block) => ({ ... })
26
+ * }
27
+ * ```
28
+ */
29
+ export declare const SectionWrapper: React.FC<SectionWrapperProps>;
30
+ //# sourceMappingURL=SectionWrapper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SectionWrapper.d.ts","sourceRoot":"","sources":["../../src/components/SectionWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAG/C,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,+BAA+B;IAC/B,UAAU,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,aAAa,CAAC;IAC9C,wCAAwC;IACxC,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IAChD,sBAAsB;IACtB,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,WAAW,CAAC;IAC1C,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+DAA+D;IAC/D,KAAK,CAAC,EAAE,cAAc,CAAC;CACxB;AAED;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAqDxD,CAAC"}
package/dist/index.cjs CHANGED
@@ -1933,6 +1933,138 @@ function getString(block) {
1933
1933
  return getBlockTextContent(block);
1934
1934
  }
1935
1935
 
1936
+ /**
1937
+ * Check if a block matches a pattern
1938
+ */
1939
+ function matchesPattern(block, pattern) {
1940
+ // Check block name
1941
+ if (block.name !== pattern.name) {
1942
+ return false;
1943
+ }
1944
+ // Check attributes if specified
1945
+ if (pattern.attributes) {
1946
+ const blockAttrs = block.attributes || {};
1947
+ for (const [key, value] of Object.entries(pattern.attributes)) {
1948
+ if (blockAttrs[key] !== value) {
1949
+ return false;
1950
+ }
1951
+ }
1952
+ }
1953
+ // Check innerBlocks patterns if specified
1954
+ if (pattern.innerBlocks && pattern.innerBlocks.length > 0) {
1955
+ const blockInnerBlocks = block.innerBlocks || [];
1956
+ // If pattern specifies innerBlocks, check if block has matching innerBlocks
1957
+ for (const innerPattern of pattern.innerBlocks) {
1958
+ // Find at least one matching innerBlock
1959
+ const hasMatch = blockInnerBlocks.some(innerBlock => matchesPattern(innerBlock, innerPattern));
1960
+ if (!hasMatch) {
1961
+ return false;
1962
+ }
1963
+ }
1964
+ }
1965
+ return true;
1966
+ }
1967
+ /**
1968
+ * Find the best matching component mapping for a block
1969
+ * Returns the mapping with highest priority that matches, or null
1970
+ */
1971
+ function findMatchingMapping(block, mappings) {
1972
+ // Sort by priority (higher first), then by order in array
1973
+ const sortedMappings = [...mappings].sort((a, b) => {
1974
+ const priorityA = a.priority ?? 0;
1975
+ const priorityB = b.priority ?? 0;
1976
+ if (priorityA !== priorityB) {
1977
+ return priorityB - priorityA; // Higher priority first
1978
+ }
1979
+ return 0; // Keep original order for same priority
1980
+ });
1981
+ // Find first matching mapping
1982
+ for (const mapping of sortedMappings) {
1983
+ if (matchesPattern(block, mapping.pattern)) {
1984
+ return mapping;
1985
+ }
1986
+ }
1987
+ return null;
1988
+ }
1989
+
1990
+ /**
1991
+ * Create an enhanced registry that supports pattern-based component mapping
1992
+ *
1993
+ * This combines the default registry (for fallback) with app-specific component mappings.
1994
+ * When a block matches a pattern, it uses the mapped component. Otherwise, it falls back
1995
+ * to the default renderer.
1996
+ *
1997
+ * @param mappings - Array of component mappings with patterns
1998
+ * @param baseRegistry - Optional base registry (defaults to createDefaultRegistry())
1999
+ * @returns Enhanced registry with pattern matching capabilities
2000
+ *
2001
+ * @example
2002
+ * ```ts
2003
+ * const mappings: ComponentMapping[] = [
2004
+ * {
2005
+ * pattern: { name: 'core/cover' },
2006
+ * component: HomeHeroSection,
2007
+ * extractProps: (block) => ({
2008
+ * backgroundImage: extractBackgroundImage(block),
2009
+ * title: extractTitle(block),
2010
+ * }),
2011
+ * wrapper: SectionWrapper,
2012
+ * },
2013
+ * ];
2014
+ *
2015
+ * const registry = createEnhancedRegistry(mappings);
2016
+ * ```
2017
+ */
2018
+ function createEnhancedRegistry(mappings = [], baseRegistry) {
2019
+ const base = baseRegistry || createDefaultRegistry();
2020
+ // Create enhanced renderers that check patterns first
2021
+ const enhancedRenderers = {
2022
+ ...base.renderers,
2023
+ };
2024
+ // Override renderers for blocks that have mappings
2025
+ // We need to check patterns at render time, so we create a wrapper renderer
2026
+ const createPatternRenderer = (blockName) => {
2027
+ return (props) => {
2028
+ const { block, context } = props;
2029
+ // Find matching mapping
2030
+ const mapping = findMatchingMapping(block, mappings);
2031
+ if (mapping) {
2032
+ // Extract props from block
2033
+ const componentProps = mapping.extractProps(block, context);
2034
+ // Render component
2035
+ const Component = mapping.component;
2036
+ const content = jsxRuntimeExports.jsx(Component, { ...componentProps });
2037
+ // Wrap with wrapper if provided
2038
+ if (mapping.wrapper) {
2039
+ const Wrapper = mapping.wrapper;
2040
+ return jsxRuntimeExports.jsx(Wrapper, { block: block, children: content });
2041
+ }
2042
+ return content;
2043
+ }
2044
+ // Fall back to default renderer
2045
+ const defaultRenderer = base.renderers[blockName] || base.fallback;
2046
+ return defaultRenderer(props);
2047
+ };
2048
+ };
2049
+ // For each mapping, override the renderer for that block name
2050
+ for (const mapping of mappings) {
2051
+ const blockName = mapping.pattern.name;
2052
+ if (blockName) {
2053
+ enhancedRenderers[blockName] = createPatternRenderer(blockName);
2054
+ }
2055
+ }
2056
+ // Create matchBlock function
2057
+ const matchBlock = (block) => {
2058
+ return findMatchingMapping(block, mappings);
2059
+ };
2060
+ return {
2061
+ ...base,
2062
+ renderers: enhancedRenderers,
2063
+ mappings,
2064
+ matchBlock,
2065
+ };
2066
+ }
2067
+
1936
2068
  const WPContent = ({ blocks, registry, className }) => {
1937
2069
  if (!Array.isArray(blocks)) {
1938
2070
  if (process.env.NODE_ENV !== 'production') {
@@ -2013,12 +2145,398 @@ class WPErrorBoundary extends React.Component {
2013
2145
  }
2014
2146
  }
2015
2147
 
2148
+ /**
2149
+ * Extract background image URL from a block
2150
+ * Checks various possible sources: url, backgroundImage, innerHTML
2151
+ */
2152
+ function extractBackgroundImage(block) {
2153
+ const attrs = block.attributes || {};
2154
+ // Try various attribute keys
2155
+ let url = attrs['url'] ||
2156
+ attrs['backgroundImage'] ||
2157
+ (typeof attrs['backgroundImage'] === 'object' && attrs['backgroundImage']?.url);
2158
+ if (typeof url === 'string' && url.trim()) {
2159
+ return url.trim();
2160
+ }
2161
+ // Try to extract from innerHTML if not found in attributes
2162
+ if (block.innerHTML) {
2163
+ // Try img src from innerHTML
2164
+ const imgMatch = block.innerHTML.match(/<img[^>]+src=["']([^"']+)["']/i);
2165
+ if (imgMatch && imgMatch[1]) {
2166
+ return imgMatch[1];
2167
+ }
2168
+ // Try background-image in style attribute
2169
+ const bgMatch = block.innerHTML.match(/background-image:\s*url\(["']?([^"')]+)["']?\)/i);
2170
+ if (bgMatch && bgMatch[1]) {
2171
+ return bgMatch[1];
2172
+ }
2173
+ }
2174
+ return null;
2175
+ }
2176
+ /**
2177
+ * Extract image URL from a block
2178
+ * Returns Cloudflare URL if available, otherwise WordPress URL
2179
+ */
2180
+ function extractImageUrl(block) {
2181
+ return getImageUrl(block);
2182
+ }
2183
+ /**
2184
+ * Extract image attributes (url, alt, width, height)
2185
+ */
2186
+ function extractImageAttributes(block) {
2187
+ return getImageAttributes(block);
2188
+ }
2189
+ /**
2190
+ * Extract title/heading text from a block
2191
+ */
2192
+ function extractTitle(block) {
2193
+ const attrs = block.attributes || {};
2194
+ const title = attrs['title'] || attrs['content'] || getBlockTextContent(block);
2195
+ return typeof title === 'string' ? title.trim() : null;
2196
+ }
2197
+ /**
2198
+ * Extract content/text from a block
2199
+ * Returns React node for rendering
2200
+ */
2201
+ function extractContent(block, context) {
2202
+ const text = getBlockTextContent(block);
2203
+ return text || null;
2204
+ }
2205
+ /**
2206
+ * Extract media position from media-text block
2207
+ */
2208
+ function extractMediaPosition(block) {
2209
+ const attrs = block.attributes || {};
2210
+ const position = attrs['mediaPosition'] || 'left';
2211
+ return position === 'right' ? 'right' : 'left';
2212
+ }
2213
+ /**
2214
+ * Extract vertical alignment from block
2215
+ */
2216
+ function extractVerticalAlignment(block) {
2217
+ const attrs = block.attributes || {};
2218
+ const alignment = attrs['verticalAlignment'] || 'center';
2219
+ if (alignment === 'top' || alignment === 'bottom') {
2220
+ return alignment;
2221
+ }
2222
+ return 'center';
2223
+ }
2224
+ /**
2225
+ * Extract alignment (full, wide, contained) from block
2226
+ */
2227
+ function extractAlignment(block) {
2228
+ const attrs = block.attributes || {};
2229
+ const align = attrs['align'];
2230
+ if (align === 'full' || align === 'wide') {
2231
+ return align;
2232
+ }
2233
+ return 'contained';
2234
+ }
2235
+ /**
2236
+ * Extract overlay color from cover block
2237
+ */
2238
+ function extractOverlayColor(block) {
2239
+ const attrs = block.attributes || {};
2240
+ const overlayColor = attrs['overlayColor'];
2241
+ if (typeof overlayColor === 'string') {
2242
+ return overlayColor;
2243
+ }
2244
+ return null;
2245
+ }
2246
+ /**
2247
+ * Extract dim ratio (overlay opacity) from cover block
2248
+ */
2249
+ function extractDimRatio(block) {
2250
+ const attrs = block.attributes || {};
2251
+ const dimRatio = attrs['dimRatio'];
2252
+ if (typeof dimRatio === 'number') {
2253
+ return dimRatio;
2254
+ }
2255
+ return 0;
2256
+ }
2257
+ /**
2258
+ * Extract min height from block
2259
+ */
2260
+ function extractMinHeight(block) {
2261
+ const attrs = block.attributes || {};
2262
+ const minHeight = attrs['minHeight'];
2263
+ const minHeightUnit = attrs['minHeightUnit'] || 'vh';
2264
+ if (typeof minHeight === 'number') {
2265
+ return { value: minHeight, unit: minHeightUnit };
2266
+ }
2267
+ return null;
2268
+ }
2269
+ /**
2270
+ * Extract heading level from heading block
2271
+ */
2272
+ function extractHeadingLevel(block) {
2273
+ const attrs = block.attributes || {};
2274
+ const level = attrs['level'];
2275
+ if (typeof level === 'number' && level >= 1 && level <= 6) {
2276
+ return level;
2277
+ }
2278
+ return 2; // Default to h2
2279
+ }
2280
+ /**
2281
+ * Extract text alignment from block
2282
+ */
2283
+ function extractTextAlign(block) {
2284
+ const attrs = block.attributes || {};
2285
+ const align = attrs['align'] || attrs['textAlign'];
2286
+ if (align === 'left' || align === 'center' || align === 'right') {
2287
+ return align;
2288
+ }
2289
+ return null;
2290
+ }
2291
+ /**
2292
+ * Extract font size from block
2293
+ */
2294
+ function extractFontSize(block) {
2295
+ const attrs = block.attributes || {};
2296
+ const fontSize = attrs['fontSize'];
2297
+ return typeof fontSize === 'string' ? fontSize : null;
2298
+ }
2299
+ /**
2300
+ * Convert image URL to Cloudflare variant if it's a Cloudflare URL
2301
+ */
2302
+ function convertImageToCloudflareVariant(url, options = {}) {
2303
+ if (!url)
2304
+ return null;
2305
+ if (isCloudflareImageUrl(url)) {
2306
+ const width = options.width || 1024;
2307
+ const height = options.height;
2308
+ return getCloudflareVariantUrl(url, { width, height });
2309
+ }
2310
+ return url;
2311
+ }
2312
+ /**
2313
+ * Extract title from innerBlocks (finds first heading block)
2314
+ */
2315
+ function extractTitleFromInnerBlocks(block) {
2316
+ const innerBlocks = block.innerBlocks || [];
2317
+ // Recursively search for heading blocks
2318
+ for (const innerBlock of innerBlocks) {
2319
+ if (innerBlock.name === 'core/heading') {
2320
+ return getBlockTextContent(innerBlock);
2321
+ }
2322
+ // Recursively search nested blocks
2323
+ const nestedTitle = extractTitleFromInnerBlocks(innerBlock);
2324
+ if (nestedTitle)
2325
+ return nestedTitle;
2326
+ }
2327
+ return null;
2328
+ }
2329
+ /**
2330
+ * Extract subtitle/description from innerBlocks (finds first paragraph block)
2331
+ */
2332
+ function extractSubtitleFromInnerBlocks(block) {
2333
+ const innerBlocks = block.innerBlocks || [];
2334
+ // Recursively search for paragraph blocks
2335
+ for (const innerBlock of innerBlocks) {
2336
+ if (innerBlock.name === 'core/paragraph') {
2337
+ const text = getBlockTextContent(innerBlock);
2338
+ if (text && text.trim()) {
2339
+ return text;
2340
+ }
2341
+ }
2342
+ // Recursively search nested blocks
2343
+ const nestedSubtitle = extractSubtitleFromInnerBlocks(innerBlock);
2344
+ if (nestedSubtitle)
2345
+ return nestedSubtitle;
2346
+ }
2347
+ return null;
2348
+ }
2349
+ /**
2350
+ * Extract buttons from innerBlocks (finds buttons block and extracts button data)
2351
+ */
2352
+ function extractButtonsFromInnerBlocks(block) {
2353
+ const buttons = [];
2354
+ const innerBlocks = block.innerBlocks || [];
2355
+ // Find buttons block
2356
+ const findButtonsBlock = (blocks) => {
2357
+ for (const innerBlock of blocks) {
2358
+ if (innerBlock.name === 'core/buttons') {
2359
+ return innerBlock;
2360
+ }
2361
+ if (innerBlock.innerBlocks) {
2362
+ const found = findButtonsBlock(innerBlock.innerBlocks);
2363
+ if (found)
2364
+ return found;
2365
+ }
2366
+ }
2367
+ return null;
2368
+ };
2369
+ const buttonsBlock = findButtonsBlock(innerBlocks);
2370
+ if (!buttonsBlock || !buttonsBlock.innerBlocks) {
2371
+ return buttons;
2372
+ }
2373
+ // Extract button data from button blocks
2374
+ for (const buttonBlock of buttonsBlock.innerBlocks) {
2375
+ if (buttonBlock.name === 'core/button') {
2376
+ const attrs = buttonBlock.attributes || {};
2377
+ const url = attrs['url'];
2378
+ const text = attrs['text'] || getBlockTextContent(buttonBlock);
2379
+ // Try to extract from innerHTML if not in attributes
2380
+ if (!url && buttonBlock.innerHTML) {
2381
+ const linkMatch = buttonBlock.innerHTML.match(/<a[^>]+href=["']([^"']+)["'][^>]*>([^<]+)<\/a>/i);
2382
+ if (linkMatch) {
2383
+ const extractedUrl = linkMatch[1];
2384
+ const extractedText = linkMatch[2] || text;
2385
+ if (extractedUrl) {
2386
+ buttons.push({
2387
+ text: extractedText || 'Learn More',
2388
+ url: extractedUrl,
2389
+ isExternal: extractedUrl.startsWith('http://') || extractedUrl.startsWith('https://'),
2390
+ });
2391
+ }
2392
+ }
2393
+ }
2394
+ else if (url && text) {
2395
+ buttons.push({
2396
+ text,
2397
+ url,
2398
+ isExternal: url.startsWith('http://') || url.startsWith('https://'),
2399
+ });
2400
+ }
2401
+ }
2402
+ }
2403
+ return buttons;
2404
+ }
2405
+ /**
2406
+ * Extract video iframe HTML from innerBlocks (finds HTML block with iframe)
2407
+ */
2408
+ function extractVideoIframeFromInnerBlocks(block) {
2409
+ const innerBlocks = block.innerBlocks || [];
2410
+ // Recursively search for HTML blocks with iframe
2411
+ for (const innerBlock of innerBlocks) {
2412
+ if (innerBlock.name === 'core/html' && innerBlock.innerHTML) {
2413
+ // Check if innerHTML contains an iframe
2414
+ if (innerBlock.innerHTML.includes('<iframe')) {
2415
+ return innerBlock.innerHTML;
2416
+ }
2417
+ }
2418
+ // Recursively search nested blocks
2419
+ if (innerBlock.innerBlocks) {
2420
+ const nestedVideo = extractVideoIframeFromInnerBlocks(innerBlock);
2421
+ if (nestedVideo)
2422
+ return nestedVideo;
2423
+ }
2424
+ }
2425
+ return null;
2426
+ }
2427
+
2428
+ /**
2429
+ * Convert image URL with optional Cloudflare variant transformation
2430
+ *
2431
+ * @param url - Image URL (WordPress or Cloudflare)
2432
+ * @param options - Conversion options
2433
+ * @returns Converted URL or original if conversion not applicable
2434
+ */
2435
+ function convertImageUrl(url, options = {}) {
2436
+ if (!url)
2437
+ return null;
2438
+ const { convertToCloudflare = true, defaultWidth = 1024, defaultHeight, forceCloudflare = false, } = options;
2439
+ // If already Cloudflare URL and conversion is enabled
2440
+ if (isCloudflareImageUrl(url)) {
2441
+ if (convertToCloudflare) {
2442
+ return getCloudflareVariantUrl(url, {
2443
+ width: defaultWidth,
2444
+ height: defaultHeight,
2445
+ });
2446
+ }
2447
+ return url;
2448
+ }
2449
+ // If force conversion is enabled (not recommended - requires WordPress plugin to provide Cloudflare URLs)
2450
+ if (forceCloudflare) {
2451
+ // This would require additional logic to map WordPress URLs to Cloudflare URLs
2452
+ // which should be handled by the WordPress plugin providing Cloudflare URLs in block data
2453
+ console.warn('forceCloudflare is enabled but URL is not Cloudflare. WordPress plugin should provide Cloudflare URLs in block metadata.');
2454
+ }
2455
+ // Return original URL if not Cloudflare
2456
+ return url;
2457
+ }
2458
+ /**
2459
+ * Batch convert multiple image URLs
2460
+ */
2461
+ function convertImageUrls(urls, options = {}) {
2462
+ return urls.map(url => convertImageUrl(url, options));
2463
+ }
2464
+
2465
+ /**
2466
+ * Generic section wrapper component for consistent spacing and layout
2467
+ *
2468
+ * Usage in component mappings:
2469
+ * ```ts
2470
+ * {
2471
+ * pattern: { name: 'core/cover' },
2472
+ * component: HeroSection,
2473
+ * wrapper: SectionWrapper,
2474
+ * extractProps: (block) => ({ ... })
2475
+ * }
2476
+ * ```
2477
+ */
2478
+ const SectionWrapper = ({ children, background = 'light', spacing = 'medium', container = 'contained', className, block, }) => {
2479
+ // Background classes
2480
+ const backgroundClasses = {
2481
+ light: 'bg-white',
2482
+ dark: 'bg-gray-900 text-white',
2483
+ transparent: 'bg-transparent',
2484
+ };
2485
+ // Spacing classes (vertical padding)
2486
+ const spacingClasses = {
2487
+ none: '',
2488
+ small: 'py-8 md:py-12',
2489
+ medium: 'py-16 md:py-24',
2490
+ large: 'py-24 md:py-32',
2491
+ };
2492
+ // Container classes
2493
+ const containerClasses = {
2494
+ full: 'w-full',
2495
+ wide: 'max-w-7xl mx-auto px-4',
2496
+ contained: 'container mx-auto px-4',
2497
+ };
2498
+ // Extract additional props from block if provided
2499
+ const blockAttrs = block?.attributes || {};
2500
+ const blockBackground = blockAttrs['backgroundColor'] || blockAttrs['background'];
2501
+ const blockSpacing = blockAttrs['spacing'];
2502
+ const blockContainer = blockAttrs['container'] || blockAttrs['align'];
2503
+ // Override with block attributes if present
2504
+ const finalBackground = blockBackground || background;
2505
+ const finalSpacing = blockSpacing || spacing;
2506
+ const finalContainer = blockContainer || container;
2507
+ return (jsxRuntimeExports.jsx("section", { className: buildClassName(backgroundClasses[finalBackground] || backgroundClasses.light, spacingClasses[finalSpacing] || spacingClasses.medium, containerClasses[finalContainer] || containerClasses.contained, className), children: children }));
2508
+ };
2509
+
2510
+ exports.SectionWrapper = SectionWrapper;
2016
2511
  exports.WPContent = WPContent;
2017
2512
  exports.WPErrorBoundary = WPErrorBoundary;
2018
2513
  exports.WPPage = WPPage;
2019
2514
  exports.buildClassName = buildClassName;
2515
+ exports.convertImageToCloudflareVariant = convertImageToCloudflareVariant;
2516
+ exports.convertImageUrl = convertImageUrl;
2517
+ exports.convertImageUrls = convertImageUrls;
2020
2518
  exports.createDefaultRegistry = createDefaultRegistry;
2519
+ exports.createEnhancedRegistry = createEnhancedRegistry;
2520
+ exports.extractAlignment = extractAlignment;
2521
+ exports.extractBackgroundImage = extractBackgroundImage;
2522
+ exports.extractButtonsFromInnerBlocks = extractButtonsFromInnerBlocks;
2523
+ exports.extractContent = extractContent;
2524
+ exports.extractDimRatio = extractDimRatio;
2525
+ exports.extractFontSize = extractFontSize;
2526
+ exports.extractHeadingLevel = extractHeadingLevel;
2527
+ exports.extractImageAttributes = extractImageAttributes;
2528
+ exports.extractImageUrl = extractImageUrl;
2529
+ exports.extractMediaPosition = extractMediaPosition;
2530
+ exports.extractMinHeight = extractMinHeight;
2531
+ exports.extractOverlayColor = extractOverlayColor;
2532
+ exports.extractSubtitleFromInnerBlocks = extractSubtitleFromInnerBlocks;
2533
+ exports.extractTextAlign = extractTextAlign;
2021
2534
  exports.extractTextFromHTML = extractTextFromHTML;
2535
+ exports.extractTitle = extractTitle;
2536
+ exports.extractTitleFromInnerBlocks = extractTitleFromInnerBlocks;
2537
+ exports.extractVerticalAlignment = extractVerticalAlignment;
2538
+ exports.extractVideoIframeFromInnerBlocks = extractVideoIframeFromInnerBlocks;
2539
+ exports.findMatchingMapping = findMatchingMapping;
2022
2540
  exports.findShortcodes = findShortcodes;
2023
2541
  exports.getAlignmentClasses = getAlignmentClasses;
2024
2542
  exports.getBlockTextContent = getBlockTextContent;
@@ -2031,6 +2549,7 @@ exports.getImageUrl = getImageUrl;
2031
2549
  exports.getSectionSpacingClasses = getSectionSpacingClasses;
2032
2550
  exports.getTextAlignClasses = getTextAlignClasses;
2033
2551
  exports.isCloudflareImageUrl = isCloudflareImageUrl;
2552
+ exports.matchesPattern = matchesPattern;
2034
2553
  exports.parseGutenbergBlocks = parseGutenbergBlocks;
2035
2554
  exports.parseShortcodeAttrs = parseShortcodeAttrs;
2036
2555
  exports.renderNodes = renderNodes;