diff --git a/404.html b/404.html index 86dbbeac4..fa96ad413 100644 --- a/404.html +++ b/404.html @@ -1,9 +1,9 @@ - + - -Page Not Found | Eightshift Development kit + +Page Not Found | Eightshift Development kit @@ -14,14 +14,11 @@ - - - + + + -
-
Skip to main content

Page Not Found

We could not find what you were looking for.

Please contact the owner of the site that linked you to the original URL and let them know their link is broken.

- - +
Skip to main content

Page Not Found

We could not find what you were looking for.

Please contact the owner of the site that linked you to the original URL and let them know their link is broken.

\ No newline at end of file diff --git a/assets/css/styles.95e70fd0.css b/assets/css/styles.95e70fd0.css new file mode 100644 index 000000000..f3169c9b1 --- /dev/null +++ b/assets/css/styles.95e70fd0.css @@ -0,0 +1 @@ +@import url(https://use.typekit.net/baz1roy.css);.col,.container{padding:0 var(--ifm-spacing-horizontal);width:100%}.markdown>h2,.markdown>h3,.markdown>h4,.markdown>h5,.markdown>h6{margin-bottom:calc(var(--ifm-heading-vertical-rhythm-bottom)*var(--ifm-leading))}blockquote,pre{margin:0 0 var(--ifm-spacing-vertical)}.breadcrumbs__link,.button{transition-timing-function:var(--ifm-transition-timing-default)}.button--outline.button--active,.button--outline:active,.button--outline:hover,:root{--ifm-button-color:var(--ifm-font-color-base-inverse)}.menu__link:hover,a{transition:color var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.navbar--dark,:root{--ifm-navbar-link-hover-color:var(--ifm-color-primary)}.menu,.navbar-sidebar{overflow-x:hidden}:root,html[data-theme=dark]{--ifm-color-emphasis-500:var(--ifm-color-gray-500)}.markdown li,body{word-wrap:break-word}pre,table{overflow:auto}.button,code{vertical-align:middle}.group:focus .group-focus\:scale-75,.group:hover .group-hover\:scale-75{--tw-scale-x:.75;--tw-scale-y:.75}*,.markdown .alert,:after,:before{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000}.DocSearch-Modal .DocSearch-Hits .DocSearch-Hit,.DocSearch-Modal .DocSearch-HitsFooter a{transition-duration:.15s!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.toggleButton_gllP,html{-webkit-tap-highlight-color:transparent}*,.DocSearch-Container,.DocSearch-Container *,:after,:before{box-sizing:border-box}:root{--ifm-color-scheme:light;--ifm-dark-value:10%;--ifm-darker-value:15%;--ifm-darkest-value:30%;--ifm-light-value:15%;--ifm-lighter-value:30%;--ifm-lightest-value:50%;--ifm-contrast-background-value:90%;--ifm-contrast-foreground-value:70%;--ifm-contrast-background-dark-value:70%;--ifm-contrast-foreground-dark-value:90%;--ifm-color-primary:#3578e5;--ifm-color-secondary:#ebedf0;--ifm-color-success:#00a400;--ifm-color-info:#54c7ec;--ifm-color-warning:#ffba00;--ifm-color-danger:#fa383e;--ifm-color-primary-dark:#306cce;--ifm-color-primary-darker:#2d66c3;--ifm-color-primary-darkest:#2554a0;--ifm-color-primary-light:#538ce9;--ifm-color-primary-lighter:#72a1ed;--ifm-color-primary-lightest:#9abcf2;--ifm-color-primary-contrast-background:#ebf2fc;--ifm-color-primary-contrast-foreground:#102445;--ifm-color-secondary-dark:#d4d5d8;--ifm-color-secondary-darker:#c8c9cc;--ifm-color-secondary-darkest:#a4a6a8;--ifm-color-secondary-light:#eef0f2;--ifm-color-secondary-lighter:#f1f2f5;--ifm-color-secondary-lightest:#f5f6f8;--ifm-color-secondary-contrast-background:#fdfdfe;--ifm-color-secondary-contrast-foreground:#474748;--ifm-color-success-dark:#009400;--ifm-color-success-darker:#008b00;--ifm-color-success-darkest:#007300;--ifm-color-success-light:#26b226;--ifm-color-success-lighter:#4dbf4d;--ifm-color-success-lightest:#80d280;--ifm-color-success-contrast-background:#e6f6e6;--ifm-color-success-contrast-foreground:#003100;--ifm-color-info-dark:#4cb3d4;--ifm-color-info-darker:#47a9c9;--ifm-color-info-darkest:#3b8ba5;--ifm-color-info-light:#6ecfef;--ifm-color-info-lighter:#87d8f2;--ifm-color-info-lightest:#aae3f6;--ifm-color-info-contrast-background:#eef9fd;--ifm-color-info-contrast-foreground:#193c47;--ifm-color-warning-dark:#e6a700;--ifm-color-warning-darker:#d99e00;--ifm-color-warning-darkest:#b38200;--ifm-color-warning-light:#ffc426;--ifm-color-warning-lighter:#ffcf4d;--ifm-color-warning-lightest:#ffdd80;--ifm-color-warning-contrast-background:#fff8e6;--ifm-color-warning-contrast-foreground:#4d3800;--ifm-color-danger-dark:#e13238;--ifm-color-danger-darker:#d53035;--ifm-color-danger-darkest:#af272b;--ifm-color-danger-light:#fb565b;--ifm-color-danger-lighter:#fb7478;--ifm-color-danger-lightest:#fd9c9f;--ifm-color-danger-contrast-background:#ffebec;--ifm-color-danger-contrast-foreground:#4b1113;--ifm-color-white:#fff;--ifm-color-black:#000;--ifm-color-gray-0:var(--ifm-color-white);--ifm-color-gray-100:#f5f6f7;--ifm-color-gray-200:#ebedf0;--ifm-color-gray-300:#dadde1;--ifm-color-gray-400:#ccd0d5;--ifm-color-gray-500:#bec3c9;--ifm-color-gray-600:#8d949e;--ifm-color-gray-700:#606770;--ifm-color-gray-800:#444950;--ifm-color-gray-900:#1c1e21;--ifm-color-gray-1000:var(--ifm-color-black);--ifm-color-emphasis-0:var(--ifm-color-gray-0);--ifm-color-emphasis-100:var(--ifm-color-gray-100);--ifm-color-emphasis-200:var(--ifm-color-gray-200);--ifm-color-emphasis-300:var(--ifm-color-gray-300);--ifm-color-emphasis-400:var(--ifm-color-gray-400);--ifm-color-emphasis-600:var(--ifm-color-gray-600);--ifm-color-emphasis-700:var(--ifm-color-gray-700);--ifm-color-emphasis-800:var(--ifm-color-gray-800);--ifm-color-emphasis-900:var(--ifm-color-gray-900);--ifm-color-emphasis-1000:var(--ifm-color-gray-1000);--ifm-color-content:var(--ifm-color-emphasis-900);--ifm-color-content-inverse:var(--ifm-color-emphasis-0);--ifm-color-content-secondary:#525860;--ifm-background-color:#0000;--ifm-background-surface-color:var(--ifm-color-content-inverse);--ifm-global-border-width:1px;--ifm-global-radius:0.4rem;--ifm-hover-overlay:#0000000d;--ifm-font-color-base:var(--ifm-color-content);--ifm-font-color-base-inverse:var(--ifm-color-content-inverse);--ifm-font-color-secondary:var(--ifm-color-content-secondary);--ifm-font-family-base:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";--ifm-font-family-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--ifm-font-size-base:100%;--ifm-font-weight-light:300;--ifm-font-weight-normal:400;--ifm-font-weight-semibold:500;--ifm-font-weight-bold:700;--ifm-font-weight-base:var(--ifm-font-weight-normal);--ifm-line-height-base:1.65;--ifm-global-spacing:1rem;--ifm-spacing-vertical:var(--ifm-global-spacing);--ifm-spacing-horizontal:var(--ifm-global-spacing);--ifm-transition-fast:200ms;--ifm-transition-slow:400ms;--ifm-transition-timing-default:cubic-bezier(0.08,0.52,0.52,1);--ifm-global-shadow-lw:0 1px 2px 0 #0000001a;--ifm-global-shadow-md:0 5px 40px #0003;--ifm-global-shadow-tl:0 12px 28px 0 #0003,0 2px 4px 0 #0000001a;--ifm-z-index-dropdown:100;--ifm-z-index-fixed:200;--ifm-z-index-overlay:400;--ifm-container-width:1140px;--ifm-container-width-xl:1320px;--ifm-code-background:#f6f7f8;--ifm-code-border-radius:var(--ifm-global-radius);--ifm-code-font-size:90%;--ifm-code-padding-horizontal:0.1rem;--ifm-code-padding-vertical:0.1rem;--ifm-pre-background:var(--ifm-code-background);--ifm-pre-border-radius:var(--ifm-code-border-radius);--ifm-pre-color:inherit;--ifm-pre-line-height:1.45;--ifm-pre-padding:1rem;--ifm-heading-color:inherit;--ifm-heading-margin-top:0;--ifm-heading-margin-bottom:var(--ifm-spacing-vertical);--ifm-heading-font-family:var(--ifm-font-family-base);--ifm-heading-font-weight:var(--ifm-font-weight-bold);--ifm-heading-line-height:1.25;--ifm-h1-font-size:2rem;--ifm-h2-font-size:1.5rem;--ifm-h3-font-size:1.25rem;--ifm-h4-font-size:1rem;--ifm-h5-font-size:0.875rem;--ifm-h6-font-size:0.85rem;--ifm-image-alignment-padding:1.25rem;--ifm-leading-desktop:1.25;--ifm-leading:calc(var(--ifm-leading-desktop)*1rem);--ifm-list-left-padding:2rem;--ifm-list-margin:1rem;--ifm-list-item-margin:0.25rem;--ifm-list-paragraph-margin:1rem;--ifm-table-cell-padding:0.75rem;--ifm-table-background:#0000;--ifm-table-stripe-background:#00000008;--ifm-table-border-width:1px;--ifm-table-border-color:var(--ifm-color-emphasis-300);--ifm-table-head-background:inherit;--ifm-table-head-color:inherit;--ifm-table-head-font-weight:var(--ifm-font-weight-bold);--ifm-table-cell-color:inherit;--ifm-link-color:var(--ifm-color-primary);--ifm-link-decoration:none;--ifm-link-hover-color:var(--ifm-link-color);--ifm-link-hover-decoration:underline;--ifm-paragraph-margin-bottom:var(--ifm-leading);--ifm-blockquote-font-size:var(--ifm-font-size-base);--ifm-blockquote-border-left-width:2px;--ifm-blockquote-padding-horizontal:var(--ifm-spacing-horizontal);--ifm-blockquote-padding-vertical:0;--ifm-blockquote-shadow:none;--ifm-blockquote-color:var(--ifm-color-emphasis-800);--ifm-blockquote-border-color:var(--ifm-color-emphasis-300);--ifm-hr-background-color:var(--ifm-color-emphasis-500);--ifm-hr-height:1px;--ifm-hr-margin-vertical:1.5rem;--ifm-scrollbar-size:7px;--ifm-scrollbar-track-background-color:#f1f1f1;--ifm-scrollbar-thumb-background-color:silver;--ifm-scrollbar-thumb-hover-background-color:#a7a7a7;--ifm-alert-background-color:inherit;--ifm-alert-border-color:inherit;--ifm-alert-border-radius:var(--ifm-global-radius);--ifm-alert-border-width:0px;--ifm-alert-border-left-width:5px;--ifm-alert-color:var(--ifm-font-color-base);--ifm-alert-padding-horizontal:var(--ifm-spacing-horizontal);--ifm-alert-padding-vertical:var(--ifm-spacing-vertical);--ifm-alert-shadow:var(--ifm-global-shadow-lw);--ifm-avatar-intro-margin:1rem;--ifm-avatar-intro-alignment:inherit;--ifm-avatar-photo-size:3rem;--ifm-badge-background-color:inherit;--ifm-badge-border-color:inherit;--ifm-badge-border-radius:var(--ifm-global-radius);--ifm-badge-border-width:var(--ifm-global-border-width);--ifm-badge-color:var(--ifm-color-white);--ifm-badge-padding-horizontal:calc(var(--ifm-spacing-horizontal)*0.5);--ifm-badge-padding-vertical:calc(var(--ifm-spacing-vertical)*0.25);--ifm-breadcrumb-border-radius:1.5rem;--ifm-breadcrumb-spacing:0.5rem;--ifm-breadcrumb-color-active:var(--ifm-color-primary);--ifm-breadcrumb-item-background-active:var(--ifm-hover-overlay);--ifm-breadcrumb-padding-horizontal:0.8rem;--ifm-breadcrumb-padding-vertical:0.4rem;--ifm-breadcrumb-size-multiplier:1;--ifm-breadcrumb-separator:url('data:image/svg+xml;utf8,');--ifm-breadcrumb-separator-filter:none;--ifm-breadcrumb-separator-size:0.5rem;--ifm-breadcrumb-separator-size-multiplier:1.25;--ifm-button-background-color:inherit;--ifm-button-border-color:var(--ifm-button-background-color);--ifm-button-border-width:var(--ifm-global-border-width);--ifm-button-font-weight:var(--ifm-font-weight-bold);--ifm-button-padding-horizontal:1.5rem;--ifm-button-padding-vertical:0.375rem;--ifm-button-size-multiplier:1;--ifm-button-transition-duration:var(--ifm-transition-fast);--ifm-button-border-radius:calc(var(--ifm-global-radius)*var(--ifm-button-size-multiplier));--ifm-button-group-spacing:2px;--ifm-card-background-color:var(--ifm-background-surface-color);--ifm-card-border-radius:calc(var(--ifm-global-radius)*2);--ifm-card-horizontal-spacing:var(--ifm-global-spacing);--ifm-card-vertical-spacing:var(--ifm-global-spacing);--ifm-toc-border-color:var(--ifm-color-emphasis-300);--ifm-toc-link-color:var(--ifm-color-content-secondary);--ifm-toc-padding-vertical:0.5rem;--ifm-toc-padding-horizontal:0.5rem;--ifm-dropdown-background-color:var(--ifm-background-surface-color);--ifm-dropdown-font-weight:var(--ifm-font-weight-semibold);--ifm-dropdown-link-color:var(--ifm-font-color-base);--ifm-dropdown-hover-background-color:var(--ifm-hover-overlay);--ifm-footer-background-color:var(--ifm-color-emphasis-100);--ifm-footer-color:inherit;--ifm-footer-link-color:var(--ifm-color-emphasis-700);--ifm-footer-link-hover-color:var(--ifm-color-primary);--ifm-footer-link-horizontal-spacing:0.5rem;--ifm-footer-padding-horizontal:calc(var(--ifm-spacing-horizontal)*2);--ifm-footer-padding-vertical:calc(var(--ifm-spacing-vertical)*2);--ifm-footer-title-color:inherit;--ifm-footer-logo-max-width:min(30rem,90vw);--ifm-hero-background-color:var(--ifm-background-surface-color);--ifm-hero-text-color:var(--ifm-color-emphasis-800);--ifm-menu-color:var(--ifm-color-emphasis-700);--ifm-menu-color-active:var(--ifm-color-primary);--ifm-menu-color-background-active:var(--ifm-hover-overlay);--ifm-menu-color-background-hover:var(--ifm-hover-overlay);--ifm-menu-link-padding-horizontal:0.75rem;--ifm-menu-link-padding-vertical:0.375rem;--ifm-menu-link-sublist-icon:url('data:image/svg+xml;utf8,');--ifm-menu-link-sublist-icon-filter:none;--ifm-navbar-background-color:var(--ifm-background-surface-color);--ifm-navbar-height:3.75rem;--ifm-navbar-item-padding-horizontal:0.75rem;--ifm-navbar-item-padding-vertical:0.25rem;--ifm-navbar-link-color:var(--ifm-font-color-base);--ifm-navbar-link-active-color:var(--ifm-link-color);--ifm-navbar-padding-horizontal:var(--ifm-spacing-horizontal);--ifm-navbar-padding-vertical:calc(var(--ifm-spacing-vertical)*0.5);--ifm-navbar-shadow:var(--ifm-global-shadow-lw);--ifm-navbar-search-input-background-color:var(--ifm-color-emphasis-200);--ifm-navbar-search-input-color:var(--ifm-color-emphasis-800);--ifm-navbar-search-input-placeholder-color:var(--ifm-color-emphasis-500);--ifm-navbar-search-input-icon:url('data:image/svg+xml;utf8,');--ifm-navbar-sidebar-width:83vw;--ifm-pagination-border-radius:var(--ifm-global-radius);--ifm-pagination-color-active:var(--ifm-color-primary);--ifm-pagination-font-size:1rem;--ifm-pagination-item-active-background:var(--ifm-hover-overlay);--ifm-pagination-page-spacing:0.2em;--ifm-pagination-padding-horizontal:calc(var(--ifm-spacing-horizontal)*1);--ifm-pagination-padding-vertical:calc(var(--ifm-spacing-vertical)*0.25);--ifm-pagination-nav-border-radius:var(--ifm-global-radius);--ifm-pagination-nav-color-hover:var(--ifm-color-primary);--ifm-pills-color-active:var(--ifm-color-primary);--ifm-pills-color-background-active:var(--ifm-hover-overlay);--ifm-pills-spacing:0.125rem;--ifm-tabs-color:var(--ifm-font-color-secondary);--ifm-tabs-color-active:var(--ifm-color-primary);--ifm-tabs-color-active-border:var(--ifm-tabs-color-active);--ifm-tabs-padding-horizontal:1rem;--ifm-tabs-padding-vertical:1rem}.badge--danger,.badge--info,.badge--primary,.badge--secondary,.badge--success,.badge--warning{--ifm-badge-border-color:var(--ifm-badge-background-color)}.button--link,.button--outline{--ifm-button-background-color:#0000}html{-webkit-font-smoothing:antialiased;-moz-text-size-adjust:100%;text-size-adjust:100%;background-color:var(--ifm-background-color);color:var(--ifm-font-color-base);color-scheme:var(--ifm-color-scheme);font:var(--ifm-font-size-base)/var(--ifm-line-height-base) var(--ifm-font-family-base);text-rendering:optimizelegibility}iframe{border:0;color-scheme:auto}.container{margin:0 auto;max-width:var(--ifm-container-width)}.container--fluid{max-width:inherit}.row{display:flex;flex-wrap:wrap;margin:0 calc(var(--ifm-spacing-horizontal)*-1)}.margin-bottom--none,.margin-vert--none,.markdown>:last-child{margin-bottom:0!important}.margin-top--none,.margin-vert--none{margin-top:0!important}.row--no-gutters{margin-left:0;margin-right:0}.margin-horiz--none,.margin-right--none{margin-right:0!important}.row--no-gutters>.col{padding-left:0;padding-right:0}.items-start,.row--align-top{align-items:flex-start}.row--align-bottom{align-items:flex-end}.items-center,.menuExternalLink_NmtK,.row--align-center{align-items:center}.row--align-stretch{align-items:stretch}.row--align-baseline{align-items:baseline}.col{--ifm-col-width:100%;flex:1 0;margin-left:0;max-width:var(--ifm-col-width)}.padding-bottom--none,.padding-vert--none{padding-bottom:0!important}.padding-top--none,.padding-vert--none{padding-top:0!important}.padding-horiz--none,.padding-left--none{padding-left:0!important}.padding-horiz--none,.padding-right--none{padding-right:0!important}.col[class*=col--]{flex:0 0 var(--ifm-col-width)}.col--1{--ifm-col-width:8.33333%}.col--offset-1{margin-left:8.33333%}.col--2{--ifm-col-width:16.66667%}.col--offset-2{margin-left:16.66667%}.col--3{--ifm-col-width:25%}.col--offset-3{margin-left:25%}.col--4{--ifm-col-width:33.33333%}.col--offset-4{margin-left:33.33333%}.col--5{--ifm-col-width:41.66667%}.col--offset-5{margin-left:41.66667%}.col--6{--ifm-col-width:50%}.col--offset-6{margin-left:50%}.col--7{--ifm-col-width:58.33333%}.col--offset-7{margin-left:58.33333%}.col--8{--ifm-col-width:66.66667%}.col--offset-8{margin-left:66.66667%}.col--9{--ifm-col-width:75%}.col--offset-9{margin-left:75%}.col--10{--ifm-col-width:83.33333%}.col--offset-10{margin-left:83.33333%}.col--11{--ifm-col-width:91.66667%}.col--offset-11{margin-left:91.66667%}.col--12{--ifm-col-width:100%}.col--offset-12{margin-left:100%}.margin-horiz--none,.margin-left--none{margin-left:0!important}.margin--none{margin:0!important}.margin-bottom--xs,.margin-vert--xs{margin-bottom:.25rem!important}.margin-top--xs,.margin-vert--xs{margin-top:.25rem!important}.margin-horiz--xs,.margin-left--xs{margin-left:.25rem!important}.margin-horiz--xs,.margin-right--xs{margin-right:.25rem!important}.margin--xs{margin:.25rem!important}.margin-bottom--sm,.margin-vert--sm{margin-bottom:.5rem!important}.margin-top--sm,.margin-vert--sm,.theme-doc-sidebar-item-link.theme-doc-sidebar-item-link-level-1:first-child{margin-top:.5rem!important}.margin-horiz--sm,.margin-left--sm{margin-left:.5rem!important}.margin-horiz--sm,.margin-right--sm{margin-right:.5rem!important}.margin--sm{margin:.5rem!important}.margin-bottom--md,.margin-vert--md{margin-bottom:1rem!important}.DocSearch-Modal .DocSearch-Hits,.margin-top--md,.margin-vert--md{margin-top:1rem!important}.margin-horiz--md,.margin-left--md{margin-left:1rem!important}.margin-horiz--md,.margin-right--md{margin-right:1rem!important}.margin--md{margin:1rem!important}.margin-bottom--lg,.margin-vert--lg{margin-bottom:2rem!important}.margin-top--lg,.margin-vert--lg{margin-top:2rem!important}.margin-horiz--lg,.margin-left--lg{margin-left:2rem!important}.margin-horiz--lg,.margin-right--lg{margin-right:2rem!important}.margin--lg{margin:2rem!important}.margin-bottom--xl,.margin-vert--xl{margin-bottom:5rem!important}.margin-top--xl,.margin-vert--xl{margin-top:5rem!important}.margin-horiz--xl,.margin-left--xl{margin-left:5rem!important}.margin-horiz--xl,.margin-right--xl{margin-right:5rem!important}.margin--xl{margin:5rem!important}.padding--none{padding:0!important}.padding-bottom--xs,.padding-vert--xs{padding-bottom:.25rem!important}.padding-top--xs,.padding-vert--xs{padding-top:.25rem!important}.padding-horiz--xs,.padding-left--xs{padding-left:.25rem!important}.padding-horiz--xs,.padding-right--xs{padding-right:.25rem!important}.padding--xs{padding:.25rem!important}.padding-bottom--sm,.padding-vert--sm{padding-bottom:.5rem!important}.padding-top--sm,.padding-vert--sm{padding-top:.5rem!important}.padding-horiz--sm,.padding-left--sm{padding-left:.5rem!important}.padding-horiz--sm,.padding-right--sm{padding-right:.5rem!important}.padding--sm{padding:.5rem!important}.padding-bottom--md,.padding-vert--md{padding-bottom:1rem!important}.padding-top--md,.padding-vert--md{padding-top:1rem!important}.padding-horiz--md,.padding-left--md{padding-left:1rem!important}.padding-horiz--md,.padding-right--md{padding-right:1rem!important}.padding--md{padding:1rem!important}.padding-bottom--lg,.padding-vert--lg{padding-bottom:2rem!important}.padding-top--lg,.padding-vert--lg{padding-top:2rem!important}.padding-horiz--lg,.padding-left--lg{padding-left:2rem!important}.padding-horiz--lg,.padding-right--lg{padding-right:2rem!important}.padding--lg{padding:2rem!important}.padding-bottom--xl,.padding-vert--xl{padding-bottom:5rem!important}.padding-top--xl,.padding-vert--xl{padding-top:5rem!important}.padding-horiz--xl,.padding-left--xl{padding-left:5rem!important}.padding-horiz--xl,.padding-right--xl{padding-right:5rem!important}.padding--xl{padding:5rem!important}code{background-color:var(--ifm-code-background);border:.1rem solid #0000001a;border-radius:var(--ifm-code-border-radius);font-family:var(--ifm-font-family-monospace);font-size:var(--ifm-code-font-size);padding:var(--ifm-code-padding-vertical) var(--ifm-code-padding-horizontal)}progress,sub,sup{vertical-align:initial}a code{color:inherit}pre{background-color:var(--ifm-pre-background);border-radius:var(--ifm-pre-border-radius);color:var(--ifm-pre-color);font:var(--ifm-code-font-size)/var(--ifm-pre-line-height) var(--ifm-font-family-monospace);padding:var(--ifm-pre-padding)}pre code{background-color:initial;border:none;font-size:100%;line-height:inherit;padding:0}kbd{background-color:var(--ifm-color-emphasis-0);border:1px solid var(--ifm-color-emphasis-400);border-radius:.2rem;box-shadow:inset 0 -1px 0 var(--ifm-color-emphasis-400);color:var(--ifm-color-emphasis-800);font:80% var(--ifm-font-family-monospace);padding:.15rem .3rem}h1,h2,h3,h4,h5,h6{color:var(--ifm-heading-color);font-family:var(--ifm-heading-font-family);font-weight:var(--ifm-heading-font-weight);line-height:var(--ifm-heading-line-height);margin:var(--ifm-heading-margin-top) 0 var(--ifm-heading-margin-bottom) 0}h1{font-size:var(--ifm-h1-font-size)}h2{font-size:var(--ifm-h2-font-size)}h3{font-size:var(--ifm-h3-font-size)}h4{font-size:var(--ifm-h4-font-size)}h5{font-size:var(--ifm-h5-font-size)}h6{font-size:var(--ifm-h6-font-size)}img[align=right]{padding-left:var(--image-alignment-padding)}img[align=left]{padding-right:var(--image-alignment-padding)}.markdown{--ifm-h1-vertical-rhythm-top:3;--ifm-h2-vertical-rhythm-top:2;--ifm-h3-vertical-rhythm-top:1.5;--ifm-heading-vertical-rhythm-top:1.25;--ifm-h1-vertical-rhythm-bottom:1.25;--ifm-heading-vertical-rhythm-bottom:1}.markdown:after,.markdown:before{content:"";display:table}.markdown:after{clear:both}.markdown h1:first-child{--ifm-h1-font-size:3rem;margin-bottom:calc(var(--ifm-h1-vertical-rhythm-bottom)*var(--ifm-leading))}.markdown>h2{--ifm-h2-font-size:2rem;margin-top:calc(var(--ifm-h2-vertical-rhythm-top)*var(--ifm-leading))}.markdown>h3{--ifm-h3-font-size:1.5rem;margin-top:calc(var(--ifm-h3-vertical-rhythm-top)*var(--ifm-leading))}.markdown>h4,.markdown>h5,.markdown>h6{margin-top:calc(var(--ifm-heading-vertical-rhythm-top)*var(--ifm-leading))}.markdown>p,.markdown>pre,.markdown>ul{margin-bottom:var(--ifm-leading)}.markdown li>p{margin-top:var(--ifm-list-paragraph-margin)}.markdown li+li{margin-top:var(--ifm-list-item-margin)}ol,ul{margin:0 0 var(--ifm-list-margin);padding-left:var(--ifm-list-left-padding)}.markdown ol ol ol,ol ol,ul ol{list-style-type:lower-roman}ol ol,ol ul,ul ol,ul ul{margin:0}.markdown ol ol ol ol ol,ol ol ol,ol ul ol,ul ol ol,ul ul ol{list-style-type:lower-alpha}table thead tr{border-bottom:2px solid var(--ifm-table-border-color)}table thead,table tr:nth-child(2n){background-color:var(--ifm-table-stripe-background)}table tr{background-color:var(--ifm-table-background);border-top:var(--ifm-table-border-width) solid var(--ifm-table-border-color)}table td,table th{border:var(--ifm-table-border-width) solid var(--ifm-table-border-color);padding:var(--ifm-table-cell-padding)}table th{background-color:var(--ifm-table-head-background);color:var(--ifm-table-head-color);font-weight:var(--ifm-table-head-font-weight)}table td{color:var(--ifm-table-cell-color)}strong{font-weight:var(--ifm-font-weight-bold)}a{color:var(--ifm-link-color);text-decoration:var(--ifm-link-decoration);color:inherit;text-decoration:inherit}a:hover{color:var(--ifm-link-hover-color);text-decoration:var(--ifm-link-hover-decoration)}.button:hover,.text--no-decoration,.text--no-decoration:hover,a:not([href]){text-decoration:none}p{margin:0 0 var(--ifm-paragraph-margin-bottom)}blockquote{border-left:var(--ifm-blockquote-border-left-width) solid var(--ifm-blockquote-border-color);box-shadow:var(--ifm-blockquote-shadow);color:var(--ifm-blockquote-color);font-size:var(--ifm-blockquote-font-size);padding:var(--ifm-blockquote-padding-vertical) var(--ifm-blockquote-padding-horizontal)}blockquote>:first-child{margin-top:0}blockquote>:last-child{margin-bottom:0}hr{background-color:var(--ifm-hr-background-color);border:0;height:var(--ifm-hr-height);margin:var(--ifm-hr-margin-vertical) 0}.shadow--lw{box-shadow:var(--ifm-global-shadow-lw)!important}.shadow--md{box-shadow:var(--ifm-global-shadow-md)!important}.shadow--tl{box-shadow:var(--ifm-global-shadow-tl)!important}.text--primary,.wordWrapButtonEnabled_EoeP .wordWrapButtonIcon_Bwma{color:var(--ifm-color-primary)}.text--secondary{color:var(--ifm-color-secondary)}.text--success{color:var(--ifm-color-success)}.text--info{color:var(--ifm-color-info)}.text--warning{color:var(--ifm-color-warning)}.text--danger{color:var(--ifm-color-danger)}.clean-btn,hr{color:inherit}.text--center{text-align:center}.text--left{text-align:left}.text--justify{text-align:justify}.text--right{text-align:right}.text--capitalize{text-transform:capitalize}.text--lowercase{text-transform:lowercase}.text--uppercase,.uppercase{text-transform:uppercase}.text--light{font-weight:var(--ifm-font-weight-light)}.text--normal{font-weight:var(--ifm-font-weight-normal)}.text--semibold{font-weight:var(--ifm-font-weight-semibold)}.text--bold{font-weight:var(--ifm-font-weight-bold)}.text--italic{font-style:italic}.text--truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text--break{word-wrap:break-word!important;word-break:break-word!important}.clean-btn{background:none;border:none;cursor:pointer;font-family:inherit;padding:0}.alert,.alert .close{color:var(--ifm-alert-foreground-color)}.clean-list{list-style:none;padding-left:0}.alert--primary{--ifm-alert-background-color:var(--ifm-color-primary-contrast-background);--ifm-alert-background-color-highlight:#3578e526;--ifm-alert-foreground-color:var(--ifm-color-primary-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-primary-dark)}.alert--secondary{--ifm-alert-background-color:var(--ifm-color-secondary-contrast-background);--ifm-alert-background-color-highlight:#ebedf026;--ifm-alert-foreground-color:var(--ifm-color-secondary-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-secondary-dark)}.alert--success{--ifm-alert-background-color:var(--ifm-color-success-contrast-background);--ifm-alert-background-color-highlight:#00a40026;--ifm-alert-foreground-color:var(--ifm-color-success-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-success-dark)}.alert--info{--ifm-alert-background-color:var(--ifm-color-info-contrast-background);--ifm-alert-background-color-highlight:#54c7ec26;--ifm-alert-foreground-color:var(--ifm-color-info-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-info-dark)}.alert--warning{--ifm-alert-background-color:var(--ifm-color-warning-contrast-background);--ifm-alert-background-color-highlight:#ffba0026;--ifm-alert-foreground-color:var(--ifm-color-warning-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-warning-dark)}.alert--danger{--ifm-alert-background-color:var(--ifm-color-danger-contrast-background);--ifm-alert-background-color-highlight:#fa383e26;--ifm-alert-foreground-color:var(--ifm-color-danger-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-danger-dark)}.alert{--ifm-code-background:var(--ifm-alert-background-color-highlight);--ifm-link-color:var(--ifm-alert-foreground-color);--ifm-link-hover-color:var(--ifm-alert-foreground-color);--ifm-link-decoration:underline;--ifm-tabs-color:var(--ifm-alert-foreground-color);--ifm-tabs-color-active:var(--ifm-alert-foreground-color);--ifm-tabs-color-active-border:var(--ifm-alert-border-color);background-color:var(--ifm-alert-background-color);border:var(--ifm-alert-border-width) solid var(--ifm-alert-border-color);border-left-width:var(--ifm-alert-border-left-width);border-radius:var(--ifm-alert-border-radius);box-shadow:var(--ifm-alert-shadow);padding:var(--ifm-alert-padding-vertical) var(--ifm-alert-padding-horizontal)}.alert__heading{align-items:center;display:flex;font:700 var(--ifm-h5-font-size)/var(--ifm-heading-line-height) var(--ifm-heading-font-family);margin-bottom:.5rem;text-transform:uppercase}.alert__icon{display:inline-flex;margin-right:.4em}.alert__icon svg{fill:var(--ifm-alert-foreground-color);stroke:var(--ifm-alert-foreground-color);stroke-width:0}.alert .close{margin:calc(var(--ifm-alert-padding-vertical)*-1) calc(var(--ifm-alert-padding-horizontal)*-1) 0 0;opacity:.75}.alert .close:focus,.alert .close:hover,.hash-link:focus,:hover>.hash-link{opacity:1}.alert a{text-decoration-color:var(--ifm-alert-border-color)}.alert a:hover{text-decoration-thickness:2px}.avatar{column-gap:var(--ifm-avatar-intro-margin);display:flex}.avatar__photo{border-radius:50%;display:block;height:var(--ifm-avatar-photo-size);overflow:hidden;width:var(--ifm-avatar-photo-size)}.card--full-height,.navbar__logo img,body,html{height:100%}.avatar__photo--sm{--ifm-avatar-photo-size:2rem}.avatar__photo--lg{--ifm-avatar-photo-size:4rem}.avatar__photo--xl{--ifm-avatar-photo-size:6rem}.avatar__intro{display:flex;flex:1 1;flex-direction:column;justify-content:center;text-align:var(--ifm-avatar-intro-alignment)}.badge,.breadcrumbs__item,.breadcrumbs__link,.button,.dropdown>.navbar__link:after{display:inline-block}.avatar__name{font:700 var(--ifm-h4-font-size)/var(--ifm-heading-line-height) var(--ifm-font-family-base)}.avatar__subtitle{margin-top:.25rem}.avatar--vertical{--ifm-avatar-intro-alignment:center;--ifm-avatar-intro-margin:0.5rem;align-items:center;flex-direction:column}.badge{background-color:var(--ifm-badge-background-color);border:var(--ifm-badge-border-width) solid var(--ifm-badge-border-color);border-radius:var(--ifm-badge-border-radius);color:var(--ifm-badge-color);font-size:75%;font-weight:var(--ifm-font-weight-bold);line-height:1;padding:var(--ifm-badge-padding-vertical) var(--ifm-badge-padding-horizontal)}.badge--primary{--ifm-badge-background-color:var(--ifm-color-primary)}.badge--secondary{--ifm-badge-background-color:var(--ifm-color-secondary);color:var(--ifm-color-black)}.breadcrumbs__link,.button.button--secondary.button--outline:not(.button--active):not(:hover){color:var(--ifm-font-color-base)}.badge--success{--ifm-badge-background-color:var(--ifm-color-success)}.badge--info{--ifm-badge-background-color:var(--ifm-color-info)}.badge--warning{--ifm-badge-background-color:var(--ifm-color-warning)}.badge--danger{--ifm-badge-background-color:var(--ifm-color-danger)}.breadcrumbs__item:not(:last-child):after{background:var(--ifm-breadcrumb-separator) center;content:" ";display:inline-block;filter:var(--ifm-breadcrumb-separator-filter);height:calc(var(--ifm-breadcrumb-separator-size)*var(--ifm-breadcrumb-size-multiplier)*var(--ifm-breadcrumb-separator-size-multiplier));margin:0 var(--ifm-breadcrumb-spacing);opacity:.5;width:calc(var(--ifm-breadcrumb-separator-size)*var(--ifm-breadcrumb-size-multiplier)*var(--ifm-breadcrumb-separator-size-multiplier))}.breadcrumbs__item--active .breadcrumbs__link{background:var(--ifm-breadcrumb-item-background-active);color:var(--ifm-breadcrumb-color-active)}.breadcrumbs__link{border-radius:var(--ifm-breadcrumb-border-radius);font-size:calc(1rem*var(--ifm-breadcrumb-size-multiplier));padding:calc(var(--ifm-breadcrumb-padding-vertical)*var(--ifm-breadcrumb-size-multiplier)) calc(var(--ifm-breadcrumb-padding-horizontal)*var(--ifm-breadcrumb-size-multiplier));transition-duration:var(--ifm-transition-fast);transition-property:background,color}.breadcrumbs__link:any-link:hover,.breadcrumbs__link:link:hover,.breadcrumbs__link:visited:hover,area[href].breadcrumbs__link:hover{background:var(--ifm-breadcrumb-item-background-active);text-decoration:none}.breadcrumbs--sm{--ifm-breadcrumb-size-multiplier:0.8}.breadcrumbs--lg{--ifm-breadcrumb-size-multiplier:1.2}.button{background-color:var(--ifm-button-background-color);border:var(--ifm-button-border-width) solid var(--ifm-button-border-color);border-radius:var(--ifm-button-border-radius);cursor:pointer;font-size:calc(.875rem*var(--ifm-button-size-multiplier));font-weight:var(--ifm-button-font-weight);line-height:1.5;padding:calc(var(--ifm-button-padding-vertical)*var(--ifm-button-size-multiplier)) calc(var(--ifm-button-padding-horizontal)*var(--ifm-button-size-multiplier));text-align:center;transition-duration:var(--ifm-button-transition-duration);transition-property:color,background,border-color;-webkit-user-select:none;user-select:none;white-space:nowrap}.hash-link,.select-none{-webkit-user-select:none}.button,.button:hover{color:var(--ifm-button-color)}.button--outline{--ifm-button-color:var(--ifm-button-border-color)}.button--outline:hover{--ifm-button-background-color:var(--ifm-button-border-color)}.button--link{--ifm-button-border-color:#0000;color:var(--ifm-link-color);text-decoration:var(--ifm-link-decoration)}.button--link.button--active,.button--link:active,.button--link:hover{color:var(--ifm-link-hover-color);text-decoration:var(--ifm-link-hover-decoration)}.button.disabled,.button:disabled,.button[disabled]{opacity:.65;pointer-events:none}.button--sm{--ifm-button-size-multiplier:0.8}.button--lg{--ifm-button-size-multiplier:1.35}.button--block{display:block;width:100%}.button.button--secondary{color:var(--ifm-color-gray-900)}:where(.button--primary){--ifm-button-background-color:var(--ifm-color-primary);--ifm-button-border-color:var(--ifm-color-primary)}:where(.button--primary):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-primary-dark);--ifm-button-border-color:var(--ifm-color-primary-dark)}.button--primary.button--active,.button--primary:active{--ifm-button-background-color:var(--ifm-color-primary-darker);--ifm-button-border-color:var(--ifm-color-primary-darker)}:where(.button--secondary){--ifm-button-background-color:var(--ifm-color-secondary);--ifm-button-border-color:var(--ifm-color-secondary)}:where(.button--secondary):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-secondary-dark);--ifm-button-border-color:var(--ifm-color-secondary-dark)}.button--secondary.button--active,.button--secondary:active{--ifm-button-background-color:var(--ifm-color-secondary-darker);--ifm-button-border-color:var(--ifm-color-secondary-darker)}:where(.button--success){--ifm-button-background-color:var(--ifm-color-success);--ifm-button-border-color:var(--ifm-color-success)}:where(.button--success):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-success-dark);--ifm-button-border-color:var(--ifm-color-success-dark)}.button--success.button--active,.button--success:active{--ifm-button-background-color:var(--ifm-color-success-darker);--ifm-button-border-color:var(--ifm-color-success-darker)}:where(.button--info){--ifm-button-background-color:var(--ifm-color-info);--ifm-button-border-color:var(--ifm-color-info)}:where(.button--info):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-info-dark);--ifm-button-border-color:var(--ifm-color-info-dark)}.button--info.button--active,.button--info:active{--ifm-button-background-color:var(--ifm-color-info-darker);--ifm-button-border-color:var(--ifm-color-info-darker)}:where(.button--warning){--ifm-button-background-color:var(--ifm-color-warning);--ifm-button-border-color:var(--ifm-color-warning)}:where(.button--warning):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-warning-dark);--ifm-button-border-color:var(--ifm-color-warning-dark)}.button--warning.button--active,.button--warning:active{--ifm-button-background-color:var(--ifm-color-warning-darker);--ifm-button-border-color:var(--ifm-color-warning-darker)}:where(.button--danger){--ifm-button-background-color:var(--ifm-color-danger);--ifm-button-border-color:var(--ifm-color-danger)}:where(.button--danger):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-danger-dark);--ifm-button-border-color:var(--ifm-color-danger-dark)}.button--danger.button--active,.button--danger:active{--ifm-button-background-color:var(--ifm-color-danger-darker);--ifm-button-border-color:var(--ifm-color-danger-darker)}.button-group{display:inline-flex;gap:var(--ifm-button-group-spacing)}.button-group>.button:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.button-group>.button:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.button-group--block{display:flex;justify-content:stretch}.button-group--block>.button{flex-grow:1}.card{background-color:var(--ifm-card-background-color);border-radius:var(--ifm-card-border-radius);box-shadow:var(--ifm-global-shadow-lw);display:flex;flex-direction:column;overflow:hidden}.card__image{padding-top:var(--ifm-card-vertical-spacing)}.card__image:first-child,.pt-0{padding-top:0}.card__body,.card__footer,.card__header{padding:var(--ifm-card-vertical-spacing) var(--ifm-card-horizontal-spacing)}.card__body:not(:last-child),.card__footer:not(:last-child),.card__header:not(:last-child){padding-bottom:0}.card__body>:last-child,.card__footer>:last-child,.card__header>:last-child{margin-bottom:0}.card__footer{margin-top:auto}.table-of-contents{font-size:.8rem;margin-bottom:0;padding:var(--ifm-toc-padding-vertical) 0}.table-of-contents,.table-of-contents ul{list-style:none;padding-left:var(--ifm-toc-padding-horizontal)}.table-of-contents li{margin:var(--ifm-toc-padding-vertical) var(--ifm-toc-padding-horizontal)}.table-of-contents__left-border{border-left:1px solid var(--ifm-toc-border-color)}.table-of-contents__link{color:var(--ifm-toc-link-color);display:block}.table-of-contents__link--active,.table-of-contents__link--active code,.table-of-contents__link:hover,.table-of-contents__link:hover code{color:var(--ifm-color-primary);text-decoration:none}.close{color:var(--ifm-color-black);float:right;font-size:1.5rem;font-weight:var(--ifm-font-weight-bold);line-height:1;opacity:.5;padding:1rem;transition:opacity var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.close:hover{opacity:.7}.close:focus,.theme-code-block-highlighted-line .codeLineNumber_Tfdd:before{opacity:.8}.dropdown{display:inline-flex;font-weight:var(--ifm-dropdown-font-weight);position:relative;vertical-align:top}.dropdown--hoverable:hover .dropdown__menu,.dropdown--show .dropdown__menu{opacity:1;pointer-events:all;transform:translateY(-1px);visibility:visible}#nprogress,.dropdown__menu,.navbar__item.dropdown .navbar__link:not([href]){pointer-events:none}.dropdown--right .dropdown__menu{left:inherit;right:0}.dropdown--nocaret .navbar__link:after{content:none!important}.dropdown__menu{background-color:var(--ifm-dropdown-background-color);border-radius:var(--ifm-global-radius);box-shadow:var(--ifm-global-shadow-md);left:0;list-style:none;max-height:80vh;min-width:10rem;opacity:0;overflow-y:auto;padding:.5rem;position:absolute;top:calc(100% - var(--ifm-navbar-item-padding-vertical) + .3rem);transform:translateY(-.625rem);transition-duration:var(--ifm-transition-fast);transition-property:opacity,transform,visibility;transition-timing-function:var(--ifm-transition-timing-default);visibility:hidden;z-index:var(--ifm-z-index-dropdown)}.menu__caret,.menu__link,.menu__list-item-collapsible{border-radius:.25rem;transition:background var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.dropdown__link{border-radius:.25rem;color:var(--ifm-dropdown-link-color);display:block;font-size:.875rem;margin-top:.2rem;padding:.25rem .5rem;white-space:nowrap}.dropdown__link--active,.dropdown__link:hover{background-color:var(--ifm-dropdown-hover-background-color);color:var(--ifm-dropdown-link-color);text-decoration:none}.dropdown__link--active,.dropdown__link--active:hover{--ifm-dropdown-link-color:var(--ifm-link-color)}.dropdown>.navbar__link:after{border-color:currentcolor #0000;border-style:solid;border-width:.4em .4em 0;content:"";margin-left:.3em;position:relative;top:2px;transform:translateY(-50%)}.footer{background-color:var(--ifm-footer-background-color);color:var(--ifm-footer-color);padding:var(--ifm-footer-padding-vertical) var(--ifm-footer-padding-horizontal)}.footer--dark{--ifm-footer-background-color:#303846;--ifm-footer-color:var(--ifm-footer-link-color);--ifm-footer-link-color:var(--ifm-color-secondary);--ifm-footer-title-color:var(--ifm-color-white)}.footer__links,.mb-4{margin-bottom:1rem}.footer__link-item{color:var(--ifm-footer-link-color);line-height:2}.footer__link-item:hover{color:var(--ifm-footer-link-hover-color)}.footer__link-separator{margin:0 var(--ifm-footer-link-horizontal-spacing)}.footer__logo{margin-top:1rem;max-width:var(--ifm-footer-logo-max-width)}.footer__title{color:var(--ifm-footer-title-color);font:700 var(--ifm-h4-font-size)/var(--ifm-heading-line-height) var(--ifm-font-family-base);margin-bottom:var(--ifm-heading-margin-bottom)}.menu,.navbar__link{font-weight:var(--ifm-font-weight-semibold)}.docItemContainer_Djhp article>:first-child,.docItemContainer_Djhp header+*,.footer__item{margin-top:0}.markdown ol,.markdown ul{margin:1rem 0 1rem 1rem}.collapsibleContent_i85q p:last-child,.details_lb9f>summary>p:last-child,.footer__items{margin-bottom:0}.blog-list-page .main-wrapper .container>.row>main article footer>.col,.blog-tags-post-list-page .main-wrapper .container>.row>main article footer>.col,.codeBlockStandalone_MEMb,[type=checkbox],fieldset,legend{padding:0}.hero{align-items:center;background-color:var(--ifm-hero-background-color);color:var(--ifm-hero-text-color);display:flex;padding:4rem 2rem}.hero--primary{--ifm-hero-background-color:var(--ifm-color-primary);--ifm-hero-text-color:var(--ifm-font-color-base-inverse)}.hero--dark{--ifm-hero-background-color:#303846;--ifm-hero-text-color:var(--ifm-color-white)}.hero__title,.title_f1Hy{font-size:3rem}.hero__subtitle{font-size:1.5rem}.menu__list{list-style:none;margin:0;padding-left:0}.menu__caret,.menu__link{padding:var(--ifm-menu-link-padding-vertical) var(--ifm-menu-link-padding-horizontal)}.menu__list .menu__list{flex:0 0 100%;margin-top:.25rem;padding-left:var(--ifm-menu-link-padding-horizontal)}.menu__list-item:not(:first-child){margin-top:.25rem}.menu__list-item--collapsed .menu__list{height:0;overflow:hidden}.details_lb9f[data-collapsed=false].isBrowser_bmU9>summary:before,.details_lb9f[open]:not(.isBrowser_bmU9)>summary:before,.menu__list-item--collapsed .menu__caret:before,.menu__list-item--collapsed .menu__link--sublist:after{transform:rotate(90deg)}.menu__list-item-collapsible{display:flex;flex-wrap:wrap;position:relative}.menu__caret:hover,.menu__link:hover,.menu__list-item-collapsible--active,.menu__list-item-collapsible:hover{background:var(--ifm-menu-color-background-hover)}.DocSearch-Modal .DocSearch-Hit-action-button:hover,.menu__list-item-collapsible .menu__link--active,.menu__list-item-collapsible .menu__link:hover{background:none!important}.menu__caret,.menu__link{align-items:center;display:flex}.navbar-sidebar,.navbar-sidebar__backdrop{bottom:0;opacity:0;transition-duration:var(--ifm-transition-fast);transition-timing-function:ease-in-out;left:0;top:0;visibility:hidden}.menu__link{color:var(--ifm-menu-color);flex:1;line-height:1.25}.menu__link:hover{color:var(--ifm-menu-color);text-decoration:none}.menu__caret:before,.menu__link--sublist-caret:after{content:"";height:1.25rem;transform:rotate(180deg);transition:transform var(--ifm-transition-fast) linear;width:1.25rem;filter:var(--ifm-menu-link-sublist-icon-filter)}.menu__link--sublist-caret:after{background:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem;margin-left:auto;min-width:1.25rem}.menu__link--active,.menu__link--active:hover{color:var(--ifm-menu-color-active)}.navbar__brand,.navbar__link{color:var(--ifm-navbar-link-color)}.menu__link--active:not(.menu__link--sublist){background-color:var(--ifm-menu-color-background-active)}.menu__caret:before{background:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem}.navbar--dark,html[data-theme=dark]{--ifm-menu-link-sublist-icon-filter:invert(100%) sepia(94%) saturate(17%) hue-rotate(223deg) brightness(104%) contrast(98%)}.navbar{background-color:var(--ifm-navbar-background-color);box-shadow:var(--ifm-navbar-shadow);height:var(--ifm-navbar-height);padding:var(--ifm-navbar-padding-vertical) var(--ifm-navbar-padding-horizontal)}.flex,.navbar,.navbar>.container,.navbar>.container-fluid{display:flex}.navbar--fixed-top{position:-webkit-sticky;position:sticky;top:0;z-index:var(--ifm-z-index-fixed)}.navbar__inner{display:flex;flex-wrap:wrap;justify-content:space-between;width:100%}.navbar__brand{align-items:center;display:flex;margin-right:1rem;min-width:0}.navbar__brand:hover{color:var(--ifm-navbar-link-hover-color);text-decoration:none}.announcementBarContent_xLdY,.navbar__title,main .container>.row>.col--3{flex:1 1 auto}.navbar__toggle{display:none;margin-right:.5rem}.navbar__logo{flex:0 0 auto;height:2rem;margin-right:.5rem}.m-0,.navbar__items--center .navbar__brand,blockquote,body,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,menu,ol,p,pre,ul{margin:0}.navbar__items{align-items:center;display:flex;flex:1;min-width:0}.navbar__items--center{flex:0 0 auto}.navbar__items--center+.navbar__items--right{flex:1}.navbar__items--right{flex:0 0 auto;justify-content:flex-end}.navbar__items--right>:last-child,.pr-0{padding-right:0}.navbar__item{display:inline-block;padding:var(--ifm-navbar-item-padding-vertical) var(--ifm-navbar-item-padding-horizontal)}.navbar__link--active,.navbar__link:hover{color:var(--ifm-navbar-link-hover-color);text-decoration:none}.navbar--dark,.navbar--primary{--ifm-menu-color:var(--ifm-color-gray-300);--ifm-navbar-link-color:var(--ifm-color-gray-100);--ifm-navbar-search-input-background-color:#ffffff1a;--ifm-navbar-search-input-placeholder-color:#ffffff80;color:var(--ifm-color-white)}.navbar--dark{--ifm-navbar-background-color:#242526;--ifm-menu-color-background-active:#ffffff0d;--ifm-navbar-search-input-color:var(--ifm-color-white)}.navbar--primary{--ifm-navbar-background-color:var(--ifm-color-primary);--ifm-navbar-link-hover-color:var(--ifm-color-white);--ifm-menu-color-active:var(--ifm-color-white);--ifm-navbar-search-input-color:var(--ifm-color-emphasis-500)}.navbar__search-input{-webkit-appearance:none;appearance:none;background:var(--ifm-navbar-search-input-background-color) var(--ifm-navbar-search-input-icon) no-repeat .75rem center/1rem 1rem;border:none;border-radius:2rem;color:var(--ifm-navbar-search-input-color);cursor:text;display:inline-block;font-size:.9rem;height:2rem;padding:0 .5rem 0 2.25rem;width:12.5rem}.cursor-pointer,.pills__item,.tabs__item,[role=button],button{cursor:pointer}.navbar__search-input::placeholder{color:var(--ifm-navbar-search-input-placeholder-color)}.navbar-sidebar{background-color:var(--ifm-navbar-background-color);box-shadow:var(--ifm-global-shadow-md);position:fixed;transform:translate3d(-100%,0,0);transition-property:opacity,visibility,transform;width:var(--ifm-navbar-sidebar-width)}.navbar-sidebar--show .navbar-sidebar,.navbar-sidebar__items{transform:translateZ(0)}.navbar-sidebar--show .navbar-sidebar,.navbar-sidebar--show .navbar-sidebar__backdrop{opacity:1;visibility:visible}.navbar-sidebar__backdrop{background-color:#0009;position:fixed;right:0;transition-property:opacity,visibility}.relative,sub,sup{position:relative}.navbar-sidebar__brand{align-items:center;box-shadow:var(--ifm-navbar-shadow);display:flex;flex:1;height:var(--ifm-navbar-height);padding:var(--ifm-navbar-padding-vertical) var(--ifm-navbar-padding-horizontal)}.navbar-sidebar__items{display:flex;height:calc(100% - var(--ifm-navbar-height));transition:transform var(--ifm-transition-fast) ease-in-out}.navbar-sidebar__items--show-secondary{transform:translate3d(calc((var(--ifm-navbar-sidebar-width))*-1),0,0)}.navbar-sidebar__item{flex-shrink:0;padding:.5rem;width:calc(var(--ifm-navbar-sidebar-width))}.navbar-sidebar__back{background:var(--ifm-menu-color-background-active);font-size:15px;font-weight:var(--ifm-button-font-weight);margin:0 0 .2rem -.5rem;padding:.6rem 1.5rem;position:relative;text-align:left;top:-.5rem;width:calc(100% + 1rem)}.mt-10,.my-10{margin-top:2.5rem}.navbar-sidebar__close{display:flex;margin-left:auto}.pagination{column-gap:var(--ifm-pagination-page-spacing);display:flex;font-size:var(--ifm-pagination-font-size);padding-left:0}.pagination--sm{--ifm-pagination-font-size:0.8rem;--ifm-pagination-padding-horizontal:0.8rem;--ifm-pagination-padding-vertical:0.2rem}.pagination--lg{--ifm-pagination-font-size:1.2rem;--ifm-pagination-padding-horizontal:1.2rem;--ifm-pagination-padding-vertical:0.3rem}.inline-flex,.pagination__item{display:inline-flex}.pagination__item>span{padding:var(--ifm-pagination-padding-vertical)}.pagination__item--active .pagination__link{color:var(--ifm-pagination-color-active)}.pagination__item--active .pagination__link,.pagination__item:not(.pagination__item--active):hover .pagination__link{background:var(--ifm-pagination-item-active-background)}.pagination__item--disabled,.pagination__item[disabled]{opacity:.25;pointer-events:none}.pagination__link{border-radius:var(--ifm-pagination-border-radius);color:var(--ifm-font-color-base);display:inline-block;padding:var(--ifm-pagination-padding-vertical) var(--ifm-pagination-padding-horizontal);transition:background var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.pagination__link:hover,.sidebarItemLink_mo7H:hover{text-decoration:none}.pagination-nav{grid-gap:var(--ifm-spacing-horizontal);display:grid;gap:var(--ifm-spacing-horizontal);grid-template-columns:repeat(2,1fr)}.pagination-nav__link{border:1px solid var(--ifm-color-emphasis-300);border-radius:var(--ifm-pagination-nav-border-radius);display:block;height:100%;line-height:var(--ifm-heading-line-height);padding:var(--ifm-global-spacing);transition:border-color var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.pagination-nav__link:hover{border-color:var(--ifm-pagination-nav-color-hover);text-decoration:none}.pagination-nav__link--next{grid-column:2/3;text-align:right}.pagination-nav__label{font-size:var(--ifm-h4-font-size);font-weight:var(--ifm-heading-font-weight);word-break:break-word}.pagination-nav__link--prev .pagination-nav__label:before{content:"« "}.pagination-nav__link--next .pagination-nav__label:after{content:" »"}.pagination-nav__sublabel{color:var(--ifm-color-content-secondary);font-size:var(--ifm-h5-font-size);font-weight:var(--ifm-font-weight-semibold);margin-bottom:.25rem}.pills__item,.tabs{font-weight:var(--ifm-font-weight-bold)}.pills{display:flex;gap:var(--ifm-pills-spacing);padding-left:0}.pills__item{border-radius:.5rem;display:inline-block;padding:.25rem 1rem;transition:background var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.pills__item--active{color:var(--ifm-pills-color-active)}.pills__item--active,.pills__item:not(.pills__item--active):hover{background:var(--ifm-pills-color-background-active)}.pills--block{justify-content:stretch}.pills--block .pills__item{flex-grow:1;text-align:center}.tabs{color:var(--ifm-tabs-color);display:flex;margin-bottom:0;overflow-x:auto;padding-left:0}.tabs__item{border-bottom:3px solid #0000;border-radius:var(--ifm-global-radius);display:inline-flex;padding:var(--ifm-tabs-padding-vertical) var(--ifm-tabs-padding-horizontal);transition:background-color var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.tabs__item--active{border-bottom-color:var(--ifm-tabs-color-active-border);border-bottom-left-radius:0;border-bottom-right-radius:0;color:var(--ifm-tabs-color-active)}.text-black,blockquote p{--tw-text-opacity:1;color:rgb(17 17 17/var(--tw-text-opacity))}.tabs__item:hover{background-color:var(--ifm-hover-overlay)}.tabs--block{justify-content:stretch}.tabs--block .tabs__item{flex-grow:1;justify-content:center}html[data-theme=dark]{--ifm-color-scheme:dark;--ifm-color-emphasis-0:var(--ifm-color-gray-1000);--ifm-color-emphasis-100:var(--ifm-color-gray-900);--ifm-color-emphasis-200:var(--ifm-color-gray-800);--ifm-color-emphasis-300:var(--ifm-color-gray-700);--ifm-color-emphasis-400:var(--ifm-color-gray-600);--ifm-color-emphasis-600:var(--ifm-color-gray-400);--ifm-color-emphasis-700:var(--ifm-color-gray-300);--ifm-color-emphasis-800:var(--ifm-color-gray-200);--ifm-color-emphasis-900:var(--ifm-color-gray-100);--ifm-color-emphasis-1000:var(--ifm-color-gray-0);--ifm-background-color:#1b1b1d;--ifm-background-surface-color:#242526;--ifm-hover-overlay:#ffffff0d;--ifm-color-content:#e3e3e3;--ifm-color-content-secondary:#fff;--ifm-breadcrumb-separator-filter:invert(64%) sepia(11%) saturate(0%) hue-rotate(149deg) brightness(99%) contrast(95%);--ifm-code-background:#ffffff1a;--ifm-scrollbar-track-background-color:#444;--ifm-scrollbar-thumb-background-color:#686868;--ifm-scrollbar-thumb-hover-background-color:#7a7a7a;--ifm-table-stripe-background:#ffffff12;--ifm-toc-border-color:var(--ifm-color-emphasis-200);--ifm-color-primary-contrast-background:#102445;--ifm-color-primary-contrast-foreground:#ebf2fc;--ifm-color-secondary-contrast-background:#474748;--ifm-color-secondary-contrast-foreground:#fdfdfe;--ifm-color-success-contrast-background:#003100;--ifm-color-success-contrast-foreground:#e6f6e6;--ifm-color-info-contrast-background:#193c47;--ifm-color-info-contrast-foreground:#eef9fd;--ifm-color-warning-contrast-background:#4d3800;--ifm-color-warning-contrast-foreground:#fff8e6;--ifm-color-danger-contrast-background:#4b1113;--ifm-color-danger-contrast-foreground:#ffebec;--docsearch-text-color:#f5f6f7;--docsearch-container-background:#090a11cc;--docsearch-modal-background:#15172a;--docsearch-modal-shadow:inset 1px 1px 0 0 #2c2e40,0 3px 8px 0 #000309;--docsearch-searchbox-background:#090a11;--docsearch-searchbox-focus-background:#000;--docsearch-hit-color:#bec3c9;--docsearch-hit-shadow:none;--docsearch-hit-background:#090a11;--docsearch-key-gradient:linear-gradient(-26.5deg,#565872,#31355b);--docsearch-key-shadow:inset 0 -2px 0 0 #282d55,inset 0 0 1px 1px #51577d,0 2px 2px 0 #0304094d;--docsearch-footer-background:#1e2136;--docsearch-footer-shadow:inset 0 1px 0 0 #494c6a80,0 -4px 8px 0 #0003;--docsearch-logo-color:#fff;--docsearch-muted-color:#7f8497}:root{--docusaurus-progress-bar-color:var(--ifm-color-primary);--ifm-navbar-height:6.5rem;--ifm-color-primary:var(--global-colors-infinum);--ifm-color-primary-dark:#c32323;--ifm-color-primary-darker:#b82121;--ifm-color-primary-darkest:#981c1c;--ifm-color-primary-light:#dc3e3e;--ifm-color-primary-lighter:#de4949;--ifm-color-primary-lightest:#e46969;--ifm-code-font-size:95%;--ifm-code-background:var(--global-colors-sky70);--docusaurus-announcement-bar-height:auto;--docusaurus-collapse-button-bg:#0000;--docusaurus-collapse-button-bg-hover:#0000001a;--doc-sidebar-width:300px;--doc-sidebar-hidden-width:30px;--docsearch-primary-color:#5468ff;--docsearch-text-color:#1c1e21;--docsearch-spacing:12px;--docsearch-icon-stroke-width:1.4;--docsearch-highlight-color:var(--docsearch-primary-color);--docsearch-muted-color:#969faf;--docsearch-container-background:#656c85cc;--docsearch-logo-color:#5468ff;--docsearch-modal-width:560px;--docsearch-modal-height:600px;--docsearch-modal-background:#f5f6f7;--docsearch-modal-shadow:inset 1px 1px 0 0 #ffffff80,0 3px 8px 0 #555a64;--docsearch-searchbox-height:56px;--docsearch-searchbox-background:#ebedf0;--docsearch-searchbox-focus-background:#fff;--docsearch-searchbox-shadow:inset 0 0 0 2px var(--docsearch-primary-color);--docsearch-hit-height:56px;--docsearch-hit-color:#444950;--docsearch-hit-active-color:#fff;--docsearch-hit-background:#fff;--docsearch-hit-shadow:0 1px 3px 0 #d4d9e1;--docsearch-key-gradient:linear-gradient(-225deg,#d5dbe4,#f8f8f8);--docsearch-key-shadow:inset 0 -2px 0 0 #cdcde6,inset 0 0 1px 1px #fff,0 1px 2px 1px #1e235a66;--docsearch-footer-height:44px;--docsearch-footer-background:#fff;--docsearch-footer-shadow:0 -1px 0 0 #e0e3e8,0 -3px 6px 0 #45629b1f;--docsearch-primary-color:var(--ifm-color-primary);--docsearch-text-color:var(--ifm-font-color-base);--docusaurus-tag-list-border:var(--ifm-color-emphasis-300)}#nprogress .bar{background:var(--docusaurus-progress-bar-color);height:2px;left:0;position:fixed;top:0;width:100%;z-index:1031}#nprogress .peg{box-shadow:0 0 10px var(--docusaurus-progress-bar-color),0 0 5px var(--docusaurus-progress-bar-color);height:100%;opacity:1;position:absolute;right:0;transform:rotate(3deg) translateY(-4px);width:100px}*,:after,:before{border:0 solid;--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.border-t,hr{border-top-width:1px}.DocSearch-Modal .DocSearch-Commands .DocSearch-Commands-Key,.DocSearch.DocSearch-Button .DocSearch-Button-Key{border-radius:.25rem!important;font-family:ibm-plex-mono,monospace!important;height:1.25rem!important;top:0!important;width:1.25rem!important;padding:0!important}:after,:before{--tw-content:""}html{-webkit-text-size-adjust:100%;font-feature-settings:normal;font-family:neue-haas-grotesk-text,Arial,sans-serif;font-variation-settings:normal;line-height:1.5;tab-size:4}body{line-height:inherit}hr{height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.DocSearch-Hit[aria-selected=true] mark,.content_knG7 a{text-decoration:underline}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ibm-plex-mono,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0}sub{bottom:-.25em}sup{top:-.5em}table{display:block;margin-bottom:var(--ifm-spacing-vertical);border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:initial;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}.markdown .alert,.shadow{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}.DocSearch-Modal .DocSearch-Commands .DocSearch-Commands-Key,.DocSearch-Modal .DocSearch-Logo .DocSearch-Label,.DocSearch.DocSearch-Button .DocSearch-Button-Key,.DocSearch.DocSearch-Button .DocSearch-Button-Placeholder{line-height:1.5!important;font-size:clamp(.8888888888888888rem,calc(.89437rem - .02741vw),.8680555555555557rem)!important;letter-spacing:.0142em!important}summary{display:list-item}menu,ol,ul{list-style:none;padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.sticky{position:-webkit-sticky;position:sticky}.isolate{isolation:isolate}.col-span-3{grid-column:span 3/span 3}.col-span-4{grid-column:span 4/span 4}.col-span-5{grid-column:span 5/span 5}.col-span-6{grid-column:span 6/span 6}.col-span-8{grid-column:span 8/span 8}.col-start-1{grid-column-start:1}.col-start-5{grid-column-start:5}.col-start-7{grid-column-start:7}.col-start-9{grid-column-start:9}.row-span-full{grid-row:1/-1}.row-start-1{grid-row-start:1}.-mx-2{margin-left:-.5rem;margin-right:-.5rem}.-mx-5{margin-left:-1.25rem;margin-right:-1.25rem}.-mx-side-padding{margin-left:-5.56vw;margin-right:-5.56vw}.es-h-center,.es-showcase-grid{margin-left:auto;margin-right:auto}.my-10{margin-bottom:2.5rem}.-mb-2{margin-bottom:-.5rem}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-10{margin-bottom:2.5rem}.mb-2{margin-bottom:.5rem}.mb-5{margin-bottom:1.25rem}.block{display:block}.inline,.tags_jXut{display:inline}.grid{display:grid}.contents{display:contents}.aspect-\[3\/2\]{aspect-ratio:3/2}.h-20{height:5rem}.h-24{height:6rem}.h-6{height:1.5rem}.w-20{width:5rem}.w-24{width:6rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-full{width:100%}.max-w-\[15ch\],.max-w-prose-mini{max-width:15ch}.max-w-lg{max-width:32rem}.max-w-sm{max-width:24rem}.max-w-xl{max-width:36rem}.origin-right{transform-origin:right}.-scale-x-100,.before\:translate-y-full-plus-px:before,.focus\:before\:translate-y-0:focus:before,.group:focus .group-focus\:scale-75,.group:focus .group-focus\:translate-x-3,.group:hover .group-hover\:scale-75,.group:hover .group-hover\:translate-x-3,.hover\:before\:translate-y-0:hover:before,.hover\:scale-105:hover,.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-scale-x-100{--tw-scale-x:-1}.select-none{user-select:none}.auto-cols-auto{grid-auto-columns:auto}.grid-flow-col{grid-auto-flow:column}.grid-rows-2{grid-template-rows:repeat(2,minmax(0,1fr))}.blogPostFooterDetailsFull_mRVl,.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-10{gap:2.5rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4,.navbar__items{gap:1rem}.gap-8{gap:2rem}.gap-gutter{gap:2.78vw}.gap-y-10{row-gap:2.5rem}.gap-y-20{row-gap:5rem}.markdown>:not([hidden])~:not([hidden]),.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1.25rem*var(--tw-space-y-reverse));margin-top:calc(1.25rem*(1 - var(--tw-space-y-reverse)))}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.rounded-full{border-radius:9999px}.border{border-width:1px}.border-l-4,blockquote{border-left-width:4px}.border-grey-100{--tw-border-opacity:1;border-color:rgb(245 249 255/var(--tw-border-opacity))}.border-l-candy-30{--tw-border-opacity:1;border-left-color:rgb(216 85 95/var(--tw-border-opacity))}.border-l-infinum,blockquote{border-left-color:rgb(216 38 44/var(--tw-border-opacity));--tw-border-opacity:1}.border-l-olive-30{--tw-border-opacity:1;border-left-color:rgb(90 135 114/var(--tw-border-opacity))}.border-l-sand-30{--tw-border-opacity:1;border-left-color:rgb(217 168 102/var(--tw-border-opacity))}.border-l-sky-30{--tw-border-opacity:1;border-left-color:rgb(100 121 195/var(--tw-border-opacity))}.border-l-violet-30{--tw-border-opacity:1;border-left-color:rgb(145 103 148/var(--tw-border-opacity))}.border-t-grey-200{--tw-border-opacity:1;border-top-color:rgb(228 235 245/var(--tw-border-opacity))}.bg-grey-100{--tw-bg-opacity:1;background-color:rgb(245 249 255/var(--tw-bg-opacity))}.bg-infinum{--tw-bg-opacity:1;background-color:rgb(216 38 44/var(--tw-bg-opacity))}.object-cover{object-fit:cover}.navbar-sidebar__brand,.navbar-sidebar__items .menu,.p-side-padding{padding:5.56vw}.px-7{padding-left:1.75rem;padding-right:1.75rem}.px-7\.5{padding-left:1.875rem;padding-right:1.875rem}.px-side-padding{padding-left:5.56vw;padding-right:5.56vw}.py-10{padding-bottom:2.5rem;padding-top:2.5rem}.py-3{padding-bottom:.75rem;padding-top:.75rem}.py-3\.75{padding-bottom:.9375rem;padding-top:.9375rem}.py-4{padding-bottom:1rem;padding-top:1rem}.py-8{padding-bottom:2rem;padding-top:2rem}.pb-20{padding-bottom:5rem}.pb-28{padding-bottom:7rem}.pl-10{padding-left:2.5rem}.pt-10{padding-top:2.5rem}.es-text-center,.text-center{text-align:center}.font-display{font-family:neue-haas-grotesk-display,Arial,sans-serif}.font-sans{font-family:neue-haas-grotesk-text,Arial,sans-serif}.es-big-title,.es-big-title-limited,.navbar-sidebar__items .menu__link,h1,h2,h3,h4,h5,h6{font-family:neue-haas-grotesk-display,Arial,sans-serif}.font-bold{font-weight:700}.font-medium{font-weight:500}.not-italic{font-style:normal}.leading-none{line-height:1}.blog-list-page .main-wrapper .container>.row>main article h2+div,.blog-tags-post-list-page .main-wrapper .container>.row>main article h2+div,.text-12,.theme-code-block>div[class^=codeBlockTitle]{font-size:clamp(.7671968738091037rem,calc(.78721rem - .10006vw),.6911478531570941rem);letter-spacing:.0286em;line-height:1.33}.text-candy-30{--tw-text-opacity:1;color:rgb(216 85 95/var(--tw-text-opacity))}.text-grey-400{--tw-text-opacity:1;color:rgb(146 158 178/var(--tw-text-opacity))}.text-grey-500{--tw-text-opacity:1;color:rgb(82 94 108/var(--tw-text-opacity))}.group:hover .group-hover\:text-infinum,.hover\:text-infinum:hover,.markdown a,.text-infinum,section[class*=DocCategoryGeneratedIndexPage] article .card:hover{--tw-text-opacity:1;color:rgb(216 38 44/var(--tw-text-opacity))}.text-olive-30{--tw-text-opacity:1;color:rgb(90 135 114/var(--tw-text-opacity))}.text-sand-30{--tw-text-opacity:1;color:rgb(217 168 102/var(--tw-text-opacity))}.text-sky-30{--tw-text-opacity:1;color:rgb(100 121 195/var(--tw-text-opacity))}.text-violet-30{--tw-text-opacity:1;color:rgb(145 103 148/var(--tw-text-opacity))}.hover\:text-white:hover,.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.shadow{--tw-shadow:0 1px 3px 0 #0000001a,0 1px 2px -1px #0000001a;--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors,section[class*=DocCategoryGeneratedIndexPage] article .card{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-500{transition-duration:.5s}.text-14{font-size:clamp(.8888888888888888rem,calc(.89437rem - .02741vw),.8680555555555557rem);letter-spacing:.0142em;line-height:1.5}.text-16{font-size:clamp(.9853849721883559rem,calc(.97675rem + .04317vw),1.0181953544068256rem);line-height:1.5}.text-18,h4{font-size:clamp(1.0606601717798212rem,calc(1.03949rem + .10583vw),1.141088661469096rem);line-height:1.44}.navbar-sidebar__items .menu__link,.text-24,blockquote p,h3{font-size:clamp(1.284396490428795rem,calc(1.21856rem + .32919vw),1.5345778128306942rem);line-height:1.25}.text-36,h2{font-size:clamp(1.6692195887945571rem,calc(1.50261rem + .83304vw),2.302327957702624rem);letter-spacing:-.0138em;line-height:1.17}.text-h2{font-size:clamp(2.8193058827290858rem,calc(2.19746rem + 3.10922vw),5.182314101769203rem);letter-spacing:-.0125em;line-height:1.02}.text-h3,h1{font-size:clamp(2.131350900116625rem,calc(1.80776rem + 1.61796vw),3.3609981453282645rem);letter-spacing:-.0096em;line-height:1.12}h5,h6,li{line-height:1.5}aside{--doc-sidebar-width:320px}h1,h2,h3,h4{font-weight:700}h5{font-size:clamp(.9853849721883559rem,calc(.97675rem + .04317vw),1.0181953544068256rem)}h5,h6{font-weight:700}h6{font-size:clamp(.8888888888888888rem,calc(.89437rem - .02741vw),.8680555555555557rem);letter-spacing:.0142em}li{font-family:neue-haas-grotesk-text,Arial,sans-serif;font-size:clamp(.9853849721883559rem,calc(.97675rem + .04317vw),1.0181953544068256rem)}blockquote{margin:2.5rem 0;padding:1rem 0 1rem 2.5rem}.DocSearch-Modal .DocSearch-Form,.DocSearch.DocSearch-Button{border-color:rgb(228 235 245/var(--tw-border-opacity))!important;border-style:solid!important}blockquote p{font-family:neue-haas-grotesk-text,Arial,sans-serif;font-weight:700}.es-showcase-grid{display:flex;flex-direction:column;gap:3.5rem;margin-bottom:2.5rem;padding:5.56vw}.before\:absolute:before{content:var(--tw-content);position:absolute}.before\:inset-0:before{content:var(--tw-content);inset:0}.before\:-z-10:before{content:var(--tw-content);z-index:-10}.before\:translate-y-full-plus-px:before{--tw-translate-y:calc(100% + 1px);content:var(--tw-content)}.before\:bg-black:before{--tw-bg-opacity:1;background-color:rgb(17 17 17/var(--tw-bg-opacity));content:var(--tw-content)}.DocSearch-Modal,.DocSearch.DocSearch-Button{background-color:rgb(255 255 255/var(--tw-bg-opacity))!important}.before\:transition-transform:before{content:var(--tw-content);transition-duration:.15s;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}.before\:duration-300:before{content:var(--tw-content);transition-duration:.3s}.hover\:scale-105:hover{--tw-scale-x:1.05;--tw-scale-y:1.05}.hover\:no-underline:hover{text-decoration-line:none}.hover\:decoration-transparent:hover{text-decoration-color:#0000}.hover\:before\:translate-y-0:hover:before{--tw-translate-y:0px;content:var(--tw-content)}.focus\:outline-offset-4:focus{outline-offset:4px}.focus\:outline-infinum:focus{outline-color:#d8262c}.focus\:before\:translate-y-0:focus:before{--tw-translate-y:0px;content:var(--tw-content)}.group:focus .group-focus\:translate-x-3,.group:hover .group-hover\:translate-x-3{--tw-translate-x:.75rem}.group:focus .group-focus\:opacity-0,.group:hover .group-hover\:opacity-0{opacity:0}.markdown ol li,.markdown ul li{padding-left:.5rem}.markdown ol li ::marker,.markdown ul li ::marker{font-size:clamp(1.0606601717798212rem,calc(1.03949rem + .10583vw),1.141088661469096rem);line-height:1.44}.markdown ol li::marker,.markdown ul li::marker{font-size:clamp(1.0606601717798212rem,calc(1.03949rem + .10583vw),1.141088661469096rem);line-height:1.44}.markdown ul{list-style-type:"●"}.markdown ul ul{list-style-type:"○"}.markdown ul ul ul{list-style-type:"■"}.markdown ul ul ul ul{list-style-type:"□"}.markdown ol{list-style-type:decimal}.markdown ol li ::marker{font-size:clamp(.9853849721883559rem,calc(.97675rem + .04317vw),1.0181953544068256rem);line-height:1.5}.markdown ol li::marker{font-size:clamp(.9853849721883559rem,calc(.97675rem + .04317vw),1.0181953544068256rem);line-height:1.5}.markdown ol ol{list-style-type:upper-roman}.markdown ol ol ol ol{list-style-type:upper-alpha}.markdown>*{scroll-margin-top:4rem}.markdown h2{margin-top:3rem!important}.markdown :is(h3,h4,h5,h6){margin-top:2.5rem!important}.markdown .alert{border-radius:.125rem}.markdown p+.theme-code-block{margin-top:.5rem}.markdown img{--tw-border-opacity:1;border-color:rgb(245 249 255/var(--tw-border-opacity));border-radius:.25rem;border-width:1px}.DocSearch.DocSearch-Button{--tw-border-opacity:1!important;--tw-bg-opacity:1!important;border-width:1px!important;display:flex!important;gap:1rem!important;margin:0!important;padding:0 .5rem!important}.DocSearch-Modal .DocSearch-Footer,.DocSearch.DocSearch-Button .DocSearch-Button-Key{background-color:rgb(245 249 255/var(--tw-bg-opacity))!important;--tw-bg-opacity:1!important;--tw-shadow:0 0 #0000!important;--tw-shadow-colored:0 0 #0000!important;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}.DocSearch.DocSearch-Button .DocSearch-Button-Placeholder{font-weight:400!important;gap:.5rem!important;margin:0!important;padding:0!important}.DocSearch.DocSearch-Button .DocSearch-Button-Placeholder:is(span){line-height:1!important}.DocSearch.DocSearch-Button .DocSearch-Button-Container{gap:.5rem!important}.DocSearch.DocSearch-Button .DocSearch-Button-Keys{display:none!important;gap:.25rem!important;margin:0!important;min-width:-moz-fit-content!important;min-width:-webkit-fit-content!important;min-width:fit-content!important;padding:0!important}.DocSearch.DocSearch-Button .DocSearch-Button-Key{--tw-text-opacity:1!important;background-image:none!important;border-style:none!important;color:rgb(82 94 108/var(--tw-text-opacity))!important;margin:0!important}.DocSearch-Modal .DocSearch-Commands .DocSearch-Commands-Key,.DocSearch-Modal .DocSearch-HitsFooter a:hover{background-color:rgb(146 158 178/var(--tw-bg-opacity))!important;color:rgb(255 255 255/var(--tw-text-opacity))!important}.DocSearch.DocSearch-Button .DocSearch-Button-Key:is(kbd){line-height:1!important}.DocSearch-Modal{--tw-bg-opacity:1!important;--tw-shadow:0 25px 50px -12px #00000040!important;--tw-shadow-colored:0 25px 50px -12px var(--tw-shadow-color)!important;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}.navbar,.theme-doc-sidebar-container{background-color:rgb(245 249 255/var(--tw-bg-opacity))}.navbar,.navbar-sidebar__brand,section[class*=DocCategoryGeneratedIndexPage] article .card{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.DocSearch-Modal .DocSearch-Form{--tw-border-opacity:1!important;border-radius:.5rem!important;border-width:1px!important}.DocSearch-Modal .DocSearch-Form:hover{--tw-border-opacity:1!important;border-color:rgb(146 158 178/var(--tw-border-opacity))!important}.DocSearch-Modal .DocSearch-Form:focus-visible{--tw-border-opacity:1!important;border-color:rgb(216 38 44/var(--tw-border-opacity))!important}.DocSearch-Modal .DocSearch-Footer{--tw-border-opacity:1!important;border-style:none!important;border-top-color:rgb(228 235 245/var(--tw-border-opacity))!important}.DocSearch-Modal .DocSearch-Logo .DocSearch-Label{--tw-text-opacity:1!important;color:rgb(146 158 178/var(--tw-text-opacity))!important}.DocSearch-Modal .DocSearch-Hits .DocSearch-Hit .DocSearch-Hit-icon,.DocSearch-Modal .DocSearch-Hits .DocSearch-Hit[aria-selected=true] .DocSearch-Hit-Tree,.DocSearch-Modal .DocSearch-Logo .DocSearch-Label:hover,.DocSearch-Modal .DocSearch-Logo svg:hover,.prism-code .token.cdata,.prism-code .token.comment,.prism-code .token.doctype,.prism-code .token.plain-text,.prism-code .token.prolog{--tw-text-opacity:1!important;color:rgb(82 94 108/var(--tw-text-opacity))!important}.DocSearch-Modal .DocSearch-Hits .DocSearch-Hit .DocSearch-Hit-Tree,.DocSearch-Modal .DocSearch-Hits .DocSearch-Hit .DocSearch-Hit-action,.DocSearch-Modal .DocSearch-Hits .DocSearch-Hit .DocSearch-Hit-path,.DocSearch-Modal .DocSearch-Logo svg{--tw-text-opacity:1!important;color:rgb(146 158 178/var(--tw-text-opacity))!important}.DocSearch-Modal .DocSearch-Logo .cls-1,.DocSearch-Modal .DocSearch-Logo .cls-2{fill:currentColor!important}.DocSearch-Modal .DocSearch-Commands{gap:.75rem!important}.DocSearch-Modal .DocSearch-Commands .DocSearch-Commands-Key{--tw-bg-opacity:1!important;--tw-text-opacity:1!important;--tw-shadow:0 0 #0000!important;--tw-shadow-colored:0 0 #0000!important;background-image:none!important;border-style:none!important;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important;margin:0!important}.DocSearch-Modal .DocSearch-Hits .DocSearch-Hit,.DocSearch-Modal .DocSearch-Hits .DocSearch-Hit-source,.DocSearch-Modal .DocSearch-HitsFooter a,.es-footer-white~.es-footer{--tw-bg-opacity:1!important;background-color:rgb(255 255 255/var(--tw-bg-opacity))!important}.DocSearch-Modal .DocSearch-Commands .DocSearch-Label,.DocSearch-Modal .DocSearch-HitsFooter a{color:rgb(82 94 108/var(--tw-text-opacity))!important}.DocSearch-Modal .DocSearch-Commands .DocSearch-Label,.DocSearch-Modal .DocSearch-Hits .DocSearch-Hit-source{font-size:clamp(.7671968738091037rem,calc(.78721rem - .10006vw),.6911478531570941rem)!important;letter-spacing:.0286em!important;line-height:1.33!important;--tw-text-opacity:1!important}.DocSearch-Modal .DocSearch-Commands .DocSearch-Commands-Key svg{--tw-text-opacity:1!important;color:rgb(255 255 255/var(--tw-text-opacity))!important}.DocSearch-Modal .DocSearch-Commands .DocSearch-Commands-Key:is(kbd){line-height:1!important}.DocSearch-Modal .DocSearch-Commands li{display:flex!important;gap:.25rem!important;margin:0!important;padding:0!important}.DocSearch-Modal .DocSearch-Hits .DocSearch-Hit-source{border-style:none!important;color:rgb(17 17 17/var(--tw-text-opacity))!important;font-family:neue-haas-grotesk-text,Arial,sans-serif!important;font-weight:500!important;margin:0!important;padding:.5rem 0!important;text-transform:uppercase!important}.DocSearch-Modal .DocSearch-Hits .DocSearch-Hit-source+ul{display:flex!important;flex-direction:column!important;gap:.5rem!important;padding:.25rem 0 0!important}.DocSearch-Modal .DocSearch-Hits .DocSearch-Hit{--tw-border-opacity:1!important;border-color:rgb(228 235 245/var(--tw-border-opacity))!important;border-radius:.5rem!important;border-style:solid!important;border-width:1px!important;margin:0!important;padding:0!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke!important}.DocSearch-Modal .DocSearch-Hits .DocSearch-Hit:hover{--tw-border-opacity:1!important;border-color:rgb(216 38 44/var(--tw-border-opacity))!important}.DocSearch-Modal .DocSearch-Hits .DocSearch-Hit>a{--tw-shadow:0 0 #0000!important;--tw-shadow-colored:0 0 #0000!important;background-image:none!important;border-radius:.5rem!important;border-style:none!important;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important;outline-color:#d8262cbf!important}.DocSearch-Modal .DocSearch-Hits .DocSearch-Hit .DocSearch-Hit-title{--tw-text-opacity:1!important;color:rgb(17 17 17/var(--tw-text-opacity))!important;font-size:clamp(.8888888888888888rem,calc(.89437rem - .02741vw),.8680555555555557rem)!important;font-weight:400!important;letter-spacing:.0142em!important;line-height:1.5!important;margin:0!important;padding:0!important}.DocSearch-Modal .DocSearch-Hits .DocSearch-Hit .DocSearch-Hit-path{font-size:clamp(.7671968738091037rem,calc(.78721rem - .10006vw),.6911478531570941rem)!important;font-weight:400!important;letter-spacing:.0286em!important;line-height:1.33!important;margin:-.25rem 0 0!important;padding:0!important}.DocSearch-Modal .DocSearch-Hits .DocSearch-Hit .DocSearch-Hit-action:hover{--tw-text-opacity:1!important;color:rgb(216 38 44/var(--tw-text-opacity))!important}.DocSearch-Modal .DocSearch-Hits .DocSearch-Hit[aria-selected=true] mark{--tw-text-opacity:1!important;color:rgb(216 38 44/var(--tw-text-opacity))!important;filter:drop-shadow(0 0 .125rem rgb(216 38 44/.25))!important;text-decoration-line:none!important}.DocSearch-Modal .DocSearch-HitsFooter{margin:0!important;padding:1rem!important}.DocSearch-Modal .DocSearch-HitsFooter a{--tw-border-opacity:1!important;--tw-text-opacity:1!important;border-color:rgb(146 158 178/var(--tw-border-opacity))!important;border-radius:.5rem!important;border-style:solid!important;border-width:1px!important;cursor:pointer!important;font-weight:500!important;padding:.375rem .75rem!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter!important}.DocSearch-Modal .DocSearch-HitsFooter a:hover{--tw-bg-opacity:1!important;--tw-text-opacity:1!important}.DocSearch-Modal .DocSearch-HitsFooter a:focus-visible{--tw-border-opacity:1!important;--tw-bg-opacity:1!important;--tw-text-opacity:1!important;background-color:rgb(216 38 44/var(--tw-bg-opacity))!important;border-color:rgb(216 38 44/var(--tw-border-opacity))!important;color:rgb(255 255 255/var(--tw-text-opacity))!important;outline-color:#d8262cbf!important}main .container{display:flex;flex-wrap:nowrap;gap:2.5rem;justify-content:space-between;margin:0;padding-bottom:2.5rem!important;padding-left:8rem;padding-right:5rem;padding-top:2.5rem!important}main .container article{max-width:42rem}.es-single-full-screen-child{display:grid!important;grid-template-columns:repeat(1,minmax(0,1fr));grid-template-rows:repeat(1,minmax(0,1fr));height:100%;width:100%}.es-has-t-border{--tw-border-opacity:1;border-color:rgb(228 235 245/var(--tw-border-opacity));border-top-width:1px}.es-full-size{height:100%;width:100%}.es-big-title,.es-big-title-limited{font-size:clamp(3.7074202030286756rem,calc(2.59935rem + 5.54035vw),7.9180844472589476rem);font-weight:700;letter-spacing:-.0208em;line-height:.98;padding:1.5rem 5.56vw}.es-big-subtitle,.navbar__link{font-size:clamp(.9853849721883559rem,calc(.97675rem + .04317vw),1.0181953544068256rem)}.es-big-title-limited{max-width:45rem}.es-big-subtitle{line-height:1.5;margin-bottom:2.5rem;margin-top:-.5rem;max-width:68ch;padding-left:5.56vw;padding-right:5.56vw}.es-blog-grid{column-gap:4rem;display:flex;flex-direction:column;grid-auto-rows:auto;margin:0;padding:5.56vw;row-gap:2.5rem}body:has(.es-navbar-white) .navbar{--tw-bg-opacity:1!important;background-color:rgb(255 255 255/var(--tw-bg-opacity))!important}body:has(.es-navbar-white) .navbar .DocSearch.DocSearch-Button{--tw-border-opacity:1!important;border-color:rgb(228 235 245/var(--tw-border-opacity))!important;border-style:solid!important;border-width:1px!important}.navbar{--tw-bg-opacity:1;height:6.25rem;padding:0 1.5rem}.navbar__brand{padding-top:.25rem}.navbar__logo{max-height:1.5rem;max-width:14.5rem}.navbar__items--right{gap:2rem}.navbar__link{align-items:center;border-top-color:#0000;border-top-width:4px;font-weight:400;height:100%;line-height:1.5;padding:0 .5rem}.navbar__link--active{--tw-border-opacity:1;border-top-color:rgb(216 38 44/var(--tw-border-opacity));color:currentColor}.navbar-sidebar__items .menu__link,.table-of-contents__link{--tw-text-opacity:1;color:rgb(17 17 17/var(--tw-text-opacity))}#__docusaurus-base-url-issue-banner-container,.blog-list-page .main-wrapper .container>.row>main article footer>.col.text--right,.blog-list-page .main-wrapper .container>.row>main article footer>.col>b,.blog-list-page .main-wrapper .container>.row>main article h2+div+div,.blog-post-page footer.row>.col>b,.blog-tags-post-list-page .main-wrapper .container>.row>main article footer>.col.text--right,.blog-tags-post-list-page .main-wrapper .container>.row>main article footer>.col>b,.blog-tags-post-list-page .main-wrapper .container>.row>main article h2+div+div,.docSidebarContainer_YfHR,.navbarSearchContainer_Bca1:not(:has(>*)),.navbar__link svg,.navbar__title,.sidebarLogo_isFc,.themedComponent_mlkZ,[data-theme=dark] .lightToggleIcon_pyhR,[data-theme=light] .darkToggleIcon_wfgR,html[data-announcement-bar-initially-dismissed=true] .announcementBar_mb4j{display:none}.navbar-sidebar__brand{--tw-border-opacity:1;border-bottom-color:rgb(228 235 245/var(--tw-border-opacity));border-bottom-width:1px}.navbar-sidebar__items .menu__link{font-weight:700;margin:0;padding:0}.navbar-sidebar__items .menu__link:hover{--tw-text-opacity:1;background:none;color:rgb(216 38 44/var(--tw-text-opacity))}.breadcrumbs__item--active .breadcrumbs__link,.navbar-sidebar__items .menu__link--active:not(.menu__link--sublist){--tw-text-opacity:1;background-color:initial;color:rgb(216 38 44/var(--tw-text-opacity))}.blog-list-page .main-wrapper .container>.row>main article footer>.col>ul li,.blog-post-page footer.row>.col>ul li,.blog-tags-post-list-page .main-wrapper .container>.row>main article footer>.col>ul li,.blog-tags-post-list-page .main-wrapper>.container>.row>.col,.navbar-sidebar__items .menu__list-item,.table-of-contents li{margin:0;padding:0}.navbar-sidebar__items .menu__list-item.theme-doc-sidebar-item-link-level-2 .menu__link{font-size:clamp(1.0606601717798212rem,calc(1.03949rem + .10583vw),1.141088661469096rem);font-weight:400;letter-spacing:0;line-height:1.44}.navbar-sidebar__items .menu__list{display:flex;flex-direction:column;row-gap:1.25rem}.blog-list-page .navbar,.blog-tags-post-list-page .navbar{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.theme-doc-sidebar-container .menu__caret:hover,.theme-doc-sidebar-container .menu__link:hover{background-color:initial}.blog-list-page .navbar .DocSearch.DocSearch-Button,.blog-tags-post-list-page .navbar .DocSearch.DocSearch-Button{--tw-border-opacity:1!important;border-color:rgb(228 235 245/var(--tw-border-opacity))!important;border-style:solid!important;border-width:1px!important}.blog-list-page .main-wrapper .container,.blog-post-page .container,.blog-tags-post-list-page .main-wrapper .container{margin:0!important;max-width:100%!important;padding:5.56vw!important;width:100%!important}.blog-list-page .main-wrapper .container>.row,.blog-tags-post-list-page .main-wrapper .container>.row{display:block;margin:0;padding:0;width:100%}.blog-list-page .main-wrapper .container>.row>main,.blog-tags-post-list-page .main-wrapper .container>.row>main{display:block;margin:0;max-width:100%;padding:0;width:100%}.blog-list-page .main-wrapper .container>.row>main .pagination-nav,.blog-tags-post-list-page .main-wrapper .container>.row>main .pagination-nav{grid-column:span 3/span 3;grid-column-start:1}.blog-list-page .main-wrapper .container>.row>main article,.blog-tags-post-list-page .main-wrapper .container>.row>main article{display:flex;flex-direction:column;margin:0!important;padding:0!important}.blog-list-page .main-wrapper .container>.row>main article h2,.blog-tags-post-list-page .main-wrapper .container>.row>main article h2{font-family:neue-haas-grotesk-text,Arial,sans-serif;font-size:clamp(1.284396490428795rem,calc(1.21856rem + .32919vw),1.5345778128306942rem);font-weight:700;line-height:1.25}.blog-list-page .main-wrapper .container>.row>main article h2+div,.blog-tags-post-list-page .main-wrapper .container>.row>main article h2+div{--tw-text-opacity:1;color:rgb(17 17 17/var(--tw-text-opacity));font-family:neue-haas-grotesk-text,Arial,sans-serif;margin-bottom:.75rem!important;margin-top:.25rem!important;text-transform:uppercase}.blog-list-page .main-wrapper .container>.row>main article .markdown>:not([hidden])~:not([hidden]),.blog-tags-post-list-page .main-wrapper .container>.row>main article .markdown>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}.blog-list-page .main-wrapper .container>.row>main article .markdown>:is(h1,h2,h3,h4,h5,h6,p),.blog-tags-post-list-page .main-wrapper .container>.row>main article .markdown>:is(h1,h2,h3,h4,h5,h6,p){-webkit-box-orient:vertical;-webkit-line-clamp:4;--tw-text-opacity:1;color:rgb(17 17 17/var(--tw-text-opacity));display:-webkit-box;font-family:neue-haas-grotesk-text,Arial,sans-serif;font-size:clamp(.8888888888888888rem,calc(.89437rem - .02741vw),.8680555555555557rem);font-weight:400;letter-spacing:.0142em;line-height:1.5;overflow:hidden;padding:0}.blog-list-page .main-wrapper .container>.row>main article .markdown>:is(h1,h2,h3,h4,h5,h6,p):first-child,.blog-tags-post-list-page .main-wrapper .container>.row>main article .markdown>:is(h1,h2,h3,h4,h5,h6,p):first-child{margin-top:0!important}.blog-list-page .main-wrapper .container>.row>main article footer,.blog-tags-post-list-page .main-wrapper .container>.row>main article footer{display:flex;margin:1.25rem 0 0!important;padding:0!important}.blog-list-page .main-wrapper .container>.row>main article footer>.col>ul,.blog-post-page footer.row>.col>ul,.blog-tags-post-list-page .main-wrapper .container>.row>main article footer>.col>ul{column-gap:.5rem;display:flex;flex-wrap:wrap;list-style-type:none;margin:0!important;padding:0!important;row-gap:.125rem}.blog-list-page .main-wrapper .container>.row>main article footer>.col>ul li a,.blog-post-page footer.row>.col>ul li a,.blog-tags-post-list-page .main-wrapper .container>.row>main article footer>.col>ul li a{--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(196 206 222/var(--tw-bg-opacity));border-radius:9999px;border-style:none;color:rgb(255 255 255/var(--tw-text-opacity));font-size:clamp(.7671968738091037rem,calc(.78721rem - .10006vw),.6911478531570941rem);font-weight:500;letter-spacing:.0286em;line-height:1.33;text-transform:uppercase;transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);margin:0!important;padding:.125rem .5rem!important}.blog-list-page .main-wrapper .container>.row>main article footer>.col>ul li a:hover,.blog-post-page footer.row>.col>ul li a:hover,.blog-tags-post-list-page .main-wrapper .container>.row>main article footer>.col>ul li a:hover{--tw-bg-opacity:1;background-color:rgb(146 158 178/var(--tw-bg-opacity))}.blog-tags-post-list-page .main-wrapper>.container>.row{margin:0;width:100%}.blog-tags-post-list-page .main-wrapper>.container>.row>.col.col--3,div.generatedIndexPage_node_modules-\@docusaurus-theme-classic-lib-theme-DocCategoryGeneratedIndexPage-styles-module,main[class*=docMainContainer]>.container>.row{max-width:100%!important;width:100%!important}.blog-tags-post-list-page .main-wrapper>.container>.row>.col.col--7{column-gap:4rem;display:flex;flex-direction:column;max-width:100%!important;row-gap:2.5rem;width:100%!important}.blog-tags-post-list-page .main-wrapper>.container>.row>.col.col--7>header{grid-column:span 3/span 3;grid-column-start:1;margin:0!important;padding:0!important}section[class*=DocCategoryGeneratedIndexPage]{display:flex;flex-direction:column;gap:1.25rem;margin:0!important;padding:0!important}.blog-list-page .main-wrapper>.container.margin-vert--lg,.blog-post-page .container>.row>.col,section[class*=DocCategoryGeneratedIndexPage] article.col{margin:0!important;padding:0!important}section[class*=DocCategoryGeneratedIndexPage] article .card{--tw-border-opacity:1;border-color:rgb(228 235 245/var(--tw-border-opacity));border-radius:.375rem;border-width:1px;display:flex;flex-direction:column;gap:.5rem;padding:1rem!important}.blog-list-page .es-blog-grid+.pagination-nav{margin-left:5.56vw;margin-right:5.56vw}.table-of-contents{--tw-border-opacity:1;border-left-color:rgb(146 158 178/var(--tw-border-opacity));padding:0 0 0 .75rem}.table-of-contents__link{font-size:clamp(.8888888888888888rem,calc(.89437rem - .02741vw),.8680555555555557rem);letter-spacing:.0142em;line-height:1.5;padding:.25rem 0}.breadcrumbs__link:hover,.table-of-contents__link--active{color:rgb(216 38 44/var(--tw-text-opacity));--tw-text-opacity:1}.breadcrumbs{margin-bottom:3rem!important}.breadcrumbs,.breadcrumbs__item{align-items:center;display:flex;gap:1.5rem;margin:0;padding:0}.breadcrumbs__item:not(:last-child):after{height:.75rem;margin:.125rem;opacity:1;padding:0;width:.75rem}.breadcrumbs__link{border-radius:0;margin:0;padding:0}.breadcrumbs__link:any-link:hover{background-color:initial}.theme-doc-sidebar-container{--tw-bg-opacity:1;--tw-border-opacity:1!important;border-right-color:rgb(228 235 245/var(--tw-border-opacity))!important;margin:0;padding:0 0 2rem}.blog-post-page .markdown img,.docs-doc-page .navbar{--tw-border-opacity:1;border-color:rgb(228 235 245/var(--tw-border-opacity))}.theme-doc-sidebar-container .menu-list{margin-bottom:0!important;margin-top:0!important;padding-bottom:0!important;padding-top:0!important}.theme-doc-sidebar-container .menu{margin:0;padding:0;scrollbar-gutter:auto}.theme-doc-sidebar-container .menu__link{--tw-text-opacity:1;background-color:initial;color:rgb(17 17 17/var(--tw-text-opacity));margin:0;padding:0}.theme-doc-sidebar-container .menu__caret:hover,.theme-doc-sidebar-container .menu__link--active,.theme-doc-sidebar-container .menu__link:hover{color:rgb(216 38 44/var(--tw-text-opacity));--tw-text-opacity:1}.theme-doc-sidebar-container .menu__list .theme-doc-sidebar-container .menu__list,.theme-doc-sidebar-container .menu__list-item:not(:first-child){margin-top:0!important}.theme-doc-sidebar-container .menu__list .theme-doc-sidebar-container .menu__list{padding-left:1.5rem}.theme-doc-sidebar-container .menu__caret{--tw-text-opacity:1;align-items:center;border-radius:0;color:rgb(17 17 17/var(--tw-text-opacity));display:flex;height:2.5rem;justify-content:center;margin-right:.75rem;padding:0;width:2.5rem}.prism-code .token,.prism-code .token.content,.prism-code .token.front-matter,.prism-code .token.imports,.prism-code .token.language-php,.prism-code .token.maybe-class-name,.prism-code .token.plain,.prism-code .token.property-access,.prism-code .token.property:not(.literal-property),.prism-code .token.punctuation,.prism-code .token.script,.prism-code .token.unit,.theme-code-block{--tw-text-opacity:1!important;color:rgb(17 17 17/var(--tw-text-opacity))!important}.theme-doc-sidebar-container .menu__caret:before{--tw-rotate:90deg!important;--tw-scale-x:.75!important;--tw-scale-y:.75!important;height:1rem!important;width:1rem!important}.theme-doc-sidebar-container .menu__caret:before,.theme-doc-sidebar-container .menu__list-item:not(.menu__list-item--collapsed) .menu__caret:before{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.theme-doc-sidebar-container .menu__list-item:not(.menu__list-item--collapsed) .menu__caret:before{--tw-rotate:180deg!important;--tw-scale-x:.75!important;--tw-scale-y:.75!important}.theme-doc-sidebar-item-link{margin:0!important;padding:.5rem 1.25rem!important}.theme-doc-sidebar-item-link.theme-doc-sidebar-item-link-level-1{padding-bottom:.75rem!important;padding-top:.75rem!important}.menu__link--sublist{margin:0!important;padding:.75rem 1.25rem!important}.menu__link--sublist:hover{background-color:initial!important}.theme-doc-sidebar-item-category-level-1>.menu__list-item-collapsible{font-size:clamp(1.0606601717798212rem,calc(1.03949rem + .10583vw),1.141088661469096rem);font-weight:700;line-height:1.44}.theme-doc-sidebar-item-category-level-1 .menu__list-item-collapsible--active,.theme-doc-sidebar-item-category-level-1 .menu__list-item-collapsible--active:hover,.theme-doc-sidebar-item-category-level-1>.menu__list-item-collapsible:hover{background-color:initial}.theme-doc-sidebar-item-category,.theme-doc-sidebar-item-link-level-1,.theme-doc-sidebar-item-link-level-2,.theme-doc-sidebar-item-link-level-3,.theme-doc-sidebar-item-link-level-4,.theme-doc-sidebar-item-link-level-5{font-size:clamp(.9853849721883559rem,calc(.97675rem + .04317vw),1.0181953544068256rem);font-weight:400;line-height:1.5;margin:0;padding:0}main[class*=docMainContainer]>.container{--ifm-container-width-xl:100%;margin:0!important;padding:1.5rem!important;width:100%!important}.docs-doc-page .navbar{border-bottom-width:1px;padding-left:1.5rem;padding-right:1.5rem}code:not(.prism-code code){background-image:none;border-style:none;font-family:ibm-plex-mono,monospace;font-size:.95em;font-weight:700;margin:0;padding:0;vertical-align:initial}.markdown code:not(.prism-code code){--tw-text-opacity:1;color:rgb(51 58 105/var(--tw-text-opacity))}.prism-code,.theme-code-block{border-radius:0!important;border-style:none!important}.prism-code{--tw-bg-opacity:1!important;background-color:rgb(245 249 255/var(--tw-bg-opacity))!important;font-family:ibm-plex-mono,monospace!important;font-size:clamp(.8888888888888888rem,calc(.89437rem - .02741vw),.8680555555555557rem)!important;font-weight:500!important;letter-spacing:.0142em!important;line-height:1.5!important}.prism-code .theme-code-block-highlighted-line{background-color:#e4ebf599!important}.prism-code .token.boolean,.prism-code .token.constant,.prism-code .token.deleted,.prism-code .token.function-variable,.prism-code .token.important,.prism-code .token.literal-property,.prism-code .token.number,.prism-code .token.parameter,.prism-code .token.regex,.prism-code .token.symbol,.prism-code .token.tag,.prism-code .token.variable{--tw-text-opacity:1!important;color:rgb(217 168 102/var(--tw-text-opacity))!important}.prism-code .token.namespace{opacity:.7!important}.prism-code .token.attr-name,.prism-code .token.builtin,.prism-code .token.char,.prism-code .token.inserted,.prism-code .token.selector,.prism-code .token.string{--tw-text-opacity:1!important;color:rgb(90 135 114/var(--tw-text-opacity))!important}.prism-code .language-css .token.string,.prism-code .style .token.string,.prism-code .token.entity,.prism-code .token.operator,.prism-code .token.url{--tw-text-opacity:1!important;background-color:#ffffff0d!important;color:rgb(99 75 54/var(--tw-text-opacity))!important}.prism-code .token.atrule,.prism-code .token.attr-value,.prism-code .token.color,.prism-code .token.keyword{--tw-text-opacity:1!important;color:rgb(100 121 195/var(--tw-text-opacity))!important}.prism-code .token.class-name,.prism-code .token.function{--tw-text-opacity:1!important;color:rgb(158 121 86/var(--tw-text-opacity))!important}.prism-code .token.bold,.prism-code .token.important{font-weight:700!important}.prism-code .token.entity{cursor:help!important}.theme-code-block{--tw-shadow:0 0 #0000!important;--tw-shadow-colored:0 0 #0000!important;background-image:none!important;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important;--tw-bg-opacity:1;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;background-color:rgb(51 58 105/var(--tw-bg-opacity));box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);font-size:clamp(.8888888888888888rem,calc(.89437rem - .02741vw),.8680555555555557rem);line-height:1.6}.theme-code-block>div[class^=codeBlockTitle]{--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(228 235 245/var(--tw-bg-opacity));border-radius:0;color:rgb(82 94 108/var(--tw-text-opacity));font-family:neue-haas-grotesk-text,Arial,sans-serif;font-weight:400;padding:.25rem .625rem}.pagination-nav{--tw-border-opacity:1;border-top-color:rgb(228 235 245/var(--tw-border-opacity));border-top-width:1px;display:flex;flex-direction:column;margin-bottom:1.5rem;padding-top:1rem}.pagination-nav__link{border-style:none;padding:0}.blog-post-page main>article>header div[class*=BlogPostItem-Header-Info]+div.margin-top--md.margin-bottom--sm{margin-bottom:2.5rem!important}.blog-post-page .container>.row{display:block;grid-template-columns:auto 1fr;margin:0;max-width:100%;padding:0;width:100%}.blog-post-page .container>.row>.col.col--2,.blog-post-page .container>.row>.col.col--3{max-width:20rem;width:20rem}.blog-post-page .container>.row>.col.col--7{justify-self:center;max-width:48rem}.blog-post-page .markdown img{--tw-bg-opacity:1;background-color:rgb(245 249 255/var(--tw-bg-opacity));border-radius:.375rem;border-width:1px}body:not(.navigation-with-keyboard) :not(input):focus{outline:0}.skipToContent_fXgn{background-color:var(--ifm-background-surface-color);color:var(--ifm-color-emphasis-900);left:100%;padding:calc(var(--ifm-global-spacing)/2) var(--ifm-global-spacing);position:fixed;top:1rem;z-index:calc(var(--ifm-z-index-fixed) + 1)}.skipToContent_fXgn:focus{box-shadow:var(--ifm-global-shadow-md);left:1rem}.closeButton_CVFx{line-height:0;padding:0}.content_knG7{font-size:85%;padding:5px 0;text-align:center}.content_knG7 a{color:inherit}.announcementBar_mb4j{align-items:center;background-color:var(--ifm-color-white);border-bottom:1px solid var(--ifm-color-emphasis-100);color:var(--ifm-color-black);display:flex;height:var(--docusaurus-announcement-bar-height)}.announcementBarPlaceholder_vyr4{flex:0 0 10px}.announcementBarClose_gvF7{align-self:stretch;flex:0 0 30px}.toggle_vylO{height:2rem;width:2rem}.toggleButton_gllP{align-items:center;border-radius:50%;display:flex;height:100%;justify-content:center;transition:background var(--ifm-transition-fast);width:100%}.toggleButton_gllP:hover{background:var(--ifm-color-emphasis-200)}.toggleButtonDisabled_aARS{cursor:not-allowed}.darkNavbarColorModeToggle_X3D1:hover{background:var(--ifm-color-gray-800)}[data-theme=dark] .themedComponent--dark_xIcU,[data-theme=light] .themedComponent--light_NVdE,html:not([data-theme]) .themedComponent--light_NVdE{display:initial}.iconExternalLink_nPIU{margin-left:.3rem}.iconLanguage_nlXk{margin-right:5px;vertical-align:text-bottom}.navbarHideable_m1mJ{transition:transform var(--ifm-transition-fast) ease}.navbarHidden_jGov{transform:translate3d(0,calc(-100% - 2px),0)}.errorBoundaryError_a6uf{color:red;white-space:pre-wrap}.errorBoundaryFallback_VBag{color:red;padding:.55rem}.anchorWithStickyNavbar_LWe7{scroll-margin-top:calc(var(--ifm-navbar-height) + .5rem)}.anchorWithHideOnScrollNavbar_WYt5{scroll-margin-top:.5rem}.hash-link{opacity:0;padding-left:.5rem;transition:opacity var(--ifm-transition-fast);user-select:none}.hash-link:before{content:"#"}.mainWrapper_z2l0{display:flex;flex:1 0 auto;flex-direction:column}.docusaurus-mt-lg{margin-top:3rem}#__docusaurus{display:flex;flex-direction:column;min-height:100%}.sidebar_re4s{max-height:calc(100vh - var(--ifm-navbar-height) - 2rem);overflow-y:auto;position:-webkit-sticky;position:sticky;top:calc(var(--ifm-navbar-height) + 2rem)}.sidebarItemTitle_pO2u{font-size:var(--ifm-h3-font-size);font-weight:var(--ifm-font-weight-bold)}.container_mt6G,.sidebarItemList_Yudw{font-size:.9rem}.sidebarItem__DBe{margin-top:.7rem}.sidebarItemLink_mo7H{color:var(--ifm-font-color-base);display:block}.sidebarItemLinkActive_I1ZP{color:var(--ifm-color-primary)!important}.searchQueryInput_u2C7,.searchVersionInput_m0Ui{background:var(--docsearch-searchbox-focus-background);border:2px solid var(--ifm-toc-border-color);border-radius:var(--ifm-global-radius);color:var(--docsearch-text-color);font:var(--ifm-font-size-base) var(--ifm-font-family-base);margin-bottom:.5rem;padding:.8rem;transition:border var(--ifm-transition-fast) ease;width:100%}.searchQueryInput_u2C7:focus,.searchVersionInput_m0Ui:focus{border-color:var(--docsearch-primary-color);outline:0}.searchQueryInput_u2C7::placeholder{color:var(--docsearch-muted-color)}.searchResultsColumn_JPFH{font-size:.9rem;font-weight:700}.algoliaLogo_rT1R{max-width:150px}.algoliaLogoPathFill_WdUC{fill:var(--ifm-font-color-base)}.searchResultItem_Tv2o{border-bottom:1px solid var(--ifm-toc-border-color);padding:1rem 0}.searchResultItemHeading_KbCB{font-weight:400;margin-bottom:0}.searchResultItemPath_lhe1{--ifm-breadcrumb-separator-size-multiplier:1;color:var(--ifm-color-content-secondary);font-size:.8rem}.searchResultItemSummary_AEaO{font-style:italic;margin:.5rem 0 0}.loadingSpinner_XVxU{animation:1s linear infinite a;border:.4em solid #eee;border-radius:50%;border-top:.4em solid var(--ifm-color-primary);height:3rem;margin:0 auto;width:3rem}@keyframes a{to{transform:rotate(1turn)}}.loader_vvXV{margin-top:2rem}.search-result-match{background:#ffd78e40;color:var(--docsearch-hit-color);padding:.09em 0}.authorCol_Hf19{flex-grow:1!important;max-width:inherit!important}.imageOnlyAuthorRow_pa_O{display:flex;flex-flow:row wrap}.imageOnlyAuthorCol_G86a{margin-left:.3rem;margin-right:.3rem}.backToTopButton_sjWU{background-color:var(--ifm-color-emphasis-200);border-radius:50%;bottom:1.3rem;box-shadow:var(--ifm-global-shadow-lw);height:3rem;opacity:0;position:fixed;right:1.3rem;transform:scale(0);transition:all var(--ifm-transition-fast) var(--ifm-transition-timing-default);visibility:hidden;width:3rem;z-index:calc(var(--ifm-z-index-fixed) - 1)}.backToTopButton_sjWU:after{background-color:var(--ifm-color-emphasis-1000);content:" ";display:inline-block;height:100%;-webkit-mask:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem no-repeat;mask:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem no-repeat;width:100%}.backToTopButtonShow_xfvO{opacity:1;transform:scale(1);visibility:visible}[data-theme=dark]:root{--docusaurus-collapse-button-bg:#ffffff0d;--docusaurus-collapse-button-bg-hover:#ffffff1a}.collapseSidebarButton_PEFL{display:none;margin:0}.docMainContainer_TBSr,.docRoot_UBD9{display:flex;width:100%}.docsWrapper_hBAB{display:flex;flex:1 0 auto}.DocSearch-Button,.DocSearch-Button-Container{align-items:center;display:flex}.DocSearch-Button{background:var(--docsearch-searchbox-background);border:0;border-radius:40px;color:var(--docsearch-muted-color);cursor:pointer;font-weight:500;height:36px;justify-content:space-between;padding:0 8px;-webkit-user-select:none;user-select:none}.DocSearch-Button:active,.DocSearch-Button:focus,.DocSearch-Button:hover{background:var(--docsearch-searchbox-focus-background);box-shadow:var(--docsearch-searchbox-shadow);color:var(--docsearch-text-color);outline:0}.DocSearch-Search-Icon{stroke-width:1.6}.DocSearch-Hit-Tree,.DocSearch-Hit-action,.DocSearch-Hit-icon,.DocSearch-Reset{stroke-width:var(--docsearch-icon-stroke-width)}.DocSearch-Button .DocSearch-Search-Icon{color:var(--docsearch-text-color)}.DocSearch-Button-Placeholder{font-size:1rem;padding:0 12px 0 6px}.DocSearch-Input,.DocSearch-Link{-webkit-appearance:none;font:inherit}.DocSearch-Button-Keys{display:flex;min-width:calc(40px + .8em)}.DocSearch-Button-Key{align-items:center;background:var(--docsearch-key-gradient);border:0;border-radius:3px;box-shadow:var(--docsearch-key-shadow);color:var(--docsearch-muted-color);display:flex;height:18px;justify-content:center;margin-right:.4em;padding:0 0 2px;position:relative;top:-1px;width:20px}.DocSearch--active{overflow:hidden!important}.DocSearch-Container{background-color:var(--docsearch-container-background);height:100vh;left:0;position:fixed;top:0;width:100vw;z-index:200}.DocSearch-Container a{text-decoration:none}.DocSearch-Link{appearance:none;background:none;border:0;color:var(--docsearch-highlight-color);cursor:pointer;margin:0;padding:0}.DocSearch-Modal{background:var(--docsearch-modal-background);border-radius:6px;box-shadow:var(--docsearch-modal-shadow);flex-direction:column;margin:60px auto auto;max-width:var(--docsearch-modal-width);position:relative}.DocSearch-SearchBar{display:flex;padding:var(--docsearch-spacing) var(--docsearch-spacing) 0}.DocSearch-Form{align-items:center;background:var(--docsearch-searchbox-focus-background);border-radius:4px;box-shadow:var(--docsearch-searchbox-shadow);display:flex;height:var(--docsearch-searchbox-height);margin:0;padding:0 var(--docsearch-spacing);position:relative;width:100%}.DocSearch-Input{appearance:none;background:#0000;border:0;color:var(--docsearch-text-color);flex:1;font-size:1.2em;height:100%;outline:0;padding:0 0 0 8px;width:80%}.DocSearch-Hit-action-button,.DocSearch-Reset{-webkit-appearance:none;border:0;cursor:pointer}.DocSearch-Input::placeholder{color:var(--docsearch-muted-color);opacity:1}.DocSearch-Input::-webkit-search-cancel-button,.DocSearch-Input::-webkit-search-decoration,.DocSearch-Input::-webkit-search-results-button,.DocSearch-Input::-webkit-search-results-decoration{display:none}.DocSearch-LoadingIndicator,.DocSearch-MagnifierLabel,.DocSearch-Reset{margin:0;padding:0}.DocSearch-Container--Stalled .DocSearch-LoadingIndicator,.DocSearch-MagnifierLabel,.DocSearch-Reset{align-items:center;color:var(--docsearch-highlight-color);display:flex;justify-content:center}.DocSearch-Cancel,.DocSearch-Container--Stalled .DocSearch-MagnifierLabel,.DocSearch-LoadingIndicator,.DocSearch-Reset[hidden]{display:none}.DocSearch-Reset{animation:.1s ease-in forwards b;appearance:none;background:none;border-radius:50%;color:var(--docsearch-icon-color);padding:2px;right:0}.DocSearch-Help,.DocSearch-HitsFooter,.DocSearch-Label{color:var(--docsearch-muted-color)}.DocSearch-Reset:hover{color:var(--docsearch-highlight-color)}.DocSearch-LoadingIndicator svg,.DocSearch-MagnifierLabel svg{height:24px;width:24px}.DocSearch-Dropdown{max-height:calc(var(--docsearch-modal-height) - var(--docsearch-searchbox-height) - var(--docsearch-spacing) - var(--docsearch-footer-height));min-height:var(--docsearch-spacing);overflow-y:auto;overflow-y:overlay;padding:0 var(--docsearch-spacing);scrollbar-color:var(--docsearch-muted-color) var(--docsearch-modal-background);scrollbar-width:thin}.DocSearch-Dropdown::-webkit-scrollbar{width:12px}.DocSearch-Dropdown::-webkit-scrollbar-track{background:#0000}.DocSearch-Dropdown::-webkit-scrollbar-thumb{background-color:var(--docsearch-muted-color);border:3px solid var(--docsearch-modal-background);border-radius:20px}.DocSearch-Dropdown ul{list-style:none;margin:0;padding:0}.DocSearch-Label{font-size:.75em;line-height:1.6em}.DocSearch-Help{font-size:.9em;margin:0;-webkit-user-select:none;user-select:none}.DocSearch-Title{font-size:1.2em}.DocSearch-Logo a{display:flex}.DocSearch-Logo svg{color:var(--docsearch-logo-color);margin-left:8px}.DocSearch-Hits:last-of-type{margin-bottom:24px}.DocSearch-Hits mark{background:none;color:var(--docsearch-highlight-color)}.DocSearch-HitsFooter{display:flex;font-size:.85em;justify-content:center;margin-bottom:var(--docsearch-spacing);padding:var(--docsearch-spacing)}.DocSearch-HitsFooter a{border-bottom:1px solid;color:inherit}.DocSearch-Hit{border-radius:4px;display:flex;padding-bottom:4px;position:relative}.DocSearch-Hit--deleting{opacity:0;transition:.25s linear}.DocSearch-Hit--favoriting{transform:scale(0);transform-origin:top center;transition:.25s linear .25s}.DocSearch-Hit a{background:var(--docsearch-hit-background);border-radius:4px;box-shadow:var(--docsearch-hit-shadow);display:block;padding-left:var(--docsearch-spacing);width:100%}.DocSearch-Hit-source{background:var(--docsearch-modal-background);color:var(--docsearch-highlight-color);font-size:.85em;font-weight:600;line-height:32px;margin:0 -4px;padding:8px 4px 0;position:-webkit-sticky;position:sticky;top:0;z-index:10}.DocSearch-Hit-Tree{color:var(--docsearch-muted-color);height:var(--docsearch-hit-height);opacity:.5;width:24px}.DocSearch-Hit[aria-selected=true] a{background-color:var(--docsearch-highlight-color)}.DocSearch-Hit-Container{align-items:center;color:var(--docsearch-hit-color);display:flex;flex-direction:row;height:var(--docsearch-hit-height);padding:0 var(--docsearch-spacing) 0 0}.DocSearch-Hit-icon{height:20px;width:20px}.DocSearch-Hit-action,.DocSearch-Hit-icon{color:var(--docsearch-muted-color)}.DocSearch-Hit-action{align-items:center;display:flex;height:22px;width:22px}.DocSearch-Hit-action svg{display:block;height:18px;width:18px}.DocSearch-Hit-action+.DocSearch-Hit-action{margin-left:6px}.DocSearch-Hit-action-button{appearance:none;background:none;border-radius:50%;color:inherit;padding:2px}svg.DocSearch-Hit-Select-Icon{display:none}.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-Select-Icon,.tocCollapsibleContent_vkbj a{display:block}.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{background:#0003;transition:background-color .1s ease-in}.DocSearch-Hit-action-button:focus path,.DocSearch-Hit-action-button:hover path{fill:#fff}.DocSearch-Hit-content-wrapper{display:flex;flex:1 1 auto;flex-direction:column;font-weight:500;justify-content:center;line-height:1.2em;margin:0 8px;overflow-x:hidden;position:relative;text-overflow:ellipsis;white-space:nowrap;width:80%}.DocSearch-Hit-title{font-size:.9em}.DocSearch-Hit-path{color:var(--docsearch-muted-color);font-size:.75em}.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-Tree,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-action,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-icon,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-path,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-text,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-title,.DocSearch-Hit[aria-selected=true] mark{color:var(--docsearch-hit-active-color)!important}.DocSearch-ErrorScreen,.DocSearch-NoResults,.DocSearch-StartScreen{font-size:.9em;margin:0 auto;padding:36px 0;text-align:center;width:80%}.DocSearch-Screen-Icon{color:var(--docsearch-muted-color);padding-bottom:12px}.DocSearch-NoResults-Prefill-List{display:inline-block;padding-bottom:24px;text-align:left}.DocSearch-NoResults-Prefill-List ul{display:inline-block;padding:8px 0 0}.DocSearch-NoResults-Prefill-List li{list-style-position:inside;list-style-type:"» "}.DocSearch-Prefill{-webkit-appearance:none;appearance:none;background:none;border:0;border-radius:1em;color:var(--docsearch-highlight-color);cursor:pointer;display:inline-block;font-size:1em;font-weight:700;padding:0}.DocSearch-Prefill:focus,.DocSearch-Prefill:hover{outline:0;text-decoration:underline}.DocSearch-Footer{align-items:center;background:var(--docsearch-footer-background);border-radius:0 0 8px 8px;box-shadow:var(--docsearch-footer-shadow);display:flex;flex-direction:row-reverse;flex-shrink:0;height:var(--docsearch-footer-height);justify-content:space-between;padding:0 var(--docsearch-spacing);position:relative;-webkit-user-select:none;user-select:none;width:100%;z-index:300}.DocSearch-Commands li,.DocSearch-Commands-Key{align-items:center;display:flex}.DocSearch-Commands{color:var(--docsearch-muted-color);display:flex;list-style:none;margin:0;padding:0}.DocSearch-Commands li:not(:last-of-type){margin-right:.8em}.DocSearch-Commands-Key{background:var(--docsearch-key-gradient);border:0;border-radius:2px;box-shadow:var(--docsearch-key-shadow);color:var(--docsearch-muted-color);height:18px;justify-content:center;margin-right:.4em;padding:0 0 1px;width:20px}.buttonGroup__atx button,.codeBlockContainer_Ckt0{background:var(--prism-background-color);color:var(--prism-color)}@keyframes b{0%{opacity:0}to{opacity:1}}.DocSearch-Button{margin:0;transition:all var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.DocSearch-Container{z-index:calc(var(--ifm-z-index-fixed) + 1)}.codeBlockContainer_Ckt0{border-radius:var(--ifm-code-border-radius);box-shadow:var(--ifm-global-shadow-lw);margin-bottom:var(--ifm-leading)}.codeBlockContent_biex{border-radius:inherit;direction:ltr;position:relative}.codeBlockTitle_Ktv7{border-bottom:1px solid var(--ifm-color-emphasis-300);border-top-left-radius:inherit;border-top-right-radius:inherit;font-size:var(--ifm-code-font-size);font-weight:500;padding:.75rem var(--ifm-pre-padding)}.codeBlock_bY9V{--ifm-pre-background:var(--prism-background-color);margin:0;padding:0}.codeBlockTitle_Ktv7+.codeBlockContent_biex .codeBlock_bY9V{border-top-left-radius:0;border-top-right-radius:0}.codeBlockLines_e6Vv{float:left;font:inherit;min-width:100%;padding:var(--ifm-pre-padding)}.codeBlockLinesWithNumbering_o6Pm{display:table;padding:var(--ifm-pre-padding) 0}.buttonGroup__atx{column-gap:.2rem;display:flex;position:absolute;right:calc(var(--ifm-pre-padding)/2);top:calc(var(--ifm-pre-padding)/2)}.buttonGroup__atx button{align-items:center;border:1px solid var(--ifm-color-emphasis-300);border-radius:var(--ifm-global-radius);display:flex;line-height:0;opacity:0;padding:.4rem;transition:opacity var(--ifm-transition-fast) ease-in-out}.buttonGroup__atx button:focus-visible,.buttonGroup__atx button:hover{opacity:1!important}.theme-code-block:hover .buttonGroup__atx button{opacity:.4}.iconEdit_Z9Sw{margin-right:.3em;vertical-align:sub}.tag_zVej{border:1px solid var(--docusaurus-tag-list-border);transition:border var(--ifm-transition-fast)}.tag_zVej:hover{--docusaurus-tag-list-border:var(--ifm-link-color);text-decoration:none}.tagRegular_sFm0{border-radius:var(--ifm-global-radius);font-size:90%;padding:.2rem .5rem .3rem}.tagWithCount_h2kH{align-items:center;border-left:0;display:flex;padding:0 .5rem 0 1rem;position:relative}.tagWithCount_h2kH:after,.tagWithCount_h2kH:before{border:1px solid var(--docusaurus-tag-list-border);content:"";position:absolute;top:50%;transition:inherit}.tagWithCount_h2kH:before{border-bottom:0;border-right:0;height:1.18rem;right:100%;transform:translate(50%,-50%) rotate(-45deg);width:1.18rem}.tagWithCount_h2kH:after{border-radius:50%;height:.5rem;left:0;transform:translateY(-50%);width:.5rem}.tagWithCount_h2kH span{background:var(--ifm-color-secondary);border-radius:var(--ifm-global-radius);color:var(--ifm-color-black);font-size:.7rem;line-height:1.2;margin-left:.3rem;padding:.1rem .4rem}.tag_Nnez{display:inline-block;margin:.5rem .5rem 0 1rem}:where(:root){--docusaurus-highlighted-code-line-bg:#484d5b}:where([data-theme=dark]){--docusaurus-highlighted-code-line-bg:#646464}.theme-code-block-highlighted-line{background-color:var(--docusaurus-highlighted-code-line-bg);display:block;margin:0 calc(var(--ifm-pre-padding)*-1);padding:0 var(--ifm-pre-padding)}.codeLine_lJS_{counter-increment:a;display:table-row}.codeLineNumber_Tfdd{background:var(--ifm-pre-background);display:table-cell;left:0;overflow-wrap:normal;padding:0 var(--ifm-pre-padding);position:-webkit-sticky;position:sticky;text-align:right;width:1%}.codeLineNumber_Tfdd:before{content:counter(a);opacity:.4}.codeLineContent_feaV{padding-right:var(--ifm-pre-padding)}.theme-code-block:hover .copyButtonCopied_obH4{opacity:1!important}.copyButtonIcons_eSgA{height:1.125rem;position:relative;width:1.125rem}.copyButtonIcon_y97N,.copyButtonSuccessIcon_LjdS{fill:currentColor;height:inherit;left:0;opacity:inherit;position:absolute;top:0;transition:all var(--ifm-transition-fast) ease;width:inherit}.copyButtonSuccessIcon_LjdS{color:#00d600;left:50%;opacity:0;top:50%;transform:translate(-50%,-50%) scale(.33)}.copyButtonCopied_obH4 .copyButtonIcon_y97N{opacity:0;transform:scale(.33)}.copyButtonCopied_obH4 .copyButtonSuccessIcon_LjdS{opacity:1;transform:translate(-50%,-50%) scale(1);transition-delay:75ms}.tag_QGVx{display:inline-block;margin:0 .4rem .5rem 0}.lastUpdated_vwxv{font-size:smaller;font-style:italic;margin-top:.2rem}.tocCollapsibleButton_TO0P{align-items:center;display:flex;font-size:inherit;justify-content:space-between;padding:.4rem .8rem;width:100%}.tocCollapsibleButton_TO0P:after{background:var(--ifm-menu-link-sublist-icon) 50% 50%/2rem 2rem no-repeat;content:"";filter:var(--ifm-menu-link-sublist-icon-filter);height:1.25rem;transform:rotate(180deg);transition:transform var(--ifm-transition-fast);width:1.25rem}.tocCollapsibleButtonExpanded_MG3E:after,.tocCollapsibleExpanded_sAul{transform:none}.tocCollapsible_ETCw{background-color:var(--ifm-menu-color-background-active);border-radius:var(--ifm-global-radius);margin:1rem 0}.tocCollapsibleContent_vkbj>ul{border-left:none;border-top:1px solid var(--ifm-color-emphasis-300);font-size:15px;padding:.2rem 0}.tocCollapsibleContent_vkbj ul li{margin:.4rem .8rem}.wordWrapButtonIcon_Bwma{height:1.2rem;width:1.2rem}.details_lb9f{--docusaurus-details-summary-arrow-size:0.38rem;--docusaurus-details-transition:transform 200ms ease;--docusaurus-details-decoration-color:grey}.details_lb9f>summary{cursor:pointer;list-style:none;padding-left:1rem;position:relative}.details_lb9f>summary::-webkit-details-marker{display:none}.details_lb9f>summary:before{border-color:#0000 #0000 #0000 var(--docusaurus-details-decoration-color);border-style:solid;border-width:var(--docusaurus-details-summary-arrow-size);content:"";left:0;position:absolute;top:.45rem;transform:rotate(0);transform-origin:calc(var(--docusaurus-details-summary-arrow-size)/2) 50%;transition:var(--docusaurus-details-transition)}.collapsibleContent_i85q{border-top:1px solid var(--docusaurus-details-decoration-color);margin-top:1rem;padding-top:1rem}.details_b_Ee{--docusaurus-details-decoration-color:var(--ifm-alert-border-color);--docusaurus-details-transition:transform var(--ifm-transition-fast) ease;border:1px solid var(--ifm-alert-border-color);margin:0 0 var(--ifm-spacing-vertical)}.containsTaskList_mC6p{list-style:none}:not(.containsTaskList_mC6p>li)>.containsTaskList_mC6p{padding-left:0}.img_ev3q{height:auto}.tableOfContents_bqdL{max-height:calc(100vh - var(--ifm-navbar-height) - 2rem);overflow-y:auto;position:-webkit-sticky;position:sticky;top:calc(var(--ifm-navbar-height) + 1rem)}.breadcrumbHomeIcon_YNFT{height:1.1rem;position:relative;top:1px;vertical-align:top;width:1.1rem}.breadcrumbsContainer_Z_bl{--ifm-breadcrumb-size-multiplier:0.8;margin-bottom:.8rem}@media (min-width:496px){.tablet\:mx-0{margin-left:0;margin-right:0}.tablet\:grid-flow-row{grid-auto-flow:row}.tablet\:auto-rows-auto{grid-auto-rows:auto}.tablet\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.tablet\:gap-x-20{column-gap:5rem}.tablet\:overflow-x-hidden{overflow-x:hidden}.tablet\:px-0{padding-left:0;padding-right:0}}@media not all and (min-width:496px){.max-tablet\:no-scrollbar::-webkit-scrollbar{display:none}.max-tablet\:no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}}@media (min-width:997px){.collapseSidebarButton_PEFL,.expandButton_TmdG{background-color:var(--docusaurus-collapse-button-bg)}.es-showcase-grid{display:grid;gap:6rem;grid-template-columns:repeat(2,minmax(0,1fr));width:-moz-fit-content;width:-webkit-fit-content;width:fit-content}.desktop\:sticky{position:-webkit-sticky;position:sticky}.desktop\:top-navbar{top:6.25rem}.desktop\:row-span-2{grid-row:span 2/span 2}.desktop\:mb-0{margin-bottom:0}.desktop\:mb-1{margin-bottom:.25rem}.desktop\:mb-10{margin-bottom:2.5rem}.desktop\:mb-20{margin-bottom:5rem}.desktop\:block{display:block}.desktop\:grid{display:grid}.desktop\:w-auto{width:auto}.desktop\:max-w-full,.navbar__logo{max-width:100%}.desktop\:max-w-xl{max-width:36rem}.desktop\:auto-rows-auto{grid-auto-rows:auto}.desktop\:grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.desktop\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.desktop\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.desktop\:grid-cols-fit20{grid-template-columns:repeat(auto-fit,minmax(20rem,1fr))}.desktop\:grid-rows-\[auto_9rem\]{grid-template-rows:auto 9rem}.desktop\:flex-row{flex-direction:row}.desktop\:items-center,.sidebarLogo_isFc{align-items:center}.desktop\:justify-between{justify-content:space-between}.desktop\:gap-x-gutter{column-gap:2.78vw}.desktop\:gap-y-0{row-gap:0}.desktop\:gap-y-20{row-gap:5rem}.desktop\:self-start{align-self:flex-start}.desktop\:py-20{padding-bottom:5rem;padding-top:5rem}.desktop\:py-24{padding-bottom:6rem;padding-top:6rem}.desktop\:pb-0{padding-bottom:0}.desktop\:pb-36{padding-bottom:9rem}.desktop\:pb-side-padding{padding-bottom:5.56vw}.desktop\:pr-0{padding-right:0}.desktop\:pt-10{padding-top:2.5rem}.desktop\:pt-20{padding-top:5rem}.desktop\:pt-24{padding-top:6rem}.desktop\:text-left{text-align:left}.DocSearch.DocSearch-Button{padding-right:.75rem!important}.DocSearch.DocSearch-Button .DocSearch-Button-Keys{display:flex!important}.DocSearch-Modal{border-radius:.75rem!important}.es-big-title,.es-big-title-limited{padding-bottom:0;padding-top:5rem}.es-big-subtitle{margin-bottom:2rem;margin-top:1rem}.es-blog-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));row-gap:8rem}.navbar__link{display:flex}.blog-tags-post-list-page .main-wrapper>.container>.row{display:grid;grid-template-columns:repeat(10,minmax(0,1fr))}.blog-tags-post-list-page .main-wrapper>.container>.row>.col.col--3{grid-column:span 2/span 2;grid-column-start:1}.blog-tags-post-list-page .main-wrapper>.container>.row>.col.col--7{display:grid;grid-column:span 8/span 8;grid-column-start:3;grid-template-columns:repeat(3,minmax(0,1fr));row-gap:8rem}.blog-tags-post-list-page .main-wrapper>.container>.row>.col.col--7>header{margin-bottom:-5rem!important}main[class*=docMainContainer]>.container{padding:5rem!important}.pagination-nav{flex-direction:row;justify-content:space-between;margin-bottom:5rem}.pagination-nav__link--next{margin-left:auto}.blog-post-page main>article>header div[class*=BlogPostItem-Header-Info]+div.margin-top--md.margin-bottom--sm{margin-bottom:5rem!important}.blog-post-page .container>.row{display:grid;justify-content:space-between}:root{--docusaurus-announcement-bar-height:30px}.announcementBarClose_gvF7,.announcementBarPlaceholder_vyr4{flex-basis:50px}.navbarSearchContainer_Bca1{padding:var(--ifm-navbar-item-padding-vertical) var(--ifm-navbar-item-padding-horizontal)}.collapseSidebarButton_PEFL{border:1px solid var(--ifm-toc-border-color);border-radius:0;bottom:0;display:block!important;height:40px;position:-webkit-sticky;position:sticky}.collapseSidebarButtonIcon_kv0_{margin-top:4px;transform:rotate(180deg)}.expandButtonIcon_i1dp,[dir=rtl] .collapseSidebarButtonIcon_kv0_{transform:rotate(0)}.collapseSidebarButton_PEFL:focus,.collapseSidebarButton_PEFL:hover,.expandButton_TmdG:focus,.expandButton_TmdG:hover{background-color:var(--docusaurus-collapse-button-bg-hover)}.menuHtmlItem_M9Kj{padding:var(--ifm-menu-link-padding-vertical) var(--ifm-menu-link-padding-horizontal)}.menu_SIkG{flex-grow:1;padding:.5rem}@supports (scrollbar-gutter:stable){.menu_SIkG{padding:.5rem 0 .5rem .5rem;scrollbar-gutter:stable}}.menuWithAnnouncementBar_GW3s{margin-bottom:var(--docusaurus-announcement-bar-height)}.sidebar_njMd{display:flex;flex-direction:column;height:100%;padding-top:var(--ifm-navbar-height);width:var(--doc-sidebar-width)}.sidebarWithHideableNavbar_wUlq{padding-top:0}.sidebarHidden_VK0M{opacity:0;visibility:hidden}.sidebarLogo_isFc{color:inherit!important;display:flex!important;margin:0 var(--ifm-navbar-padding-horizontal);max-height:var(--ifm-navbar-height);min-height:var(--ifm-navbar-height);text-decoration:none!important}.sidebarLogo_isFc img{height:2rem;margin-right:.5rem}.expandButton_TmdG{align-items:center;display:flex;height:100%;justify-content:center;position:absolute;right:0;top:0;transition:background-color var(--ifm-transition-fast) ease;width:100%}[dir=rtl] .expandButtonIcon_i1dp{transform:rotate(180deg)}.docSidebarContainer_YfHR{border-right:1px solid var(--ifm-toc-border-color);-webkit-clip-path:inset(0);clip-path:inset(0);display:block;margin-top:calc(var(--ifm-navbar-height)*-1);transition:width var(--ifm-transition-fast) ease;width:var(--doc-sidebar-width);will-change:width}.docSidebarContainerHidden_DPk8{cursor:pointer;width:var(--doc-sidebar-hidden-width)}.sidebarViewport_aRkj{height:100%;max-height:100vh;position:-webkit-sticky;position:sticky;top:0}.docMainContainer_TBSr{flex-grow:1;max-width:calc(100% - var(--doc-sidebar-width))}.docMainContainerEnhanced_lQrH{max-width:calc(100% - var(--doc-sidebar-hidden-width))}.docItemWrapperEnhanced_JWYK{max-width:calc(var(--ifm-container-width) + var(--doc-sidebar-width))!important}.lastUpdated_vwxv{text-align:right}.tocMobile_ITEo{display:none}.docItemCol_VOVn{max-width:75%!important}}@media (min-width:1365px){.es-showcase-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (min-width:1440px){.container{max-width:var(--ifm-container-width-xl)}}@media (max-width:996px){.col{--ifm-col-width:100%;flex-basis:var(--ifm-col-width);margin-left:0}.footer{--ifm-footer-padding-horizontal:0}.colorModeToggle_DEke,.footer__link-separator,.navbar__item,.sidebar_re4s,.tableOfContents_bqdL{display:none}.footer__col{margin-bottom:calc(var(--ifm-spacing-vertical)*3)}.footer__link-item{display:block}.hero{padding-left:0;padding-right:0}.navbar>.container,.navbar>.container-fluid{padding:0}.navbar__toggle{display:inherit}.navbar__search-input{width:9rem}.pills--block,.tabs--block{flex-direction:column}.navbarSearchContainer_Bca1{position:absolute;right:var(--ifm-navbar-padding-horizontal)}.docItemContainer_F8PC{padding:0 .3rem}}@media only screen and (max-width:996px){.searchQueryColumn_RTkw,.searchResultsColumn_JPFH{max-width:60%!important}.searchLogoColumn_rJIA,.searchVersionColumn_ypXd{max-width:40%!important}.searchLogoColumn_rJIA{padding-left:0!important}}@media (max-width:768px){.DocSearch-Button-Keys,.DocSearch-Button-Placeholder,.DocSearch-Commands,.DocSearch-Hit-Tree{display:none}:root{--docsearch-spacing:10px;--docsearch-footer-height:40px}.DocSearch-Dropdown{height:100%;max-height:calc(var(--docsearch-vh,1vh)*100 - var(--docsearch-searchbox-height) - var(--docsearch-spacing) - var(--docsearch-footer-height))}.DocSearch-Container{height:100vh;height:-webkit-fill-available;height:calc(var(--docsearch-vh,1vh)*100);position:absolute}.DocSearch-Footer{border-radius:0;bottom:0;position:absolute}.DocSearch-Hit-content-wrapper{display:flex;position:relative;width:80%}.DocSearch-Modal{border-radius:0;box-shadow:none;height:100vh;height:-webkit-fill-available;height:calc(var(--docsearch-vh,1vh)*100);margin:0;max-width:100%;width:100%}.DocSearch-Cancel{-webkit-appearance:none;appearance:none;background:none;border:0;color:var(--docsearch-highlight-color);cursor:pointer;display:inline-block;flex:none;font:inherit;font-size:1em;font-weight:500;margin-left:var(--docsearch-spacing);outline:0;overflow:hidden;padding:0;-webkit-user-select:none;user-select:none;white-space:nowrap}}@media (max-width:576px){.markdown h1:first-child{--ifm-h1-font-size:2rem}.markdown>h2{--ifm-h2-font-size:1.5rem}.markdown>h3{--ifm-h3-font-size:1.25rem}.title_f1Hy{font-size:2rem}}@media screen and (max-width:576px){.searchQueryColumn_RTkw{max-width:100%!important}.searchVersionColumn_ypXd{max-width:100%!important;padding-left:var(--ifm-spacing-horizontal)!important}}@media (hover:hover){.backToTopButton_sjWU:hover{background-color:var(--ifm-color-emphasis-300)}}@media (pointer:fine){.thin-scrollbar{scrollbar-width:thin}.thin-scrollbar::-webkit-scrollbar{height:var(--ifm-scrollbar-size);width:var(--ifm-scrollbar-size)}.thin-scrollbar::-webkit-scrollbar-track{background:var(--ifm-scrollbar-track-background-color);border-radius:10px}.thin-scrollbar::-webkit-scrollbar-thumb{background:var(--ifm-scrollbar-thumb-background-color);border-radius:10px}.thin-scrollbar::-webkit-scrollbar-thumb:hover{background:var(--ifm-scrollbar-thumb-hover-background-color)}}@media (prefers-reduced-motion:reduce){:root{--ifm-transition-fast:0ms;--ifm-transition-slow:0ms}}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Reset{stroke-width:var(--docsearch-icon-stroke-width);animation:none;-webkit-appearance:none;appearance:none;background:none;border:0;border-radius:50%;color:var(--docsearch-icon-color);cursor:pointer;right:0}.DocSearch-Hit--deleting,.DocSearch-Hit--favoriting{transition:none}.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{background:#0003;transition:none}}@media print{.announcementBar_mb4j,.footer,.menu,.navbar,.pagination-nav,.table-of-contents,.tocMobile_ITEo{display:none}.tabs{page-break-inside:avoid}.codeBlockLines_e6Vv{white-space:pre-wrap}} \ No newline at end of file diff --git a/assets/css/styles.eccbee7c.css b/assets/css/styles.eccbee7c.css deleted file mode 100644 index ba28f7e62..000000000 --- a/assets/css/styles.eccbee7c.css +++ /dev/null @@ -1 +0,0 @@ -@import url(https://use.typekit.net/baz1roy.css);.col,.container{padding:0 var(--ifm-spacing-horizontal);width:100%}.markdown>h2,.markdown>h3,.markdown>h4,.markdown>h5,.markdown>h6{margin-bottom:calc(var(--ifm-heading-vertical-rhythm-bottom)*var(--ifm-leading))}blockquote,pre{margin:0 0 var(--ifm-spacing-vertical)}.breadcrumbs__link,.button{transition-timing-function:var(--ifm-transition-timing-default)}.button--outline.button--active,.button--outline:active,.button--outline:hover,:root{--ifm-button-color:var(--ifm-font-color-base-inverse)}.menu__link:hover,a{transition:color var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.navbar--dark,:root{--ifm-navbar-link-hover-color:var(--ifm-color-primary)}.menu,.navbar-sidebar{overflow-x:hidden}:root,html[data-theme=dark]{--ifm-color-emphasis-500:var(--ifm-color-gray-500)}.markdown li,body{word-wrap:break-word}pre,table{overflow:auto}.button,code{vertical-align:middle}*,.markdown .alert,:after,:before{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000}.DocSearch-Modal .DocSearch-Hits .DocSearch-Hit,.DocSearch-Modal .DocSearch-HitsFooter a{transition-duration:.15s!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.toggleButton_gllP,html{-webkit-tap-highlight-color:transparent}*,.DocSearch-Container,.DocSearch-Container *,:after,:before{box-sizing:border-box}:root{--ifm-color-scheme:light;--ifm-dark-value:10%;--ifm-darker-value:15%;--ifm-darkest-value:30%;--ifm-light-value:15%;--ifm-lighter-value:30%;--ifm-lightest-value:50%;--ifm-contrast-background-value:90%;--ifm-contrast-foreground-value:70%;--ifm-contrast-background-dark-value:70%;--ifm-contrast-foreground-dark-value:90%;--ifm-color-primary:#3578e5;--ifm-color-secondary:#ebedf0;--ifm-color-success:#00a400;--ifm-color-info:#54c7ec;--ifm-color-warning:#ffba00;--ifm-color-danger:#fa383e;--ifm-color-primary-dark:#306cce;--ifm-color-primary-darker:#2d66c3;--ifm-color-primary-darkest:#2554a0;--ifm-color-primary-light:#538ce9;--ifm-color-primary-lighter:#72a1ed;--ifm-color-primary-lightest:#9abcf2;--ifm-color-primary-contrast-background:#ebf2fc;--ifm-color-primary-contrast-foreground:#102445;--ifm-color-secondary-dark:#d4d5d8;--ifm-color-secondary-darker:#c8c9cc;--ifm-color-secondary-darkest:#a4a6a8;--ifm-color-secondary-light:#eef0f2;--ifm-color-secondary-lighter:#f1f2f5;--ifm-color-secondary-lightest:#f5f6f8;--ifm-color-secondary-contrast-background:#fdfdfe;--ifm-color-secondary-contrast-foreground:#474748;--ifm-color-success-dark:#009400;--ifm-color-success-darker:#008b00;--ifm-color-success-darkest:#007300;--ifm-color-success-light:#26b226;--ifm-color-success-lighter:#4dbf4d;--ifm-color-success-lightest:#80d280;--ifm-color-success-contrast-background:#e6f6e6;--ifm-color-success-contrast-foreground:#003100;--ifm-color-info-dark:#4cb3d4;--ifm-color-info-darker:#47a9c9;--ifm-color-info-darkest:#3b8ba5;--ifm-color-info-light:#6ecfef;--ifm-color-info-lighter:#87d8f2;--ifm-color-info-lightest:#aae3f6;--ifm-color-info-contrast-background:#eef9fd;--ifm-color-info-contrast-foreground:#193c47;--ifm-color-warning-dark:#e6a700;--ifm-color-warning-darker:#d99e00;--ifm-color-warning-darkest:#b38200;--ifm-color-warning-light:#ffc426;--ifm-color-warning-lighter:#ffcf4d;--ifm-color-warning-lightest:#ffdd80;--ifm-color-warning-contrast-background:#fff8e6;--ifm-color-warning-contrast-foreground:#4d3800;--ifm-color-danger-dark:#e13238;--ifm-color-danger-darker:#d53035;--ifm-color-danger-darkest:#af272b;--ifm-color-danger-light:#fb565b;--ifm-color-danger-lighter:#fb7478;--ifm-color-danger-lightest:#fd9c9f;--ifm-color-danger-contrast-background:#ffebec;--ifm-color-danger-contrast-foreground:#4b1113;--ifm-color-white:#fff;--ifm-color-black:#000;--ifm-color-gray-0:var(--ifm-color-white);--ifm-color-gray-100:#f5f6f7;--ifm-color-gray-200:#ebedf0;--ifm-color-gray-300:#dadde1;--ifm-color-gray-400:#ccd0d5;--ifm-color-gray-500:#bec3c9;--ifm-color-gray-600:#8d949e;--ifm-color-gray-700:#606770;--ifm-color-gray-800:#444950;--ifm-color-gray-900:#1c1e21;--ifm-color-gray-1000:var(--ifm-color-black);--ifm-color-emphasis-0:var(--ifm-color-gray-0);--ifm-color-emphasis-100:var(--ifm-color-gray-100);--ifm-color-emphasis-200:var(--ifm-color-gray-200);--ifm-color-emphasis-300:var(--ifm-color-gray-300);--ifm-color-emphasis-400:var(--ifm-color-gray-400);--ifm-color-emphasis-600:var(--ifm-color-gray-600);--ifm-color-emphasis-700:var(--ifm-color-gray-700);--ifm-color-emphasis-800:var(--ifm-color-gray-800);--ifm-color-emphasis-900:var(--ifm-color-gray-900);--ifm-color-emphasis-1000:var(--ifm-color-gray-1000);--ifm-color-content:var(--ifm-color-emphasis-900);--ifm-color-content-inverse:var(--ifm-color-emphasis-0);--ifm-color-content-secondary:#525860;--ifm-background-color:transparent;--ifm-background-surface-color:var(--ifm-color-content-inverse);--ifm-global-border-width:1px;--ifm-global-radius:0.4rem;--ifm-hover-overlay:rgba(0,0,0,.05);--ifm-font-color-base:var(--ifm-color-content);--ifm-font-color-base-inverse:var(--ifm-color-content-inverse);--ifm-font-color-secondary:var(--ifm-color-content-secondary);--ifm-font-family-base:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";--ifm-font-family-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--ifm-font-size-base:100%;--ifm-font-weight-light:300;--ifm-font-weight-normal:400;--ifm-font-weight-semibold:500;--ifm-font-weight-bold:700;--ifm-font-weight-base:var(--ifm-font-weight-normal);--ifm-line-height-base:1.65;--ifm-global-spacing:1rem;--ifm-spacing-vertical:var(--ifm-global-spacing);--ifm-spacing-horizontal:var(--ifm-global-spacing);--ifm-transition-fast:200ms;--ifm-transition-slow:400ms;--ifm-transition-timing-default:cubic-bezier(0.08,0.52,0.52,1);--ifm-global-shadow-lw:0 1px 2px 0 rgba(0,0,0,.1);--ifm-global-shadow-md:0 5px 40px rgba(0,0,0,.2);--ifm-global-shadow-tl:0 12px 28px 0 rgba(0,0,0,.2),0 2px 4px 0 rgba(0,0,0,.1);--ifm-z-index-dropdown:100;--ifm-z-index-fixed:200;--ifm-z-index-overlay:400;--ifm-container-width:1140px;--ifm-container-width-xl:1320px;--ifm-code-background:#f6f7f8;--ifm-code-border-radius:var(--ifm-global-radius);--ifm-code-font-size:90%;--ifm-code-padding-horizontal:0.1rem;--ifm-code-padding-vertical:0.1rem;--ifm-pre-background:var(--ifm-code-background);--ifm-pre-border-radius:var(--ifm-code-border-radius);--ifm-pre-color:inherit;--ifm-pre-line-height:1.45;--ifm-pre-padding:1rem;--ifm-heading-color:inherit;--ifm-heading-margin-top:0;--ifm-heading-margin-bottom:var(--ifm-spacing-vertical);--ifm-heading-font-family:var(--ifm-font-family-base);--ifm-heading-font-weight:var(--ifm-font-weight-bold);--ifm-heading-line-height:1.25;--ifm-h1-font-size:2rem;--ifm-h2-font-size:1.5rem;--ifm-h3-font-size:1.25rem;--ifm-h4-font-size:1rem;--ifm-h5-font-size:0.875rem;--ifm-h6-font-size:0.85rem;--ifm-image-alignment-padding:1.25rem;--ifm-leading-desktop:1.25;--ifm-leading:calc(var(--ifm-leading-desktop)*1rem);--ifm-list-left-padding:2rem;--ifm-list-margin:1rem;--ifm-list-item-margin:0.25rem;--ifm-list-paragraph-margin:1rem;--ifm-table-cell-padding:0.75rem;--ifm-table-background:transparent;--ifm-table-stripe-background:rgba(0,0,0,.03);--ifm-table-border-width:1px;--ifm-table-border-color:var(--ifm-color-emphasis-300);--ifm-table-head-background:inherit;--ifm-table-head-color:inherit;--ifm-table-head-font-weight:var(--ifm-font-weight-bold);--ifm-table-cell-color:inherit;--ifm-link-color:var(--ifm-color-primary);--ifm-link-decoration:none;--ifm-link-hover-color:var(--ifm-link-color);--ifm-link-hover-decoration:underline;--ifm-paragraph-margin-bottom:var(--ifm-leading);--ifm-blockquote-font-size:var(--ifm-font-size-base);--ifm-blockquote-border-left-width:2px;--ifm-blockquote-padding-horizontal:var(--ifm-spacing-horizontal);--ifm-blockquote-padding-vertical:0;--ifm-blockquote-shadow:none;--ifm-blockquote-color:var(--ifm-color-emphasis-800);--ifm-blockquote-border-color:var(--ifm-color-emphasis-300);--ifm-hr-background-color:var(--ifm-color-emphasis-500);--ifm-hr-height:1px;--ifm-hr-margin-vertical:1.5rem;--ifm-scrollbar-size:7px;--ifm-scrollbar-track-background-color:#f1f1f1;--ifm-scrollbar-thumb-background-color:silver;--ifm-scrollbar-thumb-hover-background-color:#a7a7a7;--ifm-alert-background-color:inherit;--ifm-alert-border-color:inherit;--ifm-alert-border-radius:var(--ifm-global-radius);--ifm-alert-border-width:0px;--ifm-alert-border-left-width:5px;--ifm-alert-color:var(--ifm-font-color-base);--ifm-alert-padding-horizontal:var(--ifm-spacing-horizontal);--ifm-alert-padding-vertical:var(--ifm-spacing-vertical);--ifm-alert-shadow:var(--ifm-global-shadow-lw);--ifm-avatar-intro-margin:1rem;--ifm-avatar-intro-alignment:inherit;--ifm-avatar-photo-size:3rem;--ifm-badge-background-color:inherit;--ifm-badge-border-color:inherit;--ifm-badge-border-radius:var(--ifm-global-radius);--ifm-badge-border-width:var(--ifm-global-border-width);--ifm-badge-color:var(--ifm-color-white);--ifm-badge-padding-horizontal:calc(var(--ifm-spacing-horizontal)*0.5);--ifm-badge-padding-vertical:calc(var(--ifm-spacing-vertical)*0.25);--ifm-breadcrumb-border-radius:1.5rem;--ifm-breadcrumb-spacing:0.5rem;--ifm-breadcrumb-color-active:var(--ifm-color-primary);--ifm-breadcrumb-item-background-active:var(--ifm-hover-overlay);--ifm-breadcrumb-padding-horizontal:0.8rem;--ifm-breadcrumb-padding-vertical:0.4rem;--ifm-breadcrumb-size-multiplier:1;--ifm-breadcrumb-separator:url('data:image/svg+xml;utf8,');--ifm-breadcrumb-separator-filter:none;--ifm-breadcrumb-separator-size:0.5rem;--ifm-breadcrumb-separator-size-multiplier:1.25;--ifm-button-background-color:inherit;--ifm-button-border-color:var(--ifm-button-background-color);--ifm-button-border-width:var(--ifm-global-border-width);--ifm-button-font-weight:var(--ifm-font-weight-bold);--ifm-button-padding-horizontal:1.5rem;--ifm-button-padding-vertical:0.375rem;--ifm-button-size-multiplier:1;--ifm-button-transition-duration:var(--ifm-transition-fast);--ifm-button-border-radius:calc(var(--ifm-global-radius)*var(--ifm-button-size-multiplier));--ifm-button-group-spacing:2px;--ifm-card-background-color:var(--ifm-background-surface-color);--ifm-card-border-radius:calc(var(--ifm-global-radius)*2);--ifm-card-horizontal-spacing:var(--ifm-global-spacing);--ifm-card-vertical-spacing:var(--ifm-global-spacing);--ifm-toc-border-color:var(--ifm-color-emphasis-300);--ifm-toc-link-color:var(--ifm-color-content-secondary);--ifm-toc-padding-vertical:0.5rem;--ifm-toc-padding-horizontal:0.5rem;--ifm-dropdown-background-color:var(--ifm-background-surface-color);--ifm-dropdown-font-weight:var(--ifm-font-weight-semibold);--ifm-dropdown-link-color:var(--ifm-font-color-base);--ifm-dropdown-hover-background-color:var(--ifm-hover-overlay);--ifm-footer-background-color:var(--ifm-color-emphasis-100);--ifm-footer-color:inherit;--ifm-footer-link-color:var(--ifm-color-emphasis-700);--ifm-footer-link-hover-color:var(--ifm-color-primary);--ifm-footer-link-horizontal-spacing:0.5rem;--ifm-footer-padding-horizontal:calc(var(--ifm-spacing-horizontal)*2);--ifm-footer-padding-vertical:calc(var(--ifm-spacing-vertical)*2);--ifm-footer-title-color:inherit;--ifm-footer-logo-max-width:min(30rem,90vw);--ifm-hero-background-color:var(--ifm-background-surface-color);--ifm-hero-text-color:var(--ifm-color-emphasis-800);--ifm-menu-color:var(--ifm-color-emphasis-700);--ifm-menu-color-active:var(--ifm-color-primary);--ifm-menu-color-background-active:var(--ifm-hover-overlay);--ifm-menu-color-background-hover:var(--ifm-hover-overlay);--ifm-menu-link-padding-horizontal:0.75rem;--ifm-menu-link-padding-vertical:0.375rem;--ifm-menu-link-sublist-icon:url('data:image/svg+xml;utf8,');--ifm-menu-link-sublist-icon-filter:none;--ifm-navbar-background-color:var(--ifm-background-surface-color);--ifm-navbar-height:3.75rem;--ifm-navbar-item-padding-horizontal:0.75rem;--ifm-navbar-item-padding-vertical:0.25rem;--ifm-navbar-link-color:var(--ifm-font-color-base);--ifm-navbar-link-active-color:var(--ifm-link-color);--ifm-navbar-padding-horizontal:var(--ifm-spacing-horizontal);--ifm-navbar-padding-vertical:calc(var(--ifm-spacing-vertical)*0.5);--ifm-navbar-shadow:var(--ifm-global-shadow-lw);--ifm-navbar-search-input-background-color:var(--ifm-color-emphasis-200);--ifm-navbar-search-input-color:var(--ifm-color-emphasis-800);--ifm-navbar-search-input-placeholder-color:var(--ifm-color-emphasis-500);--ifm-navbar-search-input-icon:url('data:image/svg+xml;utf8,');--ifm-navbar-sidebar-width:83vw;--ifm-pagination-border-radius:var(--ifm-global-radius);--ifm-pagination-color-active:var(--ifm-color-primary);--ifm-pagination-font-size:1rem;--ifm-pagination-item-active-background:var(--ifm-hover-overlay);--ifm-pagination-page-spacing:0.2em;--ifm-pagination-padding-horizontal:calc(var(--ifm-spacing-horizontal)*1);--ifm-pagination-padding-vertical:calc(var(--ifm-spacing-vertical)*0.25);--ifm-pagination-nav-border-radius:var(--ifm-global-radius);--ifm-pagination-nav-color-hover:var(--ifm-color-primary);--ifm-pills-color-active:var(--ifm-color-primary);--ifm-pills-color-background-active:var(--ifm-hover-overlay);--ifm-pills-spacing:0.125rem;--ifm-tabs-color:var(--ifm-font-color-secondary);--ifm-tabs-color-active:var(--ifm-color-primary);--ifm-tabs-color-active-border:var(--ifm-tabs-color-active);--ifm-tabs-padding-horizontal:1rem;--ifm-tabs-padding-vertical:1rem}.badge--danger,.badge--info,.badge--primary,.badge--secondary,.badge--success,.badge--warning{--ifm-badge-border-color:var(--ifm-badge-background-color)}.button--link,.button--outline{--ifm-button-background-color:transparent}html{-webkit-font-smoothing:antialiased;-moz-text-size-adjust:100%;text-size-adjust:100%;background-color:var(--ifm-background-color);color:var(--ifm-font-color-base);color-scheme:var(--ifm-color-scheme);font:var(--ifm-font-size-base)/var(--ifm-line-height-base) var(--ifm-font-family-base);text-rendering:optimizelegibility}iframe{border:0;color-scheme:auto}.container{margin:0 auto;max-width:var(--ifm-container-width)}.container--fluid{max-width:inherit}.row{display:flex;flex-wrap:wrap;margin:0 calc(var(--ifm-spacing-horizontal)*-1)}.margin-bottom--none,.margin-vert--none,.markdown>:last-child{margin-bottom:0!important}.margin-top--none,.margin-vert--none{margin-top:0!important}.row--no-gutters{margin-left:0;margin-right:0}.margin-horiz--none,.margin-right--none{margin-right:0!important}.row--no-gutters>.col{padding-left:0;padding-right:0}.items-start,.row--align-top{align-items:flex-start}.row--align-bottom{align-items:flex-end}.items-center,.menuExternalLink_NmtK,.row--align-center{align-items:center}.row--align-stretch{align-items:stretch}.row--align-baseline{align-items:baseline}.col{--ifm-col-width:100%;flex:1 0;margin-left:0;max-width:var(--ifm-col-width)}.padding-bottom--none,.padding-vert--none{padding-bottom:0!important}.padding-top--none,.padding-vert--none{padding-top:0!important}.padding-horiz--none,.padding-left--none{padding-left:0!important}.padding-horiz--none,.padding-right--none{padding-right:0!important}.col[class*=col--]{flex:0 0 var(--ifm-col-width)}.col--1{--ifm-col-width:8.33333%}.col--offset-1{margin-left:8.33333%}.col--2{--ifm-col-width:16.66667%}.col--offset-2{margin-left:16.66667%}.col--3{--ifm-col-width:25%}.col--offset-3{margin-left:25%}.col--4{--ifm-col-width:33.33333%}.col--offset-4{margin-left:33.33333%}.col--5{--ifm-col-width:41.66667%}.col--offset-5{margin-left:41.66667%}.col--6{--ifm-col-width:50%}.col--offset-6{margin-left:50%}.col--7{--ifm-col-width:58.33333%}.col--offset-7{margin-left:58.33333%}.col--8{--ifm-col-width:66.66667%}.col--offset-8{margin-left:66.66667%}.col--9{--ifm-col-width:75%}.col--offset-9{margin-left:75%}.col--10{--ifm-col-width:83.33333%}.col--offset-10{margin-left:83.33333%}.col--11{--ifm-col-width:91.66667%}.col--offset-11{margin-left:91.66667%}.col--12{--ifm-col-width:100%}.col--offset-12{margin-left:100%}.margin-horiz--none,.margin-left--none{margin-left:0!important}.margin--none{margin:0!important}.margin-bottom--xs,.margin-vert--xs{margin-bottom:.25rem!important}.margin-top--xs,.margin-vert--xs{margin-top:.25rem!important}.margin-horiz--xs,.margin-left--xs{margin-left:.25rem!important}.margin-horiz--xs,.margin-right--xs{margin-right:.25rem!important}.margin--xs{margin:.25rem!important}.margin-bottom--sm,.margin-vert--sm{margin-bottom:.5rem!important}.margin-top--sm,.margin-vert--sm,.theme-doc-sidebar-item-link.theme-doc-sidebar-item-link-level-1:first-child{margin-top:.5rem!important}.margin-horiz--sm,.margin-left--sm{margin-left:.5rem!important}.margin-horiz--sm,.margin-right--sm{margin-right:.5rem!important}.margin--sm{margin:.5rem!important}.margin-bottom--md,.margin-vert--md{margin-bottom:1rem!important}.DocSearch-Modal .DocSearch-Hits,.margin-top--md,.margin-vert--md{margin-top:1rem!important}.margin-horiz--md,.margin-left--md{margin-left:1rem!important}.margin-horiz--md,.margin-right--md{margin-right:1rem!important}.margin--md{margin:1rem!important}.margin-bottom--lg,.margin-vert--lg{margin-bottom:2rem!important}.margin-top--lg,.margin-vert--lg{margin-top:2rem!important}.margin-horiz--lg,.margin-left--lg{margin-left:2rem!important}.margin-horiz--lg,.margin-right--lg{margin-right:2rem!important}.margin--lg{margin:2rem!important}.margin-bottom--xl,.margin-vert--xl{margin-bottom:5rem!important}.margin-top--xl,.margin-vert--xl{margin-top:5rem!important}.margin-horiz--xl,.margin-left--xl{margin-left:5rem!important}.margin-horiz--xl,.margin-right--xl{margin-right:5rem!important}.margin--xl{margin:5rem!important}.padding--none{padding:0!important}.padding-bottom--xs,.padding-vert--xs{padding-bottom:.25rem!important}.padding-top--xs,.padding-vert--xs{padding-top:.25rem!important}.padding-horiz--xs,.padding-left--xs{padding-left:.25rem!important}.padding-horiz--xs,.padding-right--xs{padding-right:.25rem!important}.padding--xs{padding:.25rem!important}.padding-bottom--sm,.padding-vert--sm{padding-bottom:.5rem!important}.padding-top--sm,.padding-vert--sm{padding-top:.5rem!important}.padding-horiz--sm,.padding-left--sm{padding-left:.5rem!important}.padding-horiz--sm,.padding-right--sm{padding-right:.5rem!important}.padding--sm{padding:.5rem!important}.padding-bottom--md,.padding-vert--md{padding-bottom:1rem!important}.padding-top--md,.padding-vert--md{padding-top:1rem!important}.padding-horiz--md,.padding-left--md{padding-left:1rem!important}.padding-horiz--md,.padding-right--md{padding-right:1rem!important}.padding--md{padding:1rem!important}.padding-bottom--lg,.padding-vert--lg{padding-bottom:2rem!important}.padding-top--lg,.padding-vert--lg{padding-top:2rem!important}.padding-horiz--lg,.padding-left--lg{padding-left:2rem!important}.padding-horiz--lg,.padding-right--lg{padding-right:2rem!important}.padding--lg{padding:2rem!important}.padding-bottom--xl,.padding-vert--xl{padding-bottom:5rem!important}.padding-top--xl,.padding-vert--xl{padding-top:5rem!important}.padding-horiz--xl,.padding-left--xl{padding-left:5rem!important}.padding-horiz--xl,.padding-right--xl{padding-right:5rem!important}.padding--xl{padding:5rem!important}code{background-color:var(--ifm-code-background);border:.1rem solid rgba(0,0,0,.1);border-radius:var(--ifm-code-border-radius);font-family:var(--ifm-font-family-monospace);font-size:var(--ifm-code-font-size);padding:var(--ifm-code-padding-vertical) var(--ifm-code-padding-horizontal)}progress,sub,sup{vertical-align:initial}a code{color:inherit}pre{background-color:var(--ifm-pre-background);border-radius:var(--ifm-pre-border-radius);color:var(--ifm-pre-color);font:var(--ifm-code-font-size)/var(--ifm-pre-line-height) var(--ifm-font-family-monospace);padding:var(--ifm-pre-padding)}pre code{background-color:initial;border:none;font-size:100%;line-height:inherit;padding:0}kbd{background-color:var(--ifm-color-emphasis-0);border:1px solid var(--ifm-color-emphasis-400);border-radius:.2rem;box-shadow:inset 0 -1px 0 var(--ifm-color-emphasis-400);color:var(--ifm-color-emphasis-800);font:80% var(--ifm-font-family-monospace);padding:.15rem .3rem}h1,h2,h3,h4,h5,h6{color:var(--ifm-heading-color);font-family:var(--ifm-heading-font-family);font-weight:var(--ifm-heading-font-weight);line-height:var(--ifm-heading-line-height);margin:var(--ifm-heading-margin-top) 0 var(--ifm-heading-margin-bottom) 0}h1{font-size:var(--ifm-h1-font-size)}h2{font-size:var(--ifm-h2-font-size)}h3{font-size:var(--ifm-h3-font-size)}h4{font-size:var(--ifm-h4-font-size)}h5{font-size:var(--ifm-h5-font-size)}h6{font-size:var(--ifm-h6-font-size)}img[align=right]{padding-left:var(--image-alignment-padding)}img[align=left]{padding-right:var(--image-alignment-padding)}.markdown{--ifm-h1-vertical-rhythm-top:3;--ifm-h2-vertical-rhythm-top:2;--ifm-h3-vertical-rhythm-top:1.5;--ifm-heading-vertical-rhythm-top:1.25;--ifm-h1-vertical-rhythm-bottom:1.25;--ifm-heading-vertical-rhythm-bottom:1}.markdown:after,.markdown:before{content:"";display:table}.markdown:after{clear:both}.markdown h1:first-child{--ifm-h1-font-size:3rem;margin-bottom:calc(var(--ifm-h1-vertical-rhythm-bottom)*var(--ifm-leading))}.markdown>h2{--ifm-h2-font-size:2rem;margin-top:calc(var(--ifm-h2-vertical-rhythm-top)*var(--ifm-leading))}.markdown>h3{--ifm-h3-font-size:1.5rem;margin-top:calc(var(--ifm-h3-vertical-rhythm-top)*var(--ifm-leading))}.markdown>h4,.markdown>h5,.markdown>h6{margin-top:calc(var(--ifm-heading-vertical-rhythm-top)*var(--ifm-leading))}.markdown>p,.markdown>pre,.markdown>ul{margin-bottom:var(--ifm-leading)}.markdown li>p{margin-top:var(--ifm-list-paragraph-margin)}.markdown li+li{margin-top:var(--ifm-list-item-margin)}ol,ul{margin:0 0 var(--ifm-list-margin);padding-left:var(--ifm-list-left-padding)}.markdown ol ol ol,ol ol,ul ol{list-style-type:lower-roman}ol ol,ol ul,ul ol,ul ul{margin:0}.markdown ol ol ol ol ol,ol ol ol,ol ul ol,ul ol ol,ul ul ol{list-style-type:lower-alpha}table thead tr{border-bottom:2px solid var(--ifm-table-border-color)}table thead,table tr:nth-child(2n){background-color:var(--ifm-table-stripe-background)}table tr{background-color:var(--ifm-table-background);border-top:var(--ifm-table-border-width) solid var(--ifm-table-border-color)}table td,table th{border:var(--ifm-table-border-width) solid var(--ifm-table-border-color);padding:var(--ifm-table-cell-padding)}table th{background-color:var(--ifm-table-head-background);color:var(--ifm-table-head-color);font-weight:var(--ifm-table-head-font-weight)}table td{color:var(--ifm-table-cell-color)}strong{font-weight:var(--ifm-font-weight-bold)}a{color:var(--ifm-link-color);text-decoration:var(--ifm-link-decoration);color:inherit;text-decoration:inherit}a:hover{color:var(--ifm-link-hover-color);text-decoration:var(--ifm-link-hover-decoration)}.button:hover,.text--no-decoration,.text--no-decoration:hover,a:not([href]){text-decoration:none}p{margin:0 0 var(--ifm-paragraph-margin-bottom)}blockquote{border-left:var(--ifm-blockquote-border-left-width) solid var(--ifm-blockquote-border-color);box-shadow:var(--ifm-blockquote-shadow);color:var(--ifm-blockquote-color);font-size:var(--ifm-blockquote-font-size);padding:var(--ifm-blockquote-padding-vertical) var(--ifm-blockquote-padding-horizontal)}blockquote>:first-child{margin-top:0}blockquote>:last-child{margin-bottom:0}hr{background-color:var(--ifm-hr-background-color);border:0;height:var(--ifm-hr-height);margin:var(--ifm-hr-margin-vertical) 0}.shadow--lw{box-shadow:var(--ifm-global-shadow-lw)!important}.shadow--md{box-shadow:var(--ifm-global-shadow-md)!important}.shadow--tl{box-shadow:var(--ifm-global-shadow-tl)!important}.text--primary,.wordWrapButtonEnabled_EoeP .wordWrapButtonIcon_Bwma{color:var(--ifm-color-primary)}.text--secondary{color:var(--ifm-color-secondary)}.text--success{color:var(--ifm-color-success)}.text--info{color:var(--ifm-color-info)}.text--warning{color:var(--ifm-color-warning)}.text--danger{color:var(--ifm-color-danger)}.clean-btn,hr{color:inherit}.text--center{text-align:center}.text--left{text-align:left}.text--justify{text-align:justify}.text--right{text-align:right}.text--capitalize{text-transform:capitalize}.text--lowercase{text-transform:lowercase}.text--uppercase,.uppercase{text-transform:uppercase}.text--light{font-weight:var(--ifm-font-weight-light)}.text--normal{font-weight:var(--ifm-font-weight-normal)}.text--semibold{font-weight:var(--ifm-font-weight-semibold)}.text--bold{font-weight:var(--ifm-font-weight-bold)}.text--italic{font-style:italic}.text--truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text--break{word-wrap:break-word!important;word-break:break-word!important}.clean-btn{background:none;border:none;cursor:pointer;font-family:inherit;padding:0}.alert,.alert .close{color:var(--ifm-alert-foreground-color)}.clean-list{list-style:none;padding-left:0}.alert--primary{--ifm-alert-background-color:var(--ifm-color-primary-contrast-background);--ifm-alert-background-color-highlight:rgba(53,120,229,.15);--ifm-alert-foreground-color:var(--ifm-color-primary-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-primary-dark)}.alert--secondary{--ifm-alert-background-color:var(--ifm-color-secondary-contrast-background);--ifm-alert-background-color-highlight:rgba(235,237,240,.15);--ifm-alert-foreground-color:var(--ifm-color-secondary-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-secondary-dark)}.alert--success{--ifm-alert-background-color:var(--ifm-color-success-contrast-background);--ifm-alert-background-color-highlight:rgba(0,164,0,.15);--ifm-alert-foreground-color:var(--ifm-color-success-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-success-dark)}.alert--info{--ifm-alert-background-color:var(--ifm-color-info-contrast-background);--ifm-alert-background-color-highlight:rgba(84,199,236,.15);--ifm-alert-foreground-color:var(--ifm-color-info-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-info-dark)}.alert--warning{--ifm-alert-background-color:var(--ifm-color-warning-contrast-background);--ifm-alert-background-color-highlight:rgba(255,186,0,.15);--ifm-alert-foreground-color:var(--ifm-color-warning-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-warning-dark)}.alert--danger{--ifm-alert-background-color:var(--ifm-color-danger-contrast-background);--ifm-alert-background-color-highlight:rgba(250,56,62,.15);--ifm-alert-foreground-color:var(--ifm-color-danger-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-danger-dark)}.alert{--ifm-code-background:var(--ifm-alert-background-color-highlight);--ifm-link-color:var(--ifm-alert-foreground-color);--ifm-link-hover-color:var(--ifm-alert-foreground-color);--ifm-link-decoration:underline;--ifm-tabs-color:var(--ifm-alert-foreground-color);--ifm-tabs-color-active:var(--ifm-alert-foreground-color);--ifm-tabs-color-active-border:var(--ifm-alert-border-color);background-color:var(--ifm-alert-background-color);border:var(--ifm-alert-border-width) solid var(--ifm-alert-border-color);border-left-width:var(--ifm-alert-border-left-width);border-radius:var(--ifm-alert-border-radius);box-shadow:var(--ifm-alert-shadow);padding:var(--ifm-alert-padding-vertical) var(--ifm-alert-padding-horizontal)}.alert__heading{align-items:center;display:flex;font:700 var(--ifm-h5-font-size)/var(--ifm-heading-line-height) var(--ifm-heading-font-family);margin-bottom:.5rem;text-transform:uppercase}.alert__icon{display:inline-flex;margin-right:.4em}.alert__icon svg{fill:var(--ifm-alert-foreground-color);stroke:var(--ifm-alert-foreground-color);stroke-width:0}.alert .close{margin:calc(var(--ifm-alert-padding-vertical)*-1) calc(var(--ifm-alert-padding-horizontal)*-1) 0 0;opacity:.75}.alert .close:focus,.alert .close:hover,.hash-link:focus,:hover>.hash-link{opacity:1}.alert a{text-decoration-color:var(--ifm-alert-border-color)}.alert a:hover{text-decoration-thickness:2px}.avatar{-webkit-column-gap:var(--ifm-avatar-intro-margin);column-gap:var(--ifm-avatar-intro-margin);display:flex}.avatar__photo{border-radius:50%;display:block;height:var(--ifm-avatar-photo-size);overflow:hidden;width:var(--ifm-avatar-photo-size)}.card--full-height,.navbar__logo img,body,html{height:100%}.avatar__photo--sm{--ifm-avatar-photo-size:2rem}.avatar__photo--lg{--ifm-avatar-photo-size:4rem}.avatar__photo--xl{--ifm-avatar-photo-size:6rem}.avatar__intro{display:flex;flex:1 1;flex-direction:column;justify-content:center;text-align:var(--ifm-avatar-intro-alignment)}.badge,.breadcrumbs__item,.breadcrumbs__link,.button,.dropdown>.navbar__link:after{display:inline-block}.avatar__name{font:700 var(--ifm-h4-font-size)/var(--ifm-heading-line-height) var(--ifm-font-family-base)}.avatar__subtitle{margin-top:.25rem}.avatar--vertical{--ifm-avatar-intro-alignment:center;--ifm-avatar-intro-margin:0.5rem;align-items:center;flex-direction:column}.badge{background-color:var(--ifm-badge-background-color);border:var(--ifm-badge-border-width) solid var(--ifm-badge-border-color);border-radius:var(--ifm-badge-border-radius);color:var(--ifm-badge-color);font-size:75%;font-weight:var(--ifm-font-weight-bold);line-height:1;padding:var(--ifm-badge-padding-vertical) var(--ifm-badge-padding-horizontal)}.badge--primary{--ifm-badge-background-color:var(--ifm-color-primary)}.badge--secondary{--ifm-badge-background-color:var(--ifm-color-secondary);color:var(--ifm-color-black)}.breadcrumbs__link,.button.button--secondary.button--outline:not(.button--active):not(:hover){color:var(--ifm-font-color-base)}.badge--success{--ifm-badge-background-color:var(--ifm-color-success)}.badge--info{--ifm-badge-background-color:var(--ifm-color-info)}.badge--warning{--ifm-badge-background-color:var(--ifm-color-warning)}.badge--danger{--ifm-badge-background-color:var(--ifm-color-danger)}.breadcrumbs__item:not(:last-child):after{background:var(--ifm-breadcrumb-separator) center;content:" ";display:inline-block;-webkit-filter:var(--ifm-breadcrumb-separator-filter);filter:var(--ifm-breadcrumb-separator-filter);height:calc(var(--ifm-breadcrumb-separator-size)*var(--ifm-breadcrumb-size-multiplier)*var(--ifm-breadcrumb-separator-size-multiplier));margin:0 var(--ifm-breadcrumb-spacing);opacity:.5;width:calc(var(--ifm-breadcrumb-separator-size)*var(--ifm-breadcrumb-size-multiplier)*var(--ifm-breadcrumb-separator-size-multiplier))}.breadcrumbs__item--active .breadcrumbs__link{background:var(--ifm-breadcrumb-item-background-active);color:var(--ifm-breadcrumb-color-active)}.breadcrumbs__link{border-radius:var(--ifm-breadcrumb-border-radius);font-size:calc(1rem*var(--ifm-breadcrumb-size-multiplier));padding:calc(var(--ifm-breadcrumb-padding-vertical)*var(--ifm-breadcrumb-size-multiplier)) calc(var(--ifm-breadcrumb-padding-horizontal)*var(--ifm-breadcrumb-size-multiplier));transition-duration:var(--ifm-transition-fast);transition-property:background,color}.breadcrumbs__link:link:hover,.breadcrumbs__link:visited:hover,area[href].breadcrumbs__link:hover{background:var(--ifm-breadcrumb-item-background-active);text-decoration:none}.breadcrumbs__link:-webkit-any-link:hover{background:var(--ifm-breadcrumb-item-background-active);text-decoration:none}.breadcrumbs__link:any-link:hover{background:var(--ifm-breadcrumb-item-background-active);text-decoration:none}.breadcrumbs--sm{--ifm-breadcrumb-size-multiplier:0.8}.breadcrumbs--lg{--ifm-breadcrumb-size-multiplier:1.2}.button{background-color:var(--ifm-button-background-color);border:var(--ifm-button-border-width) solid var(--ifm-button-border-color);border-radius:var(--ifm-button-border-radius);cursor:pointer;font-size:calc(.875rem*var(--ifm-button-size-multiplier));font-weight:var(--ifm-button-font-weight);line-height:1.5;padding:calc(var(--ifm-button-padding-vertical)*var(--ifm-button-size-multiplier)) calc(var(--ifm-button-padding-horizontal)*var(--ifm-button-size-multiplier));text-align:center;transition-duration:var(--ifm-button-transition-duration);transition-property:color,background,border-color;-webkit-user-select:none;user-select:none;white-space:nowrap}.button,.button:hover{color:var(--ifm-button-color)}.button--outline{--ifm-button-color:var(--ifm-button-border-color)}.button--outline:hover{--ifm-button-background-color:var(--ifm-button-border-color)}.button--link{--ifm-button-border-color:transparent;color:var(--ifm-link-color);text-decoration:var(--ifm-link-decoration)}.button--link.button--active,.button--link:active,.button--link:hover{color:var(--ifm-link-hover-color);text-decoration:var(--ifm-link-hover-decoration)}.button.disabled,.button:disabled,.button[disabled]{opacity:.65;pointer-events:none}.button--sm{--ifm-button-size-multiplier:0.8}.button--lg{--ifm-button-size-multiplier:1.35}.button--block{display:block;width:100%}.button.button--secondary{color:var(--ifm-color-gray-900)}:where(.button--primary){--ifm-button-background-color:var(--ifm-color-primary);--ifm-button-border-color:var(--ifm-color-primary)}:where(.button--primary):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-primary-dark);--ifm-button-border-color:var(--ifm-color-primary-dark)}.button--primary.button--active,.button--primary:active{--ifm-button-background-color:var(--ifm-color-primary-darker);--ifm-button-border-color:var(--ifm-color-primary-darker)}:where(.button--secondary){--ifm-button-background-color:var(--ifm-color-secondary);--ifm-button-border-color:var(--ifm-color-secondary)}:where(.button--secondary):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-secondary-dark);--ifm-button-border-color:var(--ifm-color-secondary-dark)}.button--secondary.button--active,.button--secondary:active{--ifm-button-background-color:var(--ifm-color-secondary-darker);--ifm-button-border-color:var(--ifm-color-secondary-darker)}:where(.button--success){--ifm-button-background-color:var(--ifm-color-success);--ifm-button-border-color:var(--ifm-color-success)}:where(.button--success):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-success-dark);--ifm-button-border-color:var(--ifm-color-success-dark)}.button--success.button--active,.button--success:active{--ifm-button-background-color:var(--ifm-color-success-darker);--ifm-button-border-color:var(--ifm-color-success-darker)}:where(.button--info){--ifm-button-background-color:var(--ifm-color-info);--ifm-button-border-color:var(--ifm-color-info)}:where(.button--info):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-info-dark);--ifm-button-border-color:var(--ifm-color-info-dark)}.button--info.button--active,.button--info:active{--ifm-button-background-color:var(--ifm-color-info-darker);--ifm-button-border-color:var(--ifm-color-info-darker)}:where(.button--warning){--ifm-button-background-color:var(--ifm-color-warning);--ifm-button-border-color:var(--ifm-color-warning)}:where(.button--warning):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-warning-dark);--ifm-button-border-color:var(--ifm-color-warning-dark)}.button--warning.button--active,.button--warning:active{--ifm-button-background-color:var(--ifm-color-warning-darker);--ifm-button-border-color:var(--ifm-color-warning-darker)}:where(.button--danger){--ifm-button-background-color:var(--ifm-color-danger);--ifm-button-border-color:var(--ifm-color-danger)}:where(.button--danger):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-danger-dark);--ifm-button-border-color:var(--ifm-color-danger-dark)}.button--danger.button--active,.button--danger:active{--ifm-button-background-color:var(--ifm-color-danger-darker);--ifm-button-border-color:var(--ifm-color-danger-darker)}.button-group{display:inline-flex;gap:var(--ifm-button-group-spacing)}.button-group>.button:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.button-group>.button:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.button-group--block{display:flex;justify-content:stretch}.button-group--block>.button{flex-grow:1}.card{background-color:var(--ifm-card-background-color);border-radius:var(--ifm-card-border-radius);box-shadow:var(--ifm-global-shadow-lw);display:flex;flex-direction:column;overflow:hidden}.card__image{padding-top:var(--ifm-card-vertical-spacing)}.card__image:first-child,.pt-0{padding-top:0}.card__body,.card__footer,.card__header{padding:var(--ifm-card-vertical-spacing) var(--ifm-card-horizontal-spacing)}.card__body:not(:last-child),.card__footer:not(:last-child),.card__header:not(:last-child){padding-bottom:0}.card__body>:last-child,.card__footer>:last-child,.card__header>:last-child{margin-bottom:0}.card__footer{margin-top:auto}.table-of-contents{font-size:.8rem;margin-bottom:0;padding:var(--ifm-toc-padding-vertical) 0}.table-of-contents,.table-of-contents ul{list-style:none;padding-left:var(--ifm-toc-padding-horizontal)}.table-of-contents li{margin:var(--ifm-toc-padding-vertical) var(--ifm-toc-padding-horizontal)}.table-of-contents__left-border{border-left:1px solid var(--ifm-toc-border-color)}.table-of-contents__link{color:var(--ifm-toc-link-color);display:block}.table-of-contents__link--active,.table-of-contents__link--active code,.table-of-contents__link:hover,.table-of-contents__link:hover code{color:var(--ifm-color-primary);text-decoration:none}.close{color:var(--ifm-color-black);float:right;font-size:1.5rem;font-weight:var(--ifm-font-weight-bold);line-height:1;opacity:.5;padding:1rem;transition:opacity var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.close:hover{opacity:.7}.close:focus,.theme-code-block-highlighted-line .codeLineNumber_Tfdd:before{opacity:.8}.dropdown{display:inline-flex;font-weight:var(--ifm-dropdown-font-weight);position:relative;vertical-align:top}.dropdown--hoverable:hover .dropdown__menu,.dropdown--show .dropdown__menu{opacity:1;pointer-events:all;-webkit-transform:translateY(-1px);transform:translateY(-1px);visibility:visible}#nprogress,.dropdown__menu,.navbar__item.dropdown .navbar__link:not([href]){pointer-events:none}.dropdown--right .dropdown__menu{left:inherit;right:0}.dropdown--nocaret .navbar__link:after{content:none!important}.dropdown__menu{background-color:var(--ifm-dropdown-background-color);border-radius:var(--ifm-global-radius);box-shadow:var(--ifm-global-shadow-md);left:0;list-style:none;max-height:80vh;min-width:10rem;opacity:0;overflow-y:auto;padding:.5rem;position:absolute;top:calc(100% - var(--ifm-navbar-item-padding-vertical) + .3rem);-webkit-transform:translateY(-.625rem);transform:translateY(-.625rem);transition-duration:var(--ifm-transition-fast);transition-property:opacity,transform,visibility,-webkit-transform;transition-timing-function:var(--ifm-transition-timing-default);visibility:hidden;z-index:var(--ifm-z-index-dropdown)}.menu__caret,.menu__link,.menu__list-item-collapsible{border-radius:.25rem;transition:background var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.dropdown__link{border-radius:.25rem;color:var(--ifm-dropdown-link-color);display:block;font-size:.875rem;margin-top:.2rem;padding:.25rem .5rem;white-space:nowrap}.dropdown__link--active,.dropdown__link:hover{background-color:var(--ifm-dropdown-hover-background-color);color:var(--ifm-dropdown-link-color);text-decoration:none}.dropdown__link--active,.dropdown__link--active:hover{--ifm-dropdown-link-color:var(--ifm-link-color)}.dropdown>.navbar__link:after{border-color:currentcolor transparent;border-style:solid;border-width:.4em .4em 0;content:"";margin-left:.3em;position:relative;top:2px;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.footer{background-color:var(--ifm-footer-background-color);color:var(--ifm-footer-color);padding:var(--ifm-footer-padding-vertical) var(--ifm-footer-padding-horizontal)}.footer--dark{--ifm-footer-background-color:#303846;--ifm-footer-color:var(--ifm-footer-link-color);--ifm-footer-link-color:var(--ifm-color-secondary);--ifm-footer-title-color:var(--ifm-color-white)}.footer__links,.mb-4{margin-bottom:1rem}.footer__link-item{color:var(--ifm-footer-link-color);line-height:2}.footer__link-item:hover{color:var(--ifm-footer-link-hover-color)}.footer__link-separator{margin:0 var(--ifm-footer-link-horizontal-spacing)}.footer__logo{margin-top:1rem;max-width:var(--ifm-footer-logo-max-width)}.footer__title{color:var(--ifm-footer-title-color);font:700 var(--ifm-h4-font-size)/var(--ifm-heading-line-height) var(--ifm-font-family-base);margin-bottom:var(--ifm-heading-margin-bottom)}.menu,.navbar__link{font-weight:var(--ifm-font-weight-semibold)}.docItemContainer_Djhp article>:first-child,.docItemContainer_Djhp header+*,.footer__item{margin-top:0}.markdown ol,.markdown ul{margin:1rem 0 1rem 1rem}.collapsibleContent_i85q>:last-child,.footer__items{margin-bottom:0}.blog-list-page .main-wrapper .container>.row>main article footer>.col,.blog-tags-post-list-page .main-wrapper .container>.row>main article footer>.col,.codeBlockStandalone_MEMb,[type=checkbox],fieldset,legend{padding:0}.hero{align-items:center;background-color:var(--ifm-hero-background-color);color:var(--ifm-hero-text-color);display:flex;padding:4rem 2rem}.hero--primary{--ifm-hero-background-color:var(--ifm-color-primary);--ifm-hero-text-color:var(--ifm-font-color-base-inverse)}.hero--dark{--ifm-hero-background-color:#303846;--ifm-hero-text-color:var(--ifm-color-white)}.hero__title,.title_f1Hy{font-size:3rem}.hero__subtitle{font-size:1.5rem}.menu__list{list-style:none;margin:0;padding-left:0}.menu__caret,.menu__link{padding:var(--ifm-menu-link-padding-vertical) var(--ifm-menu-link-padding-horizontal)}.menu__list .menu__list{flex:0 0 100%;margin-top:.25rem;padding-left:var(--ifm-menu-link-padding-horizontal)}.menu__list-item:not(:first-child){margin-top:.25rem}.menu__list-item--collapsed .menu__list{height:0;overflow:hidden}.details_lb9f[data-collapsed=false].isBrowser_bmU9>summary:before,.details_lb9f[open]:not(.isBrowser_bmU9)>summary:before,.menu__list-item--collapsed .menu__caret:before,.menu__list-item--collapsed .menu__link--sublist:after{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.menu__list-item-collapsible{display:flex;flex-wrap:wrap;position:relative}.menu__caret:hover,.menu__link:hover,.menu__list-item-collapsible--active,.menu__list-item-collapsible:hover{background:var(--ifm-menu-color-background-hover)}.DocSearch-Modal .DocSearch-Hit-action-button:hover,.menu__list-item-collapsible .menu__link--active,.menu__list-item-collapsible .menu__link:hover{background:none!important}.menu__caret,.menu__link{align-items:center;display:flex}.navbar-sidebar,.navbar-sidebar__backdrop{bottom:0;opacity:0;transition-duration:var(--ifm-transition-fast);transition-timing-function:ease-in-out;left:0;top:0;visibility:hidden}.menu__link{color:var(--ifm-menu-color);flex:1;line-height:1.25}.menu__link:hover{color:var(--ifm-menu-color);text-decoration:none}.menu__link--sublist-caret:after{background:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem;content:"";-webkit-filter:var(--ifm-menu-link-sublist-icon-filter);filter:var(--ifm-menu-link-sublist-icon-filter);height:1.25rem;margin-left:auto;min-width:1.25rem;-webkit-transform:rotate(180deg);transform:rotate(180deg);transition:-webkit-transform var(--ifm-transition-fast) linear;transition:transform var(--ifm-transition-fast) linear;transition:transform var(--ifm-transition-fast) linear,-webkit-transform var(--ifm-transition-fast) linear;width:1.25rem}.menu__link--active,.menu__link--active:hover{color:var(--ifm-menu-color-active)}.navbar__brand,.navbar__link{color:var(--ifm-navbar-link-color)}.menu__link--active:not(.menu__link--sublist){background-color:var(--ifm-menu-color-background-active)}.menu__caret:before{background:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem;content:"";-webkit-filter:var(--ifm-menu-link-sublist-icon-filter);filter:var(--ifm-menu-link-sublist-icon-filter);height:1.25rem;-webkit-transform:rotate(180deg);transform:rotate(180deg);transition:-webkit-transform var(--ifm-transition-fast) linear;transition:transform var(--ifm-transition-fast) linear;transition:transform var(--ifm-transition-fast) linear,-webkit-transform var(--ifm-transition-fast) linear;width:1.25rem}.navbar--dark,html[data-theme=dark]{--ifm-menu-link-sublist-icon-filter:invert(100%) sepia(94%) saturate(17%) hue-rotate(223deg) brightness(104%) contrast(98%)}.navbar{background-color:var(--ifm-navbar-background-color);box-shadow:var(--ifm-navbar-shadow);height:var(--ifm-navbar-height);padding:var(--ifm-navbar-padding-vertical) var(--ifm-navbar-padding-horizontal)}.flex,.navbar,.navbar>.container,.navbar>.container-fluid{display:flex}.navbar--fixed-top{position:-webkit-sticky;position:sticky;top:0;z-index:var(--ifm-z-index-fixed)}.navbar__inner{display:flex;flex-wrap:wrap;justify-content:space-between;width:100%}.navbar__brand{align-items:center;display:flex;margin-right:1rem;min-width:0}.navbar__brand:hover{color:var(--ifm-navbar-link-hover-color);text-decoration:none}.announcementBarContent_xLdY,.navbar__title,main .container>.row>.col--3{flex:1 1 auto}.navbar__toggle{display:none;margin-right:.5rem}.navbar__logo{flex:0 0 auto;height:2rem;margin-right:.5rem}.m-0,.navbar__items--center .navbar__brand,blockquote,body,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,menu,ol,p,pre,ul{margin:0}.navbar__items{align-items:center;display:flex;flex:1;min-width:0}.navbar__items--center{flex:0 0 auto}.navbar__items--center+.navbar__items--right{flex:1}.navbar__items--right{flex:0 0 auto;justify-content:flex-end}.navbar__items--right>:last-child,.pr-0{padding-right:0}.navbar__item{display:inline-block;padding:var(--ifm-navbar-item-padding-vertical) var(--ifm-navbar-item-padding-horizontal)}.navbar__link--active,.navbar__link:hover{color:var(--ifm-navbar-link-hover-color);text-decoration:none}.navbar--dark,.navbar--primary{--ifm-menu-color:var(--ifm-color-gray-300);--ifm-navbar-link-color:var(--ifm-color-gray-100);--ifm-navbar-search-input-background-color:hsla(0,0%,100%,.1);--ifm-navbar-search-input-placeholder-color:hsla(0,0%,100%,.5);color:var(--ifm-color-white)}.navbar--dark{--ifm-navbar-background-color:#242526;--ifm-menu-color-background-active:hsla(0,0%,100%,.05);--ifm-navbar-search-input-color:var(--ifm-color-white)}.navbar--primary{--ifm-navbar-background-color:var(--ifm-color-primary);--ifm-navbar-link-hover-color:var(--ifm-color-white);--ifm-menu-color-active:var(--ifm-color-white);--ifm-navbar-search-input-color:var(--ifm-color-emphasis-500)}.navbar__search-input{-webkit-appearance:none;appearance:none;background:var(--ifm-navbar-search-input-background-color) var(--ifm-navbar-search-input-icon) no-repeat .75rem center/1rem 1rem;border:none;border-radius:2rem;color:var(--ifm-navbar-search-input-color);cursor:text;display:inline-block;font-size:.9rem;height:2rem;padding:0 .5rem 0 2.25rem;width:12.5rem}.cursor-pointer,.pills__item,.tabs__item,[role=button],button{cursor:pointer}.navbar__search-input::-webkit-input-placeholder{color:var(--ifm-navbar-search-input-placeholder-color)}.navbar__search-input::placeholder{color:var(--ifm-navbar-search-input-placeholder-color)}.navbar-sidebar{background-color:var(--ifm-navbar-background-color);box-shadow:var(--ifm-global-shadow-md);position:fixed;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0);transition-property:opacity,visibility,transform,-webkit-transform;width:var(--ifm-navbar-sidebar-width)}.navbar-sidebar--show .navbar-sidebar,.navbar-sidebar--show .navbar-sidebar__backdrop{opacity:1;visibility:visible}.navbar-sidebar--show .navbar-sidebar{-webkit-transform:translateZ(0);transform:translateZ(0)}.navbar-sidebar__backdrop{background-color:rgba(0,0,0,.6);position:fixed;right:0;transition-property:opacity,visibility}.relative,sub,sup{position:relative}.navbar-sidebar__brand{align-items:center;box-shadow:var(--ifm-navbar-shadow);display:flex;flex:1;height:var(--ifm-navbar-height);padding:var(--ifm-navbar-padding-vertical) var(--ifm-navbar-padding-horizontal)}.navbar-sidebar__items{display:flex;height:calc(100% - var(--ifm-navbar-height));-webkit-transform:translateZ(0);transform:translateZ(0);transition:-webkit-transform var(--ifm-transition-fast) ease-in-out;transition:transform var(--ifm-transition-fast) ease-in-out;transition:transform var(--ifm-transition-fast) ease-in-out,-webkit-transform var(--ifm-transition-fast) ease-in-out}.navbar-sidebar__items--show-secondary{-webkit-transform:translate3d(calc((var(--ifm-navbar-sidebar-width))*-1),0,0);transform:translate3d(calc((var(--ifm-navbar-sidebar-width))*-1),0,0)}.navbar-sidebar__item{flex-shrink:0;padding:.5rem;width:calc(var(--ifm-navbar-sidebar-width))}.navbar-sidebar__back{background:var(--ifm-menu-color-background-active);font-size:15px;font-weight:var(--ifm-button-font-weight);margin:0 0 .2rem -.5rem;padding:.6rem 1.5rem;position:relative;text-align:left;top:-.5rem;width:calc(100% + 1rem)}.mt-10,.my-10{margin-top:2.5rem}.navbar-sidebar__close{display:flex;margin-left:auto}.pagination{-webkit-column-gap:var(--ifm-pagination-page-spacing);column-gap:var(--ifm-pagination-page-spacing);display:flex;font-size:var(--ifm-pagination-font-size);padding-left:0}.pagination--sm{--ifm-pagination-font-size:0.8rem;--ifm-pagination-padding-horizontal:0.8rem;--ifm-pagination-padding-vertical:0.2rem}.pagination--lg{--ifm-pagination-font-size:1.2rem;--ifm-pagination-padding-horizontal:1.2rem;--ifm-pagination-padding-vertical:0.3rem}.inline-flex,.pagination__item{display:inline-flex}.pagination__item>span{padding:var(--ifm-pagination-padding-vertical)}.pagination__item--active .pagination__link{color:var(--ifm-pagination-color-active)}.pagination__item--active .pagination__link,.pagination__item:not(.pagination__item--active):hover .pagination__link{background:var(--ifm-pagination-item-active-background)}.pagination__item--disabled,.pagination__item[disabled]{opacity:.25;pointer-events:none}.pagination__link{border-radius:var(--ifm-pagination-border-radius);color:var(--ifm-font-color-base);display:inline-block;padding:var(--ifm-pagination-padding-vertical) var(--ifm-pagination-padding-horizontal);transition:background var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.pagination__link:hover,.sidebarItemLink_mo7H:hover{text-decoration:none}.pagination-nav{grid-gap:var(--ifm-spacing-horizontal);display:grid;gap:var(--ifm-spacing-horizontal);grid-template-columns:repeat(2,1fr)}.pagination-nav__link{border:1px solid var(--ifm-color-emphasis-300);border-radius:var(--ifm-pagination-nav-border-radius);display:block;height:100%;line-height:var(--ifm-heading-line-height);padding:var(--ifm-global-spacing);transition:border-color var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.pagination-nav__link:hover{border-color:var(--ifm-pagination-nav-color-hover);text-decoration:none}.pagination-nav__link--next{grid-column:2/3;text-align:right}.pagination-nav__label{font-size:var(--ifm-h4-font-size);font-weight:var(--ifm-heading-font-weight);word-break:break-word}.pagination-nav__link--prev .pagination-nav__label:before{content:"« "}.pagination-nav__link--next .pagination-nav__label:after{content:" »"}.pagination-nav__sublabel{color:var(--ifm-color-content-secondary);font-size:var(--ifm-h5-font-size);font-weight:var(--ifm-font-weight-semibold);margin-bottom:.25rem}.pills__item,.tabs{font-weight:var(--ifm-font-weight-bold)}.pills{display:flex;gap:var(--ifm-pills-spacing);padding-left:0}.pills__item{border-radius:.5rem;display:inline-block;padding:.25rem 1rem;transition:background var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.pills__item--active{color:var(--ifm-pills-color-active)}.pills__item--active,.pills__item:not(.pills__item--active):hover{background:var(--ifm-pills-color-background-active)}.pills--block{justify-content:stretch}.pills--block .pills__item{flex-grow:1;text-align:center}.tabs{color:var(--ifm-tabs-color);display:flex;margin-bottom:0;overflow-x:auto;padding-left:0}.tabs__item{border-bottom:3px solid transparent;border-radius:var(--ifm-global-radius);display:inline-flex;padding:var(--ifm-tabs-padding-vertical) var(--ifm-tabs-padding-horizontal);transition:background-color var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.tabs__item--active{border-bottom-color:var(--ifm-tabs-color-active-border);border-bottom-left-radius:0;border-bottom-right-radius:0;color:var(--ifm-tabs-color-active)}.text-black,blockquote p{--tw-text-opacity:1;color:rgb(17 17 17/var(--tw-text-opacity))}.tabs__item:hover{background-color:var(--ifm-hover-overlay)}.tabs--block{justify-content:stretch}.tabs--block .tabs__item{flex-grow:1;justify-content:center}html[data-theme=dark]{--ifm-color-scheme:dark;--ifm-color-emphasis-0:var(--ifm-color-gray-1000);--ifm-color-emphasis-100:var(--ifm-color-gray-900);--ifm-color-emphasis-200:var(--ifm-color-gray-800);--ifm-color-emphasis-300:var(--ifm-color-gray-700);--ifm-color-emphasis-400:var(--ifm-color-gray-600);--ifm-color-emphasis-600:var(--ifm-color-gray-400);--ifm-color-emphasis-700:var(--ifm-color-gray-300);--ifm-color-emphasis-800:var(--ifm-color-gray-200);--ifm-color-emphasis-900:var(--ifm-color-gray-100);--ifm-color-emphasis-1000:var(--ifm-color-gray-0);--ifm-background-color:#1b1b1d;--ifm-background-surface-color:#242526;--ifm-hover-overlay:hsla(0,0%,100%,.05);--ifm-color-content:#e3e3e3;--ifm-color-content-secondary:#fff;--ifm-breadcrumb-separator-filter:invert(64%) sepia(11%) saturate(0%) hue-rotate(149deg) brightness(99%) contrast(95%);--ifm-code-background:hsla(0,0%,100%,.1);--ifm-scrollbar-track-background-color:#444;--ifm-scrollbar-thumb-background-color:#686868;--ifm-scrollbar-thumb-hover-background-color:#7a7a7a;--ifm-table-stripe-background:hsla(0,0%,100%,.07);--ifm-toc-border-color:var(--ifm-color-emphasis-200);--ifm-color-primary-contrast-background:#102445;--ifm-color-primary-contrast-foreground:#ebf2fc;--ifm-color-secondary-contrast-background:#474748;--ifm-color-secondary-contrast-foreground:#fdfdfe;--ifm-color-success-contrast-background:#003100;--ifm-color-success-contrast-foreground:#e6f6e6;--ifm-color-info-contrast-background:#193c47;--ifm-color-info-contrast-foreground:#eef9fd;--ifm-color-warning-contrast-background:#4d3800;--ifm-color-warning-contrast-foreground:#fff8e6;--ifm-color-danger-contrast-background:#4b1113;--ifm-color-danger-contrast-foreground:#ffebec;--docsearch-text-color:#f5f6f7;--docsearch-container-background:rgba(9,10,17,.8);--docsearch-modal-background:#15172a;--docsearch-modal-shadow:inset 1px 1px 0 0 #2c2e40,0 3px 8px 0 #000309;--docsearch-searchbox-background:#090a11;--docsearch-searchbox-focus-background:#000;--docsearch-hit-color:#bec3c9;--docsearch-hit-shadow:none;--docsearch-hit-background:#090a11;--docsearch-key-gradient:linear-gradient(-26.5deg,#565872,#31355b);--docsearch-key-shadow:inset 0 -2px 0 0 #282d55,inset 0 0 1px 1px #51577d,0 2px 2px 0 rgba(3,4,9,.3);--docsearch-footer-background:#1e2136;--docsearch-footer-shadow:inset 0 1px 0 0 rgba(73,76,106,.5),0 -4px 8px 0 rgba(0,0,0,.2);--docsearch-logo-color:#fff;--docsearch-muted-color:#7f8497}:root{--docusaurus-progress-bar-color:var(--ifm-color-primary);--ifm-navbar-height:6.5rem;--ifm-color-primary:var(--global-colors-infinum);--ifm-color-primary-dark:#c32323;--ifm-color-primary-darker:#b82121;--ifm-color-primary-darkest:#981c1c;--ifm-color-primary-light:#dc3e3e;--ifm-color-primary-lighter:#de4949;--ifm-color-primary-lightest:#e46969;--ifm-code-font-size:95%;--ifm-code-background:var(--global-colors-sky70);--docusaurus-announcement-bar-height:auto;--docusaurus-collapse-button-bg:transparent;--docusaurus-collapse-button-bg-hover:rgba(0,0,0,.1);--doc-sidebar-width:300px;--doc-sidebar-hidden-width:30px;--docsearch-primary-color:#5468ff;--docsearch-text-color:#1c1e21;--docsearch-spacing:12px;--docsearch-icon-stroke-width:1.4;--docsearch-highlight-color:var(--docsearch-primary-color);--docsearch-muted-color:#969faf;--docsearch-container-background:rgba(101,108,133,.8);--docsearch-logo-color:#5468ff;--docsearch-modal-width:560px;--docsearch-modal-height:600px;--docsearch-modal-background:#f5f6f7;--docsearch-modal-shadow:inset 1px 1px 0 0 hsla(0,0%,100%,.5),0 3px 8px 0 #555a64;--docsearch-searchbox-height:56px;--docsearch-searchbox-background:#ebedf0;--docsearch-searchbox-focus-background:#fff;--docsearch-searchbox-shadow:inset 0 0 0 2px var(--docsearch-primary-color);--docsearch-hit-height:56px;--docsearch-hit-color:#444950;--docsearch-hit-active-color:#fff;--docsearch-hit-background:#fff;--docsearch-hit-shadow:0 1px 3px 0 #d4d9e1;--docsearch-key-gradient:linear-gradient(-225deg,#d5dbe4,#f8f8f8);--docsearch-key-shadow:inset 0 -2px 0 0 #cdcde6,inset 0 0 1px 1px #fff,0 1px 2px 1px rgba(30,35,90,.4);--docsearch-footer-height:44px;--docsearch-footer-background:#fff;--docsearch-footer-shadow:0 -1px 0 0 #e0e3e8,0 -3px 6px 0 rgba(69,98,155,.12);--docsearch-primary-color:var(--ifm-color-primary);--docsearch-text-color:var(--ifm-font-color-base);--docusaurus-tag-list-border:var(--ifm-color-emphasis-300)}#nprogress .bar{background:var(--docusaurus-progress-bar-color);height:2px;left:0;position:fixed;top:0;width:100%;z-index:1031}#nprogress .peg{box-shadow:0 0 10px var(--docusaurus-progress-bar-color),0 0 5px var(--docusaurus-progress-bar-color);height:100%;opacity:1;position:absolute;right:0;-webkit-transform:rotate(3deg) translateY(-4px);transform:rotate(3deg) translateY(-4px);width:100px}*,:after,:before{border:0 solid;--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.border-t,hr{border-top-width:1px}.DocSearch-Modal .DocSearch-Commands .DocSearch-Commands-Key,.DocSearch.DocSearch-Button .DocSearch-Button-Key{border-radius:.25rem!important;font-family:ibm-plex-mono,monospace!important;height:1.25rem!important;top:0!important;width:1.25rem!important;padding:0!important}:after,:before{--tw-content:""}html{-webkit-text-size-adjust:100%;-webkit-font-feature-settings:normal;font-feature-settings:normal;font-family:neue-haas-grotesk-text,Arial,sans-serif;font-variation-settings:normal;line-height:1.5;tab-size:4}body{line-height:inherit}hr{height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.DocSearch-Hit[aria-selected=true] mark,.content_knG7 a{text-decoration:underline}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ibm-plex-mono,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0}sub{bottom:-.25em}sup{top:-.5em}table{display:block;margin-bottom:var(--ifm-spacing-vertical);border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:initial;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}.markdown .alert,.shadow{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}.DocSearch-Modal .DocSearch-Commands .DocSearch-Commands-Key,.DocSearch-Modal .DocSearch-Logo .DocSearch-Label,.DocSearch.DocSearch-Button .DocSearch-Button-Key,.DocSearch.DocSearch-Button .DocSearch-Button-Placeholder{line-height:1.5!important;font-size:clamp(.8888888888888888rem,calc(.89437rem - .02741vw),.8680555555555557rem)!important;letter-spacing:.0142em!important}summary{display:list-item}menu,ol,ul{list-style:none;padding:0}textarea{resize:vertical}input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}::-webkit-backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.sticky{position:-webkit-sticky;position:sticky}.isolate{isolation:isolate}.col-span-3{grid-column:span 3/span 3}.col-span-4{grid-column:span 4/span 4}.col-span-5{grid-column:span 5/span 5}.col-span-6{grid-column:span 6/span 6}.col-span-8{grid-column:span 8/span 8}.col-start-1{grid-column-start:1}.col-start-5{grid-column-start:5}.col-start-7{grid-column-start:7}.col-start-9{grid-column-start:9}.row-span-full{grid-row:1/-1}.row-start-1{grid-row-start:1}.-mx-2{margin-left:-.5rem;margin-right:-.5rem}.-mx-5{margin-left:-1.25rem;margin-right:-1.25rem}.-mx-side-padding{margin-left:-5.56vw;margin-right:-5.56vw}.es-h-center,.es-showcase-grid{margin-left:auto;margin-right:auto}.my-10{margin-bottom:2.5rem}.-mb-2{margin-bottom:-.5rem}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-10{margin-bottom:2.5rem}.mb-2{margin-bottom:.5rem}.mb-5{margin-bottom:1.25rem}.block{display:block}.inline,.tags_jXut{display:inline}.grid{display:grid}.contents{display:contents}.aspect-\[3\/2\]{aspect-ratio:3/2}.h-20{height:5rem}.h-24{height:6rem}.h-6{height:1.5rem}.w-20{width:5rem}.w-24{width:6rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-full{width:100%}.max-w-\[15ch\],.max-w-prose-mini{max-width:15ch}.max-w-lg{max-width:32rem}.max-w-sm{max-width:24rem}.max-w-xl{max-width:36rem}.origin-right{-webkit-transform-origin:right;transform-origin:right}.-scale-x-100{--tw-scale-x:-1}.-scale-x-100,.focus\:before\:translate-y-0:focus:before,.group:focus .group-focus\:scale-75,.group:focus .group-focus\:translate-x-3,.group:hover .group-hover\:translate-x-3,.transform{-webkit-transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.select-none{-webkit-user-select:none;user-select:none}.auto-cols-auto{grid-auto-columns:auto}.grid-flow-col{grid-auto-flow:column}.grid-rows-2{grid-template-rows:repeat(2,minmax(0,1fr))}.blogPostFooterDetailsFull_mRVl,.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-10{gap:2.5rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4,.navbar__items{gap:1rem}.gap-8{gap:2rem}.gap-gutter{gap:2.78vw}.gap-y-10{row-gap:2.5rem}.gap-y-20{row-gap:5rem}.markdown>:not([hidden])~:not([hidden]),.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1.25rem*var(--tw-space-y-reverse));margin-top:calc(1.25rem*(1 - var(--tw-space-y-reverse)))}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.rounded-full{border-radius:9999px}.border{border-width:1px}.border-l-4,blockquote{border-left-width:4px}.border-grey-100{--tw-border-opacity:1;border-color:rgb(245 249 255/var(--tw-border-opacity))}.border-l-candy-30{--tw-border-opacity:1;border-left-color:rgb(216 85 95/var(--tw-border-opacity))}.border-l-infinum,blockquote{border-left-color:rgb(216 38 44/var(--tw-border-opacity));--tw-border-opacity:1}.border-l-olive-30{--tw-border-opacity:1;border-left-color:rgb(90 135 114/var(--tw-border-opacity))}.border-l-sand-30{--tw-border-opacity:1;border-left-color:rgb(217 168 102/var(--tw-border-opacity))}.border-l-sky-30{--tw-border-opacity:1;border-left-color:rgb(100 121 195/var(--tw-border-opacity))}.border-l-violet-30{--tw-border-opacity:1;border-left-color:rgb(145 103 148/var(--tw-border-opacity))}.border-t-grey-200{--tw-border-opacity:1;border-top-color:rgb(228 235 245/var(--tw-border-opacity))}.bg-grey-100{--tw-bg-opacity:1;background-color:rgb(245 249 255/var(--tw-bg-opacity))}.bg-infinum{--tw-bg-opacity:1;background-color:rgb(216 38 44/var(--tw-bg-opacity))}.object-cover{object-fit:cover}.navbar-sidebar__brand,.navbar-sidebar__items .menu,.p-side-padding{padding:5.56vw}.px-7{padding-left:1.75rem;padding-right:1.75rem}.px-7\.5{padding-left:1.875rem;padding-right:1.875rem}.px-side-padding{padding-left:5.56vw;padding-right:5.56vw}.py-10{padding-bottom:2.5rem;padding-top:2.5rem}.py-3{padding-bottom:.75rem;padding-top:.75rem}.py-3\.75{padding-bottom:.9375rem;padding-top:.9375rem}.py-4{padding-bottom:1rem;padding-top:1rem}.py-8{padding-bottom:2rem;padding-top:2rem}.pb-20{padding-bottom:5rem}.pb-28{padding-bottom:7rem}.pl-10{padding-left:2.5rem}.pt-10{padding-top:2.5rem}.es-text-center,.text-center{text-align:center}.font-display{font-family:neue-haas-grotesk-display,Arial,sans-serif}.font-sans{font-family:neue-haas-grotesk-text,Arial,sans-serif}.es-big-title,.es-big-title-limited,.navbar-sidebar__items .menu__link,h1,h2,h3,h4,h5,h6{font-family:neue-haas-grotesk-display,Arial,sans-serif}.font-bold{font-weight:700}.font-medium{font-weight:500}.not-italic{font-style:normal}.leading-none{line-height:1}.blog-list-page .main-wrapper .container>.row>main article h2+div,.blog-tags-post-list-page .main-wrapper .container>.row>main article h2+div,.text-12,.theme-code-block>div[class^=codeBlockTitle]{font-size:clamp(.7671968738091037rem,calc(.78721rem - .10006vw),.6911478531570941rem);letter-spacing:.0286em;line-height:1.33}.text-candy-30{--tw-text-opacity:1;color:rgb(216 85 95/var(--tw-text-opacity))}.text-grey-400{--tw-text-opacity:1;color:rgb(146 158 178/var(--tw-text-opacity))}.text-grey-500{--tw-text-opacity:1;color:rgb(82 94 108/var(--tw-text-opacity))}.group:hover .group-hover\:text-infinum,.hover\:text-infinum:hover,.markdown a,.text-infinum,section[class*=DocCategoryGeneratedIndexPage] article .card:hover{--tw-text-opacity:1;color:rgb(216 38 44/var(--tw-text-opacity))}.text-olive-30{--tw-text-opacity:1;color:rgb(90 135 114/var(--tw-text-opacity))}.text-sand-30{--tw-text-opacity:1;color:rgb(217 168 102/var(--tw-text-opacity))}.text-sky-30{--tw-text-opacity:1;color:rgb(100 121 195/var(--tw-text-opacity))}.text-violet-30{--tw-text-opacity:1;color:rgb(145 103 148/var(--tw-text-opacity))}.hover\:text-white:hover,.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.filter{-webkit-filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors,section[class*=DocCategoryGeneratedIndexPage] article .card{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-500{transition-duration:.5s}.text-14{font-size:clamp(.8888888888888888rem,calc(.89437rem - .02741vw),.8680555555555557rem);letter-spacing:.0142em;line-height:1.5}.text-16{font-size:clamp(.9853849721883559rem,calc(.97675rem + .04317vw),1.0181953544068256rem);line-height:1.5}.text-18,h4{font-size:clamp(1.0606601717798212rem,calc(1.03949rem + .10583vw),1.141088661469096rem);line-height:1.44}.navbar-sidebar__items .menu__link,.text-24,blockquote p,h3{font-size:clamp(1.284396490428795rem,calc(1.21856rem + .32919vw),1.5345778128306942rem);line-height:1.25}.text-36,h2{font-size:clamp(1.6692195887945571rem,calc(1.50261rem + .83304vw),2.302327957702624rem);letter-spacing:-.0138em;line-height:1.17}.text-h2{font-size:clamp(2.8193058827290858rem,calc(2.19746rem + 3.10922vw),5.182314101769203rem);letter-spacing:-.0125em;line-height:1.02}.text-h3,h1{font-size:clamp(2.131350900116625rem,calc(1.80776rem + 1.61796vw),3.3609981453282645rem);letter-spacing:-.0096em;line-height:1.12}h5,h6,li{line-height:1.5}aside{--doc-sidebar-width:320px}h1,h2,h3,h4{font-weight:700}h5{font-size:clamp(.9853849721883559rem,calc(.97675rem + .04317vw),1.0181953544068256rem)}h5,h6{font-weight:700}h6{font-size:clamp(.8888888888888888rem,calc(.89437rem - .02741vw),.8680555555555557rem);letter-spacing:.0142em}li{font-family:neue-haas-grotesk-text,Arial,sans-serif;font-size:clamp(.9853849721883559rem,calc(.97675rem + .04317vw),1.0181953544068256rem)}blockquote{margin:2.5rem 0;padding:1rem 0 1rem 2.5rem}.DocSearch-Modal .DocSearch-Form,.DocSearch.DocSearch-Button{border-color:rgb(228 235 245/var(--tw-border-opacity))!important;border-style:solid!important}blockquote p{font-family:neue-haas-grotesk-text,Arial,sans-serif;font-weight:700}.es-showcase-grid{display:flex;flex-direction:column;gap:3.5rem;margin-bottom:2.5rem;padding:5.56vw}.before\:absolute:before{content:var(--tw-content);position:absolute}.before\:inset-0:before{content:var(--tw-content);inset:0}.before\:-z-10:before{content:var(--tw-content);z-index:-10}.before\:translate-y-full-plus-px:before{--tw-translate-y:calc(100% + 1px);content:var(--tw-content);-webkit-transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:before\:translate-y-0:hover:before,.hover\:scale-105:hover{-webkit-transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.before\:bg-black:before{--tw-bg-opacity:1;background-color:rgb(17 17 17/var(--tw-bg-opacity));content:var(--tw-content)}.DocSearch-Modal,.DocSearch.DocSearch-Button{background-color:rgb(255 255 255/var(--tw-bg-opacity))!important}.before\:transition-transform:before{content:var(--tw-content);transition-duration:.15s;transition-property:transform,-webkit-transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}.before\:duration-300:before{content:var(--tw-content);transition-duration:.3s}.hover\:scale-105:hover{--tw-scale-x:1.05;--tw-scale-y:1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:no-underline:hover{text-decoration-line:none}.hover\:decoration-transparent:hover{text-decoration-color:transparent}.hover\:before\:translate-y-0:hover:before{--tw-translate-y:0px;content:var(--tw-content);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.focus\:outline-offset-4:focus{outline-offset:4px}.focus\:outline-infinum:focus{outline-color:#d8262c}.focus\:before\:translate-y-0:focus:before{--tw-translate-y:0px;content:var(--tw-content)}.group:focus .group-focus\:translate-x-3,.group:hover .group-hover\:translate-x-3{--tw-translate-x:.75rem}.group:hover .group-hover\:scale-75{--tw-scale-x:.75;--tw-scale-y:.75;-webkit-transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:focus .group-focus\:opacity-0,.group:hover .group-hover\:opacity-0{opacity:0}.group:focus .group-focus\:scale-75{--tw-scale-x:.75;--tw-scale-y:.75}.markdown ol li,.markdown ul li{padding-left:.5rem}.markdown ol li ::marker,.markdown ul li ::marker{font-size:clamp(1.0606601717798212rem,calc(1.03949rem + .10583vw),1.141088661469096rem);line-height:1.44}.markdown ol li::marker,.markdown ul li::marker{font-size:clamp(1.0606601717798212rem,calc(1.03949rem + .10583vw),1.141088661469096rem);line-height:1.44}.markdown ul{list-style-type:"●"}.markdown ul ul{list-style-type:"○"}.markdown ul ul ul{list-style-type:"■"}.markdown ul ul ul ul{list-style-type:"□"}.markdown ol{list-style-type:decimal}.markdown ol li ::marker{font-size:clamp(.9853849721883559rem,calc(.97675rem + .04317vw),1.0181953544068256rem);line-height:1.5}.markdown ol li::marker{font-size:clamp(.9853849721883559rem,calc(.97675rem + .04317vw),1.0181953544068256rem);line-height:1.5}.markdown ol ol{list-style-type:upper-roman}.markdown ol ol ol ol{list-style-type:upper-alpha}.markdown>*{scroll-margin-top:4rem}.markdown h2{margin-top:3rem!important}.markdown :is(h3,h4,h5,h6){margin-top:2.5rem!important}.markdown .alert{border-radius:.125rem}.markdown p+.theme-code-block{margin-top:.5rem}.markdown img{--tw-border-opacity:1;border-color:rgb(245 249 255/var(--tw-border-opacity));border-radius:.25rem;border-width:1px}.DocSearch.DocSearch-Button{--tw-border-opacity:1!important;--tw-bg-opacity:1!important;border-width:1px!important;display:flex!important;gap:1rem!important;margin:0!important;padding:0 .5rem!important}.DocSearch-Modal .DocSearch-Footer,.DocSearch.DocSearch-Button .DocSearch-Button-Key{background-color:rgb(245 249 255/var(--tw-bg-opacity))!important;--tw-bg-opacity:1!important;--tw-shadow:0 0 #0000!important;--tw-shadow-colored:0 0 #0000!important;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}.DocSearch.DocSearch-Button .DocSearch-Button-Placeholder{font-weight:400!important;gap:.5rem!important;margin:0!important;padding:0!important}.DocSearch.DocSearch-Button .DocSearch-Button-Placeholder:is(span){line-height:1!important}.DocSearch.DocSearch-Button .DocSearch-Button-Container{gap:.5rem!important}.DocSearch.DocSearch-Button .DocSearch-Button-Keys{display:none!important;gap:.25rem!important;margin:0!important;min-width:-moz-fit-content!important;min-width:-webkit-fit-content!important;min-width:fit-content!important;padding:0!important}.DocSearch.DocSearch-Button .DocSearch-Button-Key{--tw-text-opacity:1!important;background-image:none!important;border-style:none!important;color:rgb(82 94 108/var(--tw-text-opacity))!important;margin:0!important}.DocSearch-Modal .DocSearch-Commands .DocSearch-Commands-Key,.DocSearch-Modal .DocSearch-HitsFooter a:hover{background-color:rgb(146 158 178/var(--tw-bg-opacity))!important;color:rgb(255 255 255/var(--tw-text-opacity))!important}.DocSearch.DocSearch-Button .DocSearch-Button-Key:is(kbd){line-height:1!important}.DocSearch-Modal{--tw-bg-opacity:1!important;--tw-shadow:0 25px 50px -12px rgba(0,0,0,.25)!important;--tw-shadow-colored:0 25px 50px -12px var(--tw-shadow-color)!important;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}.navbar,.theme-doc-sidebar-container{background-color:rgb(245 249 255/var(--tw-bg-opacity))}.navbar,.navbar-sidebar__brand,section[class*=DocCategoryGeneratedIndexPage] article .card{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.DocSearch-Modal .DocSearch-Form{--tw-border-opacity:1!important;border-radius:.5rem!important;border-width:1px!important}.DocSearch-Modal .DocSearch-Form:hover{--tw-border-opacity:1!important;border-color:rgb(146 158 178/var(--tw-border-opacity))!important}.DocSearch-Modal .DocSearch-Form:focus-visible{--tw-border-opacity:1!important;border-color:rgb(216 38 44/var(--tw-border-opacity))!important}.DocSearch-Modal .DocSearch-Footer{--tw-border-opacity:1!important;border-style:none!important;border-top-color:rgb(228 235 245/var(--tw-border-opacity))!important}.DocSearch-Modal .DocSearch-Logo .DocSearch-Label{--tw-text-opacity:1!important;color:rgb(146 158 178/var(--tw-text-opacity))!important}.DocSearch-Modal .DocSearch-Hits .DocSearch-Hit .DocSearch-Hit-icon,.DocSearch-Modal .DocSearch-Hits .DocSearch-Hit[aria-selected=true] .DocSearch-Hit-Tree,.DocSearch-Modal .DocSearch-Logo .DocSearch-Label:hover,.DocSearch-Modal .DocSearch-Logo svg:hover,.prism-code .token.cdata,.prism-code .token.comment,.prism-code .token.doctype,.prism-code .token.plain-text,.prism-code .token.prolog{--tw-text-opacity:1!important;color:rgb(82 94 108/var(--tw-text-opacity))!important}.DocSearch-Modal .DocSearch-Hits .DocSearch-Hit .DocSearch-Hit-Tree,.DocSearch-Modal .DocSearch-Hits .DocSearch-Hit .DocSearch-Hit-action,.DocSearch-Modal .DocSearch-Hits .DocSearch-Hit .DocSearch-Hit-path,.DocSearch-Modal .DocSearch-Logo svg{--tw-text-opacity:1!important;color:rgb(146 158 178/var(--tw-text-opacity))!important}.DocSearch-Modal .DocSearch-Logo .cls-1,.DocSearch-Modal .DocSearch-Logo .cls-2{fill:currentColor!important}.DocSearch-Modal .DocSearch-Commands{gap:.75rem!important}.DocSearch-Modal .DocSearch-Commands .DocSearch-Commands-Key{--tw-bg-opacity:1!important;--tw-text-opacity:1!important;--tw-shadow:0 0 #0000!important;--tw-shadow-colored:0 0 #0000!important;background-image:none!important;border-style:none!important;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important;margin:0!important}.DocSearch-Modal .DocSearch-Hits .DocSearch-Hit,.DocSearch-Modal .DocSearch-Hits .DocSearch-Hit-source,.DocSearch-Modal .DocSearch-HitsFooter a,.es-footer-white~.es-footer{--tw-bg-opacity:1!important;background-color:rgb(255 255 255/var(--tw-bg-opacity))!important}.DocSearch-Modal .DocSearch-Commands .DocSearch-Label,.DocSearch-Modal .DocSearch-HitsFooter a{color:rgb(82 94 108/var(--tw-text-opacity))!important}.DocSearch-Modal .DocSearch-Commands .DocSearch-Label,.DocSearch-Modal .DocSearch-Hits .DocSearch-Hit-source{font-size:clamp(.7671968738091037rem,calc(.78721rem - .10006vw),.6911478531570941rem)!important;letter-spacing:.0286em!important;line-height:1.33!important;--tw-text-opacity:1!important}.DocSearch-Modal .DocSearch-Commands .DocSearch-Commands-Key svg{--tw-text-opacity:1!important;color:rgb(255 255 255/var(--tw-text-opacity))!important}.DocSearch-Modal .DocSearch-Commands .DocSearch-Commands-Key:is(kbd){line-height:1!important}.DocSearch-Modal .DocSearch-Commands li{display:flex!important;gap:.25rem!important;margin:0!important;padding:0!important}.DocSearch-Modal .DocSearch-Hits .DocSearch-Hit-source{border-style:none!important;color:rgb(17 17 17/var(--tw-text-opacity))!important;font-family:neue-haas-grotesk-text,Arial,sans-serif!important;font-weight:500!important;margin:0!important;padding:.5rem 0!important;text-transform:uppercase!important}.DocSearch-Modal .DocSearch-Hits .DocSearch-Hit-source+ul{display:flex!important;flex-direction:column!important;gap:.5rem!important;padding:.25rem 0 0!important}.DocSearch-Modal .DocSearch-Hits .DocSearch-Hit{--tw-border-opacity:1!important;border-color:rgb(228 235 245/var(--tw-border-opacity))!important;border-radius:.5rem!important;border-style:solid!important;border-width:1px!important;margin:0!important;padding:0!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke!important}.DocSearch-Modal .DocSearch-Hits .DocSearch-Hit:hover{--tw-border-opacity:1!important;border-color:rgb(216 38 44/var(--tw-border-opacity))!important}.DocSearch-Modal .DocSearch-Hits .DocSearch-Hit>a{--tw-shadow:0 0 #0000!important;--tw-shadow-colored:0 0 #0000!important;background-image:none!important;border-radius:.5rem!important;border-style:none!important;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important;outline-color:#d8262cbf!important}.DocSearch-Modal .DocSearch-Hits .DocSearch-Hit .DocSearch-Hit-title{--tw-text-opacity:1!important;color:rgb(17 17 17/var(--tw-text-opacity))!important;font-size:clamp(.8888888888888888rem,calc(.89437rem - .02741vw),.8680555555555557rem)!important;font-weight:400!important;letter-spacing:.0142em!important;line-height:1.5!important;margin:0!important;padding:0!important}.DocSearch-Modal .DocSearch-Hits .DocSearch-Hit .DocSearch-Hit-path{font-size:clamp(.7671968738091037rem,calc(.78721rem - .10006vw),.6911478531570941rem)!important;font-weight:400!important;letter-spacing:.0286em!important;line-height:1.33!important;margin:-.25rem 0 0!important;padding:0!important}.DocSearch-Modal .DocSearch-Hits .DocSearch-Hit .DocSearch-Hit-action:hover{--tw-text-opacity:1!important;color:rgb(216 38 44/var(--tw-text-opacity))!important}.DocSearch-Modal .DocSearch-Hits .DocSearch-Hit[aria-selected=true] mark{--tw-text-opacity:1!important;color:rgb(216 38 44/var(--tw-text-opacity))!important;-webkit-filter:drop-shadow(0 0 .125rem rgba(216,38,44,.25))!important;filter:drop-shadow(0 0 .125rem rgb(216 38 44/.25))!important;text-decoration-line:none!important}.DocSearch-Modal .DocSearch-HitsFooter{margin:0!important;padding:1rem!important}.DocSearch-Modal .DocSearch-HitsFooter a{--tw-border-opacity:1!important;--tw-text-opacity:1!important;border-color:rgb(146 158 178/var(--tw-border-opacity))!important;border-radius:.5rem!important;border-style:solid!important;border-width:1px!important;cursor:pointer!important;font-weight:500!important;padding:.375rem .75rem!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter!important}.DocSearch-Modal .DocSearch-HitsFooter a:hover{--tw-bg-opacity:1!important;--tw-text-opacity:1!important}.DocSearch-Modal .DocSearch-HitsFooter a:focus-visible{--tw-border-opacity:1!important;--tw-bg-opacity:1!important;--tw-text-opacity:1!important;background-color:rgb(216 38 44/var(--tw-bg-opacity))!important;border-color:rgb(216 38 44/var(--tw-border-opacity))!important;color:rgb(255 255 255/var(--tw-text-opacity))!important;outline-color:#d8262cbf!important}main .container{display:flex;flex-wrap:nowrap;gap:2.5rem;justify-content:space-between;margin:0;padding-bottom:2.5rem!important;padding-left:8rem;padding-right:5rem;padding-top:2.5rem!important}main .container article{max-width:42rem}.es-single-full-screen-child{display:grid!important;grid-template-columns:repeat(1,minmax(0,1fr));grid-template-rows:repeat(1,minmax(0,1fr));height:100%;width:100%}.es-has-t-border{--tw-border-opacity:1;border-color:rgb(228 235 245/var(--tw-border-opacity));border-top-width:1px}.es-full-size{height:100%;width:100%}.es-big-title,.es-big-title-limited{font-size:clamp(3.7074202030286756rem,calc(2.59935rem + 5.54035vw),7.9180844472589476rem);font-weight:700;letter-spacing:-.0208em;line-height:.98;padding:1.5rem 5.56vw}.es-big-subtitle,.navbar__link{font-size:clamp(.9853849721883559rem,calc(.97675rem + .04317vw),1.0181953544068256rem)}.es-big-title-limited{max-width:45rem}.es-big-subtitle{line-height:1.5;margin-bottom:2.5rem;margin-top:-.5rem;max-width:68ch;padding-left:5.56vw;padding-right:5.56vw}.es-blog-grid{-webkit-column-gap:4rem;column-gap:4rem;display:flex;flex-direction:column;grid-auto-rows:auto;margin:0;padding:5.56vw;row-gap:2.5rem}body:has(.es-navbar-white) .navbar{--tw-bg-opacity:1!important;background-color:rgb(255 255 255/var(--tw-bg-opacity))!important}body:has(.es-navbar-white) .navbar .DocSearch.DocSearch-Button{--tw-border-opacity:1!important;border-color:rgb(228 235 245/var(--tw-border-opacity))!important;border-style:solid!important;border-width:1px!important}.navbar{--tw-bg-opacity:1;height:6.25rem;padding:0 1.5rem}.navbar__brand{padding-top:.25rem}.navbar__logo{max-height:1.5rem;max-width:14.5rem}.navbar__items--right{gap:2rem}.navbar__link{align-items:center;border-top-color:transparent;border-top-width:4px;font-weight:400;height:100%;line-height:1.5;padding:0 .5rem}.navbar__link--active{--tw-border-opacity:1;border-top-color:rgb(216 38 44/var(--tw-border-opacity));color:currentColor}.navbar-sidebar__items .menu__link,.table-of-contents__link{--tw-text-opacity:1;color:rgb(17 17 17/var(--tw-text-opacity))}#__docusaurus-base-url-issue-banner-container,.blog-list-page .main-wrapper .container>.row>main article footer>.col.text--right,.blog-list-page .main-wrapper .container>.row>main article footer>.col>b,.blog-list-page .main-wrapper .container>.row>main article h2+div+div,.blog-post-page footer.row>.col>b,.blog-tags-post-list-page .main-wrapper .container>.row>main article footer>.col.text--right,.blog-tags-post-list-page .main-wrapper .container>.row>main article footer>.col>b,.blog-tags-post-list-page .main-wrapper .container>.row>main article h2+div+div,.docSidebarContainer_b6E3,.navbar__link svg,.navbar__title,.sidebarLogo_isFc,.themedImage_ToTc,[data-theme=dark] .lightToggleIcon_pyhR,[data-theme=light] .darkToggleIcon_wfgR,html[data-announcement-bar-initially-dismissed=true] .announcementBar_mb4j{display:none}.navbar-sidebar__brand{--tw-border-opacity:1;border-bottom-color:rgb(228 235 245/var(--tw-border-opacity));border-bottom-width:1px}.navbar-sidebar__items .menu__link{font-weight:700;margin:0;padding:0}.navbar-sidebar__items .menu__link:hover{--tw-text-opacity:1;background:none;color:rgb(216 38 44/var(--tw-text-opacity))}.breadcrumbs__item--active .breadcrumbs__link,.navbar-sidebar__items .menu__link--active:not(.menu__link--sublist){--tw-text-opacity:1;background-color:initial;color:rgb(216 38 44/var(--tw-text-opacity))}.blog-list-page .main-wrapper .container>.row>main article footer>.col>ul li,.blog-post-page footer.row>.col>ul li,.blog-tags-post-list-page .main-wrapper .container>.row>main article footer>.col>ul li,.blog-tags-post-list-page .main-wrapper>.container>.row>.col,.navbar-sidebar__items .menu__list-item,.table-of-contents li{margin:0;padding:0}.navbar-sidebar__items .menu__list-item.theme-doc-sidebar-item-link-level-2 .menu__link{font-size:clamp(1.0606601717798212rem,calc(1.03949rem + .10583vw),1.141088661469096rem);font-weight:400;letter-spacing:0;line-height:1.44}.navbar-sidebar__items .menu__list{display:flex;flex-direction:column;row-gap:1.25rem}.blog-list-page .navbar,.blog-tags-post-list-page .navbar{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.theme-doc-sidebar-container .menu__caret:hover,.theme-doc-sidebar-container .menu__link:hover{background-color:initial}.blog-list-page .navbar .DocSearch.DocSearch-Button,.blog-tags-post-list-page .navbar .DocSearch.DocSearch-Button{--tw-border-opacity:1!important;border-color:rgb(228 235 245/var(--tw-border-opacity))!important;border-style:solid!important;border-width:1px!important}.blog-list-page .main-wrapper .container,.blog-post-page .container,.blog-tags-post-list-page .main-wrapper .container{margin:0!important;max-width:100%!important;padding:5.56vw!important;width:100%!important}.blog-list-page .main-wrapper .container>.row,.blog-tags-post-list-page .main-wrapper .container>.row{display:block;margin:0;padding:0;width:100%}.blog-list-page .main-wrapper .container>.row>main,.blog-tags-post-list-page .main-wrapper .container>.row>main{display:block;margin:0;max-width:100%;padding:0;width:100%}.blog-list-page .main-wrapper .container>.row>main .pagination-nav,.blog-tags-post-list-page .main-wrapper .container>.row>main .pagination-nav{grid-column:span 3/span 3;grid-column-start:1}.blog-list-page .main-wrapper .container>.row>main article,.blog-tags-post-list-page .main-wrapper .container>.row>main article{display:flex;flex-direction:column;margin:0!important;padding:0!important}.blog-list-page .main-wrapper .container>.row>main article h2,.blog-tags-post-list-page .main-wrapper .container>.row>main article h2{font-family:neue-haas-grotesk-text,Arial,sans-serif;font-size:clamp(1.284396490428795rem,calc(1.21856rem + .32919vw),1.5345778128306942rem);font-weight:700;line-height:1.25}.blog-list-page .main-wrapper .container>.row>main article h2+div,.blog-tags-post-list-page .main-wrapper .container>.row>main article h2+div{--tw-text-opacity:1;color:rgb(17 17 17/var(--tw-text-opacity));font-family:neue-haas-grotesk-text,Arial,sans-serif;margin-bottom:.75rem!important;margin-top:.25rem!important;text-transform:uppercase}.blog-list-page .main-wrapper .container>.row>main article .markdown>:not([hidden])~:not([hidden]),.blog-tags-post-list-page .main-wrapper .container>.row>main article .markdown>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}.blog-list-page .main-wrapper .container>.row>main article .markdown>:is(h1,h2,h3,h4,h5,h6,p),.blog-tags-post-list-page .main-wrapper .container>.row>main article .markdown>:is(h1,h2,h3,h4,h5,h6,p){-webkit-box-orient:vertical;-webkit-line-clamp:4;--tw-text-opacity:1;color:rgb(17 17 17/var(--tw-text-opacity));display:-webkit-box;font-family:neue-haas-grotesk-text,Arial,sans-serif;font-size:clamp(.8888888888888888rem,calc(.89437rem - .02741vw),.8680555555555557rem);font-weight:400;letter-spacing:.0142em;line-height:1.5;overflow:hidden;padding:0}.blog-list-page .main-wrapper .container>.row>main article .markdown>:is(h1,h2,h3,h4,h5,h6,p):first-child,.blog-tags-post-list-page .main-wrapper .container>.row>main article .markdown>:is(h1,h2,h3,h4,h5,h6,p):first-child{margin-top:0!important}.blog-list-page .main-wrapper .container>.row>main article footer,.blog-tags-post-list-page .main-wrapper .container>.row>main article footer{display:flex;margin:1.25rem 0 0!important;padding:0!important}.blog-list-page .main-wrapper .container>.row>main article footer>.col>ul,.blog-post-page footer.row>.col>ul,.blog-tags-post-list-page .main-wrapper .container>.row>main article footer>.col>ul{-webkit-column-gap:.5rem;column-gap:.5rem;display:flex;flex-wrap:wrap;list-style-type:none;margin:0!important;padding:0!important;row-gap:.125rem}.blog-list-page .main-wrapper .container>.row>main article footer>.col>ul li a,.blog-post-page footer.row>.col>ul li a,.blog-tags-post-list-page .main-wrapper .container>.row>main article footer>.col>ul li a{--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(196 206 222/var(--tw-bg-opacity));border-radius:9999px;border-style:none;color:rgb(255 255 255/var(--tw-text-opacity));font-size:clamp(.7671968738091037rem,calc(.78721rem - .10006vw),.6911478531570941rem);font-weight:500;letter-spacing:.0286em;line-height:1.33;text-transform:uppercase;transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);margin:0!important;padding:.125rem .5rem!important}.blog-list-page .main-wrapper .container>.row>main article footer>.col>ul li a:hover,.blog-post-page footer.row>.col>ul li a:hover,.blog-tags-post-list-page .main-wrapper .container>.row>main article footer>.col>ul li a:hover{--tw-bg-opacity:1;background-color:rgb(146 158 178/var(--tw-bg-opacity))}.blog-tags-post-list-page .main-wrapper>.container>.row{margin:0;width:100%}.blog-tags-post-list-page .main-wrapper>.container>.row>.col.col--3,div.generatedIndexPage_node_modules-\@docusaurus-theme-classic-lib-theme-DocCategoryGeneratedIndexPage-styles-module,main[class*=docMainContainer]>.container>.row{max-width:100%!important;width:100%!important}.blog-tags-post-list-page .main-wrapper>.container>.row>.col.col--7{-webkit-column-gap:4rem;column-gap:4rem;display:flex;flex-direction:column;max-width:100%!important;row-gap:2.5rem;width:100%!important}.blog-tags-post-list-page .main-wrapper>.container>.row>.col.col--7>header{grid-column:span 3/span 3;grid-column-start:1;margin:0!important;padding:0!important}section[class*=DocCategoryGeneratedIndexPage]{display:flex;flex-direction:column;gap:1.25rem;margin:0!important;padding:0!important}.blog-list-page .main-wrapper>.container.margin-vert--lg,.blog-post-page .container>.row>.col,section[class*=DocCategoryGeneratedIndexPage] article.col{margin:0!important;padding:0!important}section[class*=DocCategoryGeneratedIndexPage] article .card{--tw-border-opacity:1;border-color:rgb(228 235 245/var(--tw-border-opacity));border-radius:.375rem;border-width:1px;display:flex;flex-direction:column;gap:.5rem;padding:1rem!important}.blog-list-page .es-blog-grid+.pagination-nav{margin-left:5.56vw;margin-right:5.56vw}.table-of-contents{--tw-border-opacity:1;border-left-color:rgb(146 158 178/var(--tw-border-opacity));padding:0 0 0 .75rem}.table-of-contents__link{font-size:clamp(.8888888888888888rem,calc(.89437rem - .02741vw),.8680555555555557rem);letter-spacing:.0142em;line-height:1.5;padding:.25rem 0}.breadcrumbs__link:hover,.table-of-contents__link--active{color:rgb(216 38 44/var(--tw-text-opacity));--tw-text-opacity:1}.breadcrumbs{margin-bottom:3rem!important}.breadcrumbs,.breadcrumbs__item{align-items:center;display:flex;gap:1.5rem;margin:0;padding:0}.breadcrumbs__item:not(:last-child):after{height:.75rem;margin:.125rem;opacity:1;padding:0;width:.75rem}.breadcrumbs__link{border-radius:0;margin:0;padding:0}.breadcrumbs__link:-webkit-any-link:hover{background-color:initial}.breadcrumbs__link:any-link:hover{background-color:initial}.theme-doc-sidebar-container{--tw-bg-opacity:1;--tw-border-opacity:1!important;border-right-color:rgb(228 235 245/var(--tw-border-opacity))!important;margin:0;padding:0 0 2rem}.blog-post-page .markdown img,.docs-doc-page .navbar{--tw-border-opacity:1;border-color:rgb(228 235 245/var(--tw-border-opacity))}.theme-doc-sidebar-container .menu-list{margin-bottom:0!important;margin-top:0!important;padding-bottom:0!important;padding-top:0!important}.theme-doc-sidebar-container .menu{margin:0;padding:0;scrollbar-gutter:auto}.theme-doc-sidebar-container .menu__link{--tw-text-opacity:1;background-color:initial;color:rgb(17 17 17/var(--tw-text-opacity));margin:0;padding:0}.theme-doc-sidebar-container .menu__caret:hover,.theme-doc-sidebar-container .menu__link--active,.theme-doc-sidebar-container .menu__link:hover{color:rgb(216 38 44/var(--tw-text-opacity));--tw-text-opacity:1}.theme-doc-sidebar-container .menu__list .theme-doc-sidebar-container .menu__list,.theme-doc-sidebar-container .menu__list-item:not(:first-child){margin-top:0!important}.theme-doc-sidebar-container .menu__list .theme-doc-sidebar-container .menu__list{padding-left:1.5rem}.theme-doc-sidebar-container .menu__caret{--tw-text-opacity:1;align-items:center;border-radius:0;color:rgb(17 17 17/var(--tw-text-opacity));display:flex;height:2.5rem;justify-content:center;margin-right:.75rem;padding:0;width:2.5rem}.prism-code .token,.prism-code .token.content,.prism-code .token.front-matter,.prism-code .token.imports,.prism-code .token.language-php,.prism-code .token.maybe-class-name,.prism-code .token.plain,.prism-code .token.property-access,.prism-code .token.property:not(.literal-property),.prism-code .token.punctuation,.prism-code .token.script,.prism-code .token.unit,.theme-code-block{--tw-text-opacity:1!important;color:rgb(17 17 17/var(--tw-text-opacity))!important}.theme-doc-sidebar-container .menu__caret:before{--tw-rotate:90deg!important;--tw-scale-x:.75!important;--tw-scale-y:.75!important;height:1rem!important;width:1rem!important}.theme-doc-sidebar-container .menu__caret:before,.theme-doc-sidebar-container .menu__list-item:not(.menu__list-item--collapsed) .menu__caret:before{-webkit-transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.theme-doc-sidebar-container .menu__list-item:not(.menu__list-item--collapsed) .menu__caret:before{--tw-rotate:180deg!important;--tw-scale-x:.75!important;--tw-scale-y:.75!important}.theme-doc-sidebar-item-link{margin:0!important;padding:.5rem 1.25rem!important}.theme-doc-sidebar-item-link.theme-doc-sidebar-item-link-level-1{padding-bottom:.75rem!important;padding-top:.75rem!important}.menu__link--sublist{margin:0!important;padding:.75rem 1.25rem!important}.menu__link--sublist:hover{background-color:initial!important}.theme-doc-sidebar-item-category-level-1>.menu__list-item-collapsible{font-size:clamp(1.0606601717798212rem,calc(1.03949rem + .10583vw),1.141088661469096rem);font-weight:700;line-height:1.44}.theme-doc-sidebar-item-category-level-1 .menu__list-item-collapsible--active,.theme-doc-sidebar-item-category-level-1 .menu__list-item-collapsible--active:hover,.theme-doc-sidebar-item-category-level-1>.menu__list-item-collapsible:hover{background-color:initial}.theme-doc-sidebar-item-category,.theme-doc-sidebar-item-link-level-1,.theme-doc-sidebar-item-link-level-2,.theme-doc-sidebar-item-link-level-3,.theme-doc-sidebar-item-link-level-4,.theme-doc-sidebar-item-link-level-5{font-size:clamp(.9853849721883559rem,calc(.97675rem + .04317vw),1.0181953544068256rem);font-weight:400;line-height:1.5;margin:0;padding:0}main[class*=docMainContainer]>.container{--ifm-container-width-xl:100%;margin:0!important;padding:1.5rem!important;width:100%!important}.docs-doc-page .navbar{border-bottom-width:1px;padding-left:1.5rem;padding-right:1.5rem}code:not(.prism-code code){background-image:none;border-style:none;font-family:ibm-plex-mono,monospace;font-size:.95em;font-weight:700;margin:0;padding:0;vertical-align:initial}.markdown code:not(.prism-code code){--tw-text-opacity:1;color:rgb(51 58 105/var(--tw-text-opacity))}.prism-code,.theme-code-block{border-radius:0!important;border-style:none!important}.prism-code{--tw-bg-opacity:1!important;background-color:rgb(245 249 255/var(--tw-bg-opacity))!important;font-family:ibm-plex-mono,monospace!important;font-size:clamp(.8888888888888888rem,calc(.89437rem - .02741vw),.8680555555555557rem)!important;font-weight:500!important;letter-spacing:.0142em!important;line-height:1.5!important}.prism-code .theme-code-block-highlighted-line{background-color:#e4ebf599!important}.prism-code .token.boolean,.prism-code .token.constant,.prism-code .token.deleted,.prism-code .token.function-variable,.prism-code .token.important,.prism-code .token.literal-property,.prism-code .token.number,.prism-code .token.parameter,.prism-code .token.regex,.prism-code .token.symbol,.prism-code .token.tag,.prism-code .token.variable{--tw-text-opacity:1!important;color:rgb(217 168 102/var(--tw-text-opacity))!important}.prism-code .token.namespace{opacity:.7!important}.prism-code .token.attr-name,.prism-code .token.builtin,.prism-code .token.char,.prism-code .token.inserted,.prism-code .token.selector,.prism-code .token.string{--tw-text-opacity:1!important;color:rgb(90 135 114/var(--tw-text-opacity))!important}.prism-code .language-css .token.string,.prism-code .style .token.string,.prism-code .token.entity,.prism-code .token.operator,.prism-code .token.url{--tw-text-opacity:1!important;background-color:#ffffff0d!important;color:rgb(99 75 54/var(--tw-text-opacity))!important}.prism-code .token.atrule,.prism-code .token.attr-value,.prism-code .token.color,.prism-code .token.keyword{--tw-text-opacity:1!important;color:rgb(100 121 195/var(--tw-text-opacity))!important}.prism-code .token.class-name,.prism-code .token.function{--tw-text-opacity:1!important;color:rgb(158 121 86/var(--tw-text-opacity))!important}.prism-code .token.bold,.prism-code .token.important{font-weight:700!important}.prism-code .token.entity{cursor:help!important}.theme-code-block{--tw-shadow:0 0 #0000!important;--tw-shadow-colored:0 0 #0000!important;background-image:none!important;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important;--tw-bg-opacity:1;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;background-color:rgb(51 58 105/var(--tw-bg-opacity));box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);font-size:clamp(.8888888888888888rem,calc(.89437rem - .02741vw),.8680555555555557rem);line-height:1.6}.theme-code-block>div[class^=codeBlockTitle]{--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(228 235 245/var(--tw-bg-opacity));border-radius:0;color:rgb(82 94 108/var(--tw-text-opacity));font-family:neue-haas-grotesk-text,Arial,sans-serif;font-weight:400;padding:.25rem .625rem}.pagination-nav{--tw-border-opacity:1;border-top-color:rgb(228 235 245/var(--tw-border-opacity));border-top-width:1px;display:flex;flex-direction:column;margin-bottom:1.5rem;padding-top:1rem}.pagination-nav__link{border-style:none;padding:0}.blog-post-page main>article>header div[class*=BlogPostItem-Header-Info]+div.margin-top--md.margin-bottom--sm{margin-bottom:2.5rem!important}.blog-post-page .container>.row{display:block;grid-template-columns:auto 1fr;margin:0;max-width:100%;padding:0;width:100%}.blog-post-page .container>.row>.col.col--2,.blog-post-page .container>.row>.col.col--3{max-width:20rem;width:20rem}.blog-post-page .container>.row>.col.col--7{justify-self:center;max-width:48rem}.blog-post-page .markdown img{--tw-bg-opacity:1;background-color:rgb(245 249 255/var(--tw-bg-opacity));border-radius:.375rem;border-width:1px}body:not(.navigation-with-keyboard) :not(input):focus{outline:0}.skipToContent_fXgn{background-color:var(--ifm-background-surface-color);color:var(--ifm-color-emphasis-900);left:100%;padding:calc(var(--ifm-global-spacing)/2) var(--ifm-global-spacing);position:fixed;top:1rem;z-index:calc(var(--ifm-z-index-fixed) + 1)}.skipToContent_fXgn:focus{box-shadow:var(--ifm-global-shadow-md);left:1rem}.closeButton_CVFx{line-height:0;padding:0}.content_knG7{font-size:85%;padding:5px 0;text-align:center}.content_knG7 a{color:inherit}.announcementBar_mb4j{align-items:center;background-color:var(--ifm-color-white);border-bottom:1px solid var(--ifm-color-emphasis-100);color:var(--ifm-color-black);display:flex;height:var(--docusaurus-announcement-bar-height)}.announcementBarPlaceholder_vyr4{flex:0 0 10px}.announcementBarClose_gvF7{align-self:stretch;flex:0 0 30px}.toggle_vylO{height:2rem;width:2rem}.toggleButton_gllP{align-items:center;border-radius:50%;display:flex;height:100%;justify-content:center;transition:background var(--ifm-transition-fast);width:100%}.toggleButton_gllP:hover{background:var(--ifm-color-emphasis-200)}.toggleButtonDisabled_aARS{cursor:not-allowed}.darkNavbarColorModeToggle_X3D1:hover{background:var(--ifm-color-gray-800)}[data-theme=dark] .themedImage--dark_i4oU,[data-theme=light] .themedImage--light_HNdA{display:initial}.iconExternalLink_nPIU{margin-left:.3rem}.iconLanguage_nlXk{margin-right:5px;vertical-align:text-bottom}.navbarHideable_m1mJ{transition:-webkit-transform var(--ifm-transition-fast) ease;transition:transform var(--ifm-transition-fast) ease;transition:transform var(--ifm-transition-fast) ease,-webkit-transform var(--ifm-transition-fast) ease}.navbarHidden_jGov{-webkit-transform:translate3d(0,calc(-100% - 2px),0);transform:translate3d(0,calc(-100% - 2px),0)}.errorBoundaryError_a6uf{color:red;white-space:pre-wrap}.mainWrapper_z2l0{display:flex;flex:1 0 auto;flex-direction:column}.docusaurus-mt-lg{margin-top:3rem}#__docusaurus{display:flex;flex-direction:column;min-height:100%}.sidebar_re4s{max-height:calc(100vh - var(--ifm-navbar-height) - 2rem);overflow-y:auto;position:-webkit-sticky;position:sticky;top:calc(var(--ifm-navbar-height) + 2rem)}.sidebarItemTitle_pO2u{font-size:var(--ifm-h3-font-size);font-weight:var(--ifm-font-weight-bold)}.container_mt6G,.sidebarItemList_Yudw{font-size:.9rem}.sidebarItem__DBe{margin-top:.7rem}.sidebarItemLink_mo7H{color:var(--ifm-font-color-base);display:block}.sidebarItemLinkActive_I1ZP{color:var(--ifm-color-primary)!important}.searchQueryInput_u2C7,.searchVersionInput_m0Ui{background:var(--docsearch-searchbox-focus-background);border:2px solid var(--ifm-toc-border-color);border-radius:var(--ifm-global-radius);color:var(--docsearch-text-color);font:var(--ifm-font-size-base) var(--ifm-font-family-base);margin-bottom:.5rem;padding:.8rem;transition:border var(--ifm-transition-fast) ease;width:100%}.searchQueryInput_u2C7:focus,.searchVersionInput_m0Ui:focus{border-color:var(--docsearch-primary-color);outline:0}.searchQueryInput_u2C7::-webkit-input-placeholder{color:var(--docsearch-muted-color)}.searchQueryInput_u2C7::placeholder{color:var(--docsearch-muted-color)}.searchResultsColumn_JPFH{font-size:.9rem;font-weight:700}.algoliaLogo_rT1R{max-width:150px}.algoliaLogoPathFill_WdUC{fill:var(--ifm-font-color-base)}.searchResultItem_Tv2o{border-bottom:1px solid var(--ifm-toc-border-color);padding:1rem 0}.searchResultItemHeading_KbCB{font-weight:400;margin-bottom:0}.searchResultItemPath_lhe1{--ifm-breadcrumb-separator-size-multiplier:1;color:var(--ifm-color-content-secondary);font-size:.8rem}.searchResultItemSummary_AEaO{font-style:italic;margin:.5rem 0 0}.loadingSpinner_XVxU{-webkit-animation:1s linear infinite a;animation:1s linear infinite a;border:.4em solid #eee;border-radius:50%;border-top:.4em solid var(--ifm-color-primary);height:3rem;margin:0 auto;width:3rem}@-webkit-keyframes a{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes a{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.loader_vvXV{margin-top:2rem}.search-result-match{background:rgba(255,215,142,.25);color:var(--docsearch-hit-color);padding:.09em 0}.backToTopButton_sjWU{background-color:var(--ifm-color-emphasis-200);border-radius:50%;bottom:1.3rem;box-shadow:var(--ifm-global-shadow-lw);height:3rem;opacity:0;position:fixed;right:1.3rem;-webkit-transform:scale(0);transform:scale(0);transition:all var(--ifm-transition-fast) var(--ifm-transition-timing-default);visibility:hidden;width:3rem;z-index:calc(var(--ifm-z-index-fixed) - 1)}.backToTopButton_sjWU:after{background-color:var(--ifm-color-emphasis-1000);content:" ";display:inline-block;height:100%;-webkit-mask:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem no-repeat;mask:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem no-repeat;width:100%}.backToTopButtonShow_xfvO{opacity:1;-webkit-transform:scale(1);transform:scale(1);visibility:visible}[data-theme=dark]:root{--docusaurus-collapse-button-bg:hsla(0,0%,100%,.05);--docusaurus-collapse-button-bg-hover:hsla(0,0%,100%,.1)}.collapseSidebarButton_PEFL{display:none;margin:0}.docMainContainer_gTbr,.docPage__5DB{display:flex;width:100%}.docPage__5DB{flex:1 0}.docsWrapper_BCFX{display:flex;flex:1 0 auto}.authorCol_Hf19{flex-grow:1!important;max-width:inherit!important}.imageOnlyAuthorRow_pa_O{display:flex;flex-flow:row wrap}.DocSearch-Button,.DocSearch-Button-Container{align-items:center;display:flex}.imageOnlyAuthorCol_G86a{margin-left:.3rem;margin-right:.3rem}.DocSearch-Button{background:var(--docsearch-searchbox-background);border:0;border-radius:40px;color:var(--docsearch-muted-color);cursor:pointer;font-weight:500;height:36px;justify-content:space-between;padding:0 8px;-webkit-user-select:none;user-select:none}.DocSearch-Button:active,.DocSearch-Button:focus,.DocSearch-Button:hover{background:var(--docsearch-searchbox-focus-background);box-shadow:var(--docsearch-searchbox-shadow);color:var(--docsearch-text-color);outline:0}.DocSearch-Search-Icon{stroke-width:1.6}.DocSearch-Hit-Tree,.DocSearch-Hit-action,.DocSearch-Hit-icon,.DocSearch-Reset{stroke-width:var(--docsearch-icon-stroke-width)}.DocSearch-Button .DocSearch-Search-Icon{color:var(--docsearch-text-color)}.DocSearch-Button-Placeholder{font-size:1rem;padding:0 12px 0 6px}.DocSearch-Input,.DocSearch-Link{-webkit-appearance:none;font:inherit}.DocSearch-Button-Keys{display:flex;min-width:calc(40px + .8em)}.DocSearch-Button-Key{align-items:center;background:var(--docsearch-key-gradient);border:0;border-radius:3px;box-shadow:var(--docsearch-key-shadow);color:var(--docsearch-muted-color);display:flex;height:18px;justify-content:center;margin-right:.4em;padding:0 0 2px;position:relative;top:-1px;width:20px}.DocSearch--active{overflow:hidden!important}.DocSearch-Container{background-color:var(--docsearch-container-background);height:100vh;left:0;position:fixed;top:0;width:100vw;z-index:200}.DocSearch-Container a{text-decoration:none}.DocSearch-Link{appearance:none;background:none;border:0;color:var(--docsearch-highlight-color);cursor:pointer;margin:0;padding:0}.DocSearch-Modal{background:var(--docsearch-modal-background);border-radius:6px;box-shadow:var(--docsearch-modal-shadow);flex-direction:column;margin:60px auto auto;max-width:var(--docsearch-modal-width);position:relative}.DocSearch-SearchBar{display:flex;padding:var(--docsearch-spacing) var(--docsearch-spacing) 0}.DocSearch-Form{align-items:center;background:var(--docsearch-searchbox-focus-background);border-radius:4px;box-shadow:var(--docsearch-searchbox-shadow);display:flex;height:var(--docsearch-searchbox-height);margin:0;padding:0 var(--docsearch-spacing);position:relative;width:100%}.DocSearch-Input{appearance:none;background:0 0;border:0;color:var(--docsearch-text-color);flex:1;font-size:1.2em;height:100%;outline:0;padding:0 0 0 8px;width:80%}.DocSearch-Hit-action-button,.DocSearch-Reset{-webkit-appearance:none;border:0;cursor:pointer}.DocSearch-Input::-webkit-input-placeholder{color:var(--docsearch-muted-color);opacity:1}.DocSearch-Input::placeholder{color:var(--docsearch-muted-color);opacity:1}.DocSearch-Input::-webkit-search-cancel-button,.DocSearch-Input::-webkit-search-decoration,.DocSearch-Input::-webkit-search-results-button,.DocSearch-Input::-webkit-search-results-decoration{display:none}.DocSearch-LoadingIndicator,.DocSearch-MagnifierLabel,.DocSearch-Reset{margin:0;padding:0}.DocSearch-Container--Stalled .DocSearch-LoadingIndicator,.DocSearch-MagnifierLabel,.DocSearch-Reset{align-items:center;color:var(--docsearch-highlight-color);display:flex;justify-content:center}.DocSearch-Cancel,.DocSearch-Container--Stalled .DocSearch-MagnifierLabel,.DocSearch-LoadingIndicator,.DocSearch-Reset[hidden]{display:none}.DocSearch-Reset{-webkit-animation:.1s ease-in forwards b;animation:.1s ease-in forwards b;appearance:none;background:none;border-radius:50%;color:var(--docsearch-icon-color);padding:2px;right:0}.DocSearch-Help,.DocSearch-HitsFooter,.DocSearch-Label{color:var(--docsearch-muted-color)}.DocSearch-Reset:hover{color:var(--docsearch-highlight-color)}.DocSearch-LoadingIndicator svg,.DocSearch-MagnifierLabel svg{height:24px;width:24px}.DocSearch-Dropdown{max-height:calc(var(--docsearch-modal-height) - var(--docsearch-searchbox-height) - var(--docsearch-spacing) - var(--docsearch-footer-height));min-height:var(--docsearch-spacing);overflow-y:auto;overflow-y:overlay;padding:0 var(--docsearch-spacing);scrollbar-color:var(--docsearch-muted-color) var(--docsearch-modal-background);scrollbar-width:thin}.DocSearch-Dropdown::-webkit-scrollbar{width:12px}.DocSearch-Dropdown::-webkit-scrollbar-track{background:0 0}.DocSearch-Dropdown::-webkit-scrollbar-thumb{background-color:var(--docsearch-muted-color);border:3px solid var(--docsearch-modal-background);border-radius:20px}.DocSearch-Dropdown ul{list-style:none;margin:0;padding:0}.DocSearch-Label{font-size:.75em;line-height:1.6em}.DocSearch-Help{font-size:.9em;margin:0;-webkit-user-select:none;user-select:none}.DocSearch-Title{font-size:1.2em}.DocSearch-Logo a{display:flex}.DocSearch-Logo svg{color:var(--docsearch-logo-color);margin-left:8px}.DocSearch-Hits:last-of-type{margin-bottom:24px}.DocSearch-Hits mark{background:none;color:var(--docsearch-highlight-color)}.DocSearch-HitsFooter{display:flex;font-size:.85em;justify-content:center;margin-bottom:var(--docsearch-spacing);padding:var(--docsearch-spacing)}.DocSearch-HitsFooter a{border-bottom:1px solid;color:inherit}.DocSearch-Hit{border-radius:4px;display:flex;padding-bottom:4px;position:relative}.DocSearch-Hit--deleting{opacity:0;transition:.25s linear}.DocSearch-Hit--favoriting{-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:top center;transform-origin:top center;transition:.25s linear .25s}.DocSearch-Hit a{background:var(--docsearch-hit-background);border-radius:4px;box-shadow:var(--docsearch-hit-shadow);display:block;padding-left:var(--docsearch-spacing);width:100%}.DocSearch-Hit-source{background:var(--docsearch-modal-background);color:var(--docsearch-highlight-color);font-size:.85em;font-weight:600;line-height:32px;margin:0 -4px;padding:8px 4px 0;position:-webkit-sticky;position:sticky;top:0;z-index:10}.DocSearch-Hit-Tree{color:var(--docsearch-muted-color);height:var(--docsearch-hit-height);opacity:.5;width:24px}.DocSearch-Hit[aria-selected=true] a{background-color:var(--docsearch-highlight-color)}.DocSearch-Hit-Container{align-items:center;color:var(--docsearch-hit-color);display:flex;flex-direction:row;height:var(--docsearch-hit-height);padding:0 var(--docsearch-spacing) 0 0}.DocSearch-Hit-icon{height:20px;width:20px}.DocSearch-Hit-action,.DocSearch-Hit-icon{color:var(--docsearch-muted-color)}.DocSearch-Hit-action{align-items:center;display:flex;height:22px;width:22px}.DocSearch-Hit-action svg{display:block;height:18px;width:18px}.DocSearch-Hit-action+.DocSearch-Hit-action{margin-left:6px}.DocSearch-Hit-action-button{appearance:none;background:none;border-radius:50%;color:inherit;padding:2px}svg.DocSearch-Hit-Select-Icon{display:none}.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-Select-Icon,.tocCollapsibleContent_vkbj a{display:block}.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{background:rgba(0,0,0,.2);transition:background-color .1s ease-in}.DocSearch-Hit-action-button:focus path,.DocSearch-Hit-action-button:hover path{fill:#fff}.DocSearch-Hit-content-wrapper{display:flex;flex:1 1 auto;flex-direction:column;font-weight:500;justify-content:center;line-height:1.2em;margin:0 8px;overflow-x:hidden;position:relative;text-overflow:ellipsis;white-space:nowrap;width:80%}.DocSearch-Hit-title{font-size:.9em}.DocSearch-Hit-path{color:var(--docsearch-muted-color);font-size:.75em}.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-Tree,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-action,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-icon,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-path,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-text,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-title,.DocSearch-Hit[aria-selected=true] mark{color:var(--docsearch-hit-active-color)!important}.DocSearch-ErrorScreen,.DocSearch-NoResults,.DocSearch-StartScreen{font-size:.9em;margin:0 auto;padding:36px 0;text-align:center;width:80%}.DocSearch-Screen-Icon{color:var(--docsearch-muted-color);padding-bottom:12px}.DocSearch-NoResults-Prefill-List{display:inline-block;padding-bottom:24px;text-align:left}.DocSearch-NoResults-Prefill-List ul{display:inline-block;padding:8px 0 0}.DocSearch-NoResults-Prefill-List li{list-style-position:inside;list-style-type:"» "}.DocSearch-Prefill{-webkit-appearance:none;appearance:none;background:none;border:0;border-radius:1em;color:var(--docsearch-highlight-color);cursor:pointer;display:inline-block;font-size:1em;font-weight:700;padding:0}.DocSearch-Prefill:focus,.DocSearch-Prefill:hover{outline:0;text-decoration:underline}.DocSearch-Footer{align-items:center;background:var(--docsearch-footer-background);border-radius:0 0 8px 8px;box-shadow:var(--docsearch-footer-shadow);display:flex;flex-direction:row-reverse;flex-shrink:0;height:var(--docsearch-footer-height);justify-content:space-between;padding:0 var(--docsearch-spacing);position:relative;-webkit-user-select:none;user-select:none;width:100%;z-index:300}.DocSearch-Commands li,.DocSearch-Commands-Key{align-items:center;display:flex}.DocSearch-Commands{color:var(--docsearch-muted-color);display:flex;list-style:none;margin:0;padding:0}.DocSearch-Commands li:not(:last-of-type){margin-right:.8em}.DocSearch-Commands-Key{background:var(--docsearch-key-gradient);border:0;border-radius:2px;box-shadow:var(--docsearch-key-shadow);color:var(--docsearch-muted-color);height:18px;justify-content:center;margin-right:.4em;padding:0 0 1px;width:20px}.buttonGroup__atx button,.codeBlockContainer_Ckt0{background:var(--prism-background-color);color:var(--prism-color)}@-webkit-keyframes b{0%{opacity:0}to{opacity:1}}@keyframes b{0%{opacity:0}to{opacity:1}}.DocSearch-Button{margin:0;transition:all var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.DocSearch-Container{z-index:calc(var(--ifm-z-index-fixed) + 1)}.codeBlockContainer_Ckt0{border-radius:var(--ifm-code-border-radius);box-shadow:var(--ifm-global-shadow-lw);margin-bottom:var(--ifm-leading)}.codeBlockContent_biex{border-radius:inherit;direction:ltr;position:relative}.codeBlockTitle_Ktv7{border-bottom:1px solid var(--ifm-color-emphasis-300);border-top-left-radius:inherit;border-top-right-radius:inherit;font-size:var(--ifm-code-font-size);font-weight:500;padding:.75rem var(--ifm-pre-padding)}.codeBlock_bY9V{--ifm-pre-background:var(--prism-background-color);margin:0;padding:0}.codeBlockTitle_Ktv7+.codeBlockContent_biex .codeBlock_bY9V{border-top-left-radius:0;border-top-right-radius:0}.codeBlockLines_e6Vv{float:left;font:inherit;min-width:100%;padding:var(--ifm-pre-padding)}.codeBlockLinesWithNumbering_o6Pm{display:table;padding:var(--ifm-pre-padding) 0}.buttonGroup__atx{-webkit-column-gap:.2rem;column-gap:.2rem;display:flex;position:absolute;right:calc(var(--ifm-pre-padding)/2);top:calc(var(--ifm-pre-padding)/2)}.buttonGroup__atx button{align-items:center;border:1px solid var(--ifm-color-emphasis-300);border-radius:var(--ifm-global-radius);display:flex;line-height:0;opacity:0;padding:.4rem;transition:opacity var(--ifm-transition-fast) ease-in-out}.buttonGroup__atx button:focus-visible,.buttonGroup__atx button:hover{opacity:1!important}.theme-code-block:hover .buttonGroup__atx button{opacity:.4}.iconEdit_Z9Sw{margin-right:.3em;vertical-align:sub}.tag_zVej{border:1px solid var(--docusaurus-tag-list-border);transition:border var(--ifm-transition-fast)}.tag_zVej:hover{--docusaurus-tag-list-border:var(--ifm-link-color);text-decoration:none}.tagRegular_sFm0{border-radius:var(--ifm-global-radius);font-size:90%;padding:.2rem .5rem .3rem}.tagWithCount_h2kH{align-items:center;border-left:0;display:flex;padding:0 .5rem 0 1rem;position:relative}.tagWithCount_h2kH:after,.tagWithCount_h2kH:before{border:1px solid var(--docusaurus-tag-list-border);content:"";position:absolute;top:50%;transition:inherit}.tagWithCount_h2kH:before{border-bottom:0;border-right:0;height:1.18rem;right:100%;-webkit-transform:translate(50%,-50%) rotate(-45deg);transform:translate(50%,-50%) rotate(-45deg);width:1.18rem}.tagWithCount_h2kH:after{border-radius:50%;height:.5rem;left:0;-webkit-transform:translateY(-50%);transform:translateY(-50%);width:.5rem}.tagWithCount_h2kH span{background:var(--ifm-color-secondary);border-radius:var(--ifm-global-radius);color:var(--ifm-color-black);font-size:.7rem;line-height:1.2;margin-left:.3rem;padding:.1rem .4rem}.tag_Nnez{display:inline-block;margin:.5rem .5rem 0 1rem}:where(:root){--docusaurus-highlighted-code-line-bg:#484d5b}:where([data-theme=dark]){--docusaurus-highlighted-code-line-bg:#646464}.theme-code-block-highlighted-line{background-color:var(--docusaurus-highlighted-code-line-bg);display:block;margin:0 calc(var(--ifm-pre-padding)*-1);padding:0 var(--ifm-pre-padding)}.codeLine_lJS_{counter-increment:a;display:table-row}.codeLineNumber_Tfdd{background:var(--ifm-pre-background);display:table-cell;left:0;overflow-wrap:normal;padding:0 var(--ifm-pre-padding);position:-webkit-sticky;position:sticky;text-align:right;width:1%}.codeLineNumber_Tfdd:before{content:counter(a);opacity:.4}.codeLineContent_feaV{padding-right:var(--ifm-pre-padding)}.theme-code-block:hover .copyButtonCopied_obH4{opacity:1!important}.copyButtonIcons_eSgA{height:1.125rem;position:relative;width:1.125rem}.copyButtonIcon_y97N,.copyButtonSuccessIcon_LjdS{fill:currentColor;height:inherit;left:0;opacity:inherit;position:absolute;top:0;transition:all var(--ifm-transition-fast) ease;width:inherit}.copyButtonSuccessIcon_LjdS{color:#00d600;left:50%;opacity:0;top:50%;-webkit-transform:translate(-50%,-50%) scale(.33);transform:translate(-50%,-50%) scale(.33)}.copyButtonCopied_obH4 .copyButtonIcon_y97N{opacity:0;-webkit-transform:scale(.33);transform:scale(.33)}.copyButtonCopied_obH4 .copyButtonSuccessIcon_LjdS{opacity:1;-webkit-transform:translate(-50%,-50%) scale(1);transform:translate(-50%,-50%) scale(1);transition-delay:75ms}.tag_QGVx{display:inline-block;margin:0 .4rem .5rem 0}.lastUpdated_vwxv{font-size:smaller;font-style:italic;margin-top:.2rem}.tocCollapsibleButton_TO0P{align-items:center;display:flex;font-size:inherit;justify-content:space-between;padding:.4rem .8rem;width:100%}.tocCollapsibleButton_TO0P:after{background:var(--ifm-menu-link-sublist-icon) 50% 50%/2rem 2rem no-repeat;content:"";-webkit-filter:var(--ifm-menu-link-sublist-icon-filter);filter:var(--ifm-menu-link-sublist-icon-filter);height:1.25rem;-webkit-transform:rotate(180deg);transform:rotate(180deg);transition:-webkit-transform var(--ifm-transition-fast);transition:transform var(--ifm-transition-fast);transition:transform var(--ifm-transition-fast),-webkit-transform var(--ifm-transition-fast);width:1.25rem}.tocCollapsibleButtonExpanded_MG3E:after,.tocCollapsibleExpanded_sAul{-webkit-transform:none;transform:none}.tocCollapsible_ETCw{background-color:var(--ifm-menu-color-background-active);border-radius:var(--ifm-global-radius);margin:1rem 0}.tocCollapsibleContent_vkbj>ul{border-left:none;border-top:1px solid var(--ifm-color-emphasis-300);font-size:15px;padding:.2rem 0}.tocCollapsibleContent_vkbj ul li{margin:.4rem .8rem}.wordWrapButtonIcon_Bwma{height:1.2rem;width:1.2rem}.details_lb9f{--docusaurus-details-summary-arrow-size:0.38rem;--docusaurus-details-transition:transform 200ms ease;--docusaurus-details-decoration-color:grey}.details_lb9f>summary{cursor:pointer;list-style:none;padding-left:1rem;position:relative}.details_lb9f>summary::-webkit-details-marker{display:none}.details_lb9f>summary:before{border-color:transparent transparent transparent var(--docusaurus-details-decoration-color);border-style:solid;border-width:var(--docusaurus-details-summary-arrow-size);content:"";left:0;position:absolute;top:.45rem;-webkit-transform:rotate(0);transform:rotate(0);-webkit-transform-origin:calc(var(--docusaurus-details-summary-arrow-size)/2) 50%;transform-origin:calc(var(--docusaurus-details-summary-arrow-size)/2) 50%;transition:var(--docusaurus-details-transition)}.collapsibleContent_i85q{border-top:1px solid var(--docusaurus-details-decoration-color);margin-top:1rem;padding-top:1rem}.details_b_Ee{--docusaurus-details-decoration-color:var(--ifm-alert-border-color);--docusaurus-details-transition:transform var(--ifm-transition-fast) ease;border:1px solid var(--ifm-alert-border-color);margin:0 0 var(--ifm-spacing-vertical)}.anchorWithStickyNavbar_LWe7{scroll-margin-top:calc(var(--ifm-navbar-height) + .5rem)}.anchorWithHideOnScrollNavbar_WYt5{scroll-margin-top:.5rem}.hash-link{opacity:0;padding-left:.5rem;transition:opacity var(--ifm-transition-fast);-webkit-user-select:none;user-select:none}.hash-link:before{content:"#"}.containsTaskList_mC6p{list-style:none}:not(.containsTaskList_mC6p>li)>.containsTaskList_mC6p{padding-left:0}.img_ev3q{height:auto}.tableOfContents_bqdL{max-height:calc(100vh - var(--ifm-navbar-height) - 2rem);overflow-y:auto;position:-webkit-sticky;position:sticky;top:calc(var(--ifm-navbar-height) + 1rem)}.breadcrumbHomeIcon_YNFT{height:1.1rem;position:relative;top:1px;vertical-align:top;width:1.1rem}.breadcrumbsContainer_Z_bl{--ifm-breadcrumb-size-multiplier:0.8;margin-bottom:.8rem}@media (min-width:496px){.tablet\:mx-0{margin-left:0;margin-right:0}.tablet\:grid-flow-row{grid-auto-flow:row}.tablet\:auto-rows-auto{grid-auto-rows:auto}.tablet\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.tablet\:gap-x-20{-webkit-column-gap:5rem;column-gap:5rem}.tablet\:overflow-x-hidden{overflow-x:hidden}.tablet\:px-0{padding-left:0;padding-right:0}}@media not all and (min-width:496px){.max-tablet\:no-scrollbar::-webkit-scrollbar{display:none}.max-tablet\:no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}}@media (min-width:997px){.collapseSidebarButton_PEFL,.expandButton_m80_{background-color:var(--docusaurus-collapse-button-bg)}.es-showcase-grid{display:grid;gap:6rem;grid-template-columns:repeat(2,minmax(0,1fr));width:-moz-fit-content;width:-webkit-fit-content;width:fit-content}.desktop\:sticky{position:-webkit-sticky;position:sticky}.desktop\:top-navbar{top:6.25rem}.desktop\:row-span-2{grid-row:span 2/span 2}.desktop\:mb-0{margin-bottom:0}.desktop\:mb-1{margin-bottom:.25rem}.desktop\:mb-10{margin-bottom:2.5rem}.desktop\:mb-20{margin-bottom:5rem}.desktop\:block{display:block}.desktop\:grid{display:grid}.desktop\:w-auto{width:auto}.desktop\:max-w-full,.navbar__logo{max-width:100%}.desktop\:max-w-xl{max-width:36rem}.desktop\:auto-rows-auto{grid-auto-rows:auto}.desktop\:grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.desktop\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.desktop\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.desktop\:grid-cols-fit20{grid-template-columns:repeat(auto-fit,minmax(20rem,1fr))}.desktop\:grid-rows-\[auto_9rem\]{grid-template-rows:auto 9rem}.desktop\:flex-row{flex-direction:row}.desktop\:items-center,.sidebarLogo_isFc{align-items:center}.desktop\:justify-between{justify-content:space-between}.desktop\:gap-x-gutter{-webkit-column-gap:2.78vw;column-gap:2.78vw}.desktop\:gap-y-0{row-gap:0}.desktop\:gap-y-20{row-gap:5rem}.desktop\:self-start{align-self:flex-start}.desktop\:py-20{padding-bottom:5rem;padding-top:5rem}.desktop\:py-24{padding-bottom:6rem;padding-top:6rem}.desktop\:pb-0{padding-bottom:0}.desktop\:pb-36{padding-bottom:9rem}.desktop\:pb-side-padding{padding-bottom:5.56vw}.desktop\:pr-0{padding-right:0}.desktop\:pt-10{padding-top:2.5rem}.desktop\:pt-20{padding-top:5rem}.desktop\:pt-24{padding-top:6rem}.desktop\:text-left{text-align:left}.DocSearch.DocSearch-Button{padding-right:.75rem!important}.DocSearch.DocSearch-Button .DocSearch-Button-Keys{display:flex!important}.DocSearch-Modal{border-radius:.75rem!important}.es-big-title,.es-big-title-limited{padding-bottom:0;padding-top:5rem}.es-big-subtitle{margin-bottom:2rem;margin-top:1rem}.es-blog-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));row-gap:8rem}.navbar__link{display:flex}.blog-tags-post-list-page .main-wrapper>.container>.row{display:grid;grid-template-columns:repeat(10,minmax(0,1fr))}.blog-tags-post-list-page .main-wrapper>.container>.row>.col.col--3{grid-column:span 2/span 2;grid-column-start:1}.blog-tags-post-list-page .main-wrapper>.container>.row>.col.col--7{display:grid;grid-column:span 8/span 8;grid-column-start:3;grid-template-columns:repeat(3,minmax(0,1fr));row-gap:8rem}.blog-tags-post-list-page .main-wrapper>.container>.row>.col.col--7>header{margin-bottom:-5rem!important}main[class*=docMainContainer]>.container{padding:5rem!important}.pagination-nav{flex-direction:row;justify-content:space-between;margin-bottom:5rem}.pagination-nav__link--next{margin-left:auto}.blog-post-page main>article>header div[class*=BlogPostItem-Header-Info]+div.margin-top--md.margin-bottom--sm{margin-bottom:5rem!important}.blog-post-page .container>.row{display:grid;justify-content:space-between}:root{--docusaurus-announcement-bar-height:30px}.announcementBarClose_gvF7,.announcementBarPlaceholder_vyr4{flex-basis:50px}.searchBox_ZlJk{padding:var(--ifm-navbar-item-padding-vertical) var(--ifm-navbar-item-padding-horizontal)}.collapseSidebarButton_PEFL{border:1px solid var(--ifm-toc-border-color);border-radius:0;bottom:0;display:block!important;height:40px;position:-webkit-sticky;position:sticky}.collapseSidebarButtonIcon_kv0_{margin-top:4px;-webkit-transform:rotate(180deg);transform:rotate(180deg)}.expandButtonIcon_BlDH,[dir=rtl] .collapseSidebarButtonIcon_kv0_{-webkit-transform:rotate(0);transform:rotate(0)}.collapseSidebarButton_PEFL:focus,.collapseSidebarButton_PEFL:hover,.expandButton_m80_:focus,.expandButton_m80_:hover{background-color:var(--docusaurus-collapse-button-bg-hover)}.menuHtmlItem_M9Kj{padding:var(--ifm-menu-link-padding-vertical) var(--ifm-menu-link-padding-horizontal)}.menu_SIkG{flex-grow:1;padding:.5rem}@supports (scrollbar-gutter:stable){.menu_SIkG{padding:.5rem 0 .5rem .5rem;scrollbar-gutter:stable}}.menuWithAnnouncementBar_GW3s{margin-bottom:var(--docusaurus-announcement-bar-height)}.sidebar_njMd{display:flex;flex-direction:column;height:100%;padding-top:var(--ifm-navbar-height);width:var(--doc-sidebar-width)}.sidebarWithHideableNavbar_wUlq{padding-top:0}.sidebarHidden_VK0M{opacity:0;visibility:hidden}.sidebarLogo_isFc{color:inherit!important;display:flex!important;margin:0 var(--ifm-navbar-padding-horizontal);max-height:var(--ifm-navbar-height);min-height:var(--ifm-navbar-height);text-decoration:none!important}.sidebarLogo_isFc img{height:2rem;margin-right:.5rem}.expandButton_m80_{align-items:center;display:flex;height:100%;justify-content:center;position:absolute;right:0;top:0;transition:background-color var(--ifm-transition-fast) ease;width:100%}[dir=rtl] .expandButtonIcon_BlDH{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.docSidebarContainer_b6E3{border-right:1px solid var(--ifm-toc-border-color);-webkit-clip-path:inset(0);clip-path:inset(0);display:block;margin-top:calc(var(--ifm-navbar-height)*-1);transition:width var(--ifm-transition-fast) ease;width:var(--doc-sidebar-width);will-change:width}.docSidebarContainerHidden_b3ry{cursor:pointer;width:var(--doc-sidebar-hidden-width)}.sidebarViewport_Xe31{height:100%;max-height:100vh;position:-webkit-sticky;position:sticky;top:0}.docMainContainer_gTbr{flex-grow:1;max-width:calc(100% - var(--doc-sidebar-width))}.docMainContainerEnhanced_Uz_u{max-width:calc(100% - var(--doc-sidebar-hidden-width))}.docItemWrapperEnhanced_czyv{max-width:calc(var(--ifm-container-width) + var(--doc-sidebar-width))!important}.lastUpdated_vwxv{text-align:right}.tocMobile_ITEo{display:none}.docItemCol_VOVn{max-width:75%!important}}@media (min-width:1365px){.es-showcase-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (min-width:1440px){.container{max-width:var(--ifm-container-width-xl)}}@media (max-width:996px){.col{--ifm-col-width:100%;flex-basis:var(--ifm-col-width);margin-left:0}.footer{--ifm-footer-padding-horizontal:0}.colorModeToggle_DEke,.footer__link-separator,.navbar__item,.sidebar_re4s,.tableOfContents_bqdL{display:none}.footer__col{margin-bottom:calc(var(--ifm-spacing-vertical)*3)}.footer__link-item{display:block}.hero{padding-left:0;padding-right:0}.navbar>.container,.navbar>.container-fluid{padding:0}.navbar__toggle{display:inherit}.navbar__search-input{width:9rem}.pills--block,.tabs--block{flex-direction:column}.searchBox_ZlJk{position:absolute;right:var(--ifm-navbar-padding-horizontal)}.docItemContainer_F8PC{padding:0 .3rem}}@media only screen and (max-width:996px){.searchQueryColumn_RTkw,.searchResultsColumn_JPFH{max-width:60%!important}.searchLogoColumn_rJIA,.searchVersionColumn_ypXd{max-width:40%!important}.searchLogoColumn_rJIA{padding-left:0!important}}@media (max-width:768px){.DocSearch-Button-Keys,.DocSearch-Button-Placeholder,.DocSearch-Commands,.DocSearch-Hit-Tree{display:none}:root{--docsearch-spacing:10px;--docsearch-footer-height:40px}.DocSearch-Dropdown{height:100%;max-height:calc(var(--docsearch-vh,1vh)*100 - var(--docsearch-searchbox-height) - var(--docsearch-spacing) - var(--docsearch-footer-height))}.DocSearch-Container{height:100vh;height:-webkit-fill-available;height:calc(var(--docsearch-vh,1vh)*100);position:absolute}.DocSearch-Footer{border-radius:0;bottom:0;position:absolute}.DocSearch-Hit-content-wrapper{display:flex;position:relative;width:80%}.DocSearch-Modal{border-radius:0;box-shadow:none;height:100vh;height:-webkit-fill-available;height:calc(var(--docsearch-vh,1vh)*100);margin:0;max-width:100%;width:100%}.DocSearch-Cancel{-webkit-appearance:none;appearance:none;background:none;border:0;color:var(--docsearch-highlight-color);cursor:pointer;display:inline-block;flex:none;font:inherit;font-size:1em;font-weight:500;margin-left:var(--docsearch-spacing);outline:0;overflow:hidden;padding:0;-webkit-user-select:none;user-select:none;white-space:nowrap}}@media (max-width:576px){.markdown h1:first-child{--ifm-h1-font-size:2rem}.markdown>h2{--ifm-h2-font-size:1.5rem}.markdown>h3{--ifm-h3-font-size:1.25rem}.title_f1Hy{font-size:2rem}}@media screen and (max-width:576px){.searchQueryColumn_RTkw{max-width:100%!important}.searchVersionColumn_ypXd{max-width:100%!important;padding-left:var(--ifm-spacing-horizontal)!important}}@media (hover:hover){.backToTopButton_sjWU:hover{background-color:var(--ifm-color-emphasis-300)}}@media (pointer:fine){.thin-scrollbar{scrollbar-width:thin}.thin-scrollbar::-webkit-scrollbar{height:var(--ifm-scrollbar-size);width:var(--ifm-scrollbar-size)}.thin-scrollbar::-webkit-scrollbar-track{background:var(--ifm-scrollbar-track-background-color);border-radius:10px}.thin-scrollbar::-webkit-scrollbar-thumb{background:var(--ifm-scrollbar-thumb-background-color);border-radius:10px}.thin-scrollbar::-webkit-scrollbar-thumb:hover{background:var(--ifm-scrollbar-thumb-hover-background-color)}}@media (prefers-reduced-motion:reduce){:root{--ifm-transition-fast:0ms;--ifm-transition-slow:0ms}}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Reset{stroke-width:var(--docsearch-icon-stroke-width);-webkit-animation:none;animation:none;-webkit-appearance:none;appearance:none;background:none;border:0;border-radius:50%;color:var(--docsearch-icon-color);cursor:pointer;right:0}.DocSearch-Hit--deleting,.DocSearch-Hit--favoriting{transition:none}.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{background:rgba(0,0,0,.2);transition:none}}@media print{.announcementBar_mb4j,.footer,.menu,.navbar,.pagination-nav,.table-of-contents,.tocMobile_ITEo{display:none}.tabs{page-break-inside:avoid}.codeBlockLines_e6Vv{white-space:pre-wrap}} \ No newline at end of file diff --git a/assets/js/0058bf23.809bdbb3.js b/assets/js/0058bf23.809bdbb3.js deleted file mode 100644 index 2da2cc81b..000000000 --- a/assets/js/0058bf23.809bdbb3.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_eightshift_docs=self.webpackChunk_eightshift_docs||[]).push([[66114],{3905:function(e,t,n){n.d(t,{Zo:function(){return u},kt:function(){return d}});var r=n(67294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var c=r.createContext({}),s=function(e){var t=r.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},u=function(e){var t=s(e.components);return r.createElement(c.Provider,{value:t},e.children)},p="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,o=e.mdxType,a=e.originalType,c=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),p=s(n),f=o,d=p["".concat(c,".").concat(f)]||p[f]||m[f]||a;return n?r.createElement(d,i(i({ref:t},u),{},{components:n})):r.createElement(d,i({ref:t},u))}));function d(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=n.length,i=new Array(a);i[0]=f;var l={};for(var c in t)hasOwnProperty.call(t,c)&&(l[c]=t[c]);l.originalType=e,l[p]="string"==typeof e?e:o,i[1]=l;for(var s=2;s{n.r(t),n.d(t,{assets:()=>a,contentTitle:()=>c,default:()=>h,frontMatter:()=>s,metadata:()=>r,toc:()=>l});var o=n(85893),i=n(11151);const s={id:"blocks-important",title:"Important"},c=void 0,r={id:"legacy/v8/basics/blocks-important",title:"Important",description:"docs-source",source:"@site/docs/legacy/v8/basics/blocks-important.md",sourceDirName:"legacy/v8/basics",slug:"/legacy/v8/basics/blocks-important",permalink:"/docs/legacy/v8/basics/blocks-important",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{id:"blocks-important",title:"Important"},sidebar:"docs",previous:{title:"Blocks",permalink:"/docs/legacy/v8/basics/blocks"},next:{title:"Faq",permalink:"/docs/legacy/v8/basics/blocks-faq"}},a={},l=[];function d(e){const t={a:"a",blockquote:"blockquote",code:"code",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,i.a)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.p,{children:(0,o.jsx)(t.a,{href:"https://github.com/infinum/eightshift-frontend-libs/tree/develop/blocks/init/src/Blocks/",children:(0,o.jsx)(t.img,{src:"https://img.shields.io/badge/source-eightshift--frontend--libs-yellow?style=for-the-badge&logo=javascript&labelColor=2a2a2a",alt:"docs-source"})})}),"\n",(0,o.jsx)(t.p,{children:"Before you start developing and changing anything on your block/components, you should keep in mind how we have managed to create this setup and some of the side effects of automatic file loading."}),"\n",(0,o.jsxs)(t.p,{children:["We require all our JS files using the ",(0,o.jsx)(t.code,{children:"require.context"})," and all our SCSS files using the ",(0,o.jsx)(t.code,{children:"webpack-import-glob-loader"}),"."]}),"\n",(0,o.jsxs)(t.p,{children:["All files are required during the project's ",(0,o.jsx)(t.code,{children:"compile-time"}),". This means that we can't get any new files after the compile time is over. This approach gives you the ability to not worry whether you loaded the file or not. You can focus on your code and leave the messy stuff to the boilerplate."]}),"\n",(0,o.jsxs)(t.p,{children:["Since all the files are required during the ",(0,o.jsx)(t.code,{children:"compile-time"}),", every time you change the file structure, you must restart the Webpack watch."]}),"\n",(0,o.jsxs)(t.p,{children:["You ",(0,o.jsx)(t.strong,{children:"must restart"})," Webpack watch when:"]}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsx)(t.li,{children:"adding a new block/component/variation;"}),"\n",(0,o.jsx)(t.li,{children:"changing the names of any files in the block/component/variation folder (for example, you made a typo in a block's name);"}),"\n",(0,o.jsx)(t.li,{children:"removing any file from the block/component/variation folder; and"}),"\n",(0,o.jsx)(t.li,{children:"changing the block name in the block manifest.json."}),"\n"]}),"\n",(0,o.jsxs)(t.p,{children:["You ",(0,o.jsx)(t.strong,{children:"don't need to restart"})," Webpack watch when you:"]}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsx)(t.li,{children:"add/remove styles;"}),"\n",(0,o.jsx)(t.li,{children:"add/remove JS implementation in the files;"}),"\n",(0,o.jsx)(t.li,{children:"add/remove PHP implementation in the files; and"}),"\n",(0,o.jsx)(t.li,{children:"make changes on anything other than blockName in the manifest.json."}),"\n"]}),"\n",(0,o.jsxs)(t.blockquote,{children:["\n",(0,o.jsx)(t.p,{children:"Remember this note because, in 90 per cent of cases, your error occurs when you made changes to the files and didn't restart the Webpack watch."}),"\n"]})]})}function h(e={}){const{wrapper:t}={...(0,i.a)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},11151:(e,t,n)=>{n.d(t,{Z:()=>r,a:()=>c});var o=n(67294);const i={},s=o.createContext(i);function c(e){const t=o.useContext(s);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:c(e.components),o.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/014fa81c.37d2f396.js b/assets/js/014fa81c.37d2f396.js deleted file mode 100644 index 91ab911e1..000000000 --- a/assets/js/014fa81c.37d2f396.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_eightshift_docs=self.webpackChunk_eightshift_docs||[]).push([[36666],{3905:function(e,t,n){n.d(t,{Zo:function(){return c},kt:function(){return h}});var o=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=o.createContext({}),p=function(e){var t=o.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},c=function(e){var t=p(e.components);return o.createElement(s.Provider,{value:t},e.children)},u="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},d=o.forwardRef((function(e,t){var n=e.components,a=e.mdxType,r=e.originalType,s=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),u=p(n),d=a,h=u["".concat(s,".").concat(d)]||u[d]||m[d]||r;return n?o.createElement(h,i(i({ref:t},c),{},{components:n})):o.createElement(h,i({ref:t},c))}));function h(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var r=n.length,i=new Array(r);i[0]=d;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[u]="string"==typeof e?e:a,i[1]=l;for(var p=2;pload('boilerplate');\n}\n")),(0,r.kt)("p",null,"This code loads the WP-CLI class from Eightshift Libs, which handles command registration for all of our commands. As this command registration is part of the theme/plugin code, this means that the same theme/plugin ",(0,r.kt)("strong",{parentName:"p"},"must be activated")," for ",(0,r.kt)("inlineCode",{parentName:"p"},"wp boilerplate")," to work."),(0,r.kt)("p",null,"To run the WP-CLI command and see what you can use, run this command in your terminal:"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"wp boilerplate --help")),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},"By default, your project's WP-CLI commands run under the parent name ",(0,r.kt)("inlineCode",{parentName:"p"},"boilerplate"),", as defined above.")),(0,r.kt)("p",null,"You can change that by simply replacing the string inside the load method like this:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-php"},"/**\n * Run all WP-CLI commands.\n */\nif (class_exists(Cli::class)) {\n (new Cli())->load('superCoolTheme');\n}\n")),(0,r.kt)("p",null,"Now, your project's WP-CLI commands are available using:"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"wp superCoolTheme --help"),"."),(0,r.kt)("p",null,"This is especially handy when you have multiple Eightshift Boilerplate powered themes or plugins installed. In that case, you should change the WP-CLI parent name on each of the projects."),(0,r.kt)("h2",{id:"options-and-commands"},"Options and commands"),(0,r.kt)("p",null,"To get to know which commands are available and what do they do, run ",(0,r.kt)("inlineCode",{parentName:"p"},"wp boilerplate --help"),".\nThe ",(0,r.kt)("inlineCode",{parentName:"p"},"--help")," argument is available on all of our commands and provides a description of the command and a list of required and optional parameters for the command."),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"wp boilerplate create_config --help")),(0,r.kt)("h3",{id:"commands"},"Commands"),(0,r.kt)("p",null,"We use these common prefixes for commands:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"create")," - services classes that will be copied to your project."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"init")," - additional functions, methods and helpers that will be copied to your project."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"run")," - commands used to run an action directly from Eightshift Libs. They will not copy anything to your project."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"setup")," - commands that runs multiple already defined commands from the list."),(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("strong",{parentName:"li"},"use")," - commands used for blocks and block-related stuff. They will copy various files and folders from the blocks folder to your project.")),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},(0,r.kt)("strong",{parentName:"p"},"Make WP-CLI your best friend, and your coding life will be much more comfortable, trust us."))),(0,r.kt)("p",null,"While we might go into more details about some of these commands, we won't be documenting all of them here - use the built-in manuals for more information about particular commands and to discover what's available. Don't gloss over them, as using ",(0,r.kt)("inlineCode",{parentName:"p"},"wp boilerplate")," is a particularly useful tool when building projects with Eightshift Development Kit."),(0,r.kt)("h2",{id:"running-commands-in-multisite"},"Running commands in multisite"),(0,r.kt)("p",null,"When you are running a multisite setup, you should always provide the additional ",(0,r.kt)("inlineCode",{parentName:"p"},"--url")," parameter. Otherwise, WP-CLI will always run the command on the main site."),(0,r.kt)("p",null,"Here is an example for command running on the primary site:"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"wp boilerplate create_config")),(0,r.kt)("p",null,"and here is an example for command running on the subsite:"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"wp boilerplate create_config --url='custom.domain.com'")))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/014fa81c.fdc41dda.js b/assets/js/014fa81c.fdc41dda.js new file mode 100644 index 000000000..00cfa97dd --- /dev/null +++ b/assets/js/014fa81c.fdc41dda.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_eightshift_docs=self.webpackChunk_eightshift_docs||[]).push([[36666],{49422:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>c,contentTitle:()=>l,default:()=>h,frontMatter:()=>t,metadata:()=>r,toc:()=>a});var i=s(85893),o=s(11151);const t={id:"wp-cli",title:"WP-CLI"},l=void 0,r={id:"legacy/v6/basics/wp-cli",title:"WP-CLI",description:"docs-source",source:"@site/docs/legacy/v6/basics/wp-cli.md",sourceDirName:"legacy/v6/basics",slug:"/legacy/v6/basics/wp-cli",permalink:"/docs/legacy/v6/basics/wp-cli",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{id:"wp-cli",title:"WP-CLI"},sidebar:"docs",previous:{title:"Basics",permalink:"/docs/legacy/v6/basics/basics-intro"},next:{title:"Architecture concepts",permalink:"/docs/legacy/v6/basics/architecture-concepts"}},c={},a=[{value:"How it works",id:"how-it-works",level:2},{value:"Options and commands",id:"options-and-commands",level:2},{value:"Commands",id:"commands",level:3},{value:"Running commands in multisite",id:"running-commands-in-multisite",level:2}];function d(e){const n={a:"a",blockquote:"blockquote",code:"code",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,o.a)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.p,{children:(0,i.jsx)(n.a,{href:"https://github.com/infinum/eightshift-libs/tree/4.0.0",children:(0,i.jsx)(n.img,{src:"https://img.shields.io/badge/source-eightshift--libs-blue?style=for-the-badge&logo=php&labelColor=2a2a2a",alt:"docs-source"})})}),"\n",(0,i.jsxs)(n.p,{children:["Eightshift Development Kit provides extensive ",(0,i.jsx)(n.a,{href:"https://wp-cli.org/",children:"WP-CLI"})," tooling, allowing you to automate bootstrapping of common code, adding blocks from the Frontend Libs library to your projects and more using ",(0,i.jsx)(n.code,{children:"wp boilerplate"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"how-it-works",children:"How it works"}),"\n",(0,i.jsxs)(n.p,{children:["In your project's entry point (usually ",(0,i.jsx)(n.code,{children:"functions.php"}),"), you'll find something along these lines:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-php",children:"/**\n * Run all WP-CLI commands.\n */\nif (class_exists(Cli::class)) {\n (new Cli())->load('boilerplate');\n}\n"})}),"\n",(0,i.jsxs)(n.p,{children:["This code loads the WP-CLI class from Eightshift Libs, which handles command registration for all of our commands. As this command registration is part of the theme/plugin code, this means that the same theme/plugin ",(0,i.jsx)(n.strong,{children:"must be activated"})," for ",(0,i.jsx)(n.code,{children:"wp boilerplate"})," to work."]}),"\n",(0,i.jsx)(n.p,{children:"To run the WP-CLI command and see what you can use, run this command in your terminal:"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.code,{children:"wp boilerplate --help"})}),"\n",(0,i.jsxs)(n.blockquote,{children:["\n",(0,i.jsxs)(n.p,{children:["By default, your project's WP-CLI commands run under the parent name ",(0,i.jsx)(n.code,{children:"boilerplate"}),", as defined above."]}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"You can change that by simply replacing the string inside the load method like this:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-php",children:"/**\n * Run all WP-CLI commands.\n */\nif (class_exists(Cli::class)) {\n (new Cli())->load('superCoolTheme');\n}\n"})}),"\n",(0,i.jsx)(n.p,{children:"Now, your project's WP-CLI commands are available using:"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"wp superCoolTheme --help"}),"."]}),"\n",(0,i.jsx)(n.p,{children:"This is especially handy when you have multiple Eightshift Boilerplate powered themes or plugins installed. In that case, you should change the WP-CLI parent name on each of the projects."}),"\n",(0,i.jsx)(n.h2,{id:"options-and-commands",children:"Options and commands"}),"\n",(0,i.jsxs)(n.p,{children:["To get to know which commands are available and what do they do, run ",(0,i.jsx)(n.code,{children:"wp boilerplate --help"}),".\nThe ",(0,i.jsx)(n.code,{children:"--help"})," argument is available on all of our commands and provides a description of the command and a list of required and optional parameters for the command."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.code,{children:"wp boilerplate create_config --help"})}),"\n",(0,i.jsx)(n.h3,{id:"commands",children:"Commands"}),"\n",(0,i.jsx)(n.p,{children:"We use these common prefixes for commands:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"create"})," - services classes that will be copied to your project."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"init"})," - additional functions, methods and helpers that will be copied to your project."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"run"})," - commands used to run an action directly from Eightshift Libs. They will not copy anything to your project."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"setup"})," - commands that runs multiple already defined commands from the list."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"use"})," - commands used for blocks and block-related stuff. They will copy various files and folders from the blocks folder to your project."]}),"\n"]}),"\n",(0,i.jsxs)(n.blockquote,{children:["\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"Make WP-CLI your best friend, and your coding life will be much more comfortable, trust us."})}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["While we might go into more details about some of these commands, we won't be documenting all of them here - use the built-in manuals for more information about particular commands and to discover what's available. Don't gloss over them, as using ",(0,i.jsx)(n.code,{children:"wp boilerplate"})," is a particularly useful tool when building projects with Eightshift Development Kit."]}),"\n",(0,i.jsx)(n.h2,{id:"running-commands-in-multisite",children:"Running commands in multisite"}),"\n",(0,i.jsxs)(n.p,{children:["When you are running a multisite setup, you should always provide the additional ",(0,i.jsx)(n.code,{children:"--url"})," parameter. Otherwise, WP-CLI will always run the command on the main site."]}),"\n",(0,i.jsx)(n.p,{children:"Here is an example for command running on the primary site:"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.code,{children:"wp boilerplate create_config"})}),"\n",(0,i.jsx)(n.p,{children:"and here is an example for command running on the subsite:"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.code,{children:"wp boilerplate create_config --url='custom.domain.com'"})})]})}function h(e={}){const{wrapper:n}={...(0,o.a)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},11151:(e,n,s)=>{s.d(n,{Z:()=>r,a:()=>l});var i=s(67294);const o={},t=i.createContext(o);function l(e){const n=i.useContext(t);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:l(e.components),i.createElement(t.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/01980361.8717faba.js b/assets/js/01980361.8717faba.js new file mode 100644 index 000000000..b8fdece6b --- /dev/null +++ b/assets/js/01980361.8717faba.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_eightshift_docs=self.webpackChunk_eightshift_docs||[]).push([[99248],{46097:(e,o,n)=>{n.r(o),n.d(o,{assets:()=>r,contentTitle:()=>l,default:()=>h,frontMatter:()=>i,metadata:()=>a,toc:()=>c});var t=n(85893),s=n(11151);const i={id:"blocks-intro",title:"Intro",sidebar_label:"Intro"},l=void 0,a={id:"legacy/v5/basics/blocks-intro",title:"Intro",description:"docs-source",source:"@site/docs/legacy/v5/basics/blocks-intro.md",sourceDirName:"legacy/v5/basics",slug:"/legacy/v5/basics/blocks-intro",permalink:"/docs/legacy/v5/basics/blocks-intro",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{id:"blocks-intro",title:"Intro",sidebar_label:"Intro"},sidebar:"docs",previous:{title:"Important",permalink:"/docs/legacy/v5/basics/blocks-important"},next:{title:"Registration",permalink:"/docs/legacy/v5/basics/blocks-registration"}},r={},c=[{value:"Why do all my blocks look the same and have the same name structure?",id:"why-do-all-my-blocks-look-the-same-and-have-the-same-name-structure",level:3},{value:"What is the difference between components and blocks?",id:"what-is-the-difference-between-components-and-blocks",level:3},{value:"Do I need to have Storybook stories in my block?",id:"do-i-need-to-have-storybook-stories-in-my-block",level:3},{value:"Do you support block variations, and how can I use them?",id:"do-you-support-block-variations-and-how-can-i-use-them",level:3},{value:"Do you support patterns, and how can I use them?",id:"do-you-support-patterns-and-how-can-i-use-them",level:3},{value:"What is a wrapper?",id:"what-is-a-wrapper",level:3},{value:"Do you support inner blocks?",id:"do-you-support-inner-blocks",level:3},{value:"Why do you use manifest.json in all blocks and components?",id:"why-do-you-use-manifestjson-in-all-blocks-and-components",level:3},{value:"Why do you use global manifest.json?",id:"why-do-you-use-global-manifestjson",level:3},{value:"If I want to create a new block/component, what do I do?",id:"if-i-want-to-create-a-new-blockcomponent-what-do-i-do",level:3},{value:"How can I use your pre-made blocks?",id:"how-can-i-use-your-pre-made-blocks",level:3},{value:"Can I use block/component from Eightshift-frontend-libs directly?",id:"can-i-use-blockcomponent-from-eightshift-frontend-libs-directly",level:3},{value:"I want to change attributes on inner blocks. How do I do it?",id:"i-want-to-change-attributes-on-inner-blocks-how-do-i-do-it",level:3},{value:"Do I need to write JS and PHP implementation for all my blocks?",id:"do-i-need-to-write-js-and-php-implementation-for-all-my-blocks",level:3},{value:"How do I use components in blocks?",id:"how-do-i-use-components-in-blocks",level:3},{value:"How do I use multiple heading components in my block?",id:"how-do-i-use-multiple-heading-components-in-my-block",level:3},{value:"Where can I define my global styles?",id:"where-can-i-define-my-global-styles",level:3},{value:"Where can I define global typography for all my blocks/components?",id:"where-can-i-define-global-typography-for-all-my-blockscomponents",level:3},{value:"Can I make a component with WP_Query logic in it?",id:"can-i-make-a-component-with-wp_query-logic-in-it",level:3},{value:"Do I need to make components for all my blocks?",id:"do-i-need-to-make-components-for-all-my-blocks",level:3},{value:"Will this setup work with full site editing?",id:"will-this-setup-work-with-full-site-editing",level:3},{value:"Can I use core blocks with your setup?",id:"can-i-use-core-blocks-with-your-setup",level:3},{value:"How can I limit my blocklist?",id:"how-can-i-limit-my-blocklist",level:3},{value:"How to allow only one pattern category?",id:"how-to-allow-only-one-pattern-category",level:3},{value:"Can I have blocks in multiple categories?",id:"can-i-have-blocks-in-multiple-categories",level:3},{value:"How can I add a new blocks category?",id:"how-can-i-add-a-new-blocks-category",level:3},{value:"What if you don't yet support something from the native setup? What can I do?",id:"what-if-you-dont-yet-support-something-from-the-native-setup-what-can-i-do",level:3},{value:"Why is my blocks folder called custom and not blocks, for example?",id:"why-is-my-blocks-folder-called-custom-and-not-blocks-for-example",level:3},{value:"In the global manifest, you have a key called \u201ccustomBlocksName\u201d: \u201ceightshift-block\u201d. Can I change this to my-project-name-block?",id:"in-the-global-manifest-you-have-a-key-called-customblocksname-eightshift-block-can-i-change-this-to-my-project-name-block",level:3},{value:"Simple vs Compound blocks",id:"simple-vs-compound-blocks",level:3},{value:"Naming is hard",id:"naming-is-hard",level:3}];function d(e){const o={a:"a",code:"code",em:"em",h3:"h3",img:"img",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.a)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.p,{children:(0,t.jsx)(o.a,{href:"https://github.com/infinum/eightshift-frontend-libs/tree/4.0.0/blocks/init/src/blocks/",children:(0,t.jsx)(o.img,{src:"https://img.shields.io/badge/source-eigthshift--frontend--libs-yellow?style=for-the-badge&logo=javascript&labelColor=2a2a2a",alt:"docs-source"})})}),"\n",(0,t.jsxs)(o.p,{children:["Before we dive into blocks and see how everything is set, we should describe this setup's mindset.\nIf you've managed to set up your project by this point with the ",(0,t.jsx)(o.a,{href:"wp-cli",children:"WP-CLI"})," command ",(0,t.jsx)(o.code,{children:"setup_theme"}),", you might have a few questions. We will try to answer all those questions here."]}),"\n",(0,t.jsx)(o.h3,{id:"why-do-all-my-blocks-look-the-same-and-have-the-same-name-structure",children:"Why do all my blocks look the same and have the same name structure?"}),"\n",(0,t.jsxs)(o.p,{children:["This is so because we defined the name structure for all our blocks and components to load everything automatically. For more information, please check the ",(0,t.jsx)(o.a,{href:"block-structure",children:"block structure"})," and ",(0,t.jsx)(o.a,{href:"blocks-component-structure",children:"component structure"})," chapters."]}),"\n",(0,t.jsx)(o.h3,{id:"what-is-the-difference-between-components-and-blocks",children:"What is the difference between components and blocks?"}),"\n",(0,t.jsxs)(o.p,{children:["The main difference is that blocks are available in the block editor's block picker, and components are not. With that being said, blocks are registered using the ",(0,t.jsx)(o.code,{children:"registerBlockType"})," method, and components are just here for you to bundle some functionality in one place and reuse it wherever you need."]}),"\n",(0,t.jsxs)(o.p,{children:["For more information about blocks, read the ",(0,t.jsx)(o.a,{href:"block-structure",children:"block structure"})," chapter. To find out more about components, read the ",(0,t.jsx)(o.a,{href:"blocks-component-structure",children:"component structure"})," chapter."]}),"\n",(0,t.jsx)(o.h3,{id:"do-i-need-to-have-storybook-stories-in-my-block",children:"Do I need to have Storybook stories in my block?"}),"\n",(0,t.jsx)(o.p,{children:"No, you don't. But we provided you with the ability to use the Storybook for all of your blocks and components. Why not use it? It will speed up your development time. Trust us. \ud83d\ude42"}),"\n",(0,t.jsxs)(o.p,{children:["For more details on how to write stories, check out ",(0,t.jsx)(o.a,{href:"blocks-storybook",children:"this chapter"}),"."]}),"\n",(0,t.jsx)(o.h3,{id:"do-you-support-block-variations-and-how-can-i-use-them",children:"Do you support block variations, and how can I use them?"}),"\n",(0,t.jsxs)(o.p,{children:["Yes, we do. All block variations are located in the ",(0,t.jsx)(o.code,{children:"src/Blocks/variations"})," folder. For more information about this, please check the ",(0,t.jsx)(o.a,{href:"blocks-variations",children:"variations"})," chapter."]}),"\n",(0,t.jsx)(o.h3,{id:"do-you-support-patterns-and-how-can-i-use-them",children:"Do you support patterns, and how can I use them?"}),"\n",(0,t.jsxs)(o.p,{children:["Yes, we do. For more information, please read the ",(0,t.jsx)(o.a,{href:"blocks-patterns",children:"patterns"})," chapter."]}),"\n",(0,t.jsx)(o.h3,{id:"what-is-a-wrapper",children:"What is a wrapper?"}),"\n",(0,t.jsxs)(o.p,{children:["Read about wrappers in ",(0,t.jsx)(o.a,{href:"blocks-wrapper",children:"this chapter"}),"."]}),"\n",(0,t.jsx)(o.h3,{id:"do-you-support-inner-blocks",children:"Do you support inner blocks?"}),"\n",(0,t.jsxs)(o.p,{children:["Yes, we support everything that the core natively supports. You can find more information on how to use them in ",(0,t.jsx)(o.a,{href:"block-manifest",children:"this chapter"}),"."]}),"\n",(0,t.jsx)(o.h3,{id:"why-do-you-use-manifestjson-in-all-blocks-and-components",children:"Why do you use manifest.json in all blocks and components?"}),"\n",(0,t.jsxs)(o.p,{children:["So that we can provide content, attributes, options, and much more across multiple different files in multiple contexts (in both PHP and JS). You can read all about it in ",(0,t.jsx)(o.a,{href:"block-manifest",children:"this chapter"}),"."]}),"\n",(0,t.jsx)(o.h3,{id:"why-do-you-use-global-manifestjson",children:"Why do you use global manifest.json?"}),"\n",(0,t.jsxs)(o.p,{children:["The answer is the same as the previous one. In the global ",(0,t.jsx)(o.code,{children:"manifest.json"}),", we have options that are shared across all blocks and components. Read more about it in ",(0,t.jsx)(o.a,{href:"blocks-global-manifest",children:"this chapter"}),"."]}),"\n",(0,t.jsx)(o.h3,{id:"if-i-want-to-create-a-new-blockcomponent-what-do-i-do",children:"If I want to create a new block/component, what do I do?"}),"\n",(0,t.jsxs)(o.p,{children:["In your terminal, write ",(0,t.jsx)(o.code,{children:"wp boilerplate use_block --name=example"})," and style that block however you seem fit."]}),"\n",(0,t.jsx)(o.h3,{id:"how-can-i-use-your-pre-made-blocks",children:"How can I use your pre-made blocks?"}),"\n",(0,t.jsxs)(o.p,{children:["You can check all available blocks/components using our ",(0,t.jsx)(o.code,{children:"wp boilerplate use_block --help"})," or ",(0,t.jsx)(o.code,{children:"wp boilerplate use_component --help"})," command."]}),"\n",(0,t.jsx)(o.h3,{id:"can-i-use-blockcomponent-from-eightshift-frontend-libs-directly",children:"Can I use block/component from Eightshift-frontend-libs directly?"}),"\n",(0,t.jsxs)(o.p,{children:["It depends. You can't use things from the blocks folder like ",(0,t.jsx)(o.code,{children:"components"}),", ",(0,t.jsx)(o.code,{children:"custom"}),", ",(0,t.jsx)(o.code,{children:"variations"}),", ",(0,t.jsx)(o.code,{children:"wrapper"}),", etc. They are meant to be copied to your project, styled, and changed depending on your project's needs."]}),"\n",(0,t.jsxs)(o.p,{children:["You can move things from a block to your project using the commands described in ",(0,t.jsx)(o.a,{href:"blocks-intro#how-can-i-use-your-pre-made-blocks",children:"this chapter"}),"."]}),"\n",(0,t.jsx)(o.h3,{id:"i-want-to-change-attributes-on-inner-blocks-how-do-i-do-it",children:"I want to change attributes on inner blocks. How do I do it?"}),"\n",(0,t.jsxs)(o.p,{children:["We described how attributes are used and combined in ",(0,t.jsx)(o.a,{href:"blocks-attributes",children:"this chapter"})," and ",(0,t.jsx)(o.a,{href:"blocks-component-in-block",children:"this chapter"}),"."]}),"\n",(0,t.jsx)(o.h3,{id:"do-i-need-to-write-js-and-php-implementation-for-all-my-blocks",children:"Do I need to write JS and PHP implementation for all my blocks?"}),"\n",(0,t.jsx)(o.p,{children:"For a block, you must provide the JS and PHP implementations because it won't work without them."}),"\n",(0,t.jsx)(o.p,{children:"For components, if you are not using the JS part, you don't need to write one, but we recommend you do so because the JS part is used in Storybook."}),"\n",(0,t.jsxs)(o.p,{children:["If you have a more advanced block and don't benefit from writing the JS implementation of the block, you can always use the ",(0,t.jsx)(o.a,{href:"https://developer.wordpress.org/block-editor/packages/packages-server-side-render/",children:"ServerSideRender component"})," form the core. If you have no inputs in the editor from the admin, there is no need to write JS implementation of the block. Just use ",(0,t.jsx)(o.code,{children:"ServerSideRender"})," component in that case."]}),"\n",(0,t.jsx)(o.h3,{id:"how-do-i-use-components-in-blocks",children:"How do I use components in blocks?"}),"\n",(0,t.jsxs)(o.p,{children:["Please check out ",(0,t.jsx)(o.a,{href:"blocks-component-in-block",children:"this chapter"})," for more information."]}),"\n",(0,t.jsx)(o.h3,{id:"how-do-i-use-multiple-heading-components-in-my-block",children:"How do I use multiple heading components in my block?"}),"\n",(0,t.jsxs)(o.p,{children:["You can follow the instructions given in ",(0,t.jsx)(o.a,{href:"blocks-component-in-block",children:"this chapter"}),"."]}),"\n",(0,t.jsx)(o.h3,{id:"where-can-i-define-my-global-styles",children:"Where can I define my global styles?"}),"\n",(0,t.jsxs)(o.p,{children:["You can follow the instructions given in ",(0,t.jsx)(o.a,{href:"writing-styles",children:"this chapter"}),"."]}),"\n",(0,t.jsx)(o.h3,{id:"where-can-i-define-global-typography-for-all-my-blockscomponents",children:"Where can I define global typography for all my blocks/components?"}),"\n",(0,t.jsxs)(o.p,{children:["You can follow the instructions given in ",(0,t.jsx)(o.a,{href:"writing-styles",children:"this chapter"}),"."]}),"\n",(0,t.jsx)(o.h3,{id:"can-i-make-a-component-with-wp_query-logic-in-it",children:"Can I make a component with WP_Query logic in it?"}),"\n",(0,t.jsx)(o.p,{children:"Yes, you can, but think of the component as a dumb and simple piece of code that should not hold any business logic. A component should only be used as a view. If you need to write WP_Query logic, you can do that in a block and just pass the data to your component as props."}),"\n",(0,t.jsx)(o.h3,{id:"do-i-need-to-make-components-for-all-my-blocks",children:"Do I need to make components for all my blocks?"}),"\n",(0,t.jsx)(o.p,{children:"No, it might look like that from the examples provided, but that is not the case. You should create components depending on your needs."}),"\n",(0,t.jsx)(o.p,{children:"Ask yourself, will I reuse this functionality anywhere else?"}),"\n",(0,t.jsxs)(o.ul,{children:["\n",(0,t.jsxs)(o.li,{children:["If the answer is ",(0,t.jsx)(o.strong,{children:"yes"}),", create a component."]}),"\n",(0,t.jsxs)(o.li,{children:["If the answer is ",(0,t.jsx)(o.strong,{children:"no"}),", don't create a component."]}),"\n"]}),"\n",(0,t.jsx)(o.p,{children:"Our recommendation is not to burden yourself with components from the beginning. Start creating blocks and, if you find yourself in need of code that you already wrote, just extract it in a component."}),"\n",(0,t.jsx)(o.h3,{id:"will-this-setup-work-with-full-site-editing",children:"Will this setup work with full site editing?"}),"\n",(0,t.jsx)(o.p,{children:"Yes, it will. We are constantly upgrading this documentation and our code to say that it will work with full site editing. This boilerplate was made for the Infinum/Eightshift WordPress team, so we are constantly using it in our projects."}),"\n",(0,t.jsx)(o.h3,{id:"can-i-use-core-blocks-with-your-setup",children:"Can I use core blocks with your setup?"}),"\n",(0,t.jsx)(o.p,{children:"Yes, you can. We are working on the ability to override core blocks in our smart way. Until we make this work, you can use everything that is already defined in the core documentation."}),"\n",(0,t.jsx)(o.p,{children:"We avoid using core blocks because they add different class naming and additional markup that makes it harder to style things."}),"\n",(0,t.jsx)(o.p,{children:"Also, they are prone to breaking changes every several months, so we prefer to write our own implementation."}),"\n",(0,t.jsx)(o.h3,{id:"how-can-i-limit-my-blocklist",children:"How can I limit my blocklist?"}),"\n",(0,t.jsxs)(o.p,{children:["Easy. We have a method you can extend that limits your project's block to the only block from your project. You should put this filter in your project's ",(0,t.jsx)(o.code,{children:"src/Blocks/Blocks.php"})," file under the ",(0,t.jsx)(o.code,{children:"register"})," method:"]}),"\n",(0,t.jsx)(o.pre,{children:(0,t.jsx)(o.code,{className:"language-php",children:" // Limits the usage of only custom project blocks.\n add_filter('allowed_block_types', [ $this, 'getAllBlocksList' ], 10, 2);\n"})}),"\n",(0,t.jsx)(o.h3,{id:"how-to-allow-only-one-pattern-category",children:"How to allow only one pattern category?"}),"\n",(0,t.jsx)(o.p,{children:(0,t.jsx)(o.em,{children:"Coming soon"})}),"\n",(0,t.jsx)(o.h3,{id:"can-i-have-blocks-in-multiple-categories",children:"Can I have blocks in multiple categories?"}),"\n",(0,t.jsxs)(o.p,{children:["In your block manifest, you can define in what category your block will appear. You can create a new category for your project or use our category. We created our category called ",(0,t.jsx)(o.code,{children:"eightshift"})," using this filter:"]}),"\n",(0,t.jsx)(o.pre,{children:(0,t.jsx)(o.code,{className:"language-php",children:" // Create a new custom category for custom blocks.\n add_filter('block_categories', [ $this, 'getCustomCategory' ]);\n"})}),"\n",(0,t.jsx)(o.h3,{id:"how-can-i-add-a-new-blocks-category",children:"How can I add a new blocks category?"}),"\n",(0,t.jsx)(o.p,{children:"You can provide your implementation, or you can extend our method for registering a custom category. Here is how you do it:"}),"\n",(0,t.jsx)(o.pre,{children:(0,t.jsx)(o.code,{className:"language-php",children:" /**\n * Register all the hooks\n *\n * @return void\n */\npublic function register(): void\n{\n // Create a new custom category for custom blocks.\n add_filter('block_categories', [ $this, 'getCustomCategory' ]);\n}\n\n /**\n * Create a custom category to assign all custom blocks\n *\n * This category will be shown on all blocks list in the \"Add Block\" button.\n *\n * @param array[] $categories Array of all block categories.\n * @param \\WP_Post $post Post being loaded.\n *\n * @return array[] Array of block categories.\n */\npublic function getCustomCategory(array $categories, \\WP_Post $post): array\n{\n return array_merge(\n parent::getCustomCategory($categories, $post),\n [\n [\n 'slug' => 'custom-category-name',\n 'title' => \\esc_html__('Custom Category', 'project-text-domain'),\n 'icon' => 'admin-settings',\n ],\n ]\n );\n}\n"})}),"\n",(0,t.jsx)(o.h3,{id:"what-if-you-dont-yet-support-something-from-the-native-setup-what-can-i-do",children:"What if you don't yet support something from the native setup? What can I do?"}),"\n",(0,t.jsxs)(o.p,{children:["As we described in ",(0,t.jsx)(o.a,{href:"blocks",children:"this chapter"}),", if we don't support something natively from the core or you can't find it in this documentation, you can always use it in the normal native way from the ",(0,t.jsx)(o.a,{href:"https://developer.wordpress.org/block-editor/tutorials/block-tutorial/",children:"WordPress documentation"}),". Also, if you think we are missing something, please open a ",(0,t.jsx)(o.a,{href:"https://github.com/infinum/eightshift-frontend-libs/pulls",children:"pull request"})," or an ",(0,t.jsx)(o.a,{href:"https://github.com/infinum/eightshift-frontend-libs/issues",children:"issue"})," on our GitHub repository."]}),"\n",(0,t.jsxs)(o.h3,{id:"why-is-my-blocks-folder-called-custom-and-not-blocks-for-example",children:["Why is my blocks folder called ",(0,t.jsx)(o.code,{children:"custom"})," and not ",(0,t.jsx)(o.code,{children:"blocks"}),", for example?"]}),"\n",(0,t.jsx)(o.p,{children:"The idea was to put all your custom blocks inside the custom folder and all core block in the core folder. This boilerplate is not designed only for your custom block, but you can use it as an ultimate block setup."}),"\n",(0,t.jsxs)(o.p,{children:["And folder structure ",(0,t.jsx)(o.code,{children:"src/Blocks/blocks"})," is kind of weird."]}),"\n",(0,t.jsx)(o.h3,{id:"in-the-global-manifest-you-have-a-key-called-customblocksname-eightshift-block-can-i-change-this-to-my-project-name-block",children:"In the global manifest, you have a key called \u201ccustomBlocksName\u201d: \u201ceightshift-block\u201d. Can I change this to my-project-name-block?"}),"\n",(0,t.jsx)(o.p,{children:"You can, but you shouldn't. We use this key to provide the CSS selectors on all our custom blocks in the block editor. Additional styles are added to this selector for the wrapper to work on full width and remove some of the native block editor styles."}),"\n",(0,t.jsx)(o.p,{children:"So don't remove or change this \ud83d\ude05."}),"\n",(0,t.jsx)(o.h3,{id:"simple-vs-compound-blocks",children:"Simple vs Compound blocks"}),"\n",(0,t.jsx)(o.p,{children:"In a nutshell, there is no difference between blocks. The WordPress core block is a block, but we like to make a distinction between what is simple and what is a compound block."}),"\n",(0,t.jsxs)(o.p,{children:[(0,t.jsx)(o.strong,{children:"Simple block"})," is a block that is used just as is and provides a small isolated functionality. For example: heading, paragraph, button, etc."]}),"\n",(0,t.jsxs)(o.p,{children:[(0,t.jsx)(o.strong,{children:"Compound block"})," is a block built from multiple components. For example: card, featured posts, etc"]}),"\n",(0,t.jsx)(o.h3,{id:"naming-is-hard",children:"Naming is hard"}),"\n",(0,t.jsx)(o.p,{children:(0,t.jsx)(o.em,{children:"There are only two hard things in Computer Science: cache invalidation and naming things. - Phil Karlton"})}),"\n",(0,t.jsx)(o.p,{children:"Yes, naming is hard, and no matter how long your development experience is you will always struggle with names for your components, block, files, variables, functions, etc."}),"\n",(0,t.jsx)(o.p,{children:"Here are some of our recommendations to ease your pain:"}),"\n",(0,t.jsxs)(o.ul,{children:["\n",(0,t.jsxs)(o.li,{children:["Always try to name your block based on ",(0,t.jsx)(o.strong,{children:"what they are"}),", rather than ",(0,t.jsx)(o.strong,{children:"what they will be used for"}),". For example, if you have a component card for custom post-type ",(0,t.jsx)(o.code,{children:"books"}),", you should never call this component ",(0,t.jsx)(o.code,{children:"card-book"}),". Instead, use a more generic name like ",(0,t.jsx)(o.code,{children:"card-product"}),"."]}),"\n",(0,t.jsx)(o.li,{children:"Make your names as generic as possible for better reusability, but specific enough to fully understand what the block/component is used for."}),"\n",(0,t.jsx)(o.li,{children:"Always think about the future. How can this feature be used in some other way?"}),"\n",(0,t.jsxs)(o.li,{children:['When naming your attributes ask yourself: "is this attribute going to be used in any other way?". For example, you have an attribute for adding font-weight: bold to your text. You can create an attribute called font-weight and set it as a ',(0,t.jsx)(o.code,{children:"boolean"})," type and that will be ok if you have only one font-weight. A better way would be to put it as a string and provide a ",(0,t.jsx)(o.code,{children:"SelectControl"})," component if there is any possibility that in the future you will have additional font-weight."]}),"\n",(0,t.jsxs)(o.li,{children:["Name booleans positively as a question. Example: ",(0,t.jsx)(o.code,{children:"isValid"}),", ",(0,t.jsx)(o.code,{children:"isLoading"}),", ",(0,t.jsx)(o.code,{children:"isComplete"}),"."]}),"\n",(0,t.jsx)(o.li,{children:"Don\u2019t hesitate to use longer names."}),"\n",(0,t.jsx)(o.li,{children:"Use singular names."}),"\n",(0,t.jsx)(o.li,{children:"The variables or functions should be named by their work: Name of variables/functions should always try to express their meaning without diving into the code base try to pack meaningful information inside the name."}),"\n",(0,t.jsx)(o.li,{children:"Naming should be simple enough to be understood by everyone: Using complex words to describe a simple thing only creates hassle while reading the code. Also, use simple English."}),"\n",(0,t.jsx)(o.li,{children:"You might not be the only person working on your particular project in the future. Think about the next person. Your naming will provide an insight into the process and project."}),"\n",(0,t.jsxs)(o.li,{children:[(0,t.jsx)(o.strong,{children:"BE CONSISTENT"}),"."]}),"\n"]})]})}function h(e={}){const{wrapper:o}={...(0,s.a)(),...e.components};return o?(0,t.jsx)(o,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}},11151:(e,o,n)=>{n.d(o,{Z:()=>a,a:()=>l});var t=n(67294);const s={},i=t.createContext(s);function l(e){const o=t.useContext(i);return t.useMemo((function(){return"function"==typeof e?e(o):{...o,...e}}),[o,e])}function a(e){let o;return o=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:l(e.components),t.createElement(i.Provider,{value:o},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/01980361.e1f2c7a0.js b/assets/js/01980361.e1f2c7a0.js deleted file mode 100644 index e7551d63b..000000000 --- a/assets/js/01980361.e1f2c7a0.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_eightshift_docs=self.webpackChunk_eightshift_docs||[]).push([[99248],{3905:function(e,t,o){o.d(t,{Zo:function(){return u},kt:function(){return m}});var n=o(67294);function a(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function i(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function l(e){for(var t=1;t=0||(a[o]=e[o]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(a[o]=e[o])}return a}var s=n.createContext({}),c=function(e){var t=n.useContext(s),o=t;return e&&(o="function"==typeof e?e(t):l(l({},t),e)),o},u=function(e){var t=c(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},h=n.forwardRef((function(e,t){var o=e.components,a=e.mdxType,i=e.originalType,s=e.parentName,u=r(e,["components","mdxType","originalType","parentName"]),p=c(o),h=a,m=p["".concat(s,".").concat(h)]||p[h]||d[h]||i;return o?n.createElement(m,l(l({ref:t},u),{},{components:o})):n.createElement(m,l({ref:t},u))}));function m(e,t){var o=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=o.length,l=new Array(i);l[0]=h;var r={};for(var s in t)hasOwnProperty.call(t,s)&&(r[s]=t[s]);r.originalType=e,r[p]="string"==typeof e?e:a,l[1]=r;for(var c=2;ccustom and not blocks, for example?",id:"why-is-my-blocks-folder-called-custom-and-not-blocks-for-example",level:3},{value:"In the global manifest, you have a key called \u201ccustomBlocksName\u201d: \u201ceightshift-block\u201d. Can I change this to my-project-name-block?",id:"in-the-global-manifest-you-have-a-key-called-customblocksname-eightshift-block-can-i-change-this-to-my-project-name-block",level:3},{value:"Simple vs Compound blocks",id:"simple-vs-compound-blocks",level:3},{value:"Naming is hard",id:"naming-is-hard",level:3}],d={toc:p},h="wrapper";function m(e){var t=e.components,o=(0,a.Z)(e,l);return(0,i.kt)(h,(0,n.Z)({},d,o,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,(0,i.kt)("a",{parentName:"p",href:"https://github.com/infinum/eightshift-frontend-libs/tree/4.0.0/blocks/init/src/blocks/"},(0,i.kt)("img",{parentName:"a",src:"https://img.shields.io/badge/source-eigthshift--frontend--libs-yellow?style=for-the-badge&logo=javascript&labelColor=2a2a2a",alt:"docs-source"}))),(0,i.kt)("p",null,"Before we dive into blocks and see how everything is set, we should describe this setup's mindset.\nIf you've managed to set up your project by this point with the ",(0,i.kt)("a",{parentName:"p",href:"wp-cli"},"WP-CLI")," command ",(0,i.kt)("inlineCode",{parentName:"p"},"setup_theme"),", you might have a few questions. We will try to answer all those questions here."),(0,i.kt)("h3",{id:"why-do-all-my-blocks-look-the-same-and-have-the-same-name-structure"},"Why do all my blocks look the same and have the same name structure?"),(0,i.kt)("p",null,"This is so because we defined the name structure for all our blocks and components to load everything automatically. For more information, please check the ",(0,i.kt)("a",{parentName:"p",href:"block-structure"},"block structure")," and ",(0,i.kt)("a",{parentName:"p",href:"blocks-component-structure"},"component structure")," chapters."),(0,i.kt)("h3",{id:"what-is-the-difference-between-components-and-blocks"},"What is the difference between components and blocks?"),(0,i.kt)("p",null,"The main difference is that blocks are available in the block editor's block picker, and components are not. With that being said, blocks are registered using the ",(0,i.kt)("inlineCode",{parentName:"p"},"registerBlockType")," method, and components are just here for you to bundle some functionality in one place and reuse it wherever you need."),(0,i.kt)("p",null,"For more information about blocks, read the ",(0,i.kt)("a",{parentName:"p",href:"block-structure"},"block structure")," chapter. To find out more about components, read the ",(0,i.kt)("a",{parentName:"p",href:"blocks-component-structure"},"component structure")," chapter."),(0,i.kt)("h3",{id:"do-i-need-to-have-storybook-stories-in-my-block"},"Do I need to have Storybook stories in my block?"),(0,i.kt)("p",null,"No, you don't. But we provided you with the ability to use the Storybook for all of your blocks and components. Why not use it? It will speed up your development time. Trust us. \ud83d\ude42"),(0,i.kt)("p",null,"For more details on how to write stories, check out ",(0,i.kt)("a",{parentName:"p",href:"blocks-storybook"},"this chapter"),"."),(0,i.kt)("h3",{id:"do-you-support-block-variations-and-how-can-i-use-them"},"Do you support block variations, and how can I use them?"),(0,i.kt)("p",null,"Yes, we do. All block variations are located in the ",(0,i.kt)("inlineCode",{parentName:"p"},"src/Blocks/variations")," folder. For more information about this, please check the ",(0,i.kt)("a",{parentName:"p",href:"blocks-variations"},"variations")," chapter."),(0,i.kt)("h3",{id:"do-you-support-patterns-and-how-can-i-use-them"},"Do you support patterns, and how can I use them?"),(0,i.kt)("p",null,"Yes, we do. For more information, please read the ",(0,i.kt)("a",{parentName:"p",href:"blocks-patterns"},"patterns")," chapter."),(0,i.kt)("h3",{id:"what-is-a-wrapper"},"What is a wrapper?"),(0,i.kt)("p",null,"Read about wrappers in ",(0,i.kt)("a",{parentName:"p",href:"blocks-wrapper"},"this chapter"),"."),(0,i.kt)("h3",{id:"do-you-support-inner-blocks"},"Do you support inner blocks?"),(0,i.kt)("p",null,"Yes, we support everything that the core natively supports. You can find more information on how to use them in ",(0,i.kt)("a",{parentName:"p",href:"block-manifest"},"this chapter"),"."),(0,i.kt)("h3",{id:"why-do-you-use-manifestjson-in-all-blocks-and-components"},"Why do you use manifest.json in all blocks and components?"),(0,i.kt)("p",null,"So that we can provide content, attributes, options, and much more across multiple different files in multiple contexts (in both PHP and JS). You can read all about it in ",(0,i.kt)("a",{parentName:"p",href:"block-manifest"},"this chapter"),"."),(0,i.kt)("h3",{id:"why-do-you-use-global-manifestjson"},"Why do you use global manifest.json?"),(0,i.kt)("p",null,"The answer is the same as the previous one. In the global ",(0,i.kt)("inlineCode",{parentName:"p"},"manifest.json"),", we have options that are shared across all blocks and components. Read more about it in ",(0,i.kt)("a",{parentName:"p",href:"blocks-global-manifest"},"this chapter"),"."),(0,i.kt)("h3",{id:"if-i-want-to-create-a-new-blockcomponent-what-do-i-do"},"If I want to create a new block/component, what do I do?"),(0,i.kt)("p",null,"In your terminal, write ",(0,i.kt)("inlineCode",{parentName:"p"},"wp boilerplate use_block --name=example")," and style that block however you seem fit."),(0,i.kt)("h3",{id:"how-can-i-use-your-pre-made-blocks"},"How can I use your pre-made blocks?"),(0,i.kt)("p",null,"You can check all available blocks/components using our ",(0,i.kt)("inlineCode",{parentName:"p"},"wp boilerplate use_block --help")," or ",(0,i.kt)("inlineCode",{parentName:"p"},"wp boilerplate use_component --help")," command."),(0,i.kt)("h3",{id:"can-i-use-blockcomponent-from-eightshift-frontend-libs-directly"},"Can I use block/component from Eightshift-frontend-libs directly?"),(0,i.kt)("p",null,"It depends. You can't use things from the blocks folder like ",(0,i.kt)("inlineCode",{parentName:"p"},"components"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"custom"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"variations"),", ",(0,i.kt)("inlineCode",{parentName:"p"},"wrapper"),", etc. They are meant to be copied to your project, styled, and changed depending on your project's needs."),(0,i.kt)("p",null,"You can move things from a block to your project using the commands described in ",(0,i.kt)("a",{parentName:"p",href:"blocks-intro#how-can-i-use-your-pre-made-blocks"},"this chapter"),"."),(0,i.kt)("h3",{id:"i-want-to-change-attributes-on-inner-blocks-how-do-i-do-it"},"I want to change attributes on inner blocks. How do I do it?"),(0,i.kt)("p",null,"We described how attributes are used and combined in ",(0,i.kt)("a",{parentName:"p",href:"blocks-attributes"},"this chapter")," and ",(0,i.kt)("a",{parentName:"p",href:"blocks-component-in-block"},"this chapter"),"."),(0,i.kt)("h3",{id:"do-i-need-to-write-js-and-php-implementation-for-all-my-blocks"},"Do I need to write JS and PHP implementation for all my blocks?"),(0,i.kt)("p",null,"For a block, you must provide the JS and PHP implementations because it won't work without them."),(0,i.kt)("p",null,"For components, if you are not using the JS part, you don't need to write one, but we recommend you do so because the JS part is used in Storybook."),(0,i.kt)("p",null,"If you have a more advanced block and don't benefit from writing the JS implementation of the block, you can always use the ",(0,i.kt)("a",{parentName:"p",href:"https://developer.wordpress.org/block-editor/packages/packages-server-side-render/"},"ServerSideRender component")," form the core. If you have no inputs in the editor from the admin, there is no need to write JS implementation of the block. Just use ",(0,i.kt)("inlineCode",{parentName:"p"},"ServerSideRender")," component in that case."),(0,i.kt)("h3",{id:"how-do-i-use-components-in-blocks"},"How do I use components in blocks?"),(0,i.kt)("p",null,"Please check out ",(0,i.kt)("a",{parentName:"p",href:"blocks-component-in-block"},"this chapter")," for more information."),(0,i.kt)("h3",{id:"how-do-i-use-multiple-heading-components-in-my-block"},"How do I use multiple heading components in my block?"),(0,i.kt)("p",null,"You can follow the instructions given in ",(0,i.kt)("a",{parentName:"p",href:"blocks-component-in-block"},"this chapter"),"."),(0,i.kt)("h3",{id:"where-can-i-define-my-global-styles"},"Where can I define my global styles?"),(0,i.kt)("p",null,"You can follow the instructions given in ",(0,i.kt)("a",{parentName:"p",href:"writing-styles"},"this chapter"),"."),(0,i.kt)("h3",{id:"where-can-i-define-global-typography-for-all-my-blockscomponents"},"Where can I define global typography for all my blocks/components?"),(0,i.kt)("p",null,"You can follow the instructions given in ",(0,i.kt)("a",{parentName:"p",href:"writing-styles"},"this chapter"),"."),(0,i.kt)("h3",{id:"can-i-make-a-component-with-wp_query-logic-in-it"},"Can I make a component with WP_Query logic in it?"),(0,i.kt)("p",null,"Yes, you can, but think of the component as a dumb and simple piece of code that should not hold any business logic. A component should only be used as a view. If you need to write WP_Query logic, you can do that in a block and just pass the data to your component as props."),(0,i.kt)("h3",{id:"do-i-need-to-make-components-for-all-my-blocks"},"Do I need to make components for all my blocks?"),(0,i.kt)("p",null,"No, it might look like that from the examples provided, but that is not the case. You should create components depending on your needs."),(0,i.kt)("p",null,"Ask yourself, will I reuse this functionality anywhere else?"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"If the answer is ",(0,i.kt)("strong",{parentName:"li"},"yes"),", create a component."),(0,i.kt)("li",{parentName:"ul"},"If the answer is ",(0,i.kt)("strong",{parentName:"li"},"no"),", don't create a component.")),(0,i.kt)("p",null,"Our recommendation is not to burden yourself with components from the beginning. Start creating blocks and, if you find yourself in need of code that you already wrote, just extract it in a component."),(0,i.kt)("h3",{id:"will-this-setup-work-with-full-site-editing"},"Will this setup work with full site editing?"),(0,i.kt)("p",null,"Yes, it will. We are constantly upgrading this documentation and our code to say that it will work with full site editing. This boilerplate was made for the Infinum/Eightshift WordPress team, so we are constantly using it in our projects."),(0,i.kt)("h3",{id:"can-i-use-core-blocks-with-your-setup"},"Can I use core blocks with your setup?"),(0,i.kt)("p",null,"Yes, you can. We are working on the ability to override core blocks in our smart way. Until we make this work, you can use everything that is already defined in the core documentation."),(0,i.kt)("p",null,"We avoid using core blocks because they add different class naming and additional markup that makes it harder to style things."),(0,i.kt)("p",null,"Also, they are prone to breaking changes every several months, so we prefer to write our own implementation."),(0,i.kt)("h3",{id:"how-can-i-limit-my-blocklist"},"How can I limit my blocklist?"),(0,i.kt)("p",null,"Easy. We have a method you can extend that limits your project's block to the only block from your project. You should put this filter in your project's ",(0,i.kt)("inlineCode",{parentName:"p"},"src/Blocks/Blocks.php")," file under the ",(0,i.kt)("inlineCode",{parentName:"p"},"register")," method:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-php"}," // Limits the usage of only custom project blocks.\n add_filter('allowed_block_types', [ $this, 'getAllBlocksList' ], 10, 2);\n")),(0,i.kt)("h3",{id:"how-to-allow-only-one-pattern-category"},"How to allow only one pattern category?"),(0,i.kt)("p",null,(0,i.kt)("em",{parentName:"p"},"Coming soon")),(0,i.kt)("h3",{id:"can-i-have-blocks-in-multiple-categories"},"Can I have blocks in multiple categories?"),(0,i.kt)("p",null,"In your block manifest, you can define in what category your block will appear. You can create a new category for your project or use our category. We created our category called ",(0,i.kt)("inlineCode",{parentName:"p"},"eightshift")," using this filter:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-php"}," // Create a new custom category for custom blocks.\n add_filter('block_categories', [ $this, 'getCustomCategory' ]);\n")),(0,i.kt)("h3",{id:"how-can-i-add-a-new-blocks-category"},"How can I add a new blocks category?"),(0,i.kt)("p",null,"You can provide your implementation, or you can extend our method for registering a custom category. Here is how you do it:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-php"}," /**\n * Register all the hooks\n *\n * @return void\n */\npublic function register(): void\n{\n // Create a new custom category for custom blocks.\n add_filter('block_categories', [ $this, 'getCustomCategory' ]);\n}\n\n /**\n * Create a custom category to assign all custom blocks\n *\n * This category will be shown on all blocks list in the \"Add Block\" button.\n *\n * @param array[] $categories Array of all block categories.\n * @param \\WP_Post $post Post being loaded.\n *\n * @return array[] Array of block categories.\n */\npublic function getCustomCategory(array $categories, \\WP_Post $post): array\n{\n return array_merge(\n parent::getCustomCategory($categories, $post),\n [\n [\n 'slug' => 'custom-category-name',\n 'title' => \\esc_html__('Custom Category', 'project-text-domain'),\n 'icon' => 'admin-settings',\n ],\n ]\n );\n}\n")),(0,i.kt)("h3",{id:"what-if-you-dont-yet-support-something-from-the-native-setup-what-can-i-do"},"What if you don't yet support something from the native setup? What can I do?"),(0,i.kt)("p",null,"As we described in ",(0,i.kt)("a",{parentName:"p",href:"blocks"},"this chapter"),", if we don't support something natively from the core or you can't find it in this documentation, you can always use it in the normal native way from the ",(0,i.kt)("a",{parentName:"p",href:"https://developer.wordpress.org/block-editor/tutorials/block-tutorial/"},"WordPress documentation"),". Also, if you think we are missing something, please open a ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/infinum/eightshift-frontend-libs/pulls"},"pull request")," or an ",(0,i.kt)("a",{parentName:"p",href:"https://github.com/infinum/eightshift-frontend-libs/issues"},"issue")," on our GitHub repository."),(0,i.kt)("h3",{id:"why-is-my-blocks-folder-called-custom-and-not-blocks-for-example"},"Why is my blocks folder called ",(0,i.kt)("inlineCode",{parentName:"h3"},"custom")," and not ",(0,i.kt)("inlineCode",{parentName:"h3"},"blocks"),", for example?"),(0,i.kt)("p",null,"The idea was to put all your custom blocks inside the custom folder and all core block in the core folder. This boilerplate is not designed only for your custom block, but you can use it as an ultimate block setup."),(0,i.kt)("p",null,"And folder structure ",(0,i.kt)("inlineCode",{parentName:"p"},"src/Blocks/blocks")," is kind of weird."),(0,i.kt)("h3",{id:"in-the-global-manifest-you-have-a-key-called-customblocksname-eightshift-block-can-i-change-this-to-my-project-name-block"},"In the global manifest, you have a key called \u201ccustomBlocksName\u201d: \u201ceightshift-block\u201d. Can I change this to my-project-name-block?"),(0,i.kt)("p",null,"You can, but you shouldn't. We use this key to provide the CSS selectors on all our custom blocks in the block editor. Additional styles are added to this selector for the wrapper to work on full width and remove some of the native block editor styles."),(0,i.kt)("p",null,"So don't remove or change this \ud83d\ude05."),(0,i.kt)("h3",{id:"simple-vs-compound-blocks"},"Simple vs Compound blocks"),(0,i.kt)("p",null,"In a nutshell, there is no difference between blocks. The WordPress core block is a block, but we like to make a distinction between what is simple and what is a compound block."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Simple block")," is a block that is used just as is and provides a small isolated functionality. For example: heading, paragraph, button, etc."),(0,i.kt)("p",null,(0,i.kt)("strong",{parentName:"p"},"Compound block")," is a block built from multiple components. For example: card, featured posts, etc"),(0,i.kt)("h3",{id:"naming-is-hard"},"Naming is hard"),(0,i.kt)("p",null,(0,i.kt)("em",{parentName:"p"},"There are only two hard things in Computer Science: cache invalidation and naming things. - Phil Karlton")),(0,i.kt)("p",null,"Yes, naming is hard, and no matter how long your development experience is you will always struggle with names for your components, block, files, variables, functions, etc."),(0,i.kt)("p",null,"Here are some of our recommendations to ease your pain:"),(0,i.kt)("ul",null,(0,i.kt)("li",{parentName:"ul"},"Always try to name your block based on ",(0,i.kt)("strong",{parentName:"li"},"what they are"),", rather than ",(0,i.kt)("strong",{parentName:"li"},"what they will be used for"),". For example, if you have a component card for custom post-type ",(0,i.kt)("inlineCode",{parentName:"li"},"books"),", you should never call this component ",(0,i.kt)("inlineCode",{parentName:"li"},"card-book"),". Instead, use a more generic name like ",(0,i.kt)("inlineCode",{parentName:"li"},"card-product"),"."),(0,i.kt)("li",{parentName:"ul"},"Make your names as generic as possible for better reusability, but specific enough to fully understand what the block/component is used for."),(0,i.kt)("li",{parentName:"ul"},"Always think about the future. How can this feature be used in some other way?"),(0,i.kt)("li",{parentName:"ul"},'When naming your attributes ask yourself: "is this attribute going to be used in any other way?". For example, you have an attribute for adding font-weight: bold to your text. You can create an attribute called font-weight and set it as a ',(0,i.kt)("inlineCode",{parentName:"li"},"boolean")," type and that will be ok if you have only one font-weight. A better way would be to put it as a string and provide a ",(0,i.kt)("inlineCode",{parentName:"li"},"SelectControl")," component if there is any possibility that in the future you will have additional font-weight."),(0,i.kt)("li",{parentName:"ul"},"Name booleans positively as a question. Example: ",(0,i.kt)("inlineCode",{parentName:"li"},"isValid"),", ",(0,i.kt)("inlineCode",{parentName:"li"},"isLoading"),", ",(0,i.kt)("inlineCode",{parentName:"li"},"isComplete"),"."),(0,i.kt)("li",{parentName:"ul"},"Don\u2019t hesitate to use longer names."),(0,i.kt)("li",{parentName:"ul"},"Use singular names."),(0,i.kt)("li",{parentName:"ul"},"The variables or functions should be named by their work: Name of variables/functions should always try to express their meaning without diving into the code base try to pack meaningful information inside the name."),(0,i.kt)("li",{parentName:"ul"},"Naming should be simple enough to be understood by everyone: Using complex words to describe a simple thing only creates hassle while reading the code. Also, use simple English."),(0,i.kt)("li",{parentName:"ul"},"You might not be the only person working on your particular project in the future. Think about the next person. Your naming will provide an insight into the process and project."),(0,i.kt)("li",{parentName:"ul"},(0,i.kt)("strong",{parentName:"li"},"BE CONSISTENT"),".")))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/01a85c17.1298b4f5.js b/assets/js/01a85c17.1298b4f5.js deleted file mode 100644 index 75dc536c9..000000000 --- a/assets/js/01a85c17.1298b4f5.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_eightshift_docs=self.webpackChunk_eightshift_docs||[]).push([[64013],{39058:function(e,t,a){a.d(t,{Z:function(){return p}});var r=a(63366),n=a(67294),l=a(86010),i=a(16787),s=a(87524),c=a(39960),m=a(95999),o={sidebar:"sidebar_re4s",sidebarItemTitle:"sidebarItemTitle_pO2u",sidebarItemList:"sidebarItemList_Yudw",sidebarItem:"sidebarItem__DBe",sidebarItemLink:"sidebarItemLink_mo7H",sidebarItemLinkActive:"sidebarItemLinkActive_I1ZP"};function u(e){var t=e.sidebar;return n.createElement("aside",{className:"col col--3"},n.createElement("nav",{className:(0,l.Z)(o.sidebar,"thin-scrollbar"),"aria-label":(0,m.I)({id:"theme.blog.sidebar.navAriaLabel",message:"Blog recent posts navigation",description:"The ARIA label for recent posts in the blog sidebar"})},n.createElement("div",{className:(0,l.Z)(o.sidebarItemTitle,"margin-bottom--md")},t.title),n.createElement("ul",{className:(0,l.Z)(o.sidebarItemList,"clean-list")},t.items.map((function(e){return n.createElement("li",{key:e.permalink,className:o.sidebarItem},n.createElement(c.Z,{isNavLink:!0,to:e.permalink,className:o.sidebarItemLink,activeClassName:o.sidebarItemLinkActive},e.title))})))))}var g=a(13102);function d(e){var t=e.sidebar;return n.createElement("ul",{className:"menu__list"},t.items.map((function(e){return n.createElement("li",{key:e.permalink,className:"menu__list-item"},n.createElement(c.Z,{isNavLink:!0,to:e.permalink,className:"menu__link",activeClassName:"menu__link--active"},e.title))})))}function b(e){return n.createElement(g.Zo,{component:d,props:e})}function f(e){var t=e.sidebar,a=(0,s.i)();return null!=t&&t.items.length?"mobile"===a?n.createElement(b,{sidebar:t}):n.createElement(u,{sidebar:t}):null}var E=["sidebar","toc","children"];function p(e){var t=e.sidebar,a=e.toc,s=e.children,c=(0,r.Z)(e,E),m=t&&t.items.length>0;return n.createElement(i.Z,c,n.createElement("div",{className:"container margin-vert--lg"},n.createElement("div",{className:"row"},n.createElement(f,{sidebar:t}),n.createElement("main",{className:(0,l.Z)("col",{"col--7":m,"col--9 col--offset-1":!m}),itemScope:!0,itemType:"http://schema.org/Blog"},s),a&&n.createElement("div",{className:"col col--2"},a))))}},91223:function(e,t,a){a.r(t),a.d(t,{default:function(){return f}});var r=a(67294),n=a(86010),l=a(95999),i=function(){return(0,l.I)({id:"theme.tags.tagsPageTitle",message:"Tags",description:"The title of the tag list page"})};var s=a(10833),c=a(35281),m=a(39058),o=a(13008),u={tag:"tag_Nnez"};function g(e){var t=e.letterEntry;return r.createElement("article",null,r.createElement("h2",null,t.letter),r.createElement("ul",{className:"padding--none"},t.tags.map((function(e){return r.createElement("li",{key:e.permalink,className:u.tag},r.createElement(o.Z,e))}))),r.createElement("hr",null))}function d(e){var t=function(e){var t={};return Object.values(e).forEach((function(e){var a=function(e){return e[0].toUpperCase()}(e.label);null!=t[a]||(t[a]=[]),t[a].push(e)})),Object.entries(t).sort((function(e,t){var a=e[0],r=t[0];return a.localeCompare(r)})).map((function(e){return{letter:e[0],tags:e[1].sort((function(e,t){return e.label.localeCompare(t.label)}))}}))}(e.tags);return r.createElement("section",{className:"margin-vert--lg"},t.map((function(e){return r.createElement(g,{key:e.letter,letterEntry:e})})))}var b=a(90197);function f(e){var t=e.tags,a=e.sidebar,l=i();return r.createElement(s.FG,{className:(0,n.Z)(c.k.wrapper.blogPages,c.k.page.blogTagsListPage)},r.createElement(s.d,{title:l}),r.createElement(b.Z,{tag:"blog_tags_list"}),r.createElement(m.Z,{sidebar:a},r.createElement("h1",null,l),r.createElement(d,{tags:t})))}},13008:function(e,t,a){a.d(t,{Z:function(){return s}});var r=a(67294),n=a(86010),l=a(39960),i={tag:"tag_zVej",tagRegular:"tagRegular_sFm0",tagWithCount:"tagWithCount_h2kH"};function s(e){var t=e.permalink,a=e.label,s=e.count;return r.createElement(l.Z,{href:t,className:(0,n.Z)(i.tag,s?i.tagWithCount:i.tagRegular)},a,s&&r.createElement("span",null,s))}}}]); \ No newline at end of file diff --git a/assets/js/01a85c17.6b924535.js b/assets/js/01a85c17.6b924535.js new file mode 100644 index 000000000..1dcd674fd --- /dev/null +++ b/assets/js/01a85c17.6b924535.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_eightshift_docs=self.webpackChunk_eightshift_docs||[]).push([[64013],{61460:(e,t,s)=>{s.d(t,{Z:()=>v});var a=s(67294),i=s(86010),l=s(16787),r=s(87524),n=s(39960),c=s(95999),o=s(16550),m=s(48596);function d(e){const{pathname:t}=(0,o.TH)();return(0,a.useMemo)((()=>e.filter((e=>function(e,t){return!(e.unlisted&&!(0,m.Mg)(e.permalink,t))}(e,t)))),[e,t])}const u={sidebar:"sidebar_re4s",sidebarItemTitle:"sidebarItemTitle_pO2u",sidebarItemList:"sidebarItemList_Yudw",sidebarItem:"sidebarItem__DBe",sidebarItemLink:"sidebarItemLink_mo7H",sidebarItemLinkActive:"sidebarItemLinkActive_I1ZP"};var g=s(85893);function h(e){let{sidebar:t}=e;const s=d(t.items);return(0,g.jsx)("aside",{className:"col col--3",children:(0,g.jsxs)("nav",{className:(0,i.Z)(u.sidebar,"thin-scrollbar"),"aria-label":(0,c.I)({id:"theme.blog.sidebar.navAriaLabel",message:"Blog recent posts navigation",description:"The ARIA label for recent posts in the blog sidebar"}),children:[(0,g.jsx)("div",{className:(0,i.Z)(u.sidebarItemTitle,"margin-bottom--md"),children:t.title}),(0,g.jsx)("ul",{className:(0,i.Z)(u.sidebarItemList,"clean-list"),children:s.map((e=>(0,g.jsx)("li",{className:u.sidebarItem,children:(0,g.jsx)(n.Z,{isNavLink:!0,to:e.permalink,className:u.sidebarItemLink,activeClassName:u.sidebarItemLinkActive,children:e.title})},e.permalink)))})]})})}var b=s(13102);function p(e){let{sidebar:t}=e;const s=d(t.items);return(0,g.jsx)("ul",{className:"menu__list",children:s.map((e=>(0,g.jsx)("li",{className:"menu__list-item",children:(0,g.jsx)(n.Z,{isNavLink:!0,to:e.permalink,className:"menu__link",activeClassName:"menu__link--active",children:e.title})},e.permalink)))})}function j(e){return(0,g.jsx)(b.Zo,{component:p,props:e})}function x(e){let{sidebar:t}=e;const s=(0,r.i)();return null!=t&&t.items.length?"mobile"===s?(0,g.jsx)(j,{sidebar:t}):(0,g.jsx)(h,{sidebar:t}):null}function v(e){const{sidebar:t,toc:s,children:a,...r}=e,n=t&&t.items.length>0;return(0,g.jsx)(l.Z,{...r,children:(0,g.jsx)("div",{className:"container margin-vert--lg",children:(0,g.jsxs)("div",{className:"row",children:[(0,g.jsx)(x,{sidebar:t}),(0,g.jsx)("main",{className:(0,i.Z)("col",{"col--7":n,"col--9 col--offset-1":!n}),itemScope:!0,itemType:"https://schema.org/Blog",children:a}),s&&(0,g.jsx)("div",{className:"col col--2",children:s})]})})})}},91223:(e,t,s)=>{s.r(t),s.d(t,{default:()=>p});s(67294);var a=s(86010),i=s(95999);const l=()=>(0,i.I)({id:"theme.tags.tagsPageTitle",message:"Tags",description:"The title of the tag list page"});var r=s(10833),n=s(35281),c=s(61460),o=s(13008),m=s(92503);const d={tag:"tag_Nnez"};var u=s(85893);function g(e){let{letterEntry:t}=e;return(0,u.jsxs)("article",{children:[(0,u.jsx)(m.Z,{as:"h2",id:t.letter,children:t.letter}),(0,u.jsx)("ul",{className:"padding--none",children:t.tags.map((e=>(0,u.jsx)("li",{className:d.tag,children:(0,u.jsx)(o.Z,{...e})},e.permalink)))}),(0,u.jsx)("hr",{})]})}function h(e){let{tags:t}=e;const s=function(e){const t={};return Object.values(e).forEach((e=>{const s=function(e){return e[0].toUpperCase()}(e.label);null!=t[s]||(t[s]=[]),t[s].push(e)})),Object.entries(t).sort(((e,t)=>{let[s]=e,[a]=t;return s.localeCompare(a)})).map((e=>{let[t,s]=e;return{letter:t,tags:s.sort(((e,t)=>e.label.localeCompare(t.label)))}}))}(t);return(0,u.jsx)("section",{className:"margin-vert--lg",children:s.map((e=>(0,u.jsx)(g,{letterEntry:e},e.letter)))})}var b=s(90197);function p(e){let{tags:t,sidebar:s}=e;const i=l();return(0,u.jsxs)(r.FG,{className:(0,a.Z)(n.k.wrapper.blogPages,n.k.page.blogTagsListPage),children:[(0,u.jsx)(r.d,{title:i}),(0,u.jsx)(b.Z,{tag:"blog_tags_list"}),(0,u.jsxs)(c.Z,{sidebar:s,children:[(0,u.jsx)(m.Z,{as:"h1",children:i}),(0,u.jsx)(h,{tags:t})]})]})}},13008:(e,t,s)=>{s.d(t,{Z:()=>n});s(67294);var a=s(86010),i=s(39960);const l={tag:"tag_zVej",tagRegular:"tagRegular_sFm0",tagWithCount:"tagWithCount_h2kH"};var r=s(85893);function n(e){let{permalink:t,label:s,count:n}=e;return(0,r.jsxs)(i.Z,{href:t,className:(0,a.Z)(l.tag,n?l.tagWithCount:l.tagRegular),children:[s,n&&(0,r.jsx)("span",{children:n})]})}}}]); \ No newline at end of file diff --git a/assets/js/0242a13a.3a0dd9bb.js b/assets/js/0242a13a.3a0dd9bb.js deleted file mode 100644 index bf0749579..000000000 --- a/assets/js/0242a13a.3a0dd9bb.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_eightshift_docs=self.webpackChunk_eightshift_docs||[]).push([[60299],{3905:function(e,n,a){a.d(n,{Zo:function(){return u},kt:function(){return m}});var t=a(67294);function r(e,n,a){return n in e?Object.defineProperty(e,n,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[n]=a,e}function l(e,n){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),a.push.apply(a,t)}return a}function p(e){for(var n=1;n=0||(r[a]=e[a]);return r}(e,n);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var o=t.createContext({}),s=function(e){var n=t.useContext(o),a=n;return e&&(a="function"==typeof e?e(n):p(p({},n),e)),a},u=function(e){var n=s(e.components);return t.createElement(o.Provider,{value:n},e.children)},d="mdxType",c={inlineCode:"code",wrapper:function(e){var n=e.children;return t.createElement(t.Fragment,{},n)}},b=t.forwardRef((function(e,n){var a=e.components,r=e.mdxType,l=e.originalType,o=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),d=s(a),b=r,m=d["".concat(o,".").concat(b)]||d[b]||c[b]||l;return a?t.createElement(m,p(p({ref:n},u),{},{components:a})):t.createElement(m,p({ref:n},u))}));function m(e,n){var a=arguments,r=n&&n.mdxType;if("string"==typeof e||r){var l=a.length,p=new Array(l);p[0]=b;var i={};for(var o in n)hasOwnProperty.call(n,o)&&(i[o]=n[o]);i.originalType=e,i[d]="string"==typeof e?e:r,p[1]=i;for(var s=2;s {\n\n // We need to use memo in order to optimise component re-rendering.\n const unique = useMemo(() => getUnique(), []);\n\n return (\n <>\n {outputCssVariables(attributes, manifest, unique, globalManifest)}\n\n
\n {/*Regular component implementation*/}\n
\n \n );\n};\n")),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"PHP view:")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-php"},'use EightshiftLibs\\Helpers\\Components;\n\n$globalManifest = Components::getManifest(dirname(__DIR__, 2));\n$manifest = Components::getManifest(__DIR__);\n\n$unique = Components::getUnique();\n\n?>\n\n
\n \n // Regular component implementation\n
\n')),(0,l.kt)("p",null,"Now that we have helpers in place, let's see how they work and what features they offer."),(0,l.kt)("h2",{id:"details"},"Details"),(0,l.kt)("p",null,"CSS variables helper consists of 2 helpers. ",(0,l.kt)("inlineCode",{parentName:"p"},"outputCssVariables")," helper will output all CSS variables set in your blocks/component manifest and ",(0,l.kt)("inlineCode",{parentName:"p"},"getUnique")," helper will make sure that variables are applied only to the exact block/component."),(0,l.kt)("p",null,"If you check your rendered website you can see that you have something like this:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-html"},'
\n \n ...\n
\n')),(0,l.kt)("p",null,"This is all that's required for the magic of CSS variables to work! Now let's see it in action and check out all additional features you can use."),(0,l.kt)("h2",{id:"global-variables"},"Global variables"),(0,l.kt)("p",null,"Now that we know how CSS variables are generated, we have one more helper to describe.\nThe ",(0,l.kt)("inlineCode",{parentName:"p"},"outputCssVariablesGlobal(globalSettings);")," helper is called in the ",(0,l.kt)("inlineCode",{parentName:"p"},"application-blocks-editor.js")," file. It is used to output all CSS variables from the global manifest under the ",(0,l.kt)("inlineCode",{parentName:"p"},"globalVariables")," key, into the ",(0,l.kt)("inlineCode",{parentName:"p"},":root")," selector."),(0,l.kt)("blockquote",null,(0,l.kt)("p",{parentName:"blockquote"},"All of these variables are available to use inside any blocks/components.")),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Global Manifest:")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-json"},'{\n "namespace": "eightshift-boilerplate",\n "background": "#D8262C",\n "foreground": "#FFFFFF",\n "globalVariables": {\n "customBlocksName": "eightshift-block",\n "maxCols": 12,\n "breakpoints": {\n "mobile": 479,\n "tablet": 1279,\n "desktop": 1919,\n "large": 1920\n },\n "containers": {\n "default": "1330px"\n },\n "gutters": {\n "none": "0",\n "default": "25px",\n "big": "50px"\n },\n "sectionSpacing": {\n "min": -300,\n "max": 300,\n "step": 10\n },\n "sectionInSpacing": {\n "min": 0,\n "max": 300,\n "step": 10\n },\n "colors": [\n {\n "name": "Black",\n "slug": "black",\n "color": "#111111"\n },\n {\n "name": "White",\n "slug": "white",\n "color": "#FFFFFF"\n }\n ]\n }\n}\n')),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Output:")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-html"},"\n")),(0,l.kt)("p",null,"You can use a global variable like any other CSS variable:"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-css"},"color: var(--global-colors-white);\n")),(0,l.kt)("h2",{id:"variables"},"Variables"),(0,l.kt)("p",null,"As we said in the beginning, all CSS variables are defined within the block/component manifest."),(0,l.kt)("p",null,"To output an attribute as a CSS variable, you need to set the ",(0,l.kt)("inlineCode",{parentName:"p"},"variables")," key in the block/component ",(0,l.kt)("inlineCode",{parentName:"p"},"manifest")," and define the variable markdown."),(0,l.kt)("p",null,"All css variables are prepared and ready to be used in the responsive manner."),(0,l.kt)("h2",{id:"default-type"},"Default type"),(0,l.kt)("p",null,"Variable ",(0,l.kt)("inlineCode",{parentName:"p"},"default")," will output all variables from the list no matter what you have selected in the attribute. You can use unlimited variables."),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Manifest:")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-json"},'{\n "componentClass": "typography",\n "attributes": {\n "typographySize": {\n "type": "string",\n "default": "120-default"\n }\n },\n "variables": {\n "typographySize": [\n {\n "variable": {\n "typography-size": "120px",\n "typography-line-height": "calc(var(--typography-size) * 1.2)"\n }\n }\n ]\n }\n}\n')),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Output:")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-css"},"--typography-size: 120px;\n--typography-line-height: 144px;\n")),(0,l.kt)("h2",{id:"value-type"},"Value type"),(0,l.kt)("p",null,"Variable ",(0,l.kt)("inlineCode",{parentName:"p"},"value")," will output all variables depending on attributes value. Everything else is the same as in the default type."),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Manifest:")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-json"},'{\n "componentClass": "typography",\n "attributes": {\n "typographySize": {\n "type": "string",\n "default": "120-default"\n }\n },\n "variables": {\n "typographySize": {\n "120-default": [\n {\n "variable": {\n "typography-size": "120px",\n "typography-line-height": "calc(var(--typography-size) * 1.2)"\n }\n }\n ]\n }\n }\n}\n')),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Output:")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-css"},"--typography-size: 120px;\n--typography-line-height: 144px;\n")),(0,l.kt)("h2",{id:"editor-variables"},"Editor variables"),(0,l.kt)("p",null,"Editor variables behave just like regular ",(0,l.kt)("inlineCode",{parentName:"p"},"variables"),", except they are output only inside the Block Editor.\nThey are mostly used for overriding specific behaviour, e.g. showing a hidden element as half-transparent instead of hiding it completely."),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Manifest:")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-json"},'{\n "componentName": "wrapper",\n "title": "Wrapper",\n "componentClass": "wrapper",\n "attributes": {\n "wrapperHide": {\n "type": "boolean",\n "default": false\n }\n },\n "variables": {\n "wrapperHide": {\n "true": [\n {\n "variable": {\n "wrapper-display": "none"\n }\n }\n ],\n }\n },\n "variablesEditor": {\n "wrapperHide": {\n "true": [\n {\n "variable": {\n "wrapper-display-opacity": "0.5",\n "wrapper-display": "var(--wrapper-display-type, grid)"\n }\n }\n ]\n }\n }\n}\n')),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Output:")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-css"},"--wrapper-display: none;\n--wrapper-display-opacity: 0.5;\n--wrapper-display: var(--wrapper-display-type, grid);\n")),(0,l.kt)("h2",{id:"manual-variables"},"Manual variables"),(0,l.kt)("p",null,"Custom CSS variables can be generated and output independently from all the attributes through the ",(0,l.kt)("inlineCode",{parentName:"p"},"variablesCustom")," key. Add it inside the manifest (top level) and add each variable as an array item.\nManual variables will be added at the end of the output."),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Manifest:")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-json"},'{\n "attributes": {\n // ...\n },\n "variablesCustom": [\n "--variable1: test1",\n "--variable2: test2",\n "--variable3: test3"\n ]\n}\n')),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Output:")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-css"},"--variable1: test1;\n--variable2: test2;\n--variable3: test3;\n")),(0,l.kt)("h2",{id:"manual-variables-inside-the-block-editor"},"Manual variables inside the Block editor"),(0,l.kt)("p",null,"If you want to add manual variables that only apply inside the Block editor you can use the ",(0,l.kt)("inlineCode",{parentName:"p"},"variablesCustomEditor")," key. Everything works the same as described in the ",(0,l.kt)("strong",{parentName:"p"},"Manual variables")," section.\nIf you define both ",(0,l.kt)("inlineCode",{parentName:"p"},"variablesCustomEditor")," and ",(0,l.kt)("inlineCode",{parentName:"p"},"variables"),", both will be output in the editor, but only ",(0,l.kt)("inlineCode",{parentName:"p"},"variables")," will be output on the frontend."),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Manifest:")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-json"},'{\n "attributes": {\n // ...\n },\n "variablesCustomEditor": [\n "--variable1: test1",\n "--variable2: test2",\n "--variable3: test3"\n ]\n}\n')),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Output:")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-css"},"--variable1: test1;\n--variable2: test2;\n--variable3: test3;\n")),(0,l.kt)("h2",{id:"additional-options-and-examples"},"Additional options and examples"),(0,l.kt)("h3",{id:"color"},"Color"),(0,l.kt)("p",null,"Here is an example how to output global variable as a css variable."),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Manifest:")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-json"},'{\n "componentClass": "typography",\n "attributes": {\n "typographyColor": {\n "type": "string",\n "default": "white"\n }\n },\n "variables": {\n "typographyColor": [\n {\n "variable": {\n "typography-color": "var(--global-colors-white)"\n }\n }\n ]\n }\n}\n')),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Output:")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-css"},"--typography-color: var(--global-colors-white);\n")),(0,l.kt)("h3",{id:"responsive"},"Responsive"),(0,l.kt)("p",null,"All variables are prepared to be responsive. If you set multiple keys in the manifest list that variable will be outputted in the correct media query. Breakpoints are taken from the global manifest and the order of the output breakpoints."),(0,l.kt)("blockquote",null,(0,l.kt)("p",{parentName:"blockquote"},"Global breakpoints must follow the convention from the smallest size to the largest.")),(0,l.kt)("p",null,"If you don't specify breakpoint key, that item will not be wrapped in the media query."),(0,l.kt)("p",null,"If you write breakpoint that isn't defined in the global manifest, that condition will be ignored."),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Manifest:")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-json"},'{\n "componentClass": "typography",\n "attributes": {\n "typographySize": {\n "type": "string",\n "default": "120-default"\n }\n },\n "variables": {\n "typographySize": [\n {\n "variable": {\n "typography-size": "30px"\n }\n },\n {\n "breakpoint": "tablet",\n "variable": {\n "typography-size": "80px"\n }\n }\n {\n "breakpoint": "large",\n "variable": {\n "typography-size": "120px"\n }\n }\n ]\n }\n}\n')),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Output:")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-css"},".typography[data-id='210c9bbf733ef5c6aa74c49168ac29a7'] {\n --typography-size: 30px;\n}\n\n@media(min-width: 1279px) {\n .typography[data-id='210c9bbf733ef5c6aa74c49168ac29a7'] {\n --typography-size: 80px;\n }\n}\n\n@media(min-width: 1920px) {\n .typography[data-id='210c9bbf733ef5c6aa74c49168ac29a7'] {\n --typography-size: 120px;\n }\n}\n")),(0,l.kt)("h3",{id:"responsive-inverse"},"Responsive Inverse"),(0,l.kt)("p",null,"By default, we use mobile first approach but if you need desktop first you can use ",(0,l.kt)("inlineCode",{parentName:"p"},"inverse: true")," key."),(0,l.kt)("blockquote",null,(0,l.kt)("p",{parentName:"blockquote"},"If you have multiple mobile/desktop first breakpoints, output will sort them mobile first and then desktop first after that.")),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Manifest:")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-json"},'{\n "componentClass": "typography",\n "attributes": {\n "typographySize": {\n "type": "string",\n "default": "120-default"\n }\n },\n "variables": {\n "typographySize": [\n {\n "variable": {\n "typography-size": "120px"\n }\n },\n {\n "breakpoint": "tablet",\n "inverse": true,\n "variable": {\n "typography-size": "80px"\n }\n }\n {\n "breakpoint": "mobile",\n "inverse": true,\n "variable": {\n "typography-size": "320px"\n }\n }\n ]\n }\n}\n')),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Output:")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-css"},".typography[data-id='210c9bbf733ef5c6aa74c49168ac29a7'] {\n --typography-size: 120px;\n}\n\n@media(max-width: 1279px) {\n .typography[data-id='210c9bbf733ef5c6aa74c49168ac29a7'] {\n --typography-size: 80px;\n }\n}\n\n@media(max-width: 479px) {\n .typography[data-id='210c9bbf733ef5c6aa74c49168ac29a7'] {\n --typography-size: 30px;\n }\n}\n")),(0,l.kt)("h3",{id:"attribute-value-replacement"},"Attribute value replacement"),(0,l.kt)("p",null,"Attribute value replacement variable is used to return the attribute value where you want it in the css variables. To use it just put ",(0,l.kt)("inlineCode",{parentName:"p"},"%value%")," in you css variables."),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Manifest:")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-json"},'{\n "componentClass": "typography",\n "attributes": {\n "typographySize": {\n "type": "string",\n "default": "120"\n }\n },\n "variables": {\n "typographySize": [\n {\n "variable": {\n "typography-size": "30px"\n }\n },\n {\n "breakpoint": "tablet",\n "variable": {\n "typography-size": "80px"\n }\n }\n {\n "breakpoint": "large",\n "variable": {\n "typography-size": "%value%px"\n }\n }\n ]\n }\n}\n')),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Output:")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-css"},".typography[data-id='210c9bbf733ef5c6aa74c49168ac29a7'] {\n --typography-size: 30px;\n}\n\n@media(min-width: 1279px) {\n .typography[data-id='210c9bbf733ef5c6aa74c49168ac29a7'] {\n --typography-size: 80px;\n }\n}\n\n@media(min-width: 1920px) {\n .typography[data-id='210c9bbf733ef5c6aa74c49168ac29a7'] {\n --typography-size: 120px;\n }\n}\n")),(0,l.kt)("h2",{id:"responsive-variables"},"Responsive variables"),(0,l.kt)("p",null,"Responsive variables are used for eliminating unnecessary code duplication. For example, if you have 4 separate attributes used for setting a responsive variable where all the attributes have the same output (e.g. ",(0,l.kt)("inlineCode",{parentName:"p"},"%value%"),"), the variables can get cluttered rather quickly."),(0,l.kt)("p",null,"In a top-level manifest key ",(0,l.kt)("inlineCode",{parentName:"p"},"responsiveAttributes"),", you can place a new key (e.g. ",(0,l.kt)("inlineCode",{parentName:"p"},"wrapperHide"),") that represents a common key for your responsive variables. Inside of it, you can list your responsive variables (e.g. ",(0,l.kt)("inlineCode",{parentName:"p"},"wrapperHideLarge"),", ",(0,l.kt)("inlineCode",{parentName:"p"},"wrapperHideDesktop"),", ",(0,l.kt)("inlineCode",{parentName:"p"},"wrapperHideTablet"),", ",(0,l.kt)("inlineCode",{parentName:"p"},"wrapperHideMobile"),") as a key-value pair. The key represents a breakpoint name, and the value represents responsive variable(",(0,l.kt)("inlineCode",{parentName:"p"},"breakpoint"),": ",(0,l.kt)("inlineCode",{parentName:"p"},"responsiveVariableName"),"). Afterwards, you can add that common key inside the ",(0,l.kt)("inlineCode",{parentName:"p"},"variables")," (and/or ",(0,l.kt)("inlineCode",{parentName:"p"},"variablesEditor"),") key and configure the output template."),(0,l.kt)("p",null,"Best practice is to have the attributes named consistently with your breakpoints - in the ",(0,l.kt)("strong",{parentName:"p"},(0,l.kt)("inlineCode",{parentName:"strong"},"variableName``breakpointName"))," format (see example below)."),(0,l.kt)("blockquote",null,(0,l.kt)("p",{parentName:"blockquote"},"If you need an extra variable, or are overriding some of the auto-generated variables (from the helper), the variables will be output after the responsive variables. (see ",(0,l.kt)("strong",{parentName:"p"},"Example 2"),")")),(0,l.kt)("blockquote",null,(0,l.kt)("p",{parentName:"blockquote"},"Order of responsive attributes is important since generating variables relies on that order. Make sure to use the ",(0,l.kt)("inlineCode",{parentName:"p"},"inverse")," option properly.")),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Example 1")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-json"},'{\n "componentName": "wrapper",\n "title": "Wrapper",\n "componentClass": "wrapper",\n "attributes": {\n "wrapperHideLarge": {\n "type": "boolean",\n "default": false\n },\n "wrapperHideDesktop": {\n "type": "boolean"\n },\n "wrapperHideTablet": {\n "type": "boolean"\n }\n },\n "responsiveAttributes": {\n "wrapperHide": {\n "large": "wrapperHideLarge",\n "desktop": "wrapperHideDesktop",\n "tablet": "wrapperHideTablet"\n }\n },\n "variables": {\n "wrapperHide": {\n "true": [\n {\n "inverse": true,\n "variable": {\n "wrapper-display": "none"\n }\n }\n ],\n "false": [\n {\n "inverse": true,\n "variable": {\n "wrapper-display": "var(--wrapper-display-type, grid)"\n }\n }\n ]\n }\n }\n}\n')),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Transformed:")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-json"},'{\n "componentName": "wrapper",\n "title": "Wrapper",\n "componentClass": "wrapper",\n "attributes": {\n "wrapperHide": {\n "type": "boolean",\n "default": false\n }\n },\n "responsiveAttributes": {\n "wrapperHideLarge": {\n "type": "boolean",\n "default": false\n },\n "wrapperHideDesktop": {\n "type": "boolean"\n },\n "wrapperHideTablet": {\n "type": "boolean"\n }\n },\n "variables": {\n "wrapperHideLarge": {\n "true": [\n {\n "variable": {\n "wrapper-display": "none"\n }\n }\n ],\n "false": [\n {\n "variable": {\n "wrapper-display": "var(--wrapper-display-type, grid)"\n }\n }\n ]\n },\n "wrapperHideDesktop": {\n "true": [\n {\n "inverse": true,\n "breakpoint": "desktop",\n "variable": {\n "wrapper-display": "none"\n }\n }\n ],\n "false": [\n {\n "inverse": true,\n "breakpoint": "desktop",\n "variable": {\n "wrapper-display": "var(--wrapper-display-type, grid)"\n }\n }\n ]\n },\n "wrapperHideTablet": {\n "true": [\n {\n "inverse": true,\n "breakpoint": "desktop",\n "variable": {\n "wrapper-display": "none"\n }\n }\n ],\n "false": [\n {\n "inverse": true,\n "breakpoint": "desktop",\n "variable": {\n "wrapper-display": "var(--wrapper-display-type, grid)"\n }\n }\n ]\n }\n }\n}\n')),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Output")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-css"},".wrapper[data-id='210c9bbf733ef5c6aa74c49168ac29a7'] {\n --wrapper-display: var(--wrapper-display-type, grid);\n}\n@media(max-width: 1920px) {\n .wrapper[data-id='210c9bbf733ef5c6aa74c49168ac29a7'] {\n --wrapper-display: none;\n }\n}\n@media(max-width: 1279px) {\n .wrapper[data-id='210c9bbf733ef5c6aa74c49168ac29a7'] {\n --wrapper-display: var(--wrapper-display-type, grid);\n }\n}\n\n")),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Example 2")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-json"},'{\n "componentName": "wrapper",\n "title": "Wrapper",\n "componentClass": "wrapper",\n "attributes": {\n "wrapperHideLarge": {\n "type": "boolean",\n "default": false\n },\n "wrapperHideDesktop": {\n "type": "boolean"\n },\n "wrapperHideTablet": {\n "type": "boolean"\n }\n },\n "responsiveAttributes": {\n "wrapperHide": {\n "large": "wrapperHideLarge",\n "desktop": "wrapperHideDesktop",\n "tablet": "wrapperHideTablet"\n }\n },\n "variables": {\n "wrapperHide": {\n "true": [\n {\n "inverse": true,\n "variable": {\n "wrapper-display": "none"\n }\n }\n ],\n "false": [\n {\n "inverse": true,\n "variable": {\n "wrapper-display": "var(--wrapper-display-type, grid)"\n }\n }\n ]\n },\n "wrapperHideLarge": {\n "true": [\n {\n "inverse": true,\n "variable": {\n "wrapper-display": "block",\n "wrapper-opacity": 0\n }\n }\n ],\n }\n }\n}\n')),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Output")),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-css"},".wrapper[data-id='210c9bbf733ef5c6aa74c49168ac29a7'] {\n --wrapper-display: none;\n --wrapper-display: block;\n --wrapper-opacity: 0;\n}\n\n")))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/0242a13a.9ccecec0.js b/assets/js/0242a13a.9ccecec0.js new file mode 100644 index 000000000..57d45577c --- /dev/null +++ b/assets/js/0242a13a.9ccecec0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_eightshift_docs=self.webpackChunk_eightshift_docs||[]).push([[60299],{37556:(t,e,n)=>{n.r(e),n.d(e,{assets:()=>o,contentTitle:()=>i,default:()=>c,frontMatter:()=>s,metadata:()=>l,toc:()=>p});var a=n(85893),r=n(11151);const s={id:"blocks-styles",title:"Styles"},i=void 0,l={id:"legacy/v7/basics/blocks-styles",title:"Styles",description:"docs-source",source:"@site/docs/legacy/v7/basics/blocks-styles.md",sourceDirName:"legacy/v7/basics",slug:"/legacy/v7/basics/blocks-styles",permalink:"/docs/legacy/v7/basics/blocks-styles",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{id:"blocks-styles",title:"Styles"},sidebar:"docs",previous:{title:"Reusable Blocks",permalink:"/docs/legacy/v7/basics/blocks-reusable"},next:{title:"Storybook",permalink:"/docs/legacy/v7/basics/blocks-storybook"}},o={},p=[{value:"Setup",id:"setup",level:2},{value:"Details",id:"details",level:2},{value:"Global variables",id:"global-variables",level:2},{value:"Variables",id:"variables",level:2},{value:"Default type",id:"default-type",level:2},{value:"Value type",id:"value-type",level:2},{value:"Editor variables",id:"editor-variables",level:2},{value:"Manual variables",id:"manual-variables",level:2},{value:"Manual variables inside the Block editor",id:"manual-variables-inside-the-block-editor",level:2},{value:"Additional options and examples",id:"additional-options-and-examples",level:2},{value:"Color",id:"color",level:3},{value:"Responsive",id:"responsive",level:3},{value:"Responsive Inverse",id:"responsive-inverse",level:3},{value:"Attribute value replacement",id:"attribute-value-replacement",level:3},{value:"Responsive variables",id:"responsive-variables",level:2}];function d(t){const e={a:"a",blockquote:"blockquote",code:"code",h2:"h2",h3:"h3",img:"img",p:"p",pre:"pre",strong:"strong",...(0,r.a)(),...t.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(e.p,{children:(0,a.jsx)(e.a,{href:"https://github.com/infinum/eightshift-frontend-libs/tree/6.0.0/blocks/init/src/blocks/",children:(0,a.jsx)(e.img,{src:"https://img.shields.io/badge/source-eightshift--frontend--libs-yellow?style=for-the-badge&logo=javascript&labelColor=2a2a2a",alt:"docs-source"})})}),"\n",(0,a.jsx)(e.p,{children:"We decided to remove all support for IE 11. That decision opened up doors that lead to new, awesome features and all the cool stuff. One of those features is CSS variables with block manifest and global settings."}),"\n",(0,a.jsx)(e.p,{children:"Let's dig into the implementation of CSS variables in your project."}),"\n",(0,a.jsx)(e.h2,{id:"setup",children:"Setup"}),"\n",(0,a.jsxs)(e.p,{children:["To be able to use CSS variables you need to implement two helpers in your blocks/components: ",(0,a.jsx)(e.code,{children:"outputCssVariables"})," and ",(0,a.jsx)(e.code,{children:"getUnique"}),". For more details on these helpers, you can read ",(0,a.jsx)(e.a,{href:"helpers-javascript",children:"here"}),"."]}),"\n",(0,a.jsx)(e.p,{children:"There are a few differences between the JavaScript and PHP implementation due to a way React handles component re-rendering."}),"\n",(0,a.jsx)(e.p,{children:(0,a.jsx)(e.strong,{children:"JavaScript component:"})}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-js",children:"import React, { useMemo } from 'react';\nimport { outputCssVariables, getUnique } from '@eightshift/frontend-libs/scripts';\nimport manifest from '../manifest.json';\nimport globalManifest from './../../../manifest.json';\n\nexport const TypographyEditor = (attributes) => {\n\n\t// We need to use memo in order to optimise component re-rendering.\n\tconst unique = useMemo(() => getUnique(), []);\n\n\treturn (\n\t\t<>\n\t\t\t{outputCssVariables(attributes, manifest, unique, globalManifest)}\n\n\t\t\t
\n\t\t\t\t{/*Regular component implementation*/}\n\t\t\t
\n\t\t\n\t);\n};\n"})}),"\n",(0,a.jsx)(e.p,{children:(0,a.jsx)(e.strong,{children:"PHP view:"})}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-php",children:'use EightshiftLibs\\Helpers\\Components;\n\n$globalManifest = Components::getManifest(dirname(__DIR__, 2));\n$manifest = Components::getManifest(__DIR__);\n\n$unique = Components::getUnique();\n\n?>\n\n
\n\t\n\t// Regular component implementation\n
\n'})}),"\n",(0,a.jsx)(e.p,{children:"Now that we have helpers in place, let's see how they work and what features they offer."}),"\n",(0,a.jsx)(e.h2,{id:"details",children:"Details"}),"\n",(0,a.jsxs)(e.p,{children:["CSS variables helper consists of 2 helpers. ",(0,a.jsx)(e.code,{children:"outputCssVariables"})," helper will output all CSS variables set in your blocks/component manifest and ",(0,a.jsx)(e.code,{children:"getUnique"})," helper will make sure that variables are applied only to the exact block/component."]}),"\n",(0,a.jsx)(e.p,{children:"If you check your rendered website you can see that you have something like this:"}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-html",children:'
\n\t\n\t...\n
\n'})}),"\n",(0,a.jsx)(e.p,{children:"This is all that's required for the magic of CSS variables to work! Now let's see it in action and check out all additional features you can use."}),"\n",(0,a.jsx)(e.h2,{id:"global-variables",children:"Global variables"}),"\n",(0,a.jsxs)(e.p,{children:["Now that we know how CSS variables are generated, we have one more helper to describe.\nThe ",(0,a.jsx)(e.code,{children:"outputCssVariablesGlobal(globalSettings);"})," helper is called in the ",(0,a.jsx)(e.code,{children:"application-blocks-editor.js"})," file. It is used to output all CSS variables from the global manifest under the ",(0,a.jsx)(e.code,{children:"globalVariables"})," key, into the ",(0,a.jsx)(e.code,{children:":root"})," selector."]}),"\n",(0,a.jsxs)(e.blockquote,{children:["\n",(0,a.jsx)(e.p,{children:"All of these variables are available to use inside any blocks/components."}),"\n"]}),"\n",(0,a.jsx)(e.p,{children:(0,a.jsx)(e.strong,{children:"Global Manifest:"})}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-json",children:'{\n\t"namespace": "eightshift-boilerplate",\n\t"background": "#D8262C",\n\t"foreground": "#FFFFFF",\n\t"globalVariables": {\n\t\t"customBlocksName": "eightshift-block",\n\t\t"maxCols": 12,\n\t\t"breakpoints": {\n\t\t\t"mobile": 479,\n\t\t\t"tablet": 1279,\n\t\t\t"desktop": 1919,\n\t\t\t"large": 1920\n\t\t},\n\t\t"containers": {\n\t\t\t"default": "1330px"\n\t\t},\n\t\t"gutters": {\n\t\t\t"none": "0",\n\t\t\t"default": "25px",\n\t\t\t"big": "50px"\n\t\t},\n\t\t"sectionSpacing": {\n\t\t\t"min": -300,\n\t\t\t"max": 300,\n\t\t\t"step": 10\n\t\t},\n\t\t"sectionInSpacing": {\n\t\t\t"min": 0,\n\t\t\t"max": 300,\n\t\t\t"step": 10\n\t\t},\n\t\t"colors": [\n\t\t\t{\n\t\t\t\t"name": "Black",\n\t\t\t\t"slug": "black",\n\t\t\t\t"color": "#111111"\n\t\t\t},\n\t\t\t{\n\t\t\t\t"name": "White",\n\t\t\t\t"slug": "white",\n\t\t\t\t"color": "#FFFFFF"\n\t\t\t}\n\t\t]\n\t}\n}\n'})}),"\n",(0,a.jsx)(e.p,{children:(0,a.jsx)(e.strong,{children:"Output:"})}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-html",children:"\n"})}),"\n",(0,a.jsx)(e.p,{children:"You can use a global variable like any other CSS variable:"}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-css",children:"color: var(--global-colors-white);\n"})}),"\n",(0,a.jsx)(e.h2,{id:"variables",children:"Variables"}),"\n",(0,a.jsx)(e.p,{children:"As we said in the beginning, all CSS variables are defined within the block/component manifest."}),"\n",(0,a.jsxs)(e.p,{children:["To output an attribute as a CSS variable, you need to set the ",(0,a.jsx)(e.code,{children:"variables"})," key in the block/component ",(0,a.jsx)(e.code,{children:"manifest"})," and define the variable markdown."]}),"\n",(0,a.jsx)(e.p,{children:"All css variables are prepared and ready to be used in the responsive manner."}),"\n",(0,a.jsx)(e.h2,{id:"default-type",children:"Default type"}),"\n",(0,a.jsxs)(e.p,{children:["Variable ",(0,a.jsx)(e.code,{children:"default"})," will output all variables from the list no matter what you have selected in the attribute. You can use unlimited variables."]}),"\n",(0,a.jsx)(e.p,{children:(0,a.jsx)(e.strong,{children:"Manifest:"})}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-json",children:'{\n\t"componentClass": "typography",\n\t"attributes": {\n\t\t"typographySize": {\n\t\t\t"type": "string",\n\t\t\t"default": "120-default"\n\t\t}\n\t},\n\t"variables": {\n\t\t"typographySize": [\n\t\t\t{\n\t\t\t\t"variable": {\n\t\t\t\t\t"typography-size": "120px",\n\t\t\t\t\t"typography-line-height": "calc(var(--typography-size) * 1.2)"\n\t\t\t\t}\n\t\t\t}\n\t\t]\n\t}\n}\n'})}),"\n",(0,a.jsx)(e.p,{children:(0,a.jsx)(e.strong,{children:"Output:"})}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-css",children:"--typography-size: 120px;\n--typography-line-height: 144px;\n"})}),"\n",(0,a.jsx)(e.h2,{id:"value-type",children:"Value type"}),"\n",(0,a.jsxs)(e.p,{children:["Variable ",(0,a.jsx)(e.code,{children:"value"})," will output all variables depending on attributes value. Everything else is the same as in the default type."]}),"\n",(0,a.jsx)(e.p,{children:(0,a.jsx)(e.strong,{children:"Manifest:"})}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-json",children:'{\n\t"componentClass": "typography",\n\t"attributes": {\n\t\t"typographySize": {\n\t\t\t"type": "string",\n\t\t\t"default": "120-default"\n\t\t}\n\t},\n\t"variables": {\n\t\t"typographySize": {\n\t\t\t"120-default": [\n\t\t\t\t{\n\t\t\t\t\t"variable": {\n\t\t\t\t\t\t"typography-size": "120px",\n\t\t\t\t\t\t"typography-line-height": "calc(var(--typography-size) * 1.2)"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t}\n}\n'})}),"\n",(0,a.jsx)(e.p,{children:(0,a.jsx)(e.strong,{children:"Output:"})}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-css",children:"--typography-size: 120px;\n--typography-line-height: 144px;\n"})}),"\n",(0,a.jsx)(e.h2,{id:"editor-variables",children:"Editor variables"}),"\n",(0,a.jsxs)(e.p,{children:["Editor variables behave just like regular ",(0,a.jsx)(e.code,{children:"variables"}),", except they are output only inside the Block Editor.\nThey are mostly used for overriding specific behaviour, e.g. showing a hidden element as half-transparent instead of hiding it completely."]}),"\n",(0,a.jsx)(e.p,{children:(0,a.jsx)(e.strong,{children:"Manifest:"})}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-json",children:'{\n\t"componentName": "wrapper",\n\t"title": "Wrapper",\n\t"componentClass": "wrapper",\n\t"attributes": {\n\t\t"wrapperHide": {\n\t\t\t"type": "boolean",\n\t\t\t"default": false\n\t\t}\n\t},\n\t"variables": {\n\t\t"wrapperHide": {\n\t\t\t"true": [\n\t\t\t\t{\n\t\t\t\t\t"variable": {\n\t\t\t\t\t\t"wrapper-display": "none"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t],\n\t\t}\n\t},\n\t"variablesEditor": {\n\t\t"wrapperHide": {\n\t\t\t"true": [\n\t\t\t\t{\n\t\t\t\t\t"variable": {\n\t\t\t\t\t\t"wrapper-display-opacity": "0.5",\n\t\t\t\t\t\t"wrapper-display": "var(--wrapper-display-type, grid)"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t}\n}\n'})}),"\n",(0,a.jsx)(e.p,{children:(0,a.jsx)(e.strong,{children:"Output:"})}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-css",children:"--wrapper-display: none;\n--wrapper-display-opacity: 0.5;\n--wrapper-display: var(--wrapper-display-type, grid);\n"})}),"\n",(0,a.jsx)(e.h2,{id:"manual-variables",children:"Manual variables"}),"\n",(0,a.jsxs)(e.p,{children:["Custom CSS variables can be generated and output independently from all the attributes through the ",(0,a.jsx)(e.code,{children:"variablesCustom"})," key. Add it inside the manifest (top level) and add each variable as an array item.\nManual variables will be added at the end of the output."]}),"\n",(0,a.jsx)(e.p,{children:(0,a.jsx)(e.strong,{children:"Manifest:"})}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-json",children:'{\n\t"attributes": {\n\t\t// ...\n\t},\n\t"variablesCustom": [\n\t\t"--variable1: test1",\n\t\t"--variable2: test2",\n\t\t"--variable3: test3"\n\t]\n}\n'})}),"\n",(0,a.jsx)(e.p,{children:(0,a.jsx)(e.strong,{children:"Output:"})}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-css",children:"--variable1: test1;\n--variable2: test2;\n--variable3: test3;\n"})}),"\n",(0,a.jsx)(e.h2,{id:"manual-variables-inside-the-block-editor",children:"Manual variables inside the Block editor"}),"\n",(0,a.jsxs)(e.p,{children:["If you want to add manual variables that only apply inside the Block editor you can use the ",(0,a.jsx)(e.code,{children:"variablesCustomEditor"})," key. Everything works the same as described in the ",(0,a.jsx)(e.strong,{children:"Manual variables"})," section.\nIf you define both ",(0,a.jsx)(e.code,{children:"variablesCustomEditor"})," and ",(0,a.jsx)(e.code,{children:"variables"}),", both will be output in the editor, but only ",(0,a.jsx)(e.code,{children:"variables"})," will be output on the frontend."]}),"\n",(0,a.jsx)(e.p,{children:(0,a.jsx)(e.strong,{children:"Manifest:"})}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-json",children:'{\n\t"attributes": {\n\t\t// ...\n\t},\n\t"variablesCustomEditor": [\n\t\t"--variable1: test1",\n\t\t"--variable2: test2",\n\t\t"--variable3: test3"\n\t]\n}\n'})}),"\n",(0,a.jsx)(e.p,{children:(0,a.jsx)(e.strong,{children:"Output:"})}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-css",children:"--variable1: test1;\n--variable2: test2;\n--variable3: test3;\n"})}),"\n",(0,a.jsx)(e.h2,{id:"additional-options-and-examples",children:"Additional options and examples"}),"\n",(0,a.jsx)(e.h3,{id:"color",children:"Color"}),"\n",(0,a.jsx)(e.p,{children:"Here is an example how to output global variable as a css variable."}),"\n",(0,a.jsx)(e.p,{children:(0,a.jsx)(e.strong,{children:"Manifest:"})}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-json",children:'{\n\t"componentClass": "typography",\n\t"attributes": {\n\t\t"typographyColor": {\n\t\t\t"type": "string",\n\t\t\t"default": "white"\n\t\t}\n\t},\n\t"variables": {\n\t\t"typographyColor": [\n\t\t\t{\n\t\t\t\t"variable": {\n\t\t\t\t\t"typography-color": "var(--global-colors-white)"\n\t\t\t\t}\n\t\t\t}\n\t\t]\n\t}\n}\n'})}),"\n",(0,a.jsx)(e.p,{children:(0,a.jsx)(e.strong,{children:"Output:"})}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-css",children:"--typography-color: var(--global-colors-white);\n"})}),"\n",(0,a.jsx)(e.h3,{id:"responsive",children:"Responsive"}),"\n",(0,a.jsx)(e.p,{children:"All variables are prepared to be responsive. If you set multiple keys in the manifest list that variable will be outputted in the correct media query. Breakpoints are taken from the global manifest and the order of the output breakpoints."}),"\n",(0,a.jsxs)(e.blockquote,{children:["\n",(0,a.jsx)(e.p,{children:"Global breakpoints must follow the convention from the smallest size to the largest."}),"\n"]}),"\n",(0,a.jsx)(e.p,{children:"If you don't specify breakpoint key, that item will not be wrapped in the media query."}),"\n",(0,a.jsx)(e.p,{children:"If you write breakpoint that isn't defined in the global manifest, that condition will be ignored."}),"\n",(0,a.jsx)(e.p,{children:(0,a.jsx)(e.strong,{children:"Manifest:"})}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-json",children:'{\n\t"componentClass": "typography",\n\t"attributes": {\n\t\t"typographySize": {\n\t\t\t"type": "string",\n\t\t\t"default": "120-default"\n\t\t}\n\t},\n\t"variables": {\n\t\t"typographySize": [\n\t\t\t{\n\t\t\t\t"variable": {\n\t\t\t\t\t"typography-size": "30px"\n\t\t\t\t}\n\t\t\t},\n\t\t\t{\n\t\t\t\t"breakpoint": "tablet",\n\t\t\t\t"variable": {\n\t\t\t\t\t"typography-size": "80px"\n\t\t\t\t}\n\t\t\t}\n\t\t\t{\n\t\t\t\t"breakpoint": "large",\n\t\t\t\t"variable": {\n\t\t\t\t\t"typography-size": "120px"\n\t\t\t\t}\n\t\t\t}\n\t\t]\n\t}\n}\n'})}),"\n",(0,a.jsx)(e.p,{children:(0,a.jsx)(e.strong,{children:"Output:"})}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-css",children:".typography[data-id='210c9bbf733ef5c6aa74c49168ac29a7'] {\n\t--typography-size: 30px;\n}\n\n@media(min-width: 1279px) {\n\t.typography[data-id='210c9bbf733ef5c6aa74c49168ac29a7'] {\n\t\t--typography-size: 80px;\n\t}\n}\n\n@media(min-width: 1920px) {\n\t.typography[data-id='210c9bbf733ef5c6aa74c49168ac29a7'] {\n\t\t--typography-size: 120px;\n\t}\n}\n"})}),"\n",(0,a.jsx)(e.h3,{id:"responsive-inverse",children:"Responsive Inverse"}),"\n",(0,a.jsxs)(e.p,{children:["By default, we use mobile first approach but if you need desktop first you can use ",(0,a.jsx)(e.code,{children:"inverse: true"})," key."]}),"\n",(0,a.jsxs)(e.blockquote,{children:["\n",(0,a.jsx)(e.p,{children:"If you have multiple mobile/desktop first breakpoints, output will sort them mobile first and then desktop first after that."}),"\n"]}),"\n",(0,a.jsx)(e.p,{children:(0,a.jsx)(e.strong,{children:"Manifest:"})}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-json",children:'{\n\t"componentClass": "typography",\n\t"attributes": {\n\t\t"typographySize": {\n\t\t\t"type": "string",\n\t\t\t"default": "120-default"\n\t\t}\n\t},\n\t"variables": {\n\t\t"typographySize": [\n\t\t\t{\n\t\t\t\t"variable": {\n\t\t\t\t\t"typography-size": "120px"\n\t\t\t\t}\n\t\t\t},\n\t\t\t{\n\t\t\t\t"breakpoint": "tablet",\n\t\t\t\t"inverse": true,\n\t\t\t\t"variable": {\n\t\t\t\t\t"typography-size": "80px"\n\t\t\t\t}\n\t\t\t}\n\t\t\t{\n\t\t\t\t"breakpoint": "mobile",\n\t\t\t\t"inverse": true,\n\t\t\t\t"variable": {\n\t\t\t\t\t"typography-size": "320px"\n\t\t\t\t}\n\t\t\t}\n\t\t]\n\t}\n}\n'})}),"\n",(0,a.jsx)(e.p,{children:(0,a.jsx)(e.strong,{children:"Output:"})}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-css",children:".typography[data-id='210c9bbf733ef5c6aa74c49168ac29a7'] {\n\t--typography-size: 120px;\n}\n\n@media(max-width: 1279px) {\n\t.typography[data-id='210c9bbf733ef5c6aa74c49168ac29a7'] {\n\t\t--typography-size: 80px;\n\t}\n}\n\n@media(max-width: 479px) {\n\t.typography[data-id='210c9bbf733ef5c6aa74c49168ac29a7'] {\n\t\t--typography-size: 30px;\n\t}\n}\n"})}),"\n",(0,a.jsx)(e.h3,{id:"attribute-value-replacement",children:"Attribute value replacement"}),"\n",(0,a.jsxs)(e.p,{children:["Attribute value replacement variable is used to return the attribute value where you want it in the css variables. To use it just put ",(0,a.jsx)(e.code,{children:"%value%"})," in you css variables."]}),"\n",(0,a.jsx)(e.p,{children:(0,a.jsx)(e.strong,{children:"Manifest:"})}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-json",children:'{\n\t"componentClass": "typography",\n\t"attributes": {\n\t\t"typographySize": {\n\t\t\t"type": "string",\n\t\t\t"default": "120"\n\t\t}\n\t},\n\t"variables": {\n\t\t"typographySize": [\n\t\t\t{\n\t\t\t\t"variable": {\n\t\t\t\t\t"typography-size": "30px"\n\t\t\t\t}\n\t\t\t},\n\t\t\t{\n\t\t\t\t"breakpoint": "tablet",\n\t\t\t\t"variable": {\n\t\t\t\t\t"typography-size": "80px"\n\t\t\t\t}\n\t\t\t}\n\t\t\t{\n\t\t\t\t"breakpoint": "large",\n\t\t\t\t"variable": {\n\t\t\t\t\t"typography-size": "%value%px"\n\t\t\t\t}\n\t\t\t}\n\t\t]\n\t}\n}\n'})}),"\n",(0,a.jsx)(e.p,{children:(0,a.jsx)(e.strong,{children:"Output:"})}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-css",children:".typography[data-id='210c9bbf733ef5c6aa74c49168ac29a7'] {\n\t--typography-size: 30px;\n}\n\n@media(min-width: 1279px) {\n\t.typography[data-id='210c9bbf733ef5c6aa74c49168ac29a7'] {\n\t\t--typography-size: 80px;\n\t}\n}\n\n@media(min-width: 1920px) {\n\t.typography[data-id='210c9bbf733ef5c6aa74c49168ac29a7'] {\n\t\t--typography-size: 120px;\n\t}\n}\n"})}),"\n",(0,a.jsx)(e.h2,{id:"responsive-variables",children:"Responsive variables"}),"\n",(0,a.jsxs)(e.p,{children:["Responsive variables are used for eliminating unnecessary code duplication. For example, if you have 4 separate attributes used for setting a responsive variable where all the attributes have the same output (e.g. ",(0,a.jsx)(e.code,{children:"%value%"}),"), the variables can get cluttered rather quickly."]}),"\n",(0,a.jsxs)(e.p,{children:["In a top-level manifest key ",(0,a.jsx)(e.code,{children:"responsiveAttributes"}),", you can place a new key (e.g. ",(0,a.jsx)(e.code,{children:"wrapperHide"}),") that represents a common key for your responsive variables. Inside of it, you can list your responsive variables (e.g. ",(0,a.jsx)(e.code,{children:"wrapperHideLarge"}),", ",(0,a.jsx)(e.code,{children:"wrapperHideDesktop"}),", ",(0,a.jsx)(e.code,{children:"wrapperHideTablet"}),", ",(0,a.jsx)(e.code,{children:"wrapperHideMobile"}),") as a key-value pair. The key represents a breakpoint name, and the value represents responsive variable(",(0,a.jsx)(e.code,{children:"breakpoint"}),": ",(0,a.jsx)(e.code,{children:"responsiveVariableName"}),"). Afterwards, you can add that common key inside the ",(0,a.jsx)(e.code,{children:"variables"})," (and/or ",(0,a.jsx)(e.code,{children:"variablesEditor"}),") key and configure the output template."]}),"\n",(0,a.jsxs)(e.p,{children:["Best practice is to have the attributes named consistently with your breakpoints - in the ",(0,a.jsx)(e.strong,{children:(0,a.jsx)(e.code,{children:"variableName``breakpointName"})})," format (see example below)."]}),"\n",(0,a.jsxs)(e.blockquote,{children:["\n",(0,a.jsxs)(e.p,{children:["If you need an extra variable, or are overriding some of the auto-generated variables (from the helper), the variables will be output after the responsive variables. (see ",(0,a.jsx)(e.strong,{children:"Example 2"}),")"]}),"\n"]}),"\n",(0,a.jsxs)(e.blockquote,{children:["\n",(0,a.jsxs)(e.p,{children:["Order of responsive attributes is important since generating variables relies on that order. Make sure to use the ",(0,a.jsx)(e.code,{children:"inverse"})," option properly."]}),"\n"]}),"\n",(0,a.jsx)(e.p,{children:(0,a.jsx)(e.strong,{children:"Example 1"})}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-json",children:'{\n\t"componentName": "wrapper",\n\t"title": "Wrapper",\n\t"componentClass": "wrapper",\n\t"attributes": {\n\t\t"wrapperHideLarge": {\n\t\t\t"type": "boolean",\n\t\t\t"default": false\n\t\t},\n\t\t"wrapperHideDesktop": {\n\t\t\t"type": "boolean"\n\t\t},\n\t\t"wrapperHideTablet": {\n\t\t\t"type": "boolean"\n\t\t}\n\t},\n\t"responsiveAttributes": {\n\t\t"wrapperHide": {\n\t\t\t"large": "wrapperHideLarge",\n\t\t\t"desktop": "wrapperHideDesktop",\n\t\t\t"tablet": "wrapperHideTablet"\n\t\t}\n\t},\n\t"variables": {\n\t\t"wrapperHide": {\n\t\t\t"true": [\n\t\t\t\t{\n\t\t\t\t\t"inverse": true,\n\t\t\t\t\t"variable": {\n\t\t\t\t\t\t"wrapper-display": "none"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t],\n\t\t\t"false": [\n\t\t\t\t{\n\t\t\t\t\t"inverse": true,\n\t\t\t\t\t"variable": {\n\t\t\t\t\t\t"wrapper-display": "var(--wrapper-display-type, grid)"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t}\n}\n'})}),"\n",(0,a.jsx)(e.p,{children:(0,a.jsx)(e.strong,{children:"Transformed:"})}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-json",children:'{\n\t"componentName": "wrapper",\n\t"title": "Wrapper",\n\t"componentClass": "wrapper",\n\t"attributes": {\n\t\t"wrapperHide": {\n\t\t\t"type": "boolean",\n\t\t\t"default": false\n\t\t}\n\t},\n\t"responsiveAttributes": {\n\t\t"wrapperHideLarge": {\n\t\t\t"type": "boolean",\n\t\t\t"default": false\n\t\t},\n\t\t"wrapperHideDesktop": {\n\t\t\t"type": "boolean"\n\t\t},\n\t\t"wrapperHideTablet": {\n\t\t\t"type": "boolean"\n\t\t}\n\t},\n\t"variables": {\n\t\t"wrapperHideLarge": {\n\t\t\t"true": [\n\t\t\t\t{\n\t\t\t\t\t"variable": {\n\t\t\t\t\t\t"wrapper-display": "none"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t],\n\t\t\t"false": [\n\t\t\t\t{\n\t\t\t\t\t"variable": {\n\t\t\t\t\t\t"wrapper-display": "var(--wrapper-display-type, grid)"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t]\n\t\t},\n\t\t"wrapperHideDesktop": {\n\t\t\t"true": [\n\t\t\t\t{\n\t\t\t\t\t"inverse": true,\n\t\t\t\t\t"breakpoint": "desktop",\n\t\t\t\t\t"variable": {\n\t\t\t\t\t\t"wrapper-display": "none"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t],\n\t\t\t"false": [\n\t\t\t\t{\n\t\t\t\t\t"inverse": true,\n\t\t\t\t\t"breakpoint": "desktop",\n\t\t\t\t\t"variable": {\n\t\t\t\t\t\t"wrapper-display": "var(--wrapper-display-type, grid)"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t]\n\t\t},\n\t\t"wrapperHideTablet": {\n\t\t\t"true": [\n\t\t\t\t{\n\t\t\t\t\t"inverse": true,\n\t\t\t\t\t"breakpoint": "desktop",\n\t\t\t\t\t"variable": {\n\t\t\t\t\t\t"wrapper-display": "none"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t],\n\t\t\t"false": [\n\t\t\t\t{\n\t\t\t\t\t"inverse": true,\n\t\t\t\t\t"breakpoint": "desktop",\n\t\t\t\t\t"variable": {\n\t\t\t\t\t\t"wrapper-display": "var(--wrapper-display-type, grid)"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t}\n}\n'})}),"\n",(0,a.jsx)(e.p,{children:(0,a.jsx)(e.strong,{children:"Output"})}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-css",children:".wrapper[data-id='210c9bbf733ef5c6aa74c49168ac29a7'] {\n\t--wrapper-display: var(--wrapper-display-type, grid);\n}\n@media(max-width: 1920px) {\n\t.wrapper[data-id='210c9bbf733ef5c6aa74c49168ac29a7'] {\n\t\t--wrapper-display: none;\n\t}\n}\n@media(max-width: 1279px) {\n\t.wrapper[data-id='210c9bbf733ef5c6aa74c49168ac29a7'] {\n\t\t--wrapper-display: var(--wrapper-display-type, grid);\n\t}\n}\n\n"})}),"\n",(0,a.jsx)(e.p,{children:(0,a.jsx)(e.strong,{children:"Example 2"})}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-json",children:'{\n\t"componentName": "wrapper",\n\t"title": "Wrapper",\n\t"componentClass": "wrapper",\n\t"attributes": {\n\t\t"wrapperHideLarge": {\n\t\t\t"type": "boolean",\n\t\t\t"default": false\n\t\t},\n\t\t"wrapperHideDesktop": {\n\t\t\t"type": "boolean"\n\t\t},\n\t\t"wrapperHideTablet": {\n\t\t\t"type": "boolean"\n\t\t}\n\t},\n\t"responsiveAttributes": {\n\t\t"wrapperHide": {\n\t\t\t"large": "wrapperHideLarge",\n\t\t\t"desktop": "wrapperHideDesktop",\n\t\t\t"tablet": "wrapperHideTablet"\n\t\t}\n\t},\n\t"variables": {\n\t\t"wrapperHide": {\n\t\t\t"true": [\n\t\t\t\t{\n\t\t\t\t\t"inverse": true,\n\t\t\t\t\t"variable": {\n\t\t\t\t\t\t"wrapper-display": "none"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t],\n\t\t\t"false": [\n\t\t\t\t{\n\t\t\t\t\t"inverse": true,\n\t\t\t\t\t"variable": {\n\t\t\t\t\t\t"wrapper-display": "var(--wrapper-display-type, grid)"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t]\n\t\t},\n\t\t"wrapperHideLarge": {\n\t\t\t"true": [\n\t\t\t\t{\n\t\t\t\t\t"inverse": true,\n\t\t\t\t\t"variable": {\n\t\t\t\t\t\t"wrapper-display": "block",\n\t\t\t\t\t\t"wrapper-opacity": 0\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t],\n\t\t}\n\t}\n}\n'})}),"\n",(0,a.jsx)(e.p,{children:(0,a.jsx)(e.strong,{children:"Output"})}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-css",children:".wrapper[data-id='210c9bbf733ef5c6aa74c49168ac29a7'] {\n\t--wrapper-display: none;\n\t--wrapper-display: block;\n\t--wrapper-opacity: 0;\n}\n\n"})})]})}function c(t={}){const{wrapper:e}={...(0,r.a)(),...t.components};return e?(0,a.jsx)(e,{...t,children:(0,a.jsx)(d,{...t})}):d(t)}},11151:(t,e,n)=>{n.d(e,{Z:()=>l,a:()=>i});var a=n(67294);const r={},s=a.createContext(r);function i(t){const e=a.useContext(s);return a.useMemo((function(){return"function"==typeof t?t(e):{...e,...t}}),[e,t])}function l(t){let e;return e=t.disableParentContext?"function"==typeof t.components?t.components(r):t.components||r:i(t.components),a.createElement(s.Provider,{value:e},t.children)}}}]); \ No newline at end of file diff --git a/assets/js/029c29d9.980fab0b.js b/assets/js/029c29d9.980fab0b.js deleted file mode 100644 index d19ffabbb..000000000 --- a/assets/js/029c29d9.980fab0b.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_eightshift_docs=self.webpackChunk_eightshift_docs||[]).push([[28177],{97146:function(t,e,n){n.r(e),n.d(e,{assets:function(){return m},contentTitle:function(){return u},default:function(){return h},frontMatter:function(){return s},metadata:function(){return d},toc:function(){return p}});var r=n(87462),a=n(63366),i=(n(67294),n(3905)),o=n(51733),l=["components"],s={id:"greenhouse",title:"Greenhouse"},u=void 0,d={unversionedId:"php/filters/integrations/greenhouse",id:"php/filters/integrations/greenhouse",title:"Greenhouse",description:"",source:"@site/forms/php/filters/integrations/greenhouse.mdx",sourceDirName:"php/filters/integrations",slug:"/php/filters/integrations/greenhouse",permalink:"/forms/php/filters/integrations/greenhouse",draft:!1,tags:[],version:"current",frontMatter:{id:"greenhouse",title:"Greenhouse"},sidebar:"forms",previous:{title:"Goodbits",permalink:"/forms/php/filters/integrations/goodbits"},next:{title:"HubSpot",permalink:"/forms/php/filters/integrations/hubspot"}},m={},p=[],c={toc:p},f="wrapper";function h(t){var e=t.components,n=(0,a.Z)(t,l);return(0,i.kt)(f,(0,r.Z)({},c,n,{components:e,mdxType:"MDXLayout"}),(0,i.kt)(o.k,{name:"Greenhouse",filter:"greenhouse",mdxType:"IntegrationFilters"}))}h.isMDXComponent=!0},51733:function(t,e,n){n.d(e,{k:function(){return o}});var r=n(67294),a=n(60614),i=n(61684);function o(t){var e=t.filter,n=t.onlyUse,o=void 0===n?["dataFilter","prePostParamsFilter","order"]:n;return r.createElement(r.Fragment,null,o.includes("dataFilter")&&r.createElement(r.Fragment,null,r.createElement("h2",null,"Data"),r.createElement("p",null,"This filter is used if you want to change form fields data before output. This way you can change components map before it is parsed inside Block Editor."),r.createElement("p",null,"For example if you want to set all fields to have 2 columns layout this will be the filter to use."),r.createElement(a.Z,{language:"php"},(0,i.p)("\n\t\t\t\t\tadd_filter('es_forms_integrations_"+e+'_data\', function(array $data, string $formId): array {\n\t\t\t\t\t\tforeach ($data as $index => $field) {\n\t\t\t\t\t\t\t$component = $field[\'component\'] ?? \'\';\n\n\t\t\t\t\t\t\tif (!$component) {\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$name = $field["{$component}Name"] ?? \'\';\n\n\t\t\t\t\t\t\tif (!$name) {\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tswitch ($name) {\n\t\t\t\t\t\t\t\tcase \'firstname\':\n\t\t\t\t\t\t\t\tcase \'lastname\':\n\t\t\t\t\t\t\t\t\t$data[$index]["{$component}FieldWidthMobile"] = 12;\n\t\t\t\t\t\t\t\t\t$data[$index]["{$component}FieldWidthLarge"] = 6;\n\t\t\t\t\t\t\t\t\t$data[$index]["{$component}DisabledOptions"] = array_merge(\n\t\t\t\t\t\t\t\t\t\t$data[$index]["{$component}DisabledOptions"],\n\t\t\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t\t\t"{$component}FieldWidthMobile",\n\t\t\t\t\t\t\t\t\t\t\t"{$component}FieldWidthLarge",\n\t\t\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn $data;\n\t\t\t\t\t}, 10, 2);\n\t\t\t\t\t'))),o.includes("prePostParamsFilter")&&r.createElement(r.Fragment,null,r.createElement("h2",null,"Pre post params"),r.createElement("p",null,"Change form fields data before it is sent to the external integration. This way you can manipulate data and provide additional mapping to the data sent to the integration."),r.createElement(a.Z,{language:"php"},(0,i.p)("\n\t\t\t\t\t\t\tadd_filter('es_forms_integrations_"+e+"_pre_post_params', function(array $params): array {\n\t\t\t\t\t\t\t\t$formSubmissionPageLt = $params['form_submission_page_lt']['value'] ?? '';\n\n\t\t\t\t\t\t\t\tif ($formSubmissionPageLt) {\n\t\t\t\t\t\t\t\t\t$params['ib-submission-source'] = [\n\t\t\t\t\t\t\t\t\t\t'name' => 'ib-submission-source',\n\t\t\t\t\t\t\t\t\t\t'value' => $formSubmissionPageLt,\n\t\t\t\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t\t\t\t'internalType' => '',\n\t\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\treturn $params;\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t"))),o.includes("order")&&r.createElement(r.Fragment,null,r.createElement("h2",null,"Order fields"),r.createElement("p",null,"Forces a specific form fields order, regardless of one set in the editor. Fields that are not defined here will follow the natural in-editor order."),r.createElement("p",null,"Not all fields need to have an order defined. For example, if you want to make sure ",r.createElement("code",null,"firstname"),", ",r.createElement("code",null,"lastname")," and ",r.createElement("code",null,"email")," are displayed first, this filter can help."),r.createElement(a.Z,{language:"php"},(0,i.p)("\n\t\t\t\t\t\t\tadd_filter('es_forms_integrations_"+e+"_order', function(): array {\n\t\t\t\t\t\t\t\treturn [\n\t\t\t\t\t\t\t\t\t'firstname',\n\t\t\t\t\t\t\t\t\t'lastname',\n\t\t\t\t\t\t\t\t\t'email',\n\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t"))))}},61684:function(t,e,n){function r(t){for(var e=t.split(/\n/g);0===(null==(n=e[0])?void 0:n.replace(/\s/g,"").length);){var n;e.shift()}for(;0===(null==(r=e[e.length-1])?void 0:r.replace(/\s/g,"").length);){var r;e.pop()}var a=t.split(/\n/g).filter((function(t){return t.replace(/\s/g,"").length>0})).map((function(t){var e,n;return null!=(e=null==(n=t.match(/^\s*/))||null==(n=n[0])?void 0:n.length)?e:0})),i=Math.min.apply(Math,a);return e.map((function(t){return t.slice(i)})).join("\n")}n.d(e,{p:function(){return r}})}}]); \ No newline at end of file diff --git a/assets/js/029c29d9.b8fd188b.js b/assets/js/029c29d9.b8fd188b.js new file mode 100644 index 000000000..1811d3937 --- /dev/null +++ b/assets/js/029c29d9.b8fd188b.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_eightshift_docs=self.webpackChunk_eightshift_docs||[]).push([[28177],{4415:(t,e,n)=>{n.r(e),n.d(e,{assets:()=>d,contentTitle:()=>o,default:()=>c,frontMatter:()=>s,metadata:()=>l,toc:()=>p});var i=n(85893),r=n(11151),a=n(51733);const s={id:"greenhouse",title:"Greenhouse"},o=void 0,l={id:"php/filters/integrations/greenhouse",title:"Greenhouse",description:"",source:"@site/forms/php/filters/integrations/greenhouse.mdx",sourceDirName:"php/filters/integrations",slug:"/php/filters/integrations/greenhouse",permalink:"/forms/php/filters/integrations/greenhouse",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{id:"greenhouse",title:"Greenhouse"},sidebar:"forms",previous:{title:"Goodbits",permalink:"/forms/php/filters/integrations/goodbits"},next:{title:"HubSpot",permalink:"/forms/php/filters/integrations/hubspot"}},d={},p=[];function h(t){return(0,i.jsx)(a.k,{name:"Greenhouse",filter:"greenhouse"})}function c(t={}){const{wrapper:e}={...(0,r.a)(),...t.components};return e?(0,i.jsx)(e,{...t,children:(0,i.jsx)(h,{...t})}):h()}},51733:(t,e,n)=>{n.d(e,{k:()=>s});n(67294);var i=n(9286),r=n(61684),a=n(85893);function s(t){const{filter:e,onlyUse:n=["dataFilter","prePostParamsFilter","order"]}=t;return(0,a.jsxs)(a.Fragment,{children:[n.includes("dataFilter")&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h2",{children:"Data"}),(0,a.jsx)("p",{children:"This filter is used if you want to change form fields data before output. This way you can change components map before it is parsed inside Block Editor."}),(0,a.jsx)("p",{children:"For example if you want to set all fields to have 2 columns layout this will be the filter to use."}),(0,a.jsx)(i.Z,{language:"php",children:(0,r.p)("\n\t\t\t\t\tadd_filter('es_forms_integrations_"+e+'_data\', function(array $data, string $formId): array {\n\t\t\t\t\t\tforeach ($data as $index => $field) {\n\t\t\t\t\t\t\t$component = $field[\'component\'] ?? \'\';\n\n\t\t\t\t\t\t\tif (!$component) {\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$name = $field["{$component}Name"] ?? \'\';\n\n\t\t\t\t\t\t\tif (!$name) {\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tswitch ($name) {\n\t\t\t\t\t\t\t\tcase \'firstname\':\n\t\t\t\t\t\t\t\tcase \'lastname\':\n\t\t\t\t\t\t\t\t\t$data[$index]["{$component}FieldWidthMobile"] = 12;\n\t\t\t\t\t\t\t\t\t$data[$index]["{$component}FieldWidthLarge"] = 6;\n\t\t\t\t\t\t\t\t\t$data[$index]["{$component}DisabledOptions"] = array_merge(\n\t\t\t\t\t\t\t\t\t\t$data[$index]["{$component}DisabledOptions"],\n\t\t\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t\t\t"{$component}FieldWidthMobile",\n\t\t\t\t\t\t\t\t\t\t\t"{$component}FieldWidthLarge",\n\t\t\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn $data;\n\t\t\t\t\t}, 10, 2);\n\t\t\t\t\t')})]}),n.includes("prePostParamsFilter")&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h2",{children:"Pre post params"}),(0,a.jsx)("p",{children:"Change form fields data before it is sent to the external integration. This way you can manipulate data and provide additional mapping to the data sent to the integration."}),(0,a.jsx)(i.Z,{language:"php",children:(0,r.p)("\n\t\t\t\t\t\t\tadd_filter('es_forms_integrations_"+e+"_pre_post_params', function(array $params): array {\n\t\t\t\t\t\t\t\t$formSubmissionPageLt = $params['form_submission_page_lt']['value'] ?? '';\n\n\t\t\t\t\t\t\t\tif ($formSubmissionPageLt) {\n\t\t\t\t\t\t\t\t\t$params['ib-submission-source'] = [\n\t\t\t\t\t\t\t\t\t\t'name' => 'ib-submission-source',\n\t\t\t\t\t\t\t\t\t\t'value' => $formSubmissionPageLt,\n\t\t\t\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t\t\t\t'internalType' => '',\n\t\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\treturn $params;\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t")})]}),n.includes("order")&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h2",{children:"Order fields"}),(0,a.jsx)("p",{children:"Forces a specific form fields order, regardless of one set in the editor. Fields that are not defined here will follow the natural in-editor order."}),(0,a.jsxs)("p",{children:["Not all fields need to have an order defined. For example, if you want to make sure ",(0,a.jsx)("code",{children:"firstname"}),", ",(0,a.jsx)("code",{children:"lastname"})," and ",(0,a.jsx)("code",{children:"email"})," are displayed first, this filter can help."]}),(0,a.jsx)(i.Z,{language:"php",children:(0,r.p)("\n\t\t\t\t\t\t\tadd_filter('es_forms_integrations_"+e+"_order', function(): array {\n\t\t\t\t\t\t\t\treturn [\n\t\t\t\t\t\t\t\t\t'firstname',\n\t\t\t\t\t\t\t\t\t'lastname',\n\t\t\t\t\t\t\t\t\t'email',\n\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t")})]})]})}},61684:(t,e,n)=>{function i(t){const e=t.split(/\n/g);for(;0===(null==(n=e[0])?void 0:n.replace(/\s/g,"").length);){var n;e.shift()}for(;0===(null==(i=e[e.length-1])?void 0:i.replace(/\s/g,"").length);){var i;e.pop()}const r=t.split(/\n/g).filter((t=>t.replace(/\s/g,"").length>0)).map((t=>{var e,n;return null!=(e=null==(n=t.match(/^\s*/))||null==(n=n[0])?void 0:n.length)?e:0})),a=Math.min(...r);return e.map((t=>t.slice(a))).join("\n")}n.d(e,{p:()=>i})}}]); \ No newline at end of file diff --git a/assets/js/02b9869f.37245be8.js b/assets/js/02b9869f.37245be8.js deleted file mode 100644 index 240925be9..000000000 --- a/assets/js/02b9869f.37245be8.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_eightshift_docs=self.webpackChunk_eightshift_docs||[]).push([[52592],{3905:function(e,t,r){r.d(t,{Zo:function(){return u},kt:function(){return d}});var o=r(67294);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function s(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var i=o.createContext({}),c=function(e){var t=o.useContext(i),r=t;return e&&(r="function"==typeof e?e(t):s(s({},t),e)),r},u=function(e){var t=c(e.components);return o.createElement(i.Provider,{value:t},e.children)},p="mdxType",b={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},f=o.forwardRef((function(e,t){var r=e.components,n=e.mdxType,a=e.originalType,i=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),p=c(r),f=n,d=p["".concat(i,".").concat(f)]||p[f]||b[f]||a;return r?o.createElement(d,s(s({ref:t},u),{},{components:r})):o.createElement(d,s({ref:t},u))}));function d(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var a=r.length,s=new Array(a);s[0]=f;var l={};for(var i in t)hasOwnProperty.call(t,i)&&(l[i]=t[i]);l.originalType=e,l[p]="string"==typeof e?e:n,s[1]=l;for(var c=2;c{s.r(t),s.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>d,frontMatter:()=>n,metadata:()=>r,toc:()=>c});var o=s(85893),a=s(11151);const n={id:"blocks-reusable",title:"Reusable Blocks"},i=void 0,r={id:"basics/blocks-reusable",title:"Reusable Blocks",description:"docs-source",source:"@site/docs/basics/blocks-reusable.md",sourceDirName:"basics",slug:"/basics/blocks-reusable",permalink:"/docs/basics/blocks-reusable",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{id:"blocks-reusable",title:"Reusable Blocks"},sidebar:"docs",previous:{title:"Special Use Cases",permalink:"/docs/basics/blocks-special-use-cases"},next:{title:"Styles",permalink:"/docs/basics/blocks-styles"}},l={},c=[{value:"Register admin sidemenu",id:"register-admin-sidemenu",level:3},{value:"Use the reusable block as a partial",id:"use-the-reusable-block-as-a-partial",level:3}];function u(e){const t={a:"a",admonition:"admonition",code:"code",h3:"h3",img:"img",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,a.a)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.p,{children:(0,o.jsx)(t.a,{href:"https://github.com/infinum/eightshift-frontend-libs/tree/develop/blocks/init/src/Blocks/",children:(0,o.jsx)(t.img,{src:"https://img.shields.io/badge/source-eightshift--frontend--libs-yellow?style=for-the-badge&logo=javascript&labelColor=2a2a2a",alt:"docs-source"})})}),"\n",(0,o.jsx)(t.p,{children:"Block editor provides us with the reusable blocks out of the box. These blocks are a custom post type that holds blocks that you can call in your editor to reuse in multiple places. So if you change your reusable block that change will impact all places where this block is imported."}),"\n",(0,o.jsx)(t.h3,{id:"register-admin-sidemenu",children:"Register admin sidemenu"}),"\n",(0,o.jsx)(t.p,{children:"Reusable blocks can be accessed from the block editors options page but to help our editors, we like to add a new menu in the admin sidebar where you can easily access all your reusable blocks. If you use our custom blocks setup this sidebar menu will be added by default."}),"\n",(0,o.jsx)(t.h3,{id:"use-the-reusable-block-as-a-partial",children:"Use the reusable block as a partial"}),"\n",(0,o.jsx)(t.p,{children:"We also like to use a reusable block for website parts that were previously hardcoded in the theme and are not a part of the block editor. We like to use this footer of additional options in categories and terms."}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.strong,{children:"Here are the steps:"})}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsx)(t.li,{children:"Create a new reusable block for your partial."}),"\n",(0,o.jsx)(t.li,{children:"Create a config where you can configure what reusable block are you going to use in your theme. We like to use ACF PRO and its option to create a theme options page."}),"\n",(0,o.jsx)(t.li,{children:"Call this option in your theme and output your block."}),"\n"]}),"\n",(0,o.jsx)(t.p,{children:"The first two steps are easy enough, but here is an example for the third step:"}),"\n",(0,o.jsx)(t.p,{children:"footer.php"}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-php",children:"// Check if the footer partial is set and use the contents of it.\n$footerPartialId = '1'; // here you provide your way to get the option set in the second step.\n\nif (!empty($footerPartialId)) {\n\t$footerBlocks = parse_blocks(get_the_content(null, null, $footerPartialId));\n\n\tforeach ($footerBlocks as $block) {\n\t\techo wp_kses_post(\\apply_filters('the_content', \\render_block($block)));\n\t}\n}\n"})}),"\n",(0,o.jsx)(t.admonition,{type:"note",children:(0,o.jsx)(t.p,{children:"Notes about reusable blocks, they're not native WP search friendly (as in the content you only have the WP block comment markup that there's a specific reusable block there). So if you use a lot of these in the content of a page / post, it might affect your search relevancy."})})]})}function d(e={}){const{wrapper:t}={...(0,a.a)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(u,{...e})}):u(e)}},11151:(e,t,s)=>{s.d(t,{Z:()=>r,a:()=>i});var o=s(67294);const a={},n=o.createContext(a);function i(e){const t=o.useContext(n);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:i(e.components),o.createElement(n.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/048a2137.28ab7d87.js b/assets/js/048a2137.28ab7d87.js deleted file mode 100644 index 09d0aaec4..000000000 --- a/assets/js/048a2137.28ab7d87.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_eightshift_docs=self.webpackChunk_eightshift_docs||[]).push([[71036],{3905:function(e,n,t){t.d(n,{Zo:function(){return p},kt:function(){return m}});var o=t(67294);function r(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function i(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function a(e){for(var n=1;n=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var c=o.createContext({}),s=function(e){var n=o.useContext(c),t=n;return e&&(t="function"==typeof e?e(n):a(a({},n),e)),t},p=function(e){var n=s(e.components);return o.createElement(c.Provider,{value:n},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var n=e.children;return o.createElement(o.Fragment,{},n)}},f=o.forwardRef((function(e,n){var t=e.components,r=e.mdxType,i=e.originalType,c=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=s(t),f=r,m=u["".concat(c,".").concat(f)]||u[f]||d[f]||i;return t?o.createElement(m,a(a({ref:n},p),{},{components:t})):o.createElement(m,a({ref:n},p))}));function m(e,n){var t=arguments,r=n&&n.mdxType;if("string"==typeof e||r){var i=t.length,a=new Array(i);a[0]=f;var l={};for(var c in n)hasOwnProperty.call(n,c)&&(l[c]=n[c]);l.originalType=e,l[u]="string"==typeof e?e:r,a[1]=l;for(var s=2;s {\n\n ...\n\n return {\n // Load all projects config from eightshift-frontend-libs.\n ...project,\n\n plugins: [\n // Load all plugins config from eightshift-frontend-libs.\n ...project.plugins,\n\n // Add your custom implementation.\n new HtmlWebpackPlugin(),\n ],\n };\n};\n")),(0,i.kt)("h2",{id:"change-the-default-config"},"Change the default config"),(0,i.kt)("p",null,"Let's say you want to change what we made and adjust it to your specific needs. In that case, you should remove our functionality by providing the ",(0,i.kt)("inlineCode",{parentName:"p"},"overrides")," array and create your implementation. For example:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-js"},"const BrowserSyncPlugin = require('browser-sync-webpack-plugin');\n\nmodule.exports = (env, argv) => {\n\n const projectConfig = {\n config: {\n // ... everything from default setup\n },\n overrides: [\n 'browserSyncPlugin', // this removes our configuration.\n ],\n };\n\n // Generate Webpack config for this project using options object.\n const project = require('./node_modules/@eightshift/frontend-libs/webpack')(argv.mode, projectConfig);\n\n return {\n // Load all projects config from eightshift-frontend-libs.\n ...project,\n\n plugins: [\n // Load all plugins config from eightshift-frontend-libs.\n ...project.plugins,\n\n // This provides your configuration.\n new BrowserSyncPlugin({\n host: 'localhost',\n port: 3000,\n https: true,\n }),\n ],\n };\n")),(0,i.kt)("h2",{id:"add-a-new-entrypoint"},"Add a new entrypoint"),(0,i.kt)("p",null,"Let's say you want to add a new, separate JS and/or CSS build for some specific functionality. This functionality may or may not have anything to do with your WordPress theme or plugin, but it needs to be in separate files. To do that you'd need to add a new entrypoint for Webpack to build in ",(0,i.kt)("inlineCode",{parentName:"p"},"webpack.config.js"),":"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-js"},"module.exports = (env, argv) => {\n\n ...\n\n return {\n // Load all projects config from eightshift-frontend-libs.\n ...project,\n\n entry: {\n // Load all entry points config from eightshift-frontend-libs.\n ...project.entry,\n\n // Your custom build entrypoint.\n newBuild: path.resolve(projectConfig.config.projectDir, 'assets', 'application-newBuild.js'),\n },\n };\n};\n")),(0,i.kt)("p",null,"Next thing you'd do is create ",(0,i.kt)("inlineCode",{parentName:"p"},"application-newBuild.js")," in ",(0,i.kt)("inlineCode",{parentName:"p"},"assets/")," directory, in which you'd import and JS or SCSS partials. After restarting the build process, the results should be visible in ",(0,i.kt)("inlineCode",{parentName:"p"},"public/")," directory as new JS or CSS files."))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/048a2137.e8b17c24.js b/assets/js/048a2137.e8b17c24.js new file mode 100644 index 000000000..388ad6e5e --- /dev/null +++ b/assets/js/048a2137.e8b17c24.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_eightshift_docs=self.webpackChunk_eightshift_docs||[]).push([[71036],{34559:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>s,default:()=>u,frontMatter:()=>r,metadata:()=>a,toc:()=>l});var i=t(85893),o=t(11151);const r={id:"webpack",title:"Webpack"},s=void 0,a={id:"basics/webpack",title:"Webpack",description:"docs-source",source:"@site/docs/basics/webpack.md",sourceDirName:"basics",slug:"/basics/webpack",permalink:"/docs/basics/webpack",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{id:"webpack",title:"Webpack"},sidebar:"docs",previous:{title:"General",permalink:"/docs/basics/frontend"},next:{title:"SCSS Library",permalink:"/docs/basics/library"}},c={},l=[{value:"Override built-in functionality",id:"override-built-in-functionality",level:2},{value:"Add new custom functionality",id:"add-new-custom-functionality",level:2},{value:"Change the default config",id:"change-the-default-config",level:2},{value:"Add a new entrypoint",id:"add-a-new-entrypoint",level:2}];function d(e){const n={a:"a",code:"code",h2:"h2",img:"img",p:"p",pre:"pre",...(0,o.a)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.p,{children:(0,i.jsx)(n.a,{href:"https://github.com/infinum/eightshift-frontend-libs",children:(0,i.jsx)(n.img,{src:"https://img.shields.io/badge/source-eightshift--frontend--libs-yellow?style=for-the-badge&logo=javascript&labelColor=2a2a2a",alt:"docs-source"})})}),"\n",(0,i.jsxs)(n.p,{children:["At its core, Webpack is a static module bundler for modern JavaScript applications. When Webpack processes your application, it builds an internal dependency graph that maps every module your project needs and generates one or more bundles. ",(0,i.jsx)(n.a,{href:"https://webpack.js.org/concepts/",children:"Learn more about Webpack"}),"."]}),"\n",(0,i.jsx)(n.p,{children:"To put it simply, Webpack takes your development files and creates a production-ready version of them based on the config."}),"\n",(0,i.jsxs)(n.p,{children:["Eightshift Development Kit comes with everything set up out of the box. In the root of your project, you will find a file called ",(0,i.jsx)(n.code,{children:"webpack.config.js"}),". If you open it, you will see that the configuration is pulled from the Eightshift Frontend Libs library."]}),"\n",(0,i.jsx)(n.p,{children:"You can remove this config and write everything from scratch (keep in mind that this is a lot of work), or you can use our config and extend/remove whatever you need."}),"\n",(0,i.jsx)(n.h2,{id:"override-built-in-functionality",children:"Override built-in functionality"}),"\n",(0,i.jsxs)(n.p,{children:["To remove built-in functionality, add a new array to the config called ",(0,i.jsx)(n.code,{children:"overrides"}),".\nIf you provide any of the ",(0,i.jsx)(n.code,{children:"overrides"})," keys, it will remove that config from the feature from the build."]}),"\n",(0,i.jsx)(n.p,{children:"You can't change our config; you can only remove it and make your own."}),"\n",(0,i.jsx)(n.p,{children:"Here is a list of all the features that we use and how to remove them."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-js",children:"\nconst projectConfig = {\n config: {\n ... everything from default setup\n },\n overrides: [\n // Located in project.js\n 'application',\n 'applicationAdmin',\n 'applicationBlocks',\n 'applicationBlocksEditor',\n 'filename',\n\n // Located in base.js\n 'cleanWebpackPlugin',\n 'providePlugin',\n 'definePlugin',\n 'miniCssExtractPlugin',\n 'webpackManifestPlugin',\n 'dependencyExtractionWebpackPlugin',\n 'runtimeChunk',\n 'js',\n 'images',\n 'fonts',\n 'scss',\n\n // Located in development.js\n 'browserSyncPlugin',\n\n // Located in production.js\n 'terserPlugin',\n 'cssMinimizerPlugin',\n ],\n}\n"})}),"\n",(0,i.jsx)(n.h2,{id:"add-new-custom-functionality",children:"Add new custom functionality"}),"\n",(0,i.jsxs)(n.p,{children:["Let's say you want to add a custom ",(0,i.jsx)(n.code,{children:"html-webpack-plugin"})," to the build. You can simply use all the native ",(0,i.jsx)(n.a,{href:"https://webpack.js.org/guides/",children:"webpack features"}),", like in this example:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-js",children:"const HtmlWebpackPlugin = require('html-webpack-plugin');\n\nmodule.exports = (env, argv) => {\n\n ...\n\n return {\n // Load all projects config from eightshift-frontend-libs.\n ...project,\n\n plugins: [\n // Load all plugins config from eightshift-frontend-libs.\n ...project.plugins,\n\n // Add your custom implementation.\n new HtmlWebpackPlugin(),\n ],\n };\n};\n"})}),"\n",(0,i.jsx)(n.h2,{id:"change-the-default-config",children:"Change the default config"}),"\n",(0,i.jsxs)(n.p,{children:["Let's say you want to change what we made and adjust it to your specific needs. In that case, you should remove our functionality by providing the ",(0,i.jsx)(n.code,{children:"overrides"})," array and create your implementation. For example:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-js",children:"const BrowserSyncPlugin = require('browser-sync-webpack-plugin');\n\nmodule.exports = (env, argv) => {\n\n const projectConfig = {\n config: {\n // ... everything from default setup\n },\n overrides: [\n 'browserSyncPlugin', // this removes our configuration.\n ],\n };\n\n // Generate Webpack config for this project using options object.\n const project = require('./node_modules/@eightshift/frontend-libs/webpack')(argv.mode, projectConfig);\n\n return {\n // Load all projects config from eightshift-frontend-libs.\n ...project,\n\n plugins: [\n // Load all plugins config from eightshift-frontend-libs.\n ...project.plugins,\n\n // This provides your configuration.\n new BrowserSyncPlugin({\n host: 'localhost',\n port: 3000,\n https: true,\n }),\n ],\n };\n"})}),"\n",(0,i.jsx)(n.h2,{id:"add-a-new-entrypoint",children:"Add a new entrypoint"}),"\n",(0,i.jsxs)(n.p,{children:["Let's say you want to add a new, separate JS and/or CSS build for some specific functionality. This functionality may or may not have anything to do with your WordPress theme or plugin, but it needs to be in separate files. To do that you'd need to add a new entrypoint for Webpack to build in ",(0,i.jsx)(n.code,{children:"webpack.config.js"}),":"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-js",children:"module.exports = (env, argv) => {\n\n ...\n\n return {\n // Load all projects config from eightshift-frontend-libs.\n ...project,\n\n entry: {\n // Load all entry points config from eightshift-frontend-libs.\n ...project.entry,\n\n // Your custom build entrypoint.\n newBuild: path.resolve(projectConfig.config.projectDir, 'assets', 'application-newBuild.js'),\n },\n };\n};\n"})}),"\n",(0,i.jsxs)(n.p,{children:["Next thing you'd do is create ",(0,i.jsx)(n.code,{children:"application-newBuild.js"})," in ",(0,i.jsx)(n.code,{children:"assets/"})," directory, in which you'd import and JS or SCSS partials. After restarting the build process, the results should be visible in ",(0,i.jsx)(n.code,{children:"public/"})," directory as new JS or CSS files."]})]})}function u(e={}){const{wrapper:n}={...(0,o.a)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},11151:(e,n,t)=>{t.d(n,{Z:()=>a,a:()=>s});var i=t(67294);const o={},r=i.createContext(o);function s(e){const n=i.useContext(r);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:s(e.components),i.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/0655bd76.4c0ec105.js b/assets/js/0655bd76.4c0ec105.js new file mode 100644 index 000000000..c84f6ea16 --- /dev/null +++ b/assets/js/0655bd76.4c0ec105.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_eightshift_docs=self.webpackChunk_eightshift_docs||[]).push([[13894],{83685:(e,s,o)=>{o.r(s),o.d(s,{assets:()=>r,contentTitle:()=>i,default:()=>h,frontMatter:()=>c,metadata:()=>l,toc:()=>d});var t=o(85893),n=o(11151);const c={id:"blocks-structure-block-item",title:"Block Structure Item"},i=void 0,l={id:"legacy/v4/guides/blocks-structure-block-item",title:"Block Structure Item",description:"docs-source",source:"@site/docs/legacy/v4/guides/blocks-structure-block-item.md",sourceDirName:"legacy/v4/guides",slug:"/legacy/v4/guides/blocks-structure-block-item",permalink:"/docs/legacy/v4/guides/blocks-structure-block-item",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{id:"blocks-structure-block-item",title:"Block Structure Item"},sidebar:"docs",previous:{title:"Blocks Structure",permalink:"/docs/legacy/v4/guides/blocks-structure"},next:{title:"Component Structure",permalink:"/docs/legacy/v4/guides/blocks-structure-component"}},r={},d=[{value:"components",id:"components",level:3},{value:"block-name-block.js",id:"block-name-blockjs",level:3},{value:"block-name.php",id:"block-namephp",level:3},{value:"block-name-editor.scss",id:"block-name-editorscss",level:3},{value:"block-name-style.scss",id:"block-name-stylescss",level:3},{value:"manifest.json",id:"manifestjson",level:3}];function a(e){const s={a:"a",code:"code",em:"em",h3:"h3",img:"img",p:"p",pre:"pre",...(0,n.a)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.p,{children:(0,t.jsx)(s.a,{href:"https://github.com/infinum/eightshift-frontend-libs/tree/v2.0.0/blocks/init/src/blocks/custom/example",children:(0,t.jsx)(s.img,{src:"https://img.shields.io/badge/source-eigthshift--frontend--libs-yellow?style=for-the-badge&logo=javascript&labelColor=2a2a2a",alt:"docs-source"})})}),"\n",(0,t.jsxs)(s.p,{children:["For the library to work and register blocks dynamically, a specific folder structure and naming must be followed. Individual blocks are placed in the ",(0,t.jsx)(s.code,{children:"custom"})," folder."]}),"\n",(0,t.jsx)(s.p,{children:"Your custom block structure should look like this:"}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-shell",children:"|____block-name\n| |____components\n| | |____block-name-editor.js\n| | |____block-name-options.js\n| | |____block-name-toolbar.js\n| |____block-name-block.js\n| |____block-name.php\n| |____block-name-editor.scss\n| |____block-name-style.scss\n| |____manifest.json\n"})}),"\n",(0,t.jsxs)(s.p,{children:["For example, you can check ",(0,t.jsx)(s.a,{href:"/storybook",children:"storybook"}),"."]}),"\n",(0,t.jsx)(s.h3,{id:"components",children:"components"}),"\n",(0,t.jsxs)(s.p,{children:["Components folder holds three files ",(0,t.jsx)(s.code,{children:"block-name-options.js"}),", ",(0,t.jsx)(s.code,{children:"block-name-editor.js"})," and ",(0,t.jsx)(s.code,{children:"block-name-toolbars.js"}),". Each of these files represents a part of the Block Editor block that is used in the editor. We have separated options, editor and toolbar in separate components for the sake of readability and reusing components in different projects."]}),"\n",(0,t.jsx)(s.h3,{id:"block-name-blockjs",children:"block-name-block.js"}),"\n",(0,t.jsxs)(s.p,{children:["This file represents the ",(0,t.jsx)(s.code,{children:"edit"})," callback method used in WordPress ",(0,t.jsx)(s.code,{children:"registerBlockType"})," method.\nWe are not using the ",(0,t.jsx)(s.code,{children:"save"})," callback component because this library is used to create dynamic blocks. The ",(0,t.jsx)(s.code,{children:"edit"})," method describes how your block will be rendered in the editor once the block is used."]}),"\n",(0,t.jsx)(s.h3,{id:"block-namephp",children:"block-name.php"}),"\n",(0,t.jsxs)(s.p,{children:["This file will pass the properties you've set in the ",(0,t.jsx)(s.code,{children:"block-name.js"})," and use the ",(0,t.jsx)(s.code,{children:"render_block_view()"})," method from the ",(0,t.jsx)(s.a,{href:"https://github.com/infinum/eightshift-libs/tree/v2.0.0/src/blocks/class-blocks.php#L295",children:"eightshift libs"}),". It is used to provide front-end layout for your block."]}),"\n",(0,t.jsx)(s.h3,{id:"block-name-editorscss",children:"block-name-editor.scss"}),"\n",(0,t.jsx)(s.p,{children:"Holds only the editor styling for the block. You should be using this file to override styles in the editor set by the component. In 90% of cases, you will not need to write any overrides here. But if you are using any columns layout like a grid, flex, etc., you may need to add some corrections."}),"\n",(0,t.jsxs)(s.p,{children:["Corrections in the columns layout are necessary because Block Editor editor adds its additional HTML and you can't change it.\n",(0,t.jsx)(s.em,{children:"This file is optional"}),"."]}),"\n",(0,t.jsx)(s.h3,{id:"block-name-stylescss",children:"block-name-style.scss"}),"\n",(0,t.jsxs)(s.p,{children:["Holds all the front-end and editor styling for the component. Like the above file, in most cases, it can be avoided.\n",(0,t.jsx)(s.em,{children:"This file is optional"}),"."]}),"\n",(0,t.jsx)(s.h3,{id:"manifestjson",children:"manifest.json"}),"\n",(0,t.jsxs)(s.p,{children:["This file contains all the configuration required for a block to work. It's used in WordPress ",(0,t.jsx)(s.a,{href:"https://developer.wordpress.org/block-editor/developers/block-api/block-registration/",children:(0,t.jsx)(s.code,{children:"registerBlockType"})})," method to register a block."]}),"\n",(0,t.jsx)(s.p,{children:"It looks like this:"}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-json",children:'{\n "blockName": "button",\n "title": "Button",\n "description" : "Button block with custom settings.",\n "category": "eightshift",\n "icon": {\n "src": "editor-removeformatting"\n },\n "keywords": [\n "button",\n "btn",\n "link"\n ],\n "attributes": {\n "title": {\n "type": "string"\n }\n }\n}\n'})}),"\n",(0,t.jsxs)(s.p,{children:["For manifest.json details please check this ",(0,t.jsx)(s.a,{href:"/docs/legacy/v4/guides/blocks-structure-manifest",children:"link"}),"."]})]})}function h(e={}){const{wrapper:s}={...(0,n.a)(),...e.components};return s?(0,t.jsx)(s,{...e,children:(0,t.jsx)(a,{...e})}):a(e)}},11151:(e,s,o)=>{o.d(s,{Z:()=>l,a:()=>i});var t=o(67294);const n={},c=t.createContext(n);function i(e){const s=t.useContext(c);return t.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function l(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:i(e.components),t.createElement(c.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/0655bd76.6b0376dc.js b/assets/js/0655bd76.6b0376dc.js deleted file mode 100644 index 683726ec6..000000000 --- a/assets/js/0655bd76.6b0376dc.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_eightshift_docs=self.webpackChunk_eightshift_docs||[]).push([[13894],{3905:function(e,t,n){n.d(t,{Zo:function(){return u},kt:function(){return m}});var o=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function l(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var a=o.createContext({}),c=function(e){var t=o.useContext(a),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},u=function(e){var t=c(e.components);return o.createElement(a.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},k=o.forwardRef((function(e,t){var n=e.components,r=e.mdxType,s=e.originalType,a=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),p=c(n),k=r,m=p["".concat(a,".").concat(k)]||p[k]||d[k]||s;return n?o.createElement(m,l(l({ref:t},u),{},{components:n})):o.createElement(m,l({ref:t},u))}));function m(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var s=n.length,l=new Array(s);l[0]=k;var i={};for(var a in t)hasOwnProperty.call(t,a)&&(i[a]=t[a]);i.originalType=e,i[p]="string"==typeof e?e:r,l[1]=i;for(var c=2;c{i.r(t),i.d(t,{assets:()=>c,contentTitle:()=>a,default:()=>u,frontMatter:()=>s,metadata:()=>l,toc:()=>h});var n=i(85893),r=i(11151),o=i(12987);const s={id:"cache",title:"Cache"},a=void 0,l={id:"features/cache",title:"Cache",description:"Eightshift Forms utilizes WordPress's internal cache tools to store integration API response data, reducing API calls and improving site performance. Clear the cache via our global settings page to retrieve fresh data from the API.",source:"@site/forms/features/cache.mdx",sourceDirName:"features",slug:"/features/cache",permalink:"/forms/features/cache",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{id:"cache",title:"Cache"},sidebar:"forms",previous:{title:"Locations",permalink:"/forms/features/locations"},next:{title:"Debugging",permalink:"/forms/features/debug"}},c={},h=[{value:"Integration cache",id:"integration-cache",level:2},{value:"Country",id:"country",level:2},{value:"Validation labels",id:"validation-labels",level:2}];function d(e){const t={admonition:"admonition",code:"code",h2:"h2",img:"img",p:"p",...(0,r.a)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.p,{children:"Eightshift Forms utilizes WordPress's internal cache tools to store integration API response data, reducing API calls and improving site performance. Clear the cache via our global settings page to retrieve fresh data from the API."}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"Cache screen",src:i(74365).Z+"",width:"656",height:"881"})}),"\n",(0,n.jsx)(t.h2,{id:"integration-cache",children:"Integration cache"}),"\n",(0,n.jsx)(t.p,{children:"For example, if you are using HubSpot integration, we pull the API data and store it in the cache. When you need to show the form on the front end, we no longer pull the data from the API but from the cache. This way, we can reduce the number of API calls and improve the site's performance. If you change the form fields on HubSpot, you should clear the cache before pulling the data again."}),"\n",(0,n.jsx)(t.p,{children:"When using forms editor builder there is also an cache clear button in the block editor sidebar options."}),"\n",(0,n.jsx)(t.admonition,{type:"note",children:(0,n.jsx)(t.p,{children:"The integration cache is stored for 60 minutes."})}),"\n",(0,n.jsx)(t.h2,{id:"country",children:"Country"}),"\n",(0,n.jsxs)(t.p,{children:["The country list is set using the ",(0,n.jsx)(t.code,{children:"JSON"})," format in the repository, and we use the WordPress internal cache to store it for a short time. This way, we don't need to read the file from the disk every time. You should clear the cache by changing the country list using WordPress filters."]}),"\n",(0,n.jsx)(t.admonition,{type:"note",children:(0,n.jsx)(t.p,{children:"The country cache is stored for 3 minutes."})}),"\n",(0,n.jsx)(t.h2,{id:"validation-labels",children:"Validation labels"}),"\n",(0,n.jsx)(t.p,{children:"The validation label is a list we use to provide UX responses in every form interaction on the front end. This list is extensive, so we reduced the load time by storing it in the WordPress internal cache. You should clear the cache if you change the validation labels using the provided WordPress filters."}),"\n",(0,n.jsx)(t.admonition,{type:"note",children:(0,n.jsx)(t.p,{children:"The validation labels cache is stored for 3 minutes."})}),"\n",(0,n.jsx)(o.nk,{type:"forms",video:"cache"})]})}function u(e={}){const{wrapper:t}={...(0,r.a)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(d,{...e})}):d(e)}},12987:(e,t,i)=>{i.d(t,{pE:()=>s,BY:()=>a,nk:()=>o});i(67294);const n=JSON.parse('{"forms":{"playlist":{"video":"https://www.youtube.com/playlist?list=PLFjp6yaGpZJvzqWGi3y9vZ3prra0h5Emx","label":"Eightshift Forms playlist"},"videos":{"intro":{"video":"3jPVuGjh488","label":"Introduction to Eightshift Forms"},"basics":{"video":"4BnTXHviZkI","label":"Getting familiar with Eightshift forms"},"firstForm":{"video":"qcsr7QGFmV4","label":"Step-by-step guide to creating your first form"},"integrations":{"video":"r2KEVIkNt04","label":"Integrating third-party services"},"integrationsSync":{"video":"JyfO328bq08","label":"Syncing your forms with third-party integrations"},"cache":{"video":"gX997f3fUcI","label":"Don\'t be afraid of caching"}}}}');var r=i(85893);function o(e){const{type:t,isPlaylist:i=!1,useTitle:o=!0,title:s="Tutorials",video:a,subtitlePrefix:l=""}=e;let c="",h="";i?(h=n[t].playlist.label,c=n[t].playlist.video):(h=n[t].videos[a].label,c=n[t].videos[a].video),l&&(h=l+" "+h);const d="https://www.youtube.com/embed/"+c;return(0,r.jsxs)(r.Fragment,{children:[o&&(0,r.jsx)("h2",{children:s}),h&&(0,r.jsx)("h3",{children:h}),(0,r.jsx)("iframe",{width:"560",height:"315",src:d,title:"YouTube video player",frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowFullScreen:!0})]})}function s(e){const{type:t}=e;return(0,r.jsx)(r.Fragment,{children:Object.keys(n[t].videos).map(((e,i)=>{const n=String(i+1).padStart(2,"0")+" - ";return(0,r.jsx)(o,{type:t,video:e,useTitle:0===i,subtitlePrefix:n},i)}))})}function a(e){const{type:t,label:i,link:o}=e;let s=null!=i?i:n[t].playlist.label,a=null!=o?o:n[t].playlist.video;return(0,r.jsx)(r.Fragment,{children:(0,r.jsx)("a",{href:a,target:"_blank",rel:"noopener noreferrer",children:s})})}},74365:(e,t,i)=>{i.d(t,{Z:()=>n});const n=i.p+"assets/images/cache-a839138fb8da75731a7016b08b85b7d6.webp"},11151:(e,t,i)=>{i.d(t,{Z:()=>a,a:()=>s});var n=i(67294);const r={},o=n.createContext(r);function s(e){const t=n.useContext(o);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:s(e.components),n.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/066ec25f.fb976b1f.js b/assets/js/066ec25f.fb976b1f.js deleted file mode 100644 index 258486c67..000000000 --- a/assets/js/066ec25f.fb976b1f.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_eightshift_docs=self.webpackChunk_eightshift_docs||[]).push([[74758],{3905:function(e,t,r){r.d(t,{Zo:function(){return u},kt:function(){return h}});var n=r(67294);function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var s=n.createContext({}),c=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):a(a({},t),e)),r},u=function(e){var t=c(e.components);return n.createElement(s.Provider,{value:t},e.children)},d="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},p=n.forwardRef((function(e,t){var r=e.components,i=e.mdxType,o=e.originalType,s=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),d=c(r),p=i,h=d["".concat(s,".").concat(p)]||d[p]||f[p]||o;return r?n.createElement(h,a(a({ref:t},u),{},{components:r})):n.createElement(h,a({ref:t},u))}));function h(e,t){var r=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var o=r.length,a=new Array(o);a[0]=p;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[d]="string"==typeof e?e:i,a[1]=l;for(var c=2;c=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var i=o.createContext({}),c=function(e){var t=o.useContext(i),r=t;return e&&(r="function"==typeof e?e(t):l(l({},t),e)),r},u=function(e){var t=c(e.components);return o.createElement(i.Provider,{value:t},e.children)},p="mdxType",b={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},f=o.forwardRef((function(e,t){var r=e.components,a=e.mdxType,n=e.originalType,i=e.parentName,u=s(e,["components","mdxType","originalType","parentName"]),p=c(r),f=a,d=p["".concat(i,".").concat(f)]||p[f]||b[f]||n;return r?o.createElement(d,l(l({ref:t},u),{},{components:r})):o.createElement(d,l({ref:t},u))}));function d(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var n=r.length,l=new Array(n);l[0]=f;var s={};for(var i in t)hasOwnProperty.call(t,i)&&(s[i]=t[i]);s.originalType=e,s[p]="string"==typeof e?e:a,l[1]=s;for(var c=2;c{t.r(s),t.d(s,{assets:()=>n,contentTitle:()=>r,default:()=>h,frontMatter:()=>l,metadata:()=>i,toc:()=>c});var o=t(85893),a=t(11151);const l={id:"blocks-reusable",title:"Reusable Blocks",sidebar_label:"Reusable Blocks"},r=void 0,i={id:"legacy/v5/basics/blocks-reusable",title:"Reusable Blocks",description:"docs-source",source:"@site/docs/legacy/v5/basics/blocks-reusable.md",sourceDirName:"legacy/v5/basics",slug:"/legacy/v5/basics/blocks-reusable",permalink:"/docs/legacy/v5/basics/blocks-reusable",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{id:"blocks-reusable",title:"Reusable Blocks",sidebar_label:"Reusable Blocks"},sidebar:"docs",previous:{title:"Special Use Cases",permalink:"/docs/legacy/v5/basics/blocks-special-use-cases"},next:{title:"Styles",permalink:"/docs/legacy/v5/basics/blocks-styles"}},n={},c=[{value:"Register admin sidemenu",id:"register-admin-sidemenu",level:3},{value:"Use the reusable block as a partial",id:"use-the-reusable-block-as-a-partial",level:3}];function u(e){const s={a:"a",blockquote:"blockquote",code:"code",h3:"h3",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",...(0,a.a)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s.p,{children:(0,o.jsx)(s.a,{href:"https://github.com/infinum/eightshift-frontend-libs/tree/4.0.0/blocks/init/src/blocks/",children:(0,o.jsx)(s.img,{src:"https://img.shields.io/badge/source-eigthshift--frontend--libs-yellow?style=for-the-badge&logo=javascript&labelColor=2a2a2a",alt:"docs-source"})})}),"\n",(0,o.jsx)(s.p,{children:"Block editor provides us with the reusable blocks out of the box. These blocks are a custom post type that holds blocks that you can call in your editor to reuse in multiple places. So if you change your reusable block that change will impact all places where this block is imported."}),"\n",(0,o.jsx)(s.h3,{id:"register-admin-sidemenu",children:"Register admin sidemenu"}),"\n",(0,o.jsx)(s.p,{children:"Reusable blocks can be accessed from the block editors options page but to help our editors, we like to add a new menu in the admin sidebar where you can easily access all your reusable blocks. If you use our custom blocks setup this sidebar menu will be added by default."}),"\n",(0,o.jsx)(s.h3,{id:"use-the-reusable-block-as-a-partial",children:"Use the reusable block as a partial"}),"\n",(0,o.jsx)(s.p,{children:"We also like to use a reusable block for website parts that were previously hardcoded in the theme and are not a part of the block editor. We like to use this footer of additional options in categories and terms."}),"\n",(0,o.jsx)(s.p,{children:(0,o.jsx)(s.strong,{children:"Here are the steps:"})}),"\n",(0,o.jsxs)(s.ol,{children:["\n",(0,o.jsx)(s.li,{children:"Create a new reusable block for your partial."}),"\n",(0,o.jsx)(s.li,{children:"Create a config where you can configure what reusable block are you going to use in your theme. We like to use ACF PRO and its option to create a theme options page."}),"\n",(0,o.jsx)(s.li,{children:"Call this option in your theme and output your block."}),"\n"]}),"\n",(0,o.jsx)(s.p,{children:"The first two steps are easy enough, but here is an example for the third step:"}),"\n",(0,o.jsx)(s.p,{children:"footer.php"}),"\n",(0,o.jsx)(s.pre,{children:(0,o.jsx)(s.code,{className:"language-php",children:"// Check if the footer partial is set and use the contents of it.\n$footerPartialId = '1'; // here you provide your way to get the option set in the second step.\n\nif (!empty($footerPartialId)) {\n\t$footerBlocks = parse_blocks(get_the_content(null, null, $footerPartialId));\n\n\tforeach ($footerBlocks as $block) {\n\t\techo wp_kses_post(\\apply_filters('the_content', \\render_block($block)));\n\t}\n}\n"})}),"\n",(0,o.jsxs)(s.blockquote,{children:["\n",(0,o.jsx)(s.p,{children:"Notes about reusable blocks, they're not native WP search friendly (as in the content you only have the WP block comment markup that there's a specific reusable block there). So if you use a lot of these in the content of a page / post, it might affect your search relevancy."}),"\n"]})]})}function h(e={}){const{wrapper:s}={...(0,a.a)(),...e.components};return s?(0,o.jsx)(s,{...e,children:(0,o.jsx)(u,{...e})}):u(e)}},11151:(e,s,t)=>{t.d(s,{Z:()=>i,a:()=>r});var o=t(67294);const a={},l=o.createContext(a);function r(e){const s=o.useContext(l);return o.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function i(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:r(e.components),o.createElement(l.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/07af796b.2f967954.js b/assets/js/07af796b.2f967954.js deleted file mode 100644 index 20ec8ce33..000000000 --- a/assets/js/07af796b.2f967954.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_eightshift_docs=self.webpackChunk_eightshift_docs||[]).push([[88394],{3905:function(e,t,n){n.d(t,{Zo:function(){return c},kt:function(){return k}});var o=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function a(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=o.createContext({}),p=function(e){var t=o.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):a(a({},t),e)),n},c=function(e){var t=p(e.components);return o.createElement(s.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},h=o.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,s=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),d=p(n),h=r,k=d["".concat(s,".").concat(h)]||d[h]||u[h]||i;return n?o.createElement(k,a(a({ref:t},c),{},{components:n})):o.createElement(k,a({ref:t},c))}));function k(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,a=new Array(i);a[0]=h;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[d]="string"==typeof e?e:r,a[1]=l;for(var p=2;p{n.r(s),n.d(s,{assets:()=>d,contentTitle:()=>r,default:()=>h,frontMatter:()=>t,metadata:()=>l,toc:()=>c});var i=n(85893),o=n(11151);const t={id:"block-structure",title:"Block Structure",sidebar_label:"Block Structure"},r=void 0,l={id:"legacy/v5/basics/block-structure",title:"Block Structure",description:"docs-source",source:"@site/docs/legacy/v5/basics/block-structure.md",sourceDirName:"legacy/v5/basics",slug:"/legacy/v5/basics/block-structure",permalink:"/docs/legacy/v5/basics/block-structure",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{id:"block-structure",title:"Block Structure",sidebar_label:"Block Structure"},sidebar:"docs",previous:{title:"Global Manifest",permalink:"/docs/legacy/v5/basics/blocks-global-manifest"},next:{title:"Component Structure",permalink:"/docs/legacy/v5/basics/blocks-component-structure"}},d={},c=[{value:"assets",id:"assets",level:3},{value:"components",id:"components",level:3},{value:"docs",id:"docs",level:3},{value:"heading-block.js",id:"heading-blockjs",level:3},{value:"heading.php",id:"headingphp",level:3},{value:"heading-editor.scss",id:"heading-editorscss",level:3},{value:"heading-style.scss",id:"heading-stylescss",level:3},{value:"heading-hooks.js",id:"heading-hooksjs",level:3},{value:"heading-transforms.js",id:"heading-transformsjs",level:3},{value:"manifest.json",id:"manifestjson",level:3}];function a(e){const s={a:"a",code:"code",em:"em",h3:"h3",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,o.a)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.p,{children:(0,i.jsx)(s.a,{href:"https://github.com/infinum/eightshift-frontend-libs/tree/4.0.0/blocks/init/src/blocks/",children:(0,i.jsx)(s.img,{src:"https://img.shields.io/badge/source-eigthshift--frontend--libs-yellow?style=for-the-badge&logo=javascript&labelColor=2a2a2a",alt:"docs-source"})})}),"\n",(0,i.jsxs)(s.p,{children:["Your custom blocks are placed in the ",(0,i.jsx)(s.code,{children:"src/Blocks/custom"})," folder."]}),"\n",(0,i.jsxs)(s.p,{children:["For example, let's take the heading block (just replace ",(0,i.jsx)(s.code,{children:"heading"})," with your block name)."]}),"\n",(0,i.jsxs)(s.p,{children:["We suggest you always use the full name and never abbreviate the block name. If your block has multiple words, you should separate them by a dash, for example, ",(0,i.jsx)(s.code,{children:"featured-post-block.js"}),"."]}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.strong,{children:"Block structure should look like this:"})}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["heading","\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["assets","\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"index.js"}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["components","\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"heading-editor.js"}),"\n",(0,i.jsx)(s.li,{children:"heading-options.js"}),"\n",(0,i.jsx)(s.li,{children:"heading-toolbar.js"}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["docs","\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"story.js"}),"\n",(0,i.jsx)(s.li,{children:"readme.mdx"}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(s.li,{children:"heading-block.js"}),"\n",(0,i.jsx)(s.li,{children:"heading.php"}),"\n",(0,i.jsx)(s.li,{children:"heading-editor.scss"}),"\n",(0,i.jsx)(s.li,{children:"heading-style.scss"}),"\n",(0,i.jsx)(s.li,{children:"heading-hooks.js"}),"\n",(0,i.jsx)(s.li,{children:"heading-transforms.js"}),"\n",(0,i.jsx)(s.li,{children:"manifest.json"}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"assets",children:"assets"}),"\n",(0,i.jsxs)(s.p,{children:["In this folder, you'll define all the custom JavaScript functionality for your block that will only be used on the front end of the application. You must provide the ",(0,i.jsx)(s.code,{children:"index.js"})," file in this folder, as a starting point, and the rest is up to you. We recommend using ",(0,i.jsx)(s.a,{href:"dynamic-import",children:"JavaScript dynamic imports"})," for all your front-end scripts. This ensures that the JavaScript is only loaded in the application when it is used and not before. By using dynamic import, you optimize your application and make it load faster."]}),"\n",(0,i.jsx)(s.h3,{id:"components",children:"components"}),"\n",(0,i.jsxs)(s.p,{children:["Components folder holds three files: ",(0,i.jsx)(s.code,{children:"heading-options.js"}),", ",(0,i.jsx)(s.code,{children:"heading-editor.js"}),", and ",(0,i.jsx)(s.code,{children:"heading-toolbars.js"}),". Each of these files represents a part of the block editor block that is used in the editor. We have separated options, editor, and toolbar into separate components for readability and reusing components in different projects."]}),"\n",(0,i.jsx)(s.h3,{id:"docs",children:"docs"}),"\n",(0,i.jsx)(s.p,{children:"Contains everything a block needs to be run inside the Storybook. This part is optional. However, it will speed up your development time and provide you with much-needed documentation."}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"story.js"})," - Storybook entry point for your block. All blocks have the exact same story."]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"readme.mdx"})," - README document that describes your block and provides the documentation."]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"heading-blockjs",children:"heading-block.js"}),"\n",(0,i.jsxs)(s.p,{children:["This file represents the ",(0,i.jsx)(s.code,{children:"edit"})," callback method used in WordPress ",(0,i.jsx)(s.code,{children:"registerBlockType"})," method.\nWe are not using the ",(0,i.jsx)(s.code,{children:"save"})," callback method because we are creating dynamic blocks. The ",(0,i.jsx)(s.code,{children:"edit"})," method describes how your block will be rendered in the editor once the block is used. In this file, you can use more advanced stuff like hooks and all the top-level block features."]}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"heading-options.js"})," - must be wrapped with the ",(0,i.jsx)(s.code,{children:"InspectorControls"})," component from the core. This will ensure that options are shown in the proper place in the block editor (sidebar)."]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"heading-toolbar.js"})," - must be wrapped with the ",(0,i.jsx)(s.code,{children:"BlockControls"})," component from the core. This will ensure that the toolbar is shown in the proper place in the block editor (floating or fixed toolbar)."]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"heading-editor.js"})," - must ",(0,i.jsx)(s.strong,{children:"not"})," be wrapped with any top-level component. This will ensure that the editor component is shown in the proper place in the block editor (editor)."]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"headingphp",children:"heading.php"}),"\n",(0,i.jsxs)(s.p,{children:["This file is the front-end representation of a block. In this file, you will have all the attributes you defined in the ",(0,i.jsx)(s.code,{children:"manifest.json"})," file."]}),"\n",(0,i.jsx)(s.p,{children:"In the blocks PHP part, you always have these two properties (props) available:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"$attributes"})," - This prop contains all the attributes you defined in the ",(0,i.jsx)(s.code,{children:"manifest.json"})," and all the attributes saved in the database."]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"$innerBlockContent"})," - This prop contains all the inner block details when you set your block to contain inner blocks."]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"heading-editorscss",children:"heading-editor.scss"}),"\n",(0,i.jsx)(s.p,{children:"Holds only the editor styling for the block. You should be using this file to override styles in the editor set by the component. In 90% of cases, you will not need to write any overrides here. But if you are using any column layout like a grid, flex, etc., you may need to add some corrections."}),"\n",(0,i.jsx)(s.p,{children:"Corrections in the grid layout are necessary because the block editor adds additional HTML and we can't change it."}),"\n",(0,i.jsxs)(s.p,{children:["Please read the ",(0,i.jsx)(s.a,{href:"writing-styles",children:"writing styles"})," chapter for more details."]}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.em,{children:"This file is optional"}),"."]}),"\n",(0,i.jsx)(s.h3,{id:"heading-stylescss",children:"heading-style.scss"}),"\n",(0,i.jsx)(s.p,{children:"Holds all the front-end and editor styling for the component."}),"\n",(0,i.jsxs)(s.p,{children:["Please read the ",(0,i.jsx)(s.a,{href:"writing-styles",children:"writing styles"})," chapter for more details."]}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.em,{children:"This file is optional"}),"."]}),"\n",(0,i.jsx)(s.h3,{id:"heading-hooksjs",children:"heading-hooks.js"}),"\n",(0,i.jsxs)(s.p,{children:["Here you can provide any custom block editor hook you need. For documentation, please refer to ",(0,i.jsx)(s.a,{href:"https://developer.wordpress.org/block-editor/developers/filters/block-filters/",children:"this link"}),". This file is going to be merged in the ",(0,i.jsx)(s.code,{children:"registerBlockType"})," method."]}),"\n",(0,i.jsx)(s.h3,{id:"heading-transformsjs",children:"heading-transforms.js"}),"\n",(0,i.jsxs)(s.p,{children:["Here you can provide any custom block transformation you need. For documentation, please refer to ",(0,i.jsx)(s.a,{href:"https://developer.wordpress.org/block-editor/developers/block-api/block-transforms/",children:"this link"}),". This file is going to be merged in the ",(0,i.jsx)(s.code,{children:"registerBlockType"})," method."]}),"\n",(0,i.jsx)(s.h3,{id:"manifestjson",children:"manifest.json"}),"\n",(0,i.jsxs)(s.p,{children:["This file contains all the configuration required for a block to work. It's used in WordPress ",(0,i.jsx)(s.a,{href:"https://developer.wordpress.org/block-editor/developers/block-api/block-registration/",children:(0,i.jsx)(s.code,{children:"registerBlockType"})})," method to register a block."]}),"\n",(0,i.jsxs)(s.p,{children:["For more details, check the ",(0,i.jsx)(s.a,{href:"block-manifest",children:"block manifest"})," chapter."]})]})}function h(e={}){const{wrapper:s}={...(0,o.a)(),...e.components};return s?(0,i.jsx)(s,{...e,children:(0,i.jsx)(a,{...e})}):a(e)}},11151:(e,s,n)=>{n.d(s,{Z:()=>l,a:()=>r});var i=n(67294);const o={},t=i.createContext(o);function r(e){const s=i.useContext(t);return i.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function l(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:r(e.components),i.createElement(t.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/07b5dca2.324e6672.js b/assets/js/07b5dca2.324e6672.js new file mode 100644 index 000000000..a6a712e4d --- /dev/null +++ b/assets/js/07b5dca2.324e6672.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_eightshift_docs=self.webpackChunk_eightshift_docs||[]).push([[47546],{13384:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>o,contentTitle:()=>s,default:()=>p,frontMatter:()=>r,metadata:()=>l,toc:()=>c});var t=i(85893),a=i(11151);const r={id:"active-campaign",title:"ActiveCampaign"},s=void 0,l={id:"integrations/active-campaign",title:"ActiveCampaign",description:"ActiveCampaign is an integrated email marketing, automation, sales software, and CRM platform.",source:"@site/forms/integrations/active-campaign.md",sourceDirName:"integrations",slug:"/integrations/active-campaign",permalink:"/forms/integrations/active-campaign",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{id:"active-campaign",title:"ActiveCampaign"},sidebar:"forms",previous:{title:"Intro",permalink:"/forms/integrations/intro"},next:{title:"Airtable",permalink:"/forms/integrations/airtable"}},o={},c=[{value:"Website",id:"website",level:3},{value:"API Version",id:"api-version",level:3},{value:"API Documentation",id:"api-documentation",level:3},{value:"Integration type",id:"integration-type",level:3},{value:"Supported fields:",id:"supported-fields",level:3}];function d(e){const n={a:"a",h3:"h3",li:"li",p:"p",ul:"ul",...(0,a.a)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.p,{children:"ActiveCampaign is an integrated email marketing, automation, sales software, and CRM platform."}),"\n",(0,t.jsx)(n.h3,{id:"website",children:"Website"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://www.activecampaign.com/",children:"Visit website"})}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"api-version",children:"API Version"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"V3"}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"api-documentation",children:"API Documentation"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://developers.activecampaign.com/reference/overview",children:"Documentation"})}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"integration-type",children:"Integration type"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Form builder provided by the service."}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"supported-fields",children:"Supported fields:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Full name"}),"\n",(0,t.jsx)(n.li,{children:"First name"}),"\n",(0,t.jsx)(n.li,{children:"Last name"}),"\n",(0,t.jsx)(n.li,{children:"Hidden"}),"\n",(0,t.jsx)(n.li,{children:"Textarea"}),"\n",(0,t.jsx)(n.li,{children:"Email"}),"\n",(0,t.jsx)(n.li,{children:"Phone"}),"\n",(0,t.jsx)(n.li,{children:"Checkbox"}),"\n",(0,t.jsx)(n.li,{children:"Radio"}),"\n",(0,t.jsx)(n.li,{children:"Dropdown"}),"\n"]})]})}function p(e={}){const{wrapper:n}={...(0,a.a)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}},11151:(e,n,i)=>{i.d(n,{Z:()=>l,a:()=>s});var t=i(67294);const a={},r=t.createContext(a);function s(e){const n=t.useContext(r);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:s(e.components),t.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/07b5dca2.451c5a58.js b/assets/js/07b5dca2.451c5a58.js deleted file mode 100644 index a0d28c244..000000000 --- a/assets/js/07b5dca2.451c5a58.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_eightshift_docs=self.webpackChunk_eightshift_docs||[]).push([[47546],{3905:function(e,t,n){n.d(t,{Zo:function(){return p},kt:function(){return d}});var r=n(67294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var c=r.createContext({}),u=function(e){var t=r.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},p=function(e){var t=u(e.components);return r.createElement(c.Provider,{value:t},e.children)},s="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,i=e.mdxType,a=e.originalType,c=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),s=u(n),f=i,d=s["".concat(c,".").concat(f)]||s[f]||m[f]||a;return n?r.createElement(d,o(o({ref:t},p),{},{components:n})):r.createElement(d,o({ref:t},p))}));function d(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=n.length,o=new Array(a);o[0]=f;var l={};for(var c in t)hasOwnProperty.call(t,c)&&(l[c]=t[c]);l.originalType=e,l[s]="string"==typeof e?e:i,o[1]=l;for(var u=2;u{o.r(t),o.d(t,{assets:()=>l,contentTitle:()=>n,default:()=>u,frontMatter:()=>s,metadata:()=>c,toc:()=>m});var r=o(85893),i=o(11151);const s={id:"redirect-timeout",title:"Redirect timeout"},n=void 0,c={id:"php/filters/block/form/redirect-timeout",title:"Redirect timeout",description:"This filter allows you to change the delay for the redirect after a successful form submission, in milliseconds.",source:"@site/forms/php/filters/block/form/redirect-timeout.md",sourceDirName:"php/filters/block/form",slug:"/php/filters/block/form/redirect-timeout",permalink:"/forms/php/filters/block/form/redirect-timeout",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{id:"redirect-timeout",title:"Redirect timeout"},sidebar:"forms",previous:{title:"Custom form styles",permalink:"/forms/php/filters/block/forms/style-options"},next:{title:"Global message timeout",permalink:"/forms/php/filters/block/form/hide-global-msg-timeout"}},l={},m=[];function f(e){const t={code:"code",p:"p",pre:"pre",...(0,i.a)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.p,{children:"This filter allows you to change the delay for the redirect after a successful form submission, in milliseconds."}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-php",children:"add_filter('es_forms_block_form_redirection_timeout', function(): string {\n\treturn '1000'; // 1 seconds.\n})\n\n\n"})})]})}function u(e={}){const{wrapper:t}={...(0,i.a)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(f,{...e})}):f(e)}},11151:(e,t,o)=>{o.d(t,{Z:()=>c,a:()=>n});var r=o(67294);const i={},s=r.createContext(i);function n(e){const t=r.useContext(s);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:n(e.components),r.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/07fb059b.8dd1fa9c.js b/assets/js/07fb059b.8dd1fa9c.js deleted file mode 100644 index 569aeef66..000000000 --- a/assets/js/07fb059b.8dd1fa9c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_eightshift_docs=self.webpackChunk_eightshift_docs||[]).push([[4309],{3905:function(e,t,r){r.d(t,{Zo:function(){return a},kt:function(){return d}});var n=r(67294);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var u=n.createContext({}),s=function(e){var t=n.useContext(u),r=t;return e&&(r="function"==typeof e?e(t):c(c({},t),e)),r},a=function(e){var t=s(e.components);return n.createElement(u.Provider,{value:t},e.children)},f="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,i=e.originalType,u=e.parentName,a=l(e,["components","mdxType","originalType","parentName"]),f=s(r),m=o,d=f["".concat(u,".").concat(m)]||f[m]||p[m]||i;return r?n.createElement(d,c(c({ref:t},a),{},{components:r})):n.createElement(d,c({ref:t},a))}));function d(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var i=r.length,c=new Array(i);c[0]=m;var l={};for(var u in t)hasOwnProperty.call(t,u)&&(l[u]=t[u]);l.originalType=e,l[f]="string"==typeof e?e:o,c[1]=l;for(var s=2;s{s.exports=JSON.parse('{"label":"custom post type","permalink":"/blog/tags/custom-post-type","allTagsPath":"/blog/tags","count":1,"unlisted":false}')}}]); \ No newline at end of file diff --git a/assets/js/08cebe36.1a21f92a.js b/assets/js/08cebe36.1a21f92a.js deleted file mode 100644 index e50857110..000000000 --- a/assets/js/08cebe36.1a21f92a.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_eightshift_docs=self.webpackChunk_eightshift_docs||[]).push([[85985],{3905:function(e,t,o){o.d(t,{Zo:function(){return u},kt:function(){return m}});var r=o(67294);function n(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function a(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,r)}return o}function s(e){for(var t=1;t=0||(n[o]=e[o]);return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(n[o]=e[o])}return n}var l=r.createContext({}),c=function(e){var t=r.useContext(l),o=t;return e&&(o="function"==typeof e?e(t):s(s({},t),e)),o},u=function(e){var t=c(e.components);return r.createElement(l.Provider,{value:t},e.children)},p="mdxType",y={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var o=e.components,n=e.mdxType,a=e.originalType,l=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),p=c(o),d=n,m=p["".concat(l,".").concat(d)]||p[d]||y[d]||a;return o?r.createElement(m,s(s({ref:t},u),{},{components:o})):r.createElement(m,s({ref:t},u))}));function m(e,t){var o=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var a=o.length,s=new Array(a);s[0]=d;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i[p]="string"==typeof e?e:n,s[1]=i;for(var c=2;c{t.r(e),t.d(e,{assets:()=>c,contentTitle:()=>i,default:()=>h,frontMatter:()=>r,metadata:()=>l,toc:()=>a});var s=t(85893),n=t(11151);const r={id:"blocks-storybook",title:"Storybook"},i=void 0,l={id:"basics/blocks-storybook",title:"Storybook",description:"docs-source",source:"@site/docs/basics/blocks-storybook.md",sourceDirName:"basics",slug:"/basics/blocks-storybook",permalink:"/docs/basics/blocks-storybook",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{id:"blocks-storybook",title:"Storybook"},sidebar:"docs",previous:{title:"Styles",permalink:"/docs/basics/blocks-styles"},next:{title:"Helpers",permalink:"/docs/basics/helpers"}},c={},a=[{value:"Create my custom story",id:"create-my-custom-story",level:2},{value:"Block story",id:"block-story",level:3},{value:"Variation story",id:"variation-story",level:3},{value:"Component story",id:"component-story",level:3}];function d(o){const e={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",img:"img",p:"p",pre:"pre",...(0,n.a)(),...o.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(e.p,{children:(0,s.jsx)(e.a,{href:"https://github.com/infinum/eightshift-frontend-libs/tree/develop/blocks/init/src/Blocks/",children:(0,s.jsx)(e.img,{src:"https://img.shields.io/badge/source-eightshift--frontend--libs-yellow?style=for-the-badge&logo=javascript&labelColor=2a2a2a",alt:"docs-source"})})}),"\n",(0,s.jsx)(e.p,{children:"We have created a full storybook that hosts all our blocks/components/variations with a fully functional block editor, where you can try out how blocks work and behave."}),"\n",(0,s.jsxs)(e.admonition,{type:"tip",children:[(0,s.jsx)(e.p,{children:"To speed up project build time, Eightshift Boilerplate doesn't come with Storybook out of the box; you need to install it manually."}),(0,s.jsx)("br",{}),(0,s.jsx)(e.p,{children:"To install Storybook to your project, just type this command in you terminal and follow the instructions:"}),(0,s.jsx)(e.pre,{children:(0,s.jsx)(e.code,{className:"language-bash",children:"wp boilerplate blocks use-storybook\n"})})]}),"\n",(0,s.jsx)(e.h2,{id:"create-my-custom-story",children:"Create my custom story"}),"\n",(0,s.jsx)(e.p,{children:"You don't need to have stories in your block/component, but we provided you with the ability to use the Storybook for all of your blocks and components. Why not use it? It will speed up your development time. Trust us."}),"\n",(0,s.jsx)(e.p,{children:"If you used our way to set up your project, you already have Storybook ready to use. To start the Storybook, run this command:"}),"\n",(0,s.jsx)(e.pre,{children:(0,s.jsx)(e.code,{className:"language-bash",children:"npm run storybook\n"})}),"\n",(0,s.jsxs)(e.p,{children:["In your project, you also have the ",(0,s.jsx)(e.code,{children:".storybook"})," folder, where all the configuration for Storybook is defined."]}),"\n",(0,s.jsxs)(e.p,{children:["For your blocks/components/variation to be seen in the Storybook, you must have the ",(0,s.jsx)(e.code,{children:"docs"})," folder and the ",(0,s.jsx)(e.code,{children:"story.js"})," file in it."]}),"\n",(0,s.jsx)(e.h3,{id:"block-story",children:"Block story"}),"\n",(0,s.jsxs)(e.p,{children:["For all blocks, you don't need to write anything because all blocks stories look the same here is an example of the ",(0,s.jsx)(e.a,{href:"https://github.com/infinum/eightshift-frontend-libs/blob/develop/blocks/init/src/Blocks/custom/heading/docs/story.js",children:"heading block story"}),"."]}),"\n",(0,s.jsxs)(e.p,{children:["We pull all the data from the manifest.json file and all the attribute values from the ",(0,s.jsx)(e.code,{children:"example"})," key."]}),"\n",(0,s.jsx)(e.h3,{id:"variation-story",children:"Variation story"}),"\n",(0,s.jsx)(e.p,{children:"The same as the block's story."}),"\n",(0,s.jsx)(e.h3,{id:"component-story",children:"Component story"}),"\n",(0,s.jsxs)(e.p,{children:["Components are not smart and can't be automatically built into the story. This is why you must create a story of all your components and mock the data.\nYou should set all the mock data in the component ",(0,s.jsx)(e.code,{children:"manifest.json"})," and just provide the story's implementation. We have provided you with the helper that uses example data from you manifests and respects the component's dependency tree. Here you can see and example of ",(0,s.jsx)(e.a,{href:"https://github.com/infinum/eightshift-frontend-libs/blob/develop/blocks/init/src/Blocks/components/card/docs/story.js",children:"card component story"}),"."]})]})}function h(o={}){const{wrapper:e}={...(0,n.a)(),...o.components};return e?(0,s.jsx)(e,{...o,children:(0,s.jsx)(d,{...o})}):d(o)}},11151:(o,e,t)=>{t.d(e,{Z:()=>l,a:()=>i});var s=t(67294);const n={},r=s.createContext(n);function i(o){const e=s.useContext(r);return s.useMemo((function(){return"function"==typeof o?o(e):{...e,...o}}),[e,o])}function l(o){let e;return e=o.disableParentContext?"function"==typeof o.components?o.components(n):o.components||n:i(o.components),s.createElement(r.Provider,{value:e},o.children)}}}]); \ No newline at end of file diff --git a/assets/js/092d0294.2493c130.js b/assets/js/092d0294.2493c130.js deleted file mode 100644 index 4d583948a..000000000 --- a/assets/js/092d0294.2493c130.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_eightshift_docs=self.webpackChunk_eightshift_docs||[]).push([[48792],{3905:function(e,t,r){r.d(t,{Zo:function(){return u},kt:function(){return y}});var n=r(67294);function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var l=n.createContext({}),p=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):a(a({},t),e)),r},u=function(e){var t=p(e.components);return n.createElement(l.Provider,{value:t},e.children)},s="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,i=e.mdxType,o=e.originalType,l=e.parentName,u=c(e,["components","mdxType","originalType","parentName"]),s=p(r),m=i,y=s["".concat(l,".").concat(m)]||s[m]||f[m]||o;return r?n.createElement(y,a(a({ref:t},u),{},{components:r})):n.createElement(y,a({ref:t},u))}));function y(e,t){var r=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var o=r.length,a=new Array(o);a[0]=m;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c[s]="string"==typeof e?e:i,a[1]=c;for(var p=2;p{i.r(t),i.d(t,{assets:()=>l,contentTitle:()=>s,default:()=>m,frontMatter:()=>o,metadata:()=>a,toc:()=>c});var n=i(85893),r=i(11151);const o={id:"mailer",title:"Mailer"},s=void 0,a={id:"php/filters/integrations/mailer",title:"Mailer",description:"Coming soon",source:"@site/forms/php/filters/integrations/mailer.mdx",sourceDirName:"php/filters/integrations",slug:"/php/filters/integrations/mailer",permalink:"/forms/php/filters/integrations/mailer",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{id:"mailer",title:"Mailer"},sidebar:"forms",previous:{title:"Mailchimp",permalink:"/forms/php/filters/integrations/mailchimp"},next:{title:"MailerLite",permalink:"/forms/php/filters/integrations/mailerlite"}},l={},c=[];function p(e){const t={em:"em",p:"p",...(0,r.a)(),...e.components};return(0,n.jsx)(t.p,{children:(0,n.jsx)(t.em,{children:"Coming soon"})})}function m(e={}){const{wrapper:t}={...(0,r.a)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(p,{...e})}):p(e)}},11151:(e,t,i)=>{i.d(t,{Z:()=>a,a:()=>s});var n=i(67294);const r={},o=n.createContext(r);function s(e){const t=n.useContext(o);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:s(e.components),n.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/09d8acdc.3e0471c0.js b/assets/js/09d8acdc.3e0471c0.js new file mode 100644 index 000000000..c20ab009f --- /dev/null +++ b/assets/js/09d8acdc.3e0471c0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_eightshift_docs=self.webpackChunk_eightshift_docs||[]).push([[2040],{1025:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>r,default:()=>h,frontMatter:()=>i,metadata:()=>a,toc:()=>l});var s=n(85893),o=n(11151);const i={id:"blocks-attributes",title:"Attributes"},r=void 0,a={id:"legacy/v6/basics/blocks-attributes",title:"Attributes",description:"docs-source",source:"@site/docs/legacy/v6/basics/blocks-attributes.md",sourceDirName:"legacy/v6/basics",slug:"/legacy/v6/basics/blocks-attributes",permalink:"/docs/legacy/v6/basics/blocks-attributes",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{id:"blocks-attributes",title:"Attributes"},sidebar:"docs",previous:{title:"Component Manifest",permalink:"/docs/legacy/v6/basics/blocks-component-manifest"},next:{title:"Component in a Block",permalink:"/docs/legacy/v6/basics/blocks-component-in-block"}},c={},l=[{value:"Structure",id:"structure",level:3}];function d(e){const t={a:"a",code:"code",h3:"h3",img:"img",p:"p",pre:"pre",...(0,o.a)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.p,{children:(0,s.jsx)(t.a,{href:"https://github.com/infinum/eightshift-frontend-libs/tree/5.0.0/blocks/init/src/blocks/",children:(0,s.jsx)(t.img,{src:"https://img.shields.io/badge/source-eightshift--frontend--libs-yellow?style=for-the-badge&logo=javascript&labelColor=2a2a2a",alt:"docs-source"})})}),"\n",(0,s.jsxs)(t.p,{children:["If you were to reference the native ",(0,s.jsx)(t.a,{href:"https://developer.wordpress.org/block-editor/developers/block-api/block-attributes/",children:"WordPress documentation"})," about attributes in blocks, you can see that they support different types of attributes. In this chapter, we want to point out that you should avoid using objects for your attributes."]}),"\n",(0,s.jsxs)(t.p,{children:["The reason for this is that you can't control what key of that object is stored in the database once the attribute changes. When you change one key, the ",(0,s.jsx)(t.code,{children:"setAttributes"})," method will store the entire object in the database and you'll lose the best feature of block editor - the default attributes."]}),"\n",(0,s.jsx)(t.p,{children:"You can also look at this from the Reacts perspective: setting the entire object every time the key changes is bad for performance."}),"\n",(0,s.jsx)(t.p,{children:"Yes, you can use objects, but we recommend using them only when you want to store multiple keys simultaneously."}),"\n",(0,s.jsx)(t.h3,{id:"structure",children:"Structure"}),"\n",(0,s.jsxs)(t.p,{children:["All attributes in the block/component must begin with the exact same prefix as it is defined in the ",(0,s.jsx)(t.code,{children:"blockName"})," or ",(0,s.jsx)(t.code,{children:"componentName"}),". The reason behind this naming standard is that our helpers can automatically resolve and know what prefix to use when renaming the component name in the dependency tree. For more details about this feature please check ",(0,s.jsx)(t.a,{href:"blocks-component-in-block",children:"this chapter"}),"."]}),"\n",(0,s.jsx)(t.p,{children:"Block example:"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-json",children:'{\n "blockName": "heading",\n "attributes": {\n "headingContent": {\n "type": "string"\n },\n "headingLevel": {\n "type": "integer",\n "default": 2\n }\n }\n}\n'})}),"\n",(0,s.jsx)(t.p,{children:"or"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-json",children:'{\n "blockName": "intro",\n "attributes": {\n "introContent": {\n "type": "string"\n },\n "introLevel": {\n "type": "integer",\n "default": 2\n }\n }\n}\n'})}),"\n",(0,s.jsx)(t.p,{children:"Component example:"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-json",children:'{\n "componentName": "heading",\n "attributes": {\n "headingContent": {\n "type": "string"\n },\n "headingLevel": {\n "type": "integer",\n "default": 2\n }\n }\n}\n'})}),"\n",(0,s.jsx)(t.p,{children:"or"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-json",children:'{\n "componentName": "description",\n "attributes": {\n "descriptionContent": {\n "type": "string"\n },\n "descriptionLevel": {\n "type": "integer",\n "default": 2\n }\n }\n}\n'})}),"\n",(0,s.jsxs)(t.p,{children:["If you have a block/component that contains multiple words you should name it with a dash just like the block/component folder name, but the attributes must follow the ",(0,s.jsx)(t.code,{children:"camelCase"})," naming standard like this:"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-json",children:'{\n "componentName": "intro-heading",\n "attributes": {\n "introHeadingContent": {\n "type": "string"\n },\n "introHeadingLevel": {\n "type": "integer",\n "default": 2\n }\n }\n}\n'})})]})}function h(e={}){const{wrapper:t}={...(0,o.a)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},11151:(e,t,n)=>{n.d(t,{Z:()=>a,a:()=>r});var s=n(67294);const o={},i=s.createContext(o);function r(e){const t=s.useContext(i);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:r(e.components),s.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/09d8acdc.8a6a267d.js b/assets/js/09d8acdc.8a6a267d.js deleted file mode 100644 index 0d332b9ae..000000000 --- a/assets/js/09d8acdc.8a6a267d.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_eightshift_docs=self.webpackChunk_eightshift_docs||[]).push([[2040],{3905:function(e,t,n){n.d(t,{Zo:function(){return u},kt:function(){return m}});var r=n(67294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var l=r.createContext({}),c=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},u=function(e){var t=c(e.components);return r.createElement(l.Provider,{value:t},e.children)},p="mdxType",b={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,o=e.mdxType,a=e.originalType,l=e.parentName,u=s(e,["components","mdxType","originalType","parentName"]),p=c(n),d=o,m=p["".concat(l,".").concat(d)]||p[d]||b[d]||a;return n?r.createElement(m,i(i({ref:t},u),{},{components:n})):r.createElement(m,i({ref:t},u))}));function m(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=n.length,i=new Array(a);i[0]=d;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[p]="string"==typeof e?e:o,i[1]=s;for(var c=2;c{a.r(t),a.d(t,{assets:()=>d,contentTitle:()=>o,default:()=>u,frontMatter:()=>n,metadata:()=>i,toc:()=>c});var s=a(85893),r=a(11151);const n={id:"dashboard",title:"Dashboard"},o=void 0,i={id:"features/dashboard",title:"Dashboard",description:"The dashboards gives you an overview of the currently active features and enables activating and deactivating of them.",source:"@site/forms/features/dashboard.md",sourceDirName:"features",slug:"/features/dashboard",permalink:"/forms/features/dashboard",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{id:"dashboard",title:"Dashboard"},sidebar:"forms",previous:{title:"Your first form",permalink:"/forms/first-form"},next:{title:"Conditional tags",permalink:"/forms/features/conditional-tags"}},d={},c=[];function f(e){const t={img:"img",p:"p",...(0,r.a)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.p,{children:"The dashboards gives you an overview of the currently active features and enables activating and deactivating of them."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"Dashboard screen",src:a(42423).Z+"",width:"611",height:"838"})})]})}function u(e={}){const{wrapper:t}={...(0,r.a)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(f,{...e})}):f(e)}},42423:(e,t,a)=>{a.d(t,{Z:()=>s});const s=a.p+"assets/images/dashboard-1219da14a41cb6fff3b761a1df4dc7ee.webp"},11151:(e,t,a)=>{a.d(t,{Z:()=>i,a:()=>o});var s=a(67294);const r={},n=s.createContext(r);function o(e){const t=s.useContext(n);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),s.createElement(n.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/0a9768df.82f3bdd9.js b/assets/js/0a9768df.82f3bdd9.js deleted file mode 100644 index 0fffe8c86..000000000 --- a/assets/js/0a9768df.82f3bdd9.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_eightshift_docs=self.webpackChunk_eightshift_docs||[]).push([[5488],{3905:function(e,t,r){r.d(t,{Zo:function(){return f},kt:function(){return m}});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var s=n.createContext({}),u=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},f=function(e){var t=u(e.components);return n.createElement(s.Provider,{value:t},e.children)},l="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},p=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,f=c(e,["components","mdxType","originalType","parentName"]),l=u(r),p=a,m=l["".concat(s,".").concat(p)]||l[p]||d[p]||o;return r?n.createElement(m,i(i({ref:t},f),{},{components:r})):n.createElement(m,i({ref:t},f))}));function m(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,i=new Array(o);i[0]=p;var c={};for(var s in t)hasOwnProperty.call(t,s)&&(c[s]=t[s]);c.originalType=e,c[l]="string"==typeof e?e:a,i[1]=c;for(var u=2;u=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s=i.createContext({}),c=function(e){var t=i.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):a(a({},t),e)),n},u=function(e){var t=c(e.components);return i.createElement(s.Provider,{value:t},e.children)},p="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return i.createElement(i.Fragment,{},t)}},h=i.forwardRef((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,s=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),p=c(n),h=r,d=p["".concat(s,".").concat(h)]||p[h]||f[h]||o;return n?i.createElement(d,a(a({ref:t},u),{},{components:n})):i.createElement(d,a({ref:t},u))}));function d(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,a=new Array(o);a[0]=h;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[p]="string"==typeof e?e:r,a[1]=l;for(var c=2;c{i.r(t),i.d(t,{assets:()=>c,contentTitle:()=>r,default:()=>d,frontMatter:()=>o,metadata:()=>l,toc:()=>a});var n=i(85893),s=i(11151);const o={id:"eightshift-frontend-libs",title:"Eightshift Frontend Libs"},r=void 0,l={id:"eightshift-frontend-libs",title:"Eightshift Frontend Libs",description:"docs-source",source:"@site/docs/eightshift-frontend-libs.md",sourceDirName:".",slug:"/eightshift-frontend-libs",permalink:"/docs/eightshift-frontend-libs",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{id:"eightshift-frontend-libs",title:"Eightshift Frontend Libs"},sidebar:"docs",previous:{title:"Eightshift Libs",permalink:"/docs/eightshift-libs"},next:{title:"Requirements",permalink:"/docs/requirements"}},c={},a=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"The library contains:",id:"the-library-contains",level:3},{value:"How to integrate into an existing project",id:"how-to-integrate-into-an-existing-project",level:2},{value:"Who do I talk to?",id:"who-do-i-talk-to",level:2}];function h(e){const t={a:"a",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",ul:"ul",...(0,s.a)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.p,{children:(0,n.jsx)(t.a,{href:"https://github.com/infinum/eightshift-frontend-libs/tree/develop/blocks/init/src/blocks/",children:(0,n.jsx)(t.img,{src:"https://img.shields.io/badge/source-eightshift--frontend--libs-yellow?style=for-the-badge&logo=javascript&labelColor=2a2a2a",alt:"docs-source"})})}),"\n",(0,n.jsxs)(t.p,{children:["This library is meant to bring modern front-end development tools to the ",(0,n.jsx)(t.a,{href:"https://github.com/infinum/eightshift-boilerplate",children:"Eightshift Boilerplate"})," or ",(0,n.jsx)(t.a,{href:"https://github.com/infinum/eightshift-boilerplate-plugin",children:"Eightshift Boilerplate Plugin"}),", but you can use it on any WordPress project."]}),"\n",(0,n.jsx)(t.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,n.jsx)(t.p,{children:"The knowledge of the core editor components and React.js is recommended, since this library is focused on working with the new block editor and contains custom blocks. If you want to create your custom blocks, that knowledge will come in handy."}),"\n",(0,n.jsxs)(t.p,{children:["The library can be used for pure Webpack/JS/SCSS functionality, but if you want to use our blocks, ",(0,n.jsx)(t.a,{href:"https://github.com/infinum/eightshift-libs/",children:"Eightshift Libs"})," must be used in tandem because they handle block registration, attribute handling and more."]}),"\n",(0,n.jsx)(t.h3,{id:"the-library-contains",children:"The library contains:"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsx)(t.li,{children:"All JS packages required for the Webpack build"}),"\n",(0,n.jsx)(t.li,{children:"ESLint ruleset"}),"\n",(0,n.jsx)(t.li,{children:"Stylelint ruleset"}),"\n",(0,n.jsx)(t.li,{children:"Babel ruleset"}),"\n",(0,n.jsx)(t.li,{children:"A collection of useful front-end utility modules"}),"\n",(0,n.jsx)(t.li,{children:"The complete storybook of over 30+ useful blocks and components"}),"\n",(0,n.jsx)(t.li,{children:"Block editor block examples"}),"\n",(0,n.jsx)(t.li,{children:"A growing collection of blocks and components"}),"\n",(0,n.jsxs)(t.li,{children:["The complete Webpack build for ",(0,n.jsx)(t.a,{href:"https://github.com/infinum/eightshift-boilerplate",children:"Eightshift Boilerplate"})]}),"\n",(0,n.jsx)(t.li,{children:"Helpers for creating dynamic block editor blocks"}),"\n",(0,n.jsx)(t.li,{children:"..."}),"\n"]}),"\n",(0,n.jsx)(t.h2,{id:"how-to-integrate-into-an-existing-project",children:"How to integrate into an existing project"}),"\n",(0,n.jsx)(t.p,{children:"The process of integrating the libs into an existing project is not easy, because it really depends on how your theme or plugin is built. Our libs expect the usage of namespacing, and adding namespace in a non namespaced codebase can potentially cause breakage."}),"\n",(0,n.jsx)(t.p,{children:"You can try to manually add the backend libs using composer and frontend using npm, but the process of connecting everything up can be a complex one. So we recommend starting from a clean slate."}),"\n",(0,n.jsx)(t.h2,{id:"who-do-i-talk-to",children:"Who do I talk to?"}),"\n",(0,n.jsxs)(t.p,{children:["If you have any questions or problems, please ",(0,n.jsx)(t.a,{href:"https://github.com/infinum/eightshift-frontend-libs/issues",children:"open an issue"})," on GitHub, and we will do our best to give you a timely answer."]})]})}function d(e={}){const{wrapper:t}={...(0,s.a)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(h,{...e})}):h(e)}},11151:(e,t,i)=>{i.d(t,{Z:()=>l,a:()=>r});var n=i(67294);const s={},o=n.createContext(s);function r(e){const t=n.useContext(o);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:r(e.components),n.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/0bea9cd5.00c46752.js b/assets/js/0bea9cd5.00c46752.js new file mode 100644 index 000000000..c93a8be0c --- /dev/null +++ b/assets/js/0bea9cd5.00c46752.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_eightshift_docs=self.webpackChunk_eightshift_docs||[]).push([[65039],{53888:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>i,contentTitle:()=>n,default:()=>h,frontMatter:()=>l,metadata:()=>r,toc:()=>c});var o=s(85893),a=s(11151);const l={id:"blocks-reusable",title:"Reusable Blocks"},n=void 0,r={id:"legacy/v7/basics/blocks-reusable",title:"Reusable Blocks",description:"docs-source",source:"@site/docs/legacy/v7/basics/blocks-reusable.md",sourceDirName:"legacy/v7/basics",slug:"/legacy/v7/basics/blocks-reusable",permalink:"/docs/legacy/v7/basics/blocks-reusable",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{id:"blocks-reusable",title:"Reusable Blocks"},sidebar:"docs",previous:{title:"Special Use Cases",permalink:"/docs/legacy/v7/basics/blocks-special-use-cases"},next:{title:"Styles",permalink:"/docs/legacy/v7/basics/blocks-styles"}},i={},c=[{value:"Register admin sidemenu",id:"register-admin-sidemenu",level:3},{value:"Use the reusable block as a partial",id:"use-the-reusable-block-as-a-partial",level:3}];function u(e){const t={a:"a",blockquote:"blockquote",code:"code",h3:"h3",img:"img",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,a.a)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.p,{children:(0,o.jsx)(t.a,{href:"https://github.com/infinum/eightshift-frontend-libs/tree/6.0.0/blocks/init/src/blocks/",children:(0,o.jsx)(t.img,{src:"https://img.shields.io/badge/source-eightshift--frontend--libs-yellow?style=for-the-badge&logo=javascript&labelColor=2a2a2a",alt:"docs-source"})})}),"\n",(0,o.jsx)(t.p,{children:"Block editor provides us with the reusable blocks out of the box. These blocks are a custom post type that holds blocks that you can call in your editor to reuse in multiple places. So if you change your reusable block that change will impact all places where this block is imported."}),"\n",(0,o.jsx)(t.h3,{id:"register-admin-sidemenu",children:"Register admin sidemenu"}),"\n",(0,o.jsx)(t.p,{children:"Reusable blocks can be accessed from the block editors options page but to help our editors, we like to add a new menu in the admin sidebar where you can easily access all your reusable blocks. If you use our custom blocks setup this sidebar menu will be added by default."}),"\n",(0,o.jsx)(t.h3,{id:"use-the-reusable-block-as-a-partial",children:"Use the reusable block as a partial"}),"\n",(0,o.jsx)(t.p,{children:"We also like to use a reusable block for website parts that were previously hardcoded in the theme and are not a part of the block editor. We like to use this footer of additional options in categories and terms."}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.strong,{children:"Here are the steps:"})}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsx)(t.li,{children:"Create a new reusable block for your partial."}),"\n",(0,o.jsx)(t.li,{children:"Create a config where you can configure what reusable block are you going to use in your theme. We like to use ACF PRO and its option to create a theme options page."}),"\n",(0,o.jsx)(t.li,{children:"Call this option in your theme and output your block."}),"\n"]}),"\n",(0,o.jsx)(t.p,{children:"The first two steps are easy enough, but here is an example for the third step:"}),"\n",(0,o.jsx)(t.p,{children:"footer.php"}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-php",children:"// Check if the footer partial is set and use the contents of it.\n$footerPartialId = '1'; // here you provide your way to get the option set in the second step.\n\nif (!empty($footerPartialId)) {\n\t$footerBlocks = parse_blocks(get_the_content(null, null, $footerPartialId));\n\n\tforeach ($footerBlocks as $block) {\n\t\techo wp_kses_post(\\apply_filters('the_content', \\render_block($block)));\n\t}\n}\n"})}),"\n",(0,o.jsxs)(t.blockquote,{children:["\n",(0,o.jsx)(t.p,{children:"Notes about reusable blocks, they're not native WP search friendly (as in the content you only have the WP block comment markup that there's a specific reusable block there). So if you use a lot of these in the content of a page / post, it might affect your search relevancy."}),"\n"]})]})}function h(e={}){const{wrapper:t}={...(0,a.a)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(u,{...e})}):u(e)}},11151:(e,t,s)=>{s.d(t,{Z:()=>r,a:()=>n});var o=s(67294);const a={},l=o.createContext(a);function n(e){const t=o.useContext(l);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:n(e.components),o.createElement(l.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/0bea9cd5.90fc39ad.js b/assets/js/0bea9cd5.90fc39ad.js deleted file mode 100644 index 054ccc326..000000000 --- a/assets/js/0bea9cd5.90fc39ad.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_eightshift_docs=self.webpackChunk_eightshift_docs||[]).push([[65039],{3905:function(e,t,r){r.d(t,{Zo:function(){return u},kt:function(){return d}});var o=r(67294);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function s(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var i=o.createContext({}),c=function(e){var t=o.useContext(i),r=t;return e&&(r="function"==typeof e?e(t):s(s({},t),e)),r},u=function(e){var t=c(e.components);return o.createElement(i.Provider,{value:t},e.children)},p="mdxType",b={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},f=o.forwardRef((function(e,t){var r=e.components,n=e.mdxType,a=e.originalType,i=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),p=c(r),f=n,d=p["".concat(i,".").concat(f)]||p[f]||b[f]||a;return r?o.createElement(d,s(s({ref:t},u),{},{components:r})):o.createElement(d,s({ref:t},u))}));function d(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var a=r.length,s=new Array(a);s[0]=f;var l={};for(var i in t)hasOwnProperty.call(t,i)&&(l[i]=t[i]);l.originalType=e,l[p]="string"==typeof e?e:n,s[1]=l;for(var c=2;c{n.r(s),n.d(s,{assets:()=>r,contentTitle:()=>a,default:()=>u,frontMatter:()=>i,metadata:()=>c,toc:()=>d});var t=n(85893),o=n(11151);const i={id:"docs-sass",title:"Sass"},a=void 0,c={id:"legacy/v4/advanced/docs-sass",title:"Sass",description:"For years we have collected a list of useful SASS mixins, functions, and all other stuff that you can use in a project. You don't need to have all this in your project; check out our documentation and import it from Eightshift Frontend Libs.",source:"@site/docs/legacy/v4/advanced/sass-docs.md",sourceDirName:"legacy/v4/advanced",slug:"/legacy/v4/advanced/docs-sass",permalink:"/docs/legacy/v4/advanced/docs-sass",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{id:"docs-sass",title:"Sass"},sidebar:"docs",previous:{title:"Icon font",permalink:"/docs/legacy/v4/guides/fonts-icon"},next:{title:"Webpack",permalink:"/docs/legacy/v4/advanced/webpack"}},r={},d=[{value:"Default usage",id:"default-usage",level:2},{value:"Not using Webpack Build",id:"not-using-webpack-build",level:2}];function l(e){const s={a:"a",code:"code",h2:"h2",p:"p",pre:"pre",strong:"strong",...(0,o.a)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.p,{children:"For years we have collected a list of useful SASS mixins, functions, and all other stuff that you can use in a project. You don't need to have all this in your project; check out our documentation and import it from Eightshift Frontend Libs."}),"\n",(0,t.jsx)(s.p,{children:(0,t.jsxs)(s.strong,{children:["Visit ",(0,t.jsx)(s.a,{href:"/sass",children:"SassDocs"})," for more details."]})}),"\n",(0,t.jsx)(s.h2,{id:"default-usage",children:"Default usage"}),"\n",(0,t.jsxs)(s.p,{children:["Sass mixing, functions, helpers are located in ",(0,t.jsx)(s.code,{children:"node_modules/@eighshift/frontent-libs/styles/scss/eightshift-frontend-libs.scss"})," file. If you are using our webpack build then you are all set, and you can use it by importing it to your project like this:"]}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-scss",children:"@import 'EighshiftFrontendLibs';\n"})}),"\n",(0,t.jsx)(s.h2,{id:"not-using-webpack-build",children:"Not using Webpack Build"}),"\n",(0,t.jsxs)(s.p,{children:["To be able to use ",(0,t.jsx)(s.code,{children:"EighshiftFrontendLibs"})," as a shorthand, we have provided and ",(0,t.jsx)(s.code,{children:"alias"})," in our webpack build under the ",(0,t.jsx)(s.code,{children:"resolve"})," object key."]}),"\n",(0,t.jsx)(s.p,{children:"If you don't use our full build for some reason and want only to use Eightshift Frontend Libs you can provide this in your webpack build:"}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-js",children:"resolve: {\n alias: {\n EighshiftFrontendLibs: path.resolve('node_modules', '@eightshift', 'frontend-libs', 'styles', 'scss', 'eightshift-frontend-libs.scss'),\n }\n}\n"})}),"\n",(0,t.jsx)(s.p,{children:"and then importing it like this:"}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-scss",children:"@import 'EighshiftFrontendLibs';\n"})}),"\n",(0,t.jsx)(s.p,{children:"or you can import it directly like this, but be careful where your node_modules folder is located:"}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-scss",children:"@import 'node_modules/@eightshift/frontend-libs/styles/scss/eightshift-frontend-libs.scss';\n"})})]})}function u(e={}){const{wrapper:s}={...(0,o.a)(),...e.components};return s?(0,t.jsx)(s,{...e,children:(0,t.jsx)(l,{...e})}):l(e)}},11151:(e,s,n)=>{n.d(s,{Z:()=>c,a:()=>a});var t=n(67294);const o={},i=t.createContext(o);function a(e){const s=t.useContext(i);return t.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function c(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:a(e.components),t.createElement(i.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/0cbbedcd.b30e52f3.js b/assets/js/0cbbedcd.b30e52f3.js deleted file mode 100644 index 2dd6e2577..000000000 --- a/assets/js/0cbbedcd.b30e52f3.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_eightshift_docs=self.webpackChunk_eightshift_docs||[]).push([[96854],{3905:function(e,t,n){n.d(t,{Zo:function(){return u},kt:function(){return m}});var r=n(67294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var l=r.createContext({}),c=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):a(a({},t),e)),n},u=function(e){var t=c(e.components);return r.createElement(l.Provider,{value:t},e.children)},d="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,o=e.mdxType,s=e.originalType,l=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),d=c(n),f=o,m=d["".concat(l,".").concat(f)]||d[f]||p[f]||s;return n?r.createElement(m,a(a({ref:t},u),{},{components:n})):r.createElement(m,a({ref:t},u))}));function m(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var s=n.length,a=new Array(s);a[0]=f;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i[d]="string"==typeof e?e:o,a[1]=i;for(var c=2;c=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var c=r.createContext({}),l=function(e){var t=r.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):a(a({},t),e)),n},u=function(e){var t=l(e.components);return r.createElement(c.Provider,{value:t},e.children)},p="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,o=e.mdxType,i=e.originalType,c=e.parentName,u=s(e,["components","mdxType","originalType","parentName"]),p=l(n),d=o,h=p["".concat(c,".").concat(d)]||p[d]||f[d]||i;return n?r.createElement(h,a(a({ref:t},u),{},{components:n})):r.createElement(h,a({ref:t},u))}));function h(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var i=n.length,a=new Array(i);a[0]=d;var s={};for(var c in t)hasOwnProperty.call(t,c)&&(s[c]=t[c]);s.originalType=e,s[p]="string"==typeof e?e:o,a[1]=s;for(var l=2;l{i.r(t),i.d(t,{assets:()=>c,contentTitle:()=>a,default:()=>h,frontMatter:()=>o,metadata:()=>r,toc:()=>l});var s=i(85893),n=i(11151);const o={id:"basics-intro",title:"Basics"},a=void 0,r={id:"legacy/v7/basics/basics-intro",title:"Basics",description:"Prior to WordPress 5.0, themes were mostly PHP-based, with JavaScript used only to provide interactive functionality on the website.",source:"@site/docs/legacy/v7/basics/basics-intro.md",sourceDirName:"legacy/v7/basics",slug:"/legacy/v7/basics/basics-intro",permalink:"/docs/legacy/v7/basics/basics-intro",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{id:"basics-intro",title:"Basics"},sidebar:"docs",previous:{title:"Versions",permalink:"/docs/legacy/v7/versions"},next:{title:"WP-CLI",permalink:"/docs/legacy/v7/basics/wp-cli"}},c={},l=[{value:"Let's finally start with documentation",id:"lets-finally-start-with-documentation",level:2}];function d(e){const t={a:"a",h2:"h2",p:"p",strong:"strong",...(0,n.a)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.p,{children:"Prior to WordPress 5.0, themes were mostly PHP-based, with JavaScript used only to provide interactive functionality on the website.\nNow it's a bit different because we have PHP in the core, JavaScript (specifically React.js) in the block editor, and some styles in the editor and the theme parts of the website."}),"\n",(0,s.jsx)(t.p,{children:"Now that everything is different, we must adapt to the changes as well."}),"\n",(0,s.jsx)(t.h2,{id:"lets-finally-start-with-documentation",children:"Let's finally start with documentation"}),"\n",(0,s.jsx)(t.p,{children:"We took our time to set up a bunch of WP-CLI commands. That should help you set up everything and use all our features, without worrying about correct names, files, and organization. You can find out more about it on this link:"}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.a,{href:"wp-cli",children:"WP-CLI"})}),"\n",(0,s.jsx)(t.p,{children:"If you would like to read about our extensive WP-CLI features, find out how to use service classes, or learn how dependency injection container works with auto wiring, this link is for you:"}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.a,{href:"backend",children:"Back-end stuff"})}),"\n",(0,s.jsx)(t.p,{children:"If instead, you would like to check out what we have prepared regarding the JavaScript Babel and Webpack, or find out how we ensure that our code is the same across multiple developers, this link is for you:"}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.a,{href:"frontend",children:"Front-end stuff"})}),"\n",(0,s.jsxs)(t.p,{children:["On the other hand, if you would like to see our extensive ",(0,s.jsx)(t.strong,{children:"Dynamic Blocks"})," collection and learn how you can use them with all the developer's flexibility and as little code duplication as possible, check out this link:"]}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.a,{href:"blocks",children:"Block editor blocks"})})]})}function h(e={}){const{wrapper:t}={...(0,n.a)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},11151:(e,t,i)=>{i.d(t,{Z:()=>r,a:()=>a});var s=i(67294);const n={},o=s.createContext(n);function a(e){const t=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:a(e.components),s.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/0cf6d2ee.8e18c2f6.js b/assets/js/0cf6d2ee.8e18c2f6.js new file mode 100644 index 000000000..19b1e38ba --- /dev/null +++ b/assets/js/0cf6d2ee.8e18c2f6.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_eightshift_docs=self.webpackChunk_eightshift_docs||[]).push([[12594],{38891:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>c,contentTitle:()=>l,default:()=>h,frontMatter:()=>r,metadata:()=>i,toc:()=>a});var o=t(85893),n=t(11151);const r={id:"blocks-structure",title:"Structure"},l=void 0,i={id:"legacy/v7/basics/blocks-structure",title:"Structure",description:"docs-source",source:"@site/docs/legacy/v7/basics/blocks-structure.md",sourceDirName:"legacy/v7/basics",slug:"/legacy/v7/basics/blocks-structure",permalink:"/docs/legacy/v7/basics/blocks-structure",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{id:"blocks-structure",title:"Structure"},sidebar:"docs",previous:{title:"Registration",permalink:"/docs/legacy/v7/basics/blocks-registration"},next:{title:"Global Manifest",permalink:"/docs/legacy/v7/basics/blocks-global-manifest"}},c={},a=[{value:"Blocks folder",id:"blocks-folder",level:3},{value:"Assets",id:"assets",level:3},{value:"Components",id:"components",level:3},{value:"Custom",id:"custom",level:3},{value:"Variations",id:"variations",level:3},{value:"Wrapper",id:"wrapper",level:3},{value:"manifest.json",id:"manifestjson",level:3},{value:"Blocks.php",id:"blocksphp",level:3}];function d(e){const s={a:"a",code:"code",h3:"h3",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,n.a)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s.p,{children:(0,o.jsx)(s.a,{href:"https://github.com/infinum/eightshift-frontend-libs/tree/6.0.0/blocks/init/src/blocks/",children:(0,o.jsx)(s.img,{src:"https://img.shields.io/badge/source-eightshift--frontend--libs-yellow?style=for-the-badge&logo=javascript&labelColor=2a2a2a",alt:"docs-source"})})}),"\n",(0,o.jsx)(s.p,{children:"For the library to work and register blocks dynamically, a specific folder structure and naming must be followed."}),"\n",(0,o.jsx)(s.p,{children:"Your folder structure should be like this:"}),"\n",(0,o.jsxs)(s.ul,{children:["\n",(0,o.jsxs)(s.li,{children:["src","\n",(0,o.jsxs)(s.ul,{children:["\n",(0,o.jsxs)(s.li,{children:["Blocks","\n",(0,o.jsxs)(s.ul,{children:["\n",(0,o.jsx)(s.li,{children:"assets"}),"\n",(0,o.jsx)(s.li,{children:"components"}),"\n",(0,o.jsx)(s.li,{children:"custom"}),"\n",(0,o.jsx)(s.li,{children:"variations"}),"\n",(0,o.jsx)(s.li,{children:"wrapper"}),"\n",(0,o.jsx)(s.li,{children:"Blocks.php"}),"\n",(0,o.jsx)(s.li,{children:"manifest.json"}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,o.jsxs)(s.p,{children:["Don't be confused with the upper and lower case folder names, those are like that on purpose. Everything under the ",(0,o.jsx)(s.code,{children:"Block"})," folder is considered a view so they are written in lower caps, and the Blocks.php file is still a part of the PHP PSR-4 standard so it must be written like every other ",(0,o.jsx)(s.strong,{children:"service class"}),"."]}),"\n",(0,o.jsx)(s.h3,{id:"blocks-folder",children:"Blocks folder"}),"\n",(0,o.jsxs)(s.p,{children:["This folder contains all the blocks defined in your project. Every block is located in the ",(0,o.jsx)(s.code,{children:"custom"})," folder, and every component is located in the ",(0,o.jsx)(s.code,{children:"components"})," folder. Blocks can be created from multiple block editor components or your project components."]}),"\n",(0,o.jsx)(s.h3,{id:"assets",children:"Assets"}),"\n",(0,o.jsx)(s.p,{children:"This folder contains all the additional files for the blocks you only need to use on the front end. Everything that is not a block or a component goes here, such as defining global style, global JavaScript helpers, project images, fonts, etc. Also, we register all blocks, styles, and scripts in the assets folder so that nothing works without this folder."}),"\n",(0,o.jsx)(s.h3,{id:"components",children:"Components"}),"\n",(0,o.jsxs)(s.p,{children:["This folder contains all the components that are shared across blocks and project template files. Components are not registered as blocks because they are small chunks of code you can reuse everywhere. For instance, you can create a menu component to be used in the footer but also reused in a separate menu block. Please refer to the ",(0,o.jsx)(s.a,{href:"blocks-component-structure",children:"component structure"})," chapter for more details."]}),"\n",(0,o.jsx)(s.h3,{id:"custom",children:"Custom"}),"\n",(0,o.jsxs)(s.p,{children:["This folder contains all the custom blocks defined and used in your project. Please refer to the ",(0,o.jsx)(s.a,{href:"block-structure",children:"block structure"})," chapter for more details."]}),"\n",(0,o.jsx)(s.h3,{id:"variations",children:"Variations"}),"\n",(0,o.jsxs)(s.p,{children:["This folder contains all the variations blocks defined and used in your project. Please refer to the ",(0,o.jsx)(s.a,{href:"blocks-variations",children:"variations"})," chapter for more details."]}),"\n",(0,o.jsx)(s.h3,{id:"wrapper",children:"Wrapper"}),"\n",(0,o.jsxs)(s.p,{children:["This folder contains a wrapper component that wraps all blocks with shared variables and gives blocks the ability to behave as a layout section. Please refer to the ",(0,o.jsx)(s.a,{href:"blocks-wrapper",children:"wrapper"})," chapter for more details."]}),"\n",(0,o.jsx)(s.h3,{id:"manifestjson",children:"manifest.json"}),"\n",(0,o.jsxs)(s.p,{children:["This file contains global settings for your project. It must contain ",(0,o.jsx)(s.code,{children:"namespace"})," and ",(0,o.jsx)(s.code,{children:"background"})," keys. Everything else is optional. Here you can store data you intend to share across toolbars, components, and blocks. Please refer to the ",(0,o.jsx)(s.a,{href:"block-manifest",children:"block manifest"})," chapter for more details."]}),"\n",(0,o.jsx)(s.h3,{id:"blocksphp",children:"Blocks.php"}),"\n",(0,o.jsx)(s.p,{children:"This is the main service class responsible for registering all the PHP parts of the blocks like:"}),"\n",(0,o.jsxs)(s.ul,{children:["\n",(0,o.jsx)(s.li,{children:"dynamic blocks view"}),"\n",(0,o.jsx)(s.li,{children:"custom category for your blocks"}),"\n",(0,o.jsx)(s.li,{children:"default color palette"}),"\n",(0,o.jsx)(s.li,{children:"what blocks you are going to use"}),"\n",(0,o.jsx)(s.li,{children:"all the custom functionality that you will write for the project"}),"\n"]})]})}function h(e={}){const{wrapper:s}={...(0,n.a)(),...e.components};return s?(0,o.jsx)(s,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},11151:(e,s,t)=>{t.d(s,{Z:()=>i,a:()=>l});var o=t(67294);const n={},r=o.createContext(n);function l(e){const s=o.useContext(r);return o.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function i(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:l(e.components),o.createElement(r.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/0cf6d2ee.ed155568.js b/assets/js/0cf6d2ee.ed155568.js deleted file mode 100644 index dc542179f..000000000 --- a/assets/js/0cf6d2ee.ed155568.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_eightshift_docs=self.webpackChunk_eightshift_docs||[]).push([[12594],{3905:function(e,t,r){r.d(t,{Zo:function(){return u},kt:function(){return m}});var o=r(67294);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function l(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var i=o.createContext({}),c=function(e){var t=o.useContext(i),r=t;return e&&(r="function"==typeof e?e(t):l(l({},t),e)),r},u=function(e){var t=c(e.components);return o.createElement(i.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},f=o.forwardRef((function(e,t){var r=e.components,n=e.mdxType,a=e.originalType,i=e.parentName,u=s(e,["components","mdxType","originalType","parentName"]),p=c(r),f=n,m=p["".concat(i,".").concat(f)]||p[f]||d[f]||a;return r?o.createElement(m,l(l({ref:t},u),{},{components:r})):o.createElement(m,l({ref:t},u))}));function m(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var a=r.length,l=new Array(a);l[0]=f;var s={};for(var i in t)hasOwnProperty.call(t,i)&&(s[i]=t[i]);s.originalType=e,s[p]="string"==typeof e?e:n,l[1]=s;for(var c=2;c $field) {\n\t\t\t\t\t\t\t$component = $field[\'component\'] ?? \'\';\n\n\t\t\t\t\t\t\tif (!$component) {\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$name = $field["{$component}Name"] ?? \'\';\n\n\t\t\t\t\t\t\tif (!$name) {\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tswitch ($name) {\n\t\t\t\t\t\t\t\tcase \'firstname\':\n\t\t\t\t\t\t\t\tcase \'lastname\':\n\t\t\t\t\t\t\t\t\t$data[$index]["{$component}FieldWidthMobile"] = 12;\n\t\t\t\t\t\t\t\t\t$data[$index]["{$component}FieldWidthLarge"] = 6;\n\t\t\t\t\t\t\t\t\t$data[$index]["{$component}DisabledOptions"] = array_merge(\n\t\t\t\t\t\t\t\t\t\t$data[$index]["{$component}DisabledOptions"],\n\t\t\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t\t\t"{$component}FieldWidthMobile",\n\t\t\t\t\t\t\t\t\t\t\t"{$component}FieldWidthLarge",\n\t\t\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn $data;\n\t\t\t\t\t}, 10, 2);\n\t\t\t\t\t'))),o.includes("prePostParamsFilter")&&r.createElement(r.Fragment,null,r.createElement("h2",null,"Pre post params"),r.createElement("p",null,"Change form fields data before it is sent to the external integration. This way you can manipulate data and provide additional mapping to the data sent to the integration."),r.createElement(a.Z,{language:"php"},(0,i.p)("\n\t\t\t\t\t\t\tadd_filter('es_forms_integrations_"+e+"_pre_post_params', function(array $params): array {\n\t\t\t\t\t\t\t\t$formSubmissionPageLt = $params['form_submission_page_lt']['value'] ?? '';\n\n\t\t\t\t\t\t\t\tif ($formSubmissionPageLt) {\n\t\t\t\t\t\t\t\t\t$params['ib-submission-source'] = [\n\t\t\t\t\t\t\t\t\t\t'name' => 'ib-submission-source',\n\t\t\t\t\t\t\t\t\t\t'value' => $formSubmissionPageLt,\n\t\t\t\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t\t\t\t'internalType' => '',\n\t\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\treturn $params;\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t"))),o.includes("order")&&r.createElement(r.Fragment,null,r.createElement("h2",null,"Order fields"),r.createElement("p",null,"Forces a specific form fields order, regardless of one set in the editor. Fields that are not defined here will follow the natural in-editor order."),r.createElement("p",null,"Not all fields need to have an order defined. For example, if you want to make sure ",r.createElement("code",null,"firstname"),", ",r.createElement("code",null,"lastname")," and ",r.createElement("code",null,"email")," are displayed first, this filter can help."),r.createElement(a.Z,{language:"php"},(0,i.p)("\n\t\t\t\t\t\t\tadd_filter('es_forms_integrations_"+e+"_order', function(): array {\n\t\t\t\t\t\t\t\treturn [\n\t\t\t\t\t\t\t\t\t'firstname',\n\t\t\t\t\t\t\t\t\t'lastname',\n\t\t\t\t\t\t\t\t\t'email',\n\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t"))))}},61684:function(t,e,n){function r(t){for(var e=t.split(/\n/g);0===(null==(n=e[0])?void 0:n.replace(/\s/g,"").length);){var n;e.shift()}for(;0===(null==(r=e[e.length-1])?void 0:r.replace(/\s/g,"").length);){var r;e.pop()}var a=t.split(/\n/g).filter((function(t){return t.replace(/\s/g,"").length>0})).map((function(t){var e,n;return null!=(e=null==(n=t.match(/^\s*/))||null==(n=n[0])?void 0:n.length)?e:0})),i=Math.min.apply(Math,a);return e.map((function(t){return t.slice(i)})).join("\n")}n.d(e,{p:function(){return r}})}}]); \ No newline at end of file diff --git a/assets/js/0d27e988.f04ce629.js b/assets/js/0d27e988.f04ce629.js new file mode 100644 index 000000000..40b989d80 --- /dev/null +++ b/assets/js/0d27e988.f04ce629.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_eightshift_docs=self.webpackChunk_eightshift_docs||[]).push([[90742],{75983:(t,e,n)=>{n.r(e),n.d(e,{assets:()=>d,contentTitle:()=>o,default:()=>f,frontMatter:()=>s,metadata:()=>l,toc:()=>p});var i=n(85893),r=n(11151),a=n(51733);const s={id:"goodbits",title:"Goodbits"},o=void 0,l={id:"php/filters/integrations/goodbits",title:"Goodbits",description:"",source:"@site/forms/php/filters/integrations/goodbits.mdx",sourceDirName:"php/filters/integrations",slug:"/php/filters/integrations/goodbits",permalink:"/forms/php/filters/integrations/goodbits",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{id:"goodbits",title:"Goodbits"},sidebar:"forms",previous:{title:"Clearbit",permalink:"/forms/php/filters/integrations/clearbit"},next:{title:"Greenhouse",permalink:"/forms/php/filters/integrations/greenhouse"}},d={},p=[];function c(t){return(0,i.jsx)(a.k,{name:"Goodbits",filter:"goodbits"})}function f(t={}){const{wrapper:e}={...(0,r.a)(),...t.components};return e?(0,i.jsx)(e,{...t,children:(0,i.jsx)(c,{...t})}):c()}},51733:(t,e,n)=>{n.d(e,{k:()=>s});n(67294);var i=n(9286),r=n(61684),a=n(85893);function s(t){const{filter:e,onlyUse:n=["dataFilter","prePostParamsFilter","order"]}=t;return(0,a.jsxs)(a.Fragment,{children:[n.includes("dataFilter")&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h2",{children:"Data"}),(0,a.jsx)("p",{children:"This filter is used if you want to change form fields data before output. This way you can change components map before it is parsed inside Block Editor."}),(0,a.jsx)("p",{children:"For example if you want to set all fields to have 2 columns layout this will be the filter to use."}),(0,a.jsx)(i.Z,{language:"php",children:(0,r.p)("\n\t\t\t\t\tadd_filter('es_forms_integrations_"+e+'_data\', function(array $data, string $formId): array {\n\t\t\t\t\t\tforeach ($data as $index => $field) {\n\t\t\t\t\t\t\t$component = $field[\'component\'] ?? \'\';\n\n\t\t\t\t\t\t\tif (!$component) {\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$name = $field["{$component}Name"] ?? \'\';\n\n\t\t\t\t\t\t\tif (!$name) {\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tswitch ($name) {\n\t\t\t\t\t\t\t\tcase \'firstname\':\n\t\t\t\t\t\t\t\tcase \'lastname\':\n\t\t\t\t\t\t\t\t\t$data[$index]["{$component}FieldWidthMobile"] = 12;\n\t\t\t\t\t\t\t\t\t$data[$index]["{$component}FieldWidthLarge"] = 6;\n\t\t\t\t\t\t\t\t\t$data[$index]["{$component}DisabledOptions"] = array_merge(\n\t\t\t\t\t\t\t\t\t\t$data[$index]["{$component}DisabledOptions"],\n\t\t\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t\t\t"{$component}FieldWidthMobile",\n\t\t\t\t\t\t\t\t\t\t\t"{$component}FieldWidthLarge",\n\t\t\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn $data;\n\t\t\t\t\t}, 10, 2);\n\t\t\t\t\t')})]}),n.includes("prePostParamsFilter")&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h2",{children:"Pre post params"}),(0,a.jsx)("p",{children:"Change form fields data before it is sent to the external integration. This way you can manipulate data and provide additional mapping to the data sent to the integration."}),(0,a.jsx)(i.Z,{language:"php",children:(0,r.p)("\n\t\t\t\t\t\t\tadd_filter('es_forms_integrations_"+e+"_pre_post_params', function(array $params): array {\n\t\t\t\t\t\t\t\t$formSubmissionPageLt = $params['form_submission_page_lt']['value'] ?? '';\n\n\t\t\t\t\t\t\t\tif ($formSubmissionPageLt) {\n\t\t\t\t\t\t\t\t\t$params['ib-submission-source'] = [\n\t\t\t\t\t\t\t\t\t\t'name' => 'ib-submission-source',\n\t\t\t\t\t\t\t\t\t\t'value' => $formSubmissionPageLt,\n\t\t\t\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t\t\t\t'internalType' => '',\n\t\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\treturn $params;\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t")})]}),n.includes("order")&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h2",{children:"Order fields"}),(0,a.jsx)("p",{children:"Forces a specific form fields order, regardless of one set in the editor. Fields that are not defined here will follow the natural in-editor order."}),(0,a.jsxs)("p",{children:["Not all fields need to have an order defined. For example, if you want to make sure ",(0,a.jsx)("code",{children:"firstname"}),", ",(0,a.jsx)("code",{children:"lastname"})," and ",(0,a.jsx)("code",{children:"email"})," are displayed first, this filter can help."]}),(0,a.jsx)(i.Z,{language:"php",children:(0,r.p)("\n\t\t\t\t\t\t\tadd_filter('es_forms_integrations_"+e+"_order', function(): array {\n\t\t\t\t\t\t\t\treturn [\n\t\t\t\t\t\t\t\t\t'firstname',\n\t\t\t\t\t\t\t\t\t'lastname',\n\t\t\t\t\t\t\t\t\t'email',\n\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t")})]})]})}},61684:(t,e,n)=>{function i(t){const e=t.split(/\n/g);for(;0===(null==(n=e[0])?void 0:n.replace(/\s/g,"").length);){var n;e.shift()}for(;0===(null==(i=e[e.length-1])?void 0:i.replace(/\s/g,"").length);){var i;e.pop()}const r=t.split(/\n/g).filter((t=>t.replace(/\s/g,"").length>0)).map((t=>{var e,n;return null!=(e=null==(n=t.match(/^\s*/))||null==(n=n[0])?void 0:n.length)?e:0})),a=Math.min(...r);return e.map((t=>t.slice(a))).join("\n")}n.d(e,{p:()=>i})}}]); \ No newline at end of file diff --git a/assets/js/0dcc1e01.55e42d9f.js b/assets/js/0dcc1e01.55e42d9f.js deleted file mode 100644 index 6576be572..000000000 --- a/assets/js/0dcc1e01.55e42d9f.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_eightshift_docs=self.webpackChunk_eightshift_docs||[]).push([[44639],{51840:function(t){t.exports=JSON.parse('{"permalink":"/blog/tags/terms","page":1,"postsPerPage":9,"totalPages":1,"totalCount":1,"blogDescription":"Tutorials and articles about Eightshift development kit","blogTitle":"Tutorials and articles about Eightshift development kit"}')}}]); \ No newline at end of file diff --git a/assets/js/0dcc1e01.b8b669ab.js b/assets/js/0dcc1e01.b8b669ab.js new file mode 100644 index 000000000..ae62b86e1 --- /dev/null +++ b/assets/js/0dcc1e01.b8b669ab.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_eightshift_docs=self.webpackChunk_eightshift_docs||[]).push([[44639],{51840:t=>{t.exports=JSON.parse('{"permalink":"/blog/tags/terms","page":1,"postsPerPage":9,"totalPages":1,"totalCount":1,"blogDescription":"Tutorials and articles about Eightshift development kit","blogTitle":"Tutorials and articles about Eightshift development kit"}')}}]); \ No newline at end of file diff --git a/assets/js/0e617e7a.1dd97537.js b/assets/js/0e617e7a.1dd97537.js deleted file mode 100644 index c6f27c0fd..000000000 --- a/assets/js/0e617e7a.1dd97537.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_eightshift_docs=self.webpackChunk_eightshift_docs||[]).push([[46604],{3905:function(e,t,r){r.d(t,{Zo:function(){return u},kt:function(){return m}});var o=r(67294);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function l(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var i=o.createContext({}),c=function(e){var t=o.useContext(i),r=t;return e&&(r="function"==typeof e?e(t):l(l({},t),e)),r},u=function(e){var t=c(e.components);return o.createElement(i.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},f=o.forwardRef((function(e,t){var r=e.components,n=e.mdxType,a=e.originalType,i=e.parentName,u=s(e,["components","mdxType","originalType","parentName"]),p=c(r),f=n,m=p["".concat(i,".").concat(f)]||p[f]||d[f]||a;return r?o.createElement(m,l(l({ref:t},u),{},{components:r})):o.createElement(m,l({ref:t},u))}));function m(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var a=r.length,l=new Array(a);l[0]=f;var s={};for(var i in t)hasOwnProperty.call(t,i)&&(s[i]=t[i]);s.originalType=e,s[p]="string"==typeof e?e:n,l[1]=s;for(var c=2;c{t.r(s),t.d(s,{assets:()=>c,contentTitle:()=>l,default:()=>h,frontMatter:()=>r,metadata:()=>i,toc:()=>a});var o=t(85893),n=t(11151);const r={id:"blocks-structure",title:"Structure"},l=void 0,i={id:"legacy/v8/basics/blocks-structure",title:"Structure",description:"docs-source",source:"@site/docs/legacy/v8/basics/blocks-structure.md",sourceDirName:"legacy/v8/basics",slug:"/legacy/v8/basics/blocks-structure",permalink:"/docs/legacy/v8/basics/blocks-structure",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{id:"blocks-structure",title:"Structure"},sidebar:"docs",previous:{title:"Registration",permalink:"/docs/legacy/v8/basics/blocks-registration"},next:{title:"Global Manifest",permalink:"/docs/legacy/v8/basics/blocks-global-manifest"}},c={},a=[{value:"Blocks folder",id:"blocks-folder",level:3},{value:"Assets",id:"assets",level:3},{value:"Components",id:"components",level:3},{value:"Custom",id:"custom",level:3},{value:"Variations",id:"variations",level:3},{value:"Wrapper",id:"wrapper",level:3},{value:"manifest.json",id:"manifestjson",level:3},{value:"Blocks.php",id:"blocksphp",level:3}];function d(e){const s={a:"a",code:"code",h3:"h3",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,n.a)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s.p,{children:(0,o.jsx)(s.a,{href:"https://github.com/infinum/eightshift-frontend-libs/tree/develop/blocks/init/src/Blocks/",children:(0,o.jsx)(s.img,{src:"https://img.shields.io/badge/source-eightshift--frontend--libs-yellow?style=for-the-badge&logo=javascript&labelColor=2a2a2a",alt:"docs-source"})})}),"\n",(0,o.jsx)(s.p,{children:"For the library to work and register blocks dynamically, a specific folder structure and naming must be followed."}),"\n",(0,o.jsx)(s.p,{children:"Your folder structure should be like this:"}),"\n",(0,o.jsxs)(s.ul,{children:["\n",(0,o.jsxs)(s.li,{children:["src","\n",(0,o.jsxs)(s.ul,{children:["\n",(0,o.jsxs)(s.li,{children:["Blocks","\n",(0,o.jsxs)(s.ul,{children:["\n",(0,o.jsx)(s.li,{children:"assets"}),"\n",(0,o.jsx)(s.li,{children:"components"}),"\n",(0,o.jsx)(s.li,{children:"custom"}),"\n",(0,o.jsx)(s.li,{children:"variations"}),"\n",(0,o.jsx)(s.li,{children:"wrapper"}),"\n",(0,o.jsx)(s.li,{children:"Blocks.php"}),"\n",(0,o.jsx)(s.li,{children:"manifest.json"}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,o.jsxs)(s.p,{children:["Don't be confused with the upper and lower case folder names, those are like that on purpose. Everything under the ",(0,o.jsx)(s.code,{children:"Block"})," folder is considered a view so they are written in lower caps, and the Blocks.php file is still a part of the PHP PSR-4 standard so it must be written like every other ",(0,o.jsx)(s.strong,{children:"service class"}),"."]}),"\n",(0,o.jsx)(s.h3,{id:"blocks-folder",children:"Blocks folder"}),"\n",(0,o.jsxs)(s.p,{children:["This folder contains all the blocks defined in your project. Every block is located in the ",(0,o.jsx)(s.code,{children:"custom"})," folder, and every component is located in the ",(0,o.jsx)(s.code,{children:"components"})," folder. Blocks can be created from multiple block editor components or your project components."]}),"\n",(0,o.jsx)(s.h3,{id:"assets",children:"Assets"}),"\n",(0,o.jsx)(s.p,{children:"This folder contains all the additional files for the blocks you only need to use on the front end. Everything that is not a block or a component goes here, such as defining global style, global JavaScript helpers, project images, fonts, etc. Also, we register all blocks, styles, and scripts in the assets folder so that nothing works without this folder."}),"\n",(0,o.jsx)(s.h3,{id:"components",children:"Components"}),"\n",(0,o.jsxs)(s.p,{children:["This folder contains all the components that are shared across blocks and project template files. Components are not registered as blocks because they are small chunks of code you can reuse everywhere. For instance, you can create a menu component to be used in the footer but also reused in a separate menu block. Please refer to the ",(0,o.jsx)(s.a,{href:"blocks-component-structure",children:"component structure"})," chapter for more details."]}),"\n",(0,o.jsx)(s.h3,{id:"custom",children:"Custom"}),"\n",(0,o.jsxs)(s.p,{children:["This folder contains all the custom blocks defined and used in your project. Please refer to the ",(0,o.jsx)(s.a,{href:"block-structure",children:"block structure"})," chapter for more details."]}),"\n",(0,o.jsx)(s.h3,{id:"variations",children:"Variations"}),"\n",(0,o.jsxs)(s.p,{children:["This folder contains all the variations blocks defined and used in your project. Please refer to the ",(0,o.jsx)(s.a,{href:"blocks-variations",children:"variations"})," chapter for more details."]}),"\n",(0,o.jsx)(s.h3,{id:"wrapper",children:"Wrapper"}),"\n",(0,o.jsxs)(s.p,{children:["This folder contains a wrapper component that wraps all blocks with shared variables and gives blocks the ability to behave as a layout section. Please refer to the ",(0,o.jsx)(s.a,{href:"blocks-wrapper",children:"wrapper"})," chapter for more details."]}),"\n",(0,o.jsx)(s.h3,{id:"manifestjson",children:"manifest.json"}),"\n",(0,o.jsxs)(s.p,{children:["This file contains global settings for your project. It must contain ",(0,o.jsx)(s.code,{children:"namespace"})," and ",(0,o.jsx)(s.code,{children:"background"})," keys. Everything else is optional. Here you can store data you intend to share across toolbars, components, and blocks. Please refer to the ",(0,o.jsx)(s.a,{href:"block-manifest",children:"block manifest"})," chapter for more details."]}),"\n",(0,o.jsx)(s.h3,{id:"blocksphp",children:"Blocks.php"}),"\n",(0,o.jsx)(s.p,{children:"This is the main service class responsible for registering all the PHP parts of the blocks like:"}),"\n",(0,o.jsxs)(s.ul,{children:["\n",(0,o.jsx)(s.li,{children:"dynamic blocks view"}),"\n",(0,o.jsx)(s.li,{children:"custom category for your blocks"}),"\n",(0,o.jsx)(s.li,{children:"default color palette"}),"\n",(0,o.jsx)(s.li,{children:"what blocks you are going to use"}),"\n",(0,o.jsx)(s.li,{children:"all the custom functionality that you will write for the project"}),"\n"]})]})}function h(e={}){const{wrapper:s}={...(0,n.a)(),...e.components};return s?(0,o.jsx)(s,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},11151:(e,s,t)=>{t.d(s,{Z:()=>i,a:()=>l});var o=t(67294);const n={},r=o.createContext(n);function l(e){const s=o.useContext(r);return o.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function i(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:l(e.components),o.createElement(r.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/0f1457e8.3044a4c7.js b/assets/js/0f1457e8.3044a4c7.js deleted file mode 100644 index cbfb6b495..000000000 --- a/assets/js/0f1457e8.3044a4c7.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_eightshift_docs=self.webpackChunk_eightshift_docs||[]).push([[95534],{3905:function(e,t,r){r.d(t,{Zo:function(){return c},kt:function(){return y}});var a=r(67294);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function i(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var s=a.createContext({}),p=function(e){var t=a.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},c=function(e){var t=p(e.components);return a.createElement(s.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,l=e.originalType,s=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),u=p(r),m=n,y=u["".concat(s,".").concat(m)]||u[m]||d[m]||l;return r?a.createElement(y,i(i({ref:t},c),{},{components:r})):a.createElement(y,i({ref:t},c))}));function y(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var l=r.length,i=new Array(l);i[0]=m;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[u]="string"==typeof e?e:n,i[1]=o;for(var p=2;p{s.r(r),s.d(r,{assets:()=>c,contentTitle:()=>a,default:()=>h,frontMatter:()=>t,metadata:()=>l,toc:()=>d});var n=s(85893),i=s(11151);const t={id:"helpers-object-helpers",title:"Object"},a=void 0,l={id:"legacy/v4/advanced/helpers-object-helpers",title:"Object",description:"docs-source",source:"@site/docs/legacy/v4/advanced/helpers-object.md",sourceDirName:"legacy/v4/advanced",slug:"/legacy/v4/advanced/helpers-object-helpers",permalink:"/docs/legacy/v4/advanced/helpers-object-helpers",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{id:"helpers-object-helpers",title:"Object"},sidebar:"docs",previous:{title:"Aliases",permalink:"/docs/legacy/v4/advanced/helpers-aliases-helpers"},next:{title:"Components",permalink:"/docs/legacy/v4/advanced/helpers-components-helpers"}},c={},d=[{value:"is_valid_xml",id:"is_valid_xml",level:2},{value:"is_json",id:"is_json",level:2},{value:"flatten_array",id:"flatten_array",level:2},{value:"sanitize_array",id:"sanitize_array",level:2},{value:"sort_array_by_order_key",id:"sort_array_by_order_key",level:2}];function o(e){const r={a:"a",code:"code",h2:"h2",img:"img",li:"li",p:"p",ul:"ul",...(0,i.a)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.p,{children:(0,n.jsx)(r.a,{href:"https://github.com/infinum/eightshift-libs/tree/v2.0.0/src/helpers/class-object-helper.php",children:(0,n.jsx)(r.img,{src:"https://img.shields.io/badge/source-eigthshift--libs-blue?style=for-the-badge&logo=php&labelColor=2a2a2a",alt:"docs-source"})})}),"\n",(0,n.jsxs)(r.p,{children:["Object trait is located in ",(0,n.jsx)(r.code,{children:"Eightshift Libs"}),". To extend it, use ",(0,n.jsx)(r.code,{children:"Eightshift_Libs\\Helpers\\Object_Helper"})," class."]}),"\n",(0,n.jsxs)(r.p,{children:["All of us have some custom helpers and stuff that we use around on multiple the project. We have created this simple trait helper that you can use in any PHP class as a ",(0,n.jsx)(r.a,{href:"/docs/legacy/v4/guides/extending-classes",children:"trait"}),"."]}),"\n",(0,n.jsx)(r.h2,{id:"is_valid_xml",children:"is_valid_xml"}),"\n",(0,n.jsxs)(r.p,{children:["Check if the provided XML is valid. It uses a ",(0,n.jsx)(r.code,{children:"DOMDocument"})," library."]}),"\n",(0,n.jsxs)(r.ul,{children:["\n",(0,n.jsx)(r.li,{children:"@param xml $xml Full xml document."}),"\n",(0,n.jsx)(r.li,{children:"@return boolean"}),"\n"]}),"\n",(0,n.jsx)(r.h2,{id:"is_json",children:"is_json"}),"\n",(0,n.jsx)(r.p,{children:"Check if provided JSON is valid."}),"\n",(0,n.jsxs)(r.ul,{children:["\n",(0,n.jsx)(r.li,{children:"@param string $string String to check."}),"\n",(0,n.jsx)(r.li,{children:"@return bool"}),"\n"]}),"\n",(0,n.jsx)(r.h2,{id:"flatten_array",children:"flatten_array"}),"\n",(0,n.jsx)(r.p,{children:"Flattens a multidimensional array."}),"\n",(0,n.jsxs)(r.ul,{children:["\n",(0,n.jsx)(r.li,{children:"@param array $array Multidimensional array."}),"\n",(0,n.jsx)(r.li,{children:"@return array"}),"\n"]}),"\n",(0,n.jsx)(r.h2,{id:"sanitize_array",children:"sanitize_array"}),"\n",(0,n.jsx)(r.p,{children:"Sanitize all the values in an array."}),"\n",(0,n.jsxs)(r.ul,{children:["\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsx)(r.p,{children:"@param array $array Provided array."}),"\n"]}),"\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsx)(r.p,{children:"@param string $sanitization_function WordPress function used for sanitization purposes."}),"\n"]}),"\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsxs)(r.p,{children:["@link ",(0,n.jsx)(r.a,{href:"https://developer.wordpress.org/themes/theme-security/data-sanitization-escaping/",children:"https://developer.wordpress.org/themes/theme-security/data-sanitization-escaping/"})]}),"\n"]}),"\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsx)(r.p,{children:"@return array"}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(r.h2,{id:"sort_array_by_order_key",children:"sort_array_by_order_key"}),"\n",(0,n.jsx)(r.p,{children:"Sort array by order key. It is used to sort terms."}),"\n",(0,n.jsxs)(r.ul,{children:["\n",(0,n.jsx)(r.li,{children:"@param array $items Items array to sort. Must have order key."}),"\n",(0,n.jsx)(r.li,{children:"@return array"}),"\n"]})]})}function h(e={}){const{wrapper:r}={...(0,i.a)(),...e.components};return r?(0,n.jsx)(r,{...e,children:(0,n.jsx)(o,{...e})}):o(e)}},11151:(e,r,s)=>{s.d(r,{Z:()=>l,a:()=>a});var n=s(67294);const i={},t=n.createContext(i);function a(e){const r=n.useContext(t);return n.useMemo((function(){return"function"==typeof e?e(r):{...r,...e}}),[r,e])}function l(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:a(e.components),n.createElement(t.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/0f187495.0cf83dab.js b/assets/js/0f187495.0cf83dab.js deleted file mode 100644 index 6270831d0..000000000 --- a/assets/js/0f187495.0cf83dab.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_eightshift_docs=self.webpackChunk_eightshift_docs||[]).push([[80239],{3905:function(e,t,n){n.d(t,{Zo:function(){return u},kt:function(){return h}});var a=n(67294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function s(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var l=a.createContext({}),c=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):s(s({},t),e)),n},u=function(e){var t=c(e.components);return a.createElement(l.Provider,{value:t},e.children)},m="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},d=a.forwardRef((function(e,t){var n=e.components,o=e.mdxType,r=e.originalType,l=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),m=c(n),d=o,h=m["".concat(l,".").concat(d)]||m[d]||p[d]||r;return n?a.createElement(h,s(s({ref:t},u),{},{components:n})):a.createElement(h,s({ref:t},u))}));function h(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var r=n.length,s=new Array(r);s[0]=d;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i[m]="string"==typeof e?e:o,s[1]=i;for(var c=2;cprimitive parameter (string, int, etc.) inside a constructor method?",id:"what-if-my-class-has-a-primitive-parameter-string-int-etc-inside-a-constructor-method",level:3},{value:"What if my class does have another class as a parameter inside a constructor method?",id:"what-if-my-class-does-have-another-class-as-a-parameter-inside-a-constructor-method",level:3},{value:"What if my class has an interface parameter inside the constructor method?",id:"what-if-my-class-has-an-interface-parameter-inside-the-constructor-method",level:3},{value:"Example",id:"example",level:4},{value:"To sum it up",id:"to-sum-it-up",level:2}],p={toc:m},d="wrapper";function h(e){var t=e.components,n=(0,o.Z)(e,s);return(0,r.kt)(d,(0,a.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,(0,r.kt)("a",{parentName:"p",href:"https://github.com/infinum/eightshift-libs/tree/3.0.0/"},(0,r.kt)("img",{parentName:"a",src:"https://img.shields.io/badge/source-eigthshift--libs-blue?style=for-the-badge&logo=php&labelColor=2a2a2a",alt:"docs-source"}))),(0,r.kt)("p",null,"What is autowiring?"),(0,r.kt)("p",null,(0,r.kt)("em",{parentName:"p"},"Autowiring is an exotic word that represents something very simple: the container's ability to create and inject dependencies automatically.")),(0,r.kt)("p",null,"The quote is taken from the ",(0,r.kt)("a",{parentName:"p",href:"https://php-di.org/doc/autowiring.html"},"PHP-DI")," library that we use."),(0,r.kt)("p",null,"In a nutshell, we use a dependency injection (DI) container to load all your service classes. Alongside the DI container, we also use the PSR-4 coding standard for autoloading. That allows us to predict what your file/folder structure will look like in correlation to the namespace. With that in mind, you don't have to worry about requiring your classes. Our autoloading takes care of everything. All you need to do is follow a few coding standards so that you can automatically inject other classes as dependencies."),(0,r.kt)("p",null,"Autowiring runs inside the ",(0,r.kt)("inlineCode",{parentName:"p"},"Main")," service class as an extended class of our ",(0,r.kt)("inlineCode",{parentName:"p"},"AbstractMain")," class. You can install the main class using this command:"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"wp boilerplate create_main")),(0,r.kt)("h2",{id:"how-it-works"},"How it works"),(0,r.kt)("p",null,"Here is a quick overview of how this works:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"You create a new class manually or using the WP-CLI command."),(0,r.kt)("li",{parentName:"ul"},"PSR-4 should detect your new class if you followed the PSR-4 naming standard."),(0,r.kt)("li",{parentName:"ul"},"The new class is added to the ",(0,r.kt)("inlineCode",{parentName:"li"},"classmap")," array inside the ",(0,r.kt)("inlineCode",{parentName:"li"},"vendor")," folder."),(0,r.kt)("li",{parentName:"ul"},"Autowiring class reads the new class, checks if your class has any class dependencies, and injects them."),(0,r.kt)("li",{parentName:"ul"},"It just works.")),(0,r.kt)("p",null,"To put it shortly: just add a new class (that is PSR-4 compliant) with or without some class dependencies and everything will be automatically resolved/injected."),(0,r.kt)("h3",{id:"what-if-i-have-to-mock-or-manually-call-a-class"},"What if I have to mock or manually call a class?"),(0,r.kt)("p",null,"Before we start with the automatization and autowiring, let's see how service classes are called manually."),(0,r.kt)("p",null,"We can think of these scenarios where you want to load a class manually:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"You have to write tests and manually provide mocked classes."),(0,r.kt)("li",{parentName:"ul"},"Your classes have a custom structure and autowiring can't resolve it."),(0,r.kt)("li",{parentName:"ul"},"You want to provide a primitive parameter (",(0,r.kt)("inlineCode",{parentName:"li"},"string"),", ",(0,r.kt)("inlineCode",{parentName:"li"},"int"),", etc.) inside a constructor method.")),(0,r.kt)("p",null,"In those cases, you can manually provide your DI container with the implementation using the ",(0,r.kt)("inlineCode",{parentName:"p"},"getServiceClasses")," method inside the ",(0,r.kt)("inlineCode",{parentName:"p"},"src>Main>Main")," class."),(0,r.kt)("p",null,"Provide the method and add your custom implementation like this:"),(0,r.kt)("p",null,(0,r.kt)("inlineCode",{parentName:"p"},"src>Main>Main.php")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-php"}," /**\n * Get the list of services to register.\n *\n * A list of classes which contain hooks.\n *\n * @return array Array of fully qualified service class names.\n */\n protected function getServiceClasses(): array\n {\n return [\n\n // If you are using a class as a DI.\n ProjectNamespace\\Rest\\Routes\\DocumentsRoute::class => [ProjectNamespace\\Query\\Documents\\QueryDocuments::class],\n\n // If you just want to include a simple class with no DI.\n ProjectNamespace\\CoolFolder\\CoolClass::class,\n ];\n }\n")),(0,r.kt)("h3",{id:"what-if-my-class-doesnt-have-anything-inside-a-constructor-method-no-dependencies"},"What if my class doesn't have anything inside a constructor method? (no dependencies)"),(0,r.kt)("p",null,"If your class ",(0,r.kt)("strong",{parentName:"p"},"doesn't have")," anything defined in the constructor method, autoloading will require your class.\nThis just means that you are not using dependency injection (since you have nothing to inject)."),(0,r.kt)("h3",{id:"what-if-my-class-has-a-primitive-parameter-string-int-etc-inside-a-constructor-method"},"What if my class has a ",(0,r.kt)("strong",{parentName:"h3"},"primitive parameter")," (",(0,r.kt)("inlineCode",{parentName:"h3"},"string"),", ",(0,r.kt)("inlineCode",{parentName:"h3"},"int"),", etc.) inside a constructor method?"),(0,r.kt)("p",null,"If your class ",(0,r.kt)("strong",{parentName:"p"},"has")," a primitive parameter defined in the constructor method, autowiring will ",(0,r.kt)("strong",{parentName:"p"},"not know")," how to handle this because you manually need to provide the primitive parameters at the point of usage. You can find more information about that ",(0,r.kt)("a",{parentName:"p",href:"#what-if-i-have-to-mock-or-manually-call-a-class"},"here"),"."),(0,r.kt)("h3",{id:"what-if-my-class-does-have-another-class-as-a-parameter-inside-a-constructor-method"},"What if my class does have another class as a parameter inside a constructor method?"),(0,r.kt)("p",null,"This works out of the box, but you shouldn't really do this."),(0,r.kt)("p",null,"A good coding practice is that your class should never depend on the concrete class implementation because you have tightly coupled your class to another class. This makes it hard to test and your code becomes hard to modify. Imagine that you have put a concrete implementation as a dependency, only to get feedback from the client that you need to change that implementation for a completely different one. Making the changes means that you'll need to track all the places in your codebase where you have used some functionality from this class, and change it completely."),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"You should always code against interfaces and not implementation.")),(0,r.kt)("p",null,"We can't stress this enough because as your project grows, so will your headaches. Also, when you start testing your code, that is when your hair will begin to fall off. We recommend reading Uncle Bob Martin's ",(0,r.kt)("a",{parentName:"p",href:"http://cleancoder.com/products"},"Clean Code"),". That will save you a lot of sleepless nights, and you'll learn tons of tips and tricks for writing clean code."),(0,r.kt)("h3",{id:"what-if-my-class-has-an-interface-parameter-inside-the-constructor-method"},"What if my class has an interface parameter inside the constructor method?"),(0,r.kt)("p",null,"This will automatically be resolved (same as with class parameters) if you follow one simple rule:"),(0,r.kt)("blockquote",null,(0,r.kt)("p",{parentName:"blockquote"},"Variable name in your constructor method needs to match the class name (which implements the interface) in camelCase.")),(0,r.kt)("p",null,"For example, let's say you have a ",(0,r.kt)("inlineCode",{parentName:"p"},"SteeringWheel")," class:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-php"},"class SteeringWheel implements CarPartInterface\n")),(0,r.kt)("p",null,"and you want to have this as a dependency in Car class. Your Car class has the following constructor:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-php"},"public function __construct(CarPartInterface $steeringWheel)\n{\n $this->steeringWheel = $steeringWheel;\n}\n")),(0,r.kt)("p",null,"Since the injected variable name ",(0,r.kt)("inlineCode",{parentName:"p"},"$steeringWheel")," is the camelCase version of the class name ",(0,r.kt)("inlineCode",{parentName:"p"},"SteeringWheel")," which implements ",(0,r.kt)("inlineCode",{parentName:"p"},"CarPartInterface"),", autowiring will know to inject the correct class and everything will work fine."),(0,r.kt)("p",null,"If you understand everything from the upper example, you can just skip the next one. However, we recommend checking out the following example for a more detailed overview."),(0,r.kt)("h4",{id:"example"},"Example"),(0,r.kt)("p",null,"Let's set a scene. You have created a ",(0,r.kt)("inlineCode",{parentName:"p"},"DocumentsRoute")," class and it needs some functionality from the ",(0,r.kt)("inlineCode",{parentName:"p"},"QueryDocuments")," class."),(0,r.kt)("p",null,"Steps you need to follow are:"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"You should create an interface with all the methods you need in the ",(0,r.kt)("inlineCode",{parentName:"li"},"DocumentsRoute")," class. Let's call it ",(0,r.kt)("inlineCode",{parentName:"li"},"QueryDocumentsInterface"),". We'll put it inside the ",(0,r.kt)("inlineCode",{parentName:"li"},"src/Query/Documents")," folder."),(0,r.kt)("li",{parentName:"ul"},"Your ",(0,r.kt)("inlineCode",{parentName:"li"},"QueryDocuments")," class should implement your new ",(0,r.kt)("inlineCode",{parentName:"li"},"QueryDocumentsInterface")," class and have all the methods from the interface implemented."),(0,r.kt)("li",{parentName:"ul"},"In your ",(0,r.kt)("inlineCode",{parentName:"li"},"DocumentsRoute")," class, provide the ",(0,r.kt)("inlineCode",{parentName:"li"},"QueryDocumentsInterface")," interface as a parameter inside the ",(0,r.kt)("inlineCode",{parentName:"li"},"__construct")," method with the name of the argument ",(0,r.kt)("inlineCode",{parentName:"li"},"$queryDocuments"),"."),(0,r.kt)("li",{parentName:"ul"},"You can now use the methods defined in the ",(0,r.kt)("inlineCode",{parentName:"li"},"QueryDocuments")," class.")),(0,r.kt)("p",null,"Let us provide you with some code examples:"),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Structure:")),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},"src",(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},"Query",(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},"Documents",(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},"QueryDocumentsInterface.class"),(0,r.kt)("li",{parentName:"ul"},"QueryDocuments.class"))))),(0,r.kt)("li",{parentName:"ul"},"Rest",(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},"Routes",(0,r.kt)("ul",{parentName:"li"},(0,r.kt)("li",{parentName:"ul"},"DocumentsRoute.class")))))))),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"src/Query/Documents/QueryDocumentsInterface.php")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-php"},"/**\n * The file that holds a QueryDocuments interface.\n *\n * @package ProjectNamespace\\Query\\Documents;\n */\n\ndeclare(strict_types=1);\n\nnamespace ProjectNamespace\\Query\\Documents;\n\n/**\n * Interface for querying documents\n */\ninterface QueryDocumentsInterface\n{\n\n /**\n * Get structured documents data for documents section.\n *\n * @param int $id Id for data.\n *\n * @return string\n */\n public function getDocumentsData(int $id = 0): string;\n}\n")),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"src/Query/Documents/QueryDocuments.php")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-php"},"/**\n * The file for querying all the documents\n *\n * @package ProjectNamespace\\Query\\Documents\n */\n\ndeclare(strict_types=1);\n\nnamespace ProjectNamespace\\Query\\Documents;\n\nuse ProjectNamespaceVendor\\EightshiftLibs\\Services\\ServiceInterface;\n\n/**\n * QueryDocuments class.\n */\nclass QueryDocuments implements ServiceInterface, QueryDocumentsInterface\n{\n /**\n * Get structured documents data for documents section.\n *\n * @param int $id Id for data.\n *\n * @return string\n */\n public function getDocumentsData(int $id = 0): string\n {\n // here goes the implementation of getDocumentsData method.\n }\n}\n")),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"src/Rest/Routes/DocumentsRoute.php")),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-php"},"/**\n * The class register route for DocumentsRoute endpoint\n *\n * @package ProjectNamespace\\Rest\\Routes\n */\n\ndeclare(strict_types=1);\n\nnamespace ProjectNamespace\\Rest\\Routes;\n\nuse ProjectNamespace\\Query\\Documents\\QueryDocumentsInterface;\nuse ProjectNamespaceVendor\\EightshiftLibs\\Rest\\Routes\\AbstractRoute;\nuse ProjectNamespaceVendor\\EightshiftLibs\\Rest\\CallableRouteInterface;\n\n/**\n * Class DocumentsRoute\n */\nclass DocumentsRoute extends AbstractRoute implements CallableRouteInterface\n{\n\n /**\n * Instance variable of documents data.\n *\n * @var QueryDocumentsInterface\n */\n protected $queryDocuments;\n\n /**\n * Create a new instance.\n *\n * @param QueryDocumentsInterface $queryDocuments Inject documentsData which holds data for documents.\n */\n public function __construct(QueryDocumentsInterface $queryDocuments)\n {\n $this->queryDocuments = $queryDocuments;\n }\n\n // here goes the rest of the DocumentsRoute implementation.\n}\n")),(0,r.kt)("p",null,"And that's it. Autowiring knows how to resolve the dependencies, you didn't tightly couple the code, and you're all set."),(0,r.kt)("h2",{id:"to-sum-it-up"},"To sum it up"),(0,r.kt)("p",null,"This chapter may be a bit long, but we wanted to make sure you understand our motivation behind it. We often work on large projects with lots of third-party integrations, and having a good project structure and architecture makes the projects more durable. It makes them less prone to bugs (if you write tests) and makes implementing new features and removing obsolete ones a lot easier."),(0,r.kt)("p",null,"Do you need to use it? Not really. Especially on really simple projects. Should you? We think you'll benefit from it in the long run."))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/0f187495.83c9fa17.js b/assets/js/0f187495.83c9fa17.js new file mode 100644 index 000000000..6a7447865 --- /dev/null +++ b/assets/js/0f187495.83c9fa17.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_eightshift_docs=self.webpackChunk_eightshift_docs||[]).push([[80239],{3056:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>c,contentTitle:()=>o,default:()=>h,frontMatter:()=>i,metadata:()=>r,toc:()=>l});var t=s(85893),a=s(11151);const i={id:"autowiring",title:"Autowiring",sidebar_label:"Autowiring"},o=void 0,r={id:"legacy/v5/basics/autowiring",title:"Autowiring",description:"docs-source",source:"@site/docs/legacy/v5/basics/autowiring.md",sourceDirName:"legacy/v5/basics",slug:"/legacy/v5/basics/autowiring",permalink:"/docs/legacy/v5/basics/autowiring",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{id:"autowiring",title:"Autowiring",sidebar_label:"Autowiring"},sidebar:"docs",previous:{title:"Extending Classes",permalink:"/docs/legacy/v5/basics/extending-classes"},next:{title:"Example Class",permalink:"/docs/legacy/v5/basics/example-class"}},c={},l=[{value:"How it works",id:"how-it-works",level:2},{value:"What if I have to mock or manually call a class?",id:"what-if-i-have-to-mock-or-manually-call-a-class",level:3},{value:"What if my class doesn't have anything inside a constructor method? (no dependencies)",id:"what-if-my-class-doesnt-have-anything-inside-a-constructor-method-no-dependencies",level:3},{value:"What if my class has a primitive parameter (string, int, etc.) inside a constructor method?",id:"what-if-my-class-has-a-primitive-parameter-string-int-etc-inside-a-constructor-method",level:3},{value:"What if my class does have another class as a parameter inside a constructor method?",id:"what-if-my-class-does-have-another-class-as-a-parameter-inside-a-constructor-method",level:3},{value:"What if my class has an interface parameter inside the constructor method?",id:"what-if-my-class-has-an-interface-parameter-inside-the-constructor-method",level:3},{value:"Example",id:"example",level:4},{value:"To sum it up",id:"to-sum-it-up",level:2}];function d(e){const n={a:"a",blockquote:"blockquote",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",img:"img",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,a.a)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.p,{children:(0,t.jsx)(n.a,{href:"https://github.com/infinum/eightshift-libs/tree/3.0.0/",children:(0,t.jsx)(n.img,{src:"https://img.shields.io/badge/source-eigthshift--libs-blue?style=for-the-badge&logo=php&labelColor=2a2a2a",alt:"docs-source"})})}),"\n",(0,t.jsx)(n.p,{children:"What is autowiring?"}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.em,{children:"Autowiring is an exotic word that represents something very simple: the container's ability to create and inject dependencies automatically."})}),"\n",(0,t.jsxs)(n.p,{children:["The quote is taken from the ",(0,t.jsx)(n.a,{href:"https://php-di.org/doc/autowiring.html",children:"PHP-DI"})," library that we use."]}),"\n",(0,t.jsx)(n.p,{children:"In a nutshell, we use a dependency injection (DI) container to load all your service classes. Alongside the DI container, we also use the PSR-4 coding standard for autoloading. That allows us to predict what your file/folder structure will look like in correlation to the namespace. With that in mind, you don't have to worry about requiring your classes. Our autoloading takes care of everything. All you need to do is follow a few coding standards so that you can automatically inject other classes as dependencies."}),"\n",(0,t.jsxs)(n.p,{children:["Autowiring runs inside the ",(0,t.jsx)(n.code,{children:"Main"})," service class as an extended class of our ",(0,t.jsx)(n.code,{children:"AbstractMain"})," class. You can install the main class using this command:"]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.code,{children:"wp boilerplate create_main"})}),"\n",(0,t.jsx)(n.h2,{id:"how-it-works",children:"How it works"}),"\n",(0,t.jsx)(n.p,{children:"Here is a quick overview of how this works:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"You create a new class manually or using the WP-CLI command."}),"\n",(0,t.jsx)(n.li,{children:"PSR-4 should detect your new class if you followed the PSR-4 naming standard."}),"\n",(0,t.jsxs)(n.li,{children:["The new class is added to the ",(0,t.jsx)(n.code,{children:"classmap"})," array inside the ",(0,t.jsx)(n.code,{children:"vendor"})," folder."]}),"\n",(0,t.jsx)(n.li,{children:"Autowiring class reads the new class, checks if your class has any class dependencies, and injects them."}),"\n",(0,t.jsx)(n.li,{children:"It just works."}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"To put it shortly: just add a new class (that is PSR-4 compliant) with or without some class dependencies and everything will be automatically resolved/injected."}),"\n",(0,t.jsx)(n.h3,{id:"what-if-i-have-to-mock-or-manually-call-a-class",children:"What if I have to mock or manually call a class?"}),"\n",(0,t.jsx)(n.p,{children:"Before we start with the automatization and autowiring, let's see how service classes are called manually."}),"\n",(0,t.jsx)(n.p,{children:"We can think of these scenarios where you want to load a class manually:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"You have to write tests and manually provide mocked classes."}),"\n",(0,t.jsx)(n.li,{children:"Your classes have a custom structure and autowiring can't resolve it."}),"\n",(0,t.jsxs)(n.li,{children:["You want to provide a primitive parameter (",(0,t.jsx)(n.code,{children:"string"}),", ",(0,t.jsx)(n.code,{children:"int"}),", etc.) inside a constructor method."]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["In those cases, you can manually provide your DI container with the implementation using the ",(0,t.jsx)(n.code,{children:"getServiceClasses"})," method inside the ",(0,t.jsx)(n.code,{children:"src>Main>Main"})," class."]}),"\n",(0,t.jsx)(n.p,{children:"Provide the method and add your custom implementation like this:"}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.code,{children:"src>Main>Main.php"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-php",children:" /**\n * Get the list of services to register.\n *\n * A list of classes which contain hooks.\n *\n * @return array Array of fully qualified service class names.\n */\n protected function getServiceClasses(): array\n {\n return [\n\n // If you are using a class as a DI.\n ProjectNamespace\\Rest\\Routes\\DocumentsRoute::class => [ProjectNamespace\\Query\\Documents\\QueryDocuments::class],\n\n // If you just want to include a simple class with no DI.\n ProjectNamespace\\CoolFolder\\CoolClass::class,\n ];\n }\n"})}),"\n",(0,t.jsx)(n.h3,{id:"what-if-my-class-doesnt-have-anything-inside-a-constructor-method-no-dependencies",children:"What if my class doesn't have anything inside a constructor method? (no dependencies)"}),"\n",(0,t.jsxs)(n.p,{children:["If your class ",(0,t.jsx)(n.strong,{children:"doesn't have"})," anything defined in the constructor method, autoloading will require your class.\nThis just means that you are not using dependency injection (since you have nothing to inject)."]}),"\n",(0,t.jsxs)(n.h3,{id:"what-if-my-class-has-a-primitive-parameter-string-int-etc-inside-a-constructor-method",children:["What if my class has a ",(0,t.jsx)(n.strong,{children:"primitive parameter"})," (",(0,t.jsx)(n.code,{children:"string"}),", ",(0,t.jsx)(n.code,{children:"int"}),", etc.) inside a constructor method?"]}),"\n",(0,t.jsxs)(n.p,{children:["If your class ",(0,t.jsx)(n.strong,{children:"has"})," a primitive parameter defined in the constructor method, autowiring will ",(0,t.jsx)(n.strong,{children:"not know"})," how to handle this because you manually need to provide the primitive parameters at the point of usage. You can find more information about that ",(0,t.jsx)(n.a,{href:"#what-if-i-have-to-mock-or-manually-call-a-class",children:"here"}),"."]}),"\n",(0,t.jsx)(n.h3,{id:"what-if-my-class-does-have-another-class-as-a-parameter-inside-a-constructor-method",children:"What if my class does have another class as a parameter inside a constructor method?"}),"\n",(0,t.jsx)(n.p,{children:"This works out of the box, but you shouldn't really do this."}),"\n",(0,t.jsx)(n.p,{children:"A good coding practice is that your class should never depend on the concrete class implementation because you have tightly coupled your class to another class. This makes it hard to test and your code becomes hard to modify. Imagine that you have put a concrete implementation as a dependency, only to get feedback from the client that you need to change that implementation for a completely different one. Making the changes means that you'll need to track all the places in your codebase where you have used some functionality from this class, and change it completely."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"You should always code against interfaces and not implementation."})}),"\n",(0,t.jsxs)(n.p,{children:["We can't stress this enough because as your project grows, so will your headaches. Also, when you start testing your code, that is when your hair will begin to fall off. We recommend reading Uncle Bob Martin's ",(0,t.jsx)(n.a,{href:"http://cleancoder.com/products",children:"Clean Code"}),". That will save you a lot of sleepless nights, and you'll learn tons of tips and tricks for writing clean code."]}),"\n",(0,t.jsx)(n.h3,{id:"what-if-my-class-has-an-interface-parameter-inside-the-constructor-method",children:"What if my class has an interface parameter inside the constructor method?"}),"\n",(0,t.jsx)(n.p,{children:"This will automatically be resolved (same as with class parameters) if you follow one simple rule:"}),"\n",(0,t.jsxs)(n.blockquote,{children:["\n",(0,t.jsx)(n.p,{children:"Variable name in your constructor method needs to match the class name (which implements the interface) in camelCase."}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["For example, let's say you have a ",(0,t.jsx)(n.code,{children:"SteeringWheel"})," class:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-php",children:"class SteeringWheel implements CarPartInterface\n"})}),"\n",(0,t.jsx)(n.p,{children:"and you want to have this as a dependency in Car class. Your Car class has the following constructor:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-php",children:"public function __construct(CarPartInterface $steeringWheel)\n{\n $this->steeringWheel = $steeringWheel;\n}\n"})}),"\n",(0,t.jsxs)(n.p,{children:["Since the injected variable name ",(0,t.jsx)(n.code,{children:"$steeringWheel"})," is the camelCase version of the class name ",(0,t.jsx)(n.code,{children:"SteeringWheel"})," which implements ",(0,t.jsx)(n.code,{children:"CarPartInterface"}),", autowiring will know to inject the correct class and everything will work fine."]}),"\n",(0,t.jsx)(n.p,{children:"If you understand everything from the upper example, you can just skip the next one. However, we recommend checking out the following example for a more detailed overview."}),"\n",(0,t.jsx)(n.h4,{id:"example",children:"Example"}),"\n",(0,t.jsxs)(n.p,{children:["Let's set a scene. You have created a ",(0,t.jsx)(n.code,{children:"DocumentsRoute"})," class and it needs some functionality from the ",(0,t.jsx)(n.code,{children:"QueryDocuments"})," class."]}),"\n",(0,t.jsx)(n.p,{children:"Steps you need to follow are:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["You should create an interface with all the methods you need in the ",(0,t.jsx)(n.code,{children:"DocumentsRoute"})," class. Let's call it ",(0,t.jsx)(n.code,{children:"QueryDocumentsInterface"}),". We'll put it inside the ",(0,t.jsx)(n.code,{children:"src/Query/Documents"})," folder."]}),"\n",(0,t.jsxs)(n.li,{children:["Your ",(0,t.jsx)(n.code,{children:"QueryDocuments"})," class should implement your new ",(0,t.jsx)(n.code,{children:"QueryDocumentsInterface"})," class and have all the methods from the interface implemented."]}),"\n",(0,t.jsxs)(n.li,{children:["In your ",(0,t.jsx)(n.code,{children:"DocumentsRoute"})," class, provide the ",(0,t.jsx)(n.code,{children:"QueryDocumentsInterface"})," interface as a parameter inside the ",(0,t.jsx)(n.code,{children:"__construct"})," method with the name of the argument ",(0,t.jsx)(n.code,{children:"$queryDocuments"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:["You can now use the methods defined in the ",(0,t.jsx)(n.code,{children:"QueryDocuments"})," class."]}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"Let us provide you with some code examples:"}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Structure:"})}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["src","\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["Query","\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["Documents","\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"QueryDocumentsInterface.class"}),"\n",(0,t.jsx)(n.li,{children:"QueryDocuments.class"}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["Rest","\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["Routes","\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"DocumentsRoute.class"}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"src/Query/Documents/QueryDocumentsInterface.php"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-php",children:"/**\n * The file that holds a QueryDocuments interface.\n *\n * @package ProjectNamespace\\Query\\Documents;\n */\n\ndeclare(strict_types=1);\n\nnamespace ProjectNamespace\\Query\\Documents;\n\n/**\n * Interface for querying documents\n */\ninterface QueryDocumentsInterface\n{\n\n /**\n * Get structured documents data for documents section.\n *\n * @param int $id Id for data.\n *\n * @return string\n */\n public function getDocumentsData(int $id = 0): string;\n}\n"})}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"src/Query/Documents/QueryDocuments.php"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-php",children:"/**\n * The file for querying all the documents\n *\n * @package ProjectNamespace\\Query\\Documents\n */\n\ndeclare(strict_types=1);\n\nnamespace ProjectNamespace\\Query\\Documents;\n\nuse ProjectNamespaceVendor\\EightshiftLibs\\Services\\ServiceInterface;\n\n/**\n * QueryDocuments class.\n */\nclass QueryDocuments implements ServiceInterface, QueryDocumentsInterface\n{\n /**\n * Get structured documents data for documents section.\n *\n * @param int $id Id for data.\n *\n * @return string\n */\n public function getDocumentsData(int $id = 0): string\n {\n // here goes the implementation of getDocumentsData method.\n }\n}\n"})}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"src/Rest/Routes/DocumentsRoute.php"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-php",children:"/**\n * The class register route for DocumentsRoute endpoint\n *\n * @package ProjectNamespace\\Rest\\Routes\n */\n\ndeclare(strict_types=1);\n\nnamespace ProjectNamespace\\Rest\\Routes;\n\nuse ProjectNamespace\\Query\\Documents\\QueryDocumentsInterface;\nuse ProjectNamespaceVendor\\EightshiftLibs\\Rest\\Routes\\AbstractRoute;\nuse ProjectNamespaceVendor\\EightshiftLibs\\Rest\\CallableRouteInterface;\n\n/**\n * Class DocumentsRoute\n */\nclass DocumentsRoute extends AbstractRoute implements CallableRouteInterface\n{\n\n /**\n * Instance variable of documents data.\n *\n * @var QueryDocumentsInterface\n */\n protected $queryDocuments;\n\n /**\n * Create a new instance.\n *\n * @param QueryDocumentsInterface $queryDocuments Inject documentsData which holds data for documents.\n */\n public function __construct(QueryDocumentsInterface $queryDocuments)\n {\n $this->queryDocuments = $queryDocuments;\n }\n\n // here goes the rest of the DocumentsRoute implementation.\n}\n"})}),"\n",(0,t.jsx)(n.p,{children:"And that's it. Autowiring knows how to resolve the dependencies, you didn't tightly couple the code, and you're all set."}),"\n",(0,t.jsx)(n.h2,{id:"to-sum-it-up",children:"To sum it up"}),"\n",(0,t.jsx)(n.p,{children:"This chapter may be a bit long, but we wanted to make sure you understand our motivation behind it. We often work on large projects with lots of third-party integrations, and having a good project structure and architecture makes the projects more durable. It makes them less prone to bugs (if you write tests) and makes implementing new features and removing obsolete ones a lot easier."}),"\n",(0,t.jsx)(n.p,{children:"Do you need to use it? Not really. Especially on really simple projects. Should you? We think you'll benefit from it in the long run."})]})}function h(e={}){const{wrapper:n}={...(0,a.a)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}},11151:(e,n,s)=>{s.d(n,{Z:()=>r,a:()=>o});var t=s(67294);const a={},i=t.createContext(a);function o(e){const n=t.useContext(i);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:o(e.components),t.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/0fe8a02a.a342ead9.js b/assets/js/0fe8a02a.a342ead9.js new file mode 100644 index 000000000..7a9ef0b17 --- /dev/null +++ b/assets/js/0fe8a02a.a342ead9.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_eightshift_docs=self.webpackChunk_eightshift_docs||[]).push([[53244],{33770:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>a,contentTitle:()=>r,default:()=>d,frontMatter:()=>o,metadata:()=>h,toc:()=>c});var i=s(85893),n=s(11151);const o={id:"versions",title:"Versions"},r=void 0,h={id:"versions",title:"Versions",description:"Now that you understand what makes the Eightshift Development Kit tick, here is a quick reminder about what library versions this documentation refers to.",source:"@site/docs/versions.md",sourceDirName:".",slug:"/versions",permalink:"/docs/versions",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{id:"versions",title:"Versions"},sidebar:"docs",previous:{title:"Requirements",permalink:"/docs/requirements"},next:{title:"Create New Theme",permalink:"/docs/theme"}},a={},c=[];function l(e){const t={a:"a",img:"img",p:"p",...(0,n.a)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.p,{children:"Now that you understand what makes the Eightshift Development Kit tick, here is a quick reminder about what library versions this documentation refers to."}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.a,{href:"https://github.com/infinum/eightshift-boilerplate",children:(0,i.jsx)(t.img,{src:"https://img.shields.io/badge/version--9.0.0-eightshift--boilerplate-red?style=for-the-badge&logo=",alt:"docs-source"})})}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.a,{href:"https://github.com/infinum/eightshift-boilerplate",children:(0,i.jsx)(t.img,{src:"https://img.shields.io/badge/version--4.0.0-eightshift--boilerplate--plugin-important?style=for-the-badge&logo=",alt:"docs-source"})})}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.a,{href:"https://github.com/infinum/eightshift-libs",children:(0,i.jsx)(t.img,{src:"https://img.shields.io/badge/version--6.4.0-eightshift--libs-blue?style=for-the-badge&logo=",alt:"docs-source"})})}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.a,{href:"https://github.com/infinum/eightshift-frontend-libs",children:(0,i.jsx)(t.img,{src:"https://img.shields.io/badge/version--8.0.0-eightshift--frontend--libs-yellow?style=for-the-badge&logo=",alt:"docs-source"})})})]})}function d(e={}){const{wrapper:t}={...(0,n.a)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(l,{...e})}):l(e)}},11151:(e,t,s)=>{s.d(t,{Z:()=>h,a:()=>r});var i=s(67294);const n={},o=i.createContext(n);function r(e){const t=i.useContext(o);return i.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function h(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:r(e.components),i.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/0fe8a02a.f885862b.js b/assets/js/0fe8a02a.f885862b.js deleted file mode 100644 index 884a6b485..000000000 --- a/assets/js/0fe8a02a.f885862b.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_eightshift_docs=self.webpackChunk_eightshift_docs||[]).push([[53244],{3905:function(e,t,r){r.d(t,{Zo:function(){return u},kt:function(){return m}});var n=r(67294);function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var c=n.createContext({}),l=function(e){var t=n.useContext(c),r=t;return e&&(r="function"==typeof e?e(t):s(s({},t),e)),r},u=function(e){var t=l(e.components);return n.createElement(c.Provider,{value:t},e.children)},p="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},h=n.forwardRef((function(e,t){var r=e.components,i=e.mdxType,o=e.originalType,c=e.parentName,u=a(e,["components","mdxType","originalType","parentName"]),p=l(r),h=i,m=p["".concat(c,".").concat(h)]||p[h]||f[h]||o;return r?n.createElement(m,s(s({ref:t},u),{},{components:r})):n.createElement(m,s({ref:t},u))}));function m(e,t){var r=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var o=r.length,s=new Array(o);s[0]=h;var a={};for(var c in t)hasOwnProperty.call(t,c)&&(a[c]=t[c]);a.originalType=e,a[p]="string"==typeof e?e:i,s[1]=a;for(var l=2;l{s.exports=JSON.parse('{"label":"components","permalink":"/blog/tags/components","allTagsPath":"/blog/tags","count":4,"unlisted":false}')}}]); \ No newline at end of file diff --git a/assets/js/10c1e86a.27414bed.js b/assets/js/10c1e86a.27414bed.js deleted file mode 100644 index 1ef8a2220..000000000 --- a/assets/js/10c1e86a.27414bed.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_eightshift_docs=self.webpackChunk_eightshift_docs||[]).push([[37933],{3905:function(e,t,n){n.d(t,{Zo:function(){return p},kt:function(){return d}});var o=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function i(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l=o.createContext({}),c=function(e){var t=o.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},p=function(e){var t=c(e.components);return o.createElement(l.Provider,{value:t},e.children)},u="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},f=o.forwardRef((function(e,t){var n=e.components,r=e.mdxType,a=e.originalType,l=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),u=c(n),f=r,d=u["".concat(l,".").concat(f)]||u[f]||m[f]||a;return n?o.createElement(d,i(i({ref:t},p),{},{components:n})):o.createElement(d,i({ref:t},p))}));function d(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var a=n.length,i=new Array(a);i[0]=f;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[u]="string"==typeof e?e:r,i[1]=s;for(var c=2;c{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>a,default:()=>p,frontMatter:()=>i,metadata:()=>l,toc:()=>r});var o=t(85893),s=t(11151);const i={id:"blocks-component-manifest",title:"Component Manifest"},a=void 0,l={id:"basics/blocks-component-manifest",title:"Component Manifest",description:"docs-source",source:"@site/docs/basics/blocks-component-manifest.md",sourceDirName:"basics",slug:"/basics/blocks-component-manifest",permalink:"/docs/basics/blocks-component-manifest",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{id:"blocks-component-manifest",title:"Component Manifest"},sidebar:"docs",previous:{title:"Block Manifest",permalink:"/docs/basics/block-manifest"},next:{title:"Attributes",permalink:"/docs/basics/blocks-attributes"}},c={},r=[{value:"Example",id:"example",level:3},{value:"componentName",id:"componentname",level:3},{value:"title",id:"title",level:3},{value:"componentClass",id:"componentclass",level:3},{value:"example",id:"example-1",level:3},{value:"attributes",id:"attributes",level:3},{value:"options",id:"options",level:3},{value:"components",id:"components",level:3}];function d(e){const n={a:"a",code:"code",h3:"h3",img:"img",p:"p",pre:"pre",...(0,s.a)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.p,{children:(0,o.jsx)(n.a,{href:"https://github.com/infinum/eightshift-frontend-libs/tree/develop/blocks/init/src/Blocks/",children:(0,o.jsx)(n.img,{src:"https://img.shields.io/badge/source-eightshift--frontend--libs-yellow?style=for-the-badge&logo=javascript&labelColor=2a2a2a",alt:"docs-source"})})}),"\n",(0,o.jsx)(n.p,{children:"A component manifest is a bit different from the block manifest. The main difference is that the component manifest is a fully custom feature, and it is only here to provide a way to store configuration data and share it with multiple files in your project."}),"\n",(0,o.jsx)(n.h3,{id:"example",children:"Example"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-json",children:'{\n "componentName": "heading",\n "title": "Heading",\n "componentClass": "heading",\n "example": {\n "attributes": {\n "headingContent": "This is heading",\n "headingLevel": 2,\n "headingSize": "default",\n "headingUse": true\n }\n },\n "attributes": {\n "headingContent": {\n "type": "string"\n },\n "headingLevel": {\n "type": "integer",\n "default": 2\n },\n "headingSize": {\n "type": "string",\n "default": "default"\n },\n "headingUse": {\n "type": "boolean",\n "default": true\n }\n },\n "options": {\n "sizes": [\n {\n "label": "Default (30px)",\n "value": "default"\n },\n {\n "label": "Big (50px)",\n "value": "big"\n }\n ],\n "aligns": [\n "left",\n "center",\n "right"\n ],\n "colors": [\n "primary",\n "black"\n ]\n },\n "components": {}\n}\n'})}),"\n",(0,o.jsx)(n.h3,{id:"componentname",children:"componentName"}),"\n",(0,o.jsx)(n.p,{children:"This key is the most important one. We use this key to specify the component attributes prefix. When it's used correctly, we are able to change the attributes prefix depending on the component name passed from the parent component or block."}),"\n",(0,o.jsx)(n.h3,{id:"title",children:"title"}),"\n",(0,o.jsx)(n.p,{children:"This key is used to provide the label for all your component options and provide the storybook's automatic story title."}),"\n",(0,o.jsx)(n.h3,{id:"componentclass",children:"componentClass"}),"\n",(0,o.jsx)(n.p,{children:"These keys are used to provide a single point of reference for a component name. You'll use this key to provide a prefix for all the CSS selectors in your component."}),"\n",(0,o.jsx)(n.h3,{id:"example-1",children:"example"}),"\n",(0,o.jsxs)(n.p,{children:["The same as in the blocks manifest. Please check ",(0,o.jsx)(n.a,{href:"block-manifest",children:"this chapter"})," for more details."]}),"\n",(0,o.jsx)(n.h3,{id:"attributes",children:"attributes"}),"\n",(0,o.jsxs)(n.p,{children:["For more details please check ",(0,o.jsx)(n.a,{href:"blocks-attributes",children:"this chapter"}),"."]}),"\n",(0,o.jsx)(n.h3,{id:"options",children:"options"}),"\n",(0,o.jsxs)(n.p,{children:["These keys are used to provide a single point of reference for component options used in the options part. If you have a ",(0,o.jsx)(n.code,{children:"SelectControl"})," or a ",(0,o.jsx)(n.code,{children:"ColorSelector"})," component, you can set all your options here and use those options in the options section and story for mocking components. Please check ",(0,o.jsx)(n.a,{href:"blocks-component-in-block",children:"this chapter"})," for more details."]}),"\n",(0,o.jsx)(n.h3,{id:"components",children:"components"}),"\n",(0,o.jsxs)(n.p,{children:["The same as in the blocks manifest. Please check ",(0,o.jsx)(n.a,{href:"block-manifest",children:"this chapter"})," for more details."]})]})}function p(e={}){const{wrapper:n}={...(0,s.a)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},11151:(e,n,t)=>{t.d(n,{Z:()=>l,a:()=>a});var o=t(67294);const s={},i=o.createContext(s);function a(e){const n=o.useContext(i);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),o.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/10db50b8.03a21cf8.js b/assets/js/10db50b8.03a21cf8.js deleted file mode 100644 index 9dd503b05..000000000 --- a/assets/js/10db50b8.03a21cf8.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_eightshift_docs=self.webpackChunk_eightshift_docs||[]).push([[57551],{3905:function(e,t,n){n.d(t,{Zo:function(){return p},kt:function(){return h}});var o=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function s(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l=o.createContext({}),c=function(e){var t=o.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):s(s({},t),e)),n},p=function(e){var t=c(e.components);return o.createElement(l.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},m=o.forwardRef((function(e,t){var n=e.components,r=e.mdxType,a=e.originalType,l=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),u=c(n),m=r,h=u["".concat(l,".").concat(m)]||u[m]||d[m]||a;return n?o.createElement(h,s(s({ref:t},p),{},{components:n})):o.createElement(h,s({ref:t},p))}));function h(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var a=n.length,s=new Array(a);s[0]=m;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i[u]="string"==typeof e?e:r,s[1]=i;for(var c=2;c{n.r(s),n.d(s,{assets:()=>l,contentTitle:()=>c,default:()=>h,frontMatter:()=>i,metadata:()=>r,toc:()=>d});var t=n(85893),o=n(11151);const i={id:"blocks-component-structure",title:"Component Structure"},c=void 0,r={id:"basics/blocks-component-structure",title:"Component Structure",description:"docs-source",source:"@site/docs/basics/blocks-component-structure.md",sourceDirName:"basics",slug:"/basics/blocks-component-structure",permalink:"/docs/basics/blocks-component-structure",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{id:"blocks-component-structure",title:"Component Structure"},sidebar:"docs",previous:{title:"Block Structure",permalink:"/docs/basics/block-structure"},next:{title:"Block Manifest",permalink:"/docs/basics/block-manifest"}},l={},d=[{value:"assets",id:"assets",level:3},{value:"components",id:"components",level:3},{value:"docs",id:"docs",level:3},{value:"heading.php",id:"headingphp",level:3},{value:"heading-editor.scss",id:"heading-editorscss",level:3},{value:"heading-style.scss",id:"heading-stylescss",level:3},{value:"manifest.json",id:"manifestjson",level:3}];function a(e){const s={a:"a",admonition:"admonition",code:"code",h3:"h3",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,o.a)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.p,{children:(0,t.jsx)(s.a,{href:"https://github.com/infinum/eightshift-frontend-libs/tree/develop/blocks/init/src/Blocks/",children:(0,t.jsx)(s.img,{src:"https://img.shields.io/badge/source-eightshift--frontend--libs-yellow?style=for-the-badge&logo=javascript&labelColor=2a2a2a",alt:"docs-source"})})}),"\n",(0,t.jsxs)(s.p,{children:["Your custom components are placed in the ",(0,t.jsx)(s.code,{children:"src/Blocks/components"})," folder."]}),"\n",(0,t.jsx)(s.p,{children:"For example, let's take the heading component (just replace the heading with your component name)."}),"\n",(0,t.jsx)(s.p,{children:"We suggest you always use the full name and never abbreviate for the component name. If your component has multiple words, you should separate them by a dash; for example, featured-post-block.js."}),"\n",(0,t.jsx)(s.p,{children:(0,t.jsx)(s.strong,{children:"Block structure should look like this:"})}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:["heading","\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:["assets","\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsx)(s.li,{children:"index.js"}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(s.li,{children:["components","\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsx)(s.li,{children:"heading-editor.js"}),"\n",(0,t.jsx)(s.li,{children:"heading-options.js"}),"\n",(0,t.jsx)(s.li,{children:"heading-toolbar.js"}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(s.li,{children:["docs","\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsx)(s.li,{children:"story.js"}),"\n",(0,t.jsx)(s.li,{children:"readme.mdx"}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(s.li,{children:"heading.php"}),"\n",(0,t.jsx)(s.li,{children:"heading-editor.scss"}),"\n",(0,t.jsx)(s.li,{children:"heading-style.scss"}),"\n",(0,t.jsx)(s.li,{children:"manifest.json"}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(s.p,{children:["For example, you can check the ",(0,t.jsx)(s.a,{href:"/storybook",children:"storybook"}),"."]}),"\n",(0,t.jsx)(s.admonition,{type:"note",children:(0,t.jsx)(s.p,{children:"All files in components are optional."})}),"\n",(0,t.jsx)(s.h3,{id:"assets",children:"assets"}),"\n",(0,t.jsxs)(s.p,{children:["This folder behaves the same as the blocks assets folder. Please check the ",(0,t.jsx)(s.a,{href:"block-structure#assets",children:"block structure"})," chapter for more details."]}),"\n",(0,t.jsx)(s.h3,{id:"components",children:"components"}),"\n",(0,t.jsxs)(s.p,{children:["Components folder holds three files: ",(0,t.jsx)(s.code,{children:"heading-options.js"}),", ",(0,t.jsx)(s.code,{children:"heading-editor.js"}),", and ",(0,t.jsx)(s.code,{children:"heading-toolbars.js"}),". They are used the same way as in blocks to provide functionality based on the location used. The main difference in components is that these files are used inside other blocks to implement functionality from the component."]}),"\n",(0,t.jsx)(s.h3,{id:"docs",children:"docs"}),"\n",(0,t.jsx)(s.p,{children:"Docs folder contains everything a component needs to be run inside the Storybook. This part is optional but it will speed up your development time and provide you with the much-needed documentation."}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.code,{children:"story.js"})," - Storybook entry point for your component. Since components are not blocks, you must provide the mocked data for your component in this file."]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.code,{children:"readme.mdx"})," - README that describes your component and provides the documentation."]}),"\n"]}),"\n",(0,t.jsx)(s.h3,{id:"headingphp",children:"heading.php"}),"\n",(0,t.jsx)(s.p,{children:"This file contains the front-end part (the view) of the component used in your project when the page renders. This file shouldn't contain any business logic, just present the passed attributes. The main difference from block view is that you only have attributes that you passed from a block or a top-level component in this file."}),"\n",(0,t.jsx)(s.h3,{id:"heading-editorscss",children:"heading-editor.scss"}),"\n",(0,t.jsxs)(s.p,{children:["This file behaves the same as in blocks. Please check the ",(0,t.jsx)(s.a,{href:"block-structure#heading-editorscss",children:"block structure"})," chapter for more details."]}),"\n",(0,t.jsx)(s.h3,{id:"heading-stylescss",children:"heading-style.scss"}),"\n",(0,t.jsxs)(s.p,{children:["This file behaves the same as in blocks. Please check the ",(0,t.jsx)(s.a,{href:"block-structure#heading-stylescss",children:"block structure"})," chapter for more details."]}),"\n",(0,t.jsx)(s.h3,{id:"manifestjson",children:"manifest.json"}),"\n",(0,t.jsx)(s.p,{children:"This file contains all the configuration for a component."}),"\n",(0,t.jsxs)(s.p,{children:["For more details, check the ",(0,t.jsx)(s.a,{href:"blocks-component-manifest",children:"component manifest"})," chapter."]})]})}function h(e={}){const{wrapper:s}={...(0,o.a)(),...e.components};return s?(0,t.jsx)(s,{...e,children:(0,t.jsx)(a,{...e})}):a(e)}},11151:(e,s,n)=>{n.d(s,{Z:()=>r,a:()=>c});var t=n(67294);const o={},i=t.createContext(o);function c(e){const s=t.useContext(i);return t.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function r(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:c(e.components),t.createElement(i.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/13362ea9.78813260.js b/assets/js/13362ea9.78813260.js new file mode 100644 index 000000000..c889c1dc1 --- /dev/null +++ b/assets/js/13362ea9.78813260.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_eightshift_docs=self.webpackChunk_eightshift_docs||[]).push([[65230],{74631:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>r,contentTitle:()=>t,default:()=>d,frontMatter:()=>l,metadata:()=>i,toc:()=>c});var o=s(85893),a=s(11151);const l={id:"writing-styles",title:"Writing Styles"},t=void 0,i={id:"basics/writing-styles",title:"Writing Styles",description:"docs-source",source:"@site/docs/basics/writing-styles.md",sourceDirName:"basics",slug:"/basics/writing-styles",permalink:"/docs/basics/writing-styles",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{id:"writing-styles",title:"Writing Styles"},sidebar:"docs",previous:{title:"Global Settings",permalink:"/docs/basics/global-settings"},next:{title:"Fonts",permalink:"/docs/basics/fonts"}},r={},c=[{value:"Never use HEX color values in your files",id:"never-use-hex-color-values-in-your-files",level:3},{value:"Never use the actual color name as a variable name",id:"never-use-the-actual-color-name-as-a-variable-name",level:3},{value:"All external variables must go to a components map",id:"all-external-variables-must-go-to-a-components-map",level:3},{value:"Never mix multiple maps in a single component",id:"never-mix-multiple-maps-in-a-single-component",level:3},{value:"Where can I define global typography for all my blocks/components?",id:"where-can-i-define-global-typography-for-all-my-blockscomponents",level:3}];function h(e){const n={a:"a",admonition:"admonition",code:"code",h3:"h3",img:"img",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,a.a)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.p,{children:(0,o.jsx)(n.a,{href:"https://github.com/infinum/eightshift-frontend-libs",children:(0,o.jsx)(n.img,{src:"https://img.shields.io/badge/source-eightshift--frontend--libs-yellow?style=for-the-badge&logo=javascript&labelColor=2a2a2a",alt:"docs-source"})})}),"\n",(0,o.jsx)(n.admonition,{type:"note",children:(0,o.jsxs)(n.p,{children:["This chapter is only relevant in setups that don't use CSS variables. If you are using CSS variables please skip to the ",(0,o.jsx)(n.a,{href:"blocks-styles",children:"Blocks Styles chapter"})," chapter."]})}),"\n",(0,o.jsx)(n.p,{children:"Everyone says that writing styles is easy and that it usually doesn't require a lot of thinking. But, like everything in programming, if you don't think about it, the problems add up, and you end up with a headache."}),"\n",(0,o.jsx)(n.p,{children:"Here are some of the recommendations that we use when writing our styles. It's also how we manage everything to be as modular as possible."}),"\n",(0,o.jsx)(n.h3,{id:"never-use-hex-color-values-in-your-files",children:"Never use HEX color values in your files"}),"\n",(0,o.jsx)(n.p,{children:"Like in Bootstrap or any other front-end framework, you should never use hex color values in multiple places. You should assign that hex value to a variable and use that variable all over. That way, if you ever need to change the color, simply change the value in one place and it will be consistently applied all over the project."}),"\n",(0,o.jsxs)(n.p,{children:["You can read more about defining your colors in the ",(0,o.jsx)(n.a,{href:"global-settings",children:"global settings"})," chapter."]}),"\n",(0,o.jsx)(n.h3,{id:"never-use-the-actual-color-name-as-a-variable-name",children:"Never use the actual color name as a variable name"}),"\n",(0,o.jsx)(n.p,{children:"You can name your variables whatever you like, but we recommend that you never use the actual color name as a variable name. It would be best if you used some generic variable name."}),"\n",(0,o.jsx)(n.p,{children:"For example, you can call blue color r2d2-color. With this approach, if your designer chooses to change the project's color scheme at any point, you only need to change one variable value, and you're done."}),"\n",(0,o.jsxs)(n.p,{children:["We like to use ",(0,o.jsx)(n.a,{href:"https://chir.ag/projects/name-that-color",children:"this site"})," for our color names. Also, we recommend using simple names. For instance, Cornflower Blue color would have ",(0,o.jsx)(n.code,{children:"$base-corn-color"})," or ",(0,o.jsx)(n.code,{children:"$base-flower-color"})," variable name."]}),"\n",(0,o.jsx)(n.h3,{id:"all-external-variables-must-go-to-a-components-map",children:"All external variables must go to a components map"}),"\n",(0,o.jsx)(n.p,{children:"We use maps for a lot of stuff in our boilerplate. The reason is that:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"maps can contain multiple variables in one place,"}),"\n",(0,o.jsx)(n.li,{children:"you don't need to write multiple variables at the top,"}),"\n",(0,o.jsx)(n.li,{children:"you can nest functionalities,"}),"\n",(0,o.jsx)(n.li,{children:"you can have multiple values with the same name and just change the top-level map,"}),"\n",(0,o.jsx)(n.li,{children:"etc."}),"\n"]}),"\n",(0,o.jsxs)(n.p,{children:["We also have many helpers, which you can check in our ",(0,o.jsx)(n.a,{href:"/sass",children:"SASS docs"}),"."]}),"\n",(0,o.jsx)(n.p,{children:"In the component map, you should only add things that you will reuse in your component."}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.strong,{children:"Examples:"})}),"\n",(0,o.jsx)(n.p,{children:"A simple variable in a map:"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-scss",children:"$social-links: (\n icon-color: global-settings(colors, black),\n);\n\n.social-links {\n color: map-get-strict($social-links, icon-color);\n}\n"})}),"\n",(0,o.jsx)(n.p,{children:"Nested variables in a map:"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-scss",children:"$social-links: (\n colors: (\n dark: global-settings(colors, black),\n light: global-settings(colors, white),\n ),\n sizes: (\n small: 10px,\n big: 20px,\n )\n);\n\n.social-links {\n color: map-get-deep($social-links, colors, dark);\n\n &--light {\n color: map-get-deep($social-links, colors, light);\n }\n\n &__sizes {\n font-size: map-get-deep($social-links, sizes, small);\n\n\n &--big {\n font-size: map-get-deep($social-links, sizes, big);\n }\n }\n}\n"})}),"\n",(0,o.jsx)(n.h3,{id:"never-mix-multiple-maps-in-a-single-component",children:"Never mix multiple maps in a single component"}),"\n",(0,o.jsx)(n.p,{children:"You want all your styles to be contained to a single component and not dependent on external components. Sometimes this can't be avoided."}),"\n",(0,o.jsx)(n.p,{children:"In that case, you should define a key in the component variable for the external map and define it like this:"}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.strong,{children:"Example:"})}),"\n",(0,o.jsxs)(n.p,{children:["External map in ",(0,o.jsx)(n.code,{children:"assets/styles/parts/utils/_z-index.scss"}),":"]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-scss",children:"$zindex: (\n header: 100,\n drawer: 99,\n overlay: 98,\n);\n"})}),"\n",(0,o.jsx)(n.p,{children:"Your component:"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-scss",children:"$header: (\n index: map-get-strict($zindex, header),\n);\n\n.header {\n z-index: map-get-strict($header, index);\n}\n"})}),"\n",(0,o.jsx)(n.h3,{id:"where-can-i-define-global-typography-for-all-my-blockscomponents",children:"Where can I define global typography for all my blocks/components?"}),"\n",(0,o.jsx)(n.p,{children:"Well, nowhere. Try to move your way of thinking from Bootstrap or any other front-end framework where you define global typography in one place."}),"\n",(0,o.jsx)(n.p,{children:"Why is that? Because we use component-based development and you should think in that way. Each component is responsible for its own styles."}),"\n",(0,o.jsx)(n.p,{children:"You should define styles with all sizes, colors, and variations for the heading component and reuse that component wherever you need any kind of heading. The same applies to any other component. This is why you don't need global typography, styles, etc."}),"\n",(0,o.jsx)(n.p,{children:"Global styles and variables are only used for things you want to share across components (that should be reduced to a minimum)."})]})}function d(e={}){const{wrapper:n}={...(0,a.a)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(h,{...e})}):h(e)}},11151:(e,n,s)=>{s.d(n,{Z:()=>i,a:()=>t});var o=s(67294);const a={},l=o.createContext(a);function t(e){const n=o.useContext(l);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:t(e.components),o.createElement(l.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/13362ea9.f7a4d8d0.js b/assets/js/13362ea9.f7a4d8d0.js deleted file mode 100644 index d5b9c9bd3..000000000 --- a/assets/js/13362ea9.f7a4d8d0.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_eightshift_docs=self.webpackChunk_eightshift_docs||[]).push([[65230],{3905:function(e,t,n){n.d(t,{Zo:function(){return p},kt:function(){return d}});var a=n(67294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function r(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var i=a.createContext({}),c=function(e){var t=a.useContext(i),n=t;return e&&(n="function"==typeof e?e(t):r(r({},t),e)),n},p=function(e){var t=c(e.components);return a.createElement(i.Provider,{value:t},e.children)},u="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},h=a.forwardRef((function(e,t){var n=e.components,o=e.mdxType,l=e.originalType,i=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),u=c(n),h=o,d=u["".concat(i,".").concat(h)]||u[h]||m[h]||l;return n?a.createElement(d,r(r({ref:t},p),{},{components:n})):a.createElement(d,r({ref:t},p))}));function d(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var l=n.length,r=new Array(l);r[0]=h;var s={};for(var i in t)hasOwnProperty.call(t,i)&&(s[i]=t[i]);s.originalType=e,s[u]="string"==typeof e?e:o,r[1]=s;for(var c=2;c=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var s=r.createContext({}),c=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):a(a({},t),e)),n},u=function(e){var t=c(e.components);return r.createElement(s.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,i=e.mdxType,o=e.originalType,s=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),p=c(n),f=i,m=p["".concat(s,".").concat(f)]||p[f]||d[f]||o;return n?r.createElement(m,a(a({ref:t},u),{},{components:n})):r.createElement(m,a({ref:t},u))}));function m(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var o=n.length,a=new Array(o);a[0]=f;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[p]="string"==typeof e?e:i,a[1]=l;for(var c=2;c{i.r(t),i.d(t,{assets:()=>d,contentTitle:()=>r,default:()=>h,frontMatter:()=>o,metadata:()=>c,toc:()=>a});var n=i(85893),s=i(11151);const o={id:"rest-field",title:"REST Field"},r=void 0,c={id:"basics/rest-field",title:"REST Field",description:"docs-source",source:"@site/docs/basics/rest-field.md",sourceDirName:"basics",slug:"/basics/rest-field",permalink:"/docs/basics/rest-field",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{id:"rest-field",title:"REST Field"},sidebar:"docs",previous:{title:"REST Intro",permalink:"/docs/basics/rest"},next:{title:"REST Route",permalink:"/docs/basics/rest-route"}},d={},a=[{value:"Test it in action",id:"test-it-in-action",level:2}];function l(e){const t={a:"a",admonition:"admonition",code:"code",h2:"h2",img:"img",p:"p",...(0,s.a)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.p,{children:(0,n.jsx)(t.a,{href:"https://github.com/infinum/eightshift-libs",children:(0,n.jsx)(t.img,{src:"https://img.shields.io/badge/source-eightshift--libs-blue?style=for-the-badge&logo=php&labelColor=2a2a2a",alt:"docs-source"})})}),"\n",(0,n.jsx)(t.p,{children:"This class is used to update an existing REST API Field or provide a new field to the existing REST API."}),"\n",(0,n.jsx)(t.p,{children:"To create a new class for extending an REST API field, run this command:"}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.code,{children:"wp boilerplate create rest-field --prompt"})}),"\n",(0,n.jsxs)(t.p,{children:["The output will ask you to input the correct field name and object type (post, get, etc.). Everything else will be done for you, setting the namespace, package, vendor prefixes, class, and folder name, and you will be set to write your field implementation in the ",(0,n.jsx)(t.code,{children:"fieldCallback"})," method."]}),"\n",(0,n.jsx)(t.h2,{id:"test-it-in-action",children:"Test it in action"}),"\n",(0,n.jsxs)(t.p,{children:["To test it in action, you should check the ",(0,n.jsx)(t.code,{children:"wp-json"})," path in your browser. You can do something like this:"]}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.code,{children:"domain.ext/wp-json/routeNamespace/routeVersion/routeName"})}),"\n",(0,n.jsx)(t.p,{children:"and find the field name."}),"\n",(0,n.jsx)(t.admonition,{type:"note",children:(0,n.jsx)(t.p,{children:"This link will be different based on your project implementation."})})]})}function h(e={}){const{wrapper:t}={...(0,s.a)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(l,{...e})}):l(e)}},11151:(e,t,i)=>{i.d(t,{Z:()=>c,a:()=>r});var n=i(67294);const s={},o=n.createContext(s);function r(e){const t=n.useContext(o);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:r(e.components),n.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/13c21afe.7550b13c.js b/assets/js/13c21afe.7550b13c.js deleted file mode 100644 index 52c290975..000000000 --- a/assets/js/13c21afe.7550b13c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_eightshift_docs=self.webpackChunk_eightshift_docs||[]).push([[30673],{3905:function(e,t,n){n.d(t,{Zo:function(){return c},kt:function(){return m}});var r=n(67294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var s=r.createContext({}),u=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):a(a({},t),e)),n},c=function(e){var t=u(e.components);return r.createElement(s.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,o=e.mdxType,i=e.originalType,s=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),p=u(n),f=o,m=p["".concat(s,".").concat(f)]||p[f]||d[f]||i;return n?r.createElement(m,a(a({ref:t},c),{},{components:n})):r.createElement(m,a({ref:t},c))}));function m(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var i=n.length,a=new Array(i);a[0]=f;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[p]="string"==typeof e?e:o,a[1]=l;for(var u=2;u{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>a,default:()=>p,frontMatter:()=>r,metadata:()=>o,toc:()=>c});var s=n(85893),i=n(11151);const r={id:"plugin",title:"Create a new WordPress plugin",sidebar_label:"Create New Plugin"},a=void 0,o={id:"plugin",title:"Create a new WordPress plugin",description:"Let's create a new plugin!",source:"@site/docs/plugin.md",sourceDirName:".",slug:"/plugin",permalink:"/docs/plugin",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{id:"plugin",title:"Create a new WordPress plugin",sidebar_label:"Create New Plugin"},sidebar:"docs",previous:{title:"Create New Theme",permalink:"/docs/theme"},next:{title:"Basics",permalink:"/docs/basics/basics-intro"}},l={},c=[{value:"What is next?",id:"what-is-next",level:2}];function d(e){const t={a:"a",code:"code",h2:"h2",img:"img",p:"p",pre:"pre",...(0,i.a)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.p,{children:"Let's create a new plugin!"}),"\n",(0,s.jsx)(t.p,{children:"Navigate to your WordPress plugins folder and run the following command:"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-bash",children:"npx create-wp-project plugin\n"})}),"\n",(0,s.jsx)(t.p,{children:"The script will prompt you for a plugin name and local development URL (used for BrowserSync). After that, your new plugin will be installed:"}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{src:n(89995).Z+"",width:"911",height:"550"})}),"\n",(0,s.jsx)(t.p,{children:"After the script is finished, please follow the instructions provided by the setup script."}),"\n",(0,s.jsx)(t.p,{children:"All additional steps after the initial setup are done using WP-CLI commands, so please make sure that you have WP-CLI set and ready to use."}),"\n",(0,s.jsx)(t.h2,{id:"what-is-next",children:"What is next?"}),"\n",(0,s.jsx)(t.p,{children:"Now that we have the plugin set on your local environment, let's do something with it."}),"\n",(0,s.jsxs)(t.p,{children:["Please make sure you read the ",(0,s.jsx)(t.a,{href:"/docs/basics/basics-intro",children:"Basics chapter"})," to better understand how the project is set and what is included to make your developing experience as smooth as possible."]})]})}function p(e={}){const{wrapper:t}={...(0,i.a)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},89995:(e,t,n)=>{n.d(t,{Z:()=>s});const s=n.p+"assets/images/setup-39fe95633dd527d11fd90285558b5a5c.gif"},11151:(e,t,n)=>{n.d(t,{Z:()=>o,a:()=>a});var s=n(67294);const i={},r=s.createContext(i);function a(e){const t=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:a(e.components),s.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/147ca104.b328b61b.js b/assets/js/147ca104.b328b61b.js deleted file mode 100644 index 6e208d0b2..000000000 --- a/assets/js/147ca104.b328b61b.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_eightshift_docs=self.webpackChunk_eightshift_docs||[]).push([[17107],{3905:function(e,t,n){n.d(t,{Zo:function(){return u},kt:function(){return h}});var o=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function s(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l=o.createContext({}),c=function(e){var t=o.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):s(s({},t),e)),n},u=function(e){var t=c(e.components);return o.createElement(l.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},m=o.forwardRef((function(e,t){var n=e.components,r=e.mdxType,a=e.originalType,l=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),p=c(n),m=r,h=p["".concat(l,".").concat(m)]||p[m]||d[m]||a;return n?o.createElement(h,s(s({ref:t},u),{},{components:n})):o.createElement(h,s({ref:t},u))}));function h(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var a=n.length,s=new Array(a);s[0]=m;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i[p]="string"==typeof e?e:r,s[1]=i;for(var c=2;c{n.r(s),n.d(s,{assets:()=>l,contentTitle:()=>c,default:()=>h,frontMatter:()=>i,metadata:()=>r,toc:()=>a});var t=n(85893),o=n(11151);const i={id:"blocks-component-structure",title:"Component Structure",sidebar_label:"Component Structure"},c=void 0,r={id:"legacy/v5/basics/blocks-component-structure",title:"Component Structure",description:"docs-source",source:"@site/docs/legacy/v5/basics/blocks-component-structure.md",sourceDirName:"legacy/v5/basics",slug:"/legacy/v5/basics/blocks-component-structure",permalink:"/docs/legacy/v5/basics/blocks-component-structure",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{id:"blocks-component-structure",title:"Component Structure",sidebar_label:"Component Structure"},sidebar:"docs",previous:{title:"Block Structure",permalink:"/docs/legacy/v5/basics/block-structure"},next:{title:"Block Manifest",permalink:"/docs/legacy/v5/basics/block-manifest"}},l={},a=[{value:"assets",id:"assets",level:3},{value:"components",id:"components",level:3},{value:"docs",id:"docs",level:3},{value:"heading.php",id:"headingphp",level:3},{value:"heading-editor.scss",id:"heading-editorscss",level:3},{value:"heading-style.scss",id:"heading-stylescss",level:3},{value:"manifest.json",id:"manifestjson",level:3}];function d(e){const s={a:"a",blockquote:"blockquote",code:"code",h3:"h3",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,o.a)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.p,{children:(0,t.jsx)(s.a,{href:"https://github.com/infinum/eightshift-frontend-libs/tree/4.0.0/blocks/init/src/blocks/",children:(0,t.jsx)(s.img,{src:"https://img.shields.io/badge/source-eigthshift--frontend--libs-yellow?style=for-the-badge&logo=javascript&labelColor=2a2a2a",alt:"docs-source"})})}),"\n",(0,t.jsxs)(s.p,{children:["Your custom components are placed in the ",(0,t.jsx)(s.code,{children:"src/Blocks/components"})," folder."]}),"\n",(0,t.jsx)(s.p,{children:"For example, let's take the heading component (just replace the heading with your component name)."}),"\n",(0,t.jsx)(s.p,{children:"We suggest you always use the full name and never abbreviate for the component name. If your component has multiple words, you should separate them by a dash; for example, featured-post-block.js."}),"\n",(0,t.jsx)(s.p,{children:(0,t.jsx)(s.strong,{children:"Block structure should look like this:"})}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:["heading","\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:["assets","\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsx)(s.li,{children:"index.js"}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(s.li,{children:["components","\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsx)(s.li,{children:"heading-editor.js"}),"\n",(0,t.jsx)(s.li,{children:"heading-options.js"}),"\n",(0,t.jsx)(s.li,{children:"heading-toolbar.js"}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(s.li,{children:["docs","\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsx)(s.li,{children:"story.js"}),"\n",(0,t.jsx)(s.li,{children:"readme.mdx"}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(s.li,{children:"heading.php"}),"\n",(0,t.jsx)(s.li,{children:"heading-editor.scss"}),"\n",(0,t.jsx)(s.li,{children:"heading-style.scss"}),"\n",(0,t.jsx)(s.li,{children:"manifest.json"}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(s.p,{children:["For example, you can check the ",(0,t.jsx)(s.a,{href:"/storybook",children:"storybook"}),"."]}),"\n",(0,t.jsxs)(s.blockquote,{children:["\n",(0,t.jsx)(s.p,{children:"All files in components are optional."}),"\n"]}),"\n",(0,t.jsx)(s.h3,{id:"assets",children:"assets"}),"\n",(0,t.jsxs)(s.p,{children:["This folder behaves the same as the blocks assets folder. Please check the ",(0,t.jsx)(s.a,{href:"block-structure#assets",children:"block structure"})," chapter for more details."]}),"\n",(0,t.jsx)(s.h3,{id:"components",children:"components"}),"\n",(0,t.jsxs)(s.p,{children:["Components folder holds three files: ",(0,t.jsx)(s.code,{children:"heading-options.js"}),", ",(0,t.jsx)(s.code,{children:"heading-editor.js"}),", and ",(0,t.jsx)(s.code,{children:"heading-toolbars.js"}),". They are used the same way as in blocks to provide functionality based on the location used. The main difference in components is that these files are used inside other blocks to implement functionality from the component."]}),"\n",(0,t.jsx)(s.h3,{id:"docs",children:"docs"}),"\n",(0,t.jsx)(s.p,{children:"Docs folder contains everything a component needs to be run inside the Storybook. This part is optional but it will speed up your development time and provide you with the much-needed documentation."}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.code,{children:"story.js"})," - Storybook entry point for your component. Since components are not blocks, you must provide the mocked data for your component in this file."]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.code,{children:"readme.mdx"})," - README that describes your component and provides the documentation."]}),"\n"]}),"\n",(0,t.jsx)(s.h3,{id:"headingphp",children:"heading.php"}),"\n",(0,t.jsx)(s.p,{children:"This file contains the front-end part (the view) of the component used in your project when the page renders. This file shouldn't contain any business logic, just present the passed attributes. The main difference from block view is that you only have attributes that you passed from a block or a top-level component in this file."}),"\n",(0,t.jsx)(s.h3,{id:"heading-editorscss",children:"heading-editor.scss"}),"\n",(0,t.jsxs)(s.p,{children:["This file behaves the same as in blocks. Please check the ",(0,t.jsx)(s.a,{href:"block-structure#heading-editorscss",children:"block structure"})," chapter for more details."]}),"\n",(0,t.jsx)(s.h3,{id:"heading-stylescss",children:"heading-style.scss"}),"\n",(0,t.jsxs)(s.p,{children:["This file behaves the same as in blocks. Please check the ",(0,t.jsx)(s.a,{href:"block-structure#heading-stylescss",children:"block structure"})," chapter for more details."]}),"\n",(0,t.jsx)(s.h3,{id:"manifestjson",children:"manifest.json"}),"\n",(0,t.jsx)(s.p,{children:"This file contains all the configuration for a component. It is not fully necessary, but we encourage you to use it because it provides many possibilities."}),"\n",(0,t.jsxs)(s.p,{children:["For more details, check the ",(0,t.jsx)(s.a,{href:"blocks-component-manifest",children:"component manifest"})," chapter."]})]})}function h(e={}){const{wrapper:s}={...(0,o.a)(),...e.components};return s?(0,t.jsx)(s,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}},11151:(e,s,n)=>{n.d(s,{Z:()=>r,a:()=>c});var t=n(67294);const o={},i=t.createContext(o);function c(e){const s=t.useContext(i);return t.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function r(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:c(e.components),t.createElement(i.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/1622041d.15431df1.js b/assets/js/1622041d.15431df1.js deleted file mode 100644 index a8f0ac6a7..000000000 --- a/assets/js/1622041d.15431df1.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_eightshift_docs=self.webpackChunk_eightshift_docs||[]).push([[48417],{3905:function(e,t,n){n.d(t,{Zo:function(){return p},kt:function(){return h}});var a=n(67294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function s(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var r=a.createContext({}),c=function(e){var t=a.useContext(r),n=t;return e&&(n="function"==typeof e?e(t):s(s({},t),e)),n},p=function(e){var t=c(e.components);return a.createElement(r.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,i=e.mdxType,o=e.originalType,r=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=c(n),m=i,h=u["".concat(r,".").concat(m)]||u[m]||d[m]||o;return n?a.createElement(h,s(s({ref:t},p),{},{components:n})):a.createElement(h,s({ref:t},p))}));function h(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var o=n.length,s=new Array(o);s[0]=m;var l={};for(var r in t)hasOwnProperty.call(t,r)&&(l[r]=t[r]);l.originalType=e,l[u]="string"==typeof e?e:i,s[1]=l;for(var c=2;c{n.r(s),n.d(s,{assets:()=>l,contentTitle:()=>a,default:()=>h,frontMatter:()=>o,metadata:()=>c,toc:()=>r});var i=n(85893),t=n(11151);const o={id:"architecture-concepts",title:"Architecture concepts"},a=void 0,c={id:"legacy/v8/basics/architecture-concepts",title:"Architecture concepts",description:"Project structure",source:"@site/docs/legacy/v8/basics/architecture-concepts.md",sourceDirName:"legacy/v8/basics",slug:"/legacy/v8/basics/architecture-concepts",permalink:"/docs/legacy/v8/basics/architecture-concepts",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{id:"architecture-concepts",title:"Architecture concepts"},sidebar:"docs",previous:{title:"WP-CLI",permalink:"/docs/legacy/v8/basics/wp-cli"},next:{title:"General",permalink:"/docs/legacy/v8/basics/backend"}},l={},r=[{value:"Project structure",id:"project-structure",level:2},{value:"Object-oriented paradigms",id:"object-oriented-paradigms",level:2},{value:"Blocks and Components",id:"blocks-and-components",level:2},{value:"The Manifest",id:"the-manifest",level:2},{value:"The directory structure in detail",id:"the-directory-structure-in-detail",level:2},{value:"Blocks",id:"blocks",level:4},{value:"Columns",id:"columns",level:4},{value:"Config",id:"config",level:4},{value:"CustomMeta",id:"custommeta",level:4},{value:"CustomPostType",id:"customposttype",level:4},{value:"CustomTaxonomy",id:"customtaxonomy",level:4},{value:"Enqueue",id:"enqueue",level:4},{value:"Exception",id:"exception",level:4},{value:"Helpers",id:"helpers",level:4},{value:"I18n",id:"i18n",level:4},{value:"Main",id:"main",level:4},{value:"Manifest",id:"manifest",level:4},{value:"Media",id:"media",level:4},{value:"Menu",id:"menu",level:4},{value:"ModifyAdminAppearance",id:"modifyadminappearance",level:4},{value:"Plugin",id:"plugin",level:4},{value:"Rest",id:"rest",level:4},{value:"ThemeOptions",id:"themeoptions",level:4},{value:"View",id:"view",level:4},{value:".storybook",id:"storybook",level:4},{value:".gitignore",id:"gitignore",level:4},{value:".eslintignore",id:"eslintignore",level:4},{value:".eslintrc",id:"eslintrc",level:4},{value:".stylelintrc",id:"stylelintrc",level:4},{value:"babel.config.js",id:"babelconfigjs",level:4},{value:"composer.json",id:"composerjson",level:4},{value:"composer.lock",id:"composerlock",level:4},{value:"package-lock.json",id:"package-lockjson",level:4},{value:"package.json",id:"packagejson",level:4},{value:"phpcs.xml.dist",id:"phpcsxmldist",level:4},{value:"postcss.config.js",id:"postcssconfigjs",level:4},{value:"webpack.config.js",id:"webpackconfigjs",level:4}];function d(e){const s={a:"a",code:"code",em:"em",h2:"h2",h4:"h4",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,t.a)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.h2,{id:"project-structure",children:"Project structure"}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.a,{href:"https://github.com/infinum/eightshift-libs",children:(0,i.jsx)(s.img,{src:"https://img.shields.io/badge/source-eightshift--libs-blue?style=for-the-badge&logo=php&labelColor=2a2a2a",alt:"docs-source"})})}),"\n",(0,i.jsxs)(s.p,{children:["Eightshift Development Kit follows a strict project structure to support autoloading, dependency injection and ",(0,i.jsx)(s.code,{children:"wp boilerplate"})," commands, as well as conventions to increase codebase understanding between developers. As an added benefit, following this structure and conventions makes your codebase more consistent and organized."]}),"\n",(0,i.jsxs)(s.p,{children:["While Eightshift Development Kit provides required theme files and common theme files such as ",(0,i.jsx)(s.code,{children:"style.css"})," and ",(0,i.jsx)(s.code,{children:"functions.php"}),", they're used differently to what you might expect if you've worked with WordPress themes previously. For instance, ",(0,i.jsx)(s.code,{children:"style.css"})," is used only to register theme metadata, and doesn't contain any actual styles, as they're built using Webpack and use cache busting. ",(0,i.jsx)(s.code,{children:"functions.php"})," simply bootstraps the execution lifecycle. We also provide very basic template partials, such as ",(0,i.jsx)(s.code,{children:"single.php"}),", which you can accommodate to your needs. An idea to consider is replacing some of them with pages that are editable in Gutenberg."]}),"\n",(0,i.jsxs)(s.p,{children:["While you'll find some additional configuration files such as ",(0,i.jsx)(s.code,{children:"webpack.config.js"})," in the project root, the majority of your projects codebase should live in the ",(0,i.jsx)(s.code,{children:"src"})," directory, which is autoloaded via Composer following PSR-4 conventions. This implies that every directory under ",(0,i.jsx)(s.code,{children:"src"})," is a namespace under your base namespace (which is your project name), and PHP files inside of those directories are classes in that namespace, with exceptions for filenames that aren't in ",(0,i.jsx)(s.code,{children:"StudlyCase"}),"."]}),"\n",(0,i.jsxs)(s.p,{children:["An Eightshift Development Kit convention is to structure namespaces around features and functionality, so for instance, all custom post types would be part of the ",(0,i.jsx)(s.code,{children:"ProjectName\\CustomPostType"})," namespace."]}),"\n",(0,i.jsx)(s.h2,{id:"object-oriented-paradigms",children:"Object-oriented paradigms"}),"\n",(0,i.jsx)(s.p,{children:"Eightshift Libs is entirely object-oriented, providing abstract classes for internal library functionality, interfaces you can use to implement certain classes to make use of Eightshift Development Kit features, as well as concrete class implementations for use in projects."}),"\n",(0,i.jsx)(s.p,{children:"Our use of OOP allows you to extend, modify or even replace Eightshift Development Kit functionality safely, without breaking compatibility or harming your project."}),"\n",(0,i.jsxs)(s.p,{children:["One of the most important interfaces in Eightshift Libs is the ",(0,i.jsx)(s.code,{children:"ServiceInterface"}),". Classes that implement it are called service classes. This isn't a common pattern in PHP OOP. In Eightshift Development Kit, a service class represents a part of the project's functionality and has a ",(0,i.jsx)(s.code,{children:"register"})," method that sets up the action and filter hooks for the service. If you need to add an action or a filter, you should do that in a service class. All your service classes are automatically loaded and can have dependencies injected using dependency injection."]}),"\n",(0,i.jsxs)(s.p,{children:["To ensure there are no naming collisions caused by Composer dependencies, we use the ",(0,i.jsx)(s.a,{href:"https://github.com/infinum/imposter-plugin",children:"Imposter Composer plugin"})," to contain them in the ",(0,i.jsx)(s.code,{children:"{ProjectName}Vendor"})," namespace. This comes with a few caveats which you should be aware of, and about which you can read more in the ",(0,i.jsx)(s.a,{href:"namespaces",children:"namespaces chapter"}),"."]}),"\n",(0,i.jsxs)(s.p,{children:["Read more about ",(0,i.jsx)(s.a,{href:"namespaces",children:"namespaces and Imposter"}),", ",(0,i.jsx)(s.a,{href:"extending-classes",children:"extending classes and service classes"}),", and ",(0,i.jsx)(s.a,{href:"autowiring",children:"dependency injection and autowiring"}),"."]}),"\n",(0,i.jsx)(s.h2,{id:"blocks-and-components",children:"Blocks and Components"}),"\n",(0,i.jsxs)(s.p,{children:["While Blocks and Components will be covered in much more detail in the ",(0,i.jsx)(s.a,{href:"blocks",children:"Blocks chapter"}),", it's worth getting acquainted with the concepts from the start."]}),"\n",(0,i.jsxs)(s.p,{children:["In Gutenberg, Blocks are an abstract unit for structuring content. The same applies in Eightshift, with an additional concept of ",(0,i.jsx)(s.em,{children:"Components"}),", which are abstract units for structuring blocks and layouts."]}),"\n",(0,i.jsx)(s.p,{children:"Components are mostly similar to Blocks, with a few key differences:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Components can not be inserted by users in Gutenberg, and are not registered as block types"}),"\n",(0,i.jsxs)(s.li,{children:["Components can be rendered in any context using the ",(0,i.jsx)(s.code,{children:"Components::render"})," method, with arbitrary attribute values passed to them"]}),"\n",(0,i.jsxs)(s.li,{children:["Blocks are usually only rendered using the render callback provided when registering the block","\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Note that in the Eightshift Development Kit, the render callback is provided for you by Eightshift Libs. It automatically adds the wrapper if necessary and sets up your block view."}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["Components don't implement the ",(0,i.jsx)(s.code,{children:"{blockName}-block.js"})," file"]}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:"Blocks and Components have the same structure, which makes extracting components from existing blocks trivially easy."}),"\n",(0,i.jsxs)(s.p,{children:["Components can be ",(0,i.jsx)(s.em,{children:"composed"})," into a block. In other words, blocks can consist out of zero or more components. Component composition is handled in the block manifest, allows you to avoid using InnerBlocks to include functionality shared with other blocks, and serializes component attributes to the block using prefixed attributes for each component instance depending on your manifest definitions."]}),"\n",(0,i.jsxs)(s.p,{children:["To learn more about the differences between blocks and components, read ",(0,i.jsx)(s.a,{href:"/blog/components-and-blocks",children:"Igor's blog post on Components and blocks"}),". To learn how to use blocks and components to build your projects, read the ",(0,i.jsx)(s.a,{href:"blocks",children:"Blocks chapter"}),"."]}),"\n",(0,i.jsx)(s.h2,{id:"the-manifest",children:"The Manifest"}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.code,{children:"manifest.json"})," files contain metadata, configurations and variables."]}),"\n",(0,i.jsxs)(s.p,{children:["Every Eightshift project has one global ",(0,i.jsx)(s.code,{children:"manifest.json"})," file stored in ",(0,i.jsx)(s.code,{children:"src/Blocks/manifest.json"}),", which contains global settings, properties, and variables."]}),"\n",(0,i.jsx)(s.p,{children:"Furthermore, every Eightshift block, component, and variation has its own manifest file which is used to provide data required for block registration, such as a list of attributes, the block name, and the template for the inserter example. These local manifest files allow you to define arrays of options for attribute values that your blocks or components can consume. Manifest files also allow you to define relationships between attribute values and CSS variable values, which allows you a great deal of power when styling your blocks and components, as well as saves time as you don't have to provide conditional CSS classes."}),"\n",(0,i.jsxs)(s.p,{children:["To learn more about the ",(0,i.jsx)(s.a,{href:"/docs/legacy/v8/basics/blocks-global-manifest",children:"global manifest"}),", ",(0,i.jsx)(s.a,{href:"/docs/legacy/v8/basics/block-manifest",children:"block manifest"}),", ",(0,i.jsx)(s.a,{href:"/docs/legacy/v8/basics/blocks-component-manifest",children:"component manifest"})," and using ",(0,i.jsx)(s.a,{href:"/docs/legacy/v8/basics/blocks-styles",children:"the manifest to provide CSS variables for use in block styling"}),", read the respective articles in the ",(0,i.jsx)(s.a,{href:"blocks-important",children:"Blocks chapter"}),". For information about manifest structure, refer to the manifest schemas available in Eightshift Frontend Libs and linked to in the manifest files."]}),"\n",(0,i.jsx)(s.h2,{id:"the-directory-structure-in-detail",children:"The directory structure in detail"}),"\n",(0,i.jsxs)(s.p,{children:["Your project might contain a different set of namespaces and classes in the ",(0,i.jsx)(s.code,{children:"src"})," folder, depending on what you've included using wp boilerplate commands.\nBy default, your project will include the ",(0,i.jsx)(s.code,{children:"Blocks"}),", ",(0,i.jsx)(s.code,{children:"Config"}),", ",(0,i.jsx)(s.code,{children:"Enqueue"}),", ",(0,i.jsx)(s.code,{children:"Main"}),", ",(0,i.jsx)(s.code,{children:"Manifest"})," and ",(0,i.jsx)(s.code,{children:"Menu"})," namespaces. You can include classes from Eightshift Libs to provide additional functionality manually or using wp boilerplate."]}),"\n",(0,i.jsx)(s.p,{children:"This chapter also doesn't cover all the namespaces and classes in Eightshift Libs, or their use. Check out the source code documentation for all available namespaces and classes."}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["src","\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Blocks"}),"\n",(0,i.jsx)(s.li,{children:"assets"}),"\n",(0,i.jsx)(s.li,{children:"components"}),"\n",(0,i.jsx)(s.li,{children:"custom"}),"\n",(0,i.jsx)(s.li,{children:"variations"}),"\n",(0,i.jsx)(s.li,{children:"wrapper"}),"\n",(0,i.jsx)(s.li,{children:"Columns"}),"\n",(0,i.jsx)(s.li,{children:"Config"}),"\n",(0,i.jsx)(s.li,{children:"CustomMeta"}),"\n",(0,i.jsx)(s.li,{children:"CustomPostType"}),"\n",(0,i.jsx)(s.li,{children:"CustomTaxonomy"}),"\n",(0,i.jsxs)(s.li,{children:["Enqueue","\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Admin"}),"\n",(0,i.jsx)(s.li,{children:"Blocks"}),"\n",(0,i.jsx)(s.li,{children:"Theme"}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(s.li,{children:"Exception"}),"\n",(0,i.jsx)(s.li,{children:"Helpers"}),"\n",(0,i.jsx)(s.li,{children:"I18n"}),"\n",(0,i.jsx)(s.li,{children:"Main"}),"\n",(0,i.jsx)(s.li,{children:"Manifest"}),"\n",(0,i.jsx)(s.li,{children:"Media"}),"\n",(0,i.jsx)(s.li,{children:"Menu"}),"\n",(0,i.jsx)(s.li,{children:"ModifyAdminAppearance"}),"\n",(0,i.jsx)(s.li,{children:"Plugin"}),"\n",(0,i.jsx)(s.li,{children:"Rest"}),"\n",(0,i.jsx)(s.li,{children:"ThemeOptions"}),"\n",(0,i.jsx)(s.li,{children:"View"}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(s.li,{children:".storybook"}),"\n",(0,i.jsx)(s.li,{children:".gitignore"}),"\n",(0,i.jsx)(s.li,{children:".eslintignore"}),"\n",(0,i.jsx)(s.li,{children:".eslintrc"}),"\n",(0,i.jsx)(s.li,{children:".stylelintrc"}),"\n",(0,i.jsx)(s.li,{children:"babel.config.js"}),"\n",(0,i.jsx)(s.li,{children:"composer.json"}),"\n",(0,i.jsx)(s.li,{children:"composer.lock"}),"\n",(0,i.jsx)(s.li,{children:"package-lock.json"}),"\n",(0,i.jsx)(s.li,{children:"package.json"}),"\n",(0,i.jsx)(s.li,{children:"phpcs.xml.dist"}),"\n",(0,i.jsx)(s.li,{children:"postcss.config.js"}),"\n",(0,i.jsx)(s.li,{children:"README.md"}),"\n",(0,i.jsx)(s.li,{children:"webpack.config.js"}),"\n"]}),"\n",(0,i.jsx)(s.h4,{id:"blocks",children:"Blocks"}),"\n",(0,i.jsx)(s.p,{children:"The Blocks namespace contains the Blocks class used for block registration. This directory also contains shared assets, components, blocks, variations, and the wrapper."}),"\n",(0,i.jsxs)(s.p,{children:["Read about blocks in detail in the ",(0,i.jsx)(s.a,{href:"blocks",children:"Blocks chapter"}),"."]}),"\n",(0,i.jsx)(s.h4,{id:"columns",children:"Columns"}),"\n",(0,i.jsxs)(s.p,{children:["This namespace contains all the custom admin listing columns hooks in your project. These include listing column hooks for post types, taxonomy, and user lists, such as ",(0,i.jsx)(s.code,{children:"manage_{$post_type}_posts_columns"}),"."]}),"\n",(0,i.jsx)(s.h4,{id:"config",children:"Config"}),"\n",(0,i.jsxs)(s.p,{children:["The Config class provides getter methods for your project's configuration, such as ",(0,i.jsx)(s.code,{children:"getProjectName"})," or ",(0,i.jsx)(s.code,{children:"getProjectVersion"}),"."]}),"\n",(0,i.jsx)(s.h4,{id:"custommeta",children:"CustomMeta"}),"\n",(0,i.jsx)(s.p,{children:"This class contains all the custom meta hooks for your project."}),"\n",(0,i.jsx)(s.h4,{id:"customposttype",children:"CustomPostType"}),"\n",(0,i.jsxs)(s.p,{children:["This namespace contains classes that register all custom post type hooks for your project. For better code consistency and to save time on boilerplating, Eightshift Development Kit provides an example class implementation you can use with ",(0,i.jsx)(s.code,{children:"wp boilerplate create post-type"}),"."]}),"\n",(0,i.jsx)(s.h4,{id:"customtaxonomy",children:"CustomTaxonomy"}),"\n",(0,i.jsxs)(s.p,{children:["This namespace contains classes that register all custom taxonomy hooks for your project. For better code consistency and to save time on boilerplating, Eightshift Development Kit provides an example class implementation you can use with ",(0,i.jsx)(s.code,{children:"wp boilerplate create taxonomy"}),"."]}),"\n",(0,i.jsx)(s.h4,{id:"enqueue",children:"Enqueue"}),"\n",(0,i.jsx)(s.p,{children:"These Enqueue namespace classes handle loading JavaScript and CSS assets, depending on the location you want to use it:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.strong,{children:"Admin"})," - Used in the admin (not block editor) panel. You can find the files inside the ",(0,i.jsx)(s.code,{children:"assets"})," folder with the ",(0,i.jsx)(s.code,{children:"-admin"})," suffix."]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.strong,{children:"Blocks"})," - Used in the block editor. You can find the files inside the ",(0,i.jsx)(s.code,{children:"src/Blocks/assets"})," folder. As blocks are complicated, we have files loaded only in the admin-editor part of the project, those files have an ",(0,i.jsx)(s.code,{children:"-editor"})," suffix. The rest of the files with no suffix load on the admin-editor part and the project's front end."]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.strong,{children:"Theme"})," - Used in the theme (frontend) part of your project. You can find the files inside the ",(0,i.jsx)(s.code,{children:"assets"})," folder with no suffix. You would use these files for the assets related to your project that is not associated with components and blocks. These files are rarely used, as styles and JavaScript functionality are usually provided at component, block, or wrapper levels."]}),"\n"]}),"\n",(0,i.jsxs)(s.p,{children:["Using any of these classes is optional, and you can use only what you need. The ",(0,i.jsx)(s.code,{children:"wp boilerplate init theme"})," command will set up all the three classes already implemented. Keep in mind that Enqueue classes work in combination with the Webpack build of your project."]}),"\n",(0,i.jsxs)(s.p,{children:["All the asset files mentioned are prefixed with ",(0,i.jsx)(s.code,{children:"application"}),". If you don't like the prefix, you can change it by providing project overrides for constants used in Eightshift Libs. If you change the file names, you must make changes to the Webpack build process as well. For modifying the Webpack configuration, read the ",(0,i.jsx)(s.a,{href:"webpack",children:"Webpack chapter"}),"."]}),"\n",(0,i.jsx)(s.h4,{id:"exception",children:"Exception"}),"\n",(0,i.jsx)(s.p,{children:"This namespace contains all exceptions that can be thrown from the project."}),"\n",(0,i.jsx)(s.h4,{id:"helpers",children:"Helpers"}),"\n",(0,i.jsx)(s.p,{children:"All the backend helpers provided by Eightshift Libs are part of the Helpers namespace. Generally, you can use them from Eightshift Libs without extending or modifying them."}),"\n",(0,i.jsx)(s.h4,{id:"i18n",children:"I18n"}),"\n",(0,i.jsxs)(s.p,{children:["Classes in this namespace are used to define all hooks related to internationalization and localization. For more information about i18n and l10n, check out ",(0,i.jsx)(s.a,{href:"tips-tricks",children:"Tips and tricks"}),"."]}),"\n",(0,i.jsx)(s.h4,{id:"main",children:"Main"}),"\n",(0,i.jsxs)(s.p,{children:["The Main namespace contains the ",(0,i.jsx)(s.code,{children:"Main"})," class, which sets up the dependency injection container and autowiring using ",(0,i.jsx)(s.code,{children:"AbstractMain"})," and ",(0,i.jsx)(s.code,{children:"Autowiring"})," classes. For most projects, ",(0,i.jsx)(s.code,{children:"Main"})," can be used automagically without any work on your part, but as with all of the Eightshift Development Kit, you can extend it to suit your needs."]}),"\n",(0,i.jsxs)(s.p,{children:["You can provide manual service classes here as well. Learn more in the ",(0,i.jsx)(s.a,{href:"autowiring",children:"autowiring chapter"}),"."]}),"\n",(0,i.jsx)(s.h4,{id:"manifest",children:"Manifest"}),"\n",(0,i.jsxs)(s.p,{children:["The Manifest namespace provides the ",(0,i.jsx)(s.code,{children:"manifest.json"})," file location and helpers to return the full path for a specific asset. Learn more about the manifest in the ",(0,i.jsx)(s.a,{href:"manifest",children:"manifest chapter"}),"."]}),"\n",(0,i.jsx)(s.h4,{id:"media",children:"Media"}),"\n",(0,i.jsx)(s.p,{children:"The Media namespace is used to add custom implementations for media, such as adding custom image sizes, enabling SVG image support, etc. By default, it registers theme support for title tags, HTML5 and post thumbnails."}),"\n",(0,i.jsx)(s.h4,{id:"menu",children:"Menu"}),"\n",(0,i.jsx)(s.p,{children:"This class is used to register menu positions."}),"\n",(0,i.jsx)(s.h4,{id:"modifyadminappearance",children:"ModifyAdminAppearance"}),"\n",(0,i.jsx)(s.p,{children:"This class is used to change admin appearance. We use it to change the admin color palette depending on the environment."}),"\n",(0,i.jsx)(s.h4,{id:"plugin",children:"Plugin"}),"\n",(0,i.jsx)(s.p,{children:"This namespace is used only in the plugin boilerplate and holds classes required for activation and deactivation of the plugin."}),"\n",(0,i.jsx)(s.h4,{id:"rest",children:"Rest"}),"\n",(0,i.jsxs)(s.p,{children:["The Rest namespace provides classes for handling REST API fields and routes. This is covered in more detail in the ",(0,i.jsx)(s.a,{href:"rest",children:"REST chapter"}),"."]}),"\n",(0,i.jsx)(s.h4,{id:"themeoptions",children:"ThemeOptions"}),"\n",(0,i.jsxs)(s.p,{children:["This namespace is used to add admin menu configuration panels such as ",(0,i.jsx)(s.em,{children:"Theme Options"}),", usually using ACF."]}),"\n",(0,i.jsx)(s.h4,{id:"view",children:"View"}),"\n",(0,i.jsxs)(s.p,{children:["This namespace is used to add filters used when escaping unsafe tags using ",(0,i.jsx)(s.code,{children:"wp_kses_post"})," and ",(0,i.jsx)(s.code,{children:"wp_kses"})," functions."]}),"\n",(0,i.jsx)(s.h4,{id:"storybook",children:".storybook"}),"\n",(0,i.jsxs)(s.p,{children:["This folder contains all of the files necessary to run the storybook in your project. Read more ",(0,i.jsx)(s.a,{href:"https://storybook.js.org/",children:"about the Storybook project"}),"."]}),"\n",(0,i.jsx)(s.h4,{id:"gitignore",children:".gitignore"}),"\n",(0,i.jsxs)(s.p,{children:["As the name implies, this file is used to define restrictions to which files Git watches. Read more ",(0,i.jsx)(s.a,{href:"https://git-scm.com/",children:"about Git"}),"."]}),"\n",(0,i.jsx)(s.h4,{id:"eslintignore",children:".eslintignore"}),"\n",(0,i.jsx)(s.p,{children:"Defines files and folders which ESLint should ignore when linting."}),"\n",(0,i.jsx)(s.h4,{id:"eslintrc",children:".eslintrc"}),"\n",(0,i.jsxs)(s.p,{children:["Provides definitions used for linting JavaScript files. Read more ",(0,i.jsx)(s.a,{href:"https://eslint.org/",children:"about ESLint"}),"."]}),"\n",(0,i.jsx)(s.h4,{id:"stylelintrc",children:".stylelintrc"}),"\n",(0,i.jsxs)(s.p,{children:["Provides definitions used for linting SCSS/CSS stylesheets. Read more ",(0,i.jsx)(s.a,{href:"https://stylelint.io/",children:"about Stylelint"}),"."]}),"\n",(0,i.jsx)(s.h4,{id:"babelconfigjs",children:"babel.config.js"}),"\n",(0,i.jsxs)(s.p,{children:["Provides Babel configuration, which determines how your JavaScript code will be compiled, what standard you will use, and much more. Read more ",(0,i.jsx)(s.a,{href:"https://babeljs.io/",children:"about Babel"}),"."]}),"\n",(0,i.jsx)(s.h4,{id:"composerjson",children:"composer.json"}),"\n",(0,i.jsxs)(s.p,{children:["Contains a list of your project's Composer dependencies, as well as project metadata and configuration. Dependencies can be added and installed using ",(0,i.jsx)(s.code,{children:"composer install"}),". Read more ",(0,i.jsx)(s.a,{href:"https://getcomposer.org/",children:"about Composer"}),"."]}),"\n",(0,i.jsx)(s.h4,{id:"composerlock",children:"composer.lock"}),"\n",(0,i.jsx)(s.p,{children:"Lock files are used to set the package version to the exact release. This ensures that everyone has the same package version when installing."}),"\n",(0,i.jsx)(s.h4,{id:"package-lockjson",children:"package-lock.json"}),"\n",(0,i.jsxs)(s.p,{children:["The same as ",(0,i.jsx)(s.code,{children:"composer.lock"}),", but for node_modules."]}),"\n",(0,i.jsx)(s.h4,{id:"packagejson",children:"package.json"}),"\n",(0,i.jsxs)(s.p,{children:["Contains a list of your project's npm dependencies, as well as project metadata and configuration. Dependencies can be added and installed using ",(0,i.jsx)(s.code,{children:"npm install"}),". Read more ",(0,i.jsx)(s.a,{href:"https://nodejs.dev/",children:"about npm"}),"."]}),"\n",(0,i.jsx)(s.h4,{id:"phpcsxmldist",children:"phpcs.xml.dist"}),"\n",(0,i.jsxs)(s.p,{children:["Provides definitions used for linting PHP files. Read more ",(0,i.jsx)(s.a,{href:"https://github.com/squizlabs/PHP_CodeSniffer",children:"about PHPCS"}),"."]}),"\n",(0,i.jsx)(s.h4,{id:"postcssconfigjs",children:"postcss.config.js"}),"\n",(0,i.jsxs)(s.p,{children:["PostCSS works in collaboration with Webpack and defines what additional plugins you are going to use when building your CSS files. Read more ",(0,i.jsx)(s.a,{href:"https://postcss.org/",children:"about PostCSS"}),"."]}),"\n",(0,i.jsx)(s.h4,{id:"webpackconfigjs",children:"webpack.config.js"}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.code,{children:"webpack.config.js"})," provides Webpack configuration, used when building your JavaScript and CSS files. This is covered in more detail in the ",(0,i.jsx)(s.a,{href:"webpack",children:"Webpack chapter"}),"."]})]})}function h(e={}){const{wrapper:s}={...(0,t.a)(),...e.components};return s?(0,i.jsx)(s,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},11151:(e,s,n)=>{n.d(s,{Z:()=>c,a:()=>a});var i=n(67294);const t={},o=i.createContext(t);function a(e){const s=i.useContext(o);return i.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function c(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:a(e.components),i.createElement(o.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/163b78fe.cf9f1851.js b/assets/js/163b78fe.cf9f1851.js new file mode 100644 index 000000000..e0c5a2ba2 --- /dev/null +++ b/assets/js/163b78fe.cf9f1851.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_eightshift_docs=self.webpackChunk_eightshift_docs||[]).push([[66250],{45951:(e,o,t)=>{t.r(o),t.d(o,{assets:()=>a,contentTitle:()=>i,default:()=>h,frontMatter:()=>l,metadata:()=>r,toc:()=>c});var n=t(85893),s=t(11151);const l={id:"blocks-special-use-cases",title:"Special Use Cases"},i=void 0,r={id:"legacy/v6/basics/blocks-special-use-cases",title:"Special Use Cases",description:"docs-source",source:"@site/docs/legacy/v6/basics/blocks-special-use-cases.md",sourceDirName:"legacy/v6/basics",slug:"/legacy/v6/basics/blocks-special-use-cases",permalink:"/docs/legacy/v6/basics/blocks-special-use-cases",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{id:"blocks-special-use-cases",title:"Special Use Cases"},sidebar:"docs",previous:{title:"Hooks",permalink:"/docs/legacy/v6/basics/blocks-hooks"},next:{title:"Reusable Blocks",permalink:"/docs/legacy/v6/basics/blocks-reusable"}},a={},c=[{value:"Change innerBlock attributes",id:"change-innerblock-attributes",level:2},{value:"Provide simple wrapper to all innerBlock",id:"provide-simple-wrapper-to-all-innerblock",level:2},{value:"Override innerBlock attributes only on the front end",id:"override-innerblock-attributes-only-on-the-front-end",level:2},{value:"Add CSS selectors on the parent component inside the block editor",id:"add-css-selectors-on-the-parent-component-inside-the-block-editor",level:2},{value:"How to only use my custom blocks",id:"how-to-only-use-my-custom-blocks",level:2},{value:"I want to use my custom blocks but add some core or third party plugins blocks",id:"i-want-to-use-my-custom-blocks-but-add-some-core-or-third-party-plugins-blocks",level:2},{value:"I want to enable blocks only on specific custom post type",id:"i-want-to-enable-blocks-only-on-specific-custom-post-type",level:2}];function d(e){const o={a:"a",blockquote:"blockquote",code:"code",em:"em",h2:"h2",img:"img",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.a)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o.p,{children:(0,n.jsx)(o.a,{href:"https://github.com/infinum/eightshift-frontend-libs/tree/5.0.0/blocks/init/src/blocks/",children:(0,n.jsx)(o.img,{src:"https://img.shields.io/badge/source-eightshift--frontend--libs-yellow?style=for-the-badge&logo=javascript&labelColor=2a2a2a",alt:"docs-source"})})}),"\n",(0,n.jsx)(o.p,{children:"In our clients' projects, we noticed that sometimes you need to provide something special to your blocks, like changing the block editor block DOM structure or the attributes added inside the inner blocks."}),"\n",(0,n.jsx)(o.p,{children:"These are some of the examples we would like to share with you. We will list all of them and gradually add more."}),"\n",(0,n.jsx)(o.h2,{id:"change-innerblock-attributes",children:"Change innerBlock attributes"}),"\n",(0,n.jsx)(o.p,{children:(0,n.jsx)(o.strong,{children:"Usage:"})}),"\n",(0,n.jsxs)(o.ul,{children:["\n",(0,n.jsx)(o.li,{children:"Change attributes in the block editor and on the front-end."}),"\n",(0,n.jsx)(o.li,{children:"Set attributes in the database."}),"\n"]}),"\n",(0,n.jsx)(o.p,{children:(0,n.jsx)(o.strong,{children:"Use Case:"})}),"\n",(0,n.jsxs)(o.p,{children:["Let's say you have a carousel block, and you have a generic image block that you can use as a standalone block. You create a carousel block and set in its manifest limitation to show only the image block to be inserted as an inner block. This is easy to do: you just add your image block to an ",(0,n.jsx)(o.code,{children:"allowedBlocks"})," array inside the carousel block and everything will work."]}),"\n",(0,n.jsxs)(o.p,{children:["But now you have some default attributes set in that image block that you don't want to be set if the block is added using the innerBlock in the carousel. You can change that using our ",(0,n.jsx)(o.a,{href:"helpers-javascript",children:"overrideInnerBlockAttributes"})," helper. Just add this helper to your block entry point, add the attributes you want to change, and you are all set."]}),"\n",(0,n.jsx)(o.p,{children:"Keep in mind that this will be applied to all innerBlocks inside your carousel block. If you want to limit this to a specific block only, you will need to fiddle around with that block's conditions (you can get that specific block name from the props)."}),"\n",(0,n.jsx)(o.p,{children:"The next time you add your image to the carousel, it will automatically change those attributes."}),"\n",(0,n.jsxs)(o.blockquote,{children:["\n",(0,n.jsx)(o.p,{children:"Important note: If for some reason, you copy the inner block from the carousel to the top-level editor, this helper will not fire and not change back to original attributes. You have to manually remove those attributes from the Code editor in the admin."}),"\n"]}),"\n",(0,n.jsx)(o.p,{children:(0,n.jsx)(o.strong,{children:"Implementation"})}),"\n",(0,n.jsxs)(o.p,{children:["Here you can see our example of this helper used in the ",(0,n.jsx)(o.a,{href:"https://github.com/infinum/eightshift-frontend-libs/blob/develop/blocks/init/src/Blocks/custom/carousel/carousel-block.js",children:"carousel block"}),"."]}),"\n",(0,n.jsx)(o.h2,{id:"provide-simple-wrapper-to-all-innerblock",children:"Provide simple wrapper to all innerBlock"}),"\n",(0,n.jsx)(o.p,{children:(0,n.jsx)(o.strong,{children:"Usage:"})}),"\n",(0,n.jsxs)(o.ul,{children:["\n",(0,n.jsx)(o.li,{children:"Change attributes in the block editor and on the front end."}),"\n",(0,n.jsx)(o.li,{children:"Set attributes in the database."}),"\n"]}),"\n",(0,n.jsx)(o.p,{children:(0,n.jsx)(o.strong,{children:"Use Case:"})}),"\n",(0,n.jsx)(o.p,{children:"All of our blocks come with the wrapper implemented, which is awesome. But sometimes you just don't want to use the wrapper, and you want only to use the simple version of the wrapper. You can provide the attribute overrides in your block, and you are good to go."}),"\n",(0,n.jsxs)(o.p,{children:["But if you need to change attributes in the block added as an innerBlock, you'll have a little problem. You can use the same helper as we did in the previous chapter, or you can use our abstraction of that helper called ",(0,n.jsx)(o.a,{href:"helpers-javascript",children:"overrideInnerBlockSimpleWrapperAttributes"}),"."]}),"\n",(0,n.jsx)(o.p,{children:"This helper will set the wrapper to a simple variant in all your innerBlocks."}),"\n",(0,n.jsx)(o.p,{children:(0,n.jsx)(o.strong,{children:"Implementation"})}),"\n",(0,n.jsxs)(o.p,{children:["Here you can see our example of this helper used in the ",(0,n.jsx)(o.a,{href:"https://github.com/infinum/eightshift-frontend-libs/blob/develop/blocks/init/src/Blocks/custom/column/column-block.js",children:"column block"}),"."]}),"\n",(0,n.jsx)(o.h2,{id:"override-innerblock-attributes-only-on-the-front-end",children:"Override innerBlock attributes only on the front end"}),"\n",(0,n.jsx)(o.p,{children:(0,n.jsx)(o.strong,{children:"Usage:"})}),"\n",(0,n.jsxs)(o.ul,{children:["\n",(0,n.jsx)(o.li,{children:"Change attributes on the front end only."}),"\n",(0,n.jsx)(o.li,{children:"Don't set attributes in the database."}),"\n"]}),"\n",(0,n.jsx)(o.p,{children:(0,n.jsx)(o.strong,{children:"Use Case:"})}),"\n",(0,n.jsx)(o.p,{children:"If you have a block containing inner blocks and only want to change the attributes on the front end of the implementation and not in the block editor. The standard way is really hard because all the inner blocks are rendered on the front end as an HTML string, and you don't have access to any of the attributes before it is rendered."}),"\n",(0,n.jsx)(o.p,{children:"Luckily, WordPress core has provided us with the filter that can change any block before it is rendered. This filter will provide you an array of blocks and inner blocks, along with the innerBlock and all attributes if you use it correctly."}),"\n",(0,n.jsxs)(o.p,{children:["The filter is called: ",(0,n.jsx)(o.code,{children:"render_block_data"}),", and you can put your implementation in the ",(0,n.jsx)(o.code,{children:"class-blocks.php"})," file. You can find the documentation on this ",(0,n.jsx)(o.a,{href:"https://developer.wordpress.org/reference/hooks/render_block_data/",children:"link"}),"."]}),"\n",(0,n.jsx)(o.p,{children:(0,n.jsx)(o.strong,{children:"Implementation"})}),"\n",(0,n.jsx)(o.p,{children:(0,n.jsx)(o.em,{children:"Implementation coming soon."})}),"\n",(0,n.jsx)(o.h2,{id:"add-css-selectors-on-the-parent-component-inside-the-block-editor",children:"Add CSS selectors on the parent component inside the block editor"}),"\n",(0,n.jsx)(o.p,{children:(0,n.jsx)(o.strong,{children:"Usage:"})}),"\n",(0,n.jsxs)(o.ul,{children:["\n",(0,n.jsx)(o.li,{children:"Change attributes on the front end only."}),"\n",(0,n.jsx)(o.li,{children:"Don't set attributes in the database."}),"\n"]}),"\n",(0,n.jsx)(o.p,{children:(0,n.jsx)(o.strong,{children:"Use Case:"})}),"\n",(0,n.jsx)(o.p,{children:"If you tried to create any grid in your block on the front end, you know it is easy, but it is not so with the block editor. The problem is that in the block editor DOM, there are additional divs added over your block that break your HTML structure, and all your styles from flex or grid will not work correctly. If your block depends on some special selector placed in a specific place, you can run into some problems in the block editor."}),"\n",(0,n.jsx)(o.p,{children:"With WordPress block editor hooks, we can fix this by not adding the selector to its original location as we do on the front end but adding them to the Block Editor's parent component."}),"\n",(0,n.jsx)(o.p,{children:(0,n.jsx)(o.strong,{children:"Implementation"})}),"\n",(0,n.jsxs)(o.p,{children:["Here you can see our example of this hook used in the ",(0,n.jsx)(o.a,{href:"https://github.com/infinum/eightshift-frontend-libs/blob/develop/blocks/init/src/Blocks/custom/column/column-hooks.js",children:"column block"}),"."]}),"\n",(0,n.jsx)(o.h2,{id:"how-to-only-use-my-custom-blocks",children:"How to only use my custom blocks"}),"\n",(0,n.jsxs)(o.p,{children:["You can remove all core blocks and any other blocks provided by third-party plugins by adding this filter to your ",(0,n.jsx)(o.code,{children:"src/Blocks/Blocks.php"})," class."]}),"\n",(0,n.jsx)(o.p,{children:"Filter goes in the register method:"}),"\n",(0,n.jsx)(o.pre,{children:(0,n.jsx)(o.code,{className:"language-php",children:"// Limits the usage of only custom project blocks.\nadd_filter('allowed_block_types', [ $this, 'getAllBlocksList' ], 10, 2);\n"})}),"\n",(0,n.jsxs)(o.p,{children:["The callback method is set in the parent ",(0,n.jsx)(o.code,{children:"AbstractBlocks"})," class."]}),"\n",(0,n.jsx)(o.h2,{id:"i-want-to-use-my-custom-blocks-but-add-some-core-or-third-party-plugins-blocks",children:"I want to use my custom blocks but add some core or third party plugins blocks"}),"\n",(0,n.jsxs)(o.p,{children:["You create a new callback method for the ",(0,n.jsx)(o.code,{children:"allowed_block_types"})," filter. There you can allow all your custom blocks + any other 3rd party / core block you want."]}),"\n",(0,n.jsx)(o.p,{children:"Filter goes in the register method:"}),"\n",(0,n.jsx)(o.pre,{children:(0,n.jsx)(o.code,{className:"language-php",children:"// Limits the usage of only custom project blocks.\nadd_filter('allowed_block_types', [ $this, 'allowedBlocks' ], 10, 2);\n"})}),"\n",(0,n.jsx)(o.p,{children:"Custom callback method:"}),"\n",(0,n.jsx)(o.pre,{children:(0,n.jsx)(o.code,{className:"language-php",children:"/**\n * Filter which blocks are displayed in the block editor.\n *\n * @param array|bool $allowedBlockTypes Array of block type slugs, or boolean to enable/disable all.\n * @param object $post The post resource data.\n *\n * @return array\n */\npublic function allowedBlocks($allowedBlockTypes, object $post): array\n{\n return array_merge(\n $this->getAllBlocksList($allowedBlockTypes, $post),\n [\n 'core/paragraph',\n ]\n );\n}\n"})}),"\n",(0,n.jsx)(o.h2,{id:"i-want-to-enable-blocks-only-on-specific-custom-post-type",children:"I want to enable blocks only on specific custom post type"}),"\n",(0,n.jsxs)(o.p,{children:["You create a new callback method for the ",(0,n.jsx)(o.code,{children:"allowed_block_types"})," filter."]}),"\n",(0,n.jsx)(o.p,{children:"Filter goes in the register method:"}),"\n",(0,n.jsx)(o.pre,{children:(0,n.jsx)(o.code,{className:"language-php",children:"// Limits the usage of only custom project blocks.\nadd_filter('allowed_block_types', [ $this, 'allowedBlockTypes' ], 10, 2);\n"})}),"\n",(0,n.jsx)(o.p,{children:"Custom callback method:"}),"\n",(0,n.jsx)(o.pre,{children:(0,n.jsx)(o.code,{className:"language-php",children:"/**\n * Filter which blocks are allowed in what post type.\n *\n * @param array|bool $allowedBlockTypes Array of block type slugs, or boolean to enable/disable all.\n * @param object $post The post resource data.\n *\n * @return array\n */\npublic function allowedBlockTypes($allowedBlockTypes, object $post): array\n{\n $output = [];\n $settings = $this->getSettings();\n $namespace = $settings['namespace'];\n\n switch ($post->post_type) { // phpcs:ignore Squiz.NamingConventions.ValidVariableName.NotCamelCaps\n case 'faq':\n $output = [\n \"{$namespace}/paragraph\",\n ];\n break;\n default:\n $output = $this->getAllBlocksList($allowedBlockTypes, $post);\n break;\n }\n\n return $output;\n}\n"})})]})}function h(e={}){const{wrapper:o}={...(0,s.a)(),...e.components};return o?(0,n.jsx)(o,{...e,children:(0,n.jsx)(d,{...e})}):d(e)}},11151:(e,o,t)=>{t.d(o,{Z:()=>r,a:()=>i});var n=t(67294);const s={},l=n.createContext(s);function i(e){const o=n.useContext(l);return n.useMemo((function(){return"function"==typeof e?e(o):{...o,...e}}),[o,e])}function r(e){let o;return o=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),n.createElement(l.Provider,{value:o},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/163b78fe.ee354b8f.js b/assets/js/163b78fe.ee354b8f.js deleted file mode 100644 index 1be477dfc..000000000 --- a/assets/js/163b78fe.ee354b8f.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_eightshift_docs=self.webpackChunk_eightshift_docs||[]).push([[66250],{3905:function(e,t,o){o.d(t,{Zo:function(){return p},kt:function(){return h}});var n=o(67294);function l(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function a(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function r(e){for(var t=1;t=0||(l[o]=e[o]);return l}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(l[o]=e[o])}return l}var i=n.createContext({}),c=function(e){var t=n.useContext(i),o=t;return e&&(o="function"==typeof e?e(t):r(r({},t),e)),o},p=function(e){var t=c(e.components);return n.createElement(i.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},k=n.forwardRef((function(e,t){var o=e.components,l=e.mdxType,a=e.originalType,i=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),u=c(o),k=l,h=u["".concat(i,".").concat(k)]||u[k]||d[k]||a;return o?n.createElement(h,r(r({ref:t},p),{},{components:o})):n.createElement(h,r({ref:t},p))}));function h(e,t){var o=arguments,l=t&&t.mdxType;if("string"==typeof e||l){var a=o.length,r=new Array(a);r[0]=k;var s={};for(var i in t)hasOwnProperty.call(t,i)&&(s[i]=t[i]);s.originalType=e,s[u]="string"==typeof e?e:l,r[1]=s;for(var c=2;cgetAllBlocksList($allowedBlockTypes, $post),\n [\n 'core/paragraph',\n ]\n );\n}\n")),(0,a.kt)("h2",{id:"i-want-to-enable-blocks-only-on-specific-custom-post-type"},"I want to enable blocks only on specific custom post type"),(0,a.kt)("p",null,"You create a new callback method for the ",(0,a.kt)("inlineCode",{parentName:"p"},"allowed_block_types")," filter."),(0,a.kt)("p",null,"Filter goes in the register method:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-php"},"// Limits the usage of only custom project blocks.\nadd_filter('allowed_block_types', [ $this, 'allowedBlockTypes' ], 10, 2);\n")),(0,a.kt)("p",null,"Custom callback method:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-php"},"/**\n * Filter which blocks are allowed in what post type.\n *\n * @param array|bool $allowedBlockTypes Array of block type slugs, or boolean to enable/disable all.\n * @param object $post The post resource data.\n *\n * @return array\n */\npublic function allowedBlockTypes($allowedBlockTypes, object $post): array\n{\n $output = [];\n $settings = $this->getSettings();\n $namespace = $settings['namespace'];\n\n switch ($post->post_type) { // phpcs:ignore Squiz.NamingConventions.ValidVariableName.NotCamelCaps\n case 'faq':\n $output = [\n \"{$namespace}/paragraph\",\n ];\n break;\n default:\n $output = $this->getAllBlocksList($allowedBlockTypes, $post);\n break;\n }\n\n return $output;\n}\n")))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/1698e1d1.77ad3211.js b/assets/js/1698e1d1.77ad3211.js new file mode 100644 index 000000000..d762f238a --- /dev/null +++ b/assets/js/1698e1d1.77ad3211.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_eightshift_docs=self.webpackChunk_eightshift_docs||[]).push([[27773],{56738:(e,t,i)=>{i.r(t),i.d(t,{assets:()=>c,contentTitle:()=>d,default:()=>h,frontMatter:()=>s,metadata:()=>a,toc:()=>l});var n=i(85893),o=i(11151);const s={id:"conditional-tags",title:"Conditional tags"},d=void 0,a={id:"features/conditional-tags",title:"Conditional tags",description:"Conditional tags are a useful tool that enables you to display or hide form fields based on various conditions.",source:"@site/forms/features/conditional-tags.md",sourceDirName:"features",slug:"/features/conditional-tags",permalink:"/forms/features/conditional-tags",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{id:"conditional-tags",title:"Conditional tags"},sidebar:"forms",previous:{title:"Dashboard",permalink:"/forms/features/dashboard"},next:{title:"Enrichment",permalink:"/forms/features/enrichment"}},c={},l=[{value:"How to use",id:"how-to-use",level:2},{value:"Inner fields",id:"inner-fields",level:2}];function r(e){const t={admonition:"admonition",code:"code",h2:"h2",img:"img",p:"p",...(0,o.a)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.p,{children:"Conditional tags are a useful tool that enables you to display or hide form fields based on various conditions."}),"\n",(0,n.jsx)(t.p,{children:"To utilize this feature, navigate to the form builder and select the desired field. You will find the conditional tags section in the block options."}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"Conditional tags screen",src:i(76773).Z+"",width:"757",height:"622"})}),"\n",(0,n.jsx)(t.h2,{id:"how-to-use",children:"How to use"}),"\n",(0,n.jsx)(t.p,{children:"To begin, you must choose whether you want the field to be visible or hidden by default. If you select the field to be hidden by default, it will remain hidden until the specified conditions are met. Similarly, if you choose the field to be visible by default, it will be displayed until the conditions are met."}),"\n",(0,n.jsxs)(t.p,{children:["Then, you need to add exception rules to create conditions. You can choose between using ",(0,n.jsx)(t.code,{children:"OR"})," or ",(0,n.jsx)(t.code,{children:"AND"})," conditions, which can be combined to create complex conditions."]}),"\n",(0,n.jsx)(t.admonition,{type:"tip",children:(0,n.jsx)(t.p,{children:"In order to add a conditional tag to a field, the field must have a name attribute."})}),"\n",(0,n.jsx)(t.admonition,{type:"caution",children:(0,n.jsx)(t.p,{children:"If you change the name of a field, you must save the form and update any conditional tags."})}),"\n",(0,n.jsx)(t.h2,{id:"inner-fields",children:"Inner fields"}),"\n",(0,n.jsxs)(t.p,{children:["When you include a rule that includes a ",(0,n.jsx)(t.code,{children:"checkbox"}),", ",(0,n.jsx)(t.code,{children:"radio"}),", or ",(0,n.jsx)(t.code,{children:"select"})," field, you have the option to check if the field is ",(0,n.jsx)(t.code,{children:"checked"})," or ",(0,n.jsx)(t.code,{children:"unchecked"}),", or if it has a specific ",(0,n.jsx)(t.code,{children:"value"}),"."]}),"\n",(0,n.jsx)(t.p,{children:"To do this, you can add conditional tags to the entire field or each option/field within by selecting that option and providing the necessary rules."}),"\n",(0,n.jsx)(t.admonition,{type:"note",children:(0,n.jsxs)(t.p,{children:["For example, if you hide all inner options of the ",(0,n.jsx)(t.code,{children:"select"})," field, the entire field will be hidden, and vice versa."]})})]})}function h(e={}){const{wrapper:t}={...(0,o.a)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(r,{...e})}):r(e)}},76773:(e,t,i)=>{i.d(t,{Z:()=>n});const n=i.p+"assets/images/conditional-tags-98adc4ac754504ede7c153c41bffe4ec.webp"},11151:(e,t,i)=>{i.d(t,{Z:()=>a,a:()=>d});var n=i(67294);const o={},s=n.createContext(o);function d(e){const t=n.useContext(s);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:d(e.components),n.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/1698e1d1.cbaf00ef.js b/assets/js/1698e1d1.cbaf00ef.js deleted file mode 100644 index 5820937a3..000000000 --- a/assets/js/1698e1d1.cbaf00ef.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_eightshift_docs=self.webpackChunk_eightshift_docs||[]).push([[27773],{3905:function(e,t,n){n.d(t,{Zo:function(){return s},kt:function(){return m}});var o=n(67294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function a(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var c=o.createContext({}),d=function(e){var t=o.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):a(a({},t),e)),n},s=function(e){var t=d(e.components);return o.createElement(c.Provider,{value:t},e.children)},u="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},p=o.forwardRef((function(e,t){var n=e.components,i=e.mdxType,r=e.originalType,c=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),u=d(n),p=i,m=u["".concat(c,".").concat(p)]||u[p]||f[p]||r;return n?o.createElement(m,a(a({ref:t},s),{},{components:n})):o.createElement(m,a({ref:t},s))}));function m(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var r=n.length,a=new Array(r);a[0]=p;var l={};for(var c in t)hasOwnProperty.call(t,c)&&(l[c]=t[c]);l.originalType=e,l[u]="string"==typeof e?e:i,a[1]=l;for(var d=2;d