PluginProbe
Blockenberg — 600+ Advanced Gutenberg Blocks & AI Agent for WordPress Block Editor / 2.0.14
Blockenberg — 600+ Advanced Gutenberg Blocks & AI Agent for WordPress Block Editor v2.0.14
2.0.14 2.0.13 2.0.12 2.0.11 2.0.10 2.0.9 trunk 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8
blockenberg / blocks / podcast-episode / index.js

index.js in Blockenberg — 600+ Advanced Gutenberg Blocks & AI Agent for WordPress Block Editor 2.0.14, at blocks/podcast-episode/index.js

394 lines 30.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 ( function () {
2 var el = wp.element.createElement;
3 var Fragment = wp.element.Fragment;
4 var registerBlockType = wp.blocks.registerBlockType;
5 var InspectorControls = wp.blockEditor.InspectorControls;
6 var useBlockProps = wp.blockEditor.useBlockProps;
7 var PanelBody = wp.components.PanelBody;
8 var PanelColorSettings = wp.blockEditor.PanelColorSettings;
9 var ToggleControl = wp.components.ToggleControl;
10 var RangeControl = wp.components.RangeControl;
11 var SelectControl = wp.components.SelectControl;
12 var TextControl = wp.components.TextControl;
13 var TextareaControl = wp.components.TextareaControl;
14 var Button = wp.components.Button;
15 var _tc; function getTypoControl() { return _tc || (_tc = window.bkbgTypographyControl); }
16 var _tv; function getTypoCssVars() { return _tv || (_tv = window.bkbgTypoCssVars); }
17
18 function upd(arr, idx, field, val) {
19 return arr.map(function (e, i) {
20 if (i !== idx) return e;
21 var u = {}; u[field] = val;
22 return Object.assign({}, e, u);
23 });
24 }
25
26 var resourceTypeOptions = [
27 { label: '📄 Article', value: 'article' },
28 { label: '📚 Book', value: 'book' },
29 { label: '🔗 Link', value: 'link' },
30 { label: '🎥 Video', value: 'video' },
31 { label: '🛠️ Tool', value: 'tool' }
32 ];
33
34 function resourceIcon(type) {
35 var map = { article: '📄', book: '📚', link: '🔗', video: '🎥', tool: '🛠️' };
36 return map[type] || '🔗';
37 }
38
39 function sectionHead(label, a) {
40 return el('div', { className: 'bkbg-pe-section-head', style: { color: a.sectionHeadColor, marginBottom: 12, paddingBottom: 6, borderBottom: '2px solid ' + a.accentColor, display: 'inline-block' } }, label);
41 }
42
43 registerBlockType('blockenberg/podcast-episode', {
44 edit: function (props) {
45 var a = props.attributes;
46 var set = props.setAttributes;
47 var blockProps = useBlockProps((function () {
48 var _tv = getTypoCssVars();
49 var s = {};
50 if (_tv) {
51 Object.assign(s, _tv(a.titleTypo, '--bkbg-pe-tt-'));
52 Object.assign(s, _tv(a.bodyTypo, '--bkbg-pe-bd-'));
53 }
54 return { className: 'bkbg-pe-editor-wrap', style: s };
55 })());
56
57 // Preview
58 var preview = el('div', { style: { borderRadius: a.borderRadius + 'px', overflow: 'hidden', border: '1px solid ' + a.bodyBorderColor } },
59
60 // Header (dark)
61 el('div', { style: { background: a.bgColor, padding: '24px 28px 20px' } },
62 a.showPodcastName && el('div', { style: { fontSize: 11, textTransform: 'uppercase', letterSpacing: '0.1em', color: a.headerColor, opacity: .55, marginBottom: 8 } }, a.podcastName),
63 el('h2', { className: 'bkbg-pe-title', style: { margin: '0 0 10px', color: a.headerColor, lineHeight: 1.2 } }, a.episodeTitle),
64 el('div', { style: { display: 'flex', flexWrap: 'wrap', gap: 10, alignItems: 'center' } },
65 a.showNumber && el('span', { style: { fontSize: 12, color: a.headerColor, opacity: .6 } }, 'S' + a.season + ' · E' + a.episodeNumber),
66 a.showMeta && a.publishDate && el('span', { style: { fontSize: 12, color: a.headerColor, opacity: .6 } }, '�
67 ' + a.publishDate),
68 a.showMeta && a.duration && el('span', { style: { fontSize: 12, color: a.headerColor, opacity: .6 } }, '⏱ ' + a.duration),
69 a.showListenLinks && el('div', { style: { display: 'flex', gap: 6, flexWrap: 'wrap', marginTop: 2 } },
70 a.listenLinks.map(function (lnk, i) {
71 return el('a', { key: i, href: lnk.url || '#', style: { background: a.listenBtnBg, color: a.listenBtnColor, padding: '4px 12px', borderRadius: 100, fontSize: 11, fontWeight: 700, textDecoration: 'none' } }, lnk.platform);
72 })
73 )
74 )
75 ),
76
77 // Body (white)
78 el('div', { className: 'bkbg-pe-body', style: { background: a.bodyBg, padding: '20px 28px' } },
79 // Description
80 a.showDescription && a.description && el('div', { style: { marginBottom: 24 } },
81 el('p', { className: 'bkbg-pe-desc', style: { margin: 0, color: a.textColor } }, a.description)
82 ),
83 // Guests
84 a.showGuests && a.guests.length > 0 && el('div', { style: { marginBottom: 24 } },
85 sectionHead(a.guestsLabel || 'Guests', a),
86 el('div', { style: { display: 'grid', gridTemplateColumns: 'repeat(auto-fill, minmax(240px, 1fr))', gap: 12, marginTop: 4 } },
87 a.guests.map(function (g, i) {
88 return el('div', { key: i, style: { background: a.guestBg, border: '1px solid ' + a.guestBorderColor, borderRadius: 8, padding: '12px 14px' } },
89 el('div', { className: 'bkbg-pe-guest-name', style: { color: a.guestNameColor, marginBottom: 2 } }, g.name),
90 el('div', { style: { fontSize: 11, fontWeight: 600, color: a.guestRoleColor, marginBottom: 6 } }, g.role),
91 g.bio && el('p', { className: 'bkbg-pe-guest-bio', style: { margin: 0, color: a.mutedColor } }, g.bio)
92 );
93 })
94 )
95 ),
96 // Chapters
97 a.showTimestamps && a.timestamps.length > 0 && el('div', { style: { marginBottom: 24 } },
98 sectionHead(a.timestampsLabel || 'Chapters', a),
99 el('div', { style: { marginTop: 4 } },
100 a.timestamps.map(function (ts, i) {
101 return el('div', { key: i, style: { display: 'flex', alignItems: 'center', gap: 12, padding: '5px 0', borderBottom: i < a.timestamps.length - 1 ? '1px dashed ' + a.bodyBorderColor : 'none' } },
102 el('span', { style: { background: a.chapterTimeBg, color: a.chapterTimeColor, fontFamily: 'monospace', fontSize: 12, fontWeight: 700, padding: '2px 8px', borderRadius: 4, flexShrink: 0, minWidth: 48, textAlign: 'center' } }, ts.time),
103 el('span', { className: 'bkbg-pe-chapter-text', style: { color: a.textColor } }, ts.title)
104 );
105 })
106 )
107 ),
108 // Resources
109 a.showResources && a.resources.length > 0 && el('div', { style: { marginBottom: 24 } },
110 sectionHead(a.resourcesLabel || 'Resources & Links', a),
111 el('ul', { style: { margin: '4px 0 0', padding: 0, listStyle: 'none' } },
112 a.resources.map(function (r, i) {
113 return el('li', { key: i, style: { display: 'flex', gap: 8, alignItems: 'center', padding: '5px 0', borderBottom: i < a.resources.length - 1 ? '1px dashed ' + a.bodyBorderColor : 'none' } },
114 el('span', { style: { flexShrink: 0, fontSize: 15, color: a.resourceIconColor } }, resourceIcon(r.type)),
115 el('a', { href: r.url || '#', className: 'bkbg-pe-resource-link', style: { color: a.accentColor, textDecoration: 'none' } }, r.title)
116 );
117 })
118 )
119 ),
120 // Transcript/quote
121 a.showTranscript && a.transcript && el('div', { style: { marginBottom: 24 } },
122 sectionHead(a.transcriptLabel || 'Highlighted Quote', a),
123 el('blockquote', { className: 'bkbg-pe-quote', style: { margin: '8px 0 0', padding: '14px 18px', background: a.transcriptBg, borderLeft: '4px solid ' + a.transcriptBorderColor, borderRadius: '0 8px 8px 0', color: a.textColor, whiteSpace: 'pre-line' } }, a.transcript)
124 ),
125 // Tags
126 a.showTags && a.tags.length > 0 && el('div', { style: { display: 'flex', flexWrap: 'wrap', gap: 6 } },
127 a.tags.map(function (tag, i) {
128 return el('span', { key: i, style: { background: a.tagBg, color: a.tagColor, padding: '3px 10px', borderRadius: 100, fontSize: 12, fontWeight: 600 } }, tag);
129 })
130 )
131 )
132 );
133
134 return el(Fragment, null,
135 el('div', blockProps, preview),
136 el(InspectorControls, null,
137 // Episode Info
138 el(PanelBody, { title: 'Episode Info', initialOpen: true },
139 el(TextControl, { label: 'Episode Title', value: a.episodeTitle, __nextHasNoMarginBottom: true, onChange: function (v) { set({ episodeTitle: v }); } }),
140 el('div', { style: { marginTop: 8 } },
141 el(TextControl, { label: 'Podcast Name', value: a.podcastName, __nextHasNoMarginBottom: true, onChange: function (v) { set({ podcastName: v }); } })
142 ),
143 el('div', { style: { marginTop: 8, display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 8 } },
144 el(TextControl, { label: 'Episode #', value: a.episodeNumber, __nextHasNoMarginBottom: true, onChange: function (v) { set({ episodeNumber: v }); } }),
145 el(TextControl, { label: 'Season #', value: a.season, __nextHasNoMarginBottom: true, onChange: function (v) { set({ season: v }); } })
146 ),
147 el('div', { style: { marginTop: 8, display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 8 } },
148 el(TextControl, { label: 'Publish Date', value: a.publishDate, __nextHasNoMarginBottom: true, onChange: function (v) { set({ publishDate: v }); } }),
149 el(TextControl, { label: 'Duration', value: a.duration, __nextHasNoMarginBottom: true, onChange: function (v) { set({ duration: v }); } })
150 ),
151 el('div', { style: { marginTop: 8, display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 4 } },
152 el(ToggleControl, { label: 'Show Number', checked: a.showNumber, __nextHasNoMarginBottom: true, onChange: function (v) { set({ showNumber: v }); } }),
153 el(ToggleControl, { label: 'Show Podcast Name', checked: a.showPodcastName, __nextHasNoMarginBottom: true, onChange: function (v) { set({ showPodcastName: v }); } }),
154 el(ToggleControl, { label: 'Show Meta', checked: a.showMeta, __nextHasNoMarginBottom: true, onChange: function (v) { set({ showMeta: v }); } })
155 )
156 ),
157 // Description
158 el(PanelBody, { title: 'Show Notes / Description', initialOpen: false },
159 el(ToggleControl, { label: 'Show Description', checked: a.showDescription, __nextHasNoMarginBottom: true, onChange: function (v) { set({ showDescription: v }); } }),
160 el('div', { style: { marginTop: 8 } },
161 el(TextareaControl, { value: a.description, rows: 5, __nextHasNoMarginBottom: true, onChange: function (v) { set({ description: v }); } })
162 )
163 ),
164 // Listen links
165 el(PanelBody, { title: 'Listen Links', initialOpen: false },
166 el(ToggleControl, { label: 'Show Listen Buttons', checked: a.showListenLinks, __nextHasNoMarginBottom: true, onChange: function (v) { set({ showListenLinks: v }); } }),
167 el('div', { style: { marginTop: 8 } },
168 el(TextControl, { label: 'Label', value: a.listenLinksLabel, __nextHasNoMarginBottom: true, onChange: function (v) { set({ listenLinksLabel: v }); } })
169 ),
170 a.listenLinks.map(function (lnk, i) {
171 return el('div', { key: i, style: { marginTop: 10, padding: '8px 10px', background: '#f8fafc', borderRadius: 6, border: '1px solid #e5e7eb' } },
172 el('div', { style: { display: 'flex', justifyContent: 'space-between', marginBottom: 6 } },
173 el('strong', { style: { fontSize: 11 } }, 'Link ' + (i + 1)),
174 el(Button, { isDestructive: true, variant: 'link', style: { fontSize: 11 }, onClick: function () { set({ listenLinks: a.listenLinks.filter(function (_, j) { return j !== i; }) }); } }, '✕')
175 ),
176 el(TextControl, { label: 'Platform', value: lnk.platform, __nextHasNoMarginBottom: true, onChange: function (v) { set({ listenLinks: upd(a.listenLinks, i, 'platform', v) }); } }),
177 el('div', { style: { marginTop: 6 } },
178 el(TextControl, { label: 'URL', value: lnk.url, __nextHasNoMarginBottom: true, onChange: function (v) { set({ listenLinks: upd(a.listenLinks, i, 'url', v) }); } })
179 )
180 );
181 }),
182 el(Button, { variant: 'secondary', style: { marginTop: 8 }, onClick: function () { set({ listenLinks: a.listenLinks.concat([{ platform: 'Platform', url: '#' }]) }); } }, '+ Add Link')
183 ),
184 // Guests
185 el(PanelBody, { title: 'Guests', initialOpen: false },
186 el(ToggleControl, { label: 'Show Guests', checked: a.showGuests, __nextHasNoMarginBottom: true, onChange: function (v) { set({ showGuests: v }); } }),
187 el('div', { style: { marginTop: 8 } },
188 el(TextControl, { label: 'Section Label', value: a.guestsLabel, __nextHasNoMarginBottom: true, onChange: function (v) { set({ guestsLabel: v }); } })
189 ),
190 a.guests.map(function (g, i) {
191 return el('div', { key: i, style: { marginTop: 10, padding: '8px 10px', background: '#f8fafc', borderRadius: 6, border: '1px solid #e5e7eb' } },
192 el('div', { style: { display: 'flex', justifyContent: 'space-between', marginBottom: 6 } },
193 el('strong', { style: { fontSize: 11 } }, 'Guest ' + (i + 1)),
194 el(Button, { isDestructive: true, variant: 'link', style: { fontSize: 11 }, onClick: function () { set({ guests: a.guests.filter(function (_, j) { return j !== i; }) }); } }, '✕')
195 ),
196 el(TextControl, { label: 'Name', value: g.name, __nextHasNoMarginBottom: true, onChange: function (v) { set({ guests: upd(a.guests, i, 'name', v) }); } }),
197 el('div', { style: { marginTop: 6 } },
198 el(TextControl, { label: 'Role / Title', value: g.role, __nextHasNoMarginBottom: true, onChange: function (v) { set({ guests: upd(a.guests, i, 'role', v) }); } })
199 ),
200 el('div', { style: { marginTop: 6 } },
201 el(TextareaControl, { label: 'Bio', value: g.bio, rows: 2, __nextHasNoMarginBottom: true, onChange: function (v) { set({ guests: upd(a.guests, i, 'bio', v) }); } })
202 )
203 );
204 }),
205 el(Button, { variant: 'secondary', style: { marginTop: 8 }, onClick: function () { set({ guests: a.guests.concat([{ name: 'Guest Name', role: 'Role', bio: '' }]) }); } }, '+ Add Guest')
206 ),
207 // Chapters
208 el(PanelBody, { title: 'Chapter Timestamps', initialOpen: false },
209 el(ToggleControl, { label: 'Show Chapters', checked: a.showTimestamps, __nextHasNoMarginBottom: true, onChange: function (v) { set({ showTimestamps: v }); } }),
210 el('div', { style: { marginTop: 8 } },
211 el(TextControl, { label: 'Section Label', value: a.timestampsLabel, __nextHasNoMarginBottom: true, onChange: function (v) { set({ timestampsLabel: v }); } })
212 ),
213 a.timestamps.map(function (ts, i) {
214 return el('div', { key: i, style: { display: 'flex', gap: 6, alignItems: 'center', marginTop: 8 } },
215 el('div', { style: { width: 72, flexShrink: 0 } },
216 el(TextControl, { value: ts.time, __nextHasNoMarginBottom: true, onChange: function (v) { set({ timestamps: upd(a.timestamps, i, 'time', v) }); } })
217 ),
218 el('div', { style: { flex: 1 } },
219 el(TextControl, { value: ts.title, __nextHasNoMarginBottom: true, onChange: function (v) { set({ timestamps: upd(a.timestamps, i, 'title', v) }); } })
220 ),
221 el(Button, { isDestructive: true, variant: 'link', style: { fontSize: 11, padding: 0 }, onClick: function () { set({ timestamps: a.timestamps.filter(function (_, j) { return j !== i; }) }); } }, '✕')
222 );
223 }),
224 el(Button, { variant: 'secondary', style: { marginTop: 8 }, onClick: function () { set({ timestamps: a.timestamps.concat([{ time: '00:00', title: 'New chapter' }]) }); } }, '+ Add Chapter')
225 ),
226 // Resources
227 el(PanelBody, { title: 'Resources & Links', initialOpen: false },
228 el(ToggleControl, { label: 'Show Resources', checked: a.showResources, __nextHasNoMarginBottom: true, onChange: function (v) { set({ showResources: v }); } }),
229 el('div', { style: { marginTop: 8 } },
230 el(TextControl, { label: 'Section Label', value: a.resourcesLabel, __nextHasNoMarginBottom: true, onChange: function (v) { set({ resourcesLabel: v }); } })
231 ),
232 a.resources.map(function (r, i) {
233 return el('div', { key: i, style: { marginTop: 10, padding: '8px 10px', background: '#f8fafc', borderRadius: 6, border: '1px solid #e5e7eb' } },
234 el('div', { style: { display: 'flex', justifyContent: 'space-between', marginBottom: 6 } },
235 el(SelectControl, { value: r.type, options: resourceTypeOptions, style: { marginBottom: 0 }, __nextHasNoMarginBottom: true, onChange: function (v) { set({ resources: upd(a.resources, i, 'type', v) }); } }),
236 el(Button, { isDestructive: true, variant: 'link', style: { fontSize: 11 }, onClick: function () { set({ resources: a.resources.filter(function (_, j) { return j !== i; }) }); } }, '✕')
237 ),
238 el(TextControl, { label: 'Title', value: r.title, __nextHasNoMarginBottom: true, onChange: function (v) { set({ resources: upd(a.resources, i, 'title', v) }); } }),
239 el('div', { style: { marginTop: 6 } },
240 el(TextControl, { label: 'URL', value: r.url, __nextHasNoMarginBottom: true, onChange: function (v) { set({ resources: upd(a.resources, i, 'url', v) }); } })
241 )
242 );
243 }),
244 el(Button, { variant: 'secondary', style: { marginTop: 8 }, onClick: function () { set({ resources: a.resources.concat([{ title: 'Resource Title', url: '#', type: 'link' }]) }); } }, '+ Add Resource')
245 ),
246 // Transcript / Quote
247 el(PanelBody, { title: 'Highlighted Quote / Transcript', initialOpen: false },
248 el(ToggleControl, { label: 'Show Quote', checked: a.showTranscript, __nextHasNoMarginBottom: true, onChange: function (v) { set({ showTranscript: v }); } }),
249 el('div', { style: { marginTop: 8 } },
250 el(TextControl, { label: 'Section Label', value: a.transcriptLabel, __nextHasNoMarginBottom: true, onChange: function (v) { set({ transcriptLabel: v }); } })
251 ),
252 el('div', { style: { marginTop: 8 } },
253 el(TextareaControl, { value: a.transcript, rows: 4, __nextHasNoMarginBottom: true, onChange: function (v) { set({ transcript: v }); } })
254 )
255 ),
256 // Tags
257 el(PanelBody, { title: 'Tags', initialOpen: false },
258 el(ToggleControl, { label: 'Show Tags', checked: a.showTags, __nextHasNoMarginBottom: true, onChange: function (v) { set({ showTags: v }); } }),
259 el('div', { style: { marginTop: 8 } },
260 el(TextControl, { label: 'Tags (comma-separated)', value: a.tags.join(', '), __nextHasNoMarginBottom: true, onChange: function (v) { set({ tags: v.split(',').map(function (t) { return t.trim(); }).filter(Boolean) }); } })
261 )
262 ),
263 // Typography
264 el(PanelBody, { title: 'Typography', initialOpen: false },
265 (function () {
266 var TC = getTypoControl();
267 if (!TC) return el('p', null, 'Loading\u2026');
268 return el(Fragment, null,
269 el(TC, { label: 'Title Typography', value: a.titleTypo, onChange: function (v) { set({ titleTypo: v }); } }),
270 el(TC, { label: 'Body Typography', value: a.bodyTypo, onChange: function (v) { set({ bodyTypo: v }); } })
271 );
272 })()
273 ),
274 el(PanelBody, { title: 'Spacing', initialOpen: false },
275 el(RangeControl, { label: 'Border Radius (px)', value: a.borderRadius, min: 0, max: 24, __nextHasNoMarginBottom: true, onChange: function (v) { set({ borderRadius: v }); } })
276 ),
277 // Header Colors
278 el(PanelColorSettings, {
279 title: 'Header Colors',
280 initialOpen: false,
281 colorSettings: [
282 { label: 'Header BG', value: a.bgColor, onChange: function (v) { set({ bgColor: v || '#0f172a' }); } },
283 { label: 'Header Text', value: a.headerColor, onChange: function (v) { set({ headerColor: v || '#ffffff' }); } },
284 { label: 'Listen Button BG', value: a.listenBtnBg, onChange: function (v) { set({ listenBtnBg: v || '#3b82f6' }); } },
285 { label: 'Listen Button Text',value: a.listenBtnColor, onChange: function (v) { set({ listenBtnColor: v || '#ffffff' }); } }
286 ]
287 }),
288 // Body Colors
289 el(PanelColorSettings, {
290 title: 'Body Colors',
291 initialOpen: false,
292 colorSettings: [
293 { label: 'Body BG', value: a.bodyBg, onChange: function (v) { set({ bodyBg: v || '#ffffff' }); } },
294 { label: 'Body Border', value: a.bodyBorderColor, onChange: function (v) { set({ bodyBorderColor: v || '#e5e7eb' }); } },
295 { label: 'Text', value: a.textColor, onChange: function (v) { set({ textColor: v || '#374151' }); } },
296 { label: 'Muted Text', value: a.mutedColor, onChange: function (v) { set({ mutedColor: v || '#6b7280' }); } },
297 { label: 'Accent', value: a.accentColor, onChange: function (v) { set({ accentColor: v || '#3b82f6' }); } },
298 { label: 'Section Headings', value: a.sectionHeadColor, onChange: function (v) { set({ sectionHeadColor: v || '#0f172a' }); } },
299 { label: 'Chapter Time BG', value: a.chapterTimeBg, onChange: function (v) { set({ chapterTimeBg: v || '#f1f5f9' }); } },
300 { label: 'Chapter Time Text',value: a.chapterTimeColor, onChange: function (v) { set({ chapterTimeColor: v || '#1e293b' }); } },
301 { label: 'Guest Card BG', value: a.guestBg, onChange: function (v) { set({ guestBg: v || '#f8fafc' }); } },
302 { label: 'Guest Name', value: a.guestNameColor, onChange: function (v) { set({ guestNameColor: v || '#0f172a' }); } },
303 { label: 'Guest Role', value: a.guestRoleColor, onChange: function (v) { set({ guestRoleColor: v || '#3b82f6' }); } },
304 { label: 'Tag BG', value: a.tagBg, onChange: function (v) { set({ tagBg: v || '#eff6ff' }); } },
305 { label: 'Tag Text', value: a.tagColor, onChange: function (v) { set({ tagColor: v || '#1d4ed8' }); } },
306 { label: 'Quote BG', value: a.transcriptBg, onChange: function (v) { set({ transcriptBg: v || '#f8fafc' }); } },
307 { label: 'Quote Border', value: a.transcriptBorderColor, onChange: function (v) { set({ transcriptBorderColor: v || '#3b82f6' }); } }
308 ]
309 })
310 )
311 );
312 },
313
314 save: function (props) {
315 var useBlockProps = wp.blockEditor.useBlockProps;
316 return wp.element.createElement('div', useBlockProps.save(),
317 wp.element.createElement('div', {
318 className: 'bkbg-podcast-episode-app',
319 'data-opts': JSON.stringify(props.attributes)
320 })
321 );
322 },
323
324 deprecated: [{
325 attributes: {
326 episodeTitle:{type:"string",default:"The Future of AI-Assisted Development"},
327 episodeNumber:{type:"string",default:"147"},
328 season:{type:"string",default:"6"},
329 showNumber:{type:"boolean",default:true},
330 podcastName:{type:"string",default:"Dev Stories Podcast"},
331 showPodcastName:{type:"boolean",default:true},
332 publishDate:{type:"string",default:"February 24, 2026"},
333 duration:{type:"string",default:"58 min"},
334 showMeta:{type:"boolean",default:true},
335 description:{type:"string",default:""},
336 showDescription:{type:"boolean",default:true},
337 guests:{type:"array",default:[]},
338 showGuests:{type:"boolean",default:true},
339 guestsLabel:{type:"string",default:"Guests"},
340 timestamps:{type:"array",default:[]},
341 showTimestamps:{type:"boolean",default:true},
342 timestampsLabel:{type:"string",default:"Chapters"},
343 listenLinks:{type:"array",default:[]},
344 showListenLinks:{type:"boolean",default:true},
345 listenLinksLabel:{type:"string",default:"Listen on"},
346 resources:{type:"array",default:[]},
347 showResources:{type:"boolean",default:true},
348 resourcesLabel:{type:"string",default:"Resources & Links"},
349 transcript:{type:"string",default:""},
350 showTranscript:{type:"boolean",default:true},
351 transcriptLabel:{type:"string",default:"Highlighted Quote"},
352 tags:{type:"array",default:[]},
353 showTags:{type:"boolean",default:true},
354 fontSize:{type:"number",default:14},
355 titleFontSize:{type:"number",default:22},
356 lineHeight:{type:"number",default:168},
357 borderRadius:{type:"number",default:12},
358 bgColor:{type:"string",default:"#0f172a"},
359 headerColor:{type:"string",default:"#ffffff"},
360 bodyBg:{type:"string",default:"#ffffff"},
361 bodyBorderColor:{type:"string",default:"#e5e7eb"},
362 textColor:{type:"string",default:"#374151"},
363 mutedColor:{type:"string",default:"#6b7280"},
364 accentColor:{type:"string",default:"#3b82f6"},
365 sectionHeadColor:{type:"string",default:"#0f172a"},
366 chapterTimeBg:{type:"string",default:"#f1f5f9"},
367 chapterTimeColor:{type:"string",default:"#1e293b"},
368 guestBg:{type:"string",default:"#f8fafc"},
369 guestBorderColor:{type:"string",default:"#e5e7eb"},
370 guestNameColor:{type:"string",default:"#0f172a"},
371 guestRoleColor:{type:"string",default:"#3b82f6"},
372 resourceIconColor:{type:"string",default:"#3b82f6"},
373 tagBg:{type:"string",default:"#eff6ff"},
374 tagColor:{type:"string",default:"#1d4ed8"},
375 listenBtnBg:{type:"string",default:"#3b82f6"},
376 listenBtnColor:{type:"string",default:"#ffffff"},
377 transcriptBg:{type:"string",default:"#f8fafc"},
378 transcriptBorderColor:{type:"string",default:"#3b82f6"},
379 titleFontWeight:{type:"string",default:"700"},
380 fontWeight:{type:"string",default:"400"}
381 },
382 save: function(props) {
383 var useBlockProps = wp.blockEditor.useBlockProps;
384 return wp.element.createElement('div', useBlockProps.save(),
385 wp.element.createElement('div', {
386 className: 'bkbg-podcast-episode-app',
387 'data-opts': JSON.stringify(props.attributes)
388 })
389 );
390 }
391 }]
392 });
393 }() );
394