cms-block-editor 1.0.14 → 1.0.17

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.mjs CHANGED
@@ -6420,37 +6420,903 @@ function EmbedPlugin() {
6420
6420
  ] });
6421
6421
  }
6422
6422
 
6423
+ // src/plugins/SEOPlugin.tsx
6424
+ import { useState as useState16, useEffect as useEffect17 } from "react";
6425
+ import { useLexicalComposerContext as useLexicalComposerContext14 } from "@lexical/react/LexicalComposerContext";
6426
+ import { $generateHtmlFromNodes as $generateHtmlFromNodes2 } from "@lexical/html";
6427
+
6428
+ // src/seo/seoAnalyzer.ts
6429
+ function analyzeSEO(content, metadata) {
6430
+ const issues = [];
6431
+ const suggestions = [];
6432
+ const metrics = calculateMetrics(content, metadata);
6433
+ if (!metadata.title) {
6434
+ issues.push({
6435
+ type: "error",
6436
+ category: "meta",
6437
+ message: "Missing page title",
6438
+ impact: "high"
6439
+ });
6440
+ } else {
6441
+ if (metrics.titleLength < 30) {
6442
+ issues.push({
6443
+ type: "warning",
6444
+ category: "meta",
6445
+ message: "Title is too short (recommended: 50-60 characters)",
6446
+ impact: "medium"
6447
+ });
6448
+ } else if (metrics.titleLength > 60) {
6449
+ issues.push({
6450
+ type: "warning",
6451
+ category: "meta",
6452
+ message: "Title is too long (recommended: 50-60 characters)",
6453
+ impact: "medium"
6454
+ });
6455
+ }
6456
+ }
6457
+ if (!metadata.description) {
6458
+ issues.push({
6459
+ type: "error",
6460
+ category: "meta",
6461
+ message: "Missing meta description",
6462
+ impact: "high"
6463
+ });
6464
+ } else {
6465
+ if (metrics.descriptionLength < 120) {
6466
+ issues.push({
6467
+ type: "warning",
6468
+ category: "meta",
6469
+ message: "Description is too short (recommended: 150-160 characters)",
6470
+ impact: "medium"
6471
+ });
6472
+ } else if (metrics.descriptionLength > 160) {
6473
+ issues.push({
6474
+ type: "warning",
6475
+ category: "meta",
6476
+ message: "Description is too long (recommended: 150-160 characters)",
6477
+ impact: "medium"
6478
+ });
6479
+ }
6480
+ }
6481
+ if (metrics.headingCount.h1 === 0) {
6482
+ issues.push({
6483
+ type: "error",
6484
+ category: "structure",
6485
+ message: "Missing H1 heading",
6486
+ impact: "high"
6487
+ });
6488
+ } else if (metrics.headingCount.h1 > 1) {
6489
+ issues.push({
6490
+ type: "warning",
6491
+ category: "structure",
6492
+ message: "Multiple H1 headings found (recommended: 1)",
6493
+ impact: "medium"
6494
+ });
6495
+ }
6496
+ if (metrics.imageCount > 0) {
6497
+ const altPercentage = metrics.imagesWithAlt / metrics.imageCount * 100;
6498
+ if (altPercentage < 100) {
6499
+ issues.push({
6500
+ type: "warning",
6501
+ category: "accessibility",
6502
+ message: `${metrics.imageCount - metrics.imagesWithAlt} images missing alt text`,
6503
+ impact: "medium"
6504
+ });
6505
+ }
6506
+ }
6507
+ if (metrics.wordCount < 300) {
6508
+ issues.push({
6509
+ type: "warning",
6510
+ category: "content",
6511
+ message: "Content is too short (recommended: 300+ words)",
6512
+ impact: "medium"
6513
+ });
6514
+ }
6515
+ if (!metadata.ogTitle && !metadata.ogDescription) {
6516
+ suggestions.push({
6517
+ category: "Social Media",
6518
+ message: "Add Open Graph tags for better social media sharing",
6519
+ priority: "medium"
6520
+ });
6521
+ }
6522
+ if (!metadata.twitterCard) {
6523
+ suggestions.push({
6524
+ category: "Social Media",
6525
+ message: "Add Twitter Card tags for better Twitter sharing",
6526
+ priority: "low"
6527
+ });
6528
+ }
6529
+ if (!metadata.schema || metadata.schema.length === 0) {
6530
+ suggestions.push({
6531
+ category: "Structured Data",
6532
+ message: "Add Schema.org structured data for rich snippets",
6533
+ priority: "medium"
6534
+ });
6535
+ }
6536
+ if (!metadata.canonical) {
6537
+ suggestions.push({
6538
+ category: "Technical SEO",
6539
+ message: "Add canonical URL to prevent duplicate content issues",
6540
+ priority: "medium"
6541
+ });
6542
+ }
6543
+ const score = calculateSEOScore(issues, metrics);
6544
+ return {
6545
+ score,
6546
+ issues,
6547
+ suggestions,
6548
+ metrics
6549
+ };
6550
+ }
6551
+ function calculateMetrics(content, metadata) {
6552
+ const parser = new DOMParser();
6553
+ const doc = parser.parseFromString(content, "text/html");
6554
+ const headingCount = {
6555
+ h1: doc.querySelectorAll("h1").length,
6556
+ h2: doc.querySelectorAll("h2").length,
6557
+ h3: doc.querySelectorAll("h3").length,
6558
+ h4: doc.querySelectorAll("h4").length,
6559
+ h5: doc.querySelectorAll("h5").length,
6560
+ h6: doc.querySelectorAll("h6").length
6561
+ };
6562
+ const images = doc.querySelectorAll("img");
6563
+ const imageCount = images.length;
6564
+ const imagesWithAlt = Array.from(images).filter((img) => img.hasAttribute("alt")).length;
6565
+ const links = doc.querySelectorAll("a");
6566
+ const linkCount = links.length;
6567
+ const internalLinks = Array.from(links).filter((a) => {
6568
+ const href = a.getAttribute("href") || "";
6569
+ return href.startsWith("/") || href.startsWith("#");
6570
+ }).length;
6571
+ const externalLinks = linkCount - internalLinks;
6572
+ const text = doc.body.textContent || "";
6573
+ const words = text.trim().split(/\s+/).filter((word) => word.length > 0);
6574
+ const wordCount = words.length;
6575
+ const readingTime = Math.ceil(wordCount / 200);
6576
+ const keywordDensity = calculateKeywordDensity(words, metadata.keywords || []);
6577
+ return {
6578
+ titleLength: metadata.title?.length || 0,
6579
+ descriptionLength: metadata.description?.length || 0,
6580
+ headingCount,
6581
+ imageCount,
6582
+ imagesWithAlt,
6583
+ linkCount,
6584
+ internalLinks,
6585
+ externalLinks,
6586
+ wordCount,
6587
+ readingTime,
6588
+ keywordDensity
6589
+ };
6590
+ }
6591
+ function calculateKeywordDensity(words, keywords) {
6592
+ const density = {};
6593
+ const totalWords = words.length;
6594
+ keywords.forEach((keyword) => {
6595
+ const keywordLower = keyword.toLowerCase();
6596
+ const count = words.filter((word) => word.toLowerCase() === keywordLower).length;
6597
+ density[keyword] = totalWords > 0 ? count / totalWords * 100 : 0;
6598
+ });
6599
+ return density;
6600
+ }
6601
+ function calculateSEOScore(issues, metrics) {
6602
+ let score = 100;
6603
+ issues.forEach((issue) => {
6604
+ if (issue.type === "error") {
6605
+ score -= issue.impact === "high" ? 15 : issue.impact === "medium" ? 10 : 5;
6606
+ } else if (issue.type === "warning") {
6607
+ score -= issue.impact === "high" ? 10 : issue.impact === "medium" ? 5 : 2;
6608
+ }
6609
+ });
6610
+ if (metrics.wordCount >= 300) score += 5;
6611
+ if (metrics.headingCount.h1 === 1) score += 5;
6612
+ if (metrics.imageCount > 0 && metrics.imagesWithAlt === metrics.imageCount) score += 5;
6613
+ return Math.max(0, Math.min(100, score));
6614
+ }
6615
+ function generateSlug(text) {
6616
+ return text.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
6617
+ }
6618
+ function extractKeywords(content, limit = 10) {
6619
+ const text = content.toLowerCase().replace(/<[^>]*>/g, " ");
6620
+ const words = text.split(/\s+/).filter((word) => word.length > 3);
6621
+ const frequency = {};
6622
+ words.forEach((word) => {
6623
+ frequency[word] = (frequency[word] || 0) + 1;
6624
+ });
6625
+ return Object.entries(frequency).sort((a, b) => b[1] - a[1]).slice(0, limit).map(([word]) => word);
6626
+ }
6627
+
6628
+ // src/seo/seoUtils.ts
6629
+ function generateMetaTags(metadata) {
6630
+ const tags = [];
6631
+ if (metadata.title) {
6632
+ tags.push(`<title>${escapeHtml(metadata.title)}</title>`);
6633
+ }
6634
+ if (metadata.description) {
6635
+ tags.push(`<meta name="description" content="${escapeHtml(metadata.description)}">`);
6636
+ }
6637
+ if (metadata.keywords && metadata.keywords.length > 0) {
6638
+ tags.push(`<meta name="keywords" content="${escapeHtml(metadata.keywords.join(", "))}">`);
6639
+ }
6640
+ if (metadata.author) {
6641
+ tags.push(`<meta name="author" content="${escapeHtml(metadata.author)}">`);
6642
+ }
6643
+ if (metadata.canonical) {
6644
+ tags.push(`<link rel="canonical" href="${escapeHtml(metadata.canonical)}">`);
6645
+ }
6646
+ if (metadata.robots) {
6647
+ tags.push(`<meta name="robots" content="${escapeHtml(metadata.robots)}">`);
6648
+ }
6649
+ if (metadata.ogTitle) {
6650
+ tags.push(`<meta property="og:title" content="${escapeHtml(metadata.ogTitle)}">`);
6651
+ }
6652
+ if (metadata.ogDescription) {
6653
+ tags.push(`<meta property="og:description" content="${escapeHtml(metadata.ogDescription)}">`);
6654
+ }
6655
+ if (metadata.ogImage) {
6656
+ tags.push(`<meta property="og:image" content="${escapeHtml(metadata.ogImage)}">`);
6657
+ }
6658
+ if (metadata.ogImageAlt) {
6659
+ tags.push(`<meta property="og:image:alt" content="${escapeHtml(metadata.ogImageAlt)}">`);
6660
+ }
6661
+ if (metadata.ogUrl) {
6662
+ tags.push(`<meta property="og:url" content="${escapeHtml(metadata.ogUrl)}">`);
6663
+ }
6664
+ if (metadata.ogType) {
6665
+ tags.push(`<meta property="og:type" content="${metadata.ogType}">`);
6666
+ }
6667
+ if (metadata.ogSiteName) {
6668
+ tags.push(`<meta property="og:site_name" content="${escapeHtml(metadata.ogSiteName)}">`);
6669
+ }
6670
+ if (metadata.ogLocale) {
6671
+ tags.push(`<meta property="og:locale" content="${metadata.ogLocale}">`);
6672
+ }
6673
+ if (metadata.twitterCard) {
6674
+ tags.push(`<meta name="twitter:card" content="${metadata.twitterCard}">`);
6675
+ }
6676
+ if (metadata.twitterSite) {
6677
+ tags.push(`<meta name="twitter:site" content="${escapeHtml(metadata.twitterSite)}">`);
6678
+ }
6679
+ if (metadata.twitterCreator) {
6680
+ tags.push(`<meta name="twitter:creator" content="${escapeHtml(metadata.twitterCreator)}">`);
6681
+ }
6682
+ if (metadata.twitterTitle) {
6683
+ tags.push(`<meta name="twitter:title" content="${escapeHtml(metadata.twitterTitle)}">`);
6684
+ }
6685
+ if (metadata.twitterDescription) {
6686
+ tags.push(`<meta name="twitter:description" content="${escapeHtml(metadata.twitterDescription)}">`);
6687
+ }
6688
+ if (metadata.twitterImage) {
6689
+ tags.push(`<meta name="twitter:image" content="${escapeHtml(metadata.twitterImage)}">`);
6690
+ }
6691
+ if (metadata.twitterImageAlt) {
6692
+ tags.push(`<meta name="twitter:image:alt" content="${escapeHtml(metadata.twitterImageAlt)}">`);
6693
+ }
6694
+ if (metadata.articlePublishedTime) {
6695
+ tags.push(`<meta property="article:published_time" content="${metadata.articlePublishedTime}">`);
6696
+ }
6697
+ if (metadata.articleModifiedTime) {
6698
+ tags.push(`<meta property="article:modified_time" content="${metadata.articleModifiedTime}">`);
6699
+ }
6700
+ if (metadata.articleAuthor) {
6701
+ tags.push(`<meta property="article:author" content="${escapeHtml(metadata.articleAuthor)}">`);
6702
+ }
6703
+ if (metadata.articleSection) {
6704
+ tags.push(`<meta property="article:section" content="${escapeHtml(metadata.articleSection)}">`);
6705
+ }
6706
+ if (metadata.articleTags && metadata.articleTags.length > 0) {
6707
+ metadata.articleTags.forEach((tag) => {
6708
+ tags.push(`<meta property="article:tag" content="${escapeHtml(tag)}">`);
6709
+ });
6710
+ }
6711
+ return tags.join("\n");
6712
+ }
6713
+ function generateStructuredData(schemas) {
6714
+ if (!schemas || schemas.length === 0) return "";
6715
+ const scripts = schemas.map((schema) => {
6716
+ return `<script type="application/ld+json">
6717
+ ${JSON.stringify(schema, null, 2)}
6718
+ </script>`;
6719
+ });
6720
+ return scripts.join("\n");
6721
+ }
6722
+ function escapeHtml(text) {
6723
+ const map = {
6724
+ "&": "&amp;",
6725
+ "<": "&lt;",
6726
+ ">": "&gt;",
6727
+ '"': "&quot;",
6728
+ "'": "&#039;"
6729
+ };
6730
+ return text.replace(/[&<>"']/g, (char) => map[char]);
6731
+ }
6732
+ function createDefaultMetadata(title, description) {
6733
+ return {
6734
+ title,
6735
+ description,
6736
+ ogTitle: title,
6737
+ ogDescription: description,
6738
+ ogType: "website",
6739
+ twitterCard: "summary_large_image",
6740
+ robots: "index, follow"
6741
+ };
6742
+ }
6743
+ function mergeMetadata(base, override) {
6744
+ return {
6745
+ ...base,
6746
+ ...override,
6747
+ keywords: override.keywords || base.keywords,
6748
+ schema: override.schema || base.schema,
6749
+ articleTags: override.articleTags || base.articleTags
6750
+ };
6751
+ }
6752
+ function validateMetadata(metadata) {
6753
+ const errors = [];
6754
+ if (!metadata.title) {
6755
+ errors.push("Title is required");
6756
+ } else if (metadata.title.length > 60) {
6757
+ errors.push("Title should be 60 characters or less");
6758
+ }
6759
+ if (!metadata.description) {
6760
+ errors.push("Description is required");
6761
+ } else if (metadata.description.length > 160) {
6762
+ errors.push("Description should be 160 characters or less");
6763
+ }
6764
+ if (metadata.ogImage && !isValidUrl(metadata.ogImage)) {
6765
+ errors.push("Open Graph image must be a valid URL");
6766
+ }
6767
+ if (metadata.canonical && !isValidUrl(metadata.canonical)) {
6768
+ errors.push("Canonical URL must be a valid URL");
6769
+ }
6770
+ return {
6771
+ valid: errors.length === 0,
6772
+ errors
6773
+ };
6774
+ }
6775
+ function isValidUrl(url) {
6776
+ try {
6777
+ new URL(url);
6778
+ return true;
6779
+ } catch {
6780
+ return false;
6781
+ }
6782
+ }
6783
+ async function copyMetadataToClipboard(metadata) {
6784
+ const metaTags = generateMetaTags(metadata);
6785
+ const structuredData = metadata.schema ? generateStructuredData(metadata.schema) : "";
6786
+ const fullContent = `${metaTags}
6787
+
6788
+ ${structuredData}`;
6789
+ await navigator.clipboard.writeText(fullContent);
6790
+ }
6791
+ function downloadMetadata(metadata, filename = "seo-metadata.html") {
6792
+ const metaTags = generateMetaTags(metadata);
6793
+ const structuredData = metadata.schema ? generateStructuredData(metadata.schema) : "";
6794
+ const html = `<!DOCTYPE html>
6795
+ <html lang="en">
6796
+ <head>
6797
+ <meta charset="UTF-8">
6798
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6799
+ ${metaTags}
6800
+ ${structuredData}
6801
+ </head>
6802
+ <body>
6803
+ <!-- Your content here -->
6804
+ </body>
6805
+ </html>`;
6806
+ const blob = new Blob([html], { type: "text/html" });
6807
+ const url = URL.createObjectURL(blob);
6808
+ const a = document.createElement("a");
6809
+ a.href = url;
6810
+ a.download = filename;
6811
+ a.click();
6812
+ URL.revokeObjectURL(url);
6813
+ }
6814
+
6815
+ // src/plugins/SEOPlugin.tsx
6816
+ import { jsx as jsx16, jsxs as jsxs16 } from "react/jsx-runtime";
6817
+ function SEOPlugin({ metadata: initialMetadata, onMetadataChange, showAnalysis = true }) {
6818
+ const [editor] = useLexicalComposerContext14();
6819
+ const [showPanel, setShowPanel] = useState16(false);
6820
+ const [metadata, setMetadata] = useState16(
6821
+ initialMetadata || createDefaultMetadata("", "")
6822
+ );
6823
+ const [analysis, setAnalysis] = useState16(null);
6824
+ const [activeTab, setActiveTab] = useState16("basic");
6825
+ useEffect17(() => {
6826
+ if (initialMetadata) {
6827
+ setMetadata(initialMetadata);
6828
+ }
6829
+ }, [initialMetadata]);
6830
+ const handleAnalyze = () => {
6831
+ editor.getEditorState().read(() => {
6832
+ const html = $generateHtmlFromNodes2(editor);
6833
+ const result = analyzeSEO(html, metadata);
6834
+ setAnalysis(result);
6835
+ });
6836
+ };
6837
+ const handleMetadataUpdate = (updates) => {
6838
+ const updated = { ...metadata, ...updates };
6839
+ setMetadata(updated);
6840
+ onMetadataChange?.(updated);
6841
+ };
6842
+ const handleGenerateSlug = () => {
6843
+ if (metadata.title) {
6844
+ const slug = generateSlug(metadata.title);
6845
+ handleMetadataUpdate({ canonical: `https://example.com/${slug}` });
6846
+ }
6847
+ };
6848
+ const handleExtractKeywords = () => {
6849
+ editor.getEditorState().read(() => {
6850
+ const html = $generateHtmlFromNodes2(editor);
6851
+ const keywords = extractKeywords(html, 10);
6852
+ handleMetadataUpdate({ keywords });
6853
+ });
6854
+ };
6855
+ const handleCopy = async () => {
6856
+ await copyMetadataToClipboard(metadata);
6857
+ alert("Metadata copied to clipboard!");
6858
+ };
6859
+ const handleDownload = () => {
6860
+ downloadMetadata(metadata);
6861
+ };
6862
+ if (!showPanel) {
6863
+ return /* @__PURE__ */ jsx16(
6864
+ "button",
6865
+ {
6866
+ onClick: () => setShowPanel(true),
6867
+ className: "cms-seo-trigger",
6868
+ title: "SEO Settings",
6869
+ children: "\u{1F50D} SEO"
6870
+ }
6871
+ );
6872
+ }
6873
+ return /* @__PURE__ */ jsxs16("div", { className: "cms-seo-panel", children: [
6874
+ /* @__PURE__ */ jsx16("div", { className: "cms-seo-overlay", onClick: () => setShowPanel(false) }),
6875
+ /* @__PURE__ */ jsxs16("div", { className: "cms-seo-content", children: [
6876
+ /* @__PURE__ */ jsxs16("div", { className: "cms-seo-header", children: [
6877
+ /* @__PURE__ */ jsx16("h2", { children: "\u{1F50D} SEO Manager" }),
6878
+ /* @__PURE__ */ jsx16("button", { onClick: () => setShowPanel(false), className: "cms-seo-close", children: "\xD7" })
6879
+ ] }),
6880
+ /* @__PURE__ */ jsxs16("div", { className: "cms-seo-tabs", children: [
6881
+ /* @__PURE__ */ jsx16(
6882
+ "button",
6883
+ {
6884
+ className: activeTab === "basic" ? "active" : "",
6885
+ onClick: () => setActiveTab("basic"),
6886
+ children: "Basic"
6887
+ }
6888
+ ),
6889
+ /* @__PURE__ */ jsx16(
6890
+ "button",
6891
+ {
6892
+ className: activeTab === "social" ? "active" : "",
6893
+ onClick: () => setActiveTab("social"),
6894
+ children: "Social"
6895
+ }
6896
+ ),
6897
+ /* @__PURE__ */ jsx16(
6898
+ "button",
6899
+ {
6900
+ className: activeTab === "advanced" ? "active" : "",
6901
+ onClick: () => setActiveTab("advanced"),
6902
+ children: "Advanced"
6903
+ }
6904
+ ),
6905
+ showAnalysis && /* @__PURE__ */ jsx16(
6906
+ "button",
6907
+ {
6908
+ className: activeTab === "analysis" ? "active" : "",
6909
+ onClick: () => setActiveTab("analysis"),
6910
+ children: "Analysis"
6911
+ }
6912
+ )
6913
+ ] }),
6914
+ /* @__PURE__ */ jsxs16("div", { className: "cms-seo-body", children: [
6915
+ activeTab === "basic" && /* @__PURE__ */ jsx16(BasicTab, { metadata, onUpdate: handleMetadataUpdate, onGenerateSlug: handleGenerateSlug, onExtractKeywords: handleExtractKeywords }),
6916
+ activeTab === "social" && /* @__PURE__ */ jsx16(SocialTab, { metadata, onUpdate: handleMetadataUpdate }),
6917
+ activeTab === "advanced" && /* @__PURE__ */ jsx16(AdvancedTab, { metadata, onUpdate: handleMetadataUpdate }),
6918
+ activeTab === "analysis" && showAnalysis && /* @__PURE__ */ jsx16(AnalysisTab, { analysis, onAnalyze: handleAnalyze })
6919
+ ] }),
6920
+ /* @__PURE__ */ jsxs16("div", { className: "cms-seo-footer", children: [
6921
+ /* @__PURE__ */ jsx16("button", { onClick: handleCopy, className: "cms-btn-secondary", children: "\u{1F4CB} Copy Tags" }),
6922
+ /* @__PURE__ */ jsx16("button", { onClick: handleDownload, className: "cms-btn-secondary", children: "\u2B07 Download" }),
6923
+ /* @__PURE__ */ jsx16("button", { onClick: () => setShowPanel(false), className: "cms-btn-primary", children: "Done" })
6924
+ ] })
6925
+ ] })
6926
+ ] });
6927
+ }
6928
+ function BasicTab({ metadata, onUpdate, onGenerateSlug, onExtractKeywords }) {
6929
+ const validation = validateMetadata(metadata);
6930
+ return /* @__PURE__ */ jsxs16("div", { className: "cms-seo-tab", children: [
6931
+ /* @__PURE__ */ jsxs16("div", { className: "cms-seo-field", children: [
6932
+ /* @__PURE__ */ jsxs16("label", { children: [
6933
+ "Title ",
6934
+ /* @__PURE__ */ jsxs16("span", { className: "cms-char-count", children: [
6935
+ metadata.title?.length || 0,
6936
+ "/60"
6937
+ ] })
6938
+ ] }),
6939
+ /* @__PURE__ */ jsx16(
6940
+ "input",
6941
+ {
6942
+ type: "text",
6943
+ value: metadata.title || "",
6944
+ onChange: (e) => onUpdate({ title: e.target.value }),
6945
+ placeholder: "Page title",
6946
+ maxLength: 60
6947
+ }
6948
+ )
6949
+ ] }),
6950
+ /* @__PURE__ */ jsxs16("div", { className: "cms-seo-field", children: [
6951
+ /* @__PURE__ */ jsxs16("label", { children: [
6952
+ "Description ",
6953
+ /* @__PURE__ */ jsxs16("span", { className: "cms-char-count", children: [
6954
+ metadata.description?.length || 0,
6955
+ "/160"
6956
+ ] })
6957
+ ] }),
6958
+ /* @__PURE__ */ jsx16(
6959
+ "textarea",
6960
+ {
6961
+ value: metadata.description || "",
6962
+ onChange: (e) => onUpdate({ description: e.target.value }),
6963
+ placeholder: "Meta description",
6964
+ maxLength: 160,
6965
+ rows: 3
6966
+ }
6967
+ )
6968
+ ] }),
6969
+ /* @__PURE__ */ jsxs16("div", { className: "cms-seo-field", children: [
6970
+ /* @__PURE__ */ jsx16("label", { children: "Keywords" }),
6971
+ /* @__PURE__ */ jsxs16("div", { className: "cms-seo-field-with-action", children: [
6972
+ /* @__PURE__ */ jsx16(
6973
+ "input",
6974
+ {
6975
+ type: "text",
6976
+ value: metadata.keywords?.join(", ") || "",
6977
+ onChange: (e) => onUpdate({ keywords: e.target.value.split(",").map((k) => k.trim()) }),
6978
+ placeholder: "keyword1, keyword2, keyword3"
6979
+ }
6980
+ ),
6981
+ /* @__PURE__ */ jsx16("button", { onClick: onExtractKeywords, className: "cms-btn-icon", title: "Extract from content", children: "\u2728" })
6982
+ ] })
6983
+ ] }),
6984
+ /* @__PURE__ */ jsxs16("div", { className: "cms-seo-field", children: [
6985
+ /* @__PURE__ */ jsx16("label", { children: "Canonical URL" }),
6986
+ /* @__PURE__ */ jsxs16("div", { className: "cms-seo-field-with-action", children: [
6987
+ /* @__PURE__ */ jsx16(
6988
+ "input",
6989
+ {
6990
+ type: "url",
6991
+ value: metadata.canonical || "",
6992
+ onChange: (e) => onUpdate({ canonical: e.target.value }),
6993
+ placeholder: "https://example.com/page"
6994
+ }
6995
+ ),
6996
+ /* @__PURE__ */ jsx16("button", { onClick: onGenerateSlug, className: "cms-btn-icon", title: "Generate from title", children: "\u{1F517}" })
6997
+ ] })
6998
+ ] }),
6999
+ /* @__PURE__ */ jsxs16("div", { className: "cms-seo-field", children: [
7000
+ /* @__PURE__ */ jsx16("label", { children: "Author" }),
7001
+ /* @__PURE__ */ jsx16(
7002
+ "input",
7003
+ {
7004
+ type: "text",
7005
+ value: metadata.author || "",
7006
+ onChange: (e) => onUpdate({ author: e.target.value }),
7007
+ placeholder: "Author name"
7008
+ }
7009
+ )
7010
+ ] }),
7011
+ /* @__PURE__ */ jsxs16("div", { className: "cms-seo-field", children: [
7012
+ /* @__PURE__ */ jsx16("label", { children: "Robots" }),
7013
+ /* @__PURE__ */ jsxs16(
7014
+ "select",
7015
+ {
7016
+ value: metadata.robots || "index, follow",
7017
+ onChange: (e) => onUpdate({ robots: e.target.value }),
7018
+ children: [
7019
+ /* @__PURE__ */ jsx16("option", { value: "index, follow", children: "Index, Follow" }),
7020
+ /* @__PURE__ */ jsx16("option", { value: "noindex, follow", children: "No Index, Follow" }),
7021
+ /* @__PURE__ */ jsx16("option", { value: "index, nofollow", children: "Index, No Follow" }),
7022
+ /* @__PURE__ */ jsx16("option", { value: "noindex, nofollow", children: "No Index, No Follow" })
7023
+ ]
7024
+ }
7025
+ )
7026
+ ] }),
7027
+ !validation.valid && /* @__PURE__ */ jsxs16("div", { className: "cms-seo-validation-errors", children: [
7028
+ /* @__PURE__ */ jsx16("strong", { children: "\u26A0\uFE0F Validation Errors:" }),
7029
+ /* @__PURE__ */ jsx16("ul", { children: validation.errors.map((error, i) => /* @__PURE__ */ jsx16("li", { children: error }, i)) })
7030
+ ] })
7031
+ ] });
7032
+ }
7033
+ function SocialTab({ metadata, onUpdate }) {
7034
+ return /* @__PURE__ */ jsxs16("div", { className: "cms-seo-tab", children: [
7035
+ /* @__PURE__ */ jsx16("h3", { children: "Open Graph" }),
7036
+ /* @__PURE__ */ jsxs16("div", { className: "cms-seo-field", children: [
7037
+ /* @__PURE__ */ jsx16("label", { children: "OG Title" }),
7038
+ /* @__PURE__ */ jsx16(
7039
+ "input",
7040
+ {
7041
+ type: "text",
7042
+ value: metadata.ogTitle || "",
7043
+ onChange: (e) => onUpdate({ ogTitle: e.target.value }),
7044
+ placeholder: "Title for social media"
7045
+ }
7046
+ )
7047
+ ] }),
7048
+ /* @__PURE__ */ jsxs16("div", { className: "cms-seo-field", children: [
7049
+ /* @__PURE__ */ jsx16("label", { children: "OG Description" }),
7050
+ /* @__PURE__ */ jsx16(
7051
+ "textarea",
7052
+ {
7053
+ value: metadata.ogDescription || "",
7054
+ onChange: (e) => onUpdate({ ogDescription: e.target.value }),
7055
+ placeholder: "Description for social media",
7056
+ rows: 2
7057
+ }
7058
+ )
7059
+ ] }),
7060
+ /* @__PURE__ */ jsxs16("div", { className: "cms-seo-field", children: [
7061
+ /* @__PURE__ */ jsx16("label", { children: "OG Image URL" }),
7062
+ /* @__PURE__ */ jsx16(
7063
+ "input",
7064
+ {
7065
+ type: "url",
7066
+ value: metadata.ogImage || "",
7067
+ onChange: (e) => onUpdate({ ogImage: e.target.value }),
7068
+ placeholder: "https://example.com/image.jpg"
7069
+ }
7070
+ )
7071
+ ] }),
7072
+ /* @__PURE__ */ jsxs16("div", { className: "cms-seo-field", children: [
7073
+ /* @__PURE__ */ jsx16("label", { children: "OG Type" }),
7074
+ /* @__PURE__ */ jsxs16(
7075
+ "select",
7076
+ {
7077
+ value: metadata.ogType || "website",
7078
+ onChange: (e) => onUpdate({ ogType: e.target.value }),
7079
+ children: [
7080
+ /* @__PURE__ */ jsx16("option", { value: "website", children: "Website" }),
7081
+ /* @__PURE__ */ jsx16("option", { value: "article", children: "Article" }),
7082
+ /* @__PURE__ */ jsx16("option", { value: "blog", children: "Blog" }),
7083
+ /* @__PURE__ */ jsx16("option", { value: "product", children: "Product" })
7084
+ ]
7085
+ }
7086
+ )
7087
+ ] }),
7088
+ /* @__PURE__ */ jsx16("h3", { children: "Twitter Card" }),
7089
+ /* @__PURE__ */ jsxs16("div", { className: "cms-seo-field", children: [
7090
+ /* @__PURE__ */ jsx16("label", { children: "Card Type" }),
7091
+ /* @__PURE__ */ jsxs16(
7092
+ "select",
7093
+ {
7094
+ value: metadata.twitterCard || "summary_large_image",
7095
+ onChange: (e) => onUpdate({ twitterCard: e.target.value }),
7096
+ children: [
7097
+ /* @__PURE__ */ jsx16("option", { value: "summary", children: "Summary" }),
7098
+ /* @__PURE__ */ jsx16("option", { value: "summary_large_image", children: "Summary Large Image" }),
7099
+ /* @__PURE__ */ jsx16("option", { value: "app", children: "App" }),
7100
+ /* @__PURE__ */ jsx16("option", { value: "player", children: "Player" })
7101
+ ]
7102
+ }
7103
+ )
7104
+ ] }),
7105
+ /* @__PURE__ */ jsxs16("div", { className: "cms-seo-field", children: [
7106
+ /* @__PURE__ */ jsx16("label", { children: "Twitter Site" }),
7107
+ /* @__PURE__ */ jsx16(
7108
+ "input",
7109
+ {
7110
+ type: "text",
7111
+ value: metadata.twitterSite || "",
7112
+ onChange: (e) => onUpdate({ twitterSite: e.target.value }),
7113
+ placeholder: "@username"
7114
+ }
7115
+ )
7116
+ ] }),
7117
+ /* @__PURE__ */ jsxs16("div", { className: "cms-seo-field", children: [
7118
+ /* @__PURE__ */ jsx16("label", { children: "Twitter Creator" }),
7119
+ /* @__PURE__ */ jsx16(
7120
+ "input",
7121
+ {
7122
+ type: "text",
7123
+ value: metadata.twitterCreator || "",
7124
+ onChange: (e) => onUpdate({ twitterCreator: e.target.value }),
7125
+ placeholder: "@username"
7126
+ }
7127
+ )
7128
+ ] })
7129
+ ] });
7130
+ }
7131
+ function AdvancedTab({ metadata, onUpdate }) {
7132
+ return /* @__PURE__ */ jsxs16("div", { className: "cms-seo-tab", children: [
7133
+ /* @__PURE__ */ jsx16("h3", { children: "Article Metadata" }),
7134
+ /* @__PURE__ */ jsxs16("div", { className: "cms-seo-field", children: [
7135
+ /* @__PURE__ */ jsx16("label", { children: "Published Time" }),
7136
+ /* @__PURE__ */ jsx16(
7137
+ "input",
7138
+ {
7139
+ type: "datetime-local",
7140
+ value: metadata.articlePublishedTime || "",
7141
+ onChange: (e) => onUpdate({ articlePublishedTime: e.target.value })
7142
+ }
7143
+ )
7144
+ ] }),
7145
+ /* @__PURE__ */ jsxs16("div", { className: "cms-seo-field", children: [
7146
+ /* @__PURE__ */ jsx16("label", { children: "Modified Time" }),
7147
+ /* @__PURE__ */ jsx16(
7148
+ "input",
7149
+ {
7150
+ type: "datetime-local",
7151
+ value: metadata.articleModifiedTime || "",
7152
+ onChange: (e) => onUpdate({ articleModifiedTime: e.target.value })
7153
+ }
7154
+ )
7155
+ ] }),
7156
+ /* @__PURE__ */ jsxs16("div", { className: "cms-seo-field", children: [
7157
+ /* @__PURE__ */ jsx16("label", { children: "Article Author" }),
7158
+ /* @__PURE__ */ jsx16(
7159
+ "input",
7160
+ {
7161
+ type: "text",
7162
+ value: metadata.articleAuthor || "",
7163
+ onChange: (e) => onUpdate({ articleAuthor: e.target.value }),
7164
+ placeholder: "Author name"
7165
+ }
7166
+ )
7167
+ ] }),
7168
+ /* @__PURE__ */ jsxs16("div", { className: "cms-seo-field", children: [
7169
+ /* @__PURE__ */ jsx16("label", { children: "Section" }),
7170
+ /* @__PURE__ */ jsx16(
7171
+ "input",
7172
+ {
7173
+ type: "text",
7174
+ value: metadata.articleSection || "",
7175
+ onChange: (e) => onUpdate({ articleSection: e.target.value }),
7176
+ placeholder: "Technology, Business, etc."
7177
+ }
7178
+ )
7179
+ ] }),
7180
+ /* @__PURE__ */ jsxs16("div", { className: "cms-seo-field", children: [
7181
+ /* @__PURE__ */ jsx16("label", { children: "Article Tags" }),
7182
+ /* @__PURE__ */ jsx16(
7183
+ "input",
7184
+ {
7185
+ type: "text",
7186
+ value: metadata.articleTags?.join(", ") || "",
7187
+ onChange: (e) => onUpdate({ articleTags: e.target.value.split(",").map((t) => t.trim()) }),
7188
+ placeholder: "tag1, tag2, tag3"
7189
+ }
7190
+ )
7191
+ ] }),
7192
+ /* @__PURE__ */ jsx16("div", { className: "cms-seo-info", children: /* @__PURE__ */ jsx16("p", { children: "\u{1F4A1} Structured data (Schema.org) can be added programmatically via the API" }) })
7193
+ ] });
7194
+ }
7195
+ function AnalysisTab({ analysis, onAnalyze }) {
7196
+ if (!analysis) {
7197
+ return /* @__PURE__ */ jsxs16("div", { className: "cms-seo-tab cms-seo-analysis-empty", children: [
7198
+ /* @__PURE__ */ jsx16("p", { children: "Click the button below to analyze your content for SEO optimization." }),
7199
+ /* @__PURE__ */ jsx16("button", { onClick: onAnalyze, className: "cms-btn-primary", children: "\u{1F50D} Analyze Content" })
7200
+ ] });
7201
+ }
7202
+ const scoreColor = analysis.score >= 80 ? "#10b981" : analysis.score >= 60 ? "#f59e0b" : "#ef4444";
7203
+ return /* @__PURE__ */ jsxs16("div", { className: "cms-seo-tab", children: [
7204
+ /* @__PURE__ */ jsxs16("div", { className: "cms-seo-score", style: { borderColor: scoreColor }, children: [
7205
+ /* @__PURE__ */ jsx16("div", { className: "cms-seo-score-circle", style: { background: scoreColor }, children: analysis.score }),
7206
+ /* @__PURE__ */ jsx16("div", { className: "cms-seo-score-label", children: analysis.score >= 80 ? "Excellent" : analysis.score >= 60 ? "Good" : "Needs Improvement" })
7207
+ ] }),
7208
+ /* @__PURE__ */ jsx16("button", { onClick: onAnalyze, className: "cms-btn-secondary", style: { marginBottom: "1rem" }, children: "\u{1F504} Re-analyze" }),
7209
+ analysis.issues.length > 0 && /* @__PURE__ */ jsxs16("div", { className: "cms-seo-issues", children: [
7210
+ /* @__PURE__ */ jsx16("h3", { children: "Issues" }),
7211
+ analysis.issues.map((issue, i) => /* @__PURE__ */ jsxs16("div", { className: `cms-seo-issue cms-seo-issue-${issue.type}`, children: [
7212
+ /* @__PURE__ */ jsx16("span", { className: "cms-seo-issue-icon", children: issue.type === "error" ? "\u274C" : "\u26A0\uFE0F" }),
7213
+ /* @__PURE__ */ jsxs16("div", { children: [
7214
+ /* @__PURE__ */ jsx16("div", { className: "cms-seo-issue-message", children: issue.message }),
7215
+ /* @__PURE__ */ jsxs16("div", { className: "cms-seo-issue-meta", children: [
7216
+ issue.category,
7217
+ " \u2022 ",
7218
+ issue.impact,
7219
+ " impact"
7220
+ ] })
7221
+ ] })
7222
+ ] }, i))
7223
+ ] }),
7224
+ analysis.suggestions.length > 0 && /* @__PURE__ */ jsxs16("div", { className: "cms-seo-suggestions", children: [
7225
+ /* @__PURE__ */ jsx16("h3", { children: "Suggestions" }),
7226
+ analysis.suggestions.map((suggestion, i) => /* @__PURE__ */ jsxs16("div", { className: "cms-seo-suggestion", children: [
7227
+ /* @__PURE__ */ jsx16("span", { className: "cms-seo-suggestion-icon", children: "\u{1F4A1}" }),
7228
+ /* @__PURE__ */ jsxs16("div", { children: [
7229
+ /* @__PURE__ */ jsx16("div", { className: "cms-seo-suggestion-message", children: suggestion.message }),
7230
+ /* @__PURE__ */ jsxs16("div", { className: "cms-seo-suggestion-meta", children: [
7231
+ suggestion.category,
7232
+ " \u2022 ",
7233
+ suggestion.priority,
7234
+ " priority"
7235
+ ] })
7236
+ ] })
7237
+ ] }, i))
7238
+ ] }),
7239
+ /* @__PURE__ */ jsxs16("div", { className: "cms-seo-metrics", children: [
7240
+ /* @__PURE__ */ jsx16("h3", { children: "Metrics" }),
7241
+ /* @__PURE__ */ jsxs16("div", { className: "cms-seo-metrics-grid", children: [
7242
+ /* @__PURE__ */ jsxs16("div", { className: "cms-seo-metric", children: [
7243
+ /* @__PURE__ */ jsx16("div", { className: "cms-seo-metric-value", children: analysis.metrics.wordCount }),
7244
+ /* @__PURE__ */ jsx16("div", { className: "cms-seo-metric-label", children: "Words" })
7245
+ ] }),
7246
+ /* @__PURE__ */ jsxs16("div", { className: "cms-seo-metric", children: [
7247
+ /* @__PURE__ */ jsxs16("div", { className: "cms-seo-metric-value", children: [
7248
+ analysis.metrics.readingTime,
7249
+ " min"
7250
+ ] }),
7251
+ /* @__PURE__ */ jsx16("div", { className: "cms-seo-metric-label", children: "Reading Time" })
7252
+ ] }),
7253
+ /* @__PURE__ */ jsxs16("div", { className: "cms-seo-metric", children: [
7254
+ /* @__PURE__ */ jsx16("div", { className: "cms-seo-metric-value", children: analysis.metrics.headingCount.h1 }),
7255
+ /* @__PURE__ */ jsx16("div", { className: "cms-seo-metric-label", children: "H1 Tags" })
7256
+ ] }),
7257
+ /* @__PURE__ */ jsxs16("div", { className: "cms-seo-metric", children: [
7258
+ /* @__PURE__ */ jsx16("div", { className: "cms-seo-metric-value", children: analysis.metrics.imageCount }),
7259
+ /* @__PURE__ */ jsx16("div", { className: "cms-seo-metric-label", children: "Images" })
7260
+ ] }),
7261
+ /* @__PURE__ */ jsxs16("div", { className: "cms-seo-metric", children: [
7262
+ /* @__PURE__ */ jsx16("div", { className: "cms-seo-metric-value", children: analysis.metrics.linkCount }),
7263
+ /* @__PURE__ */ jsx16("div", { className: "cms-seo-metric-label", children: "Links" })
7264
+ ] }),
7265
+ /* @__PURE__ */ jsxs16("div", { className: "cms-seo-metric", children: [
7266
+ /* @__PURE__ */ jsxs16("div", { className: "cms-seo-metric-value", children: [
7267
+ analysis.metrics.imagesWithAlt,
7268
+ "/",
7269
+ analysis.metrics.imageCount
7270
+ ] }),
7271
+ /* @__PURE__ */ jsx16("div", { className: "cms-seo-metric-label", children: "Alt Text" })
7272
+ ] })
7273
+ ] })
7274
+ ] })
7275
+ ] });
7276
+ }
7277
+
6423
7278
  // src/core/EditorShell.tsx
6424
- import { jsx as jsx16, jsxs as jsxs16 } from "react/jsx-runtime";
7279
+ import { jsx as jsx17, jsxs as jsxs17 } from "react/jsx-runtime";
6425
7280
  function EditorShell({
6426
7281
  onChange,
6427
7282
  onImageAdded,
6428
7283
  onVideoAdded,
6429
- useBase64Url
7284
+ useBase64Url,
7285
+ seoMetadata,
7286
+ onSEOMetadataChange,
7287
+ showSEO
6430
7288
  }) {
6431
- return /* @__PURE__ */ jsxs16("div", { className: "cms-editor-shell", children: [
6432
- /* @__PURE__ */ jsx16(ToolbarPlugin, {}),
6433
- /* @__PURE__ */ jsx16(
7289
+ return /* @__PURE__ */ jsxs17("div", { className: "cms-editor-shell", children: [
7290
+ /* @__PURE__ */ jsx17(ToolbarPlugin, {}),
7291
+ showSEO && /* @__PURE__ */ jsx17("div", { className: "cms-toolbar-seo", children: /* @__PURE__ */ jsx17(
7292
+ SEOPlugin,
7293
+ {
7294
+ metadata: seoMetadata,
7295
+ onMetadataChange: onSEOMetadataChange,
7296
+ showAnalysis: true
7297
+ }
7298
+ ) }),
7299
+ /* @__PURE__ */ jsx17(
6434
7300
  RichTextPlugin,
6435
7301
  {
6436
- contentEditable: /* @__PURE__ */ jsx16(ContentEditable, { className: "cms-editor-content" }),
6437
- placeholder: /* @__PURE__ */ jsx16("div", { className: "cms-editor-placeholder", children: "Start typing or press / for commands..." }),
7302
+ contentEditable: /* @__PURE__ */ jsx17(ContentEditable, { className: "cms-editor-content" }),
7303
+ placeholder: /* @__PURE__ */ jsx17("div", { className: "cms-editor-placeholder", children: "Start typing or press / for commands..." }),
6438
7304
  ErrorBoundary: LexicalErrorBoundary
6439
7305
  }
6440
7306
  ),
6441
- /* @__PURE__ */ jsx16(HistoryPlugin, {}),
6442
- /* @__PURE__ */ jsx16(ListPlugin, {}),
6443
- /* @__PURE__ */ jsx16(LexicalLinkPlugin, {}),
6444
- /* @__PURE__ */ jsx16(LexicalTablePlugin, {}),
6445
- /* @__PURE__ */ jsx16(SlashCommandPlugin, {}),
6446
- /* @__PURE__ */ jsx16(ImageUploadPlugin, { onImageAdded, useBase64Url }),
6447
- /* @__PURE__ */ jsx16(VideoUploadPlugin, { onVideoAdded, useBase64Url }),
6448
- /* @__PURE__ */ jsx16(ImageEditorPlugin, {}),
6449
- /* @__PURE__ */ jsx16(LinkPlugin, {}),
6450
- /* @__PURE__ */ jsx16(SectionEditorPlugin, {}),
6451
- /* @__PURE__ */ jsx16(EmbedPlugin, {}),
6452
- /* @__PURE__ */ jsx16(TablePlugin, {}),
6453
- onChange && /* @__PURE__ */ jsx16(
7307
+ /* @__PURE__ */ jsx17(HistoryPlugin, {}),
7308
+ /* @__PURE__ */ jsx17(ListPlugin, {}),
7309
+ /* @__PURE__ */ jsx17(LexicalLinkPlugin, {}),
7310
+ /* @__PURE__ */ jsx17(LexicalTablePlugin, {}),
7311
+ /* @__PURE__ */ jsx17(SlashCommandPlugin, {}),
7312
+ /* @__PURE__ */ jsx17(ImageUploadPlugin, { onImageAdded, useBase64Url }),
7313
+ /* @__PURE__ */ jsx17(VideoUploadPlugin, { onVideoAdded, useBase64Url }),
7314
+ /* @__PURE__ */ jsx17(ImageEditorPlugin, {}),
7315
+ /* @__PURE__ */ jsx17(LinkPlugin, {}),
7316
+ /* @__PURE__ */ jsx17(SectionEditorPlugin, {}),
7317
+ /* @__PURE__ */ jsx17(EmbedPlugin, {}),
7318
+ /* @__PURE__ */ jsx17(TablePlugin, {}),
7319
+ onChange && /* @__PURE__ */ jsx17(
6454
7320
  OnChangePlugin,
6455
7321
  {
6456
7322
  onChange: (editorState) => {
@@ -6510,21 +7376,27 @@ function createEditorConfig(value) {
6510
7376
  }
6511
7377
 
6512
7378
  // src/core/CMSBlockEditor.tsx
6513
- import { jsx as jsx17 } from "react/jsx-runtime";
7379
+ import { jsx as jsx18 } from "react/jsx-runtime";
6514
7380
  function CMSBlockEditor({
6515
7381
  value,
6516
7382
  onChange,
6517
7383
  onImageAdded,
6518
7384
  onVideoAdded,
6519
- useBase64Url = true
7385
+ useBase64Url = true,
7386
+ seoMetadata,
7387
+ onSEOMetadataChange,
7388
+ showSEO = true
6520
7389
  }) {
6521
- return /* @__PURE__ */ jsx17(LexicalComposer, { initialConfig: createEditorConfig(value), children: /* @__PURE__ */ jsx17(
7390
+ return /* @__PURE__ */ jsx18(LexicalComposer, { initialConfig: createEditorConfig(value), children: /* @__PURE__ */ jsx18(
6522
7391
  EditorShell,
6523
7392
  {
6524
7393
  onChange,
6525
7394
  onImageAdded,
6526
7395
  onVideoAdded,
6527
- useBase64Url
7396
+ useBase64Url,
7397
+ seoMetadata,
7398
+ onSEOMetadataChange,
7399
+ showSEO
6528
7400
  }
6529
7401
  ) });
6530
7402
  }
@@ -6534,12 +7406,12 @@ import { LexicalComposer as LexicalComposer2 } from "@lexical/react/LexicalCompo
6534
7406
  import { RichTextPlugin as RichTextPlugin2 } from "@lexical/react/LexicalRichTextPlugin";
6535
7407
  import { ContentEditable as ContentEditable2 } from "@lexical/react/LexicalContentEditable";
6536
7408
  import LexicalErrorBoundary2 from "@lexical/react/LexicalErrorBoundary";
6537
- import { useEffect as useEffect17 } from "react";
6538
- import { useLexicalComposerContext as useLexicalComposerContext14 } from "@lexical/react/LexicalComposerContext";
6539
- import { jsx as jsx18, jsxs as jsxs17 } from "react/jsx-runtime";
7409
+ import { useEffect as useEffect18 } from "react";
7410
+ import { useLexicalComposerContext as useLexicalComposerContext15 } from "@lexical/react/LexicalComposerContext";
7411
+ import { jsx as jsx19, jsxs as jsxs18 } from "react/jsx-runtime";
6540
7412
  function ReadOnlyPlugin() {
6541
- const [editor] = useLexicalComposerContext14();
6542
- useEffect17(() => {
7413
+ const [editor] = useLexicalComposerContext15();
7414
+ useEffect18(() => {
6543
7415
  editor.setEditable(false);
6544
7416
  }, [editor]);
6545
7417
  return null;
@@ -6549,64 +7421,107 @@ function CMSRenderer({ content, className = "" }) {
6549
7421
  ...createEditorConfig(content),
6550
7422
  editable: false
6551
7423
  };
6552
- return /* @__PURE__ */ jsx18(LexicalComposer2, { initialConfig: config, children: /* @__PURE__ */ jsxs17("div", { className: `cms-renderer ${className}`, children: [
6553
- /* @__PURE__ */ jsx18(
7424
+ return /* @__PURE__ */ jsx19(LexicalComposer2, { initialConfig: config, children: /* @__PURE__ */ jsxs18("div", { className: `cms-renderer ${className}`, children: [
7425
+ /* @__PURE__ */ jsx19(
6554
7426
  RichTextPlugin2,
6555
7427
  {
6556
- contentEditable: /* @__PURE__ */ jsx18(ContentEditable2, { className: "cms-renderer-content" }),
7428
+ contentEditable: /* @__PURE__ */ jsx19(ContentEditable2, { className: "cms-renderer-content" }),
6557
7429
  placeholder: null,
6558
7430
  ErrorBoundary: LexicalErrorBoundary2
6559
7431
  }
6560
7432
  ),
6561
- /* @__PURE__ */ jsx18(ReadOnlyPlugin, {})
7433
+ /* @__PURE__ */ jsx19(ReadOnlyPlugin, {})
6562
7434
  ] }) });
6563
7435
  }
6564
7436
 
6565
7437
  // src/themes/ThemeProvider.tsx
6566
- import { createContext, useContext, useEffect as useEffect18, useState as useState16 } from "react";
7438
+ import { createContext, useContext, useEffect as useEffect19, useState as useState17 } from "react";
6567
7439
 
6568
7440
  // src/themes/lightTheme.ts
6569
7441
  var lightTheme = {
6570
7442
  name: "light",
7443
+ mode: "light",
6571
7444
  colors: {
6572
7445
  // Primary colors
6573
7446
  primary: "#667eea",
6574
7447
  primaryHover: "#5568d3",
6575
7448
  primaryLight: "#e0e7ff",
6576
7449
  primaryDark: "#4c51bf",
7450
+ primaryContrast: "#ffffff",
6577
7451
  // Secondary colors
6578
7452
  secondary: "#764ba2",
6579
7453
  secondaryHover: "#6a3f8f",
7454
+ secondaryLight: "#f3e8ff",
7455
+ secondaryDark: "#5b2c7d",
7456
+ secondaryContrast: "#ffffff",
7457
+ // Accent colors
7458
+ accent: "#f59e0b",
7459
+ accentHover: "#d97706",
7460
+ accentLight: "#fef3c7",
7461
+ accentDark: "#b45309",
6580
7462
  // Neutral colors
6581
7463
  background: "#ffffff",
7464
+ backgroundAlt: "#fafafa",
6582
7465
  surface: "#f9fafb",
7466
+ surfaceHover: "#f3f4f6",
7467
+ surfaceActive: "#e5e7eb",
6583
7468
  border: "#e5e7eb",
7469
+ borderHover: "#d1d5db",
6584
7470
  divider: "#d1d5db",
7471
+ overlay: "rgba(0, 0, 0, 0.5)",
6585
7472
  // Text colors
6586
7473
  textPrimary: "#1f2937",
6587
7474
  textSecondary: "#6b7280",
6588
- textDisabled: "#9ca3af",
7475
+ textTertiary: "#9ca3af",
7476
+ textDisabled: "#d1d5db",
7477
+ textInverse: "#ffffff",
6589
7478
  // Status colors
6590
7479
  success: "#10b981",
7480
+ successLight: "#d1fae5",
7481
+ successDark: "#065f46",
6591
7482
  warning: "#f59e0b",
7483
+ warningLight: "#fef3c7",
7484
+ warningDark: "#b45309",
6592
7485
  error: "#ef4444",
7486
+ errorLight: "#fee2e2",
7487
+ errorDark: "#991b1b",
6593
7488
  info: "#3b82f6",
7489
+ infoLight: "#dbeafe",
7490
+ infoDark: "#1e40af",
6594
7491
  // Editor specific
6595
7492
  editorBackground: "#ffffff",
6596
7493
  editorText: "#1f2937",
6597
7494
  editorPlaceholder: "#9ca3af",
7495
+ editorCursor: "#667eea",
6598
7496
  toolbarBackground: "#f9fafb",
6599
7497
  toolbarText: "#374151",
6600
7498
  toolbarBorder: "#e5e7eb",
7499
+ toolbarIconHover: "#667eea",
6601
7500
  // Selection and highlights
6602
7501
  selection: "#dbeafe",
7502
+ selectionText: "#1f2937",
6603
7503
  highlight: "#fef3c7",
6604
- focus: "#667eea"
7504
+ highlightText: "#1f2937",
7505
+ focus: "#667eea",
7506
+ focusRing: "rgba(102, 126, 234, 0.5)",
7507
+ // Code editor colors
7508
+ codeBackground: "#f3f4f6",
7509
+ codeText: "#1f2937",
7510
+ codeComment: "#6b7280",
7511
+ codeKeyword: "#8b5cf6",
7512
+ codeString: "#10b981",
7513
+ codeNumber: "#f59e0b",
7514
+ codeFunction: "#3b82f6",
7515
+ codeOperator: "#ef4444"
6605
7516
  },
6606
7517
  typography: {
7518
+ // Font families
6607
7519
  fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',
7520
+ fontFamilyHeading: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',
6608
7521
  fontFamilyMono: 'ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace',
6609
7522
  // Font sizes
7523
+ fontSizeXxs: "0.625rem",
7524
+ // 10px
6610
7525
  fontSizeXs: "0.75rem",
6611
7526
  // 12px
6612
7527
  fontSizeSm: "0.875rem",
@@ -6617,16 +7532,34 @@ var lightTheme = {
6617
7532
  // 18px
6618
7533
  fontSizeXl: "1.25rem",
6619
7534
  // 20px
7535
+ fontSizeXxl: "1.5rem",
7536
+ // 24px
7537
+ fontSize3xl: "1.875rem",
7538
+ // 30px
7539
+ fontSize4xl: "2.25rem",
7540
+ // 36px
6620
7541
  // Font weights
7542
+ fontWeightLight: 300,
6621
7543
  fontWeightNormal: 400,
6622
7544
  fontWeightMedium: 500,
6623
- fontWeightBold: 600,
7545
+ fontWeightSemibold: 600,
7546
+ fontWeightBold: 700,
7547
+ fontWeightExtrabold: 800,
6624
7548
  // Line heights
6625
7549
  lineHeightTight: 1.25,
7550
+ lineHeightSnug: 1.375,
6626
7551
  lineHeightNormal: 1.5,
6627
- lineHeightRelaxed: 1.75
7552
+ lineHeightRelaxed: 1.625,
7553
+ lineHeightLoose: 2,
7554
+ // Letter spacing
7555
+ letterSpacingTight: "-0.025em",
7556
+ letterSpacingNormal: "0",
7557
+ letterSpacingWide: "0.025em",
7558
+ letterSpacingWider: "0.05em"
6628
7559
  },
6629
7560
  spacing: {
7561
+ xxs: "0.125rem",
7562
+ // 2px
6630
7563
  xs: "0.25rem",
6631
7564
  // 4px
6632
7565
  sm: "0.5rem",
@@ -6637,105 +7570,272 @@ var lightTheme = {
6637
7570
  // 24px
6638
7571
  xl: "2rem",
6639
7572
  // 32px
6640
- xxl: "3rem"
7573
+ xxl: "3rem",
6641
7574
  // 48px
7575
+ xxxl: "4rem"
7576
+ // 64px
6642
7577
  },
6643
7578
  borderRadius: {
6644
7579
  none: "0",
7580
+ xs: "0.125rem",
7581
+ // 2px
6645
7582
  sm: "0.25rem",
6646
7583
  // 4px
6647
7584
  md: "0.5rem",
6648
7585
  // 8px
6649
7586
  lg: "0.75rem",
6650
7587
  // 12px
7588
+ xl: "1rem",
7589
+ // 16px
7590
+ xxl: "1.5rem",
7591
+ // 24px
6651
7592
  full: "9999px"
6652
7593
  },
6653
7594
  shadows: {
6654
7595
  none: "none",
6655
- sm: "0 1px 2px 0 rgba(0, 0, 0, 0.05)",
7596
+ xs: "0 1px 2px 0 rgba(0, 0, 0, 0.05)",
7597
+ sm: "0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",
6656
7598
  md: "0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",
6657
7599
  lg: "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",
6658
- xl: "0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)"
7600
+ xl: "0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)",
7601
+ xxl: "0 25px 50px -12px rgba(0, 0, 0, 0.25)",
7602
+ inner: "inset 0 2px 4px 0 rgba(0, 0, 0, 0.06)",
7603
+ outline: "0 0 0 3px rgba(102, 126, 234, 0.5)"
7604
+ },
7605
+ transitions: {
7606
+ fast: "150ms cubic-bezier(0.4, 0, 0.2, 1)",
7607
+ normal: "300ms cubic-bezier(0.4, 0, 0.2, 1)",
7608
+ slow: "500ms cubic-bezier(0.4, 0, 0.2, 1)",
7609
+ verySlow: "700ms cubic-bezier(0.4, 0, 0.2, 1)"
7610
+ },
7611
+ breakpoints: {
7612
+ xs: "480px",
7613
+ sm: "640px",
7614
+ md: "768px",
7615
+ lg: "1024px",
7616
+ xl: "1280px",
7617
+ xxl: "1536px"
7618
+ },
7619
+ zIndex: {
7620
+ dropdown: 1e3,
7621
+ sticky: 1020,
7622
+ fixed: 1030,
7623
+ modalBackdrop: 1040,
7624
+ modal: 1050,
7625
+ popover: 1060,
7626
+ tooltip: 1070
7627
+ },
7628
+ animations: {
7629
+ fadeIn: "fadeIn 0.3s ease-in-out",
7630
+ fadeOut: "fadeOut 0.3s ease-in-out",
7631
+ slideUp: "slideUp 0.3s ease-out",
7632
+ slideDown: "slideDown 0.3s ease-out",
7633
+ slideLeft: "slideLeft 0.3s ease-out",
7634
+ slideRight: "slideRight 0.3s ease-out",
7635
+ scaleUp: "scaleUp 0.2s ease-out",
7636
+ scaleDown: "scaleDown 0.2s ease-out",
7637
+ spin: "spin 1s linear infinite",
7638
+ pulse: "pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",
7639
+ bounce: "bounce 1s infinite"
7640
+ },
7641
+ gradients: {
7642
+ primary: "linear-gradient(135deg, #667eea 0%, #764ba2 100%)",
7643
+ secondary: "linear-gradient(135deg, #764ba2 0%, #f093fb 100%)",
7644
+ accent: "linear-gradient(135deg, #f59e0b 0%, #ef4444 100%)",
7645
+ sunset: "linear-gradient(135deg, #ff6b6b 0%, #feca57 100%)",
7646
+ ocean: "linear-gradient(135deg, #0891b2 0%, #3b82f6 100%)",
7647
+ forest: "linear-gradient(135deg, #059669 0%, #10b981 100%)",
7648
+ fire: "linear-gradient(135deg, #ef4444 0%, #f97316 100%)",
7649
+ ice: "linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%)",
7650
+ purple: "linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%)",
7651
+ rainbow: "linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #4facfe 75%, #00f2fe 100%)"
6659
7652
  }
6660
7653
  };
6661
7654
 
6662
7655
  // src/themes/darkTheme.ts
6663
7656
  var darkTheme = {
6664
7657
  name: "dark",
7658
+ mode: "dark",
6665
7659
  colors: {
6666
7660
  // Primary colors
6667
7661
  primary: "#818cf8",
6668
7662
  primaryHover: "#6366f1",
6669
7663
  primaryLight: "#312e81",
6670
7664
  primaryDark: "#4f46e5",
7665
+ primaryContrast: "#ffffff",
6671
7666
  // Secondary colors
6672
7667
  secondary: "#a78bfa",
6673
7668
  secondaryHover: "#8b5cf6",
7669
+ secondaryLight: "#4c1d95",
7670
+ secondaryDark: "#7c3aed",
7671
+ secondaryContrast: "#ffffff",
7672
+ // Accent colors
7673
+ accent: "#fbbf24",
7674
+ accentHover: "#f59e0b",
7675
+ accentLight: "#78350f",
7676
+ accentDark: "#d97706",
6674
7677
  // Neutral colors
6675
7678
  background: "#111827",
7679
+ backgroundAlt: "#0f172a",
6676
7680
  surface: "#1f2937",
7681
+ surfaceHover: "#374151",
7682
+ surfaceActive: "#4b5563",
6677
7683
  border: "#374151",
7684
+ borderHover: "#4b5563",
6678
7685
  divider: "#4b5563",
7686
+ overlay: "rgba(0, 0, 0, 0.75)",
6679
7687
  // Text colors
6680
7688
  textPrimary: "#f9fafb",
6681
7689
  textSecondary: "#d1d5db",
7690
+ textTertiary: "#9ca3af",
6682
7691
  textDisabled: "#6b7280",
7692
+ textInverse: "#1f2937",
6683
7693
  // Status colors
6684
7694
  success: "#34d399",
7695
+ successLight: "#064e3b",
7696
+ successDark: "#10b981",
6685
7697
  warning: "#fbbf24",
7698
+ warningLight: "#78350f",
7699
+ warningDark: "#f59e0b",
6686
7700
  error: "#f87171",
7701
+ errorLight: "#7f1d1d",
7702
+ errorDark: "#ef4444",
6687
7703
  info: "#60a5fa",
7704
+ infoLight: "#1e3a8a",
7705
+ infoDark: "#3b82f6",
6688
7706
  // Editor specific
6689
7707
  editorBackground: "#1f2937",
6690
7708
  editorText: "#f9fafb",
6691
7709
  editorPlaceholder: "#6b7280",
7710
+ editorCursor: "#818cf8",
6692
7711
  toolbarBackground: "#111827",
6693
7712
  toolbarText: "#e5e7eb",
6694
7713
  toolbarBorder: "#374151",
7714
+ toolbarIconHover: "#818cf8",
6695
7715
  // Selection and highlights
6696
7716
  selection: "#1e3a8a",
7717
+ selectionText: "#f9fafb",
6697
7718
  highlight: "#78350f",
6698
- focus: "#818cf8"
7719
+ highlightText: "#f9fafb",
7720
+ focus: "#818cf8",
7721
+ focusRing: "rgba(129, 140, 248, 0.5)",
7722
+ // Code editor colors
7723
+ codeBackground: "#111827",
7724
+ codeText: "#f9fafb",
7725
+ codeComment: "#6b7280",
7726
+ codeKeyword: "#a78bfa",
7727
+ codeString: "#34d399",
7728
+ codeNumber: "#fbbf24",
7729
+ codeFunction: "#60a5fa",
7730
+ codeOperator: "#f87171"
6699
7731
  },
6700
7732
  typography: {
6701
7733
  fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',
7734
+ fontFamilyHeading: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',
6702
7735
  fontFamilyMono: 'ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace',
6703
- // Font sizes
7736
+ fontSizeXxs: "0.625rem",
6704
7737
  fontSizeXs: "0.75rem",
6705
7738
  fontSizeSm: "0.875rem",
6706
7739
  fontSizeMd: "1rem",
6707
7740
  fontSizeLg: "1.125rem",
6708
7741
  fontSizeXl: "1.25rem",
6709
- // Font weights
7742
+ fontSizeXxl: "1.5rem",
7743
+ fontSize3xl: "1.875rem",
7744
+ fontSize4xl: "2.25rem",
7745
+ fontWeightLight: 300,
6710
7746
  fontWeightNormal: 400,
6711
7747
  fontWeightMedium: 500,
6712
- fontWeightBold: 600,
6713
- // Line heights
7748
+ fontWeightSemibold: 600,
7749
+ fontWeightBold: 700,
7750
+ fontWeightExtrabold: 800,
6714
7751
  lineHeightTight: 1.25,
7752
+ lineHeightSnug: 1.375,
6715
7753
  lineHeightNormal: 1.5,
6716
- lineHeightRelaxed: 1.75
7754
+ lineHeightRelaxed: 1.625,
7755
+ lineHeightLoose: 2,
7756
+ letterSpacingTight: "-0.025em",
7757
+ letterSpacingNormal: "0",
7758
+ letterSpacingWide: "0.025em",
7759
+ letterSpacingWider: "0.05em"
6717
7760
  },
6718
7761
  spacing: {
7762
+ xxs: "0.125rem",
6719
7763
  xs: "0.25rem",
6720
7764
  sm: "0.5rem",
6721
7765
  md: "1rem",
6722
7766
  lg: "1.5rem",
6723
7767
  xl: "2rem",
6724
- xxl: "3rem"
7768
+ xxl: "3rem",
7769
+ xxxl: "4rem"
6725
7770
  },
6726
7771
  borderRadius: {
6727
7772
  none: "0",
7773
+ xs: "0.125rem",
6728
7774
  sm: "0.25rem",
6729
7775
  md: "0.5rem",
6730
7776
  lg: "0.75rem",
7777
+ xl: "1rem",
7778
+ xxl: "1.5rem",
6731
7779
  full: "9999px"
6732
7780
  },
6733
7781
  shadows: {
6734
7782
  none: "none",
6735
- sm: "0 1px 2px 0 rgba(0, 0, 0, 0.3)",
7783
+ xs: "0 1px 2px 0 rgba(0, 0, 0, 0.3)",
7784
+ sm: "0 1px 3px 0 rgba(0, 0, 0, 0.4), 0 1px 2px 0 rgba(0, 0, 0, 0.3)",
6736
7785
  md: "0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3)",
6737
7786
  lg: "0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3)",
6738
- xl: "0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.4)"
7787
+ xl: "0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.4)",
7788
+ xxl: "0 25px 50px -12px rgba(0, 0, 0, 0.6)",
7789
+ inner: "inset 0 2px 4px 0 rgba(0, 0, 0, 0.3)",
7790
+ outline: "0 0 0 3px rgba(129, 140, 248, 0.5)"
7791
+ },
7792
+ transitions: {
7793
+ fast: "150ms cubic-bezier(0.4, 0, 0.2, 1)",
7794
+ normal: "300ms cubic-bezier(0.4, 0, 0.2, 1)",
7795
+ slow: "500ms cubic-bezier(0.4, 0, 0.2, 1)",
7796
+ verySlow: "700ms cubic-bezier(0.4, 0, 0.2, 1)"
7797
+ },
7798
+ breakpoints: {
7799
+ xs: "480px",
7800
+ sm: "640px",
7801
+ md: "768px",
7802
+ lg: "1024px",
7803
+ xl: "1280px",
7804
+ xxl: "1536px"
7805
+ },
7806
+ zIndex: {
7807
+ dropdown: 1e3,
7808
+ sticky: 1020,
7809
+ fixed: 1030,
7810
+ modalBackdrop: 1040,
7811
+ modal: 1050,
7812
+ popover: 1060,
7813
+ tooltip: 1070
7814
+ },
7815
+ animations: {
7816
+ fadeIn: "fadeIn 0.3s ease-in-out",
7817
+ fadeOut: "fadeOut 0.3s ease-in-out",
7818
+ slideUp: "slideUp 0.3s ease-out",
7819
+ slideDown: "slideDown 0.3s ease-out",
7820
+ slideLeft: "slideLeft 0.3s ease-out",
7821
+ slideRight: "slideRight 0.3s ease-out",
7822
+ scaleUp: "scaleUp 0.2s ease-out",
7823
+ scaleDown: "scaleDown 0.2s ease-out",
7824
+ spin: "spin 1s linear infinite",
7825
+ pulse: "pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",
7826
+ bounce: "bounce 1s infinite"
7827
+ },
7828
+ gradients: {
7829
+ primary: "linear-gradient(135deg, #818cf8 0%, #a78bfa 100%)",
7830
+ secondary: "linear-gradient(135deg, #a78bfa 0%, #c4b5fd 100%)",
7831
+ accent: "linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%)",
7832
+ sunset: "linear-gradient(135deg, #f87171 0%, #fbbf24 100%)",
7833
+ ocean: "linear-gradient(135deg, #06b6d4 0%, #60a5fa 100%)",
7834
+ forest: "linear-gradient(135deg, #10b981 0%, #34d399 100%)",
7835
+ fire: "linear-gradient(135deg, #f87171 0%, #fb923c 100%)",
7836
+ ice: "linear-gradient(135deg, #60a5fa 0%, #22d3ee 100%)",
7837
+ purple: "linear-gradient(135deg, #a78bfa 0%, #c4b5fd 100%)",
7838
+ rainbow: "linear-gradient(135deg, #818cf8 0%, #a78bfa 25%, #c4b5fd 50%, #60a5fa 75%, #22d3ee 100%)"
6739
7839
  }
6740
7840
  };
6741
7841
 
@@ -6870,9 +7970,12 @@ var minimalTheme = {
6870
7970
  },
6871
7971
  borderRadius: {
6872
7972
  none: "0",
7973
+ xs: "0",
6873
7974
  sm: "0",
6874
7975
  md: "0",
6875
7976
  lg: "0",
7977
+ xl: "0",
7978
+ xxl: "0",
6876
7979
  full: "0"
6877
7980
  }
6878
7981
  };
@@ -6890,7 +7993,7 @@ var presetThemes = {
6890
7993
  };
6891
7994
 
6892
7995
  // src/themes/ThemeProvider.tsx
6893
- import { jsx as jsx19 } from "react/jsx-runtime";
7996
+ import { jsx as jsx20 } from "react/jsx-runtime";
6894
7997
  var ThemeContext = createContext(void 0);
6895
7998
  function ThemeProvider({
6896
7999
  children,
@@ -6898,13 +8001,13 @@ function ThemeProvider({
6898
8001
  defaultMode = "light",
6899
8002
  storageKey = "cms-editor-theme"
6900
8003
  }) {
6901
- const [theme, setThemeState] = useState16(() => {
8004
+ const [theme, setThemeState] = useState17(() => {
6902
8005
  if (typeof defaultTheme === "string") {
6903
8006
  return presetThemes[defaultTheme] || lightTheme;
6904
8007
  }
6905
8008
  return defaultTheme;
6906
8009
  });
6907
- const [mode, setModeState] = useState16(() => {
8010
+ const [mode, setModeState] = useState17(() => {
6908
8011
  if (typeof window !== "undefined" && storageKey) {
6909
8012
  const stored = localStorage.getItem(`${storageKey}-mode`);
6910
8013
  if (stored === "light" || stored === "dark" || stored === "auto") {
@@ -6913,7 +8016,7 @@ function ThemeProvider({
6913
8016
  }
6914
8017
  return defaultMode;
6915
8018
  });
6916
- useEffect18(() => {
8019
+ useEffect19(() => {
6917
8020
  if (mode === "auto" && typeof window !== "undefined") {
6918
8021
  const mediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
6919
8022
  const handleChange = (e) => {
@@ -6945,12 +8048,12 @@ function ThemeProvider({
6945
8048
  root.style.setProperty(`--cms-shadow-${key}`, value);
6946
8049
  });
6947
8050
  };
6948
- useEffect18(() => {
8051
+ useEffect19(() => {
6949
8052
  if (mode !== "auto") {
6950
8053
  applyTheme(theme);
6951
8054
  }
6952
8055
  }, [theme, mode]);
6953
- useEffect18(() => {
8056
+ useEffect19(() => {
6954
8057
  if (typeof window !== "undefined" && storageKey) {
6955
8058
  localStorage.setItem(`${storageKey}-mode`, mode);
6956
8059
  localStorage.setItem(`${storageKey}-name`, theme.name);
@@ -6977,7 +8080,7 @@ function ThemeProvider({
6977
8080
  const newMode = mode === "light" ? "dark" : "light";
6978
8081
  setMode(newMode);
6979
8082
  };
6980
- return /* @__PURE__ */ jsx19(ThemeContext.Provider, { value: { theme, mode, setTheme, setMode, toggleMode }, children });
8083
+ return /* @__PURE__ */ jsx20(ThemeContext.Provider, { value: { theme, mode, setTheme, setMode, toggleMode }, children });
6981
8084
  }
6982
8085
  function useTheme() {
6983
8086
  const context = useContext(ThemeContext);
@@ -6991,18 +8094,18 @@ function camelToKebab(str) {
6991
8094
  }
6992
8095
 
6993
8096
  // src/themes/ThemeSwitcher.tsx
6994
- import { useState as useState17 } from "react";
6995
- import { Fragment as Fragment10, jsx as jsx20, jsxs as jsxs18 } from "react/jsx-runtime";
8097
+ import { useState as useState18 } from "react";
8098
+ import { Fragment as Fragment10, jsx as jsx21, jsxs as jsxs19 } from "react/jsx-runtime";
6996
8099
  function ThemeSwitcher({
6997
8100
  className = "",
6998
8101
  showModeToggle = true,
6999
8102
  showPresets = true
7000
8103
  }) {
7001
8104
  const { theme, mode, setTheme, setMode, toggleMode } = useTheme();
7002
- const [isOpen, setIsOpen] = useState17(false);
8105
+ const [isOpen, setIsOpen] = useState18(false);
7003
8106
  const themeNames = Object.keys(presetThemes);
7004
- return /* @__PURE__ */ jsxs18("div", { className: `cms-theme-switcher ${className}`, children: [
7005
- showModeToggle && /* @__PURE__ */ jsx20(
8107
+ return /* @__PURE__ */ jsxs19("div", { className: `cms-theme-switcher ${className}`, children: [
8108
+ showModeToggle && /* @__PURE__ */ jsx21(
7006
8109
  "button",
7007
8110
  {
7008
8111
  onClick: toggleMode,
@@ -7011,8 +8114,8 @@ function ThemeSwitcher({
7011
8114
  children: mode === "light" ? "\u{1F319}" : "\u2600\uFE0F"
7012
8115
  }
7013
8116
  ),
7014
- showPresets && /* @__PURE__ */ jsxs18("div", { className: "cms-theme-selector", children: [
7015
- /* @__PURE__ */ jsxs18(
8117
+ showPresets && /* @__PURE__ */ jsxs19("div", { className: "cms-theme-selector", children: [
8118
+ /* @__PURE__ */ jsxs19(
7016
8119
  "button",
7017
8120
  {
7018
8121
  onClick: () => setIsOpen(!isOpen),
@@ -7023,22 +8126,22 @@ function ThemeSwitcher({
7023
8126
  ]
7024
8127
  }
7025
8128
  ),
7026
- isOpen && /* @__PURE__ */ jsxs18(Fragment10, { children: [
7027
- /* @__PURE__ */ jsx20(
8129
+ isOpen && /* @__PURE__ */ jsxs19(Fragment10, { children: [
8130
+ /* @__PURE__ */ jsx21(
7028
8131
  "div",
7029
8132
  {
7030
8133
  className: "cms-theme-selector-overlay",
7031
8134
  onClick: () => setIsOpen(false)
7032
8135
  }
7033
8136
  ),
7034
- /* @__PURE__ */ jsxs18("div", { className: "cms-theme-selector-dropdown", children: [
7035
- /* @__PURE__ */ jsxs18("div", { className: "cms-theme-selector-header", children: [
7036
- /* @__PURE__ */ jsx20("h3", { children: "Choose Theme" }),
7037
- /* @__PURE__ */ jsx20("button", { onClick: () => setIsOpen(false), children: "\xD7" })
8137
+ /* @__PURE__ */ jsxs19("div", { className: "cms-theme-selector-dropdown", children: [
8138
+ /* @__PURE__ */ jsxs19("div", { className: "cms-theme-selector-header", children: [
8139
+ /* @__PURE__ */ jsx21("h3", { children: "Choose Theme" }),
8140
+ /* @__PURE__ */ jsx21("button", { onClick: () => setIsOpen(false), children: "\xD7" })
7038
8141
  ] }),
7039
- /* @__PURE__ */ jsx20("div", { className: "cms-theme-selector-grid", children: themeNames.map((themeName) => {
8142
+ /* @__PURE__ */ jsx21("div", { className: "cms-theme-selector-grid", children: themeNames.map((themeName) => {
7040
8143
  const presetTheme = presetThemes[themeName];
7041
- return /* @__PURE__ */ jsxs18(
8144
+ return /* @__PURE__ */ jsxs19(
7042
8145
  "button",
7043
8146
  {
7044
8147
  onClick: () => {
@@ -7047,7 +8150,7 @@ function ThemeSwitcher({
7047
8150
  },
7048
8151
  className: `cms-theme-option ${theme.name === themeName ? "active" : ""}`,
7049
8152
  children: [
7050
- /* @__PURE__ */ jsx20(
8153
+ /* @__PURE__ */ jsx21(
7051
8154
  "div",
7052
8155
  {
7053
8156
  className: "cms-theme-preview",
@@ -7055,7 +8158,7 @@ function ThemeSwitcher({
7055
8158
  background: presetTheme.colors.primary,
7056
8159
  borderColor: presetTheme.colors.border
7057
8160
  },
7058
- children: /* @__PURE__ */ jsx20(
8161
+ children: /* @__PURE__ */ jsx21(
7059
8162
  "div",
7060
8163
  {
7061
8164
  className: "cms-theme-preview-accent",
@@ -7064,16 +8167,16 @@ function ThemeSwitcher({
7064
8167
  )
7065
8168
  }
7066
8169
  ),
7067
- /* @__PURE__ */ jsx20("span", { className: "cms-theme-name", children: themeName }),
7068
- theme.name === themeName && /* @__PURE__ */ jsx20("span", { className: "cms-theme-check", children: "\u2713" })
8170
+ /* @__PURE__ */ jsx21("span", { className: "cms-theme-name", children: themeName }),
8171
+ theme.name === themeName && /* @__PURE__ */ jsx21("span", { className: "cms-theme-check", children: "\u2713" })
7069
8172
  ]
7070
8173
  },
7071
8174
  themeName
7072
8175
  );
7073
8176
  }) }),
7074
- /* @__PURE__ */ jsxs18("div", { className: "cms-theme-selector-modes", children: [
7075
- /* @__PURE__ */ jsxs18("label", { children: [
7076
- /* @__PURE__ */ jsx20(
8177
+ /* @__PURE__ */ jsxs19("div", { className: "cms-theme-selector-modes", children: [
8178
+ /* @__PURE__ */ jsxs19("label", { children: [
8179
+ /* @__PURE__ */ jsx21(
7077
8180
  "input",
7078
8181
  {
7079
8182
  type: "radio",
@@ -7085,8 +8188,8 @@ function ThemeSwitcher({
7085
8188
  ),
7086
8189
  "Light"
7087
8190
  ] }),
7088
- /* @__PURE__ */ jsxs18("label", { children: [
7089
- /* @__PURE__ */ jsx20(
8191
+ /* @__PURE__ */ jsxs19("label", { children: [
8192
+ /* @__PURE__ */ jsx21(
7090
8193
  "input",
7091
8194
  {
7092
8195
  type: "radio",
@@ -7098,8 +8201,8 @@ function ThemeSwitcher({
7098
8201
  ),
7099
8202
  "Dark"
7100
8203
  ] }),
7101
- /* @__PURE__ */ jsxs18("label", { children: [
7102
- /* @__PURE__ */ jsx20(
8204
+ /* @__PURE__ */ jsxs19("label", { children: [
8205
+ /* @__PURE__ */ jsx21(
7103
8206
  "input",
7104
8207
  {
7105
8208
  type: "radio",
@@ -7117,29 +8220,804 @@ function ThemeSwitcher({
7117
8220
  ] })
7118
8221
  ] });
7119
8222
  }
8223
+
8224
+ // src/themes/ThemeCustomizer.tsx
8225
+ import { useState as useState19 } from "react";
8226
+
8227
+ // src/themes/themeBuilder.ts
8228
+ function deepMerge(target, source) {
8229
+ const result = { ...target };
8230
+ for (const key in source) {
8231
+ if (source[key] && typeof source[key] === "object" && !Array.isArray(source[key])) {
8232
+ result[key] = deepMerge(result[key] || {}, source[key]);
8233
+ } else if (source[key] !== void 0) {
8234
+ result[key] = source[key];
8235
+ }
8236
+ }
8237
+ return result;
8238
+ }
8239
+ function createTheme(baseTheme, override) {
8240
+ return deepMerge(baseTheme, override);
8241
+ }
8242
+ function generateColorVariations(baseColor) {
8243
+ return {
8244
+ base: baseColor,
8245
+ light: adjustBrightness(baseColor, 20),
8246
+ lighter: adjustBrightness(baseColor, 40),
8247
+ dark: adjustBrightness(baseColor, -20),
8248
+ darker: adjustBrightness(baseColor, -40),
8249
+ contrast: getContrastColor(baseColor)
8250
+ };
8251
+ }
8252
+ function adjustBrightness(color, percent) {
8253
+ const hex = color.replace("#", "");
8254
+ const r = parseInt(hex.substring(0, 2), 16);
8255
+ const g = parseInt(hex.substring(2, 4), 16);
8256
+ const b = parseInt(hex.substring(4, 6), 16);
8257
+ const adjust = (value) => {
8258
+ const adjusted = value + value * percent / 100;
8259
+ return Math.max(0, Math.min(255, Math.round(adjusted)));
8260
+ };
8261
+ const newR = adjust(r);
8262
+ const newG = adjust(g);
8263
+ const newB = adjust(b);
8264
+ return `#${newR.toString(16).padStart(2, "0")}${newG.toString(16).padStart(2, "0")}${newB.toString(16).padStart(2, "0")}`;
8265
+ }
8266
+ function getContrastColor(color) {
8267
+ const hex = color.replace("#", "");
8268
+ const r = parseInt(hex.substring(0, 2), 16);
8269
+ const g = parseInt(hex.substring(2, 4), 16);
8270
+ const b = parseInt(hex.substring(4, 6), 16);
8271
+ const luminance = (0.299 * r + 0.587 * g + 0.114 * b) / 255;
8272
+ return luminance > 0.5 ? "#000000" : "#ffffff";
8273
+ }
8274
+ function createGradient(color1, color2, angle = 135) {
8275
+ return `linear-gradient(${angle}deg, ${color1} 0%, ${color2} 100%)`;
8276
+ }
8277
+ function generatePalette(primaryColor) {
8278
+ const primary = generateColorVariations(primaryColor);
8279
+ const secondaryColor = rotateHue(primaryColor, 180);
8280
+ const accentColor = rotateHue(primaryColor, 60);
8281
+ return {
8282
+ primary,
8283
+ secondary: generateColorVariations(secondaryColor),
8284
+ accent: generateColorVariations(accentColor)
8285
+ };
8286
+ }
8287
+ function rotateHue(color, degrees) {
8288
+ const hex = color.replace("#", "");
8289
+ const r = parseInt(hex.substring(0, 2), 16);
8290
+ const g = parseInt(hex.substring(2, 4), 16);
8291
+ const b = parseInt(hex.substring(4, 6), 16);
8292
+ return color;
8293
+ }
8294
+ function validateTheme(theme) {
8295
+ const errors = [];
8296
+ if (!theme.name) {
8297
+ errors.push("Theme name is required");
8298
+ }
8299
+ if (!theme.colors) {
8300
+ errors.push("Theme colors are required");
8301
+ }
8302
+ if (!theme.typography) {
8303
+ errors.push("Theme typography is required");
8304
+ }
8305
+ const colorKeys = Object.keys(theme.colors || {});
8306
+ for (const key of colorKeys) {
8307
+ const color = theme.colors[key];
8308
+ if (typeof color === "string" && !isValidColor(color)) {
8309
+ errors.push(`Invalid color format for ${key}: ${color}`);
8310
+ }
8311
+ }
8312
+ return {
8313
+ valid: errors.length === 0,
8314
+ errors
8315
+ };
8316
+ }
8317
+ function isValidColor(color) {
8318
+ if (/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(color)) {
8319
+ return true;
8320
+ }
8321
+ if (/^rgba?\(/.test(color)) {
8322
+ return true;
8323
+ }
8324
+ if (/^hsla?\(/.test(color)) {
8325
+ return true;
8326
+ }
8327
+ const cssColors = ["transparent", "currentColor", "inherit"];
8328
+ if (cssColors.includes(color)) {
8329
+ return true;
8330
+ }
8331
+ return false;
8332
+ }
8333
+ function exportTheme(theme) {
8334
+ return JSON.stringify(theme, null, 2);
8335
+ }
8336
+ function importTheme(json) {
8337
+ try {
8338
+ const theme = JSON.parse(json);
8339
+ const validation = validateTheme(theme);
8340
+ if (!validation.valid) {
8341
+ throw new Error(`Invalid theme: ${validation.errors.join(", ")}`);
8342
+ }
8343
+ return theme;
8344
+ } catch (error) {
8345
+ throw new Error(`Failed to import theme: ${error}`);
8346
+ }
8347
+ }
8348
+ function themeToCSSVariables(theme, prefix = "cms") {
8349
+ const variables = {};
8350
+ Object.entries(theme.colors).forEach(([key, value]) => {
8351
+ variables[`--${prefix}-color-${camelToKebab2(key)}`] = value;
8352
+ });
8353
+ Object.entries(theme.typography).forEach(([key, value]) => {
8354
+ variables[`--${prefix}-typography-${camelToKebab2(key)}`] = String(value);
8355
+ });
8356
+ Object.entries(theme.spacing).forEach(([key, value]) => {
8357
+ variables[`--${prefix}-spacing-${key}`] = value;
8358
+ });
8359
+ Object.entries(theme.borderRadius).forEach(([key, value]) => {
8360
+ variables[`--${prefix}-radius-${key}`] = value;
8361
+ });
8362
+ Object.entries(theme.shadows).forEach(([key, value]) => {
8363
+ variables[`--${prefix}-shadow-${key}`] = value;
8364
+ });
8365
+ Object.entries(theme.transitions).forEach(([key, value]) => {
8366
+ variables[`--${prefix}-transition-${key}`] = value;
8367
+ });
8368
+ Object.entries(theme.zIndex).forEach(([key, value]) => {
8369
+ variables[`--${prefix}-z-${key}`] = String(value);
8370
+ });
8371
+ Object.entries(theme.gradients).forEach(([key, value]) => {
8372
+ variables[`--${prefix}-gradient-${key}`] = value;
8373
+ });
8374
+ return variables;
8375
+ }
8376
+ function camelToKebab2(str) {
8377
+ return str.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
8378
+ }
8379
+ function generateThemeFromBrand(brandColor, themeName, mode = "light") {
8380
+ const palette = generatePalette(brandColor);
8381
+ return {
8382
+ name: themeName,
8383
+ mode,
8384
+ colors: {
8385
+ primary: palette.primary.base,
8386
+ primaryHover: palette.primary.dark,
8387
+ primaryLight: palette.primary.light,
8388
+ primaryDark: palette.primary.darker,
8389
+ primaryContrast: palette.primary.contrast,
8390
+ secondary: palette.secondary.base,
8391
+ secondaryHover: palette.secondary.dark,
8392
+ secondaryLight: palette.secondary.light,
8393
+ secondaryDark: palette.secondary.darker,
8394
+ secondaryContrast: palette.secondary.contrast,
8395
+ accent: palette.accent.base,
8396
+ accentHover: palette.accent.dark,
8397
+ accentLight: palette.accent.light,
8398
+ accentDark: palette.accent.darker
8399
+ // Other colors will be filled by the base theme
8400
+ }
8401
+ };
8402
+ }
8403
+
8404
+ // src/themes/ThemeCustomizer.tsx
8405
+ import { Fragment as Fragment11, jsx as jsx22, jsxs as jsxs20 } from "react/jsx-runtime";
8406
+ function ThemeCustomizer({ onClose }) {
8407
+ const { theme, setTheme } = useTheme();
8408
+ const [activeTab, setActiveTab] = useState19("colors");
8409
+ const [customTheme, setCustomTheme] = useState19(theme);
8410
+ const [searchQuery, setSearchQuery] = useState19("");
8411
+ const [showColorPicker, setShowColorPicker] = useState19(null);
8412
+ const [history, setHistory] = useState19([theme]);
8413
+ const [historyIndex, setHistoryIndex] = useState19(0);
8414
+ const updateTheme = (override) => {
8415
+ const updated = createTheme(customTheme, override);
8416
+ setCustomTheme(updated);
8417
+ const newHistory = history.slice(0, historyIndex + 1);
8418
+ newHistory.push(updated);
8419
+ setHistory(newHistory);
8420
+ setHistoryIndex(newHistory.length - 1);
8421
+ };
8422
+ const undo = () => {
8423
+ if (historyIndex > 0) {
8424
+ setHistoryIndex(historyIndex - 1);
8425
+ setCustomTheme(history[historyIndex - 1]);
8426
+ }
8427
+ };
8428
+ const redo = () => {
8429
+ if (historyIndex < history.length - 1) {
8430
+ setHistoryIndex(historyIndex + 1);
8431
+ setCustomTheme(history[historyIndex + 1]);
8432
+ }
8433
+ };
8434
+ const applyTheme = () => {
8435
+ setTheme(customTheme);
8436
+ onClose?.();
8437
+ };
8438
+ const resetTheme = () => {
8439
+ setCustomTheme(theme);
8440
+ setHistory([theme]);
8441
+ setHistoryIndex(0);
8442
+ };
8443
+ return /* @__PURE__ */ jsx22("div", { className: "cms-theme-customizer-advanced", children: /* @__PURE__ */ jsx22(
8444
+ ThemeCustomizerContent,
8445
+ {
8446
+ activeTab,
8447
+ setActiveTab,
8448
+ customTheme,
8449
+ updateTheme,
8450
+ searchQuery,
8451
+ setSearchQuery,
8452
+ showColorPicker,
8453
+ setShowColorPicker,
8454
+ onClose,
8455
+ applyTheme,
8456
+ resetTheme,
8457
+ undo,
8458
+ redo,
8459
+ canUndo: historyIndex > 0,
8460
+ canRedo: historyIndex < history.length - 1
8461
+ }
8462
+ ) });
8463
+ }
8464
+ function ThemeCustomizerContent(props) {
8465
+ const {
8466
+ activeTab,
8467
+ setActiveTab,
8468
+ customTheme,
8469
+ updateTheme,
8470
+ searchQuery,
8471
+ setSearchQuery,
8472
+ showColorPicker,
8473
+ setShowColorPicker,
8474
+ onClose,
8475
+ applyTheme,
8476
+ resetTheme,
8477
+ undo,
8478
+ redo,
8479
+ canUndo,
8480
+ canRedo
8481
+ } = props;
8482
+ const handleExport = () => {
8483
+ const json = exportTheme(customTheme);
8484
+ const blob = new Blob([json], { type: "application/json" });
8485
+ const url = URL.createObjectURL(blob);
8486
+ const a = document.createElement("a");
8487
+ a.href = url;
8488
+ a.download = `${customTheme.name}-theme.json`;
8489
+ a.click();
8490
+ URL.revokeObjectURL(url);
8491
+ };
8492
+ const handleImport = (event) => {
8493
+ const file = event.target.files?.[0];
8494
+ if (!file) return;
8495
+ const reader = new FileReader();
8496
+ reader.onload = (e) => {
8497
+ try {
8498
+ const json = e.target?.result;
8499
+ const imported = importTheme(json);
8500
+ updateTheme(imported);
8501
+ } catch (error) {
8502
+ alert(`Failed to import theme: ${error}`);
8503
+ }
8504
+ };
8505
+ reader.readAsText(file);
8506
+ };
8507
+ const generateFromBrand = (brandColor) => {
8508
+ const palette = generatePalette(brandColor);
8509
+ updateTheme({
8510
+ colors: {
8511
+ primary: palette.primary.base,
8512
+ primaryHover: palette.primary.dark,
8513
+ primaryLight: palette.primary.light,
8514
+ primaryDark: palette.primary.darker,
8515
+ secondary: palette.secondary.base,
8516
+ secondaryHover: palette.secondary.dark,
8517
+ accent: palette.accent.base
8518
+ }
8519
+ });
8520
+ };
8521
+ return /* @__PURE__ */ jsxs20(Fragment11, { children: [
8522
+ /* @__PURE__ */ jsx22("div", { className: "cms-theme-customizer-overlay", onClick: onClose }),
8523
+ /* @__PURE__ */ jsxs20("div", { className: "cms-theme-customizer-panel-advanced", children: [
8524
+ /* @__PURE__ */ jsxs20("div", { className: "cms-theme-customizer-header-advanced", children: [
8525
+ /* @__PURE__ */ jsxs20("div", { className: "cms-header-left", children: [
8526
+ /* @__PURE__ */ jsx22("h2", { children: "\u{1F3A8} Theme Studio" }),
8527
+ /* @__PURE__ */ jsx22("span", { className: "cms-theme-name-badge", children: customTheme.name })
8528
+ ] }),
8529
+ /* @__PURE__ */ jsxs20("div", { className: "cms-header-actions", children: [
8530
+ /* @__PURE__ */ jsx22(
8531
+ "button",
8532
+ {
8533
+ onClick: undo,
8534
+ disabled: !canUndo,
8535
+ className: "cms-icon-btn",
8536
+ title: "Undo (Cmd+Z)",
8537
+ children: "\u21B6"
8538
+ }
8539
+ ),
8540
+ /* @__PURE__ */ jsx22(
8541
+ "button",
8542
+ {
8543
+ onClick: redo,
8544
+ disabled: !canRedo,
8545
+ className: "cms-icon-btn",
8546
+ title: "Redo (Cmd+Shift+Z)",
8547
+ children: "\u21B7"
8548
+ }
8549
+ ),
8550
+ /* @__PURE__ */ jsx22("button", { onClick: handleExport, className: "cms-icon-btn", title: "Export", children: "\u2B07" }),
8551
+ /* @__PURE__ */ jsxs20("label", { className: "cms-icon-btn", title: "Import", children: [
8552
+ "\u2B06",
8553
+ /* @__PURE__ */ jsx22(
8554
+ "input",
8555
+ {
8556
+ type: "file",
8557
+ accept: ".json",
8558
+ onChange: handleImport,
8559
+ style: { display: "none" }
8560
+ }
8561
+ )
8562
+ ] }),
8563
+ /* @__PURE__ */ jsx22("button", { onClick: onClose, className: "cms-close-btn-advanced", children: "\xD7" })
8564
+ ] })
8565
+ ] }),
8566
+ /* @__PURE__ */ jsx22("div", { className: "cms-search-bar", children: /* @__PURE__ */ jsx22(
8567
+ "input",
8568
+ {
8569
+ type: "text",
8570
+ placeholder: "Search properties...",
8571
+ value: searchQuery,
8572
+ onChange: (e) => setSearchQuery(e.target.value),
8573
+ className: "cms-search-input"
8574
+ }
8575
+ ) }),
8576
+ /* @__PURE__ */ jsxs20("div", { className: "cms-theme-tabs-advanced", children: [
8577
+ /* @__PURE__ */ jsx22(TabButton, { active: activeTab === "colors", onClick: () => setActiveTab("colors"), icon: "\u{1F3A8}", children: "Colors" }),
8578
+ /* @__PURE__ */ jsx22(TabButton, { active: activeTab === "typography", onClick: () => setActiveTab("typography"), icon: "Aa", children: "Typography" }),
8579
+ /* @__PURE__ */ jsx22(TabButton, { active: activeTab === "spacing", onClick: () => setActiveTab("spacing"), icon: "\u{1F4CF}", children: "Spacing" }),
8580
+ /* @__PURE__ */ jsx22(TabButton, { active: activeTab === "effects", onClick: () => setActiveTab("effects"), icon: "\u2728", children: "Effects" }),
8581
+ /* @__PURE__ */ jsx22(TabButton, { active: activeTab === "advanced", onClick: () => setActiveTab("advanced"), icon: "\u2699\uFE0F", children: "Advanced" }),
8582
+ /* @__PURE__ */ jsx22(TabButton, { active: activeTab === "preview", onClick: () => setActiveTab("preview"), icon: "\u{1F441}\uFE0F", children: "Preview" })
8583
+ ] }),
8584
+ /* @__PURE__ */ jsxs20("div", { className: "cms-theme-content-advanced", children: [
8585
+ activeTab === "colors" && /* @__PURE__ */ jsx22(
8586
+ ColorsTab,
8587
+ {
8588
+ theme: customTheme,
8589
+ updateTheme,
8590
+ searchQuery,
8591
+ showColorPicker,
8592
+ setShowColorPicker,
8593
+ generateFromBrand
8594
+ }
8595
+ ),
8596
+ activeTab === "typography" && /* @__PURE__ */ jsx22(TypographyTab, { theme: customTheme, updateTheme, searchQuery }),
8597
+ activeTab === "spacing" && /* @__PURE__ */ jsx22(SpacingTab, { theme: customTheme, updateTheme, searchQuery }),
8598
+ activeTab === "effects" && /* @__PURE__ */ jsx22(EffectsTab, { theme: customTheme, updateTheme, searchQuery }),
8599
+ activeTab === "advanced" && /* @__PURE__ */ jsx22(AdvancedTab2, { theme: customTheme, updateTheme }),
8600
+ activeTab === "preview" && /* @__PURE__ */ jsx22(PreviewTab, { theme: customTheme })
8601
+ ] }),
8602
+ /* @__PURE__ */ jsxs20("div", { className: "cms-theme-footer-advanced", children: [
8603
+ /* @__PURE__ */ jsx22("button", { onClick: resetTheme, className: "cms-btn-secondary", children: "Reset All" }),
8604
+ /* @__PURE__ */ jsxs20("div", { className: "cms-footer-actions", children: [
8605
+ /* @__PURE__ */ jsx22("button", { onClick: onClose, className: "cms-btn-secondary", children: "Cancel" }),
8606
+ /* @__PURE__ */ jsx22("button", { onClick: applyTheme, className: "cms-btn-primary", children: "Apply Theme" })
8607
+ ] })
8608
+ ] })
8609
+ ] })
8610
+ ] });
8611
+ }
8612
+ function TabButton({ active, onClick, icon, children }) {
8613
+ return /* @__PURE__ */ jsxs20(
8614
+ "button",
8615
+ {
8616
+ className: `cms-tab-btn-advanced ${active ? "active" : ""}`,
8617
+ onClick,
8618
+ children: [
8619
+ /* @__PURE__ */ jsx22("span", { className: "cms-tab-icon", children: icon }),
8620
+ /* @__PURE__ */ jsx22("span", { className: "cms-tab-label", children })
8621
+ ]
8622
+ }
8623
+ );
8624
+ }
8625
+ function ColorsTab({
8626
+ theme,
8627
+ updateTheme,
8628
+ searchQuery,
8629
+ showColorPicker,
8630
+ setShowColorPicker,
8631
+ generateFromBrand
8632
+ }) {
8633
+ const [brandColor, setBrandColor] = useState19("#667eea");
8634
+ const colorGroups = [
8635
+ { title: "Primary", keys: ["primary", "primaryHover", "primaryLight", "primaryDark", "primaryContrast"] },
8636
+ { title: "Secondary", keys: ["secondary", "secondaryHover", "secondaryLight", "secondaryDark", "secondaryContrast"] },
8637
+ { title: "Accent", keys: ["accent", "accentHover", "accentLight", "accentDark"] },
8638
+ { title: "Background", keys: ["background", "backgroundAlt", "surface", "surfaceHover", "surfaceActive"] },
8639
+ { title: "Border", keys: ["border", "borderHover", "divider", "overlay"] },
8640
+ { title: "Text", keys: ["textPrimary", "textSecondary", "textTertiary", "textDisabled", "textInverse"] },
8641
+ { title: "Status", keys: ["success", "successLight", "successDark", "warning", "warningLight", "warningDark", "error", "errorLight", "errorDark", "info", "infoLight", "infoDark"] },
8642
+ { title: "Editor", keys: ["editorBackground", "editorText", "editorPlaceholder", "editorCursor", "toolbarBackground", "toolbarText", "toolbarBorder", "toolbarIconHover"] },
8643
+ { title: "Selection", keys: ["selection", "selectionText", "highlight", "highlightText", "focus", "focusRing"] },
8644
+ { title: "Code", keys: ["codeBackground", "codeText", "codeComment", "codeKeyword", "codeString", "codeNumber", "codeFunction", "codeOperator"] }
8645
+ ];
8646
+ const filteredGroups = colorGroups.map((group) => ({
8647
+ ...group,
8648
+ keys: group.keys.filter(
8649
+ (key) => key.toLowerCase().includes(searchQuery.toLowerCase()) || group.title.toLowerCase().includes(searchQuery.toLowerCase())
8650
+ )
8651
+ })).filter((group) => group.keys.length > 0);
8652
+ return /* @__PURE__ */ jsxs20("div", { className: "cms-colors-tab", children: [
8653
+ /* @__PURE__ */ jsxs20("div", { className: "cms-brand-generator", children: [
8654
+ /* @__PURE__ */ jsx22("h3", { children: "\u{1F3A8} Generate from Brand Color" }),
8655
+ /* @__PURE__ */ jsxs20("div", { className: "cms-brand-input-group", children: [
8656
+ /* @__PURE__ */ jsx22(
8657
+ "input",
8658
+ {
8659
+ type: "color",
8660
+ value: brandColor,
8661
+ onChange: (e) => setBrandColor(e.target.value),
8662
+ className: "cms-brand-color-picker"
8663
+ }
8664
+ ),
8665
+ /* @__PURE__ */ jsx22(
8666
+ "input",
8667
+ {
8668
+ type: "text",
8669
+ value: brandColor,
8670
+ onChange: (e) => setBrandColor(e.target.value),
8671
+ className: "cms-brand-color-input",
8672
+ placeholder: "#667eea"
8673
+ }
8674
+ ),
8675
+ /* @__PURE__ */ jsx22(
8676
+ "button",
8677
+ {
8678
+ onClick: () => generateFromBrand(brandColor),
8679
+ className: "cms-btn-primary",
8680
+ children: "Generate Palette"
8681
+ }
8682
+ )
8683
+ ] })
8684
+ ] }),
8685
+ filteredGroups.map((group) => /* @__PURE__ */ jsxs20("div", { className: "cms-color-group", children: [
8686
+ /* @__PURE__ */ jsx22("h3", { children: group.title }),
8687
+ /* @__PURE__ */ jsx22("div", { className: "cms-color-grid-advanced", children: group.keys.map((key) => /* @__PURE__ */ jsx22(
8688
+ AdvancedColorInput,
8689
+ {
8690
+ label: formatLabel(key),
8691
+ value: theme.colors[key],
8692
+ onChange: (value) => updateTheme({ colors: { [key]: value } }),
8693
+ showPicker: showColorPicker === key,
8694
+ onTogglePicker: () => setShowColorPicker(showColorPicker === key ? null : key)
8695
+ },
8696
+ key
8697
+ )) })
8698
+ ] }, group.title))
8699
+ ] });
8700
+ }
8701
+ function TypographyTab({ theme, updateTheme, searchQuery }) {
8702
+ const typographyGroups = [
8703
+ { title: "Font Families", keys: ["fontFamily", "fontFamilyHeading", "fontFamilyMono"] },
8704
+ { title: "Font Sizes", keys: ["fontSizeXxs", "fontSizeXs", "fontSizeSm", "fontSizeMd", "fontSizeLg", "fontSizeXl", "fontSizeXxl", "fontSize3xl", "fontSize4xl"] },
8705
+ { title: "Font Weights", keys: ["fontWeightLight", "fontWeightNormal", "fontWeightMedium", "fontWeightSemibold", "fontWeightBold", "fontWeightExtrabold"] },
8706
+ { title: "Line Heights", keys: ["lineHeightTight", "lineHeightSnug", "lineHeightNormal", "lineHeightRelaxed", "lineHeightLoose"] },
8707
+ { title: "Letter Spacing", keys: ["letterSpacingTight", "letterSpacingNormal", "letterSpacingWide", "letterSpacingWider"] }
8708
+ ];
8709
+ const filteredGroups = searchQuery ? typographyGroups.map((group) => ({
8710
+ ...group,
8711
+ keys: group.keys.filter(
8712
+ (key) => key.toLowerCase().includes(searchQuery.toLowerCase()) || group.title.toLowerCase().includes(searchQuery.toLowerCase())
8713
+ )
8714
+ })).filter((group) => group.keys.length > 0) : typographyGroups;
8715
+ return /* @__PURE__ */ jsx22("div", { className: "cms-typography-tab", children: filteredGroups.map((group) => /* @__PURE__ */ jsxs20("div", { className: "cms-property-group", children: [
8716
+ /* @__PURE__ */ jsx22("h3", { children: group.title }),
8717
+ /* @__PURE__ */ jsx22("div", { className: "cms-property-grid", children: group.keys.map((key) => /* @__PURE__ */ jsx22(
8718
+ PropertyInput,
8719
+ {
8720
+ label: formatLabel(key),
8721
+ value: theme.typography[key],
8722
+ onChange: (value) => updateTheme({ typography: { [key]: value } }),
8723
+ type: group.title === "Font Weights" ? "number" : "text"
8724
+ },
8725
+ key
8726
+ )) })
8727
+ ] }, group.title)) });
8728
+ }
8729
+ function SpacingTab({ theme, updateTheme, searchQuery }) {
8730
+ return /* @__PURE__ */ jsxs20("div", { className: "cms-spacing-tab", children: [
8731
+ /* @__PURE__ */ jsxs20("div", { className: "cms-property-group", children: [
8732
+ /* @__PURE__ */ jsx22("h3", { children: "Spacing Scale" }),
8733
+ /* @__PURE__ */ jsx22("div", { className: "cms-spacing-visual", children: Object.entries(theme.spacing).map(([key, value]) => /* @__PURE__ */ jsxs20("div", { className: "cms-spacing-item", children: [
8734
+ /* @__PURE__ */ jsx22("div", { className: "cms-spacing-label", children: key.toUpperCase() }),
8735
+ /* @__PURE__ */ jsx22("div", { className: "cms-spacing-bar", style: { width: value }, children: /* @__PURE__ */ jsx22("span", { children: value }) }),
8736
+ /* @__PURE__ */ jsx22(
8737
+ "input",
8738
+ {
8739
+ type: "text",
8740
+ value,
8741
+ onChange: (e) => updateTheme({ spacing: { [key]: e.target.value } }),
8742
+ className: "cms-spacing-input"
8743
+ }
8744
+ )
8745
+ ] }, key)) })
8746
+ ] }),
8747
+ /* @__PURE__ */ jsxs20("div", { className: "cms-property-group", children: [
8748
+ /* @__PURE__ */ jsx22("h3", { children: "Border Radius" }),
8749
+ /* @__PURE__ */ jsx22("div", { className: "cms-radius-grid", children: Object.entries(theme.borderRadius).map(([key, value]) => /* @__PURE__ */ jsxs20("div", { className: "cms-radius-item", children: [
8750
+ /* @__PURE__ */ jsx22("div", { className: "cms-radius-preview", style: { borderRadius: value } }),
8751
+ /* @__PURE__ */ jsx22(
8752
+ PropertyInput,
8753
+ {
8754
+ label: key.toUpperCase(),
8755
+ value,
8756
+ onChange: (newValue) => updateTheme({ borderRadius: { [key]: newValue } })
8757
+ }
8758
+ )
8759
+ ] }, key)) })
8760
+ ] })
8761
+ ] });
8762
+ }
8763
+ function EffectsTab({ theme, updateTheme, searchQuery }) {
8764
+ return /* @__PURE__ */ jsxs20("div", { className: "cms-effects-tab", children: [
8765
+ /* @__PURE__ */ jsxs20("div", { className: "cms-property-group", children: [
8766
+ /* @__PURE__ */ jsx22("h3", { children: "Shadows" }),
8767
+ /* @__PURE__ */ jsx22("div", { className: "cms-shadow-grid", children: Object.entries(theme.shadows).map(([key, value]) => /* @__PURE__ */ jsxs20("div", { className: "cms-shadow-item", children: [
8768
+ /* @__PURE__ */ jsx22("div", { className: "cms-shadow-preview", style: { boxShadow: value } }),
8769
+ /* @__PURE__ */ jsx22(
8770
+ PropertyInput,
8771
+ {
8772
+ label: key.toUpperCase(),
8773
+ value,
8774
+ onChange: (newValue) => updateTheme({ shadows: { [key]: newValue } })
8775
+ }
8776
+ )
8777
+ ] }, key)) })
8778
+ ] }),
8779
+ /* @__PURE__ */ jsxs20("div", { className: "cms-property-group", children: [
8780
+ /* @__PURE__ */ jsx22("h3", { children: "Transitions" }),
8781
+ /* @__PURE__ */ jsx22("div", { className: "cms-property-grid", children: Object.entries(theme.transitions).map(([key, value]) => /* @__PURE__ */ jsx22(
8782
+ PropertyInput,
8783
+ {
8784
+ label: formatLabel(key),
8785
+ value,
8786
+ onChange: (newValue) => updateTheme({ transitions: { [key]: newValue } })
8787
+ },
8788
+ key
8789
+ )) })
8790
+ ] }),
8791
+ /* @__PURE__ */ jsxs20("div", { className: "cms-property-group", children: [
8792
+ /* @__PURE__ */ jsx22("h3", { children: "Gradients" }),
8793
+ /* @__PURE__ */ jsx22("div", { className: "cms-gradient-grid", children: Object.entries(theme.gradients).map(([key, value]) => /* @__PURE__ */ jsxs20("div", { className: "cms-gradient-item", children: [
8794
+ /* @__PURE__ */ jsx22("div", { className: "cms-gradient-preview", style: { background: value } }),
8795
+ /* @__PURE__ */ jsx22(
8796
+ PropertyInput,
8797
+ {
8798
+ label: formatLabel(key),
8799
+ value,
8800
+ onChange: (newValue) => updateTheme({ gradients: { [key]: newValue } })
8801
+ }
8802
+ )
8803
+ ] }, key)) })
8804
+ ] })
8805
+ ] });
8806
+ }
8807
+ function AdvancedTab2({ theme, updateTheme }) {
8808
+ const validation = validateTheme(theme);
8809
+ return /* @__PURE__ */ jsxs20("div", { className: "cms-advanced-tab", children: [
8810
+ /* @__PURE__ */ jsxs20("div", { className: "cms-property-group", children: [
8811
+ /* @__PURE__ */ jsx22("h3", { children: "Theme Information" }),
8812
+ /* @__PURE__ */ jsx22(
8813
+ PropertyInput,
8814
+ {
8815
+ label: "Theme Name",
8816
+ value: theme.name,
8817
+ onChange: (value) => updateTheme({ name: value })
8818
+ }
8819
+ ),
8820
+ /* @__PURE__ */ jsxs20("div", { className: "cms-theme-mode", children: [
8821
+ /* @__PURE__ */ jsx22("label", { children: "Mode" }),
8822
+ /* @__PURE__ */ jsxs20(
8823
+ "select",
8824
+ {
8825
+ value: theme.mode,
8826
+ onChange: (e) => updateTheme({ mode: e.target.value }),
8827
+ className: "cms-select",
8828
+ children: [
8829
+ /* @__PURE__ */ jsx22("option", { value: "light", children: "Light" }),
8830
+ /* @__PURE__ */ jsx22("option", { value: "dark", children: "Dark" })
8831
+ ]
8832
+ }
8833
+ )
8834
+ ] })
8835
+ ] }),
8836
+ /* @__PURE__ */ jsxs20("div", { className: "cms-property-group", children: [
8837
+ /* @__PURE__ */ jsx22("h3", { children: "Validation" }),
8838
+ /* @__PURE__ */ jsx22("div", { className: `cms-validation ${validation.valid ? "valid" : "invalid"}`, children: validation.valid ? /* @__PURE__ */ jsx22("div", { className: "cms-validation-success", children: "\u2713 Theme is valid" }) : /* @__PURE__ */ jsxs20("div", { className: "cms-validation-errors", children: [
8839
+ /* @__PURE__ */ jsx22("strong", { children: "Errors:" }),
8840
+ /* @__PURE__ */ jsx22("ul", { children: validation.errors.map((error, i) => /* @__PURE__ */ jsx22("li", { children: error }, i)) })
8841
+ ] }) })
8842
+ ] }),
8843
+ /* @__PURE__ */ jsxs20("div", { className: "cms-property-group", children: [
8844
+ /* @__PURE__ */ jsx22("h3", { children: "Breakpoints" }),
8845
+ /* @__PURE__ */ jsx22("div", { className: "cms-property-grid", children: Object.entries(theme.breakpoints).map(([key, value]) => /* @__PURE__ */ jsx22(
8846
+ PropertyInput,
8847
+ {
8848
+ label: key.toUpperCase(),
8849
+ value,
8850
+ onChange: (newValue) => updateTheme({ breakpoints: { [key]: newValue } })
8851
+ },
8852
+ key
8853
+ )) })
8854
+ ] }),
8855
+ /* @__PURE__ */ jsxs20("div", { className: "cms-property-group", children: [
8856
+ /* @__PURE__ */ jsx22("h3", { children: "Z-Index Layers" }),
8857
+ /* @__PURE__ */ jsx22("div", { className: "cms-property-grid", children: Object.entries(theme.zIndex).map(([key, value]) => /* @__PURE__ */ jsx22(
8858
+ PropertyInput,
8859
+ {
8860
+ label: formatLabel(key),
8861
+ value: String(value),
8862
+ onChange: (newValue) => updateTheme({ zIndex: { [key]: Number(newValue) } }),
8863
+ type: "number"
8864
+ },
8865
+ key
8866
+ )) })
8867
+ ] })
8868
+ ] });
8869
+ }
8870
+ function PreviewTab({ theme }) {
8871
+ return /* @__PURE__ */ jsx22("div", { className: "cms-preview-tab", style: {
8872
+ background: theme.colors.background,
8873
+ color: theme.colors.textPrimary,
8874
+ fontFamily: theme.typography.fontFamily
8875
+ }, children: /* @__PURE__ */ jsxs20("div", { className: "cms-preview-section", children: [
8876
+ /* @__PURE__ */ jsx22("h2", { style: { color: theme.colors.textPrimary }, children: "Theme Preview" }),
8877
+ /* @__PURE__ */ jsxs20("div", { className: "cms-preview-colors", children: [
8878
+ /* @__PURE__ */ jsx22("div", { className: "cms-preview-color-box", style: { background: theme.colors.primary, color: theme.colors.primaryContrast }, children: "Primary" }),
8879
+ /* @__PURE__ */ jsx22("div", { className: "cms-preview-color-box", style: { background: theme.colors.secondary, color: theme.colors.secondaryContrast }, children: "Secondary" }),
8880
+ /* @__PURE__ */ jsx22("div", { className: "cms-preview-color-box", style: { background: theme.colors.accent }, children: "Accent" })
8881
+ ] }),
8882
+ /* @__PURE__ */ jsxs20("div", { className: "cms-preview-card", style: {
8883
+ background: theme.colors.surface,
8884
+ borderRadius: theme.borderRadius.lg,
8885
+ boxShadow: theme.shadows.md,
8886
+ padding: theme.spacing.lg
8887
+ }, children: [
8888
+ /* @__PURE__ */ jsx22("h3", { style: { color: theme.colors.textPrimary }, children: "Card Component" }),
8889
+ /* @__PURE__ */ jsx22("p", { style: { color: theme.colors.textSecondary }, children: "This is how your theme looks in a card component with surface background and shadow." }),
8890
+ /* @__PURE__ */ jsx22("button", { style: {
8891
+ background: theme.colors.primary,
8892
+ color: theme.colors.primaryContrast,
8893
+ padding: `${theme.spacing.sm} ${theme.spacing.lg}`,
8894
+ borderRadius: theme.borderRadius.md,
8895
+ border: "none",
8896
+ cursor: "pointer"
8897
+ }, children: "Primary Button" })
8898
+ ] }),
8899
+ /* @__PURE__ */ jsxs20("div", { className: "cms-preview-typography", children: [
8900
+ /* @__PURE__ */ jsx22("h1", { style: { fontSize: theme.typography.fontSize4xl }, children: "Heading 1" }),
8901
+ /* @__PURE__ */ jsx22("h2", { style: { fontSize: theme.typography.fontSize3xl }, children: "Heading 2" }),
8902
+ /* @__PURE__ */ jsx22("h3", { style: { fontSize: theme.typography.fontSizeXxl }, children: "Heading 3" }),
8903
+ /* @__PURE__ */ jsx22("p", { style: { fontSize: theme.typography.fontSizeMd, lineHeight: theme.typography.lineHeightNormal }, children: "Body text with normal line height and medium font size." })
8904
+ ] })
8905
+ ] }) });
8906
+ }
8907
+ function AdvancedColorInput({
8908
+ label,
8909
+ value,
8910
+ onChange,
8911
+ showPicker,
8912
+ onTogglePicker
8913
+ }) {
8914
+ return /* @__PURE__ */ jsxs20("div", { className: "cms-advanced-color-input", children: [
8915
+ /* @__PURE__ */ jsx22("label", { children: label }),
8916
+ /* @__PURE__ */ jsxs20("div", { className: "cms-color-input-wrapper-advanced", children: [
8917
+ /* @__PURE__ */ jsx22(
8918
+ "div",
8919
+ {
8920
+ className: "cms-color-swatch",
8921
+ style: { background: value },
8922
+ onClick: onTogglePicker
8923
+ }
8924
+ ),
8925
+ /* @__PURE__ */ jsx22(
8926
+ "input",
8927
+ {
8928
+ type: "text",
8929
+ value,
8930
+ onChange: (e) => onChange(e.target.value),
8931
+ className: "cms-color-text-input",
8932
+ placeholder: "#000000"
8933
+ }
8934
+ ),
8935
+ showPicker && /* @__PURE__ */ jsxs20("div", { className: "cms-color-picker-popover", children: [
8936
+ /* @__PURE__ */ jsx22(
8937
+ "input",
8938
+ {
8939
+ type: "color",
8940
+ value,
8941
+ onChange: (e) => onChange(e.target.value),
8942
+ className: "cms-color-picker-native"
8943
+ }
8944
+ ),
8945
+ /* @__PURE__ */ jsx22("div", { className: "cms-color-presets", children: ["#667eea", "#764ba2", "#f59e0b", "#10b981", "#ef4444", "#3b82f6", "#8b5cf6", "#ec4899"].map((preset) => /* @__PURE__ */ jsx22(
8946
+ "div",
8947
+ {
8948
+ className: "cms-color-preset",
8949
+ style: { background: preset },
8950
+ onClick: () => onChange(preset)
8951
+ },
8952
+ preset
8953
+ )) })
8954
+ ] })
8955
+ ] })
8956
+ ] });
8957
+ }
8958
+ function PropertyInput({
8959
+ label,
8960
+ value,
8961
+ onChange,
8962
+ type = "text"
8963
+ }) {
8964
+ return /* @__PURE__ */ jsxs20("div", { className: "cms-property-input", children: [
8965
+ /* @__PURE__ */ jsx22("label", { children: label }),
8966
+ /* @__PURE__ */ jsx22(
8967
+ "input",
8968
+ {
8969
+ type,
8970
+ value,
8971
+ onChange: (e) => onChange(e.target.value),
8972
+ className: "cms-property-input-field"
8973
+ }
8974
+ )
8975
+ ] });
8976
+ }
8977
+ function formatLabel(key) {
8978
+ return key.replace(/([A-Z])/g, " $1").replace(/^./, (str) => str.toUpperCase()).trim();
8979
+ }
7120
8980
  export {
7121
8981
  CMSBlockEditor,
7122
8982
  CMSRenderer,
7123
8983
  ImageNode,
7124
8984
  OPEN_IMAGE_EDITOR_COMMAND,
8985
+ SEOPlugin,
8986
+ ThemeCustomizer,
7125
8987
  ThemeProvider,
7126
8988
  ThemeSwitcher,
7127
8989
  VideoNode,
8990
+ analyzeSEO,
7128
8991
  appendHTML,
7129
8992
  copyMarkdownToClipboard,
8993
+ copyMetadataToClipboard,
8994
+ createDefaultMetadata,
8995
+ createGradient,
8996
+ createTheme,
7130
8997
  darkTheme,
7131
8998
  downloadHTML,
7132
8999
  downloadMarkdown,
9000
+ downloadMetadata,
7133
9001
  draculaTheme,
9002
+ exportTheme,
7134
9003
  exportToHTML,
7135
9004
  exportToHTMLWithWrapper,
7136
9005
  exportToMarkdown,
9006
+ extractKeywords,
7137
9007
  forestTheme,
9008
+ generateColorVariations,
9009
+ generateMetaTags,
9010
+ generatePalette,
9011
+ generateSlug,
9012
+ generateStructuredData,
9013
+ generateThemeFromBrand,
7138
9014
  importFromHTML,
7139
9015
  importFromMarkdown,
9016
+ importTheme,
7140
9017
  lightTheme,
7141
9018
  loadHTMLFromFile,
7142
9019
  loadMarkdownFromFile,
9020
+ mergeMetadata,
7143
9021
  midnightTheme,
7144
9022
  minimalTheme,
7145
9023
  monokaiTheme,
@@ -7148,6 +9026,9 @@ export {
7148
9026
  presetThemes,
7149
9027
  roseTheme,
7150
9028
  sunsetTheme,
7151
- useTheme
9029
+ themeToCSSVariables,
9030
+ useTheme,
9031
+ validateMetadata,
9032
+ validateTheme
7152
9033
  };
7153
9034
  //# sourceMappingURL=index.mjs.map