Plugin Directory

Changeset 3396076

Timestamp:
11/15/2025 05:06:01 AM (4 months ago)
Author:
justinnealey
Message:

Update to version 1.1.0 from GitHub

Location:
designsetgo
Files:
54 added
16 edited
1 copied

Legend:

Unmodified
Added
Removed
  • designsetgo/tags/1.1.0/build/admin-rtl.css

    r3395924 r3396076  
    1 .designsetgo-admin-wrapper{margin:20px 0;max-width:1200px}.designsetgo-admin-loading{align-items:center;display:flex;justify-content:center;min-height:400px}.designsetgo-dashboard__header{margin-bottom:32px}.designsetgo-dashboard__branding{align-items:center;display:flex;flex-direction:column;gap:16px;text-align:center}.designsetgo-dashboard__branding h1{margin:0}.designsetgo-dashboard__branding .description{font-size:14px;margin:0}.designsetgo-dashboard__info,.designsetgo-dashboard__quick-links,.designsetgo-dashboard__stats{margin-bottom:24px}.designsetgo-logo{height:auto;-o-object-fit:contain;object-fit:contain;width:250px}.designsetgo-stats-grid{display:grid;gap:24px;grid-template-columns:repeat(auto-fit,minmax(200px,1fr))}.designsetgo-stat{background:#f6f7f7;border-radius:4px;padding:16px;text-align:center}.designsetgo-stat__value{color:#1e1e1e;font-size:32px;font-weight:700;margin-bottom:8px}.designsetgo-stat__label{color:#757575;font-size:14px}.designsetgo-quick-links-grid{display:grid;gap:16px;grid-template-columns:repeat(auto-fill,minmax(250px,1fr))}.designsetgo-quick-link{background:#f6f7f7;border-radius:4px;display:block;padding:20px;text-decoration:none;transition:all .2s ease}.designsetgo-quick-link:hover{background:#e9ecef;box-shadow:0 2px 8px rgba(0,0,0,.1);transform:translateY(-2px)}.designsetgo-quick-link .dashicons{color:#2271b1;font-size:32px;height:32px;margin-bottom:12px;width:32px}.designsetgo-quick-link h3{color:#1e1e1e;font-size:16px;margin:0 0 8px}.designsetgo-quick-link p{color:#757575;font-size:14px;margin:0}.designsetgo-blocks-extensions__header{margin-bottom:24px}.designsetgo-blocks-extensions__header h1{margin:0 0 8px}.designsetgo-blocks-extensions__header .description{font-size:14px;margin:0}.designsetgo-tabs .components-tab-panel__tabs{border-bottom:1px solid #dcdcde;margin-bottom:24px}.designsetgo-tabs button.is-active{box-shadow:inset 0 0 0 1.5px #2271b1,inset 0 -4px 0 0 #2271b1}.designsetgo-search-wrapper{margin-bottom:24px}.designsetgo-search-wrapper .components-search-control{max-width:400px}.designsetgo-category-card{margin-bottom:24px}.designsetgo-category-card .components-card__header{padding:16px 24px}.designsetgo-category-header{align-items:center;display:flex;justify-content:space-between;width:100%}.designsetgo-category-header h2{font-size:18px;margin:0}.designsetgo-category-actions{display:flex;gap:8px}.designsetgo-blocks-grid,.designsetgo-extensions-grid{display:grid;gap:16px;grid-template-columns:repeat(auto-fill,minmax(300px,1fr))}.designsetgo-block-item,.designsetgo-extension-item{background:#f6f7f7;border-radius:4px;padding:12px}.designsetgo-block-item .components-base-control,.designsetgo-extension-item .components-base-control{margin-bottom:0}.designsetgo-block-item .components-checkbox-control__help,.designsetgo-extension-item .components-checkbox-control__help{font-size:13px;margin-top:4px}.designsetgo-block-label{align-items:center;display:flex;gap:8px}.designsetgo-badge{border-radius:3px;display:inline-block;font-size:11px;font-weight:600;padding:2px 8px;text-transform:uppercase}.designsetgo-badge--high{background:#f0b429;color:#1e1e1e}.designsetgo-settings__header{margin-bottom:24px}.designsetgo-settings__header h1{margin:0 0 8px}.designsetgo-settings__header .description{font-size:14px;margin:0}.designsetgo-settings .components-card{margin-bottom:24px}.designsetgo-settings .components-card:last-of-type{margin-bottom:0}.designsetgo-settings .components-card__header{padding:16px 24px}.designsetgo-settings .components-card__header h2{font-size:18px;margin:0}.designsetgo-settings .components-card__body .components-base-control,.designsetgo-settings .components-card__body .components-range-control,.designsetgo-settings .components-card__body .components-select-control,.designsetgo-settings .components-card__body .components-toggle-control{margin-bottom:24px}.designsetgo-settings .components-card__body .components-base-control:last-child,.designsetgo-settings .components-card__body .components-range-control:last-child,.designsetgo-settings .components-card__body .components-select-control:last-child,.designsetgo-settings .components-card__body .components-toggle-control:last-child{margin-bottom:0}.designsetgo-save-bar{background:#fff;border-top:1px solid #dcdcde;bottom:0;box-shadow:0 -2px 8px rgba(0,0,0,.1);margin:24px -20px -10px;padding:16px 24px;position:sticky;z-index:10}.designsetgo-save-bar .components-button{min-width:120px}.components-notice{margin:0 0 24px}@media(max-width:782px){.designsetgo-blocks-grid,.designsetgo-extensions-grid,.designsetgo-quick-links-grid{grid-template-columns:1fr}.designsetgo-category-header{align-items:flex-start;flex-direction:column;gap:12px}.designsetgo-save-bar{margin-right:0;margin-left:0}}
     1.designsetgo-admin-wrapper{margin:20px 0;max-width:1200px}.designsetgo-admin-loading{align-items:center;display:flex;justify-content:center;min-height:400px}.designsetgo-dashboard__header{margin-bottom:32px}.designsetgo-dashboard__branding{align-items:center;display:flex;flex-direction:column;gap:16px;text-align:center}.designsetgo-dashboard__branding h1{margin:0}.designsetgo-dashboard__branding .description{font-size:14px;margin:0}.designsetgo-dashboard__stats{display:grid;gap:20px;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));margin-bottom:32px}.designsetgo-dashboard__info,.designsetgo-dashboard__overview,.designsetgo-dashboard__quick-links{margin-bottom:24px}.designsetgo-logo{height:auto;-o-object-fit:contain;object-fit:contain;width:250px}.designsetgo-stats-grid{display:grid;gap:24px;grid-template-columns:repeat(auto-fit,minmax(200px,1fr))}.designsetgo-stat{background:#f6f7f7;border-radius:4px;padding:16px;text-align:center}.designsetgo-stat__value{color:#1e1e1e;font-size:32px;font-weight:700;margin-bottom:8px}.designsetgo-stat__label{color:#757575;font-size:14px}.designsetgo-quick-links-grid{display:grid;gap:16px;grid-template-columns:repeat(auto-fill,minmax(250px,1fr))}.designsetgo-quick-link{background:#f6f7f7;border-radius:4px;display:block;padding:20px;text-decoration:none;transition:all .2s ease}.designsetgo-quick-link:hover{background:#e9ecef;box-shadow:0 2px 8px rgba(0,0,0,.1);transform:translateY(-2px)}.designsetgo-quick-link .dashicons{color:#2271b1;font-size:32px;height:32px;margin-bottom:12px;width:32px}.designsetgo-quick-link h3{color:#1e1e1e;font-size:16px;margin:0 0 8px}.designsetgo-quick-link p{color:#757575;font-size:14px;margin:0}.designsetgo-blocks-extensions__header{margin-bottom:24px}.designsetgo-blocks-extensions__header h1{margin:0 0 8px}.designsetgo-blocks-extensions__header .description{font-size:14px;margin:0}.designsetgo-tabs .components-tab-panel__tabs{border-bottom:1px solid #dcdcde;margin-bottom:24px}.designsetgo-tabs button.is-active{box-shadow:inset 0 0 0 1.5px #2271b1,inset 0 -4px 0 0 #2271b1}.designsetgo-search-wrapper{margin-bottom:24px}.designsetgo-search-wrapper .components-search-control{max-width:400px}.designsetgo-category-card{margin-bottom:24px}.designsetgo-category-card .components-card__header{padding:16px 24px}.designsetgo-category-header{align-items:center;display:flex;justify-content:space-between;width:100%}.designsetgo-category-header h2{font-size:18px;margin:0}.designsetgo-category-actions{display:flex;gap:8px}.designsetgo-blocks-grid,.designsetgo-extensions-grid{display:grid;gap:16px;grid-template-columns:repeat(auto-fill,minmax(300px,1fr))}.designsetgo-block-item,.designsetgo-extension-item{background:#f6f7f7;border-radius:4px;padding:12px}.designsetgo-block-item .components-base-control,.designsetgo-extension-item .components-base-control{margin-bottom:0}.designsetgo-block-item .components-checkbox-control__help,.designsetgo-extension-item .components-checkbox-control__help{font-size:13px;margin-top:4px}.designsetgo-block-label{align-items:center;display:flex;gap:8px}.designsetgo-badge{border-radius:3px;display:inline-block;font-size:11px;font-weight:600;padding:2px 8px;text-transform:uppercase}.designsetgo-badge--high{background:#f0b429;color:#1e1e1e}.designsetgo-settings__header{margin-bottom:24px}.designsetgo-settings__header h1{margin:0 0 8px}.designsetgo-settings__header .description{font-size:14px;margin:0}.designsetgo-settings .components-card{margin-bottom:24px}.designsetgo-settings .components-card:last-of-type{margin-bottom:0}.designsetgo-settings .components-card__header{padding:16px 24px}.designsetgo-settings .components-card__header h2{font-size:18px;margin:0}.designsetgo-settings .components-card__body .components-base-control,.designsetgo-settings .components-card__body .components-range-control,.designsetgo-settings .components-card__body .components-select-control,.designsetgo-settings .components-card__body .components-toggle-control{margin-bottom:24px}.designsetgo-settings .components-card__body .components-base-control:last-child,.designsetgo-settings .components-card__body .components-range-control:last-child,.designsetgo-settings .components-card__body .components-select-control:last-child,.designsetgo-settings .components-card__body .components-toggle-control:last-child{margin-bottom:0}.designsetgo-save-bar{background:#fff;border-top:1px solid #dcdcde;bottom:0;box-shadow:0 -2px 8px rgba(0,0,0,.1);margin:24px -20px -10px;padding:16px 24px;position:sticky;z-index:10}.designsetgo-save-bar .components-button{min-width:120px}.components-notice{margin:0 0 24px}.designsetgo-stat-card{align-items:center;background:linear-gradient(-135deg,#f6f7f7,#fff);border-radius:8px;box-shadow:0 2px 4px rgba(0,0,0,.05);display:flex;gap:16px;padding:20px;transition:all .3s ease}.designsetgo-stat-card:hover{box-shadow:0 4px 12px rgba(0,0,0,.1);transform:translateY(-2px)}.designsetgo-stat-card__icon{align-items:center;border-radius:50%;display:flex;flex-shrink:0;height:48px;justify-content:center;width:48px}.designsetgo-stat-card__icon svg{fill:#fff;height:24px;width:24px}.designsetgo-stat-card__icon--blocks{background:linear-gradient(-135deg,#2271b1,#135e96)}.designsetgo-stat-card__icon--extensions{background:linear-gradient(-135deg,#00a32a,#008a20)}.designsetgo-stat-card__icon--forms{background:linear-gradient(-135deg,#f0b429,#dba617)}.designsetgo-stat-card__content{flex:1}.designsetgo-stat-card__value{color:#1e1e1e;font-size:28px;font-weight:700;line-height:1.2;margin:0}.designsetgo-stat-card__label{color:#757575;font-size:13px;margin:4px 0 0}.designsetgo-blocks-categories{margin-bottom:24px}.designsetgo-section-heading{color:#1e1e1e;font-size:14px;font-weight:600;letter-spacing:.5px;margin:0 0 12px;text-transform:uppercase}.designsetgo-categories-grid{display:grid;gap:12px;grid-template-columns:repeat(auto-fill,minmax(140px,1fr))}.designsetgo-category-item{align-items:center;background:#f6f7f7;border-radius:6px;display:flex;font-size:13px;justify-content:space-between;padding:10px 14px}.designsetgo-category-name{color:#1e1e1e;font-weight:500}.designsetgo-category-count{align-items:center;background:#2271b1;border-radius:12px;color:#fff;display:inline-flex;font-size:12px;font-weight:600;height:24px;justify-content:center;min-width:24px;padding:0 8px}.designsetgo-extensions-list{border-top:1px solid #dcdcde;margin-top:24px;padding-top:24px}.designsetgo-extension-pills{display:flex;flex-wrap:wrap;gap:10px}.designsetgo-extension-pill{align-items:center;border-radius:20px;display:inline-flex;font-size:13px;font-weight:500;gap:8px;padding:8px 14px;transition:all .2s ease}.designsetgo-extension-pill.is-enabled{background:#d5f2e3;border:1px solid #00a32a;color:#00693e}.designsetgo-extension-pill.is-enabled .designsetgo-extension-status{background:#00a32a;color:#fff}.designsetgo-extension-pill.is-disabled{background:#f6f7f7;border:1px solid #dcdcde;color:#757575}.designsetgo-extension-pill.is-disabled .designsetgo-extension-status{background:#757575;color:#fff}.designsetgo-extension-status{align-items:center;border-radius:10px;display:inline-flex;font-size:10px;font-weight:600;justify-content:center;letter-spacing:.5px;padding:2px 8px;text-transform:uppercase}.designsetgo-settings-tabs{margin-bottom:24px}.designsetgo-settings-tabs .components-tab-panel__tabs{border-bottom:2px solid #dcdcde;display:flex;gap:8px;margin-bottom:24px}.designsetgo-settings-tabs .components-tab-panel__tabs-item{background:transparent;border:none;color:#757575;font-weight:500;padding:12px 20px;position:relative;transition:all .2s ease}.designsetgo-settings-tabs .components-tab-panel__tabs-item:hover{color:#1e1e1e}.designsetgo-settings-tabs .components-tab-panel__tabs-item.is-active{box-shadow:inset 0 -2px 0 0 #2271b1;color:#2271b1}.designsetgo-tab-content .components-card{margin-bottom:24px}.designsetgo-tab-content .components-card:last-child{margin-bottom:0}.designsetgo-settings-panel .components-card__header{background:linear-gradient(-135deg,#f6f7f7,#fff)}.designsetgo-settings-panel .components-card__body{padding:24px}.designsetgo-panel-description{color:#757575;font-size:14px;line-height:1.6;margin:0 0 20px}.designsetgo-settings-grid{display:grid;gap:20px;grid-template-columns:repeat(2,1fr);margin-bottom:20px}.designsetgo-settings-grid.designsetgo-settings-grid--single{grid-template-columns:1fr}.designsetgo-collapsible-section{border-top:1px solid #dcdcde;margin-top:24px;padding-top:20px}.designsetgo-collapsible-header{align-items:center;background:#f6f7f7;border-radius:6px;cursor:pointer;display:flex;justify-content:space-between;margin-bottom:0;padding:12px 16px;transition:background .2s ease}.designsetgo-collapsible-header:hover{background:#e9ecef}.designsetgo-collapsible-header h3{color:#1e1e1e;font-size:15px;font-weight:600;margin:0}.designsetgo-collapsible-header .components-button{min-width:auto;padding:4px}.designsetgo-collapsible-content{margin-top:16px;padding-top:4px}.designsetgo-color-control-compact{margin-bottom:20px}.designsetgo-color-control-compact label{display:block;font-size:13px;font-weight:600;margin-bottom:8px}.designsetgo-color-control-compact .components-color-palette{margin-top:8px}.designsetgo-settings-note{background:#fff3cd;border-right:4px solid #f0b429;border-radius:4px;margin-top:16px;padding:12px}.designsetgo-settings-note strong{color:#1e1e1e;display:block;margin-bottom:8px}.designsetgo-settings-note p{color:#666;font-size:13px;line-height:1.6;margin:0}.designsetgo-settings-section{border-top:1px solid #f0f0f1;margin-top:24px;padding-top:20px}.designsetgo-settings-section:first-child{border-top:none;margin-top:0;padding-top:0}@media(max-width:782px){.designsetgo-blocks-grid,.designsetgo-extensions-grid,.designsetgo-quick-links-grid{grid-template-columns:1fr}.designsetgo-category-header{align-items:flex-start;flex-direction:column;gap:12px}.designsetgo-save-bar{margin-right:0;margin-left:0}.designsetgo-settings-grid{grid-template-columns:1fr}.designsetgo-stat-card{flex-direction:column;text-align:center}.designsetgo-categories-grid{grid-template-columns:repeat(auto-fill,minmax(120px,1fr))}}
  • designsetgo/tags/1.1.0/build/admin.asset.php

    r3395924 r3396076  
    1 <?php return array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => '81b98e033bc18baaa511');
     1<?php return array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => 'd8ca567e891277fc7f59');
  • designsetgo/tags/1.1.0/build/admin.css

    r3395924 r3396076  
    1 .designsetgo-admin-wrapper{margin:20px 0;max-width:1200px}.designsetgo-admin-loading{align-items:center;display:flex;justify-content:center;min-height:400px}.designsetgo-dashboard__header{margin-bottom:32px}.designsetgo-dashboard__branding{align-items:center;display:flex;flex-direction:column;gap:16px;text-align:center}.designsetgo-dashboard__branding h1{margin:0}.designsetgo-dashboard__branding .description{font-size:14px;margin:0}.designsetgo-dashboard__info,.designsetgo-dashboard__quick-links,.designsetgo-dashboard__stats{margin-bottom:24px}.designsetgo-logo{height:auto;-o-object-fit:contain;object-fit:contain;width:250px}.designsetgo-stats-grid{display:grid;gap:24px;grid-template-columns:repeat(auto-fit,minmax(200px,1fr))}.designsetgo-stat{background:#f6f7f7;border-radius:4px;padding:16px;text-align:center}.designsetgo-stat__value{color:#1e1e1e;font-size:32px;font-weight:700;margin-bottom:8px}.designsetgo-stat__label{color:#757575;font-size:14px}.designsetgo-quick-links-grid{display:grid;gap:16px;grid-template-columns:repeat(auto-fill,minmax(250px,1fr))}.designsetgo-quick-link{background:#f6f7f7;border-radius:4px;display:block;padding:20px;text-decoration:none;transition:all .2s ease}.designsetgo-quick-link:hover{background:#e9ecef;box-shadow:0 2px 8px rgba(0,0,0,.1);transform:translateY(-2px)}.designsetgo-quick-link .dashicons{color:#2271b1;font-size:32px;height:32px;margin-bottom:12px;width:32px}.designsetgo-quick-link h3{color:#1e1e1e;font-size:16px;margin:0 0 8px}.designsetgo-quick-link p{color:#757575;font-size:14px;margin:0}.designsetgo-blocks-extensions__header{margin-bottom:24px}.designsetgo-blocks-extensions__header h1{margin:0 0 8px}.designsetgo-blocks-extensions__header .description{font-size:14px;margin:0}.designsetgo-tabs .components-tab-panel__tabs{border-bottom:1px solid #dcdcde;margin-bottom:24px}.designsetgo-tabs button.is-active{box-shadow:inset 0 0 0 1.5px #2271b1,inset 0 -4px 0 0 #2271b1}.designsetgo-search-wrapper{margin-bottom:24px}.designsetgo-search-wrapper .components-search-control{max-width:400px}.designsetgo-category-card{margin-bottom:24px}.designsetgo-category-card .components-card__header{padding:16px 24px}.designsetgo-category-header{align-items:center;display:flex;justify-content:space-between;width:100%}.designsetgo-category-header h2{font-size:18px;margin:0}.designsetgo-category-actions{display:flex;gap:8px}.designsetgo-blocks-grid,.designsetgo-extensions-grid{display:grid;gap:16px;grid-template-columns:repeat(auto-fill,minmax(300px,1fr))}.designsetgo-block-item,.designsetgo-extension-item{background:#f6f7f7;border-radius:4px;padding:12px}.designsetgo-block-item .components-base-control,.designsetgo-extension-item .components-base-control{margin-bottom:0}.designsetgo-block-item .components-checkbox-control__help,.designsetgo-extension-item .components-checkbox-control__help{font-size:13px;margin-top:4px}.designsetgo-block-label{align-items:center;display:flex;gap:8px}.designsetgo-badge{border-radius:3px;display:inline-block;font-size:11px;font-weight:600;padding:2px 8px;text-transform:uppercase}.designsetgo-badge--high{background:#f0b429;color:#1e1e1e}.designsetgo-settings__header{margin-bottom:24px}.designsetgo-settings__header h1{margin:0 0 8px}.designsetgo-settings__header .description{font-size:14px;margin:0}.designsetgo-settings .components-card{margin-bottom:24px}.designsetgo-settings .components-card:last-of-type{margin-bottom:0}.designsetgo-settings .components-card__header{padding:16px 24px}.designsetgo-settings .components-card__header h2{font-size:18px;margin:0}.designsetgo-settings .components-card__body .components-base-control,.designsetgo-settings .components-card__body .components-range-control,.designsetgo-settings .components-card__body .components-select-control,.designsetgo-settings .components-card__body .components-toggle-control{margin-bottom:24px}.designsetgo-settings .components-card__body .components-base-control:last-child,.designsetgo-settings .components-card__body .components-range-control:last-child,.designsetgo-settings .components-card__body .components-select-control:last-child,.designsetgo-settings .components-card__body .components-toggle-control:last-child{margin-bottom:0}.designsetgo-save-bar{background:#fff;border-top:1px solid #dcdcde;bottom:0;box-shadow:0 -2px 8px rgba(0,0,0,.1);margin:24px -20px -10px;padding:16px 24px;position:sticky;z-index:10}.designsetgo-save-bar .components-button{min-width:120px}.components-notice{margin:0 0 24px}@media(max-width:782px){.designsetgo-blocks-grid,.designsetgo-extensions-grid,.designsetgo-quick-links-grid{grid-template-columns:1fr}.designsetgo-category-header{align-items:flex-start;flex-direction:column;gap:12px}.designsetgo-save-bar{margin-left:0;margin-right:0}}
     1.designsetgo-admin-wrapper{margin:20px 0;max-width:1200px}.designsetgo-admin-loading{align-items:center;display:flex;justify-content:center;min-height:400px}.designsetgo-dashboard__header{margin-bottom:32px}.designsetgo-dashboard__branding{align-items:center;display:flex;flex-direction:column;gap:16px;text-align:center}.designsetgo-dashboard__branding h1{margin:0}.designsetgo-dashboard__branding .description{font-size:14px;margin:0}.designsetgo-dashboard__stats{display:grid;gap:20px;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));margin-bottom:32px}.designsetgo-dashboard__info,.designsetgo-dashboard__overview,.designsetgo-dashboard__quick-links{margin-bottom:24px}.designsetgo-logo{height:auto;-o-object-fit:contain;object-fit:contain;width:250px}.designsetgo-stats-grid{display:grid;gap:24px;grid-template-columns:repeat(auto-fit,minmax(200px,1fr))}.designsetgo-stat{background:#f6f7f7;border-radius:4px;padding:16px;text-align:center}.designsetgo-stat__value{color:#1e1e1e;font-size:32px;font-weight:700;margin-bottom:8px}.designsetgo-stat__label{color:#757575;font-size:14px}.designsetgo-quick-links-grid{display:grid;gap:16px;grid-template-columns:repeat(auto-fill,minmax(250px,1fr))}.designsetgo-quick-link{background:#f6f7f7;border-radius:4px;display:block;padding:20px;text-decoration:none;transition:all .2s ease}.designsetgo-quick-link:hover{background:#e9ecef;box-shadow:0 2px 8px rgba(0,0,0,.1);transform:translateY(-2px)}.designsetgo-quick-link .dashicons{color:#2271b1;font-size:32px;height:32px;margin-bottom:12px;width:32px}.designsetgo-quick-link h3{color:#1e1e1e;font-size:16px;margin:0 0 8px}.designsetgo-quick-link p{color:#757575;font-size:14px;margin:0}.designsetgo-blocks-extensions__header{margin-bottom:24px}.designsetgo-blocks-extensions__header h1{margin:0 0 8px}.designsetgo-blocks-extensions__header .description{font-size:14px;margin:0}.designsetgo-tabs .components-tab-panel__tabs{border-bottom:1px solid #dcdcde;margin-bottom:24px}.designsetgo-tabs button.is-active{box-shadow:inset 0 0 0 1.5px #2271b1,inset 0 -4px 0 0 #2271b1}.designsetgo-search-wrapper{margin-bottom:24px}.designsetgo-search-wrapper .components-search-control{max-width:400px}.designsetgo-category-card{margin-bottom:24px}.designsetgo-category-card .components-card__header{padding:16px 24px}.designsetgo-category-header{align-items:center;display:flex;justify-content:space-between;width:100%}.designsetgo-category-header h2{font-size:18px;margin:0}.designsetgo-category-actions{display:flex;gap:8px}.designsetgo-blocks-grid,.designsetgo-extensions-grid{display:grid;gap:16px;grid-template-columns:repeat(auto-fill,minmax(300px,1fr))}.designsetgo-block-item,.designsetgo-extension-item{background:#f6f7f7;border-radius:4px;padding:12px}.designsetgo-block-item .components-base-control,.designsetgo-extension-item .components-base-control{margin-bottom:0}.designsetgo-block-item .components-checkbox-control__help,.designsetgo-extension-item .components-checkbox-control__help{font-size:13px;margin-top:4px}.designsetgo-block-label{align-items:center;display:flex;gap:8px}.designsetgo-badge{border-radius:3px;display:inline-block;font-size:11px;font-weight:600;padding:2px 8px;text-transform:uppercase}.designsetgo-badge--high{background:#f0b429;color:#1e1e1e}.designsetgo-settings__header{margin-bottom:24px}.designsetgo-settings__header h1{margin:0 0 8px}.designsetgo-settings__header .description{font-size:14px;margin:0}.designsetgo-settings .components-card{margin-bottom:24px}.designsetgo-settings .components-card:last-of-type{margin-bottom:0}.designsetgo-settings .components-card__header{padding:16px 24px}.designsetgo-settings .components-card__header h2{font-size:18px;margin:0}.designsetgo-settings .components-card__body .components-base-control,.designsetgo-settings .components-card__body .components-range-control,.designsetgo-settings .components-card__body .components-select-control,.designsetgo-settings .components-card__body .components-toggle-control{margin-bottom:24px}.designsetgo-settings .components-card__body .components-base-control:last-child,.designsetgo-settings .components-card__body .components-range-control:last-child,.designsetgo-settings .components-card__body .components-select-control:last-child,.designsetgo-settings .components-card__body .components-toggle-control:last-child{margin-bottom:0}.designsetgo-save-bar{background:#fff;border-top:1px solid #dcdcde;bottom:0;box-shadow:0 -2px 8px rgba(0,0,0,.1);margin:24px -20px -10px;padding:16px 24px;position:sticky;z-index:10}.designsetgo-save-bar .components-button{min-width:120px}.components-notice{margin:0 0 24px}.designsetgo-stat-card{align-items:center;background:linear-gradient(135deg,#f6f7f7,#fff);border-radius:8px;box-shadow:0 2px 4px rgba(0,0,0,.05);display:flex;gap:16px;padding:20px;transition:all .3s ease}.designsetgo-stat-card:hover{box-shadow:0 4px 12px rgba(0,0,0,.1);transform:translateY(-2px)}.designsetgo-stat-card__icon{align-items:center;border-radius:50%;display:flex;flex-shrink:0;height:48px;justify-content:center;width:48px}.designsetgo-stat-card__icon svg{fill:#fff;height:24px;width:24px}.designsetgo-stat-card__icon--blocks{background:linear-gradient(135deg,#2271b1,#135e96)}.designsetgo-stat-card__icon--extensions{background:linear-gradient(135deg,#00a32a,#008a20)}.designsetgo-stat-card__icon--forms{background:linear-gradient(135deg,#f0b429,#dba617)}.designsetgo-stat-card__content{flex:1}.designsetgo-stat-card__value{color:#1e1e1e;font-size:28px;font-weight:700;line-height:1.2;margin:0}.designsetgo-stat-card__label{color:#757575;font-size:13px;margin:4px 0 0}.designsetgo-blocks-categories{margin-bottom:24px}.designsetgo-section-heading{color:#1e1e1e;font-size:14px;font-weight:600;letter-spacing:.5px;margin:0 0 12px;text-transform:uppercase}.designsetgo-categories-grid{display:grid;gap:12px;grid-template-columns:repeat(auto-fill,minmax(140px,1fr))}.designsetgo-category-item{align-items:center;background:#f6f7f7;border-radius:6px;display:flex;font-size:13px;justify-content:space-between;padding:10px 14px}.designsetgo-category-name{color:#1e1e1e;font-weight:500}.designsetgo-category-count{align-items:center;background:#2271b1;border-radius:12px;color:#fff;display:inline-flex;font-size:12px;font-weight:600;height:24px;justify-content:center;min-width:24px;padding:0 8px}.designsetgo-extensions-list{border-top:1px solid #dcdcde;margin-top:24px;padding-top:24px}.designsetgo-extension-pills{display:flex;flex-wrap:wrap;gap:10px}.designsetgo-extension-pill{align-items:center;border-radius:20px;display:inline-flex;font-size:13px;font-weight:500;gap:8px;padding:8px 14px;transition:all .2s ease}.designsetgo-extension-pill.is-enabled{background:#d5f2e3;border:1px solid #00a32a;color:#00693e}.designsetgo-extension-pill.is-enabled .designsetgo-extension-status{background:#00a32a;color:#fff}.designsetgo-extension-pill.is-disabled{background:#f6f7f7;border:1px solid #dcdcde;color:#757575}.designsetgo-extension-pill.is-disabled .designsetgo-extension-status{background:#757575;color:#fff}.designsetgo-extension-status{align-items:center;border-radius:10px;display:inline-flex;font-size:10px;font-weight:600;justify-content:center;letter-spacing:.5px;padding:2px 8px;text-transform:uppercase}.designsetgo-settings-tabs{margin-bottom:24px}.designsetgo-settings-tabs .components-tab-panel__tabs{border-bottom:2px solid #dcdcde;display:flex;gap:8px;margin-bottom:24px}.designsetgo-settings-tabs .components-tab-panel__tabs-item{background:transparent;border:none;color:#757575;font-weight:500;padding:12px 20px;position:relative;transition:all .2s ease}.designsetgo-settings-tabs .components-tab-panel__tabs-item:hover{color:#1e1e1e}.designsetgo-settings-tabs .components-tab-panel__tabs-item.is-active{box-shadow:inset 0 -2px 0 0 #2271b1;color:#2271b1}.designsetgo-tab-content .components-card{margin-bottom:24px}.designsetgo-tab-content .components-card:last-child{margin-bottom:0}.designsetgo-settings-panel .components-card__header{background:linear-gradient(135deg,#f6f7f7,#fff)}.designsetgo-settings-panel .components-card__body{padding:24px}.designsetgo-panel-description{color:#757575;font-size:14px;line-height:1.6;margin:0 0 20px}.designsetgo-settings-grid{display:grid;gap:20px;grid-template-columns:repeat(2,1fr);margin-bottom:20px}.designsetgo-settings-grid.designsetgo-settings-grid--single{grid-template-columns:1fr}.designsetgo-collapsible-section{border-top:1px solid #dcdcde;margin-top:24px;padding-top:20px}.designsetgo-collapsible-header{align-items:center;background:#f6f7f7;border-radius:6px;cursor:pointer;display:flex;justify-content:space-between;margin-bottom:0;padding:12px 16px;transition:background .2s ease}.designsetgo-collapsible-header:hover{background:#e9ecef}.designsetgo-collapsible-header h3{color:#1e1e1e;font-size:15px;font-weight:600;margin:0}.designsetgo-collapsible-header .components-button{min-width:auto;padding:4px}.designsetgo-collapsible-content{margin-top:16px;padding-top:4px}.designsetgo-color-control-compact{margin-bottom:20px}.designsetgo-color-control-compact label{display:block;font-size:13px;font-weight:600;margin-bottom:8px}.designsetgo-color-control-compact .components-color-palette{margin-top:8px}.designsetgo-settings-note{background:#fff3cd;border-left:4px solid #f0b429;border-radius:4px;margin-top:16px;padding:12px}.designsetgo-settings-note strong{color:#1e1e1e;display:block;margin-bottom:8px}.designsetgo-settings-note p{color:#666;font-size:13px;line-height:1.6;margin:0}.designsetgo-settings-section{border-top:1px solid #f0f0f1;margin-top:24px;padding-top:20px}.designsetgo-settings-section:first-child{border-top:none;margin-top:0;padding-top:0}@media(max-width:782px){.designsetgo-blocks-grid,.designsetgo-extensions-grid,.designsetgo-quick-links-grid{grid-template-columns:1fr}.designsetgo-category-header{align-items:flex-start;flex-direction:column;gap:12px}.designsetgo-save-bar{margin-left:0;margin-right:0}.designsetgo-settings-grid{grid-template-columns:1fr}.designsetgo-stat-card{flex-direction:column;text-align:center}.designsetgo-categories-grid{grid-template-columns:repeat(auto-fill,minmax(120px,1fr))}}
  • designsetgo/tags/1.1.0/build/admin.js

    r3395924 r3396076  
    1 (()=>{"use strict";var e={n:s=>{var n=s&&s.__esModule?()=>s.default:()=>s;return e.d(n,{a:n}),n},d:(s,n)=>{for(var o in n)e.o(n,o)&&!e.o(s,o)&&Object.defineProperty(s,o,{enumerable:!0,get:n[o]})},o:(e,s)=>Object.prototype.hasOwnProperty.call(e,s)};const s=window.wp.element,n=window.wp.i18n,o=window.wp.components,t=window.wp.apiFetch;var i=e.n(t);const a=window.ReactJSXRuntime,l=()=>{const[e,t]=(0,s.useState)(null),[l,d]=(0,s.useState)(!0);return(0,s.useEffect)(()=>{i()({path:"/designsetgo/v1/stats"}).then(e=>{t(e),d(!1)}).catch(()=>{d(!1)})},[]),l?(0,a.jsx)("div",{className:"designsetgo-admin-loading",children:(0,a.jsx)(o.Spinner,{})}):(0,a.jsxs)("div",{className:"designsetgo-dashboard",children:[(0,a.jsx)("div",{className:"designsetgo-dashboard__header",children:(0,a.jsxs)("div",{className:"designsetgo-dashboard__branding",children:[(0,a.jsx)("img",{src:window.designSetGoAdmin?.logoUrl,alt:"DesignSetGo",className:"designsetgo-logo"}),(0,a.jsx)("p",{className:"description",children:(0,n.__)("Manage your DesignSetGo blocks, extensions, and settings.","designsetgo")})]})}),(0,a.jsx)("div",{className:"designsetgo-dashboard__stats",children:(0,a.jsxs)(o.Card,{children:[(0,a.jsx)(o.CardHeader,{children:(0,a.jsx)("h2",{children:(0,n.__)("Plugin Statistics","designsetgo")})}),(0,a.jsx)(o.CardBody,{children:(0,a.jsxs)("div",{className:"designsetgo-stats-grid",children:[(0,a.jsxs)("div",{className:"designsetgo-stat",children:[(0,a.jsxs)("div",{className:"designsetgo-stat__value",children:[e?.enabled_blocks||0,"/",e?.total_blocks||0]}),(0,a.jsx)("div",{className:"designsetgo-stat__label",children:(0,n.__)("Enabled Blocks","designsetgo")})]}),(0,a.jsxs)("div",{className:"designsetgo-stat",children:[(0,a.jsx)("div",{className:"designsetgo-stat__value",children:e?.form_submissions||0}),(0,a.jsx)("div",{className:"designsetgo-stat__label",children:(0,n.__)("Form Submissions","designsetgo")})]})]})})]})}),(0,a.jsx)("div",{className:"designsetgo-dashboard__quick-links",children:(0,a.jsxs)(o.Card,{children:[(0,a.jsx)(o.CardHeader,{children:(0,a.jsx)("h2",{children:(0,n.__)("Quick Links","designsetgo")})}),(0,a.jsx)(o.CardBody,{children:(0,a.jsxs)("div",{className:"designsetgo-quick-links-grid",children:[(0,a.jsxs)("a",{href:"?page=designsetgo-blocks",className:"designsetgo-quick-link",children:[(0,a.jsx)("span",{className:"dashicons dashicons-layout"}),(0,a.jsx)("h3",{children:(0,n.__)("Manage Blocks","designsetgo")}),(0,a.jsx)("p",{children:(0,n.__)("Enable or disable individual blocks and extensions","designsetgo")})]}),(0,a.jsxs)("a",{href:"?page=edit.php&post_type=dsg_form_submission",className:"designsetgo-quick-link",children:[(0,a.jsx)("span",{className:"dashicons dashicons-feedback"}),(0,a.jsx)("h3",{children:(0,n.__)("Form Submissions","designsetgo")}),(0,a.jsx)("p",{children:(0,n.__)("View and manage form submissions","designsetgo")})]}),(0,a.jsxs)("a",{href:"?page=designsetgo-settings",className:"designsetgo-quick-link",children:[(0,a.jsx)("span",{className:"dashicons dashicons-admin-settings"}),(0,a.jsx)("h3",{children:(0,n.__)("Settings","designsetgo")}),(0,a.jsx)("p",{children:(0,n.__)("Configure performance, forms, and security","designsetgo")})]}),(0,a.jsxs)("a",{href:`${window.designSetGoAdmin?.siteUrl}/wp-admin/site-editor.php`,className:"designsetgo-quick-link",children:[(0,a.jsx)("span",{className:"dashicons dashicons-admin-appearance"}),(0,a.jsx)("h3",{children:(0,n.__)("Global Styles","designsetgo")}),(0,a.jsx)("p",{children:(0,n.__)("Customize colors, typography, and spacing","designsetgo")})]})]})})]})}),(0,a.jsx)("div",{className:"designsetgo-dashboard__info",children:(0,a.jsxs)(o.Card,{children:[(0,a.jsx)(o.CardHeader,{children:(0,a.jsx)("h2",{children:(0,n.__)("Getting Started","designsetgo")})}),(0,a.jsxs)(o.CardBody,{children:[(0,a.jsx)("p",{children:(0,n.__)("DesignSetGo provides 41 powerful blocks and 10 extensions to enhance your WordPress editing experience.","designsetgo")}),(0,a.jsxs)("ul",{children:[(0,a.jsxs)("li",{children:[(0,a.jsx)("strong",{children:(0,n.__)("Container Blocks:","designsetgo")})," ",(0,n.__)("Flex, Grid, and Stack layouts for responsive designs","designsetgo")]}),(0,a.jsxs)("li",{children:[(0,a.jsx)("strong",{children:(0,n.__)("UI Elements:","designsetgo")})," ",(0,n.__)("Icons, tabs, accordions, and more","designsetgo")]}),(0,a.jsxs)("li",{children:[(0,a.jsx)("strong",{children:(0,n.__)("Interactive Blocks:","designsetgo")})," ",(0,n.__)("Sliders, flip cards, and animations","designsetgo")]}),(0,a.jsxs)("li",{children:[(0,a.jsx)("strong",{children:(0,n.__)("Form Builder:","designsetgo")})," ",(0,n.__)("Complete form system with 11 field types","designsetgo")]})]})]})]})})]})},d=()=>{const[e,t]=(0,s.useState)({}),[l,d]=(0,s.useState)([]),[r,g]=(0,s.useState)(null),[c,_]=(0,s.useState)(!0),[h,m]=(0,s.useState)(!1),[x,u]=(0,s.useState)(null),[p,b]=(0,s.useState)("");(0,s.useEffect)(()=>{Promise.all([i()({path:"/designsetgo/v1/blocks"}),i()({path:"/designsetgo/v1/extensions"}),i()({path:"/designsetgo/v1/settings"})]).then(([e,s,n])=>{t(e),d(s),g(n),_(!1)}).catch(()=>{u({status:"error",message:(0,n.__)("Failed to load data.","designsetgo")}),_(!1)})},[]);const j=e=>!!r&&(0===r.enabled_blocks.length||r.enabled_blocks.includes(e)),k=()=>{const s=[];return Object.values(e).forEach(e=>{e.blocks.forEach(e=>{s.push(e.name)})}),s};return c?(0,a.jsx)("div",{className:"designsetgo-admin-loading",children:(0,a.jsx)(o.Spinner,{})}):(0,a.jsxs)("div",{className:"designsetgo-blocks-extensions",children:[(0,a.jsxs)("div",{className:"designsetgo-blocks-extensions__header",children:[(0,a.jsx)("h1",{children:(0,n.__)("Blocks & Extensions","designsetgo")}),(0,a.jsx)("p",{className:"description",children:(0,n.__)("Enable or disable blocks and extensions to customize your editing experience.","designsetgo")})]}),x&&(0,a.jsx)(o.Notice,{status:x.status,onRemove:()=>u(null),isDismissible:!0,children:x.message}),(0,a.jsx)(o.TabPanel,{className:"designsetgo-tabs",activeClass:"is-active",tabs:[{name:"blocks",title:(0,n.__)("Blocks","designsetgo")},{name:"extensions",title:(0,n.__)("Extensions","designsetgo")}],children:s=>(0,a.jsxs)("div",{className:"designsetgo-tab-content",children:["blocks"===s.name&&(0,a.jsxs)("div",{className:"designsetgo-blocks-list",children:[(0,a.jsx)("div",{className:"designsetgo-search-wrapper",children:(0,a.jsx)(o.SearchControl,{value:p,onChange:b,placeholder:(0,n.__)("Search blocks…","designsetgo")})}),Object.entries(e).map(([s,t])=>{const i=(l=t.blocks,p?l.filter(e=>e.title.toLowerCase().includes(p.toLowerCase())||e.description.toLowerCase().includes(p.toLowerCase())):l);var l;if(0===i.length)return null;const d=i.every(e=>j(e.name)),c=i.every(e=>!j(e.name));return(0,a.jsxs)(o.Card,{className:"designsetgo-category-card",children:[(0,a.jsx)(o.CardHeader,{children:(0,a.jsxs)("div",{className:"designsetgo-category-header",children:[(0,a.jsx)("h2",{children:t.label}),(0,a.jsxs)("div",{className:"designsetgo-category-actions",children:[(0,a.jsx)(o.Button,{variant:"secondary",size:"small",onClick:()=>(s=>{const n=0===r.enabled_blocks.length?k():[...r.enabled_blocks],o=e[s].blocks.map(e=>e.name),t=[...new Set([...n,...o])];g({...r,enabled_blocks:t})})(s),disabled:d,children:(0,n.__)("Enable All","designsetgo")}),(0,a.jsx)(o.Button,{variant:"secondary",size:"small",onClick:()=>(s=>{const n=0===r.enabled_blocks.length?k():[...r.enabled_blocks],o=e[s].blocks.map(e=>e.name),t=n.filter(e=>!o.includes(e));g({...r,enabled_blocks:t})})(s),disabled:c,children:(0,n.__)("Disable All","designsetgo")})]})]})}),(0,a.jsx)(o.CardBody,{children:(0,a.jsx)("div",{className:"designsetgo-blocks-grid",children:i.map(e=>(0,a.jsx)("div",{className:"designsetgo-block-item",children:(0,a.jsx)(o.CheckboxControl,{label:(0,a.jsxs)("span",{className:"designsetgo-block-label",children:[(0,a.jsx)("strong",{children:e.title}),"high"===e.performance&&(0,a.jsx)("span",{className:"designsetgo-badge designsetgo-badge--high",children:(0,n.__)("Heavy","designsetgo")})]}),help:e.description,checked:j(e.name),onChange:()=>(e=>{const s=0===r.enabled_blocks.length?k():[...r.enabled_blocks];if(s.includes(e)){const n=s.filter(s=>s!==e);g({...r,enabled_blocks:n})}else g({...r,enabled_blocks:[...s,e]})})(e.name)})},e.name))})})]},s)})]}),"extensions"===s.name&&(0,a.jsxs)(o.Card,{children:[(0,a.jsx)(o.CardHeader,{children:(0,a.jsx)("h2",{children:(0,n.__)("Extensions","designsetgo")})}),(0,a.jsxs)(o.CardBody,{children:[(0,a.jsx)("p",{className:"description",children:(0,n.__)("Extensions add functionality to all blocks. Disabling extensions will reduce editor complexity.","designsetgo")}),(0,a.jsx)("div",{className:"designsetgo-extensions-grid",children:l.map(e=>{return(0,a.jsx)("div",{className:"designsetgo-extension-item",children:(0,a.jsx)(o.CheckboxControl,{label:(0,a.jsx)("strong",{children:e.title}),help:e.description,checked:(s=e.name,!!r&&(0===r.enabled_extensions.length||r.enabled_extensions.includes(s))),onChange:()=>(e=>{const s=0===r.enabled_extensions.length?l.map(e=>e.name):[...r.enabled_extensions];if(s.includes(e)){const n=s.filter(s=>s!==e);g({...r,enabled_extensions:n})}else g({...r,enabled_extensions:[...s,e]})})(e.name)})},e.name);var s})})]})]})]})}),(0,a.jsx)("div",{className:"designsetgo-save-bar",children:(0,a.jsx)(o.Button,{variant:"primary",onClick:()=>{m(!0),u(null),i()({path:"/designsetgo/v1/settings",method:"POST",data:r}).then(()=>{u({status:"success",message:(0,n.__)("Settings saved successfully! Please refresh any open editor pages to see the changes.","designsetgo")}),m(!1)}).catch(e=>{u({status:"error",message:e.message||(0,n.__)("Failed to save settings.","designsetgo")}),m(!1)})},isBusy:h,disabled:h,children:h?(0,n.__)("Saving…","designsetgo"):(0,n.__)("Save Changes","designsetgo")})})]})},r=()=>{const[e,t]=(0,s.useState)(null),[l,d]=(0,s.useState)(!0),[r,g]=(0,s.useState)(!1),[c,_]=(0,s.useState)(null);(0,s.useEffect)(()=>{i()({path:"/designsetgo/v1/settings"}).then(e=>{t(e),d(!1)}).catch(()=>{_({status:"error",message:(0,n.__)("Failed to load settings.","designsetgo")}),d(!1)})},[]);const h=(s,n,o)=>{t({...e,[s]:{...e[s],[n]:o}})};return l?(0,a.jsx)("div",{className:"designsetgo-admin-loading",children:(0,a.jsx)(o.Spinner,{})}):(0,a.jsxs)("div",{className:"designsetgo-settings",children:[(0,a.jsxs)("div",{className:"designsetgo-settings__header",children:[(0,a.jsx)("h1",{children:(0,n.__)("Settings","designsetgo")}),(0,a.jsx)("p",{className:"description",children:(0,n.__)("Configure performance, forms, animations, sticky header, and security options.","designsetgo")})]}),c&&(0,a.jsx)("div",{style:{position:"fixed",top:"32px",right:"20px",zIndex:1e5,maxWidth:"400px",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.15)"},children:(0,a.jsx)(o.Notice,{status:c.status,onRemove:()=>_(null),isDismissible:!0,children:c.message})}),(0,a.jsxs)(o.Card,{children:[(0,a.jsx)(o.CardHeader,{children:(0,a.jsx)("h2",{children:(0,n.__)("Sticky Header","designsetgo")})}),(0,a.jsxs)(o.CardBody,{children:[(0,a.jsx)("p",{className:"description",style:{marginBottom:"16px"},children:(0,n.__)("Enable sticky header functionality for blocks with position:sticky applied. These settings enhance the default WordPress sticky positioning with additional features.","designsetgo")}),(0,a.jsx)(o.ToggleControl,{label:(0,n.__)("Enable Sticky Header","designsetgo"),help:(0,n.__)("Enable enhanced sticky header functionality.","designsetgo"),checked:e?.sticky_header?.enable||!1,onChange:e=>h("sticky_header","enable",e),__nextHasNoMarginBottom:!0}),e?.sticky_header?.enable&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o.TextControl,{label:(0,n.__)("Custom CSS Selector (Advanced)","designsetgo"),help:(0,n.__)("Override the default selector if using a custom theme or page builder. Leave empty to use: .wp-block-template-part:has(.is-position-sticky)","designsetgo"),value:e?.sticky_header?.custom_selector||"",onChange:e=>h("sticky_header","custom_selector",e),placeholder:".wp-block-template-part:has(.is-position-sticky)",__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,a.jsx)(o.RangeControl,{label:(0,n.__)("Z-Index","designsetgo"),help:(0,n.__)("Stacking order of the sticky header.","designsetgo"),value:e?.sticky_header?.z_index||100,onChange:e=>h("sticky_header","z_index",e),min:1,max:9999,step:1,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,a.jsx)(o.RangeControl,{label:(0,n.__)("Scroll Threshold (px)","designsetgo"),help:(0,n.__)("Pixels user must scroll before effects activate.","designsetgo"),value:e?.sticky_header?.scroll_threshold||50,onChange:e=>h("sticky_header","scroll_threshold",e),min:0,max:500,step:10,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,a.jsx)(o.RangeControl,{label:(0,n.__)("Transition Speed (ms)","designsetgo"),help:(0,n.__)("Animation speed for sticky effects.","designsetgo"),value:e?.sticky_header?.transition_speed||300,onChange:e=>h("sticky_header","transition_speed",e),min:0,max:1e3,step:50,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,a.jsx)(o.ToggleControl,{label:(0,n.__)("Shadow on Scroll","designsetgo"),help:(0,n.__)("Add shadow when scrolled past threshold.","designsetgo"),checked:e?.sticky_header?.shadow_on_scroll||!1,onChange:e=>h("sticky_header","shadow_on_scroll",e),__nextHasNoMarginBottom:!0}),e?.sticky_header?.shadow_on_scroll&&(0,a.jsx)(o.SelectControl,{label:(0,n.__)("Shadow Size","designsetgo"),value:e?.sticky_header?.shadow_size||"medium",options:[{label:(0,n.__)("Small","designsetgo"),value:"small"},{label:(0,n.__)("Medium","designsetgo"),value:"medium"},{label:(0,n.__)("Large","designsetgo"),value:"large"}],onChange:e=>h("sticky_header","shadow_size",e),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,a.jsx)(o.ToggleControl,{label:(0,n.__)("Shrink on Scroll","designsetgo"),help:(0,n.__)("Reduce header height when scrolling.","designsetgo"),checked:e?.sticky_header?.shrink_on_scroll||!1,onChange:e=>h("sticky_header","shrink_on_scroll",e),__nextHasNoMarginBottom:!0}),e?.sticky_header?.shrink_on_scroll&&(0,a.jsx)(o.RangeControl,{label:(0,n.__)("Shrink Amount (%)","designsetgo"),help:(0,n.__)("Percentage to reduce header height.","designsetgo"),value:e?.sticky_header?.shrink_amount||20,onChange:e=>h("sticky_header","shrink_amount",e),min:5,max:50,step:5,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,a.jsx)(o.ToggleControl,{label:(0,n.__)("Hide Header on Scroll Down","designsetgo"),help:(0,n.__)("Hide header when scrolling down, show when scrolling up.","designsetgo"),checked:e?.sticky_header?.hide_on_scroll_down||!1,onChange:e=>h("sticky_header","hide_on_scroll_down",e),__nextHasNoMarginBottom:!0}),(0,a.jsx)(o.ToggleControl,{label:(0,n.__)("Background Color on Scroll","designsetgo"),help:(0,n.__)("Apply background color when scrolled.","designsetgo"),checked:e?.sticky_header?.background_on_scroll||!1,onChange:e=>h("sticky_header","background_on_scroll",e),__nextHasNoMarginBottom:!0}),e?.sticky_header?.background_on_scroll&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{style:{marginBottom:"16px"},children:[(0,a.jsx)("div",{style:{display:"block",marginBottom:"8px",fontWeight:600},children:(0,n.__)("Background Color","designsetgo")}),(0,a.jsx)(o.ColorPicker,{color:e?.sticky_header?.background_scroll_color||"",onChangeComplete:e=>h("sticky_header","background_scroll_color",e.hex),enableAlpha:!1})]}),(0,a.jsx)(o.RangeControl,{label:(0,n.__)("Background Opacity (%)","designsetgo"),value:e?.sticky_header?.background_scroll_opacity||100,onChange:e=>h("sticky_header","background_scroll_opacity",e),min:0,max:100,step:5,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})]}),(0,a.jsx)("hr",{style:{margin:"24px 0"}}),(0,a.jsx)("h3",{children:(0,n.__)("Mobile Settings","designsetgo")}),(0,a.jsx)(o.ToggleControl,{label:(0,n.__)("Enable on Mobile","designsetgo"),help:(0,n.__)("Enable sticky header on mobile devices.","designsetgo"),checked:e?.sticky_header?.mobile_enabled||!1,onChange:e=>h("sticky_header","mobile_enabled",e),__nextHasNoMarginBottom:!0}),e?.sticky_header?.mobile_enabled&&(0,a.jsx)(o.RangeControl,{label:(0,n.__)("Mobile Breakpoint (px)","designsetgo"),help:(0,n.__)("Screen width below which mobile settings apply.","designsetgo"),value:e?.sticky_header?.mobile_breakpoint||768,onChange:e=>h("sticky_header","mobile_breakpoint",e),min:320,max:1024,step:1,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})]})]})]}),(0,a.jsxs)(o.Card,{children:[(0,a.jsx)(o.CardHeader,{children:(0,a.jsx)("h2",{children:(0,n.__)("Performance","designsetgo")})}),(0,a.jsxs)(o.CardBody,{children:[(0,a.jsx)(o.ToggleControl,{label:(0,n.__)("Conditional Asset Loading","designsetgo"),help:(0,n.__)("Load block assets only on pages that use them. Improves performance.","designsetgo"),checked:e?.performance?.conditional_loading||!1,onChange:e=>h("performance","conditional_loading",e),__nextHasNoMarginBottom:!0}),(0,a.jsx)(o.RangeControl,{label:(0,n.__)("Cache Duration (seconds)","designsetgo"),help:(0,n.__)("How long to cache block detection results.","designsetgo"),value:e?.performance?.cache_duration||3600,onChange:e=>h("performance","cache_duration",e),min:0,max:86400,step:300,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})]})]}),(0,a.jsxs)(o.Card,{children:[(0,a.jsx)(o.CardHeader,{children:(0,a.jsx)("h2",{children:(0,n.__)("Forms","designsetgo")})}),(0,a.jsxs)(o.CardBody,{children:[(0,a.jsx)(o.ToggleControl,{label:(0,n.__)("Enable Honeypot","designsetgo"),help:(0,n.__)("Add a hidden field to detect spam bots.","designsetgo"),checked:e?.forms?.enable_honeypot||!1,onChange:e=>h("forms","enable_honeypot",e),__nextHasNoMarginBottom:!0}),(0,a.jsx)(o.ToggleControl,{label:(0,n.__)("Enable Rate Limiting","designsetgo"),help:(0,n.__)("Prevent spam by limiting submission frequency.","designsetgo"),checked:e?.forms?.enable_rate_limiting||!1,onChange:e=>h("forms","enable_rate_limiting",e),__nextHasNoMarginBottom:!0}),(0,a.jsx)(o.RangeControl,{label:(0,n.__)("Submission Retention (days)","designsetgo"),help:(0,n.__)("How long to keep form submissions. Set to 0 to keep forever.","designsetgo"),value:e?.forms?.retention_days||30,onChange:e=>h("forms","retention_days",e),min:0,max:365,step:1,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})]})]}),(0,a.jsxs)(o.Card,{children:[(0,a.jsx)(o.CardHeader,{children:(0,a.jsx)("h2",{children:(0,n.__)("Animations","designsetgo")})}),(0,a.jsxs)(o.CardBody,{children:[(0,a.jsx)(o.ToggleControl,{label:(0,n.__)("Enable Animations","designsetgo"),help:(0,n.__)("Enable block entrance/exit animations.","designsetgo"),checked:e?.animations?.enable_animations||!1,onChange:e=>h("animations","enable_animations",e),__nextHasNoMarginBottom:!0}),(0,a.jsx)(o.RangeControl,{label:(0,n.__)("Default Duration (ms)","designsetgo"),help:(0,n.__)("Default animation duration in milliseconds.","designsetgo"),value:e?.animations?.default_duration||600,onChange:e=>h("animations","default_duration",e),min:100,max:2e3,step:100,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,a.jsx)(o.SelectControl,{label:(0,n.__)("Default Easing","designsetgo"),help:(0,n.__)("Default animation timing function.","designsetgo"),value:e?.animations?.default_easing||"ease-in-out",options:[{label:"Ease",value:"ease"},{label:"Ease In",value:"ease-in"},{label:"Ease Out",value:"ease-out"},{label:"Ease In Out",value:"ease-in-out"},{label:"Linear",value:"linear"}],onChange:e=>h("animations","default_easing",e),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,a.jsx)(o.ToggleControl,{label:(0,n.__)("Respect Prefers Reduced Motion","designsetgo"),help:(0,n.__)("Disable animations for users who prefer reduced motion (accessibility).","designsetgo"),checked:e?.animations?.respect_prefers_reduced_motion||!1,onChange:e=>h("animations","respect_prefers_reduced_motion",e),__nextHasNoMarginBottom:!0})]})]}),(0,a.jsxs)(o.Card,{children:[(0,a.jsx)(o.CardHeader,{children:(0,a.jsx)("h2",{children:(0,n.__)("Security & Privacy","designsetgo")})}),(0,a.jsxs)(o.CardBody,{children:[(0,a.jsx)(o.ToggleControl,{label:(0,n.__)("Log IP Addresses","designsetgo"),help:(0,n.__)("Store IP addresses with form submissions.","designsetgo"),checked:e?.security?.log_ip_addresses||!1,onChange:e=>h("security","log_ip_addresses",e),__nextHasNoMarginBottom:!0}),(0,a.jsx)(o.ToggleControl,{label:(0,n.__)("Log User Agents","designsetgo"),help:(0,n.__)("Store browser user agent strings with form submissions.","designsetgo"),checked:e?.security?.log_user_agents||!1,onChange:e=>h("security","log_user_agents",e),__nextHasNoMarginBottom:!0}),(0,a.jsx)(o.ToggleControl,{label:(0,n.__)("Log Referrers","designsetgo"),help:(0,n.__)("Store referrer URLs with form submissions.","designsetgo"),checked:e?.security?.log_referrers||!1,onChange:e=>h("security","log_referrers",e),__nextHasNoMarginBottom:!0})]})]}),(0,a.jsx)("div",{className:"designsetgo-save-bar",children:(0,a.jsx)(o.Button,{variant:"primary",onClick:()=>{g(!0),_(null),i()({path:"/designsetgo/v1/settings",method:"POST",data:e}).then(()=>{_({status:"success",message:(0,n.__)("Settings saved successfully!","designsetgo")}),g(!1)}).catch(e=>{_({status:"error",message:e.message||(0,n.__)("Failed to save settings.","designsetgo")}),g(!1)})},isBusy:r,disabled:r,children:r?(0,n.__)("Saving…","designsetgo"):(0,n.__)("Save Changes","designsetgo")})})]})},g=()=>{const{currentPage:e}=window.designSetGoAdmin||{};let s;switch(e){case"blocks":s=d;break;case"settings":s=r;break;default:s=l}return(0,a.jsx)("div",{className:"designsetgo-admin-wrapper",children:(0,a.jsx)(s,{})})};document.addEventListener("DOMContentLoaded",()=>{const e=document.getElementById("designsetgo-admin-root");e&&(0,s.createRoot)(e).render((0,a.jsx)(g,{}))})})();
     1(()=>{"use strict";var e={n:s=>{var t=s&&s.__esModule?()=>s.default:()=>s;return e.d(t,{a:t}),t},d:(s,t)=>{for(var a in t)e.o(t,a)&&!e.o(s,a)&&Object.defineProperty(s,a,{enumerable:!0,get:t[a]})},o:(e,s)=>Object.prototype.hasOwnProperty.call(e,s)};const s=window.wp.element,t=window.wp.i18n,a=window.wp.components,n=window.wp.apiFetch;var i=e.n(n);const o=(0,s.forwardRef)(({icon:e,size:t=24,...a},n)=>(0,s.cloneElement)(e,{width:t,height:t,...a,ref:n})),l=window.wp.primitives,d=window.ReactJSXRuntime,g=(l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.Circle,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,(0,d.jsx)(l.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)(l.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})})),h=(l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,(0,d.jsx)(l.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)(l.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})})),r=(l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.Path,l.Circle,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.G,l.Path,l.Path,l.SVG,l.G,l.Path,l.Path,l.SVG,l.G,l.Path,l.Path,l.SVG,l.G,l.Path,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,(0,d.jsx)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(l.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})})),c=(l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,(0,d.jsx)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(l.Path,{d:"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})})),_=(l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.Path,l.SVG,l.Path,l.Path,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,(0,d.jsx)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(l.Path,{d:"M10.5 4v4h3V4H15v4h1.5a1 1 0 011 1v4l-3 4v2a1 1 0 01-1 1h-3a1 1 0 01-1-1v-2l-3-4V9a1 1 0 011-1H9V4h1.5zm.5 12.5v2h2v-2l3-4v-3H8v3l3 4z"})})),S=(l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.Path,l.SVG,l.Path,l.Path,l.Path,l.SVG,l.Path,l.Path,l.SVG,l.Path,l.Path,l.SVG,l.Path,l.Path,l.SVG,l.Path,l.Path,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,()=>{const[e,n]=(0,s.useState)(null),[l,g]=(0,s.useState)([]),[h,S]=(0,s.useState)([]),[m,P]=(0,s.useState)(!0);if((0,s.useEffect)(()=>{Promise.all([i()({path:"/designsetgo/v1/stats"}),i()({path:"/designsetgo/v1/blocks"}),i()({path:"/designsetgo/v1/extensions"})]).then(([e,s,t])=>{n(e),g(s),S(t),P(!1)}).catch(()=>{P(!1)})},[]),m)return(0,d.jsx)("div",{className:"designsetgo-admin-loading",children:(0,d.jsx)(a.Spinner,{})});const x=l.reduce((e,s)=>{const t=s.category||"other";return e[t]=(e[t]||0)+1,e},{});return(0,d.jsxs)("div",{className:"designsetgo-dashboard",children:[(0,d.jsx)("div",{className:"designsetgo-dashboard__header",children:(0,d.jsxs)("div",{className:"designsetgo-dashboard__branding",children:[(0,d.jsx)("img",{src:window.designSetGoAdmin?.logoUrl,alt:"DesignSetGo",className:"designsetgo-logo"}),(0,d.jsx)("p",{className:"description",children:(0,t.__)("Manage your DesignSetGo blocks, extensions, and settings.","designsetgo")})]})}),(0,d.jsxs)("div",{className:"designsetgo-dashboard__stats",children:[(0,d.jsxs)("div",{className:"designsetgo-stat-card",children:[(0,d.jsx)("div",{className:"designsetgo-stat-card__icon designsetgo-stat-card__icon--blocks",children:(0,d.jsx)(o,{icon:c})}),(0,d.jsxs)("div",{className:"designsetgo-stat-card__content",children:[(0,d.jsx)("div",{className:"designsetgo-stat-card__value",children:e?.total_blocks||l.length||0}),(0,d.jsx)("div",{className:"designsetgo-stat-card__label",children:(0,t.__)("Blocks","designsetgo")})]})]}),(0,d.jsxs)("div",{className:"designsetgo-stat-card",children:[(0,d.jsx)("div",{className:"designsetgo-stat-card__icon designsetgo-stat-card__icon--extensions",children:(0,d.jsx)(o,{icon:_})}),(0,d.jsxs)("div",{className:"designsetgo-stat-card__content",children:[(0,d.jsx)("div",{className:"designsetgo-stat-card__value",children:h.length||0}),(0,d.jsx)("div",{className:"designsetgo-stat-card__label",children:(0,t.__)("Extensions","designsetgo")})]})]}),(0,d.jsxs)("div",{className:"designsetgo-stat-card",children:[(0,d.jsx)("div",{className:"designsetgo-stat-card__icon designsetgo-stat-card__icon--forms",children:(0,d.jsx)(o,{icon:r})}),(0,d.jsxs)("div",{className:"designsetgo-stat-card__content",children:[(0,d.jsx)("div",{className:"designsetgo-stat-card__value",children:e?.form_submissions||0}),(0,d.jsx)("div",{className:"designsetgo-stat-card__label",children:(0,t.__)("Form Submissions","designsetgo")})]})]})]}),(0,d.jsx)("div",{className:"designsetgo-dashboard__overview",children:(0,d.jsxs)(a.Card,{children:[(0,d.jsx)(a.CardHeader,{children:(0,d.jsx)("h2",{children:(0,t.__)("Blocks & Extensions","designsetgo")})}),(0,d.jsxs)(a.CardBody,{children:[Object.keys(x).length>0&&(0,d.jsxs)("div",{className:"designsetgo-blocks-categories",children:[(0,d.jsx)("h3",{className:"designsetgo-section-heading",children:(0,t.__)("Blocks by Category","designsetgo")}),(0,d.jsx)("div",{className:"designsetgo-categories-grid",children:Object.entries(x).map(([e,s])=>(0,d.jsxs)("div",{className:"designsetgo-category-item",children:[(0,d.jsx)("span",{className:"designsetgo-category-name",children:e.replace(/-/g," ").replace(/\b\w/g,e=>e.toUpperCase())}),(0,d.jsx)("span",{className:"designsetgo-category-count",children:s})]},e))})]}),h.length>0&&(0,d.jsxs)("div",{className:"designsetgo-extensions-list",children:[(0,d.jsx)("h3",{className:"designsetgo-section-heading",children:(0,t.__)("Extensions","designsetgo")}),(0,d.jsx)("div",{className:"designsetgo-extension-pills",children:h.map(e=>(0,d.jsxs)("span",{className:"designsetgo-extension-pill "+(e.enabled?"is-enabled":"is-disabled"),children:[e.title,(0,d.jsx)("span",{className:"designsetgo-extension-status",children:e.enabled?(0,t.__)("Enabled","designsetgo"):(0,t.__)("Disabled","designsetgo")})]},e.name))})]})]})]})}),(0,d.jsx)("div",{className:"designsetgo-dashboard__quick-links",children:(0,d.jsxs)(a.Card,{children:[(0,d.jsx)(a.CardHeader,{children:(0,d.jsx)("h2",{children:(0,t.__)("Quick Links","designsetgo")})}),(0,d.jsx)(a.CardBody,{children:(0,d.jsxs)("div",{className:"designsetgo-quick-links-grid",children:[(0,d.jsxs)("a",{href:"?page=designsetgo-blocks",className:"designsetgo-quick-link",children:[(0,d.jsx)("span",{className:"dashicons dashicons-layout"}),(0,d.jsx)("h3",{children:(0,t.__)("Manage Blocks","designsetgo")}),(0,d.jsx)("p",{children:(0,t.__)("Enable or disable individual blocks and extensions","designsetgo")})]}),(0,d.jsxs)("a",{href:"?page=edit.php&post_type=dsg_form_submission",className:"designsetgo-quick-link",children:[(0,d.jsx)("span",{className:"dashicons dashicons-feedback"}),(0,d.jsx)("h3",{children:(0,t.__)("Form Submissions","designsetgo")}),(0,d.jsx)("p",{children:(0,t.__)("View and manage form submissions","designsetgo")})]}),(0,d.jsxs)("a",{href:"?page=designsetgo-settings",className:"designsetgo-quick-link",children:[(0,d.jsx)("span",{className:"dashicons dashicons-admin-settings"}),(0,d.jsx)("h3",{children:(0,t.__)("Settings","designsetgo")}),(0,d.jsx)("p",{children:(0,t.__)("Configure performance, forms, and security","designsetgo")})]}),(0,d.jsxs)("a",{href:`${window.designSetGoAdmin?.siteUrl}/wp-admin/site-editor.php`,className:"designsetgo-quick-link",children:[(0,d.jsx)("span",{className:"dashicons dashicons-admin-appearance"}),(0,d.jsx)("h3",{children:(0,t.__)("Global Styles","designsetgo")}),(0,d.jsx)("p",{children:(0,t.__)("Customize colors, typography, and spacing","designsetgo")})]})]})})]})})]})}),m=()=>{const[e,n]=(0,s.useState)({}),[o,l]=(0,s.useState)([]),[g,h]=(0,s.useState)(null),[r,c]=(0,s.useState)(!0),[_,S]=(0,s.useState)(!1),[m,P]=(0,s.useState)(null),[x,G]=(0,s.useState)("");(0,s.useEffect)(()=>{Promise.all([i()({path:"/designsetgo/v1/blocks"}),i()({path:"/designsetgo/v1/extensions"}),i()({path:"/designsetgo/v1/settings"})]).then(([e,s,t])=>{n(e),l(s),h(t),c(!1)}).catch(()=>{P({status:"error",message:(0,t.__)("Failed to load data.","designsetgo")}),c(!1)})},[]);const V=e=>!!g&&(0===g.enabled_blocks.length||g.enabled_blocks.includes(e)),u=()=>{const s=[];return Object.values(e).forEach(e=>{e.blocks.forEach(e=>{s.push(e.name)})}),s};return r?(0,d.jsx)("div",{className:"designsetgo-admin-loading",children:(0,d.jsx)(a.Spinner,{})}):(0,d.jsxs)("div",{className:"designsetgo-blocks-extensions",children:[(0,d.jsxs)("div",{className:"designsetgo-blocks-extensions__header",children:[(0,d.jsx)("h1",{children:(0,t.__)("Blocks & Extensions","designsetgo")}),(0,d.jsx)("p",{className:"description",children:(0,t.__)("Enable or disable blocks and extensions to customize your editing experience.","designsetgo")})]}),m&&(0,d.jsx)(a.Notice,{status:m.status,onRemove:()=>P(null),isDismissible:!0,children:m.message}),(0,d.jsx)(a.TabPanel,{className:"designsetgo-tabs",activeClass:"is-active",tabs:[{name:"blocks",title:(0,t.__)("Blocks","designsetgo")},{name:"extensions",title:(0,t.__)("Extensions","designsetgo")}],children:s=>(0,d.jsxs)("div",{className:"designsetgo-tab-content",children:["blocks"===s.name&&(0,d.jsxs)("div",{className:"designsetgo-blocks-list",children:[(0,d.jsx)("div",{className:"designsetgo-search-wrapper",children:(0,d.jsx)(a.SearchControl,{value:x,onChange:G,placeholder:(0,t.__)("Search blocks…","designsetgo")})}),Object.entries(e).map(([s,n])=>{const i=(o=n.blocks,x?o.filter(e=>e.title.toLowerCase().includes(x.toLowerCase())||e.description.toLowerCase().includes(x.toLowerCase())):o);var o;if(0===i.length)return null;const l=i.every(e=>V(e.name)),r=i.every(e=>!V(e.name));return(0,d.jsxs)(a.Card,{className:"designsetgo-category-card",children:[(0,d.jsx)(a.CardHeader,{children:(0,d.jsxs)("div",{className:"designsetgo-category-header",children:[(0,d.jsx)("h2",{children:n.label}),(0,d.jsxs)("div",{className:"designsetgo-category-actions",children:[(0,d.jsx)(a.Button,{variant:"secondary",size:"small",onClick:()=>(s=>{const t=0===g.enabled_blocks.length?u():[...g.enabled_blocks],a=e[s].blocks.map(e=>e.name),n=[...new Set([...t,...a])];h({...g,enabled_blocks:n})})(s),disabled:l,children:(0,t.__)("Enable All","designsetgo")}),(0,d.jsx)(a.Button,{variant:"secondary",size:"small",onClick:()=>(s=>{const t=0===g.enabled_blocks.length?u():[...g.enabled_blocks],a=e[s].blocks.map(e=>e.name),n=t.filter(e=>!a.includes(e));h({...g,enabled_blocks:n})})(s),disabled:r,children:(0,t.__)("Disable All","designsetgo")})]})]})}),(0,d.jsx)(a.CardBody,{children:(0,d.jsx)("div",{className:"designsetgo-blocks-grid",children:i.map(e=>(0,d.jsx)("div",{className:"designsetgo-block-item",children:(0,d.jsx)(a.CheckboxControl,{label:(0,d.jsxs)("span",{className:"designsetgo-block-label",children:[(0,d.jsx)("strong",{children:e.title}),"high"===e.performance&&(0,d.jsx)("span",{className:"designsetgo-badge designsetgo-badge--high",children:(0,t.__)("Heavy","designsetgo")})]}),help:e.description,checked:V(e.name),onChange:()=>(e=>{const s=0===g.enabled_blocks.length?u():[...g.enabled_blocks];if(s.includes(e)){const t=s.filter(s=>s!==e);h({...g,enabled_blocks:t})}else h({...g,enabled_blocks:[...s,e]})})(e.name)})},e.name))})})]},s)})]}),"extensions"===s.name&&(0,d.jsxs)(a.Card,{children:[(0,d.jsx)(a.CardHeader,{children:(0,d.jsx)("h2",{children:(0,t.__)("Extensions","designsetgo")})}),(0,d.jsxs)(a.CardBody,{children:[(0,d.jsx)("p",{className:"description",children:(0,t.__)("Extensions add functionality to all blocks. Disabling extensions will reduce editor complexity.","designsetgo")}),(0,d.jsx)("div",{className:"designsetgo-extensions-grid",children:o.map(e=>{return(0,d.jsx)("div",{className:"designsetgo-extension-item",children:(0,d.jsx)(a.CheckboxControl,{label:(0,d.jsx)("strong",{children:e.title}),help:e.description,checked:(s=e.name,!!g&&(0===g.enabled_extensions.length||g.enabled_extensions.includes(s))),onChange:()=>(e=>{const s=0===g.enabled_extensions.length?o.map(e=>e.name):[...g.enabled_extensions];if(s.includes(e)){const t=s.filter(s=>s!==e);h({...g,enabled_extensions:t})}else h({...g,enabled_extensions:[...s,e]})})(e.name)})},e.name);var s})})]})]})]})}),(0,d.jsx)("div",{className:"designsetgo-save-bar",children:(0,d.jsx)(a.Button,{variant:"primary",onClick:()=>{S(!0),P(null),i()({path:"/designsetgo/v1/settings",method:"POST",data:g}).then(()=>{P({status:"success",message:(0,t.__)("Settings saved successfully! Please refresh any open editor pages to see the changes.","designsetgo")}),S(!1)}).catch(e=>{P({status:"error",message:e.message||(0,t.__)("Failed to save settings.","designsetgo")}),S(!1)})},isBusy:_,disabled:_,children:_?(0,t.__)("Saving…","designsetgo"):(0,t.__)("Save Changes","designsetgo")})})]})},P=({settings:e,updateSetting:n})=>{const[i,l]=(0,s.useState)(!1),[r,c]=(0,s.useState)(!1);return(0,d.jsxs)(a.Card,{className:"designsetgo-settings-panel",children:[(0,d.jsx)(a.CardHeader,{children:(0,d.jsx)("h2",{children:(0,t.__)("Sticky Header","designsetgo")})}),(0,d.jsxs)(a.CardBody,{children:[(0,d.jsx)("p",{className:"designsetgo-panel-description",children:(0,t.__)("Enable sticky header functionality for blocks with position:sticky applied. These settings enhance the default WordPress sticky positioning with additional features.","designsetgo")}),(0,d.jsx)(a.ToggleControl,{label:(0,t.__)("Enable Sticky Header","designsetgo"),help:(0,t.__)("Enable enhanced sticky header functionality.","designsetgo"),checked:e?.sticky_header?.enable||!1,onChange:e=>n("sticky_header","enable",e),__nextHasNoMarginBottom:!0}),e?.sticky_header?.enable&&(0,d.jsxs)("div",{className:"designsetgo-settings-group",children:[(0,d.jsxs)("div",{className:"designsetgo-settings-grid",children:[(0,d.jsx)(a.RangeControl,{label:(0,t.__)("Scroll Threshold (px)","designsetgo"),help:(0,t.__)("Pixels to scroll before effects activate.","designsetgo"),value:e?.sticky_header?.scroll_threshold||50,onChange:e=>n("sticky_header","scroll_threshold",e),min:0,max:500,step:10,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,d.jsx)(a.RangeControl,{label:(0,t.__)("Transition Speed (ms)","designsetgo"),help:(0,t.__)("Animation speed for effects.","designsetgo"),value:e?.sticky_header?.transition_speed||300,onChange:e=>n("sticky_header","transition_speed",e),min:0,max:1e3,step:50,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})]}),(0,d.jsxs)("div",{className:"designsetgo-settings-grid",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)(a.ToggleControl,{label:(0,t.__)("Shadow on Scroll","designsetgo"),help:(0,t.__)("Add shadow when scrolled.","designsetgo"),checked:e?.sticky_header?.shadow_on_scroll||!1,onChange:e=>n("sticky_header","shadow_on_scroll",e),__nextHasNoMarginBottom:!0}),e?.sticky_header?.shadow_on_scroll&&(0,d.jsx)(a.SelectControl,{label:(0,t.__)("Shadow Size","designsetgo"),value:e?.sticky_header?.shadow_size||"medium",options:[{label:(0,t.__)("Small","designsetgo"),value:"small"},{label:(0,t.__)("Medium","designsetgo"),value:"medium"},{label:(0,t.__)("Large","designsetgo"),value:"large"}],onChange:e=>n("sticky_header","shadow_size",e),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)(a.ToggleControl,{label:(0,t.__)("Shrink on Scroll","designsetgo"),help:(0,t.__)("Reduce header height.","designsetgo"),checked:e?.sticky_header?.shrink_on_scroll||!1,onChange:e=>n("sticky_header","shrink_on_scroll",e),__nextHasNoMarginBottom:!0}),e?.sticky_header?.shrink_on_scroll&&(0,d.jsx)(a.RangeControl,{label:(0,t.__)("Shrink Amount (%)","designsetgo"),value:e?.sticky_header?.shrink_amount||20,onChange:e=>n("sticky_header","shrink_amount",e),min:5,max:50,step:5,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})]})]}),(0,d.jsx)(a.ToggleControl,{label:(0,t.__)("Hide Header on Scroll Down","designsetgo"),help:(0,t.__)("Hide header when scrolling down, show when scrolling up.","designsetgo"),checked:e?.sticky_header?.hide_on_scroll_down||!1,onChange:e=>n("sticky_header","hide_on_scroll_down",e),__nextHasNoMarginBottom:!0}),(0,d.jsx)(a.ToggleControl,{label:(0,t.__)("Background Color on Scroll","designsetgo"),help:(0,t.__)("Apply background color when scrolled.","designsetgo"),checked:e?.sticky_header?.background_on_scroll||!1,onChange:e=>n("sticky_header","background_on_scroll",e),__nextHasNoMarginBottom:!0}),e?.sticky_header?.background_on_scroll&&(0,d.jsxs)("div",{className:"designsetgo-color-control-compact",children:[(0,d.jsx)("div",{className:"components-base-control__label",children:(0,t.__)("Background Color","designsetgo")}),(0,d.jsx)(a.ColorPalette,{value:e?.sticky_header?.background_scroll_color||"",onChange:e=>n("sticky_header","background_scroll_color",e||""),colors:[{name:"White",color:"#ffffff"},{name:"Black",color:"#000000"},{name:"Gray",color:"#f0f0f0"},{name:"Blue",color:"#2271b1"},{name:"Dark",color:"#1e1e1e"}],clearable:!0}),(0,d.jsx)(a.RangeControl,{label:(0,t.__)("Background Opacity (%)","designsetgo"),value:e?.sticky_header?.background_scroll_opacity||100,onChange:e=>n("sticky_header","background_scroll_opacity",e),min:0,max:100,step:5,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})]}),(0,d.jsxs)("div",{className:"designsetgo-collapsible-section",children:[(0,d.jsxs)(a.Button,{variant:"link",onClick:()=>l(!i),className:"designsetgo-collapsible-toggle",children:[(0,d.jsx)(o,{icon:i?h:g}),(0,t.__)("Advanced Settings","designsetgo")]}),i&&(0,d.jsxs)("div",{className:"designsetgo-collapsible-content",children:[(0,d.jsx)(a.TextControl,{label:(0,t.__)("Custom CSS Selector","designsetgo"),help:(0,t.__)("Override the default selector if using a custom theme or page builder. Leave empty to use: .wp-block-template-part:has(.is-position-sticky)","designsetgo"),value:e?.sticky_header?.custom_selector||"",onChange:e=>n("sticky_header","custom_selector",e),placeholder:".wp-block-template-part:has(.is-position-sticky)",__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,d.jsx)(a.RangeControl,{label:(0,t.__)("Z-Index","designsetgo"),help:(0,t.__)("Stacking order of the sticky header.","designsetgo"),value:e?.sticky_header?.z_index||100,onChange:e=>n("sticky_header","z_index",e),min:1,max:9999,step:1,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})]})]}),(0,d.jsxs)("div",{className:"designsetgo-collapsible-section",children:[(0,d.jsxs)(a.Button,{variant:"link",onClick:()=>c(!r),className:"designsetgo-collapsible-toggle",children:[(0,d.jsx)(o,{icon:r?h:g}),(0,t.__)("Mobile Settings","designsetgo")]}),r&&(0,d.jsxs)("div",{className:"designsetgo-collapsible-content",children:[(0,d.jsx)(a.ToggleControl,{label:(0,t.__)("Enable on Mobile","designsetgo"),help:(0,t.__)("Enable sticky header on mobile devices.","designsetgo"),checked:e?.sticky_header?.mobile_enabled||!1,onChange:e=>n("sticky_header","mobile_enabled",e),__nextHasNoMarginBottom:!0}),e?.sticky_header?.mobile_enabled&&(0,d.jsx)(a.RangeControl,{label:(0,t.__)("Mobile Breakpoint (px)","designsetgo"),help:(0,t.__)("Screen width below which mobile settings apply.","designsetgo"),value:e?.sticky_header?.mobile_breakpoint||768,onChange:e=>n("sticky_header","mobile_breakpoint",e),min:320,max:1024,step:1,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})]})]})]})]})]})},x=({settings:e,updateSetting:s})=>(0,d.jsxs)(a.Card,{className:"designsetgo-settings-panel",children:[(0,d.jsx)(a.CardHeader,{children:(0,d.jsx)("h2",{children:(0,t.__)("Performance","designsetgo")})}),(0,d.jsxs)(a.CardBody,{children:[(0,d.jsx)("p",{className:"designsetgo-panel-description",children:(0,t.__)("Optimize asset loading and caching to improve site performance.","designsetgo")}),(0,d.jsx)(a.ToggleControl,{label:(0,t.__)("Conditional Asset Loading","designsetgo"),help:(0,t.__)("Load block assets only on pages that use them. Recommended for better performance.","designsetgo"),checked:e?.performance?.conditional_loading||!1,onChange:e=>s("performance","conditional_loading",e),__nextHasNoMarginBottom:!0}),(0,d.jsx)(a.RangeControl,{label:(0,t.__)("Cache Duration (seconds)","designsetgo"),help:(0,t.__)("How long to cache block detection results. Lower values use more resources but detect changes faster.","designsetgo"),value:e?.performance?.cache_duration||3600,onChange:e=>s("performance","cache_duration",e),min:0,max:86400,step:300,marks:[{value:0,label:(0,t.__)("Off","designsetgo")},{value:3600,label:(0,t.__)("1h","designsetgo")},{value:21600,label:(0,t.__)("6h","designsetgo")},{value:86400,label:(0,t.__)("24h","designsetgo")}],__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})]})]}),G=({settings:e,updateSetting:s})=>(0,d.jsxs)(a.Card,{className:"designsetgo-settings-panel",children:[(0,d.jsx)(a.CardHeader,{children:(0,d.jsx)("h2",{children:(0,t.__)("Forms","designsetgo")})}),(0,d.jsxs)(a.CardBody,{children:[(0,d.jsx)("p",{className:"designsetgo-panel-description",children:(0,t.__)("Configure security and data retention for form submissions.","designsetgo")}),(0,d.jsxs)("div",{className:"designsetgo-settings-section",children:[(0,d.jsx)("h3",{className:"designsetgo-section-heading",children:(0,t.__)("Security","designsetgo")}),(0,d.jsx)(a.ToggleControl,{label:(0,t.__)("Enable Honeypot","designsetgo"),help:(0,t.__)("Add a hidden field to detect spam bots. Recommended.","designsetgo"),checked:e?.forms?.enable_honeypot||!1,onChange:e=>s("forms","enable_honeypot",e),__nextHasNoMarginBottom:!0}),(0,d.jsx)(a.ToggleControl,{label:(0,t.__)("Enable Rate Limiting","designsetgo"),help:(0,t.__)("Prevent spam by limiting submission frequency from the same IP.","designsetgo"),checked:e?.forms?.enable_rate_limiting||!1,onChange:e=>s("forms","enable_rate_limiting",e),__nextHasNoMarginBottom:!0})]}),(0,d.jsxs)("div",{className:"designsetgo-settings-section",children:[(0,d.jsx)("h3",{className:"designsetgo-section-heading",children:(0,t.__)("Data Management","designsetgo")}),(0,d.jsx)(a.RangeControl,{label:(0,t.__)("Submission Retention (days)","designsetgo"),help:(0,t.__)("How long to keep form submissions. Set to 0 to keep forever.","designsetgo"),value:e?.forms?.retention_days||30,onChange:e=>s("forms","retention_days",e),min:0,max:365,step:1,marks:[{value:0,label:(0,t.__)("Forever","designsetgo")},{value:30,label:(0,t.__)("30d","designsetgo")},{value:90,label:(0,t.__)("90d","designsetgo")},{value:365,label:(0,t.__)("1yr","designsetgo")}],__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})]})]})]}),V=({settings:e,updateSetting:s})=>(0,d.jsxs)(a.Card,{className:"designsetgo-settings-panel",children:[(0,d.jsx)(a.CardHeader,{children:(0,d.jsx)("h2",{children:(0,t.__)("Animations","designsetgo")})}),(0,d.jsxs)(a.CardBody,{children:[(0,d.jsx)("p",{className:"designsetgo-panel-description",children:(0,t.__)("Configure default animation settings for block entrance and exit effects.","designsetgo")}),(0,d.jsx)(a.ToggleControl,{label:(0,t.__)("Enable Animations","designsetgo"),help:(0,t.__)("Enable block entrance/exit animations globally.","designsetgo"),checked:e?.animations?.enable_animations||!1,onChange:e=>s("animations","enable_animations",e),__nextHasNoMarginBottom:!0}),e?.animations?.enable_animations&&(0,d.jsxs)("div",{className:"designsetgo-settings-group",children:[(0,d.jsx)(a.RangeControl,{label:(0,t.__)("Default Duration (ms)","designsetgo"),help:(0,t.__)("Default animation duration in milliseconds.","designsetgo"),value:e?.animations?.default_duration||600,onChange:e=>s("animations","default_duration",e),min:100,max:2e3,step:100,marks:[{value:300,label:(0,t.__)("Fast","designsetgo")},{value:600,label:(0,t.__)("Normal","designsetgo")},{value:1e3,label:(0,t.__)("Slow","designsetgo")}],__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,d.jsx)(a.SelectControl,{label:(0,t.__)("Default Easing","designsetgo"),help:(0,t.__)("Default animation timing function.","designsetgo"),value:e?.animations?.default_easing||"ease-in-out",options:[{label:(0,t.__)("Ease","designsetgo"),value:"ease"},{label:(0,t.__)("Ease In","designsetgo"),value:"ease-in"},{label:(0,t.__)("Ease Out","designsetgo"),value:"ease-out"},{label:(0,t.__)("Ease In Out","designsetgo"),value:"ease-in-out"},{label:(0,t.__)("Linear","designsetgo"),value:"linear"}],onChange:e=>s("animations","default_easing",e),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,d.jsxs)("div",{className:"designsetgo-settings-section",children:[(0,d.jsx)("h3",{className:"designsetgo-section-heading",children:(0,t.__)("Accessibility","designsetgo")}),(0,d.jsx)(a.ToggleControl,{label:(0,t.__)("Respect Prefers Reduced Motion","designsetgo"),help:(0,t.__)("Disable animations for users who prefer reduced motion. Highly recommended for accessibility.","designsetgo"),checked:e?.animations?.respect_prefers_reduced_motion||!1,onChange:e=>s("animations","respect_prefers_reduced_motion",e),__nextHasNoMarginBottom:!0})]})]})]})]}),u=({settings:e,updateSetting:s})=>(0,d.jsxs)(a.Card,{className:"designsetgo-settings-panel",children:[(0,d.jsx)(a.CardHeader,{children:(0,d.jsx)("h2",{children:(0,t.__)("Security & Privacy","designsetgo")})}),(0,d.jsxs)(a.CardBody,{children:[(0,d.jsx)("p",{className:"designsetgo-panel-description",children:(0,t.__)("Control what data is logged with form submissions. Consider your privacy policy when enabling these options.","designsetgo")}),(0,d.jsx)(a.Notice,{status:"info",isDismissible:!1,children:(0,t.__)("These settings affect form submissions only. Consider privacy regulations (GDPR, CCPA) when collecting user data.","designsetgo")}),(0,d.jsx)(a.ToggleControl,{label:(0,t.__)("Log IP Addresses","designsetgo"),help:(0,t.__)("Store IP addresses with form submissions for spam detection.","designsetgo"),checked:e?.security?.log_ip_addresses||!1,onChange:e=>s("security","log_ip_addresses",e),__nextHasNoMarginBottom:!0}),(0,d.jsx)(a.ToggleControl,{label:(0,t.__)("Log User Agents","designsetgo"),help:(0,t.__)("Store browser user agent strings for analytics and troubleshooting.","designsetgo"),checked:e?.security?.log_user_agents||!1,onChange:e=>s("security","log_user_agents",e),__nextHasNoMarginBottom:!0}),(0,d.jsx)(a.ToggleControl,{label:(0,t.__)("Log Referrers","designsetgo"),help:(0,t.__)("Store referrer URLs to track where submissions originate.","designsetgo"),checked:e?.security?.log_referrers||!1,onChange:e=>s("security","log_referrers",e),__nextHasNoMarginBottom:!0})]})]}),p=({settings:e,updateSetting:s})=>(0,d.jsxs)(a.Card,{className:"designsetgo-settings-panel",children:[(0,d.jsx)(a.CardHeader,{children:(0,d.jsx)("h2",{children:(0,t.__)("Integrations","designsetgo")})}),(0,d.jsxs)(a.CardBody,{children:[(0,d.jsx)("p",{className:"designsetgo-panel-description",children:(0,t.__)("Configure third-party service API keys and credentials.","designsetgo")}),(0,d.jsxs)("div",{className:"designsetgo-settings-section",children:[(0,d.jsx)("h3",{className:"designsetgo-section-heading",children:(0,t.__)("Google Maps","designsetgo")}),(0,d.jsx)(a.TextControl,{label:(0,t.__)("Google Maps API Key","designsetgo"),help:(0,d.jsxs)(d.Fragment,{children:[(0,t.__)("Enter your Google Maps JavaScript API key.","designsetgo"),(0,d.jsx)(a.ExternalLink,{href:"https://console.cloud.google.com/apis/credentials",children:(0,t.__)("Get your API key from Google Cloud Console","designsetgo")})]}),type:"password",value:e?.integrations?.google_maps_api_key||"",onChange:e=>s("integrations","google_maps_api_key",e),placeholder:(0,t.__)("AIza…","designsetgo"),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,d.jsxs)("div",{className:"designsetgo-settings-note",children:[(0,d.jsx)("strong",{children:(0,t.__)("⚠️ Important Security Notice:","designsetgo")}),(0,d.jsx)("p",{children:(0,t.__)("Always configure HTTP referrer restrictions in the Google Cloud Console to prevent unauthorized use of your API key. This is critical for security and preventing unexpected charges.","designsetgo")})]})]})]})]}),b=()=>{const[e,n]=(0,s.useState)(null),[o,l]=(0,s.useState)(!0),[g,h]=(0,s.useState)(!1),[r,c]=(0,s.useState)(null);(0,s.useEffect)(()=>{i()({path:"/designsetgo/v1/settings"}).then(e=>{n(e),l(!1)}).catch(()=>{c({status:"error",message:(0,t.__)("Failed to load settings.","designsetgo")}),l(!1)})},[]),(0,s.useEffect)(()=>{if("success"===r?.status){const e=setTimeout(()=>{c(null)},3e3);return()=>clearTimeout(e)}},[r]);const _=(s,t,a)=>{n({...e,[s]:{...e[s],[t]:a}})};return o?(0,d.jsx)("div",{className:"designsetgo-admin-loading",children:(0,d.jsx)(a.Spinner,{})}):(0,d.jsxs)("div",{className:"designsetgo-settings",children:[(0,d.jsxs)("div",{className:"designsetgo-settings__header",children:[(0,d.jsx)("h1",{children:(0,t.__)("Settings","designsetgo")}),(0,d.jsx)("p",{className:"description",children:(0,t.__)("Configure performance, forms, animations, sticky header, and security options.","designsetgo")})]}),r&&(0,d.jsx)("div",{style:{position:"fixed",top:"32px",right:"20px",zIndex:1e5,maxWidth:"400px",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.15)"},children:(0,d.jsx)(a.Notice,{status:r.status,onRemove:()=>c(null),isDismissible:!0,children:r.message})}),(0,d.jsx)("div",{className:"designsetgo-settings-tabs",children:(0,d.jsx)(a.TabPanel,{className:"designsetgo-tab-panel",tabs:[{name:"features",title:(0,t.__)("Features","designsetgo"),className:"designsetgo-tab-features"},{name:"optimization",title:(0,t.__)("Optimization","designsetgo"),className:"designsetgo-tab-optimization"},{name:"integrations",title:(0,t.__)("Integrations","designsetgo"),className:"designsetgo-tab-integrations"}],children:s=>(0,d.jsxs)("div",{className:"designsetgo-tab-content",children:["features"===s.name&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(P,{settings:e,updateSetting:_}),(0,d.jsx)(G,{settings:e,updateSetting:_}),(0,d.jsx)(V,{settings:e,updateSetting:_})]}),"optimization"===s.name&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(x,{settings:e,updateSetting:_}),(0,d.jsx)(u,{settings:e,updateSetting:_})]}),"integrations"===s.name&&(0,d.jsx)(p,{settings:e,updateSetting:_})]})})}),(0,d.jsx)("div",{className:"designsetgo-save-bar",children:(0,d.jsx)(a.Button,{variant:"primary",onClick:()=>{h(!0),c(null),i()({path:"/designsetgo/v1/settings",method:"POST",data:e}).then(()=>{c({status:"success",message:(0,t.__)("Settings saved successfully!","designsetgo")}),h(!1)}).catch(e=>{c({status:"error",message:e.message||(0,t.__)("Failed to save settings.","designsetgo")}),h(!1)})},isBusy:g,disabled:g,children:g?(0,t.__)("Saving…","designsetgo"):(0,t.__)("Save Changes","designsetgo")})})]})},j=()=>{const{currentPage:e}=window.designSetGoAdmin||{};let s;switch(e){case"blocks":s=m;break;case"settings":s=b;break;default:s=S}return(0,d.jsx)("div",{className:"designsetgo-admin-wrapper",children:(0,d.jsx)(s,{})})};document.addEventListener("DOMContentLoaded",()=>{const e=document.getElementById("designsetgo-admin-root");e&&(0,s.createRoot)(e).render((0,d.jsx)(j,{}))})})();
  • designsetgo/tags/1.1.0/designsetgo.php

    r3396027 r3396076  
    44 * Plugin URI:        https://designsetgoblocks.com
    55 * Description:       Professional Gutenberg block library with 47 blocks plus 7 universal extensions - complete Form Builder, container system, interactive elements, and more. Built with WordPress standards for guaranteed editor/frontend parity.
    6  * Version:           1.0.1
     6 * Version:           1.1.0
    77 * Requires at least: 6.0
    88 * Requires PHP:      7.4
     
    2323}
    2424
    25 define( 'DESIGNSETGO_VERSION', '1.0.1' );
     25define( 'DESIGNSETGO_VERSION', '1.1.0' );
    2626define( 'DESIGNSETGO_FILE', __FILE__ );
    2727define( 'DESIGNSETGO_PATH', plugin_dir_path( __FILE__ ) );
  • designsetgo/tags/1.1.0/includes/admin/class-settings.php

    r3395924 r3396076  
    5858                'log_user_agents'  => true,
    5959                'log_referrers'    => false,
     60            ),
     61            'integrations'       => array(
     62                'google_maps_api_key' => '',
    6063            ),
    6164            'sticky_header'      => array(
     
    665668                'log_user_agents'  => isset( $settings['security']['log_user_agents'] ) ? (bool) $settings['security']['log_user_agents'] : true,
    666669                'log_referrers'    => isset( $settings['security']['log_referrers'] ) ? (bool) $settings['security']['log_referrers'] : false,
     670            );
     671        }
     672
     673        // Sanitize integrations settings.
     674        if ( isset( $settings['integrations'] ) && is_array( $settings['integrations'] ) ) {
     675            $sanitized['integrations'] = array(
     676                'google_maps_api_key' => isset( $settings['integrations']['google_maps_api_key'] ) ? sanitize_text_field( $settings['integrations']['google_maps_api_key'] ) : '',
    667677            );
    668678        }
  • designsetgo/tags/1.1.0/includes/class-plugin.php

    r3395924 r3396076  
    215215        // Add block category.
    216216        add_filter( 'block_categories_all', array( $this, 'register_block_category' ), 10, 2 );
     217
     218        // Inject API keys into Map block on render.
     219        add_filter( 'render_block', array( $this, 'inject_map_api_key' ), 10, 2 );
    217220    }
    218221
     
    250253                )
    251254            );
     255
     256            // Localize integrations settings (Google Maps API key, etc.).
     257            $integrations_settings = isset( $settings['integrations'] ) ? $settings['integrations'] : array();
     258            $integrations_defaults = isset( $defaults['integrations'] ) ? $defaults['integrations'] : array();
     259            $integrations_settings = wp_parse_args( $integrations_settings, $integrations_defaults );
     260
     261            wp_localize_script(
     262                'designsetgo-block-category-filter',
     263                'dsgoIntegrations',
     264                array(
     265                    'googleMapsApiKey' => ! empty( $integrations_settings['google_maps_api_key'] ) ? $integrations_settings['google_maps_api_key'] : '',
     266                )
     267            );
    252268        }
    253269    }
     
    269285        return $categories;
    270286    }
     287
     288    /**
     289     * Inject Google Maps API key into Map block on render.
     290     *
     291     * Security Note: Google Maps JavaScript API keys are designed to be public
     292     * (client-side). Security is enforced through:
     293     * 1. HTTP referrer restrictions (configured in Google Cloud Console)
     294     * 2. API quotas and billing limits
     295     * 3. Rate limiting
     296     *
     297     * This is the standard recommended approach per Google's documentation.
     298     * Users are warned to configure referrer restrictions in the settings panel.
     299     *
     300     * @param string $block_content Block HTML content.
     301     * @param array  $block         Block data including name and attributes.
     302     * @return string Modified block content.
     303     */
     304    public function inject_map_api_key( $block_content, $block ) {
     305        // Only process the Map block.
     306        if ( 'designsetgo/map' !== $block['blockName'] ) {
     307            return $block_content;
     308        }
     309
     310        // Get settings.
     311        $settings = \DesignSetGo\Admin\Settings::get_settings();
     312
     313        // Get Google Maps API key from settings.
     314        $api_key = isset( $settings['integrations']['google_maps_api_key'] )
     315            ? $settings['integrations']['google_maps_api_key']
     316            : '';
     317
     318        // If no API key or not using Google Maps, return unmodified content.
     319        if ( empty( $api_key ) ) {
     320            return $block_content;
     321        }
     322
     323        // Only inject if the block is using Google Maps provider.
     324        $provider = isset( $block['attrs']['dsgoProvider'] ) ? $block['attrs']['dsgoProvider'] : 'openstreetmap';
     325        if ( 'googlemaps' !== $provider ) {
     326            return $block_content;
     327        }
     328
     329        // Inject API key as a data attribute.
     330        // Find the opening div tag with class dsgo-map.
     331        $pattern     = '/(<div[^>]*class="[^"]*dsgo-map[^"]*"[^>]*)/';
     332        $replacement = '$1 data-dsgo-api-key="' . esc_attr( $api_key ) . '"';
     333
     334        return preg_replace( $pattern, $replacement, $block_content, 1 );
     335    }
    271336}
  • designsetgo/tags/1.1.0/readme.txt

    r3395943 r3396076  
    66Tested up to: 6.8
    77Requires PHP: 7.4
    8 Stable tag: 1.0.1
     8Stable tag: 1.1.0
    99License: GPLv2 or later
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
    1111
    12 Professional WordPress blocks without page builder bloat. 47 blocks + 7 universal extensions that enhance ANY block.
     12Professional WordPress blocks without page builder bloat. 49 blocks + 7 universal extensions that enhance ANY block.
    1313
    1414== Description ==
     
    2121
    2222✓ **Works Like WordPress** - If you know blocks, you know DesignSetGo. No separate interface, no learning curve.
    23 ✓ **47 Blocks, One Plugin** - Replaces multiple plugins: forms, sliders, tabs, accordions, counters, and more.
     23✓ **49 Blocks, One Plugin** - Replaces multiple plugins: forms, sliders, tabs, accordions, counters, cards, maps, and more.
    2424✓ **7 Universal Extensions** - Add animations, responsive visibility, sticky headers, and custom CSS to ANY WordPress block (including core blocks).
    2525✓ **Performance First** - Lightweight code, no jQuery, optimized bundles. Your site stays fast.
     
    3838Tabs, accordions, flip cards, sliders, scroll effects, counters, progress bars, and revealing content. All with smooth animations and mobile-responsive behavior.
    3939
    40 **Visual Components (13 blocks)**
    41 Icons (500+), icon buttons, icon lists, pills/badges, dividers (8 styles), countdown timers, and organic blob shapes for modern designs.
     40**Visual Components (15 blocks)**
     41Icons (500+), icon buttons, icon lists, pills/badges, dividers (8 styles), countdown timers, organic blob shapes, content cards with multiple layout presets, and interactive maps with Google Maps and OpenStreetMap support.
    4242
    4343**Universal Extensions (7 extensions)**
     
    139139== Changelog ==
    140140
     141= 1.1.0 - 2025-11-14 =
     142**New Blocks:**
     143* New: Card block with multiple layout presets (horizontal, vertical, overlay, compact, featured)
     144* New: Map block with Google Maps and OpenStreetMap support, privacy mode, and customizable markers
     145
     146**Admin Interface Overhaul:**
     147* New: Completely redesigned admin dashboard with stat cards showing blocks, extensions, and form submissions
     148* New: Enhanced dashboard displays blocks organized by category and extension status pills
     149* New: Tabbed settings interface organized into Features, Optimization, and Integrations tabs
     150* New: Google Maps API key management in Settings > Integrations with security guidance
     151* Enhancement: Two-column grid layouts for improved settings panel space efficiency
     152* Enhancement: Gradient icon stat cards with hover effects for better visual hierarchy
     153* Enhancement: Collapsible sections for advanced settings to reduce vertical scroll
     154
     155**Translations:**
     156* Enhancement: Added translation support for 9 languages (Spanish, French, German, Italian, Portuguese, Dutch, Russian, Chinese, Japanese)
     157* Enhancement: Updated POT file with 100% translation coverage for all admin strings
     158
     159**Security & Bug Fixes:**
     160* Security: Fixed js-yaml prototype pollution vulnerability (CVE-2023-2251)
     161* Fix: Added missing ToggleControl import to Card block editor component
     162* Fix: Google Maps API key now persists correctly after save/reload
     163* Fix: API key properly exposed to frontend via data attributes with secure referrer-based protection
     164
    141165= 1.0.1 - 2025-11-14 =
    142166* Docs: Streamlined readme.txt with JTBD-focused messaging for better scannability
  • designsetgo/trunk/build/admin-rtl.css

    r3395924 r3396076  
    1 .designsetgo-admin-wrapper{margin:20px 0;max-width:1200px}.designsetgo-admin-loading{align-items:center;display:flex;justify-content:center;min-height:400px}.designsetgo-dashboard__header{margin-bottom:32px}.designsetgo-dashboard__branding{align-items:center;display:flex;flex-direction:column;gap:16px;text-align:center}.designsetgo-dashboard__branding h1{margin:0}.designsetgo-dashboard__branding .description{font-size:14px;margin:0}.designsetgo-dashboard__info,.designsetgo-dashboard__quick-links,.designsetgo-dashboard__stats{margin-bottom:24px}.designsetgo-logo{height:auto;-o-object-fit:contain;object-fit:contain;width:250px}.designsetgo-stats-grid{display:grid;gap:24px;grid-template-columns:repeat(auto-fit,minmax(200px,1fr))}.designsetgo-stat{background:#f6f7f7;border-radius:4px;padding:16px;text-align:center}.designsetgo-stat__value{color:#1e1e1e;font-size:32px;font-weight:700;margin-bottom:8px}.designsetgo-stat__label{color:#757575;font-size:14px}.designsetgo-quick-links-grid{display:grid;gap:16px;grid-template-columns:repeat(auto-fill,minmax(250px,1fr))}.designsetgo-quick-link{background:#f6f7f7;border-radius:4px;display:block;padding:20px;text-decoration:none;transition:all .2s ease}.designsetgo-quick-link:hover{background:#e9ecef;box-shadow:0 2px 8px rgba(0,0,0,.1);transform:translateY(-2px)}.designsetgo-quick-link .dashicons{color:#2271b1;font-size:32px;height:32px;margin-bottom:12px;width:32px}.designsetgo-quick-link h3{color:#1e1e1e;font-size:16px;margin:0 0 8px}.designsetgo-quick-link p{color:#757575;font-size:14px;margin:0}.designsetgo-blocks-extensions__header{margin-bottom:24px}.designsetgo-blocks-extensions__header h1{margin:0 0 8px}.designsetgo-blocks-extensions__header .description{font-size:14px;margin:0}.designsetgo-tabs .components-tab-panel__tabs{border-bottom:1px solid #dcdcde;margin-bottom:24px}.designsetgo-tabs button.is-active{box-shadow:inset 0 0 0 1.5px #2271b1,inset 0 -4px 0 0 #2271b1}.designsetgo-search-wrapper{margin-bottom:24px}.designsetgo-search-wrapper .components-search-control{max-width:400px}.designsetgo-category-card{margin-bottom:24px}.designsetgo-category-card .components-card__header{padding:16px 24px}.designsetgo-category-header{align-items:center;display:flex;justify-content:space-between;width:100%}.designsetgo-category-header h2{font-size:18px;margin:0}.designsetgo-category-actions{display:flex;gap:8px}.designsetgo-blocks-grid,.designsetgo-extensions-grid{display:grid;gap:16px;grid-template-columns:repeat(auto-fill,minmax(300px,1fr))}.designsetgo-block-item,.designsetgo-extension-item{background:#f6f7f7;border-radius:4px;padding:12px}.designsetgo-block-item .components-base-control,.designsetgo-extension-item .components-base-control{margin-bottom:0}.designsetgo-block-item .components-checkbox-control__help,.designsetgo-extension-item .components-checkbox-control__help{font-size:13px;margin-top:4px}.designsetgo-block-label{align-items:center;display:flex;gap:8px}.designsetgo-badge{border-radius:3px;display:inline-block;font-size:11px;font-weight:600;padding:2px 8px;text-transform:uppercase}.designsetgo-badge--high{background:#f0b429;color:#1e1e1e}.designsetgo-settings__header{margin-bottom:24px}.designsetgo-settings__header h1{margin:0 0 8px}.designsetgo-settings__header .description{font-size:14px;margin:0}.designsetgo-settings .components-card{margin-bottom:24px}.designsetgo-settings .components-card:last-of-type{margin-bottom:0}.designsetgo-settings .components-card__header{padding:16px 24px}.designsetgo-settings .components-card__header h2{font-size:18px;margin:0}.designsetgo-settings .components-card__body .components-base-control,.designsetgo-settings .components-card__body .components-range-control,.designsetgo-settings .components-card__body .components-select-control,.designsetgo-settings .components-card__body .components-toggle-control{margin-bottom:24px}.designsetgo-settings .components-card__body .components-base-control:last-child,.designsetgo-settings .components-card__body .components-range-control:last-child,.designsetgo-settings .components-card__body .components-select-control:last-child,.designsetgo-settings .components-card__body .components-toggle-control:last-child{margin-bottom:0}.designsetgo-save-bar{background:#fff;border-top:1px solid #dcdcde;bottom:0;box-shadow:0 -2px 8px rgba(0,0,0,.1);margin:24px -20px -10px;padding:16px 24px;position:sticky;z-index:10}.designsetgo-save-bar .components-button{min-width:120px}.components-notice{margin:0 0 24px}@media(max-width:782px){.designsetgo-blocks-grid,.designsetgo-extensions-grid,.designsetgo-quick-links-grid{grid-template-columns:1fr}.designsetgo-category-header{align-items:flex-start;flex-direction:column;gap:12px}.designsetgo-save-bar{margin-right:0;margin-left:0}}
     1.designsetgo-admin-wrapper{margin:20px 0;max-width:1200px}.designsetgo-admin-loading{align-items:center;display:flex;justify-content:center;min-height:400px}.designsetgo-dashboard__header{margin-bottom:32px}.designsetgo-dashboard__branding{align-items:center;display:flex;flex-direction:column;gap:16px;text-align:center}.designsetgo-dashboard__branding h1{margin:0}.designsetgo-dashboard__branding .description{font-size:14px;margin:0}.designsetgo-dashboard__stats{display:grid;gap:20px;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));margin-bottom:32px}.designsetgo-dashboard__info,.designsetgo-dashboard__overview,.designsetgo-dashboard__quick-links{margin-bottom:24px}.designsetgo-logo{height:auto;-o-object-fit:contain;object-fit:contain;width:250px}.designsetgo-stats-grid{display:grid;gap:24px;grid-template-columns:repeat(auto-fit,minmax(200px,1fr))}.designsetgo-stat{background:#f6f7f7;border-radius:4px;padding:16px;text-align:center}.designsetgo-stat__value{color:#1e1e1e;font-size:32px;font-weight:700;margin-bottom:8px}.designsetgo-stat__label{color:#757575;font-size:14px}.designsetgo-quick-links-grid{display:grid;gap:16px;grid-template-columns:repeat(auto-fill,minmax(250px,1fr))}.designsetgo-quick-link{background:#f6f7f7;border-radius:4px;display:block;padding:20px;text-decoration:none;transition:all .2s ease}.designsetgo-quick-link:hover{background:#e9ecef;box-shadow:0 2px 8px rgba(0,0,0,.1);transform:translateY(-2px)}.designsetgo-quick-link .dashicons{color:#2271b1;font-size:32px;height:32px;margin-bottom:12px;width:32px}.designsetgo-quick-link h3{color:#1e1e1e;font-size:16px;margin:0 0 8px}.designsetgo-quick-link p{color:#757575;font-size:14px;margin:0}.designsetgo-blocks-extensions__header{margin-bottom:24px}.designsetgo-blocks-extensions__header h1{margin:0 0 8px}.designsetgo-blocks-extensions__header .description{font-size:14px;margin:0}.designsetgo-tabs .components-tab-panel__tabs{border-bottom:1px solid #dcdcde;margin-bottom:24px}.designsetgo-tabs button.is-active{box-shadow:inset 0 0 0 1.5px #2271b1,inset 0 -4px 0 0 #2271b1}.designsetgo-search-wrapper{margin-bottom:24px}.designsetgo-search-wrapper .components-search-control{max-width:400px}.designsetgo-category-card{margin-bottom:24px}.designsetgo-category-card .components-card__header{padding:16px 24px}.designsetgo-category-header{align-items:center;display:flex;justify-content:space-between;width:100%}.designsetgo-category-header h2{font-size:18px;margin:0}.designsetgo-category-actions{display:flex;gap:8px}.designsetgo-blocks-grid,.designsetgo-extensions-grid{display:grid;gap:16px;grid-template-columns:repeat(auto-fill,minmax(300px,1fr))}.designsetgo-block-item,.designsetgo-extension-item{background:#f6f7f7;border-radius:4px;padding:12px}.designsetgo-block-item .components-base-control,.designsetgo-extension-item .components-base-control{margin-bottom:0}.designsetgo-block-item .components-checkbox-control__help,.designsetgo-extension-item .components-checkbox-control__help{font-size:13px;margin-top:4px}.designsetgo-block-label{align-items:center;display:flex;gap:8px}.designsetgo-badge{border-radius:3px;display:inline-block;font-size:11px;font-weight:600;padding:2px 8px;text-transform:uppercase}.designsetgo-badge--high{background:#f0b429;color:#1e1e1e}.designsetgo-settings__header{margin-bottom:24px}.designsetgo-settings__header h1{margin:0 0 8px}.designsetgo-settings__header .description{font-size:14px;margin:0}.designsetgo-settings .components-card{margin-bottom:24px}.designsetgo-settings .components-card:last-of-type{margin-bottom:0}.designsetgo-settings .components-card__header{padding:16px 24px}.designsetgo-settings .components-card__header h2{font-size:18px;margin:0}.designsetgo-settings .components-card__body .components-base-control,.designsetgo-settings .components-card__body .components-range-control,.designsetgo-settings .components-card__body .components-select-control,.designsetgo-settings .components-card__body .components-toggle-control{margin-bottom:24px}.designsetgo-settings .components-card__body .components-base-control:last-child,.designsetgo-settings .components-card__body .components-range-control:last-child,.designsetgo-settings .components-card__body .components-select-control:last-child,.designsetgo-settings .components-card__body .components-toggle-control:last-child{margin-bottom:0}.designsetgo-save-bar{background:#fff;border-top:1px solid #dcdcde;bottom:0;box-shadow:0 -2px 8px rgba(0,0,0,.1);margin:24px -20px -10px;padding:16px 24px;position:sticky;z-index:10}.designsetgo-save-bar .components-button{min-width:120px}.components-notice{margin:0 0 24px}.designsetgo-stat-card{align-items:center;background:linear-gradient(-135deg,#f6f7f7,#fff);border-radius:8px;box-shadow:0 2px 4px rgba(0,0,0,.05);display:flex;gap:16px;padding:20px;transition:all .3s ease}.designsetgo-stat-card:hover{box-shadow:0 4px 12px rgba(0,0,0,.1);transform:translateY(-2px)}.designsetgo-stat-card__icon{align-items:center;border-radius:50%;display:flex;flex-shrink:0;height:48px;justify-content:center;width:48px}.designsetgo-stat-card__icon svg{fill:#fff;height:24px;width:24px}.designsetgo-stat-card__icon--blocks{background:linear-gradient(-135deg,#2271b1,#135e96)}.designsetgo-stat-card__icon--extensions{background:linear-gradient(-135deg,#00a32a,#008a20)}.designsetgo-stat-card__icon--forms{background:linear-gradient(-135deg,#f0b429,#dba617)}.designsetgo-stat-card__content{flex:1}.designsetgo-stat-card__value{color:#1e1e1e;font-size:28px;font-weight:700;line-height:1.2;margin:0}.designsetgo-stat-card__label{color:#757575;font-size:13px;margin:4px 0 0}.designsetgo-blocks-categories{margin-bottom:24px}.designsetgo-section-heading{color:#1e1e1e;font-size:14px;font-weight:600;letter-spacing:.5px;margin:0 0 12px;text-transform:uppercase}.designsetgo-categories-grid{display:grid;gap:12px;grid-template-columns:repeat(auto-fill,minmax(140px,1fr))}.designsetgo-category-item{align-items:center;background:#f6f7f7;border-radius:6px;display:flex;font-size:13px;justify-content:space-between;padding:10px 14px}.designsetgo-category-name{color:#1e1e1e;font-weight:500}.designsetgo-category-count{align-items:center;background:#2271b1;border-radius:12px;color:#fff;display:inline-flex;font-size:12px;font-weight:600;height:24px;justify-content:center;min-width:24px;padding:0 8px}.designsetgo-extensions-list{border-top:1px solid #dcdcde;margin-top:24px;padding-top:24px}.designsetgo-extension-pills{display:flex;flex-wrap:wrap;gap:10px}.designsetgo-extension-pill{align-items:center;border-radius:20px;display:inline-flex;font-size:13px;font-weight:500;gap:8px;padding:8px 14px;transition:all .2s ease}.designsetgo-extension-pill.is-enabled{background:#d5f2e3;border:1px solid #00a32a;color:#00693e}.designsetgo-extension-pill.is-enabled .designsetgo-extension-status{background:#00a32a;color:#fff}.designsetgo-extension-pill.is-disabled{background:#f6f7f7;border:1px solid #dcdcde;color:#757575}.designsetgo-extension-pill.is-disabled .designsetgo-extension-status{background:#757575;color:#fff}.designsetgo-extension-status{align-items:center;border-radius:10px;display:inline-flex;font-size:10px;font-weight:600;justify-content:center;letter-spacing:.5px;padding:2px 8px;text-transform:uppercase}.designsetgo-settings-tabs{margin-bottom:24px}.designsetgo-settings-tabs .components-tab-panel__tabs{border-bottom:2px solid #dcdcde;display:flex;gap:8px;margin-bottom:24px}.designsetgo-settings-tabs .components-tab-panel__tabs-item{background:transparent;border:none;color:#757575;font-weight:500;padding:12px 20px;position:relative;transition:all .2s ease}.designsetgo-settings-tabs .components-tab-panel__tabs-item:hover{color:#1e1e1e}.designsetgo-settings-tabs .components-tab-panel__tabs-item.is-active{box-shadow:inset 0 -2px 0 0 #2271b1;color:#2271b1}.designsetgo-tab-content .components-card{margin-bottom:24px}.designsetgo-tab-content .components-card:last-child{margin-bottom:0}.designsetgo-settings-panel .components-card__header{background:linear-gradient(-135deg,#f6f7f7,#fff)}.designsetgo-settings-panel .components-card__body{padding:24px}.designsetgo-panel-description{color:#757575;font-size:14px;line-height:1.6;margin:0 0 20px}.designsetgo-settings-grid{display:grid;gap:20px;grid-template-columns:repeat(2,1fr);margin-bottom:20px}.designsetgo-settings-grid.designsetgo-settings-grid--single{grid-template-columns:1fr}.designsetgo-collapsible-section{border-top:1px solid #dcdcde;margin-top:24px;padding-top:20px}.designsetgo-collapsible-header{align-items:center;background:#f6f7f7;border-radius:6px;cursor:pointer;display:flex;justify-content:space-between;margin-bottom:0;padding:12px 16px;transition:background .2s ease}.designsetgo-collapsible-header:hover{background:#e9ecef}.designsetgo-collapsible-header h3{color:#1e1e1e;font-size:15px;font-weight:600;margin:0}.designsetgo-collapsible-header .components-button{min-width:auto;padding:4px}.designsetgo-collapsible-content{margin-top:16px;padding-top:4px}.designsetgo-color-control-compact{margin-bottom:20px}.designsetgo-color-control-compact label{display:block;font-size:13px;font-weight:600;margin-bottom:8px}.designsetgo-color-control-compact .components-color-palette{margin-top:8px}.designsetgo-settings-note{background:#fff3cd;border-right:4px solid #f0b429;border-radius:4px;margin-top:16px;padding:12px}.designsetgo-settings-note strong{color:#1e1e1e;display:block;margin-bottom:8px}.designsetgo-settings-note p{color:#666;font-size:13px;line-height:1.6;margin:0}.designsetgo-settings-section{border-top:1px solid #f0f0f1;margin-top:24px;padding-top:20px}.designsetgo-settings-section:first-child{border-top:none;margin-top:0;padding-top:0}@media(max-width:782px){.designsetgo-blocks-grid,.designsetgo-extensions-grid,.designsetgo-quick-links-grid{grid-template-columns:1fr}.designsetgo-category-header{align-items:flex-start;flex-direction:column;gap:12px}.designsetgo-save-bar{margin-right:0;margin-left:0}.designsetgo-settings-grid{grid-template-columns:1fr}.designsetgo-stat-card{flex-direction:column;text-align:center}.designsetgo-categories-grid{grid-template-columns:repeat(auto-fill,minmax(120px,1fr))}}
  • designsetgo/trunk/build/admin.asset.php

    r3395924 r3396076  
    1 <?php return array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => '81b98e033bc18baaa511');
     1<?php return array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => 'd8ca567e891277fc7f59');
  • designsetgo/trunk/build/admin.css

    r3395924 r3396076  
    1 .designsetgo-admin-wrapper{margin:20px 0;max-width:1200px}.designsetgo-admin-loading{align-items:center;display:flex;justify-content:center;min-height:400px}.designsetgo-dashboard__header{margin-bottom:32px}.designsetgo-dashboard__branding{align-items:center;display:flex;flex-direction:column;gap:16px;text-align:center}.designsetgo-dashboard__branding h1{margin:0}.designsetgo-dashboard__branding .description{font-size:14px;margin:0}.designsetgo-dashboard__info,.designsetgo-dashboard__quick-links,.designsetgo-dashboard__stats{margin-bottom:24px}.designsetgo-logo{height:auto;-o-object-fit:contain;object-fit:contain;width:250px}.designsetgo-stats-grid{display:grid;gap:24px;grid-template-columns:repeat(auto-fit,minmax(200px,1fr))}.designsetgo-stat{background:#f6f7f7;border-radius:4px;padding:16px;text-align:center}.designsetgo-stat__value{color:#1e1e1e;font-size:32px;font-weight:700;margin-bottom:8px}.designsetgo-stat__label{color:#757575;font-size:14px}.designsetgo-quick-links-grid{display:grid;gap:16px;grid-template-columns:repeat(auto-fill,minmax(250px,1fr))}.designsetgo-quick-link{background:#f6f7f7;border-radius:4px;display:block;padding:20px;text-decoration:none;transition:all .2s ease}.designsetgo-quick-link:hover{background:#e9ecef;box-shadow:0 2px 8px rgba(0,0,0,.1);transform:translateY(-2px)}.designsetgo-quick-link .dashicons{color:#2271b1;font-size:32px;height:32px;margin-bottom:12px;width:32px}.designsetgo-quick-link h3{color:#1e1e1e;font-size:16px;margin:0 0 8px}.designsetgo-quick-link p{color:#757575;font-size:14px;margin:0}.designsetgo-blocks-extensions__header{margin-bottom:24px}.designsetgo-blocks-extensions__header h1{margin:0 0 8px}.designsetgo-blocks-extensions__header .description{font-size:14px;margin:0}.designsetgo-tabs .components-tab-panel__tabs{border-bottom:1px solid #dcdcde;margin-bottom:24px}.designsetgo-tabs button.is-active{box-shadow:inset 0 0 0 1.5px #2271b1,inset 0 -4px 0 0 #2271b1}.designsetgo-search-wrapper{margin-bottom:24px}.designsetgo-search-wrapper .components-search-control{max-width:400px}.designsetgo-category-card{margin-bottom:24px}.designsetgo-category-card .components-card__header{padding:16px 24px}.designsetgo-category-header{align-items:center;display:flex;justify-content:space-between;width:100%}.designsetgo-category-header h2{font-size:18px;margin:0}.designsetgo-category-actions{display:flex;gap:8px}.designsetgo-blocks-grid,.designsetgo-extensions-grid{display:grid;gap:16px;grid-template-columns:repeat(auto-fill,minmax(300px,1fr))}.designsetgo-block-item,.designsetgo-extension-item{background:#f6f7f7;border-radius:4px;padding:12px}.designsetgo-block-item .components-base-control,.designsetgo-extension-item .components-base-control{margin-bottom:0}.designsetgo-block-item .components-checkbox-control__help,.designsetgo-extension-item .components-checkbox-control__help{font-size:13px;margin-top:4px}.designsetgo-block-label{align-items:center;display:flex;gap:8px}.designsetgo-badge{border-radius:3px;display:inline-block;font-size:11px;font-weight:600;padding:2px 8px;text-transform:uppercase}.designsetgo-badge--high{background:#f0b429;color:#1e1e1e}.designsetgo-settings__header{margin-bottom:24px}.designsetgo-settings__header h1{margin:0 0 8px}.designsetgo-settings__header .description{font-size:14px;margin:0}.designsetgo-settings .components-card{margin-bottom:24px}.designsetgo-settings .components-card:last-of-type{margin-bottom:0}.designsetgo-settings .components-card__header{padding:16px 24px}.designsetgo-settings .components-card__header h2{font-size:18px;margin:0}.designsetgo-settings .components-card__body .components-base-control,.designsetgo-settings .components-card__body .components-range-control,.designsetgo-settings .components-card__body .components-select-control,.designsetgo-settings .components-card__body .components-toggle-control{margin-bottom:24px}.designsetgo-settings .components-card__body .components-base-control:last-child,.designsetgo-settings .components-card__body .components-range-control:last-child,.designsetgo-settings .components-card__body .components-select-control:last-child,.designsetgo-settings .components-card__body .components-toggle-control:last-child{margin-bottom:0}.designsetgo-save-bar{background:#fff;border-top:1px solid #dcdcde;bottom:0;box-shadow:0 -2px 8px rgba(0,0,0,.1);margin:24px -20px -10px;padding:16px 24px;position:sticky;z-index:10}.designsetgo-save-bar .components-button{min-width:120px}.components-notice{margin:0 0 24px}@media(max-width:782px){.designsetgo-blocks-grid,.designsetgo-extensions-grid,.designsetgo-quick-links-grid{grid-template-columns:1fr}.designsetgo-category-header{align-items:flex-start;flex-direction:column;gap:12px}.designsetgo-save-bar{margin-left:0;margin-right:0}}
     1.designsetgo-admin-wrapper{margin:20px 0;max-width:1200px}.designsetgo-admin-loading{align-items:center;display:flex;justify-content:center;min-height:400px}.designsetgo-dashboard__header{margin-bottom:32px}.designsetgo-dashboard__branding{align-items:center;display:flex;flex-direction:column;gap:16px;text-align:center}.designsetgo-dashboard__branding h1{margin:0}.designsetgo-dashboard__branding .description{font-size:14px;margin:0}.designsetgo-dashboard__stats{display:grid;gap:20px;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));margin-bottom:32px}.designsetgo-dashboard__info,.designsetgo-dashboard__overview,.designsetgo-dashboard__quick-links{margin-bottom:24px}.designsetgo-logo{height:auto;-o-object-fit:contain;object-fit:contain;width:250px}.designsetgo-stats-grid{display:grid;gap:24px;grid-template-columns:repeat(auto-fit,minmax(200px,1fr))}.designsetgo-stat{background:#f6f7f7;border-radius:4px;padding:16px;text-align:center}.designsetgo-stat__value{color:#1e1e1e;font-size:32px;font-weight:700;margin-bottom:8px}.designsetgo-stat__label{color:#757575;font-size:14px}.designsetgo-quick-links-grid{display:grid;gap:16px;grid-template-columns:repeat(auto-fill,minmax(250px,1fr))}.designsetgo-quick-link{background:#f6f7f7;border-radius:4px;display:block;padding:20px;text-decoration:none;transition:all .2s ease}.designsetgo-quick-link:hover{background:#e9ecef;box-shadow:0 2px 8px rgba(0,0,0,.1);transform:translateY(-2px)}.designsetgo-quick-link .dashicons{color:#2271b1;font-size:32px;height:32px;margin-bottom:12px;width:32px}.designsetgo-quick-link h3{color:#1e1e1e;font-size:16px;margin:0 0 8px}.designsetgo-quick-link p{color:#757575;font-size:14px;margin:0}.designsetgo-blocks-extensions__header{margin-bottom:24px}.designsetgo-blocks-extensions__header h1{margin:0 0 8px}.designsetgo-blocks-extensions__header .description{font-size:14px;margin:0}.designsetgo-tabs .components-tab-panel__tabs{border-bottom:1px solid #dcdcde;margin-bottom:24px}.designsetgo-tabs button.is-active{box-shadow:inset 0 0 0 1.5px #2271b1,inset 0 -4px 0 0 #2271b1}.designsetgo-search-wrapper{margin-bottom:24px}.designsetgo-search-wrapper .components-search-control{max-width:400px}.designsetgo-category-card{margin-bottom:24px}.designsetgo-category-card .components-card__header{padding:16px 24px}.designsetgo-category-header{align-items:center;display:flex;justify-content:space-between;width:100%}.designsetgo-category-header h2{font-size:18px;margin:0}.designsetgo-category-actions{display:flex;gap:8px}.designsetgo-blocks-grid,.designsetgo-extensions-grid{display:grid;gap:16px;grid-template-columns:repeat(auto-fill,minmax(300px,1fr))}.designsetgo-block-item,.designsetgo-extension-item{background:#f6f7f7;border-radius:4px;padding:12px}.designsetgo-block-item .components-base-control,.designsetgo-extension-item .components-base-control{margin-bottom:0}.designsetgo-block-item .components-checkbox-control__help,.designsetgo-extension-item .components-checkbox-control__help{font-size:13px;margin-top:4px}.designsetgo-block-label{align-items:center;display:flex;gap:8px}.designsetgo-badge{border-radius:3px;display:inline-block;font-size:11px;font-weight:600;padding:2px 8px;text-transform:uppercase}.designsetgo-badge--high{background:#f0b429;color:#1e1e1e}.designsetgo-settings__header{margin-bottom:24px}.designsetgo-settings__header h1{margin:0 0 8px}.designsetgo-settings__header .description{font-size:14px;margin:0}.designsetgo-settings .components-card{margin-bottom:24px}.designsetgo-settings .components-card:last-of-type{margin-bottom:0}.designsetgo-settings .components-card__header{padding:16px 24px}.designsetgo-settings .components-card__header h2{font-size:18px;margin:0}.designsetgo-settings .components-card__body .components-base-control,.designsetgo-settings .components-card__body .components-range-control,.designsetgo-settings .components-card__body .components-select-control,.designsetgo-settings .components-card__body .components-toggle-control{margin-bottom:24px}.designsetgo-settings .components-card__body .components-base-control:last-child,.designsetgo-settings .components-card__body .components-range-control:last-child,.designsetgo-settings .components-card__body .components-select-control:last-child,.designsetgo-settings .components-card__body .components-toggle-control:last-child{margin-bottom:0}.designsetgo-save-bar{background:#fff;border-top:1px solid #dcdcde;bottom:0;box-shadow:0 -2px 8px rgba(0,0,0,.1);margin:24px -20px -10px;padding:16px 24px;position:sticky;z-index:10}.designsetgo-save-bar .components-button{min-width:120px}.components-notice{margin:0 0 24px}.designsetgo-stat-card{align-items:center;background:linear-gradient(135deg,#f6f7f7,#fff);border-radius:8px;box-shadow:0 2px 4px rgba(0,0,0,.05);display:flex;gap:16px;padding:20px;transition:all .3s ease}.designsetgo-stat-card:hover{box-shadow:0 4px 12px rgba(0,0,0,.1);transform:translateY(-2px)}.designsetgo-stat-card__icon{align-items:center;border-radius:50%;display:flex;flex-shrink:0;height:48px;justify-content:center;width:48px}.designsetgo-stat-card__icon svg{fill:#fff;height:24px;width:24px}.designsetgo-stat-card__icon--blocks{background:linear-gradient(135deg,#2271b1,#135e96)}.designsetgo-stat-card__icon--extensions{background:linear-gradient(135deg,#00a32a,#008a20)}.designsetgo-stat-card__icon--forms{background:linear-gradient(135deg,#f0b429,#dba617)}.designsetgo-stat-card__content{flex:1}.designsetgo-stat-card__value{color:#1e1e1e;font-size:28px;font-weight:700;line-height:1.2;margin:0}.designsetgo-stat-card__label{color:#757575;font-size:13px;margin:4px 0 0}.designsetgo-blocks-categories{margin-bottom:24px}.designsetgo-section-heading{color:#1e1e1e;font-size:14px;font-weight:600;letter-spacing:.5px;margin:0 0 12px;text-transform:uppercase}.designsetgo-categories-grid{display:grid;gap:12px;grid-template-columns:repeat(auto-fill,minmax(140px,1fr))}.designsetgo-category-item{align-items:center;background:#f6f7f7;border-radius:6px;display:flex;font-size:13px;justify-content:space-between;padding:10px 14px}.designsetgo-category-name{color:#1e1e1e;font-weight:500}.designsetgo-category-count{align-items:center;background:#2271b1;border-radius:12px;color:#fff;display:inline-flex;font-size:12px;font-weight:600;height:24px;justify-content:center;min-width:24px;padding:0 8px}.designsetgo-extensions-list{border-top:1px solid #dcdcde;margin-top:24px;padding-top:24px}.designsetgo-extension-pills{display:flex;flex-wrap:wrap;gap:10px}.designsetgo-extension-pill{align-items:center;border-radius:20px;display:inline-flex;font-size:13px;font-weight:500;gap:8px;padding:8px 14px;transition:all .2s ease}.designsetgo-extension-pill.is-enabled{background:#d5f2e3;border:1px solid #00a32a;color:#00693e}.designsetgo-extension-pill.is-enabled .designsetgo-extension-status{background:#00a32a;color:#fff}.designsetgo-extension-pill.is-disabled{background:#f6f7f7;border:1px solid #dcdcde;color:#757575}.designsetgo-extension-pill.is-disabled .designsetgo-extension-status{background:#757575;color:#fff}.designsetgo-extension-status{align-items:center;border-radius:10px;display:inline-flex;font-size:10px;font-weight:600;justify-content:center;letter-spacing:.5px;padding:2px 8px;text-transform:uppercase}.designsetgo-settings-tabs{margin-bottom:24px}.designsetgo-settings-tabs .components-tab-panel__tabs{border-bottom:2px solid #dcdcde;display:flex;gap:8px;margin-bottom:24px}.designsetgo-settings-tabs .components-tab-panel__tabs-item{background:transparent;border:none;color:#757575;font-weight:500;padding:12px 20px;position:relative;transition:all .2s ease}.designsetgo-settings-tabs .components-tab-panel__tabs-item:hover{color:#1e1e1e}.designsetgo-settings-tabs .components-tab-panel__tabs-item.is-active{box-shadow:inset 0 -2px 0 0 #2271b1;color:#2271b1}.designsetgo-tab-content .components-card{margin-bottom:24px}.designsetgo-tab-content .components-card:last-child{margin-bottom:0}.designsetgo-settings-panel .components-card__header{background:linear-gradient(135deg,#f6f7f7,#fff)}.designsetgo-settings-panel .components-card__body{padding:24px}.designsetgo-panel-description{color:#757575;font-size:14px;line-height:1.6;margin:0 0 20px}.designsetgo-settings-grid{display:grid;gap:20px;grid-template-columns:repeat(2,1fr);margin-bottom:20px}.designsetgo-settings-grid.designsetgo-settings-grid--single{grid-template-columns:1fr}.designsetgo-collapsible-section{border-top:1px solid #dcdcde;margin-top:24px;padding-top:20px}.designsetgo-collapsible-header{align-items:center;background:#f6f7f7;border-radius:6px;cursor:pointer;display:flex;justify-content:space-between;margin-bottom:0;padding:12px 16px;transition:background .2s ease}.designsetgo-collapsible-header:hover{background:#e9ecef}.designsetgo-collapsible-header h3{color:#1e1e1e;font-size:15px;font-weight:600;margin:0}.designsetgo-collapsible-header .components-button{min-width:auto;padding:4px}.designsetgo-collapsible-content{margin-top:16px;padding-top:4px}.designsetgo-color-control-compact{margin-bottom:20px}.designsetgo-color-control-compact label{display:block;font-size:13px;font-weight:600;margin-bottom:8px}.designsetgo-color-control-compact .components-color-palette{margin-top:8px}.designsetgo-settings-note{background:#fff3cd;border-left:4px solid #f0b429;border-radius:4px;margin-top:16px;padding:12px}.designsetgo-settings-note strong{color:#1e1e1e;display:block;margin-bottom:8px}.designsetgo-settings-note p{color:#666;font-size:13px;line-height:1.6;margin:0}.designsetgo-settings-section{border-top:1px solid #f0f0f1;margin-top:24px;padding-top:20px}.designsetgo-settings-section:first-child{border-top:none;margin-top:0;padding-top:0}@media(max-width:782px){.designsetgo-blocks-grid,.designsetgo-extensions-grid,.designsetgo-quick-links-grid{grid-template-columns:1fr}.designsetgo-category-header{align-items:flex-start;flex-direction:column;gap:12px}.designsetgo-save-bar{margin-left:0;margin-right:0}.designsetgo-settings-grid{grid-template-columns:1fr}.designsetgo-stat-card{flex-direction:column;text-align:center}.designsetgo-categories-grid{grid-template-columns:repeat(auto-fill,minmax(120px,1fr))}}
  • designsetgo/trunk/build/admin.js

    r3395924 r3396076  
    1 (()=>{"use strict";var e={n:s=>{var n=s&&s.__esModule?()=>s.default:()=>s;return e.d(n,{a:n}),n},d:(s,n)=>{for(var o in n)e.o(n,o)&&!e.o(s,o)&&Object.defineProperty(s,o,{enumerable:!0,get:n[o]})},o:(e,s)=>Object.prototype.hasOwnProperty.call(e,s)};const s=window.wp.element,n=window.wp.i18n,o=window.wp.components,t=window.wp.apiFetch;var i=e.n(t);const a=window.ReactJSXRuntime,l=()=>{const[e,t]=(0,s.useState)(null),[l,d]=(0,s.useState)(!0);return(0,s.useEffect)(()=>{i()({path:"/designsetgo/v1/stats"}).then(e=>{t(e),d(!1)}).catch(()=>{d(!1)})},[]),l?(0,a.jsx)("div",{className:"designsetgo-admin-loading",children:(0,a.jsx)(o.Spinner,{})}):(0,a.jsxs)("div",{className:"designsetgo-dashboard",children:[(0,a.jsx)("div",{className:"designsetgo-dashboard__header",children:(0,a.jsxs)("div",{className:"designsetgo-dashboard__branding",children:[(0,a.jsx)("img",{src:window.designSetGoAdmin?.logoUrl,alt:"DesignSetGo",className:"designsetgo-logo"}),(0,a.jsx)("p",{className:"description",children:(0,n.__)("Manage your DesignSetGo blocks, extensions, and settings.","designsetgo")})]})}),(0,a.jsx)("div",{className:"designsetgo-dashboard__stats",children:(0,a.jsxs)(o.Card,{children:[(0,a.jsx)(o.CardHeader,{children:(0,a.jsx)("h2",{children:(0,n.__)("Plugin Statistics","designsetgo")})}),(0,a.jsx)(o.CardBody,{children:(0,a.jsxs)("div",{className:"designsetgo-stats-grid",children:[(0,a.jsxs)("div",{className:"designsetgo-stat",children:[(0,a.jsxs)("div",{className:"designsetgo-stat__value",children:[e?.enabled_blocks||0,"/",e?.total_blocks||0]}),(0,a.jsx)("div",{className:"designsetgo-stat__label",children:(0,n.__)("Enabled Blocks","designsetgo")})]}),(0,a.jsxs)("div",{className:"designsetgo-stat",children:[(0,a.jsx)("div",{className:"designsetgo-stat__value",children:e?.form_submissions||0}),(0,a.jsx)("div",{className:"designsetgo-stat__label",children:(0,n.__)("Form Submissions","designsetgo")})]})]})})]})}),(0,a.jsx)("div",{className:"designsetgo-dashboard__quick-links",children:(0,a.jsxs)(o.Card,{children:[(0,a.jsx)(o.CardHeader,{children:(0,a.jsx)("h2",{children:(0,n.__)("Quick Links","designsetgo")})}),(0,a.jsx)(o.CardBody,{children:(0,a.jsxs)("div",{className:"designsetgo-quick-links-grid",children:[(0,a.jsxs)("a",{href:"?page=designsetgo-blocks",className:"designsetgo-quick-link",children:[(0,a.jsx)("span",{className:"dashicons dashicons-layout"}),(0,a.jsx)("h3",{children:(0,n.__)("Manage Blocks","designsetgo")}),(0,a.jsx)("p",{children:(0,n.__)("Enable or disable individual blocks and extensions","designsetgo")})]}),(0,a.jsxs)("a",{href:"?page=edit.php&post_type=dsg_form_submission",className:"designsetgo-quick-link",children:[(0,a.jsx)("span",{className:"dashicons dashicons-feedback"}),(0,a.jsx)("h3",{children:(0,n.__)("Form Submissions","designsetgo")}),(0,a.jsx)("p",{children:(0,n.__)("View and manage form submissions","designsetgo")})]}),(0,a.jsxs)("a",{href:"?page=designsetgo-settings",className:"designsetgo-quick-link",children:[(0,a.jsx)("span",{className:"dashicons dashicons-admin-settings"}),(0,a.jsx)("h3",{children:(0,n.__)("Settings","designsetgo")}),(0,a.jsx)("p",{children:(0,n.__)("Configure performance, forms, and security","designsetgo")})]}),(0,a.jsxs)("a",{href:`${window.designSetGoAdmin?.siteUrl}/wp-admin/site-editor.php`,className:"designsetgo-quick-link",children:[(0,a.jsx)("span",{className:"dashicons dashicons-admin-appearance"}),(0,a.jsx)("h3",{children:(0,n.__)("Global Styles","designsetgo")}),(0,a.jsx)("p",{children:(0,n.__)("Customize colors, typography, and spacing","designsetgo")})]})]})})]})}),(0,a.jsx)("div",{className:"designsetgo-dashboard__info",children:(0,a.jsxs)(o.Card,{children:[(0,a.jsx)(o.CardHeader,{children:(0,a.jsx)("h2",{children:(0,n.__)("Getting Started","designsetgo")})}),(0,a.jsxs)(o.CardBody,{children:[(0,a.jsx)("p",{children:(0,n.__)("DesignSetGo provides 41 powerful blocks and 10 extensions to enhance your WordPress editing experience.","designsetgo")}),(0,a.jsxs)("ul",{children:[(0,a.jsxs)("li",{children:[(0,a.jsx)("strong",{children:(0,n.__)("Container Blocks:","designsetgo")})," ",(0,n.__)("Flex, Grid, and Stack layouts for responsive designs","designsetgo")]}),(0,a.jsxs)("li",{children:[(0,a.jsx)("strong",{children:(0,n.__)("UI Elements:","designsetgo")})," ",(0,n.__)("Icons, tabs, accordions, and more","designsetgo")]}),(0,a.jsxs)("li",{children:[(0,a.jsx)("strong",{children:(0,n.__)("Interactive Blocks:","designsetgo")})," ",(0,n.__)("Sliders, flip cards, and animations","designsetgo")]}),(0,a.jsxs)("li",{children:[(0,a.jsx)("strong",{children:(0,n.__)("Form Builder:","designsetgo")})," ",(0,n.__)("Complete form system with 11 field types","designsetgo")]})]})]})]})})]})},d=()=>{const[e,t]=(0,s.useState)({}),[l,d]=(0,s.useState)([]),[r,g]=(0,s.useState)(null),[c,_]=(0,s.useState)(!0),[h,m]=(0,s.useState)(!1),[x,u]=(0,s.useState)(null),[p,b]=(0,s.useState)("");(0,s.useEffect)(()=>{Promise.all([i()({path:"/designsetgo/v1/blocks"}),i()({path:"/designsetgo/v1/extensions"}),i()({path:"/designsetgo/v1/settings"})]).then(([e,s,n])=>{t(e),d(s),g(n),_(!1)}).catch(()=>{u({status:"error",message:(0,n.__)("Failed to load data.","designsetgo")}),_(!1)})},[]);const j=e=>!!r&&(0===r.enabled_blocks.length||r.enabled_blocks.includes(e)),k=()=>{const s=[];return Object.values(e).forEach(e=>{e.blocks.forEach(e=>{s.push(e.name)})}),s};return c?(0,a.jsx)("div",{className:"designsetgo-admin-loading",children:(0,a.jsx)(o.Spinner,{})}):(0,a.jsxs)("div",{className:"designsetgo-blocks-extensions",children:[(0,a.jsxs)("div",{className:"designsetgo-blocks-extensions__header",children:[(0,a.jsx)("h1",{children:(0,n.__)("Blocks & Extensions","designsetgo")}),(0,a.jsx)("p",{className:"description",children:(0,n.__)("Enable or disable blocks and extensions to customize your editing experience.","designsetgo")})]}),x&&(0,a.jsx)(o.Notice,{status:x.status,onRemove:()=>u(null),isDismissible:!0,children:x.message}),(0,a.jsx)(o.TabPanel,{className:"designsetgo-tabs",activeClass:"is-active",tabs:[{name:"blocks",title:(0,n.__)("Blocks","designsetgo")},{name:"extensions",title:(0,n.__)("Extensions","designsetgo")}],children:s=>(0,a.jsxs)("div",{className:"designsetgo-tab-content",children:["blocks"===s.name&&(0,a.jsxs)("div",{className:"designsetgo-blocks-list",children:[(0,a.jsx)("div",{className:"designsetgo-search-wrapper",children:(0,a.jsx)(o.SearchControl,{value:p,onChange:b,placeholder:(0,n.__)("Search blocks…","designsetgo")})}),Object.entries(e).map(([s,t])=>{const i=(l=t.blocks,p?l.filter(e=>e.title.toLowerCase().includes(p.toLowerCase())||e.description.toLowerCase().includes(p.toLowerCase())):l);var l;if(0===i.length)return null;const d=i.every(e=>j(e.name)),c=i.every(e=>!j(e.name));return(0,a.jsxs)(o.Card,{className:"designsetgo-category-card",children:[(0,a.jsx)(o.CardHeader,{children:(0,a.jsxs)("div",{className:"designsetgo-category-header",children:[(0,a.jsx)("h2",{children:t.label}),(0,a.jsxs)("div",{className:"designsetgo-category-actions",children:[(0,a.jsx)(o.Button,{variant:"secondary",size:"small",onClick:()=>(s=>{const n=0===r.enabled_blocks.length?k():[...r.enabled_blocks],o=e[s].blocks.map(e=>e.name),t=[...new Set([...n,...o])];g({...r,enabled_blocks:t})})(s),disabled:d,children:(0,n.__)("Enable All","designsetgo")}),(0,a.jsx)(o.Button,{variant:"secondary",size:"small",onClick:()=>(s=>{const n=0===r.enabled_blocks.length?k():[...r.enabled_blocks],o=e[s].blocks.map(e=>e.name),t=n.filter(e=>!o.includes(e));g({...r,enabled_blocks:t})})(s),disabled:c,children:(0,n.__)("Disable All","designsetgo")})]})]})}),(0,a.jsx)(o.CardBody,{children:(0,a.jsx)("div",{className:"designsetgo-blocks-grid",children:i.map(e=>(0,a.jsx)("div",{className:"designsetgo-block-item",children:(0,a.jsx)(o.CheckboxControl,{label:(0,a.jsxs)("span",{className:"designsetgo-block-label",children:[(0,a.jsx)("strong",{children:e.title}),"high"===e.performance&&(0,a.jsx)("span",{className:"designsetgo-badge designsetgo-badge--high",children:(0,n.__)("Heavy","designsetgo")})]}),help:e.description,checked:j(e.name),onChange:()=>(e=>{const s=0===r.enabled_blocks.length?k():[...r.enabled_blocks];if(s.includes(e)){const n=s.filter(s=>s!==e);g({...r,enabled_blocks:n})}else g({...r,enabled_blocks:[...s,e]})})(e.name)})},e.name))})})]},s)})]}),"extensions"===s.name&&(0,a.jsxs)(o.Card,{children:[(0,a.jsx)(o.CardHeader,{children:(0,a.jsx)("h2",{children:(0,n.__)("Extensions","designsetgo")})}),(0,a.jsxs)(o.CardBody,{children:[(0,a.jsx)("p",{className:"description",children:(0,n.__)("Extensions add functionality to all blocks. Disabling extensions will reduce editor complexity.","designsetgo")}),(0,a.jsx)("div",{className:"designsetgo-extensions-grid",children:l.map(e=>{return(0,a.jsx)("div",{className:"designsetgo-extension-item",children:(0,a.jsx)(o.CheckboxControl,{label:(0,a.jsx)("strong",{children:e.title}),help:e.description,checked:(s=e.name,!!r&&(0===r.enabled_extensions.length||r.enabled_extensions.includes(s))),onChange:()=>(e=>{const s=0===r.enabled_extensions.length?l.map(e=>e.name):[...r.enabled_extensions];if(s.includes(e)){const n=s.filter(s=>s!==e);g({...r,enabled_extensions:n})}else g({...r,enabled_extensions:[...s,e]})})(e.name)})},e.name);var s})})]})]})]})}),(0,a.jsx)("div",{className:"designsetgo-save-bar",children:(0,a.jsx)(o.Button,{variant:"primary",onClick:()=>{m(!0),u(null),i()({path:"/designsetgo/v1/settings",method:"POST",data:r}).then(()=>{u({status:"success",message:(0,n.__)("Settings saved successfully! Please refresh any open editor pages to see the changes.","designsetgo")}),m(!1)}).catch(e=>{u({status:"error",message:e.message||(0,n.__)("Failed to save settings.","designsetgo")}),m(!1)})},isBusy:h,disabled:h,children:h?(0,n.__)("Saving…","designsetgo"):(0,n.__)("Save Changes","designsetgo")})})]})},r=()=>{const[e,t]=(0,s.useState)(null),[l,d]=(0,s.useState)(!0),[r,g]=(0,s.useState)(!1),[c,_]=(0,s.useState)(null);(0,s.useEffect)(()=>{i()({path:"/designsetgo/v1/settings"}).then(e=>{t(e),d(!1)}).catch(()=>{_({status:"error",message:(0,n.__)("Failed to load settings.","designsetgo")}),d(!1)})},[]);const h=(s,n,o)=>{t({...e,[s]:{...e[s],[n]:o}})};return l?(0,a.jsx)("div",{className:"designsetgo-admin-loading",children:(0,a.jsx)(o.Spinner,{})}):(0,a.jsxs)("div",{className:"designsetgo-settings",children:[(0,a.jsxs)("div",{className:"designsetgo-settings__header",children:[(0,a.jsx)("h1",{children:(0,n.__)("Settings","designsetgo")}),(0,a.jsx)("p",{className:"description",children:(0,n.__)("Configure performance, forms, animations, sticky header, and security options.","designsetgo")})]}),c&&(0,a.jsx)("div",{style:{position:"fixed",top:"32px",right:"20px",zIndex:1e5,maxWidth:"400px",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.15)"},children:(0,a.jsx)(o.Notice,{status:c.status,onRemove:()=>_(null),isDismissible:!0,children:c.message})}),(0,a.jsxs)(o.Card,{children:[(0,a.jsx)(o.CardHeader,{children:(0,a.jsx)("h2",{children:(0,n.__)("Sticky Header","designsetgo")})}),(0,a.jsxs)(o.CardBody,{children:[(0,a.jsx)("p",{className:"description",style:{marginBottom:"16px"},children:(0,n.__)("Enable sticky header functionality for blocks with position:sticky applied. These settings enhance the default WordPress sticky positioning with additional features.","designsetgo")}),(0,a.jsx)(o.ToggleControl,{label:(0,n.__)("Enable Sticky Header","designsetgo"),help:(0,n.__)("Enable enhanced sticky header functionality.","designsetgo"),checked:e?.sticky_header?.enable||!1,onChange:e=>h("sticky_header","enable",e),__nextHasNoMarginBottom:!0}),e?.sticky_header?.enable&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o.TextControl,{label:(0,n.__)("Custom CSS Selector (Advanced)","designsetgo"),help:(0,n.__)("Override the default selector if using a custom theme or page builder. Leave empty to use: .wp-block-template-part:has(.is-position-sticky)","designsetgo"),value:e?.sticky_header?.custom_selector||"",onChange:e=>h("sticky_header","custom_selector",e),placeholder:".wp-block-template-part:has(.is-position-sticky)",__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,a.jsx)(o.RangeControl,{label:(0,n.__)("Z-Index","designsetgo"),help:(0,n.__)("Stacking order of the sticky header.","designsetgo"),value:e?.sticky_header?.z_index||100,onChange:e=>h("sticky_header","z_index",e),min:1,max:9999,step:1,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,a.jsx)(o.RangeControl,{label:(0,n.__)("Scroll Threshold (px)","designsetgo"),help:(0,n.__)("Pixels user must scroll before effects activate.","designsetgo"),value:e?.sticky_header?.scroll_threshold||50,onChange:e=>h("sticky_header","scroll_threshold",e),min:0,max:500,step:10,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,a.jsx)(o.RangeControl,{label:(0,n.__)("Transition Speed (ms)","designsetgo"),help:(0,n.__)("Animation speed for sticky effects.","designsetgo"),value:e?.sticky_header?.transition_speed||300,onChange:e=>h("sticky_header","transition_speed",e),min:0,max:1e3,step:50,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,a.jsx)(o.ToggleControl,{label:(0,n.__)("Shadow on Scroll","designsetgo"),help:(0,n.__)("Add shadow when scrolled past threshold.","designsetgo"),checked:e?.sticky_header?.shadow_on_scroll||!1,onChange:e=>h("sticky_header","shadow_on_scroll",e),__nextHasNoMarginBottom:!0}),e?.sticky_header?.shadow_on_scroll&&(0,a.jsx)(o.SelectControl,{label:(0,n.__)("Shadow Size","designsetgo"),value:e?.sticky_header?.shadow_size||"medium",options:[{label:(0,n.__)("Small","designsetgo"),value:"small"},{label:(0,n.__)("Medium","designsetgo"),value:"medium"},{label:(0,n.__)("Large","designsetgo"),value:"large"}],onChange:e=>h("sticky_header","shadow_size",e),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,a.jsx)(o.ToggleControl,{label:(0,n.__)("Shrink on Scroll","designsetgo"),help:(0,n.__)("Reduce header height when scrolling.","designsetgo"),checked:e?.sticky_header?.shrink_on_scroll||!1,onChange:e=>h("sticky_header","shrink_on_scroll",e),__nextHasNoMarginBottom:!0}),e?.sticky_header?.shrink_on_scroll&&(0,a.jsx)(o.RangeControl,{label:(0,n.__)("Shrink Amount (%)","designsetgo"),help:(0,n.__)("Percentage to reduce header height.","designsetgo"),value:e?.sticky_header?.shrink_amount||20,onChange:e=>h("sticky_header","shrink_amount",e),min:5,max:50,step:5,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,a.jsx)(o.ToggleControl,{label:(0,n.__)("Hide Header on Scroll Down","designsetgo"),help:(0,n.__)("Hide header when scrolling down, show when scrolling up.","designsetgo"),checked:e?.sticky_header?.hide_on_scroll_down||!1,onChange:e=>h("sticky_header","hide_on_scroll_down",e),__nextHasNoMarginBottom:!0}),(0,a.jsx)(o.ToggleControl,{label:(0,n.__)("Background Color on Scroll","designsetgo"),help:(0,n.__)("Apply background color when scrolled.","designsetgo"),checked:e?.sticky_header?.background_on_scroll||!1,onChange:e=>h("sticky_header","background_on_scroll",e),__nextHasNoMarginBottom:!0}),e?.sticky_header?.background_on_scroll&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{style:{marginBottom:"16px"},children:[(0,a.jsx)("div",{style:{display:"block",marginBottom:"8px",fontWeight:600},children:(0,n.__)("Background Color","designsetgo")}),(0,a.jsx)(o.ColorPicker,{color:e?.sticky_header?.background_scroll_color||"",onChangeComplete:e=>h("sticky_header","background_scroll_color",e.hex),enableAlpha:!1})]}),(0,a.jsx)(o.RangeControl,{label:(0,n.__)("Background Opacity (%)","designsetgo"),value:e?.sticky_header?.background_scroll_opacity||100,onChange:e=>h("sticky_header","background_scroll_opacity",e),min:0,max:100,step:5,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})]}),(0,a.jsx)("hr",{style:{margin:"24px 0"}}),(0,a.jsx)("h3",{children:(0,n.__)("Mobile Settings","designsetgo")}),(0,a.jsx)(o.ToggleControl,{label:(0,n.__)("Enable on Mobile","designsetgo"),help:(0,n.__)("Enable sticky header on mobile devices.","designsetgo"),checked:e?.sticky_header?.mobile_enabled||!1,onChange:e=>h("sticky_header","mobile_enabled",e),__nextHasNoMarginBottom:!0}),e?.sticky_header?.mobile_enabled&&(0,a.jsx)(o.RangeControl,{label:(0,n.__)("Mobile Breakpoint (px)","designsetgo"),help:(0,n.__)("Screen width below which mobile settings apply.","designsetgo"),value:e?.sticky_header?.mobile_breakpoint||768,onChange:e=>h("sticky_header","mobile_breakpoint",e),min:320,max:1024,step:1,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})]})]})]}),(0,a.jsxs)(o.Card,{children:[(0,a.jsx)(o.CardHeader,{children:(0,a.jsx)("h2",{children:(0,n.__)("Performance","designsetgo")})}),(0,a.jsxs)(o.CardBody,{children:[(0,a.jsx)(o.ToggleControl,{label:(0,n.__)("Conditional Asset Loading","designsetgo"),help:(0,n.__)("Load block assets only on pages that use them. Improves performance.","designsetgo"),checked:e?.performance?.conditional_loading||!1,onChange:e=>h("performance","conditional_loading",e),__nextHasNoMarginBottom:!0}),(0,a.jsx)(o.RangeControl,{label:(0,n.__)("Cache Duration (seconds)","designsetgo"),help:(0,n.__)("How long to cache block detection results.","designsetgo"),value:e?.performance?.cache_duration||3600,onChange:e=>h("performance","cache_duration",e),min:0,max:86400,step:300,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})]})]}),(0,a.jsxs)(o.Card,{children:[(0,a.jsx)(o.CardHeader,{children:(0,a.jsx)("h2",{children:(0,n.__)("Forms","designsetgo")})}),(0,a.jsxs)(o.CardBody,{children:[(0,a.jsx)(o.ToggleControl,{label:(0,n.__)("Enable Honeypot","designsetgo"),help:(0,n.__)("Add a hidden field to detect spam bots.","designsetgo"),checked:e?.forms?.enable_honeypot||!1,onChange:e=>h("forms","enable_honeypot",e),__nextHasNoMarginBottom:!0}),(0,a.jsx)(o.ToggleControl,{label:(0,n.__)("Enable Rate Limiting","designsetgo"),help:(0,n.__)("Prevent spam by limiting submission frequency.","designsetgo"),checked:e?.forms?.enable_rate_limiting||!1,onChange:e=>h("forms","enable_rate_limiting",e),__nextHasNoMarginBottom:!0}),(0,a.jsx)(o.RangeControl,{label:(0,n.__)("Submission Retention (days)","designsetgo"),help:(0,n.__)("How long to keep form submissions. Set to 0 to keep forever.","designsetgo"),value:e?.forms?.retention_days||30,onChange:e=>h("forms","retention_days",e),min:0,max:365,step:1,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})]})]}),(0,a.jsxs)(o.Card,{children:[(0,a.jsx)(o.CardHeader,{children:(0,a.jsx)("h2",{children:(0,n.__)("Animations","designsetgo")})}),(0,a.jsxs)(o.CardBody,{children:[(0,a.jsx)(o.ToggleControl,{label:(0,n.__)("Enable Animations","designsetgo"),help:(0,n.__)("Enable block entrance/exit animations.","designsetgo"),checked:e?.animations?.enable_animations||!1,onChange:e=>h("animations","enable_animations",e),__nextHasNoMarginBottom:!0}),(0,a.jsx)(o.RangeControl,{label:(0,n.__)("Default Duration (ms)","designsetgo"),help:(0,n.__)("Default animation duration in milliseconds.","designsetgo"),value:e?.animations?.default_duration||600,onChange:e=>h("animations","default_duration",e),min:100,max:2e3,step:100,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,a.jsx)(o.SelectControl,{label:(0,n.__)("Default Easing","designsetgo"),help:(0,n.__)("Default animation timing function.","designsetgo"),value:e?.animations?.default_easing||"ease-in-out",options:[{label:"Ease",value:"ease"},{label:"Ease In",value:"ease-in"},{label:"Ease Out",value:"ease-out"},{label:"Ease In Out",value:"ease-in-out"},{label:"Linear",value:"linear"}],onChange:e=>h("animations","default_easing",e),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,a.jsx)(o.ToggleControl,{label:(0,n.__)("Respect Prefers Reduced Motion","designsetgo"),help:(0,n.__)("Disable animations for users who prefer reduced motion (accessibility).","designsetgo"),checked:e?.animations?.respect_prefers_reduced_motion||!1,onChange:e=>h("animations","respect_prefers_reduced_motion",e),__nextHasNoMarginBottom:!0})]})]}),(0,a.jsxs)(o.Card,{children:[(0,a.jsx)(o.CardHeader,{children:(0,a.jsx)("h2",{children:(0,n.__)("Security & Privacy","designsetgo")})}),(0,a.jsxs)(o.CardBody,{children:[(0,a.jsx)(o.ToggleControl,{label:(0,n.__)("Log IP Addresses","designsetgo"),help:(0,n.__)("Store IP addresses with form submissions.","designsetgo"),checked:e?.security?.log_ip_addresses||!1,onChange:e=>h("security","log_ip_addresses",e),__nextHasNoMarginBottom:!0}),(0,a.jsx)(o.ToggleControl,{label:(0,n.__)("Log User Agents","designsetgo"),help:(0,n.__)("Store browser user agent strings with form submissions.","designsetgo"),checked:e?.security?.log_user_agents||!1,onChange:e=>h("security","log_user_agents",e),__nextHasNoMarginBottom:!0}),(0,a.jsx)(o.ToggleControl,{label:(0,n.__)("Log Referrers","designsetgo"),help:(0,n.__)("Store referrer URLs with form submissions.","designsetgo"),checked:e?.security?.log_referrers||!1,onChange:e=>h("security","log_referrers",e),__nextHasNoMarginBottom:!0})]})]}),(0,a.jsx)("div",{className:"designsetgo-save-bar",children:(0,a.jsx)(o.Button,{variant:"primary",onClick:()=>{g(!0),_(null),i()({path:"/designsetgo/v1/settings",method:"POST",data:e}).then(()=>{_({status:"success",message:(0,n.__)("Settings saved successfully!","designsetgo")}),g(!1)}).catch(e=>{_({status:"error",message:e.message||(0,n.__)("Failed to save settings.","designsetgo")}),g(!1)})},isBusy:r,disabled:r,children:r?(0,n.__)("Saving…","designsetgo"):(0,n.__)("Save Changes","designsetgo")})})]})},g=()=>{const{currentPage:e}=window.designSetGoAdmin||{};let s;switch(e){case"blocks":s=d;break;case"settings":s=r;break;default:s=l}return(0,a.jsx)("div",{className:"designsetgo-admin-wrapper",children:(0,a.jsx)(s,{})})};document.addEventListener("DOMContentLoaded",()=>{const e=document.getElementById("designsetgo-admin-root");e&&(0,s.createRoot)(e).render((0,a.jsx)(g,{}))})})();
     1(()=>{"use strict";var e={n:s=>{var t=s&&s.__esModule?()=>s.default:()=>s;return e.d(t,{a:t}),t},d:(s,t)=>{for(var a in t)e.o(t,a)&&!e.o(s,a)&&Object.defineProperty(s,a,{enumerable:!0,get:t[a]})},o:(e,s)=>Object.prototype.hasOwnProperty.call(e,s)};const s=window.wp.element,t=window.wp.i18n,a=window.wp.components,n=window.wp.apiFetch;var i=e.n(n);const o=(0,s.forwardRef)(({icon:e,size:t=24,...a},n)=>(0,s.cloneElement)(e,{width:t,height:t,...a,ref:n})),l=window.wp.primitives,d=window.ReactJSXRuntime,g=(l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.Circle,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,(0,d.jsx)(l.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)(l.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})})),h=(l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,(0,d.jsx)(l.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)(l.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})})),r=(l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.Path,l.Circle,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.G,l.Path,l.Path,l.SVG,l.G,l.Path,l.Path,l.SVG,l.G,l.Path,l.Path,l.SVG,l.G,l.Path,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,(0,d.jsx)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(l.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})})),c=(l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,(0,d.jsx)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(l.Path,{d:"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})})),_=(l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.Path,l.SVG,l.Path,l.Path,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,(0,d.jsx)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(l.Path,{d:"M10.5 4v4h3V4H15v4h1.5a1 1 0 011 1v4l-3 4v2a1 1 0 01-1 1h-3a1 1 0 01-1-1v-2l-3-4V9a1 1 0 011-1H9V4h1.5zm.5 12.5v2h2v-2l3-4v-3H8v3l3 4z"})})),S=(l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.Path,l.SVG,l.Path,l.Path,l.Path,l.SVG,l.Path,l.Path,l.SVG,l.Path,l.Path,l.SVG,l.Path,l.Path,l.SVG,l.Path,l.Path,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,l.SVG,l.Path,()=>{const[e,n]=(0,s.useState)(null),[l,g]=(0,s.useState)([]),[h,S]=(0,s.useState)([]),[m,P]=(0,s.useState)(!0);if((0,s.useEffect)(()=>{Promise.all([i()({path:"/designsetgo/v1/stats"}),i()({path:"/designsetgo/v1/blocks"}),i()({path:"/designsetgo/v1/extensions"})]).then(([e,s,t])=>{n(e),g(s),S(t),P(!1)}).catch(()=>{P(!1)})},[]),m)return(0,d.jsx)("div",{className:"designsetgo-admin-loading",children:(0,d.jsx)(a.Spinner,{})});const x=l.reduce((e,s)=>{const t=s.category||"other";return e[t]=(e[t]||0)+1,e},{});return(0,d.jsxs)("div",{className:"designsetgo-dashboard",children:[(0,d.jsx)("div",{className:"designsetgo-dashboard__header",children:(0,d.jsxs)("div",{className:"designsetgo-dashboard__branding",children:[(0,d.jsx)("img",{src:window.designSetGoAdmin?.logoUrl,alt:"DesignSetGo",className:"designsetgo-logo"}),(0,d.jsx)("p",{className:"description",children:(0,t.__)("Manage your DesignSetGo blocks, extensions, and settings.","designsetgo")})]})}),(0,d.jsxs)("div",{className:"designsetgo-dashboard__stats",children:[(0,d.jsxs)("div",{className:"designsetgo-stat-card",children:[(0,d.jsx)("div",{className:"designsetgo-stat-card__icon designsetgo-stat-card__icon--blocks",children:(0,d.jsx)(o,{icon:c})}),(0,d.jsxs)("div",{className:"designsetgo-stat-card__content",children:[(0,d.jsx)("div",{className:"designsetgo-stat-card__value",children:e?.total_blocks||l.length||0}),(0,d.jsx)("div",{className:"designsetgo-stat-card__label",children:(0,t.__)("Blocks","designsetgo")})]})]}),(0,d.jsxs)("div",{className:"designsetgo-stat-card",children:[(0,d.jsx)("div",{className:"designsetgo-stat-card__icon designsetgo-stat-card__icon--extensions",children:(0,d.jsx)(o,{icon:_})}),(0,d.jsxs)("div",{className:"designsetgo-stat-card__content",children:[(0,d.jsx)("div",{className:"designsetgo-stat-card__value",children:h.length||0}),(0,d.jsx)("div",{className:"designsetgo-stat-card__label",children:(0,t.__)("Extensions","designsetgo")})]})]}),(0,d.jsxs)("div",{className:"designsetgo-stat-card",children:[(0,d.jsx)("div",{className:"designsetgo-stat-card__icon designsetgo-stat-card__icon--forms",children:(0,d.jsx)(o,{icon:r})}),(0,d.jsxs)("div",{className:"designsetgo-stat-card__content",children:[(0,d.jsx)("div",{className:"designsetgo-stat-card__value",children:e?.form_submissions||0}),(0,d.jsx)("div",{className:"designsetgo-stat-card__label",children:(0,t.__)("Form Submissions","designsetgo")})]})]})]}),(0,d.jsx)("div",{className:"designsetgo-dashboard__overview",children:(0,d.jsxs)(a.Card,{children:[(0,d.jsx)(a.CardHeader,{children:(0,d.jsx)("h2",{children:(0,t.__)("Blocks & Extensions","designsetgo")})}),(0,d.jsxs)(a.CardBody,{children:[Object.keys(x).length>0&&(0,d.jsxs)("div",{className:"designsetgo-blocks-categories",children:[(0,d.jsx)("h3",{className:"designsetgo-section-heading",children:(0,t.__)("Blocks by Category","designsetgo")}),(0,d.jsx)("div",{className:"designsetgo-categories-grid",children:Object.entries(x).map(([e,s])=>(0,d.jsxs)("div",{className:"designsetgo-category-item",children:[(0,d.jsx)("span",{className:"designsetgo-category-name",children:e.replace(/-/g," ").replace(/\b\w/g,e=>e.toUpperCase())}),(0,d.jsx)("span",{className:"designsetgo-category-count",children:s})]},e))})]}),h.length>0&&(0,d.jsxs)("div",{className:"designsetgo-extensions-list",children:[(0,d.jsx)("h3",{className:"designsetgo-section-heading",children:(0,t.__)("Extensions","designsetgo")}),(0,d.jsx)("div",{className:"designsetgo-extension-pills",children:h.map(e=>(0,d.jsxs)("span",{className:"designsetgo-extension-pill "+(e.enabled?"is-enabled":"is-disabled"),children:[e.title,(0,d.jsx)("span",{className:"designsetgo-extension-status",children:e.enabled?(0,t.__)("Enabled","designsetgo"):(0,t.__)("Disabled","designsetgo")})]},e.name))})]})]})]})}),(0,d.jsx)("div",{className:"designsetgo-dashboard__quick-links",children:(0,d.jsxs)(a.Card,{children:[(0,d.jsx)(a.CardHeader,{children:(0,d.jsx)("h2",{children:(0,t.__)("Quick Links","designsetgo")})}),(0,d.jsx)(a.CardBody,{children:(0,d.jsxs)("div",{className:"designsetgo-quick-links-grid",children:[(0,d.jsxs)("a",{href:"?page=designsetgo-blocks",className:"designsetgo-quick-link",children:[(0,d.jsx)("span",{className:"dashicons dashicons-layout"}),(0,d.jsx)("h3",{children:(0,t.__)("Manage Blocks","designsetgo")}),(0,d.jsx)("p",{children:(0,t.__)("Enable or disable individual blocks and extensions","designsetgo")})]}),(0,d.jsxs)("a",{href:"?page=edit.php&post_type=dsg_form_submission",className:"designsetgo-quick-link",children:[(0,d.jsx)("span",{className:"dashicons dashicons-feedback"}),(0,d.jsx)("h3",{children:(0,t.__)("Form Submissions","designsetgo")}),(0,d.jsx)("p",{children:(0,t.__)("View and manage form submissions","designsetgo")})]}),(0,d.jsxs)("a",{href:"?page=designsetgo-settings",className:"designsetgo-quick-link",children:[(0,d.jsx)("span",{className:"dashicons dashicons-admin-settings"}),(0,d.jsx)("h3",{children:(0,t.__)("Settings","designsetgo")}),(0,d.jsx)("p",{children:(0,t.__)("Configure performance, forms, and security","designsetgo")})]}),(0,d.jsxs)("a",{href:`${window.designSetGoAdmin?.siteUrl}/wp-admin/site-editor.php`,className:"designsetgo-quick-link",children:[(0,d.jsx)("span",{className:"dashicons dashicons-admin-appearance"}),(0,d.jsx)("h3",{children:(0,t.__)("Global Styles","designsetgo")}),(0,d.jsx)("p",{children:(0,t.__)("Customize colors, typography, and spacing","designsetgo")})]})]})})]})})]})}),m=()=>{const[e,n]=(0,s.useState)({}),[o,l]=(0,s.useState)([]),[g,h]=(0,s.useState)(null),[r,c]=(0,s.useState)(!0),[_,S]=(0,s.useState)(!1),[m,P]=(0,s.useState)(null),[x,G]=(0,s.useState)("");(0,s.useEffect)(()=>{Promise.all([i()({path:"/designsetgo/v1/blocks"}),i()({path:"/designsetgo/v1/extensions"}),i()({path:"/designsetgo/v1/settings"})]).then(([e,s,t])=>{n(e),l(s),h(t),c(!1)}).catch(()=>{P({status:"error",message:(0,t.__)("Failed to load data.","designsetgo")}),c(!1)})},[]);const V=e=>!!g&&(0===g.enabled_blocks.length||g.enabled_blocks.includes(e)),u=()=>{const s=[];return Object.values(e).forEach(e=>{e.blocks.forEach(e=>{s.push(e.name)})}),s};return r?(0,d.jsx)("div",{className:"designsetgo-admin-loading",children:(0,d.jsx)(a.Spinner,{})}):(0,d.jsxs)("div",{className:"designsetgo-blocks-extensions",children:[(0,d.jsxs)("div",{className:"designsetgo-blocks-extensions__header",children:[(0,d.jsx)("h1",{children:(0,t.__)("Blocks & Extensions","designsetgo")}),(0,d.jsx)("p",{className:"description",children:(0,t.__)("Enable or disable blocks and extensions to customize your editing experience.","designsetgo")})]}),m&&(0,d.jsx)(a.Notice,{status:m.status,onRemove:()=>P(null),isDismissible:!0,children:m.message}),(0,d.jsx)(a.TabPanel,{className:"designsetgo-tabs",activeClass:"is-active",tabs:[{name:"blocks",title:(0,t.__)("Blocks","designsetgo")},{name:"extensions",title:(0,t.__)("Extensions","designsetgo")}],children:s=>(0,d.jsxs)("div",{className:"designsetgo-tab-content",children:["blocks"===s.name&&(0,d.jsxs)("div",{className:"designsetgo-blocks-list",children:[(0,d.jsx)("div",{className:"designsetgo-search-wrapper",children:(0,d.jsx)(a.SearchControl,{value:x,onChange:G,placeholder:(0,t.__)("Search blocks…","designsetgo")})}),Object.entries(e).map(([s,n])=>{const i=(o=n.blocks,x?o.filter(e=>e.title.toLowerCase().includes(x.toLowerCase())||e.description.toLowerCase().includes(x.toLowerCase())):o);var o;if(0===i.length)return null;const l=i.every(e=>V(e.name)),r=i.every(e=>!V(e.name));return(0,d.jsxs)(a.Card,{className:"designsetgo-category-card",children:[(0,d.jsx)(a.CardHeader,{children:(0,d.jsxs)("div",{className:"designsetgo-category-header",children:[(0,d.jsx)("h2",{children:n.label}),(0,d.jsxs)("div",{className:"designsetgo-category-actions",children:[(0,d.jsx)(a.Button,{variant:"secondary",size:"small",onClick:()=>(s=>{const t=0===g.enabled_blocks.length?u():[...g.enabled_blocks],a=e[s].blocks.map(e=>e.name),n=[...new Set([...t,...a])];h({...g,enabled_blocks:n})})(s),disabled:l,children:(0,t.__)("Enable All","designsetgo")}),(0,d.jsx)(a.Button,{variant:"secondary",size:"small",onClick:()=>(s=>{const t=0===g.enabled_blocks.length?u():[...g.enabled_blocks],a=e[s].blocks.map(e=>e.name),n=t.filter(e=>!a.includes(e));h({...g,enabled_blocks:n})})(s),disabled:r,children:(0,t.__)("Disable All","designsetgo")})]})]})}),(0,d.jsx)(a.CardBody,{children:(0,d.jsx)("div",{className:"designsetgo-blocks-grid",children:i.map(e=>(0,d.jsx)("div",{className:"designsetgo-block-item",children:(0,d.jsx)(a.CheckboxControl,{label:(0,d.jsxs)("span",{className:"designsetgo-block-label",children:[(0,d.jsx)("strong",{children:e.title}),"high"===e.performance&&(0,d.jsx)("span",{className:"designsetgo-badge designsetgo-badge--high",children:(0,t.__)("Heavy","designsetgo")})]}),help:e.description,checked:V(e.name),onChange:()=>(e=>{const s=0===g.enabled_blocks.length?u():[...g.enabled_blocks];if(s.includes(e)){const t=s.filter(s=>s!==e);h({...g,enabled_blocks:t})}else h({...g,enabled_blocks:[...s,e]})})(e.name)})},e.name))})})]},s)})]}),"extensions"===s.name&&(0,d.jsxs)(a.Card,{children:[(0,d.jsx)(a.CardHeader,{children:(0,d.jsx)("h2",{children:(0,t.__)("Extensions","designsetgo")})}),(0,d.jsxs)(a.CardBody,{children:[(0,d.jsx)("p",{className:"description",children:(0,t.__)("Extensions add functionality to all blocks. Disabling extensions will reduce editor complexity.","designsetgo")}),(0,d.jsx)("div",{className:"designsetgo-extensions-grid",children:o.map(e=>{return(0,d.jsx)("div",{className:"designsetgo-extension-item",children:(0,d.jsx)(a.CheckboxControl,{label:(0,d.jsx)("strong",{children:e.title}),help:e.description,checked:(s=e.name,!!g&&(0===g.enabled_extensions.length||g.enabled_extensions.includes(s))),onChange:()=>(e=>{const s=0===g.enabled_extensions.length?o.map(e=>e.name):[...g.enabled_extensions];if(s.includes(e)){const t=s.filter(s=>s!==e);h({...g,enabled_extensions:t})}else h({...g,enabled_extensions:[...s,e]})})(e.name)})},e.name);var s})})]})]})]})}),(0,d.jsx)("div",{className:"designsetgo-save-bar",children:(0,d.jsx)(a.Button,{variant:"primary",onClick:()=>{S(!0),P(null),i()({path:"/designsetgo/v1/settings",method:"POST",data:g}).then(()=>{P({status:"success",message:(0,t.__)("Settings saved successfully! Please refresh any open editor pages to see the changes.","designsetgo")}),S(!1)}).catch(e=>{P({status:"error",message:e.message||(0,t.__)("Failed to save settings.","designsetgo")}),S(!1)})},isBusy:_,disabled:_,children:_?(0,t.__)("Saving…","designsetgo"):(0,t.__)("Save Changes","designsetgo")})})]})},P=({settings:e,updateSetting:n})=>{const[i,l]=(0,s.useState)(!1),[r,c]=(0,s.useState)(!1);return(0,d.jsxs)(a.Card,{className:"designsetgo-settings-panel",children:[(0,d.jsx)(a.CardHeader,{children:(0,d.jsx)("h2",{children:(0,t.__)("Sticky Header","designsetgo")})}),(0,d.jsxs)(a.CardBody,{children:[(0,d.jsx)("p",{className:"designsetgo-panel-description",children:(0,t.__)("Enable sticky header functionality for blocks with position:sticky applied. These settings enhance the default WordPress sticky positioning with additional features.","designsetgo")}),(0,d.jsx)(a.ToggleControl,{label:(0,t.__)("Enable Sticky Header","designsetgo"),help:(0,t.__)("Enable enhanced sticky header functionality.","designsetgo"),checked:e?.sticky_header?.enable||!1,onChange:e=>n("sticky_header","enable",e),__nextHasNoMarginBottom:!0}),e?.sticky_header?.enable&&(0,d.jsxs)("div",{className:"designsetgo-settings-group",children:[(0,d.jsxs)("div",{className:"designsetgo-settings-grid",children:[(0,d.jsx)(a.RangeControl,{label:(0,t.__)("Scroll Threshold (px)","designsetgo"),help:(0,t.__)("Pixels to scroll before effects activate.","designsetgo"),value:e?.sticky_header?.scroll_threshold||50,onChange:e=>n("sticky_header","scroll_threshold",e),min:0,max:500,step:10,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,d.jsx)(a.RangeControl,{label:(0,t.__)("Transition Speed (ms)","designsetgo"),help:(0,t.__)("Animation speed for effects.","designsetgo"),value:e?.sticky_header?.transition_speed||300,onChange:e=>n("sticky_header","transition_speed",e),min:0,max:1e3,step:50,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})]}),(0,d.jsxs)("div",{className:"designsetgo-settings-grid",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)(a.ToggleControl,{label:(0,t.__)("Shadow on Scroll","designsetgo"),help:(0,t.__)("Add shadow when scrolled.","designsetgo"),checked:e?.sticky_header?.shadow_on_scroll||!1,onChange:e=>n("sticky_header","shadow_on_scroll",e),__nextHasNoMarginBottom:!0}),e?.sticky_header?.shadow_on_scroll&&(0,d.jsx)(a.SelectControl,{label:(0,t.__)("Shadow Size","designsetgo"),value:e?.sticky_header?.shadow_size||"medium",options:[{label:(0,t.__)("Small","designsetgo"),value:"small"},{label:(0,t.__)("Medium","designsetgo"),value:"medium"},{label:(0,t.__)("Large","designsetgo"),value:"large"}],onChange:e=>n("sticky_header","shadow_size",e),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)(a.ToggleControl,{label:(0,t.__)("Shrink on Scroll","designsetgo"),help:(0,t.__)("Reduce header height.","designsetgo"),checked:e?.sticky_header?.shrink_on_scroll||!1,onChange:e=>n("sticky_header","shrink_on_scroll",e),__nextHasNoMarginBottom:!0}),e?.sticky_header?.shrink_on_scroll&&(0,d.jsx)(a.RangeControl,{label:(0,t.__)("Shrink Amount (%)","designsetgo"),value:e?.sticky_header?.shrink_amount||20,onChange:e=>n("sticky_header","shrink_amount",e),min:5,max:50,step:5,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})]})]}),(0,d.jsx)(a.ToggleControl,{label:(0,t.__)("Hide Header on Scroll Down","designsetgo"),help:(0,t.__)("Hide header when scrolling down, show when scrolling up.","designsetgo"),checked:e?.sticky_header?.hide_on_scroll_down||!1,onChange:e=>n("sticky_header","hide_on_scroll_down",e),__nextHasNoMarginBottom:!0}),(0,d.jsx)(a.ToggleControl,{label:(0,t.__)("Background Color on Scroll","designsetgo"),help:(0,t.__)("Apply background color when scrolled.","designsetgo"),checked:e?.sticky_header?.background_on_scroll||!1,onChange:e=>n("sticky_header","background_on_scroll",e),__nextHasNoMarginBottom:!0}),e?.sticky_header?.background_on_scroll&&(0,d.jsxs)("div",{className:"designsetgo-color-control-compact",children:[(0,d.jsx)("div",{className:"components-base-control__label",children:(0,t.__)("Background Color","designsetgo")}),(0,d.jsx)(a.ColorPalette,{value:e?.sticky_header?.background_scroll_color||"",onChange:e=>n("sticky_header","background_scroll_color",e||""),colors:[{name:"White",color:"#ffffff"},{name:"Black",color:"#000000"},{name:"Gray",color:"#f0f0f0"},{name:"Blue",color:"#2271b1"},{name:"Dark",color:"#1e1e1e"}],clearable:!0}),(0,d.jsx)(a.RangeControl,{label:(0,t.__)("Background Opacity (%)","designsetgo"),value:e?.sticky_header?.background_scroll_opacity||100,onChange:e=>n("sticky_header","background_scroll_opacity",e),min:0,max:100,step:5,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})]}),(0,d.jsxs)("div",{className:"designsetgo-collapsible-section",children:[(0,d.jsxs)(a.Button,{variant:"link",onClick:()=>l(!i),className:"designsetgo-collapsible-toggle",children:[(0,d.jsx)(o,{icon:i?h:g}),(0,t.__)("Advanced Settings","designsetgo")]}),i&&(0,d.jsxs)("div",{className:"designsetgo-collapsible-content",children:[(0,d.jsx)(a.TextControl,{label:(0,t.__)("Custom CSS Selector","designsetgo"),help:(0,t.__)("Override the default selector if using a custom theme or page builder. Leave empty to use: .wp-block-template-part:has(.is-position-sticky)","designsetgo"),value:e?.sticky_header?.custom_selector||"",onChange:e=>n("sticky_header","custom_selector",e),placeholder:".wp-block-template-part:has(.is-position-sticky)",__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,d.jsx)(a.RangeControl,{label:(0,t.__)("Z-Index","designsetgo"),help:(0,t.__)("Stacking order of the sticky header.","designsetgo"),value:e?.sticky_header?.z_index||100,onChange:e=>n("sticky_header","z_index",e),min:1,max:9999,step:1,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})]})]}),(0,d.jsxs)("div",{className:"designsetgo-collapsible-section",children:[(0,d.jsxs)(a.Button,{variant:"link",onClick:()=>c(!r),className:"designsetgo-collapsible-toggle",children:[(0,d.jsx)(o,{icon:r?h:g}),(0,t.__)("Mobile Settings","designsetgo")]}),r&&(0,d.jsxs)("div",{className:"designsetgo-collapsible-content",children:[(0,d.jsx)(a.ToggleControl,{label:(0,t.__)("Enable on Mobile","designsetgo"),help:(0,t.__)("Enable sticky header on mobile devices.","designsetgo"),checked:e?.sticky_header?.mobile_enabled||!1,onChange:e=>n("sticky_header","mobile_enabled",e),__nextHasNoMarginBottom:!0}),e?.sticky_header?.mobile_enabled&&(0,d.jsx)(a.RangeControl,{label:(0,t.__)("Mobile Breakpoint (px)","designsetgo"),help:(0,t.__)("Screen width below which mobile settings apply.","designsetgo"),value:e?.sticky_header?.mobile_breakpoint||768,onChange:e=>n("sticky_header","mobile_breakpoint",e),min:320,max:1024,step:1,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})]})]})]})]})]})},x=({settings:e,updateSetting:s})=>(0,d.jsxs)(a.Card,{className:"designsetgo-settings-panel",children:[(0,d.jsx)(a.CardHeader,{children:(0,d.jsx)("h2",{children:(0,t.__)("Performance","designsetgo")})}),(0,d.jsxs)(a.CardBody,{children:[(0,d.jsx)("p",{className:"designsetgo-panel-description",children:(0,t.__)("Optimize asset loading and caching to improve site performance.","designsetgo")}),(0,d.jsx)(a.ToggleControl,{label:(0,t.__)("Conditional Asset Loading","designsetgo"),help:(0,t.__)("Load block assets only on pages that use them. Recommended for better performance.","designsetgo"),checked:e?.performance?.conditional_loading||!1,onChange:e=>s("performance","conditional_loading",e),__nextHasNoMarginBottom:!0}),(0,d.jsx)(a.RangeControl,{label:(0,t.__)("Cache Duration (seconds)","designsetgo"),help:(0,t.__)("How long to cache block detection results. Lower values use more resources but detect changes faster.","designsetgo"),value:e?.performance?.cache_duration||3600,onChange:e=>s("performance","cache_duration",e),min:0,max:86400,step:300,marks:[{value:0,label:(0,t.__)("Off","designsetgo")},{value:3600,label:(0,t.__)("1h","designsetgo")},{value:21600,label:(0,t.__)("6h","designsetgo")},{value:86400,label:(0,t.__)("24h","designsetgo")}],__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})]})]}),G=({settings:e,updateSetting:s})=>(0,d.jsxs)(a.Card,{className:"designsetgo-settings-panel",children:[(0,d.jsx)(a.CardHeader,{children:(0,d.jsx)("h2",{children:(0,t.__)("Forms","designsetgo")})}),(0,d.jsxs)(a.CardBody,{children:[(0,d.jsx)("p",{className:"designsetgo-panel-description",children:(0,t.__)("Configure security and data retention for form submissions.","designsetgo")}),(0,d.jsxs)("div",{className:"designsetgo-settings-section",children:[(0,d.jsx)("h3",{className:"designsetgo-section-heading",children:(0,t.__)("Security","designsetgo")}),(0,d.jsx)(a.ToggleControl,{label:(0,t.__)("Enable Honeypot","designsetgo"),help:(0,t.__)("Add a hidden field to detect spam bots. Recommended.","designsetgo"),checked:e?.forms?.enable_honeypot||!1,onChange:e=>s("forms","enable_honeypot",e),__nextHasNoMarginBottom:!0}),(0,d.jsx)(a.ToggleControl,{label:(0,t.__)("Enable Rate Limiting","designsetgo"),help:(0,t.__)("Prevent spam by limiting submission frequency from the same IP.","designsetgo"),checked:e?.forms?.enable_rate_limiting||!1,onChange:e=>s("forms","enable_rate_limiting",e),__nextHasNoMarginBottom:!0})]}),(0,d.jsxs)("div",{className:"designsetgo-settings-section",children:[(0,d.jsx)("h3",{className:"designsetgo-section-heading",children:(0,t.__)("Data Management","designsetgo")}),(0,d.jsx)(a.RangeControl,{label:(0,t.__)("Submission Retention (days)","designsetgo"),help:(0,t.__)("How long to keep form submissions. Set to 0 to keep forever.","designsetgo"),value:e?.forms?.retention_days||30,onChange:e=>s("forms","retention_days",e),min:0,max:365,step:1,marks:[{value:0,label:(0,t.__)("Forever","designsetgo")},{value:30,label:(0,t.__)("30d","designsetgo")},{value:90,label:(0,t.__)("90d","designsetgo")},{value:365,label:(0,t.__)("1yr","designsetgo")}],__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})]})]})]}),V=({settings:e,updateSetting:s})=>(0,d.jsxs)(a.Card,{className:"designsetgo-settings-panel",children:[(0,d.jsx)(a.CardHeader,{children:(0,d.jsx)("h2",{children:(0,t.__)("Animations","designsetgo")})}),(0,d.jsxs)(a.CardBody,{children:[(0,d.jsx)("p",{className:"designsetgo-panel-description",children:(0,t.__)("Configure default animation settings for block entrance and exit effects.","designsetgo")}),(0,d.jsx)(a.ToggleControl,{label:(0,t.__)("Enable Animations","designsetgo"),help:(0,t.__)("Enable block entrance/exit animations globally.","designsetgo"),checked:e?.animations?.enable_animations||!1,onChange:e=>s("animations","enable_animations",e),__nextHasNoMarginBottom:!0}),e?.animations?.enable_animations&&(0,d.jsxs)("div",{className:"designsetgo-settings-group",children:[(0,d.jsx)(a.RangeControl,{label:(0,t.__)("Default Duration (ms)","designsetgo"),help:(0,t.__)("Default animation duration in milliseconds.","designsetgo"),value:e?.animations?.default_duration||600,onChange:e=>s("animations","default_duration",e),min:100,max:2e3,step:100,marks:[{value:300,label:(0,t.__)("Fast","designsetgo")},{value:600,label:(0,t.__)("Normal","designsetgo")},{value:1e3,label:(0,t.__)("Slow","designsetgo")}],__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,d.jsx)(a.SelectControl,{label:(0,t.__)("Default Easing","designsetgo"),help:(0,t.__)("Default animation timing function.","designsetgo"),value:e?.animations?.default_easing||"ease-in-out",options:[{label:(0,t.__)("Ease","designsetgo"),value:"ease"},{label:(0,t.__)("Ease In","designsetgo"),value:"ease-in"},{label:(0,t.__)("Ease Out","designsetgo"),value:"ease-out"},{label:(0,t.__)("Ease In Out","designsetgo"),value:"ease-in-out"},{label:(0,t.__)("Linear","designsetgo"),value:"linear"}],onChange:e=>s("animations","default_easing",e),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,d.jsxs)("div",{className:"designsetgo-settings-section",children:[(0,d.jsx)("h3",{className:"designsetgo-section-heading",children:(0,t.__)("Accessibility","designsetgo")}),(0,d.jsx)(a.ToggleControl,{label:(0,t.__)("Respect Prefers Reduced Motion","designsetgo"),help:(0,t.__)("Disable animations for users who prefer reduced motion. Highly recommended for accessibility.","designsetgo"),checked:e?.animations?.respect_prefers_reduced_motion||!1,onChange:e=>s("animations","respect_prefers_reduced_motion",e),__nextHasNoMarginBottom:!0})]})]})]})]}),u=({settings:e,updateSetting:s})=>(0,d.jsxs)(a.Card,{className:"designsetgo-settings-panel",children:[(0,d.jsx)(a.CardHeader,{children:(0,d.jsx)("h2",{children:(0,t.__)("Security & Privacy","designsetgo")})}),(0,d.jsxs)(a.CardBody,{children:[(0,d.jsx)("p",{className:"designsetgo-panel-description",children:(0,t.__)("Control what data is logged with form submissions. Consider your privacy policy when enabling these options.","designsetgo")}),(0,d.jsx)(a.Notice,{status:"info",isDismissible:!1,children:(0,t.__)("These settings affect form submissions only. Consider privacy regulations (GDPR, CCPA) when collecting user data.","designsetgo")}),(0,d.jsx)(a.ToggleControl,{label:(0,t.__)("Log IP Addresses","designsetgo"),help:(0,t.__)("Store IP addresses with form submissions for spam detection.","designsetgo"),checked:e?.security?.log_ip_addresses||!1,onChange:e=>s("security","log_ip_addresses",e),__nextHasNoMarginBottom:!0}),(0,d.jsx)(a.ToggleControl,{label:(0,t.__)("Log User Agents","designsetgo"),help:(0,t.__)("Store browser user agent strings for analytics and troubleshooting.","designsetgo"),checked:e?.security?.log_user_agents||!1,onChange:e=>s("security","log_user_agents",e),__nextHasNoMarginBottom:!0}),(0,d.jsx)(a.ToggleControl,{label:(0,t.__)("Log Referrers","designsetgo"),help:(0,t.__)("Store referrer URLs to track where submissions originate.","designsetgo"),checked:e?.security?.log_referrers||!1,onChange:e=>s("security","log_referrers",e),__nextHasNoMarginBottom:!0})]})]}),p=({settings:e,updateSetting:s})=>(0,d.jsxs)(a.Card,{className:"designsetgo-settings-panel",children:[(0,d.jsx)(a.CardHeader,{children:(0,d.jsx)("h2",{children:(0,t.__)("Integrations","designsetgo")})}),(0,d.jsxs)(a.CardBody,{children:[(0,d.jsx)("p",{className:"designsetgo-panel-description",children:(0,t.__)("Configure third-party service API keys and credentials.","designsetgo")}),(0,d.jsxs)("div",{className:"designsetgo-settings-section",children:[(0,d.jsx)("h3",{className:"designsetgo-section-heading",children:(0,t.__)("Google Maps","designsetgo")}),(0,d.jsx)(a.TextControl,{label:(0,t.__)("Google Maps API Key","designsetgo"),help:(0,d.jsxs)(d.Fragment,{children:[(0,t.__)("Enter your Google Maps JavaScript API key.","designsetgo"),(0,d.jsx)(a.ExternalLink,{href:"https://console.cloud.google.com/apis/credentials",children:(0,t.__)("Get your API key from Google Cloud Console","designsetgo")})]}),type:"password",value:e?.integrations?.google_maps_api_key||"",onChange:e=>s("integrations","google_maps_api_key",e),placeholder:(0,t.__)("AIza…","designsetgo"),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,d.jsxs)("div",{className:"designsetgo-settings-note",children:[(0,d.jsx)("strong",{children:(0,t.__)("⚠️ Important Security Notice:","designsetgo")}),(0,d.jsx)("p",{children:(0,t.__)("Always configure HTTP referrer restrictions in the Google Cloud Console to prevent unauthorized use of your API key. This is critical for security and preventing unexpected charges.","designsetgo")})]})]})]})]}),b=()=>{const[e,n]=(0,s.useState)(null),[o,l]=(0,s.useState)(!0),[g,h]=(0,s.useState)(!1),[r,c]=(0,s.useState)(null);(0,s.useEffect)(()=>{i()({path:"/designsetgo/v1/settings"}).then(e=>{n(e),l(!1)}).catch(()=>{c({status:"error",message:(0,t.__)("Failed to load settings.","designsetgo")}),l(!1)})},[]),(0,s.useEffect)(()=>{if("success"===r?.status){const e=setTimeout(()=>{c(null)},3e3);return()=>clearTimeout(e)}},[r]);const _=(s,t,a)=>{n({...e,[s]:{...e[s],[t]:a}})};return o?(0,d.jsx)("div",{className:"designsetgo-admin-loading",children:(0,d.jsx)(a.Spinner,{})}):(0,d.jsxs)("div",{className:"designsetgo-settings",children:[(0,d.jsxs)("div",{className:"designsetgo-settings__header",children:[(0,d.jsx)("h1",{children:(0,t.__)("Settings","designsetgo")}),(0,d.jsx)("p",{className:"description",children:(0,t.__)("Configure performance, forms, animations, sticky header, and security options.","designsetgo")})]}),r&&(0,d.jsx)("div",{style:{position:"fixed",top:"32px",right:"20px",zIndex:1e5,maxWidth:"400px",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.15)"},children:(0,d.jsx)(a.Notice,{status:r.status,onRemove:()=>c(null),isDismissible:!0,children:r.message})}),(0,d.jsx)("div",{className:"designsetgo-settings-tabs",children:(0,d.jsx)(a.TabPanel,{className:"designsetgo-tab-panel",tabs:[{name:"features",title:(0,t.__)("Features","designsetgo"),className:"designsetgo-tab-features"},{name:"optimization",title:(0,t.__)("Optimization","designsetgo"),className:"designsetgo-tab-optimization"},{name:"integrations",title:(0,t.__)("Integrations","designsetgo"),className:"designsetgo-tab-integrations"}],children:s=>(0,d.jsxs)("div",{className:"designsetgo-tab-content",children:["features"===s.name&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(P,{settings:e,updateSetting:_}),(0,d.jsx)(G,{settings:e,updateSetting:_}),(0,d.jsx)(V,{settings:e,updateSetting:_})]}),"optimization"===s.name&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(x,{settings:e,updateSetting:_}),(0,d.jsx)(u,{settings:e,updateSetting:_})]}),"integrations"===s.name&&(0,d.jsx)(p,{settings:e,updateSetting:_})]})})}),(0,d.jsx)("div",{className:"designsetgo-save-bar",children:(0,d.jsx)(a.Button,{variant:"primary",onClick:()=>{h(!0),c(null),i()({path:"/designsetgo/v1/settings",method:"POST",data:e}).then(()=>{c({status:"success",message:(0,t.__)("Settings saved successfully!","designsetgo")}),h(!1)}).catch(e=>{c({status:"error",message:e.message||(0,t.__)("Failed to save settings.","designsetgo")}),h(!1)})},isBusy:g,disabled:g,children:g?(0,t.__)("Saving…","designsetgo"):(0,t.__)("Save Changes","designsetgo")})})]})},j=()=>{const{currentPage:e}=window.designSetGoAdmin||{};let s;switch(e){case"blocks":s=m;break;case"settings":s=b;break;default:s=S}return(0,d.jsx)("div",{className:"designsetgo-admin-wrapper",children:(0,d.jsx)(s,{})})};document.addEventListener("DOMContentLoaded",()=>{const e=document.getElementById("designsetgo-admin-root");e&&(0,s.createRoot)(e).render((0,d.jsx)(j,{}))})})();
  • designsetgo/trunk/designsetgo.php

    r3396027 r3396076  
    44 * Plugin URI:        https://designsetgoblocks.com
    55 * Description:       Professional Gutenberg block library with 47 blocks plus 7 universal extensions - complete Form Builder, container system, interactive elements, and more. Built with WordPress standards for guaranteed editor/frontend parity.
    6  * Version:           1.0.1
     6 * Version:           1.1.0
    77 * Requires at least: 6.0
    88 * Requires PHP:      7.4
     
    2323}
    2424
    25 define( 'DESIGNSETGO_VERSION', '1.0.1' );
     25define( 'DESIGNSETGO_VERSION', '1.1.0' );
    2626define( 'DESIGNSETGO_FILE', __FILE__ );
    2727define( 'DESIGNSETGO_PATH', plugin_dir_path( __FILE__ ) );
  • designsetgo/trunk/includes/admin/class-settings.php

    r3395924 r3396076  
    5858                'log_user_agents'  => true,
    5959                'log_referrers'    => false,
     60            ),
     61            'integrations'       => array(
     62                'google_maps_api_key' => '',
    6063            ),
    6164            'sticky_header'      => array(
     
    665668                'log_user_agents'  => isset( $settings['security']['log_user_agents'] ) ? (bool) $settings['security']['log_user_agents'] : true,
    666669                'log_referrers'    => isset( $settings['security']['log_referrers'] ) ? (bool) $settings['security']['log_referrers'] : false,
     670            );
     671        }
     672
     673        // Sanitize integrations settings.
     674        if ( isset( $settings['integrations'] ) && is_array( $settings['integrations'] ) ) {
     675            $sanitized['integrations'] = array(
     676                'google_maps_api_key' => isset( $settings['integrations']['google_maps_api_key'] ) ? sanitize_text_field( $settings['integrations']['google_maps_api_key'] ) : '',
    667677            );
    668678        }
  • designsetgo/trunk/includes/class-plugin.php

    r3395924 r3396076  
    215215        // Add block category.
    216216        add_filter( 'block_categories_all', array( $this, 'register_block_category' ), 10, 2 );
     217
     218        // Inject API keys into Map block on render.
     219        add_filter( 'render_block', array( $this, 'inject_map_api_key' ), 10, 2 );
    217220    }
    218221
     
    250253                )
    251254            );
     255
     256            // Localize integrations settings (Google Maps API key, etc.).
     257            $integrations_settings = isset( $settings['integrations'] ) ? $settings['integrations'] : array();
     258            $integrations_defaults = isset( $defaults['integrations'] ) ? $defaults['integrations'] : array();
     259            $integrations_settings = wp_parse_args( $integrations_settings, $integrations_defaults );
     260
     261            wp_localize_script(
     262                'designsetgo-block-category-filter',
     263                'dsgoIntegrations',
     264                array(
     265                    'googleMapsApiKey' => ! empty( $integrations_settings['google_maps_api_key'] ) ? $integrations_settings['google_maps_api_key'] : '',
     266                )
     267            );
    252268        }
    253269    }
     
    269285        return $categories;
    270286    }
     287
     288    /**
     289     * Inject Google Maps API key into Map block on render.
     290     *
     291     * Security Note: Google Maps JavaScript API keys are designed to be public
     292     * (client-side). Security is enforced through:
     293     * 1. HTTP referrer restrictions (configured in Google Cloud Console)
     294     * 2. API quotas and billing limits
     295     * 3. Rate limiting
     296     *
     297     * This is the standard recommended approach per Google's documentation.
     298     * Users are warned to configure referrer restrictions in the settings panel.
     299     *
     300     * @param string $block_content Block HTML content.
     301     * @param array  $block         Block data including name and attributes.
     302     * @return string Modified block content.
     303     */
     304    public function inject_map_api_key( $block_content, $block ) {
     305        // Only process the Map block.
     306        if ( 'designsetgo/map' !== $block['blockName'] ) {
     307            return $block_content;
     308        }
     309
     310        // Get settings.
     311        $settings = \DesignSetGo\Admin\Settings::get_settings();
     312
     313        // Get Google Maps API key from settings.
     314        $api_key = isset( $settings['integrations']['google_maps_api_key'] )
     315            ? $settings['integrations']['google_maps_api_key']
     316            : '';
     317
     318        // If no API key or not using Google Maps, return unmodified content.
     319        if ( empty( $api_key ) ) {
     320            return $block_content;
     321        }
     322
     323        // Only inject if the block is using Google Maps provider.
     324        $provider = isset( $block['attrs']['dsgoProvider'] ) ? $block['attrs']['dsgoProvider'] : 'openstreetmap';
     325        if ( 'googlemaps' !== $provider ) {
     326            return $block_content;
     327        }
     328
     329        // Inject API key as a data attribute.
     330        // Find the opening div tag with class dsgo-map.
     331        $pattern     = '/(<div[^>]*class="[^"]*dsgo-map[^"]*"[^>]*)/';
     332        $replacement = '$1 data-dsgo-api-key="' . esc_attr( $api_key ) . '"';
     333
     334        return preg_replace( $pattern, $replacement, $block_content, 1 );
     335    }
    271336}
  • designsetgo/trunk/readme.txt

    r3395943 r3396076  
    66Tested up to: 6.8
    77Requires PHP: 7.4
    8 Stable tag: 1.0.1
     8Stable tag: 1.1.0
    99License: GPLv2 or later
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
    1111
    12 Professional WordPress blocks without page builder bloat. 47 blocks + 7 universal extensions that enhance ANY block.
     12Professional WordPress blocks without page builder bloat. 49 blocks + 7 universal extensions that enhance ANY block.
    1313
    1414== Description ==
     
    2121
    2222✓ **Works Like WordPress** - If you know blocks, you know DesignSetGo. No separate interface, no learning curve.
    23 ✓ **47 Blocks, One Plugin** - Replaces multiple plugins: forms, sliders, tabs, accordions, counters, and more.
     23✓ **49 Blocks, One Plugin** - Replaces multiple plugins: forms, sliders, tabs, accordions, counters, cards, maps, and more.
    2424✓ **7 Universal Extensions** - Add animations, responsive visibility, sticky headers, and custom CSS to ANY WordPress block (including core blocks).
    2525✓ **Performance First** - Lightweight code, no jQuery, optimized bundles. Your site stays fast.
     
    3838Tabs, accordions, flip cards, sliders, scroll effects, counters, progress bars, and revealing content. All with smooth animations and mobile-responsive behavior.
    3939
    40 **Visual Components (13 blocks)**
    41 Icons (500+), icon buttons, icon lists, pills/badges, dividers (8 styles), countdown timers, and organic blob shapes for modern designs.
     40**Visual Components (15 blocks)**
     41Icons (500+), icon buttons, icon lists, pills/badges, dividers (8 styles), countdown timers, organic blob shapes, content cards with multiple layout presets, and interactive maps with Google Maps and OpenStreetMap support.
    4242
    4343**Universal Extensions (7 extensions)**
     
    139139== Changelog ==
    140140
     141= 1.1.0 - 2025-11-14 =
     142**New Blocks:**
     143* New: Card block with multiple layout presets (horizontal, vertical, overlay, compact, featured)
     144* New: Map block with Google Maps and OpenStreetMap support, privacy mode, and customizable markers
     145
     146**Admin Interface Overhaul:**
     147* New: Completely redesigned admin dashboard with stat cards showing blocks, extensions, and form submissions
     148* New: Enhanced dashboard displays blocks organized by category and extension status pills
     149* New: Tabbed settings interface organized into Features, Optimization, and Integrations tabs
     150* New: Google Maps API key management in Settings > Integrations with security guidance
     151* Enhancement: Two-column grid layouts for improved settings panel space efficiency
     152* Enhancement: Gradient icon stat cards with hover effects for better visual hierarchy
     153* Enhancement: Collapsible sections for advanced settings to reduce vertical scroll
     154
     155**Translations:**
     156* Enhancement: Added translation support for 9 languages (Spanish, French, German, Italian, Portuguese, Dutch, Russian, Chinese, Japanese)
     157* Enhancement: Updated POT file with 100% translation coverage for all admin strings
     158
     159**Security & Bug Fixes:**
     160* Security: Fixed js-yaml prototype pollution vulnerability (CVE-2023-2251)
     161* Fix: Added missing ToggleControl import to Card block editor component
     162* Fix: Google Maps API key now persists correctly after save/reload
     163* Fix: API key properly exposed to frontend via data attributes with secure referrer-based protection
     164
    141165= 1.0.1 - 2025-11-14 =
    142166* Docs: Streamlined readme.txt with JTBD-focused messaging for better scannability
Note: See TracChangeset for help on using the changeset viewer.