From 40bec52b4b975a4b1412f7ab1039c6a37efb78e7 Mon Sep 17 00:00:00 2001 From: cha0s Date: Thu, 1 Feb 2024 14:08:10 -0600 Subject: [PATCH] b4c512df730f22639e27e3b404ea01621aec3406 --- 404.html | 6 +- ...tyles.73d1a530.css => styles.ed4274d2.css} | 2 +- assets/js/041c5cc5.c8acd6c9.js | 1 - assets/js/041c5cc5.ee9dde79.js | 1 + assets/js/06d8b529.194e9e80.js | 1 - assets/js/06d8b529.721c7e52.js | 1 + assets/js/3c291670.35a15218.js | 1 - assets/js/3c291670.cca5d79b.js | 1 + assets/js/6cabb5ed.588f71b6.js | 1 - assets/js/6cabb5ed.c176a9c3.js | 1 + assets/js/773fe5c0.316c3d4e.js | 1 - assets/js/773fe5c0.c31691b0.js | 1 + assets/js/8b0cd02a.27a74d98.js | 1 - assets/js/8b0cd02a.cb84f799.js | 1 + assets/js/8d4b214a.67f5ed96.js | 1 + assets/js/8d4b214a.ee67ee9c.js | 1 - assets/js/b045326f.d6474522.js | 1 - assets/js/b045326f.ef17d5be.js | 1 + assets/js/ba61d949.1c6e4952.js | 1 - assets/js/ba61d949.dda33883.js | 1 + assets/js/be07d3f5.448f2004.js | 1 + assets/js/be07d3f5.4f4d23d1.js | 1 - assets/js/fa4d91bf.15c66744.js | 1 - assets/js/fa4d91bf.237bde14.js | 1 + assets/js/main.2244df9d.js | 2 + ...CENSE.txt => main.2244df9d.js.LICENSE.txt} | 0 assets/js/main.b644f4bd.js | 2 - ...n.0f71c5c7.js => runtime~main.f662ae2c.js} | 2 +- blog.html | 6 +- blog/archive.html | 6 +- blog/introducing-flecks.html | 6 +- blog/tags.html | 6 +- blog/tags/announcement.html | 6 +- blog/tags/flecks.html | 6 +- blog/tags/introducing.html | 6 +- blog/tags/release.html | 6 +- docs.html | 6 +- docs/adding-flecks.html | 26 +++++---- docs/building-your-application.html | 6 +- docs/building-your-fleck.html | 19 +++---- docs/category/generated-details.html | 6 +- docs/category/getting-started.html | 6 +- docs/category/guides.html | 6 +- docs/category/writing-your-flecks.html | 6 +- docs/cli.html | 37 ++++++------ docs/configuration.html | 6 +- docs/creating-a-fleck.html | 12 ++-- docs/database.html | 57 ++++++++++++------- docs/docker.html | 6 +- docs/documentation.html | 12 ++-- docs/electron.html | 6 +- docs/environment.html | 6 +- docs/flecks/build-files.html | 6 +- docs/flecks/config.html | 8 +-- docs/flecks/hooks.html | 6 +- docs/flecks/todos.html | 6 +- docs/gathering.html | 6 +- docs/hooks.html | 6 +- docs/installation.html | 15 ++--- docs/ordering.html | 6 +- docs/platforms.html | 6 +- docs/react.html | 18 +++--- docs/redux.html | 18 +++--- docs/repl.html | 17 +++--- docs/sockets.html | 6 +- flecks.html | 6 +- index.html | 6 +- 67 files changed, 225 insertions(+), 218 deletions(-) rename assets/css/{styles.73d1a530.css => styles.ed4274d2.css} (75%) delete mode 100644 assets/js/041c5cc5.c8acd6c9.js create mode 100644 assets/js/041c5cc5.ee9dde79.js delete mode 100644 assets/js/06d8b529.194e9e80.js create mode 100644 assets/js/06d8b529.721c7e52.js delete mode 100644 assets/js/3c291670.35a15218.js create mode 100644 assets/js/3c291670.cca5d79b.js delete mode 100644 assets/js/6cabb5ed.588f71b6.js create mode 100644 assets/js/6cabb5ed.c176a9c3.js delete mode 100644 assets/js/773fe5c0.316c3d4e.js create mode 100644 assets/js/773fe5c0.c31691b0.js delete mode 100644 assets/js/8b0cd02a.27a74d98.js create mode 100644 assets/js/8b0cd02a.cb84f799.js create mode 100644 assets/js/8d4b214a.67f5ed96.js delete mode 100644 assets/js/8d4b214a.ee67ee9c.js delete mode 100644 assets/js/b045326f.d6474522.js create mode 100644 assets/js/b045326f.ef17d5be.js delete mode 100644 assets/js/ba61d949.1c6e4952.js create mode 100644 assets/js/ba61d949.dda33883.js create mode 100644 assets/js/be07d3f5.448f2004.js delete mode 100644 assets/js/be07d3f5.4f4d23d1.js delete mode 100644 assets/js/fa4d91bf.15c66744.js create mode 100644 assets/js/fa4d91bf.237bde14.js create mode 100644 assets/js/main.2244df9d.js rename assets/js/{main.b644f4bd.js.LICENSE.txt => main.2244df9d.js.LICENSE.txt} (100%) delete mode 100644 assets/js/main.b644f4bd.js rename assets/js/{runtime~main.0f71c5c7.js => runtime~main.f662ae2c.js} (91%) diff --git a/404.html b/404.html index df4a06c3..97708f83 100644 --- a/404.html +++ b/404.html @@ -4,9 +4,9 @@ Page Not Found | flecks - - - + + +
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.

diff --git a/assets/css/styles.73d1a530.css b/assets/css/styles.ed4274d2.css similarity index 75% rename from assets/css/styles.73d1a530.css rename to assets/css/styles.ed4274d2.css index 6f7b2397..82212174 100644 --- a/assets/css/styles.73d1a530.css +++ b/assets/css/styles.ed4274d2.css @@ -1 +1 @@ -.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))}.markdown li,body{word-wrap:break-word}body,ol ol,ol ul,ul ol,ul ul{margin:0}pre,table{overflow:auto}blockquote,pre{margin:0 0 var(--ifm-spacing-vertical)}.breadcrumbs__link,.button{transition-timing-function:var(--ifm-transition-timing-default)}.button,code{vertical-align:middle}.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)}.toggleButton_gllP,html{-webkit-tap-highlight-color:transparent}.clean-list,.containsTaskList_mC6p,.details_lb9f>summary,.dropdown__menu,.menu__list{list-style:none}: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;--docusaurus-progress-bar-color:var(--ifm-color-primary);--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;--docusaurus-tag-list-border:var(--ifm-color-emphasis-300)}.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}*{box-sizing:border-box}html{-webkit-font-smoothing:antialiased;-webkit-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)}.list_eTzJ article:last-child,.margin-bottom--none,.margin-vert--none,.markdown>:last-child{margin-bottom:0!important}.margin-top--none,.margin-vert--none,.tabItem_LNqP{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}.row--align-top{align-items:flex-start}.row--align-bottom{align-items:flex-end}.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{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}.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)}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)}.container_lyt7,.container_lyt7>svg,img{max-width:100%}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,.tabList__CuJ{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)}ol ol,ul ol{list-style-type:lower-roman}ol ol ol,ol ul ol,ul ol ol,ul ul ol{list-style-type:lower-alpha}table{border-collapse:collapse;display:block;margin-bottom:var(--ifm-spacing-vertical)}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)}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)}.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}.admonitionHeading_Gvgb,.alert__heading,.text--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;color:inherit;cursor:pointer;font-family:inherit;padding:0}.alert,.alert .close{color:var(--ifm-alert-foreground-color)}.clean-list{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}.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{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{margin-bottom:0;padding-left:0}.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}.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{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;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)}.sidebar_re4s,.tableOfContents_bqdL{max-height:calc(100vh - var(--ifm-navbar-height) - 2rem)}.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{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__title,.hooks_uvt_>div{margin-bottom:var(--ifm-heading-margin-bottom)}.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)}.menu,.navbar__link{font-weight:var(--ifm-font-weight-semibold)}.docItemContainer_Djhp article>:first-child,.docItemContainer_Djhp header+*,.footer__item{margin-top:0}.admonitionContent_BuS1>:last-child,.cardContainer_fWXF :last-child,.collapsibleContent_i85q p:last-child,.details_lb9f>summary>p:last-child,.footer__items,.tabItem_Ymn6>:last-child{margin-bottom:0}.codeBlockStandalone_MEMb,[type=checkbox]{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{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)}.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}.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)}.navbar,.navbar>.container,.navbar>.container-fluid{display:flex}.navbar--fixed-top{position:sticky;top:0;z-index:var(--ifm-z-index-fixed)}.navbar-sidebar,.navbar-sidebar__backdrop{bottom:0;opacity:0;position:fixed;transition-duration:var(--ifm-transition-fast);transition-timing-function:ease-in-out;left:0;top:0;visibility:hidden}.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{flex:1 1 auto}.navbar__toggle{display:none;margin-right:.5rem}.navbar__logo{flex:0 0 auto;height:2rem;margin-right:.5rem}.navbar__items{align-items:center;display:flex;flex:1;min-width:0}.navbar__items--center{flex:0 0 auto}.configTable_hbGc td:nth-child(3) .theme-code-block,.navbar__items--center .navbar__brand{margin:0}.navbar__items--center+.navbar__items--right{flex:1}.navbar__items--right{flex:0 0 auto;justify-content:flex-end}.navbar__items--right>:last-child{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}.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);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;right:0;transition-property:opacity,visibility}.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)}.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}.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,.sidebarItemTitle_pO2u,.tabs{font-weight:var(--ifm-font-weight-bold)}.pills{display:flex;gap:var(--ifm-pills-spacing);padding-left:0}.pills__item{border-radius:.5rem;cursor:pointer;display:inline-block;padding:.25rem 1rem;transition:background var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.tabs,:not(.containsTaskList_mC6p>li)>.containsTaskList_mC6p{padding-left:0}.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}.tabs__item{border-bottom:3px solid #0000;border-radius:var(--ifm-global-radius);cursor:pointer;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)}.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}#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}body:not(.navigation-with-keyboard) :not(input):focus{outline:0}#__docusaurus-base-url-issue-banner-container,.docSidebarContainer_YfHR,.sidebarLogo_isFc,.themedComponent_mlkZ,[data-theme=dark] .lightToggleIcon_pyhR,[data-theme=light] .darkToggleIcon_wfgR,html[data-announcement-bar-initially-dismissed=true] .announcementBar_mb4j,tr.configSmall_SLee:first-child{display:none}.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;text-decoration:underline}.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}.dropdownNavbarItemMobile_S0Fm{cursor:pointer}.iconLanguage_nlXk{margin-right:5px;vertical-align:text-bottom}@supports selector(:has(*)){.navbarSearchContainer_Bca1:not(:has(>*)){display:none}}.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}.footerLogoLink_BH7S{opacity:.5;transition:opacity var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.footerLogoLink_BH7S:hover,.hash-link:focus,:hover>.hash-link{opacity:1}.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:"#"}.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{overflow-y:auto;position:sticky;top:calc(var(--ifm-navbar-height) + 2rem)}.sidebarItemTitle_pO2u{font-size:var(--ifm-h3-font-size)}.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}.cardContainer_fWXF{--ifm-link-color:var(--ifm-color-emphasis-800);--ifm-link-hover-color:var(--ifm-color-emphasis-700);--ifm-link-hover-decoration:none;border:1px solid var(--ifm-color-emphasis-200);box-shadow:0 1.5px 3px 0 #00000026;transition:all var(--ifm-transition-fast) ease;transition-property:border,box-shadow}.cardContainer_fWXF:hover{border-color:var(--ifm-color-primary);box-shadow:0 3px 6px 0 #0003}.cardTitle_rnsV{font-size:1.2rem}.cardDescription_PWke{font-size:.8rem}.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}.heroBanner_e1Bh{overflow:hidden;padding:4rem 0;position:relative;text-align:center}.buttons_VwD3{align-items:center;display:flex;justify-content:center}html[data-theme=light] .navbar__logo{filter:invert(1)}.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)}.buttonGroup__atx button,.codeBlockContainer_Ckt0{background:var(--prism-background-color);color:var(--prism-color)}.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}.configTable_hbGc{display:table;table-layout:fixed;width:100%}.configTable_hbGc td:nth-child(2) code,.configTable_hbGc td:nth-child(2) pre,.configTable_hbGc td:nth-child(3) .theme-code-block,.configTable_hbGc td:nth-child(3) .theme-code-block pre{background-color:initial!important;border:none;box-shadow:none}.hooks_uvt_>div code{background-color:initial;border:none;white-space:nowrap}.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}: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: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}.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}.wordWrapButtonIcon_Bwma{height:1.2rem;width:1.2rem}.tags_jXut{display:inline}.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}.tocCollapsibleContent_vkbj a{display:block}.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;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)}.img_ev3q{height:auto}.admonition_xJq3{margin-bottom:1em}.admonitionHeading_Gvgb{font:var(--ifm-heading-font-weight) var(--ifm-h5-font-size)/var(--ifm-heading-line-height) var(--ifm-heading-font-family)}.admonitionHeading_Gvgb:not(:last-child){margin-bottom:.3rem}.admonitionHeading_Gvgb code{text-transform:none}.admonitionIcon_Rf37{display:inline-block;margin-right:.4em;vertical-align:middle}.admonitionIcon_Rf37 svg{fill:var(--ifm-alert-foreground-color);display:inline-block;height:1.6em;width:1.6em}.blogPostFooterDetailsFull_mRVl{flex-direction:column}.tableOfContents_bqdL{overflow-y:auto;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}.title_kItE{--ifm-h1-font-size:3rem;margin-bottom:calc(var(--ifm-leading)*1.25)}@media screen and (min-width:641px){.configSmall_SLee{display:none}.hooks_uvt_{display:flex}.hooks_uvt_>div:first-child{width:50%}.hooks_uvt_>div:last-child{padding-left:var(--ifm-spacing-horizontal);width:50%}.hooks_uvt_>div:only-child{padding-left:0;width:100%}}@media (min-width:997px){.collapseSidebarButton_PEFL,.expandButton_TmdG{background-color:var(--docusaurus-collapse-button-bg)}: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: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{align-items:center;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: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,.generatedIndexPage_vN6x{max-width:75%!important}.list_eTzJ article:nth-last-child(-n+2){margin-bottom:0!important}}@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 screen and (max-width:996px){.heroBanner_e1Bh{padding:2rem}}@media screen and (max-width:640px){.configBig_NxNb{display:none}}@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 (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 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 +.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))}.markdown li,body{word-wrap:break-word}body,ol ol,ol ul,ul ol,ul ul{margin:0}pre,table{overflow:auto}blockquote,pre{margin:0 0 var(--ifm-spacing-vertical)}.breadcrumbs__link,.button{transition-timing-function:var(--ifm-transition-timing-default)}.button,code{vertical-align:middle}.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)}.toggleButton_gllP,html{-webkit-tap-highlight-color:transparent}.clean-list,.containsTaskList_mC6p,.details_lb9f>summary,.dropdown__menu,.menu__list{list-style:none}: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;--docusaurus-progress-bar-color:var(--ifm-color-primary);--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;--docusaurus-tag-list-border:var(--ifm-color-emphasis-300)}.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}*{box-sizing:border-box}html{-webkit-font-smoothing:antialiased;-webkit-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)}.list_eTzJ article:last-child,.margin-bottom--none,.margin-vert--none,.markdown>:last-child{margin-bottom:0!important}.margin-top--none,.margin-vert--none,.tabItem_LNqP{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}.row--align-top{align-items:flex-start}.row--align-bottom{align-items:flex-end}.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{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}.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)}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)}.container_lyt7,.container_lyt7>svg,img{max-width:100%}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,.tabList__CuJ{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)}ol ol,ul ol{list-style-type:lower-roman}ol ol ol,ol ul ol,ul ol ol,ul ul ol{list-style-type:lower-alpha}table{border-collapse:collapse;display:block;margin-bottom:var(--ifm-spacing-vertical)}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)}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)}.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}.admonitionHeading_Gvgb,.alert__heading,.text--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;color:inherit;cursor:pointer;font-family:inherit;padding:0}.alert,.alert .close{color:var(--ifm-alert-foreground-color)}.clean-list{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}.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{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{margin-bottom:0;padding-left:0}.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}.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{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;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)}.sidebar_re4s,.tableOfContents_bqdL{max-height:calc(100vh - var(--ifm-navbar-height) - 2rem)}.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{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__title,.hooks_uvt_>div{margin-bottom:var(--ifm-heading-margin-bottom)}.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)}.menu,.navbar__link{font-weight:var(--ifm-font-weight-semibold)}.docItemContainer_Djhp article>:first-child,.docItemContainer_Djhp header+*,.footer__item{margin-top:0}.admonitionContent_BuS1>:last-child,.cardContainer_fWXF :last-child,.collapsibleContent_i85q p:last-child,.details_lb9f>summary>p:last-child,.footer__items,.tabItem_Ymn6>:last-child{margin-bottom:0}.codeBlockStandalone_MEMb,[type=checkbox]{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{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)}.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}.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)}.navbar,.navbar>.container,.navbar>.container-fluid{display:flex}.navbar--fixed-top{position:sticky;top:0;z-index:var(--ifm-z-index-fixed)}.navbar-sidebar,.navbar-sidebar__backdrop{bottom:0;opacity:0;position:fixed;transition-duration:var(--ifm-transition-fast);transition-timing-function:ease-in-out;left:0;top:0;visibility:hidden}.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{flex:1 1 auto}.navbar__toggle{display:none;margin-right:.5rem}.navbar__logo{flex:0 0 auto;height:2rem;margin-right:.5rem}.navbar__items{align-items:center;display:flex;flex:1;min-width:0}.navbar__items--center{flex:0 0 auto}.configTable_hbGc td:nth-child(3) .theme-code-block,.navbar__items--center .navbar__brand{margin:0}.navbar__items--center+.navbar__items--right{flex:1}.navbar__items--right{flex:0 0 auto;justify-content:flex-end}.navbar__items--right>:last-child{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}.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);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;right:0;transition-property:opacity,visibility}.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)}.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}.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,.sidebarItemTitle_pO2u,.tabs{font-weight:var(--ifm-font-weight-bold)}.pills{display:flex;gap:var(--ifm-pills-spacing);padding-left:0}.pills__item{border-radius:.5rem;cursor:pointer;display:inline-block;padding:.25rem 1rem;transition:background var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.tabs,:not(.containsTaskList_mC6p>li)>.containsTaskList_mC6p{padding-left:0}.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}.tabs__item{border-bottom:3px solid #0000;border-radius:var(--ifm-global-radius);cursor:pointer;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)}.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}#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}#__docusaurus-base-url-issue-banner-container,.docSidebarContainer_YfHR,.sidebarLogo_isFc,.themedComponent_mlkZ,[data-theme=dark] .lightToggleIcon_pyhR,[data-theme=light] .darkToggleIcon_wfgR,html[data-announcement-bar-initially-dismissed=true] .announcementBar_mb4j,tr.configSmall_SLee:first-child,ul.headless.tabs{display:none}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;text-decoration:underline}.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}.dropdownNavbarItemMobile_S0Fm{cursor:pointer}.iconLanguage_nlXk{margin-right:5px;vertical-align:text-bottom}@supports selector(:has(*)){.navbarSearchContainer_Bca1:not(:has(>*)){display:none}}.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}.footerLogoLink_BH7S{opacity:.5;transition:opacity var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.footerLogoLink_BH7S:hover,.hash-link:focus,:hover>.hash-link{opacity:1}.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:"#"}.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{overflow-y:auto;position:sticky;top:calc(var(--ifm-navbar-height) + 2rem)}.sidebarItemTitle_pO2u{font-size:var(--ifm-h3-font-size)}.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}.cardContainer_fWXF{--ifm-link-color:var(--ifm-color-emphasis-800);--ifm-link-hover-color:var(--ifm-color-emphasis-700);--ifm-link-hover-decoration:none;border:1px solid var(--ifm-color-emphasis-200);box-shadow:0 1.5px 3px 0 #00000026;transition:all var(--ifm-transition-fast) ease;transition-property:border,box-shadow}.cardContainer_fWXF:hover{border-color:var(--ifm-color-primary);box-shadow:0 3px 6px 0 #0003}.cardTitle_rnsV{font-size:1.2rem}.cardDescription_PWke{font-size:.8rem}.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}.heroBanner_e1Bh{overflow:hidden;padding:4rem 0;position:relative;text-align:center}.buttons_VwD3{align-items:center;display:flex;justify-content:center}html[data-theme=light] .navbar__logo{filter:invert(1)}.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)}.buttonGroup__atx button,.codeBlockContainer_Ckt0{background:var(--prism-background-color);color:var(--prism-color)}.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}.configTable_hbGc{display:table;table-layout:fixed;width:100%}.configTable_hbGc td:nth-child(2) code,.configTable_hbGc td:nth-child(2) pre,.configTable_hbGc td:nth-child(3) .theme-code-block,.configTable_hbGc td:nth-child(3) .theme-code-block pre{background-color:initial!important;border:none;box-shadow:none}.hooks_uvt_>div code{background-color:initial;border:none;white-space:nowrap}.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}: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: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}.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}.wordWrapButtonIcon_Bwma{height:1.2rem;width:1.2rem}.tags_jXut{display:inline}.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}.tocCollapsibleContent_vkbj a{display:block}.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;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)}.img_ev3q{height:auto}.admonition_xJq3{margin-bottom:1em}.admonitionHeading_Gvgb{font:var(--ifm-heading-font-weight) var(--ifm-h5-font-size)/var(--ifm-heading-line-height) var(--ifm-heading-font-family)}.admonitionHeading_Gvgb:not(:last-child){margin-bottom:.3rem}.admonitionHeading_Gvgb code{text-transform:none}.admonitionIcon_Rf37{display:inline-block;margin-right:.4em;vertical-align:middle}.admonitionIcon_Rf37 svg{fill:var(--ifm-alert-foreground-color);display:inline-block;height:1.6em;width:1.6em}.blogPostFooterDetailsFull_mRVl{flex-direction:column}.tableOfContents_bqdL{overflow-y:auto;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}.title_kItE{--ifm-h1-font-size:3rem;margin-bottom:calc(var(--ifm-leading)*1.25)}@media screen and (min-width:641px){.configSmall_SLee{display:none}.hooks_uvt_{display:flex}.hooks_uvt_>div:first-child{width:50%}.hooks_uvt_>div:last-child{padding-left:var(--ifm-spacing-horizontal);width:50%}.hooks_uvt_>div:only-child{padding-left:0;width:100%}}@media (min-width:997px){.collapseSidebarButton_PEFL,.expandButton_TmdG{background-color:var(--docusaurus-collapse-button-bg)}: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: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{align-items:center;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: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,.generatedIndexPage_vN6x{max-width:75%!important}.list_eTzJ article:nth-last-child(-n+2){margin-bottom:0!important}}@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 screen and (max-width:996px){.heroBanner_e1Bh{padding:2rem}}@media screen and (max-width:640px){.configBig_NxNb{display:none}}@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 (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 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/041c5cc5.c8acd6c9.js b/assets/js/041c5cc5.c8acd6c9.js deleted file mode 100644 index b6b50def..00000000 --- a/assets/js/041c5cc5.c8acd6c9.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkflecks_docusaurus=self.webpackChunkflecks_docusaurus||[]).push([[9686],{5898:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>o,contentTitle:()=>l,default:()=>h,frontMatter:()=>c,metadata:()=>i,toc:()=>d});var r=n(5893),s=n(1151),a=n(3200);n(385);const c={title:"Redux",description:"Define your actions, reducers, and state."},l=void 0,i={id:"redux",title:"Redux",description:"Define your actions, reducers, and state.",source:"@site/docs/redux.mdx",sourceDirName:".",slug:"/redux",permalink:"/flecks/docs/redux",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{title:"Redux",description:"Define your actions, reducers, and state."},sidebar:"flecksSidebar",previous:{title:"Electron",permalink:"/flecks/docs/electron"},next:{title:"REPL",permalink:"/flecks/docs/repl"}},o={},d=[{value:"Create an app",id:"create-an-app",level:2},{value:"Create a fleck",id:"create-a-fleck",level:2},{value:"Create a duck",id:"create-a-duck",level:2},{value:"Export your state",id:"export-your-state",level:3},{value:"Set up a contrived web example",id:"set-up-a-contrived-web-example",level:2},{value:"Check out the redux devtools",id:"check-out-the-redux-devtools",level:3},{value:"Redux in React in flecks",id:"redux-in-react-in-flecks",level:2}];function u(e){const t={admonition:"admonition",code:"code",h2:"h2",h3:"h3",img:"img",p:"p",pre:"pre",strong:"strong",...(0,s.a)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.p,{children:"Working with redux in flecks is easy. Let's create a small application to inspect and\nfamiliarize ourselves."}),"\n",(0,r.jsx)(t.h2,{id:"create-an-app",children:"Create an app"}),"\n",(0,r.jsx)(a.Z,{type:"app",pkg:"redux-test"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{children:"cd redux-test\n"})}),"\n",(0,r.jsx)(t.h2,{id:"create-a-fleck",children:"Create a fleck"}),"\n",(0,r.jsx)(a.Z,{type:"fleck",pkg:"ducks"}),"\n",(0,r.jsxs)(t.p,{children:["We'll add the ",(0,r.jsx)(t.code,{children:"redux"})," fleck to our new fleck:"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{children:"cd packages/ducks\nnpx flecks add @flecks/redux\n"})}),"\n",(0,r.jsx)(t.h2,{id:"create-a-duck",children:"Create a duck"}),"\n",(0,r.jsxs)(t.p,{children:["Alright, let's create a duck at ",(0,r.jsx)(t.code,{children:"packages/ducks/src/state/thing.js"}),":"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-js",metastring:'title="packages/ducks/src/state/thing.js"',children:"import {\n createSelector,\n createSlice,\n} from '@flecks/redux';\n\nexport const thingSelector = ({thing}) => thing;\n\nexport const leftSelector = createSelector([thingSelector], ({left}) => left);\n\nexport const rightSelector = createSelector([thingSelector], ({right}) => right);\n\nexport const totalSelector = createSelector(\n [leftSelector, rightSelector],\n (left, right) => left + right,\n);\n\nexport const initialState = () => ({\n left: 0,\n right: 0,\n});\n\nconst reducers = {\n addToLeft: (state, {payload}) => {\n state.left += payload;\n },\n addToRight: (state, {payload}) => {\n state.right += payload;\n },\n};\n\nconst slice = createSlice({\n name: 'thing',\n initialState: initialState(),\n reducers,\n});\n\nexport const {\n addToLeft,\n addToRight,\n} = slice.actions;\n\nexport default slice.reducer;\n"})}),"\n",(0,r.jsx)(t.h3,{id:"export-your-state",children:"Export your state"}),"\n",(0,r.jsxs)(t.p,{children:["Let's create an exporter at ",(0,r.jsx)(t.code,{children:"packages/ducks/src/state/index.js"}),":"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-js",metastring:'title="packages/ducks/src/state/index.js"',children:"export * from './thing';\nexport {default as thing} from './thing';\n"})}),"\n",(0,r.jsx)(t.p,{children:"Not strictly necessary, but you might find it convenient to access your actions and selectors!"}),"\n",(0,r.jsx)(t.h2,{id:"set-up-a-contrived-web-example",children:"Set up a contrived web example"}),"\n",(0,r.jsxs)(t.p,{children:["Finally, we'll edit ",(0,r.jsx)(t.code,{children:"packages/ducks/src/index.js"}),":"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-js",metastring:'title="packages/ducks/src/index.js"',children:"import {Flecks} from '@flecks/core';\n\nimport {addToLeft, addToRight, thing} from './state';\n\nexport * from './state';\n\nexport const hooks = {\n '@flecks/web/client.up': Flecks.priority(\n async (flecks) => {\n flecks.redux.dispatch(addToLeft(5));\n flecks.redux.dispatch(addToRight(2));\n },\n {after: '@flecks/redux/client'},\n ),\n '@flecks/redux.slices': () => ({thing}),\n};\n"})}),"\n",(0,r.jsx)(t.admonition,{title:"Have a slice",type:"note",children:(0,r.jsxs)(t.p,{children:["We're using ",(0,r.jsx)(t.code,{children:"@flecks/web/client.up"})," just as a little test."]})}),"\n",(0,r.jsxs)(t.p,{children:["As a little test, we'll add ",(0,r.jsx)(t.code,{children:"@flecks/web"})," and ",(0,r.jsx)(t.code,{children:"@flecks/electron"})," so we can check out the Redux\ndevtools."]}),"\n",(0,r.jsx)(t.p,{children:"From the project root:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{children:"npx flecks add @flecks/web\nnpx flecks add -d @flecks/electron\n"})}),"\n",(0,r.jsx)(t.admonition,{title:"Attention",type:"warning",children:(0,r.jsxs)(t.p,{children:["Those commands should be run ",(0,r.jsx)(t.strong,{children:"in the application root directory"}),"! Your fleck doesn't care about\ndealing with a web server or an electron app."]})}),"\n",(0,r.jsx)(t.h3,{id:"check-out-the-redux-devtools",children:"Check out the redux devtools"}),"\n",(0,r.jsx)(t.p,{children:"Now start up your application:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{children:"npm start\n"})}),"\n",(0,r.jsxs)(t.p,{children:["After a moment, Electron will appear. Press ",(0,r.jsx)(t.code,{children:"ctrl+i"})," to open devtools in Electron."]}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.img,{alt:"A screenshot showing our app running in Electron with devtools open",src:n(778).Z+"",width:"820",height:"655"})}),"\n",(0,r.jsx)(t.p,{children:"Open up the Redux devtools:"}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.img,{alt:"A screenshot showing our app running in Electron with devtools open now hovering over the Redux devtools tab",src:n(4793).Z+"",width:"820",height:"655"})}),"\n",(0,r.jsx)(t.p,{children:"Everything is there!"}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.img,{alt:"A screenshot showing our app running in Electron with devtools open to the Redux devtools tab with our state visible",src:n(5106).Z+"",width:"820",height:"655"})}),"\n",(0,r.jsx)(t.h2,{id:"redux-in-react-in-flecks",children:"Redux in React in flecks"}),"\n",(0,r.jsxs)(t.p,{children:["How about Redux in React? No problem! Move to ",(0,r.jsx)(t.code,{children:"packages/ducks"})," and run the following command:"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{children:"npx flecks add @flecks/react-redux\n"})}),"\n",(0,r.jsx)(t.admonition,{title:"Attention",type:"warning",children:(0,r.jsxs)(t.p,{children:["That command should be run ",(0,r.jsxs)(t.strong,{children:["in ",(0,r.jsx)(t.code,{children:"packages/ducks"})]}),"! This way, the fleck encapsulates all of its\ndependencies. Your fleck is its own package. If you do things right, you can even publish your\nfleck for others to use!"]})}),"\n",(0,r.jsxs)(t.p,{children:["Let's create a component at ",(0,r.jsx)(t.code,{children:"packages/ducks/src/thing.jsx"}),":"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-jsx",metastring:'title="packages/ducks/src/thing.jsx"',children:"import {React} from '@flecks/react';\nimport {useDispatch, useSelector} from '@flecks/react-redux';\n\nimport {\n addToLeft,\n addToRight,\n leftSelector,\n rightSelector,\n totalSelector,\n} from './state';\n\nfunction Thing() {\n const dispatch = useDispatch();\n const left = useSelector(leftSelector);\n const right = useSelector(rightSelector);\n const total = useSelector(totalSelector);\n return (\n
\n \n \n Left: {left}\n Total: {total}\n Right: {right}\n \n \n
\n )\n}\n\nexport default Thing;\n"})}),"\n",(0,r.jsxs)(t.p,{children:["Now update ",(0,r.jsx)(t.code,{children:"packages/ducks/src/index.js"}),":"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-js",metastring:'title="packages/ducks/src/index.js"',children:"import {thing} from './state';\nimport Thing from './thing';\n\nexport const hooks = {\n '@flecks/react.roots': () => Thing,\n '@flecks/redux.slices': () => ({thing}),\n};\n"})}),"\n",(0,r.jsx)(t.p,{children:"Restart your application. It works!"}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.img,{alt:"A screenshot showing our app running in Electron after a few button presses",src:n(7745).Z+"",width:"820",height:"655"})})]})}function h(e={}){const{wrapper:t}={...(0,s.a)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(u,{...e})}):u(e)}},3200:(e,t,n)=>{n.d(t,{Z:()=>l});var r=n(9286),s=n(4866),a=n(5162),c=n(5893);function l(e){let{pkg:t,type:n}=e;return(0,c.jsxs)(s.Z,{children:[(0,c.jsx)(a.Z,{value:"npm",label:"npm",children:(0,c.jsxs)(r.Z,{language:"bash",children:["npm init @flecks/",n," ",t]})}),(0,c.jsx)(a.Z,{value:"yarn",label:"Yarn",children:(0,c.jsxs)(r.Z,{language:"bash",children:["yarn create @flecks/",n," ",t]})}),(0,c.jsx)(a.Z,{value:"bun",label:"Bun",children:(0,c.jsxs)(r.Z,{language:"bash",children:["bun create @flecks/",n," ",t]})})]})}},385:(e,t,n)=>{n.d(t,{Z:()=>l});var r=n(9286),s=n(4866),a=n(5162),c=n(5893);function l(e){let{pkg:t}=e;return(0,c.jsxs)(s.Z,{children:[(0,c.jsx)(a.Z,{value:"npm",label:"npm",children:(0,c.jsxs)(r.Z,{language:"bash",children:["npm install ",t]})}),(0,c.jsx)(a.Z,{value:"yarn",label:"Yarn",children:(0,c.jsxs)(r.Z,{language:"bash",children:["yarn add ",t]})}),(0,c.jsx)(a.Z,{value:"bun",label:"Bun",children:(0,c.jsxs)(r.Z,{language:"bash",children:["bun install ",t]})})]})}},5162:(e,t,n)=>{n.d(t,{Z:()=>c});n(7294);var r=n(512);const s={tabItem:"tabItem_Ymn6"};var a=n(5893);function c(e){let{children:t,hidden:n,className:c}=e;return(0,a.jsx)("div",{role:"tabpanel",className:(0,r.Z)(s.tabItem,c),hidden:n,children:t})}},4866:(e,t,n)=>{n.d(t,{Z:()=>y});var r=n(7294),s=n(512),a=n(2466),c=n(6550),l=n(469),i=n(1980),o=n(7392),d=n(12);function u(e){return r.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function h(e){const{values:t,children:n}=e;return(0,r.useMemo)((()=>{const e=t??function(e){return u(e).map((e=>{let{props:{value:t,label:n,attributes:r,default:s}}=e;return{value:t,label:n,attributes:r,default:s}}))}(n);return function(e){const t=(0,o.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function p(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function x(e){let{queryString:t=!1,groupId:n}=e;const s=(0,c.k6)(),a=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return n??null}({queryString:t,groupId:n});return[(0,i._X)(a),(0,r.useCallback)((e=>{if(!a)return;const t=new URLSearchParams(s.location.search);t.set(a,e),s.replace({...s.location,search:t.toString()})}),[a,s])]}function f(e){const{defaultValue:t,queryString:n=!1,groupId:s}=e,a=h(e),[c,i]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!p({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const r=n.find((e=>e.default))??n[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:t,tabValues:a}))),[o,u]=x({queryString:n,groupId:s}),[f,g]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[s,a]=(0,d.Nk)(n);return[s,(0,r.useCallback)((e=>{n&&a.set(e)}),[n,a])]}({groupId:s}),m=(()=>{const e=o??f;return p({value:e,tabValues:a})?e:null})();(0,l.Z)((()=>{m&&i(m)}),[m]);return{selectedValue:c,selectValue:(0,r.useCallback)((e=>{if(!p({value:e,tabValues:a}))throw new Error(`Can't select invalid tab value=${e}`);i(e),u(e),g(e)}),[u,g,a]),tabValues:a}}var g=n(2389);const m={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var k=n(5893);function j(e){let{className:t,block:n,selectedValue:r,selectValue:c,tabValues:l}=e;const i=[],{blockElementScrollPositionUntilNextRender:o}=(0,a.o5)(),d=e=>{const t=e.currentTarget,n=i.indexOf(t),s=l[n].value;s!==r&&(o(t),c(s))},u=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const n=i.indexOf(e.currentTarget)+1;t=i[n]??i[0];break}case"ArrowLeft":{const n=i.indexOf(e.currentTarget)-1;t=i[n]??i[i.length-1];break}}t?.focus()};return(0,k.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,s.Z)("tabs",{"tabs--block":n},t),children:l.map((e=>{let{value:t,label:n,attributes:a}=e;return(0,k.jsx)("li",{role:"tab",tabIndex:r===t?0:-1,"aria-selected":r===t,ref:e=>i.push(e),onKeyDown:u,onClick:d,...a,className:(0,s.Z)("tabs__item",m.tabItem,a?.className,{"tabs__item--active":r===t}),children:n??t},t)}))})}function b(e){let{lazy:t,children:n,selectedValue:s}=e;const a=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=a.find((e=>e.props.value===s));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return(0,k.jsx)("div",{className:"margin-top--md",children:a.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==s})))})}function v(e){const t=f(e);return(0,k.jsxs)("div",{className:(0,s.Z)("tabs-container",m.tabList),children:[(0,k.jsx)(j,{...e,...t}),(0,k.jsx)(b,{...e,...t})]})}function y(e){const t=(0,g.Z)();return(0,k.jsx)(v,{...e,children:u(e.children)},String(t))}},778:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/redux-test-1-a1382cd66041ed2c79ea9e4563623966.png"},4793:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/redux-test-2-f812b5e7f7217c1c0b5c7c8120bf8eb6.png"},5106:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/redux-test-3-cdcd86e43e2393a2b7c6f825c6d848c1.png"},7745:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/redux-test-4-c0a11ccdf63c7320a62ab9411386db28.png"}}]); \ No newline at end of file diff --git a/assets/js/041c5cc5.ee9dde79.js b/assets/js/041c5cc5.ee9dde79.js new file mode 100644 index 00000000..47e4a871 --- /dev/null +++ b/assets/js/041c5cc5.ee9dde79.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkflecks_docusaurus=self.webpackChunkflecks_docusaurus||[]).push([[9686],{5898:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>u,contentTitle:()=>o,default:()=>x,frontMatter:()=>i,metadata:()=>d,toc:()=>h});var s=t(5893),a=t(1151),r=t(3200),l=t(4283),c=(t(385),t(6569));const i={title:"Redux",description:"Define your actions, reducers, and state."},o=void 0,d={id:"redux",title:"Redux",description:"Define your actions, reducers, and state.",source:"@site/docs/redux.mdx",sourceDirName:".",slug:"/redux",permalink:"/flecks/docs/redux",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{title:"Redux",description:"Define your actions, reducers, and state."},sidebar:"flecksSidebar",previous:{title:"Electron",permalink:"/flecks/docs/electron"},next:{title:"REPL",permalink:"/flecks/docs/repl"}},u={},h=[{value:"Create an app",id:"create-an-app",level:2},{value:"Create a fleck",id:"create-a-fleck",level:2},{value:"Create a duck",id:"create-a-duck",level:2},{value:"Export your state",id:"export-your-state",level:3},{value:"Set up a contrived web example",id:"set-up-a-contrived-web-example",level:2},{value:"Check out the redux devtools",id:"check-out-the-redux-devtools",level:3},{value:"Redux in React in flecks",id:"redux-in-react-in-flecks",level:2}];function p(e){const n={admonition:"admonition",code:"code",h2:"h2",h3:"h3",img:"img",p:"p",pre:"pre",strong:"strong",...(0,a.a)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.p,{children:"Working with redux in flecks is easy. Let's create a small application to inspect and\nfamiliarize ourselves."}),"\n",(0,s.jsx)(n.h2,{id:"create-an-app",children:"Create an app"}),"\n",(0,s.jsx)(r.Z,{type:"app",pkg:"redux-test"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"cd redux-test\n"})}),"\n",(0,s.jsx)(n.h2,{id:"create-a-fleck",children:"Create a fleck"}),"\n",(0,s.jsx)(r.Z,{headless:!0,type:"fleck",pkg:"ducks"}),"\n",(0,s.jsxs)(n.p,{children:["We'll add the ",(0,s.jsx)(n.code,{children:"redux"})," fleck to our new fleck:"]}),"\n",(0,s.jsx)(l.Z,{headless:!0,cmd:"flecks add @flecks/redux",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"cd packages/ducks\n"})})}),"\n",(0,s.jsx)(n.h2,{id:"create-a-duck",children:"Create a duck"}),"\n",(0,s.jsxs)(n.p,{children:["Alright, let's create a duck at ",(0,s.jsx)(n.code,{children:"packages/ducks/src/state/thing.js"}),":"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-js",metastring:'title="packages/ducks/src/state/thing.js"',children:"import {\n createSelector,\n createSlice,\n} from '@flecks/redux';\n\nexport const thingSelector = ({thing}) => thing;\n\nexport const leftSelector = createSelector([thingSelector], ({left}) => left);\n\nexport const rightSelector = createSelector([thingSelector], ({right}) => right);\n\nexport const totalSelector = createSelector(\n [leftSelector, rightSelector],\n (left, right) => left + right,\n);\n\nexport const initialState = () => ({\n left: 0,\n right: 0,\n});\n\nconst reducers = {\n addToLeft: (state, {payload}) => {\n state.left += payload;\n },\n addToRight: (state, {payload}) => {\n state.right += payload;\n },\n};\n\nconst slice = createSlice({\n name: 'thing',\n initialState: initialState(),\n reducers,\n});\n\nexport const {\n addToLeft,\n addToRight,\n} = slice.actions;\n\nexport default slice.reducer;\n"})}),"\n",(0,s.jsx)(n.h3,{id:"export-your-state",children:"Export your state"}),"\n",(0,s.jsxs)(n.p,{children:["Let's create an exporter at ",(0,s.jsx)(n.code,{children:"packages/ducks/src/state/index.js"}),":"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-js",metastring:'title="packages/ducks/src/state/index.js"',children:"export * from './thing';\nexport {default as thing} from './thing';\n"})}),"\n",(0,s.jsx)(n.p,{children:"Not strictly necessary, but you might find it convenient to access your actions and selectors!"}),"\n",(0,s.jsx)(n.h2,{id:"set-up-a-contrived-web-example",children:"Set up a contrived web example"}),"\n",(0,s.jsxs)(n.p,{children:["Finally, we'll edit ",(0,s.jsx)(n.code,{children:"packages/ducks/src/index.js"}),":"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-js",metastring:'title="packages/ducks/src/index.js"',children:"import {Flecks} from '@flecks/core';\n\nimport {addToLeft, addToRight, thing} from './state';\n\nexport * from './state';\n\nexport const hooks = {\n '@flecks/web/client.up': Flecks.priority(\n async (flecks) => {\n flecks.redux.dispatch(addToLeft(5));\n flecks.redux.dispatch(addToRight(2));\n },\n {after: '@flecks/redux/client'},\n ),\n '@flecks/redux.slices': () => ({thing}),\n};\n"})}),"\n",(0,s.jsx)(n.admonition,{title:"Have a slice",type:"note",children:(0,s.jsxs)(n.p,{children:["We're using ",(0,s.jsx)(n.code,{children:"@flecks/web/client.up"})," just as a little test."]})}),"\n",(0,s.jsxs)(n.p,{children:["As a little test, we'll add ",(0,s.jsx)(n.code,{children:"@flecks/web"})," and ",(0,s.jsx)(n.code,{children:"@flecks/electron"})," so we can check out the Redux\ndevtools."]}),"\n",(0,s.jsx)(n.p,{children:"From the project root:"}),"\n",(0,s.jsx)(l.Z,{cmd:["flecks add @flecks/web","flecks add -d @flecks/electron"]}),"\n",(0,s.jsx)(n.admonition,{title:"Attention",type:"warning",children:(0,s.jsxs)(n.p,{children:["Those commands should be run ",(0,s.jsx)(n.strong,{children:"in the application root directory"}),"! Your fleck doesn't care about\ndealing with a web server or an electron app."]})}),"\n",(0,s.jsx)(n.h3,{id:"check-out-the-redux-devtools",children:"Check out the redux devtools"}),"\n",(0,s.jsx)(n.p,{children:"Now start up your application:"}),"\n",(0,s.jsx)(c.Z,{headless:!0,cmd:"start"}),"\n",(0,s.jsxs)(n.p,{children:["After a moment, Electron will appear. Press ",(0,s.jsx)(n.code,{children:"ctrl+i"})," to open devtools in Electron."]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"A screenshot showing our app running in Electron with devtools open",src:t(778).Z+"",width:"820",height:"655"})}),"\n",(0,s.jsx)(n.p,{children:"Open up the Redux devtools:"}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"A screenshot showing our app running in Electron with devtools open now hovering over the Redux devtools tab",src:t(4793).Z+"",width:"820",height:"655"})}),"\n",(0,s.jsx)(n.p,{children:"Everything is there!"}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"A screenshot showing our app running in Electron with devtools open to the Redux devtools tab with our state visible",src:t(5106).Z+"",width:"820",height:"655"})}),"\n",(0,s.jsx)(n.h2,{id:"redux-in-react-in-flecks",children:"Redux in React in flecks"}),"\n",(0,s.jsxs)(n.p,{children:["How about Redux in React? No problem! Move to ",(0,s.jsx)(n.code,{children:"packages/ducks"})," and run the following command:"]}),"\n",(0,s.jsx)(l.Z,{headless:!0,cmd:"flecks add @flecks/react-redux"}),"\n",(0,s.jsx)(n.admonition,{title:"Attention",type:"warning",children:(0,s.jsxs)(n.p,{children:["That command should be run ",(0,s.jsxs)(n.strong,{children:["in ",(0,s.jsx)(n.code,{children:"packages/ducks"})]}),"! This way, the fleck encapsulates all of its\ndependencies. Your fleck is its own package. If you do things right, you can even publish your\nfleck for others to use!"]})}),"\n",(0,s.jsxs)(n.p,{children:["Let's create a component at ",(0,s.jsx)(n.code,{children:"packages/ducks/src/thing.jsx"}),":"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-jsx",metastring:'title="packages/ducks/src/thing.jsx"',children:"import {React} from '@flecks/react';\nimport {useDispatch, useSelector} from '@flecks/react-redux';\n\nimport {\n addToLeft,\n addToRight,\n leftSelector,\n rightSelector,\n totalSelector,\n} from './state';\n\nfunction Thing() {\n const dispatch = useDispatch();\n const left = useSelector(leftSelector);\n const right = useSelector(rightSelector);\n const total = useSelector(totalSelector);\n return (\n
\n \n \n Left: {left}\n Total: {total}\n Right: {right}\n \n \n
\n )\n}\n\nexport default Thing;\n"})}),"\n",(0,s.jsxs)(n.p,{children:["Now update ",(0,s.jsx)(n.code,{children:"packages/ducks/src/index.js"}),":"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-js",metastring:'title="packages/ducks/src/index.js"',children:"import {thing} from './state';\nimport Thing from './thing';\n\nexport const hooks = {\n '@flecks/react.roots': () => Thing,\n '@flecks/redux.slices': () => ({thing}),\n};\n"})}),"\n",(0,s.jsx)(n.p,{children:"Restart your application. It works!"}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"A screenshot showing our app running in Electron after a few button presses",src:t(7745).Z+"",width:"820",height:"655"})})]})}function x(e={}){const{wrapper:n}={...(0,a.a)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(p,{...e})}):p(e)}},3200:(e,n,t)=>{t.d(n,{Z:()=>c});var s=t(9286),a=t(4866),r=t(5162),l=t(5893);function c(e){let{children:n,headless:t=!1,pkg:c,type:i}=e;return(0,l.jsxs)(a.Z,{className:t&&"headless",groupId:"package-manager",children:[(0,l.jsxs)(r.Z,{value:"npm",label:"npm",children:[n,(0,l.jsxs)(s.Z,{language:"bash",children:["npm init @flecks/",i," ",c]})]}),(0,l.jsxs)(r.Z,{value:"yarn",label:"Yarn",children:[n,(0,l.jsxs)(s.Z,{language:"bash",children:["yarn create @flecks/",i," ",c]})]}),(0,l.jsxs)(r.Z,{value:"pnpm",label:"pnpm",children:[n,(0,l.jsxs)(s.Z,{language:"bash",children:["pnpm create @flecks/",i," ",c]})]}),(0,l.jsxs)(r.Z,{value:"bun",label:"Bun",children:[n,(0,l.jsxs)(s.Z,{language:"bash",children:["bun create @flecks/",i," ",c]})]})]})}},4283:(e,n,t)=>{t.d(n,{Z:()=>c});var s=t(9286),a=t(4866),r=t(5162),l=t(5893);function c(e){let{children:n,cmd:t,headless:c=!1}=e;const i=Array.isArray(t)?t:[t],o=e=>i.map((n=>`${e} ${n}`)).join("\n");return(0,l.jsxs)(a.Z,{className:c&&"headless",groupId:"package-manager",children:[(0,l.jsxs)(r.Z,{value:"npm",label:"npm",children:[n,(0,l.jsx)(s.Z,{language:"bash",children:o("npx")})]}),(0,l.jsxs)(r.Z,{value:"yarn",label:"Yarn",children:[n,(0,l.jsx)(s.Z,{language:"bash",children:o("yarn")})]}),(0,l.jsxs)(r.Z,{value:"pnpm",label:"pnpm",children:[n,(0,l.jsx)(s.Z,{language:"bash",children:o("pnpx")})]}),(0,l.jsxs)(r.Z,{value:"bun",label:"Bun",children:[n,(0,l.jsx)(s.Z,{language:"bash",children:o("bunx")})]})]})}},385:(e,n,t)=>{t.d(n,{Z:()=>c});var s=t(9286),a=t(4866),r=t(5162),l=t(5893);function c(e){let{children:n,headless:t,pkg:c}=e;return(0,l.jsxs)(a.Z,{className:t&&"headless",groupId:"package-manager",children:[(0,l.jsxs)(r.Z,{value:"npm",label:"npm",children:[n,(0,l.jsxs)(s.Z,{language:"bash",children:["npm install ",c]})]}),(0,l.jsxs)(r.Z,{value:"yarn",label:"Yarn",children:[n,(0,l.jsxs)(s.Z,{language:"bash",children:["yarn add ",c]})]}),(0,l.jsxs)(r.Z,{value:"pnpm",label:"pnpm",children:[n,(0,l.jsxs)(s.Z,{language:"bash",children:["pnpm add ",c]})]}),(0,l.jsxs)(r.Z,{value:"bun",label:"Bun",children:[n,(0,l.jsxs)(s.Z,{language:"bash",children:["bun add ",c]})]})]})}},6569:(e,n,t)=>{t.d(n,{Z:()=>c});var s=t(9286),a=t(4866),r=t(5162),l=t(5893);function c(e){let{children:n,cmd:t,headless:c=!1}=e;return(0,l.jsxs)(a.Z,{className:c&&"headless",groupId:"package-manager",children:[(0,l.jsxs)(r.Z,{value:"npm",label:"npm",children:[n,(0,l.jsxs)(s.Z,{language:"bash",children:["npm run ",t]})]}),(0,l.jsxs)(r.Z,{value:"yarn",label:"Yarn",children:[n,(0,l.jsxs)(s.Z,{language:"bash",children:["yarn run ",t]})]}),(0,l.jsxs)(r.Z,{value:"pnpm",label:"pnpm",children:[n,(0,l.jsxs)(s.Z,{language:"bash",children:["pnpm run ",t]})]}),(0,l.jsxs)(r.Z,{value:"bun",label:"Bun",children:[n,(0,l.jsxs)(s.Z,{language:"bash",children:["bun run ",t]})]})]})}},5162:(e,n,t)=>{t.d(n,{Z:()=>l});t(7294);var s=t(512);const a={tabItem:"tabItem_Ymn6"};var r=t(5893);function l(e){let{children:n,hidden:t,className:l}=e;return(0,r.jsx)("div",{role:"tabpanel",className:(0,s.Z)(a.tabItem,l),hidden:t,children:n})}},4866:(e,n,t)=>{t.d(n,{Z:()=>y});var s=t(7294),a=t(512),r=t(2466),l=t(6550),c=t(469),i=t(1980),o=t(7392),d=t(12);function u(e){return s.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,s.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function h(e){const{values:n,children:t}=e;return(0,s.useMemo)((()=>{const e=n??function(e){return u(e).map((e=>{let{props:{value:n,label:t,attributes:s,default:a}}=e;return{value:n,label:t,attributes:s,default:a}}))}(t);return function(e){const n=(0,o.l)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,t])}function p(e){let{value:n,tabValues:t}=e;return t.some((e=>e.value===n))}function x(e){let{queryString:n=!1,groupId:t}=e;const a=(0,l.k6)(),r=function(e){let{queryString:n=!1,groupId:t}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!t)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return t??null}({queryString:n,groupId:t});return[(0,i._X)(r),(0,s.useCallback)((e=>{if(!r)return;const n=new URLSearchParams(a.location.search);n.set(r,e),a.replace({...a.location,search:n.toString()})}),[r,a])]}function g(e){const{defaultValue:n,queryString:t=!1,groupId:a}=e,r=h(e),[l,i]=(0,s.useState)((()=>function(e){let{defaultValue:n,tabValues:t}=e;if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!p({value:n,tabValues:t}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${t.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const s=t.find((e=>e.default))??t[0];if(!s)throw new Error("Unexpected error: 0 tabValues");return s.value}({defaultValue:n,tabValues:r}))),[o,u]=x({queryString:t,groupId:a}),[g,f]=function(e){let{groupId:n}=e;const t=function(e){return e?`docusaurus.tab.${e}`:null}(n),[a,r]=(0,d.Nk)(t);return[a,(0,s.useCallback)((e=>{t&&r.set(e)}),[t,r])]}({groupId:a}),m=(()=>{const e=o??g;return p({value:e,tabValues:r})?e:null})();(0,c.Z)((()=>{m&&i(m)}),[m]);return{selectedValue:l,selectValue:(0,s.useCallback)((e=>{if(!p({value:e,tabValues:r}))throw new Error(`Can't select invalid tab value=${e}`);i(e),u(e),f(e)}),[u,f,r]),tabValues:r}}var f=t(2389);const m={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var b=t(5893);function j(e){let{className:n,block:t,selectedValue:s,selectValue:l,tabValues:c}=e;const i=[],{blockElementScrollPositionUntilNextRender:o}=(0,r.o5)(),d=e=>{const n=e.currentTarget,t=i.indexOf(n),a=c[t].value;a!==s&&(o(n),l(a))},u=e=>{let n=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const t=i.indexOf(e.currentTarget)+1;n=i[t]??i[0];break}case"ArrowLeft":{const t=i.indexOf(e.currentTarget)-1;n=i[t]??i[i.length-1];break}}n?.focus()};return(0,b.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,a.Z)("tabs",{"tabs--block":t},n),children:c.map((e=>{let{value:n,label:t,attributes:r}=e;return(0,b.jsx)("li",{role:"tab",tabIndex:s===n?0:-1,"aria-selected":s===n,ref:e=>i.push(e),onKeyDown:u,onClick:d,...r,className:(0,a.Z)("tabs__item",m.tabItem,r?.className,{"tabs__item--active":s===n}),children:t??n},n)}))})}function k(e){let{lazy:n,children:t,selectedValue:a}=e;const r=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){const e=r.find((e=>e.props.value===a));return e?(0,s.cloneElement)(e,{className:"margin-top--md"}):null}return(0,b.jsx)("div",{className:"margin-top--md",children:r.map(((e,n)=>(0,s.cloneElement)(e,{key:n,hidden:e.props.value!==a})))})}function v(e){const n=g(e);return(0,b.jsxs)("div",{className:(0,a.Z)("tabs-container",m.tabList),children:[(0,b.jsx)(j,{...e,...n}),(0,b.jsx)(k,{...e,...n})]})}function y(e){const n=(0,f.Z)();return(0,b.jsx)(v,{...e,children:u(e.children)},String(n))}},778:(e,n,t)=>{t.d(n,{Z:()=>s});const s=t.p+"assets/images/redux-test-1-a1382cd66041ed2c79ea9e4563623966.png"},4793:(e,n,t)=>{t.d(n,{Z:()=>s});const s=t.p+"assets/images/redux-test-2-f812b5e7f7217c1c0b5c7c8120bf8eb6.png"},5106:(e,n,t)=>{t.d(n,{Z:()=>s});const s=t.p+"assets/images/redux-test-3-cdcd86e43e2393a2b7c6f825c6d848c1.png"},7745:(e,n,t)=>{t.d(n,{Z:()=>s});const s=t.p+"assets/images/redux-test-4-c0a11ccdf63c7320a62ab9411386db28.png"}}]); \ No newline at end of file diff --git a/assets/js/06d8b529.194e9e80.js b/assets/js/06d8b529.194e9e80.js deleted file mode 100644 index 8f480d40..00000000 --- a/assets/js/06d8b529.194e9e80.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkflecks_docusaurus=self.webpackChunkflecks_docusaurus||[]).push([[9091],{2127:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>d,contentTitle:()=>i,default:()=>p,frontMatter:()=>o,metadata:()=>c,toc:()=>h});var t=s(5893),r=s(1151),a=s(3200),l=s(385);const o={title:"Database",description:"Define models and connect to a database."},i="Database",c={id:"database",title:"Database",description:"Define models and connect to a database.",source:"@site/docs/database.mdx",sourceDirName:".",slug:"/database",permalink:"/flecks/docs/database",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{title:"Database",description:"Define models and connect to a database."},sidebar:"flecksSidebar",previous:{title:"Environment Variables",permalink:"/flecks/docs/environment"},next:{title:"Docker",permalink:"/flecks/docs/docker"}},d={},h=[{value:"Install and configure",id:"install-and-configure",level:2},{value:"Your models",id:"your-models",level:2},{value:"Providing models with Flecks.provide()",id:"providing-models-with-flecksprovide",level:2},{value:"Working with models",id:"working-with-models",level:2},{value:"Persistence",id:"persistence",level:2},{value:"Containerization",id:"containerization",level:2},{value:"Production",id:"production",level:2}];function u(e){const n={a:"a",admonition:"admonition",blockquote:"blockquote",code:"code",em:"em",h1:"h1",h2:"h2",p:"p",pre:"pre",strong:"strong",...(0,r.a)(),...e.components},{Details:s}=n;return s||function(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h1,{id:"database",children:"Database"}),"\n",(0,t.jsxs)(n.p,{children:["flecks provides database connection through ",(0,t.jsx)(n.a,{href:"https://sequelize.org/",children:"Sequelize"})," and database\nserver instances through either flat SQLite databases or ",(0,t.jsx)(n.a,{href:"https://www.docker.com/",children:"Docker"}),"-ized\ndatabase servers."]}),"\n",(0,t.jsx)(n.h2,{id:"install-and-configure",children:"Install and configure"}),"\n",(0,t.jsx)(n.p,{children:"We'll start from scratch as an example. Create a new flecks application:"}),"\n",(0,t.jsx)(a.Z,{pkg:"db_test",type:"app"}),"\n",(0,t.jsxs)(n.p,{children:["Now in your new application directory, add ",(0,t.jsx)(n.code,{children:"@flecks/db"}),":"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"npx flecks add @flecks/db\n"})}),"\n",(0,t.jsxs)(n.p,{children:["Finally, ",(0,t.jsx)(n.code,{children:"npm start"})," your application and you will see lines like the following in the logs:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:" @flecks/db/server/connection config: { dialect: 'sqlite', storage: ':memory:' } +0ms\n @flecks/db/server/connection synchronizing... +107ms\n @flecks/db/server/connection synchronized +2ms\n"})}),"\n",(0,t.jsx)(n.p,{children:"By default, flecks will connect to an in-memory SQLite database to get you started instantly."}),"\n",(0,t.jsx)(n.h2,{id:"your-models",children:"Your models"}),"\n",(0,t.jsx)(n.p,{children:"Astute observers may have noticed a line preceding the ones earlier:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:" @flecks/core/flecks gathered '@flecks/db.models': [] +0ms\n"})}),"\n",(0,t.jsx)(n.p,{children:"Let's create a fleck that makes a model so we can get a feel for how it works."}),"\n",(0,t.jsx)(n.p,{children:"First, create a fleck in your application:"}),"\n",(0,t.jsx)(a.Z,{pkg:"content",type:"fleck"}),"\n",(0,t.jsxs)(n.p,{children:["Now, let's hop into ",(0,t.jsx)(n.code,{children:"packages/content/src/index.js"})," and add a hook implementation:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-javascript",metastring:'title="packages/content/src/index.js"',children:"export const hooks = {\n '@flecks/db.models': (flecks) => {\n const {Model, Types} = flecks.fleck('@flecks/db/server');\n class Content extends Model {\n static get attributes() {\n return {\n text: {\n type: Types.TEXT,\n allowNull: false,\n },\n };\n }\n };\n return {\n Content,\n };\n },\n}\n"})}),"\n",(0,t.jsxs)(n.p,{children:["Now, ",(0,t.jsx)(n.code,{children:"npm start"})," your application and you will see that line looks different:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:" @flecks/core/flecks gathered '@flecks/db.models': [ 'Content' ] +0ms\n"})}),"\n",(0,t.jsx)(n.p,{children:"Our model is recognized!"}),"\n",(0,t.jsx)(n.p,{children:"Let's add one more model and create an association between them:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-javascript",metastring:'title="packages/content/src/index.js"',children:"export const hooks = {\n '@flecks/db.models': (flecks) => {\n const {Model, Types} = flecks.fleck('@flecks/db/server');\n\n class Content extends Model {\n\n static get attributes() {\n return {\n text: {\n type: Types.TEXT,\n allowNull: false,\n },\n };\n }\n\n static associate({Tag}) {\n this.hasMany(Tag);\n }\n\n };\n\n class Tag extends Model {\n\n static get attributes() {\n return {\n value: {\n type: Types.STRING,\n allowNull: false,\n },\n };\n }\n\n static associate({Content}) {\n this.belongsTo(Content);\n }\n\n };\n return {\n Content,\n Tag,\n };\n },\n}\n"})}),"\n",(0,t.jsx)(n.admonition,{title:"Ess-Cue-Ell-ize",type:"tip",children:(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.code,{children:"@flecks/db"})," uses ",(0,t.jsx)(n.a,{href:"https://sequelize.org/",children:"Sequelize"})," under the hood. You can dive into\n",(0,t.jsx)(n.a,{href:"https://sequelize.org/docs/v6/getting-started/",children:"their documentation"})," to learn even more."]})}),"\n",(0,t.jsxs)(n.p,{children:["If you were to ",(0,t.jsx)(n.code,{children:"npm start"}),", you would see the line:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:" @flecks/core/flecks gathered '@flecks/db.models': [ 'Content', 'Tag' ] +0ms\n"})}),"\n",(0,t.jsxs)(n.h2,{id:"providing-models-with-flecksprovide",children:["Providing models with ",(0,t.jsx)(n.code,{children:"Flecks.provide()"})]}),"\n",(0,t.jsxs)(n.p,{children:["When building Real","\u2122\ufe0f"," applications we are usually going to need a bunch of models. If we add all\nof them into that one single file, things are going to start getting unwieldy. Let's create a\n",(0,t.jsx)(n.code,{children:"src/models"})," directory in our ",(0,t.jsx)(n.code,{children:"packages/content"})," fleck and add a ",(0,t.jsx)(n.code,{children:"content.js"})," and ",(0,t.jsx)(n.code,{children:"tag.js"})," source\nfiles with the following code:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-javascript",metastring:'title="packages/content/src/models/content.js"',children:"export default (flecks) => {\n const {Model, Types} = flecks.fleck('@flecks/db/server');\n return class Content extends Model {\n\n static get attributes() {\n return {\n text: {\n type: Types.TEXT,\n allowNull: false,\n },\n };\n }\n\n static associate({Tag}) {\n this.hasMany(Tag);\n }\n\n };\n};\n"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-javascript",metastring:'title="packages/content/src/models/tag.js"',children:"export default (flecks) => {\n const {Model, Types} = flecks.fleck('@flecks/db/server');\n return class Tag extends Model {\n\n static get attributes() {\n return {\n key: {\n type: Types.STRING,\n allowNull: false,\n },\n value: {\n type: Types.STRING,\n allowNull: false,\n },\n };\n }\n\n static associate({Content}) {\n this.hasMany(Content);\n }\n\n };\n\n};\n"})}),"\n",(0,t.jsx)(n.p,{children:"Notice that this looks very similar to how we defined the models above, but this time we're only\nreturning the classes."}),"\n",(0,t.jsxs)(n.p,{children:["Now, hop over to ",(0,t.jsx)(n.code,{children:"packages/content/src/index.js"})," and let's rewrite the hook implementation:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-javascript",metastring:'title="packages/content/src/index.js"',children:"import {Flecks} from '@flecks/core/server';\n\nexport const hooks = {\n '@flecks/db.models': Flecks.provide(require.context('./models')),\n}\n"})}),"\n",(0,t.jsxs)(n.p,{children:["We're passing the path to our models directory to ",(0,t.jsx)(n.code,{children:"require.context"})," which is then passed to\n",(0,t.jsx)(n.code,{children:"Flecks.provide"}),". This is completely equivalent to our original code, but now we can add more\nmodels by adding individual files in ",(0,t.jsx)(n.code,{children:"packages/content/src/models"})," and keep things tidy."]}),"\n",(0,t.jsx)(n.admonition,{title:"Continue gathering knowledge",type:"info",children:(0,t.jsxs)(n.p,{children:["For a more detailed treatment of gathering and providing in flecks, see\n",(0,t.jsx)(n.a,{href:"./gathering",children:"the gathering guide"}),"."]})}),"\n",(0,t.jsx)(n.h2,{id:"working-with-models",children:"Working with models"}),"\n",(0,t.jsxs)(n.p,{children:["Let's do something with them. Edit ",(0,t.jsx)(n.code,{children:"packages/content/src/index.js"})," again like\nso:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-javascript",metastring:'title="packages/content/src/index.js"',children:"import {Flecks} from '@flecks/core/server';\n\nexport const hooks = {\n // highlight-start\n '@flecks/server.up': Flecks.priority(\n async (flecks) => {\n const {Content, Tag} = flecks.db.Models;\n console.log(\n 'There were',\n await Content.count(), 'pieces of content',\n 'and',\n await Tag.count(), 'tags.',\n );\n },\n {after: '@flecks/db/server'},\n ),\n // highlight-end\n '@flecks/db.models': Flecks.provide(require.context('./models')),\n}\n"})}),"\n",(0,t.jsxs)(n.p,{children:["We use ",(0,t.jsx)(n.a,{href:"./ordering#fleckspriority",children:(0,t.jsx)(n.code,{children:"Flecks.priority"})})," so that the database comes up before we try to use it."]}),"\n",(0,t.jsxs)(n.p,{children:["Now, another ",(0,t.jsx)(n.code,{children:"npm start"})," will greet us with this line in the output:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"There were 0 pieces of content and 0 tags.\n"})}),"\n",(0,t.jsx)(n.p,{children:"Not very interesting. Let's add some, but only if there aren't any yet:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-javascript",metastring:'title="packages/content/src/index.js"',children:"export const hooks = {\n '@flecks/server.up': async (flecks) => {\n const {Tag} = flecks.db.Models;\n console.log(\n 'There were',\n await Content.count(), 'pieces of content',\n 'and',\n await Tag.count(), 'tags.',\n );\n // highlight-start\n if (0 === await Content.count()) {\n await Content.create(\n {text: 'lorem ipsum', Tags: [{value: 'cool'}, {value: 'trending'}]},\n {include: [Tag]}\n );\n await Content.create(\n {text: 'blah blah', Tags: [{value: 'awesome'}]},\n {include: [Tag]}\n );\n }\n console.log(\n 'There are',\n await Content.count(), 'pieces of content',\n 'and',\n await Tag.count(), 'tags.',\n );\n // highlight-end\n },\n '@flecks/db.models': Flecks.provide(require.context('./models')),\n}\n"})}),"\n",(0,t.jsxs)(n.p,{children:["Another ",(0,t.jsx)(n.code,{children:"npm start"})," and we see:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"There were 0 pieces of content and 0 tags.\nThere are 2 pieces of content and 3 tags.\n"})}),"\n",(0,t.jsx)(n.p,{children:"Great!"}),"\n",(0,t.jsx)(n.h2,{id:"persistence",children:"Persistence"}),"\n",(0,t.jsx)(n.p,{children:"You'll notice that if you run it again, it will always say"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"There were 0 pieces of content and 0 tags.\nThere are 2 pieces of content and 3 tags.\n"})}),"\n",(0,t.jsx)(n.p,{children:"What's up with that? Remember in the beginning:"}),"\n",(0,t.jsxs)(n.blockquote,{children:["\n",(0,t.jsx)(n.p,{children:"By default, flecks will connect to an in-memory SQLite database to get you started instantly."}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["This means that the database will only persist as long as the life of your application. When you\nrestart it, you'll get a fresh new database every time. It was ",(0,t.jsx)(n.strong,{children:"quick to get started"})," developing,\nbut this isn't very helpful for any real purpose. Let's make a change to our ",(0,t.jsx)(n.code,{children:"build/flecks.yml"}),":"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-yml",metastring:'title="build/flecks.yml"',children:"'@db_test/content:./packages/content': {}\n'@flecks/build': {}\n'@flecks/core':\n id: db_test\n// highlight-start\n'@flecks/db':\n database: './persistent.sql'\n// highlight-end\n'@flecks/server': {}\n"})}),"\n",(0,t.jsxs)(n.p,{children:["Now ",(0,t.jsx)(n.code,{children:"npm start"})," again. You'll see our old familiar message:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"There were 0 pieces of content and 0 tags.\nThere are 2 pieces of content and 3 tags.\n"})}),"\n",(0,t.jsxs)(n.p,{children:["This time though, our application wrote the SQLite database to disk at ",(0,t.jsx)(n.code,{children:"./persistent.sql"}),". If we\ngive it one more go, we'll finally see what we expect:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"There were 2 pieces of content and 3 tags.\nThere are 2 pieces of content and 3 tags.\n"})}),"\n",(0,t.jsx)(n.p,{children:"A persistent database!"}),"\n",(0,t.jsx)(n.h2,{id:"containerization",children:"Containerization"}),"\n",(0,t.jsxs)(n.p,{children:["Sure, our database is persistent... kinda. That ",(0,t.jsx)(n.code,{children:"persistent.sql"})," file is a bit of a kludge and\nisn't much of a long-term (or production) solution. Let's remove it:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"rm persistent.sql\n"})}),"\n",(0,t.jsxs)(n.p,{children:["Our small-core philosophy means that you don't pay for spinning up a database by default. However,\nit's trivial to accomplish a ",(0,t.jsx)(n.em,{children:'"real"'})," database connection if you have Docker installed on your\nmachine."]}),"\n",(0,t.jsxs)(s,{children:[(0,t.jsx)("summary",{children:"How do I know if I have Docker running on my machine?"}),(0,t.jsx)(n.p,{children:"A decent way to test if your machine is ready to continue with this guide is to run the following\ncommand:"}),(0,t.jsx)(n.p,{children:(0,t.jsx)(n.code,{children:"docker run -e POSTGRES_PASSWORD=password postgres"})}),(0,t.jsx)(n.p,{children:"if the command appears to spin up a database, you're in good shape!"}),(0,t.jsxs)(n.p,{children:["If not, follow the ",(0,t.jsx)(n.a,{href:"https://docs.docker.com/engine/install/",children:"Docker installation documentation"}),"\nbefore proceeding."]})]}),"\n",(0,t.jsx)(n.p,{children:"Let's add another fleck to our project:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"npx flecks add -d @flecks/docker\n"})}),"\n",(0,t.jsxs)(n.p,{children:["Configure ",(0,t.jsx)(n.code,{children:"build/flecks.yml"}),":"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-yml",metastring:'title="build/flecks.yml"',children:"'@db_test/content:./packages/content': {}\n'@flecks/build': {}\n'@flecks/core':\n id: db_test\n// highlight-start\n'@flecks/db':\n database: db\n dialect: postgres\n password: THIS_PASSWORD_IS_UNSAFE\n username: postgres\n// highlight-end\n'@flecks/docker': {}\n'@flecks/server': {}\n"})}),"\n",(0,t.jsxs)(n.p,{children:["Now ",(0,t.jsx)(n.code,{children:"npm start"})," will reveal the following message in the logs:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:" @flecks/server/entry Error: Please install pg package manually\n"})}),"\n",(0,t.jsx)(n.p,{children:"Pretty straightforward how to proceed:"}),"\n",(0,t.jsx)(l.Z,{pkg:"pg"}),"\n",(0,t.jsxs)(n.p,{children:["Remember, ",(0,t.jsx)(n.strong,{children:"small core"}),"! ","\ud83d\ude04"," Now ",(0,t.jsx)(n.code,{children:"npm start"})," again and you will see some new lines in the\nlogs:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:" @flecks/docker/container creating datadir '/tmp/flecks/flecks/docker/sequelize' +0ms\n @flecks/docker/container launching: docker run --name flecks_sequelize -d --rm -p 5432:5432 -e POSTGRES_USER=... -e POSTGRES_DB=... -e POSTGRES_PASSWORD=... -v /tmp/flecks/flecks/docker/sequelize:/var/lib/postgresql/data postgres +0ms\n @flecks/docker/container 'sequelize' started +372ms\n @flecks/db/server/connection config: { database: 'db', dialect: 'postgres', host: undefined, password: '*** REDACTED ***', port: undefined, username: 'postgres' } +0ms\n @flecks/db/server/connection synchronizing... +2s\n @flecks/db/server/connection synchronized +3ms\n"})}),"\n",(0,t.jsx)(n.p,{children:"and of course, we see:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"There were 0 tags.\nThere are 2 tags.\n"})}),"\n",(0,t.jsxs)(n.p,{children:["because we just created a new postgres database from scratch just then! Kill the application and\nrun ",(0,t.jsx)(n.code,{children:"npm start"})," one more time and then you will see what you expect:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"There were 2 tags.\nThere are 2 tags.\n"})}),"\n",(0,t.jsx)(n.p,{children:"Awesome, we have a connection to a real postgres database!"}),"\n",(0,t.jsx)(n.h2,{id:"production",children:"Production"}),"\n",(0,t.jsx)(n.p,{children:"Sure, spinning up a database like magic is spiffy for development, but you probably want to be a\nlittle less freewheeling on your production server."}),"\n",(0,t.jsx)(n.p,{children:"Build the application we've built so far:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"npm run build\n"})}),"\n",(0,t.jsxs)(n.p,{children:["Then, take a look in the ",(0,t.jsx)(n.code,{children:"dist/server"})," directory. You'll see a file there called\n",(0,t.jsx)(n.code,{children:"docker-compose.yml"}),". ",(0,t.jsx)(n.code,{children:"@flecks/docker"})," automatically emits this file when you build your\napplication for production to make container orchestration easier. Let's take a look:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-yml",metastring:'title="dist/server/docker-compose.yml"',children:"version: '3'\nservices:\n flecks_app:\n build:\n context: ..\n dockerfile: dist/server/Dockerfile\n environment:\n FLECKS_ENV__flecks_docker_server__enabled: 'false'\n // highlight-next-line\n FLECKS_ENV__flecks_db_server__host: sequelize\n volumes:\n - ../node_modules:/var/www/node_modules\n // highlight-start\n sequelize:\n image: postgres\n environment:\n POSTGRES_USER: postgres\n POSTGRES_DB: db\n POSTGRES_PASSWORD: THIS_PASSWORD_IS_UNSAFE\n // highlight-end\n"})}),"\n",(0,t.jsx)(n.p,{children:"Notice our database container is included and already prepopulated with the configuration we\nspecified!"}),"\n",(0,t.jsxs)(n.p,{children:["You can run (after you ",(0,t.jsx)(n.a,{href:"https://docs.docker.com/compose/install/",children:"install Docker Compose"})," if\nnecessary):"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"docker-compose -f dist/server/docker-compose.yml up\n"})}),"\n",(0,t.jsx)(n.p,{children:"This demonstrates that your application is now being orchestrated by Docker Compose and is\nchugging right along!"})]})}function p(e={}){const{wrapper:n}={...(0,r.a)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(u,{...e})}):u(e)}},3200:(e,n,s)=>{s.d(n,{Z:()=>o});var t=s(9286),r=s(4866),a=s(5162),l=s(5893);function o(e){let{pkg:n,type:s}=e;return(0,l.jsxs)(r.Z,{children:[(0,l.jsx)(a.Z,{value:"npm",label:"npm",children:(0,l.jsxs)(t.Z,{language:"bash",children:["npm init @flecks/",s," ",n]})}),(0,l.jsx)(a.Z,{value:"yarn",label:"Yarn",children:(0,l.jsxs)(t.Z,{language:"bash",children:["yarn create @flecks/",s," ",n]})}),(0,l.jsx)(a.Z,{value:"bun",label:"Bun",children:(0,l.jsxs)(t.Z,{language:"bash",children:["bun create @flecks/",s," ",n]})})]})}},385:(e,n,s)=>{s.d(n,{Z:()=>o});var t=s(9286),r=s(4866),a=s(5162),l=s(5893);function o(e){let{pkg:n}=e;return(0,l.jsxs)(r.Z,{children:[(0,l.jsx)(a.Z,{value:"npm",label:"npm",children:(0,l.jsxs)(t.Z,{language:"bash",children:["npm install ",n]})}),(0,l.jsx)(a.Z,{value:"yarn",label:"Yarn",children:(0,l.jsxs)(t.Z,{language:"bash",children:["yarn add ",n]})}),(0,l.jsx)(a.Z,{value:"bun",label:"Bun",children:(0,l.jsxs)(t.Z,{language:"bash",children:["bun install ",n]})})]})}},5162:(e,n,s)=>{s.d(n,{Z:()=>l});s(7294);var t=s(512);const r={tabItem:"tabItem_Ymn6"};var a=s(5893);function l(e){let{children:n,hidden:s,className:l}=e;return(0,a.jsx)("div",{role:"tabpanel",className:(0,t.Z)(r.tabItem,l),hidden:s,children:n})}},4866:(e,n,s)=>{s.d(n,{Z:()=>y});var t=s(7294),r=s(512),a=s(2466),l=s(6550),o=s(469),i=s(1980),c=s(7392),d=s(12);function h(e){return t.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,t.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function u(e){const{values:n,children:s}=e;return(0,t.useMemo)((()=>{const e=n??function(e){return h(e).map((e=>{let{props:{value:n,label:s,attributes:t,default:r}}=e;return{value:n,label:s,attributes:t,default:r}}))}(s);return function(e){const n=(0,c.l)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,s])}function p(e){let{value:n,tabValues:s}=e;return s.some((e=>e.value===n))}function g(e){let{queryString:n=!1,groupId:s}=e;const r=(0,l.k6)(),a=function(e){let{queryString:n=!1,groupId:s}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!s)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return s??null}({queryString:n,groupId:s});return[(0,i._X)(a),(0,t.useCallback)((e=>{if(!a)return;const n=new URLSearchParams(r.location.search);n.set(a,e),r.replace({...r.location,search:n.toString()})}),[a,r])]}function f(e){const{defaultValue:n,queryString:s=!1,groupId:r}=e,a=u(e),[l,i]=(0,t.useState)((()=>function(e){let{defaultValue:n,tabValues:s}=e;if(0===s.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!p({value:n,tabValues:s}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${s.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const t=s.find((e=>e.default))??s[0];if(!t)throw new Error("Unexpected error: 0 tabValues");return t.value}({defaultValue:n,tabValues:a}))),[c,h]=g({queryString:s,groupId:r}),[f,m]=function(e){let{groupId:n}=e;const s=function(e){return e?`docusaurus.tab.${e}`:null}(n),[r,a]=(0,d.Nk)(s);return[r,(0,t.useCallback)((e=>{s&&a.set(e)}),[s,a])]}({groupId:r}),x=(()=>{const e=c??f;return p({value:e,tabValues:a})?e:null})();(0,o.Z)((()=>{x&&i(x)}),[x]);return{selectedValue:l,selectValue:(0,t.useCallback)((e=>{if(!p({value:e,tabValues:a}))throw new Error(`Can't select invalid tab value=${e}`);i(e),h(e),m(e)}),[h,m,a]),tabValues:a}}var m=s(2389);const x={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var j=s(5893);function k(e){let{className:n,block:s,selectedValue:t,selectValue:l,tabValues:o}=e;const i=[],{blockElementScrollPositionUntilNextRender:c}=(0,a.o5)(),d=e=>{const n=e.currentTarget,s=i.indexOf(n),r=o[s].value;r!==t&&(c(n),l(r))},h=e=>{let n=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const s=i.indexOf(e.currentTarget)+1;n=i[s]??i[0];break}case"ArrowLeft":{const s=i.indexOf(e.currentTarget)-1;n=i[s]??i[i.length-1];break}}n?.focus()};return(0,j.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,r.Z)("tabs",{"tabs--block":s},n),children:o.map((e=>{let{value:n,label:s,attributes:a}=e;return(0,j.jsx)("li",{role:"tab",tabIndex:t===n?0:-1,"aria-selected":t===n,ref:e=>i.push(e),onKeyDown:h,onClick:d,...a,className:(0,r.Z)("tabs__item",x.tabItem,a?.className,{"tabs__item--active":t===n}),children:s??n},n)}))})}function b(e){let{lazy:n,children:s,selectedValue:r}=e;const a=(Array.isArray(s)?s:[s]).filter(Boolean);if(n){const e=a.find((e=>e.props.value===r));return e?(0,t.cloneElement)(e,{className:"margin-top--md"}):null}return(0,j.jsx)("div",{className:"margin-top--md",children:a.map(((e,n)=>(0,t.cloneElement)(e,{key:n,hidden:e.props.value!==r})))})}function v(e){const n=f(e);return(0,j.jsxs)("div",{className:(0,r.Z)("tabs-container",x.tabList),children:[(0,j.jsx)(k,{...e,...n}),(0,j.jsx)(b,{...e,...n})]})}function y(e){const n=(0,m.Z)();return(0,j.jsx)(v,{...e,children:h(e.children)},String(n))}}}]); \ No newline at end of file diff --git a/assets/js/06d8b529.721c7e52.js b/assets/js/06d8b529.721c7e52.js new file mode 100644 index 00000000..30422c80 --- /dev/null +++ b/assets/js/06d8b529.721c7e52.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkflecks_docusaurus=self.webpackChunkflecks_docusaurus||[]).push([[9091],{2127:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>u,contentTitle:()=>d,default:()=>m,frontMatter:()=>c,metadata:()=>h,toc:()=>p});var t=s(5893),a=s(1151),r=s(3200),l=s(4283),i=s(385),o=s(6569);const c={title:"Database",description:"Define models and connect to a database."},d="Database",h={id:"database",title:"Database",description:"Define models and connect to a database.",source:"@site/docs/database.mdx",sourceDirName:".",slug:"/database",permalink:"/flecks/docs/database",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{title:"Database",description:"Define models and connect to a database."},sidebar:"flecksSidebar",previous:{title:"Environment Variables",permalink:"/flecks/docs/environment"},next:{title:"Docker",permalink:"/flecks/docs/docker"}},u={},p=[{value:"Install and configure",id:"install-and-configure",level:2},{value:"Your models",id:"your-models",level:2},{value:"Providing models with Flecks.provide()",id:"providing-models-with-flecksprovide",level:2},{value:"Working with models",id:"working-with-models",level:2},{value:"Persistence",id:"persistence",level:2},{value:"Containerization",id:"containerization",level:2},{value:"Production",id:"production",level:2}];function g(e){const n={a:"a",admonition:"admonition",blockquote:"blockquote",code:"code",em:"em",h1:"h1",h2:"h2",p:"p",pre:"pre",strong:"strong",...(0,a.a)(),...e.components},{Details:s}=n;return s||function(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h1,{id:"database",children:"Database"}),"\n",(0,t.jsxs)(n.p,{children:["flecks provides database connection through ",(0,t.jsx)(n.a,{href:"https://sequelize.org/",children:"Sequelize"})," and database\nserver instances through either flat SQLite databases or ",(0,t.jsx)(n.a,{href:"https://www.docker.com/",children:"Docker"}),"-ized\ndatabase servers."]}),"\n",(0,t.jsx)(n.h2,{id:"install-and-configure",children:"Install and configure"}),"\n",(0,t.jsx)(n.p,{children:"We'll start from scratch as an example. Create a new flecks application:"}),"\n",(0,t.jsx)(r.Z,{pkg:"db_test",type:"app"}),"\n",(0,t.jsxs)(n.p,{children:["Now in your new application directory, add ",(0,t.jsx)(n.code,{children:"@flecks/db"}),":"]}),"\n",(0,t.jsx)(l.Z,{headless:!0,cmd:"flecks add @flecks/db"}),"\n",(0,t.jsx)(n.p,{children:"Finally,"}),"\n",(0,t.jsx)(o.Z,{headless:!0,cmd:"start"}),"\n",(0,t.jsx)(n.p,{children:"You will see lines like the following in the logs:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:" @flecks/db/server/connection config: { dialect: 'sqlite', storage: ':memory:' } +0ms\n @flecks/db/server/connection synchronizing... +107ms\n @flecks/db/server/connection synchronized +2ms\n"})}),"\n",(0,t.jsx)(n.p,{children:"By default, flecks will connect to an in-memory SQLite database to get you started instantly."}),"\n",(0,t.jsx)(n.h2,{id:"your-models",children:"Your models"}),"\n",(0,t.jsx)(n.p,{children:"Astute observers may have noticed a line preceding the ones earlier:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:" @flecks/core/flecks gathered '@flecks/db.models': [] +0ms\n"})}),"\n",(0,t.jsx)(n.p,{children:"Let's create a fleck that makes a model so we can get a feel for how it works."}),"\n",(0,t.jsx)(n.p,{children:"First, create a fleck in your application:"}),"\n",(0,t.jsx)(r.Z,{pkg:"content",type:"fleck"}),"\n",(0,t.jsxs)(n.p,{children:["Now, let's hop into ",(0,t.jsx)(n.code,{children:"packages/content/src/index.js"})," and add a hook implementation:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-javascript",metastring:'title="packages/content/src/index.js"',children:"export const hooks = {\n '@flecks/db.models': (flecks) => {\n const {Model, Types} = flecks.fleck('@flecks/db/server');\n class Content extends Model {\n static get attributes() {\n return {\n text: {\n type: Types.TEXT,\n allowNull: false,\n },\n };\n }\n };\n return {\n Content,\n };\n },\n}\n"})}),"\n",(0,t.jsx)(n.p,{children:"Now,"}),"\n",(0,t.jsx)(o.Z,{headless:!0,cmd:"start"}),"\n",(0,t.jsx)(n.p,{children:"You will see that line looks different:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:" @flecks/core/flecks gathered '@flecks/db.models': [ 'Content' ] +0ms\n"})}),"\n",(0,t.jsx)(n.p,{children:"Our model is recognized!"}),"\n",(0,t.jsx)(n.p,{children:"Let's add one more model and create an association between them:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-javascript",metastring:'title="packages/content/src/index.js"',children:"export const hooks = {\n '@flecks/db.models': (flecks) => {\n const {Model, Types} = flecks.fleck('@flecks/db/server');\n\n class Content extends Model {\n\n static get attributes() {\n return {\n text: {\n type: Types.TEXT,\n allowNull: false,\n },\n };\n }\n\n static associate({Tag}) {\n this.hasMany(Tag);\n }\n\n };\n\n class Tag extends Model {\n\n static get attributes() {\n return {\n value: {\n type: Types.STRING,\n allowNull: false,\n },\n };\n }\n\n static associate({Content}) {\n this.belongsTo(Content);\n }\n\n };\n return {\n Content,\n Tag,\n };\n },\n}\n"})}),"\n",(0,t.jsx)(n.admonition,{title:"Ess-Cue-Ell-ize",type:"tip",children:(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.code,{children:"@flecks/db"})," uses ",(0,t.jsx)(n.a,{href:"https://sequelize.org/",children:"Sequelize"})," under the hood. You can dive into\n",(0,t.jsx)(n.a,{href:"https://sequelize.org/docs/v6/getting-started/",children:"their documentation"})," to learn even more."]})}),"\n",(0,t.jsx)(n.p,{children:"If you were to"}),"\n",(0,t.jsx)(o.Z,{headless:!0,cmd:"start"}),"\n",(0,t.jsx)(n.p,{children:"You would see the line:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:" @flecks/core/flecks gathered '@flecks/db.models': [ 'Content', 'Tag' ] +0ms\n"})}),"\n",(0,t.jsxs)(n.h2,{id:"providing-models-with-flecksprovide",children:["Providing models with ",(0,t.jsx)(n.code,{children:"Flecks.provide()"})]}),"\n",(0,t.jsxs)(n.p,{children:["When building Real","\u2122\ufe0f"," applications we are usually going to need a bunch of models. If we add all\nof them into that one single file, things are going to start getting unwieldy. Let's create a\n",(0,t.jsx)(n.code,{children:"src/models"})," directory in our ",(0,t.jsx)(n.code,{children:"packages/content"})," fleck and add a ",(0,t.jsx)(n.code,{children:"content.js"})," and ",(0,t.jsx)(n.code,{children:"tag.js"})," source\nfiles with the following code:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-javascript",metastring:'title="packages/content/src/models/content.js"',children:"export default (flecks) => {\n const {Model, Types} = flecks.fleck('@flecks/db/server');\n return class Content extends Model {\n\n static get attributes() {\n return {\n text: {\n type: Types.TEXT,\n allowNull: false,\n },\n };\n }\n\n static associate({Tag}) {\n this.hasMany(Tag);\n }\n\n };\n};\n"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-javascript",metastring:'title="packages/content/src/models/tag.js"',children:"export default (flecks) => {\n const {Model, Types} = flecks.fleck('@flecks/db/server');\n return class Tag extends Model {\n\n static get attributes() {\n return {\n key: {\n type: Types.STRING,\n allowNull: false,\n },\n value: {\n type: Types.STRING,\n allowNull: false,\n },\n };\n }\n\n static associate({Content}) {\n this.hasMany(Content);\n }\n\n };\n\n};\n"})}),"\n",(0,t.jsx)(n.p,{children:"Notice that this looks very similar to how we defined the models above, but this time we're only\nreturning the classes."}),"\n",(0,t.jsxs)(n.p,{children:["Now, hop over to ",(0,t.jsx)(n.code,{children:"packages/content/src/index.js"})," and let's rewrite the hook implementation:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-javascript",metastring:'title="packages/content/src/index.js"',children:"import {Flecks} from '@flecks/core/server';\n\nexport const hooks = {\n '@flecks/db.models': Flecks.provide(require.context('./models')),\n}\n"})}),"\n",(0,t.jsxs)(n.p,{children:["We're passing the path to our models directory to ",(0,t.jsx)(n.code,{children:"require.context"})," which is then passed to\n",(0,t.jsx)(n.code,{children:"Flecks.provide"}),". This is completely equivalent to our original code, but now we can add more\nmodels by adding individual files in ",(0,t.jsx)(n.code,{children:"packages/content/src/models"})," and keep things tidy."]}),"\n",(0,t.jsx)(n.admonition,{title:"Continue gathering knowledge",type:"info",children:(0,t.jsxs)(n.p,{children:["For a more detailed treatment of gathering and providing in flecks, see\n",(0,t.jsx)(n.a,{href:"./gathering",children:"the gathering guide"}),"."]})}),"\n",(0,t.jsx)(n.h2,{id:"working-with-models",children:"Working with models"}),"\n",(0,t.jsxs)(n.p,{children:["Let's do something with them. Edit ",(0,t.jsx)(n.code,{children:"packages/content/src/index.js"})," again like\nso:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-javascript",metastring:'title="packages/content/src/index.js"',children:"import {Flecks} from '@flecks/core/server';\n\nexport const hooks = {\n // highlight-start\n '@flecks/server.up': Flecks.priority(\n async (flecks) => {\n const {Content, Tag} = flecks.db.Models;\n console.log(\n 'There were',\n await Content.count(), 'pieces of content',\n 'and',\n await Tag.count(), 'tags.',\n );\n },\n {after: '@flecks/db/server'},\n ),\n // highlight-end\n '@flecks/db.models': Flecks.provide(require.context('./models')),\n}\n"})}),"\n",(0,t.jsxs)(n.p,{children:["We use ",(0,t.jsx)(n.a,{href:"./ordering#fleckspriority",children:(0,t.jsx)(n.code,{children:"Flecks.priority"})})," so that the database comes up before we try to use it."]}),"\n",(0,t.jsx)(n.p,{children:"Now, another"}),"\n",(0,t.jsx)(o.Z,{headless:!0,cmd:"start"}),"\n",(0,t.jsx)(n.p,{children:"You will find this line in the output:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"There were 0 pieces of content and 0 tags.\n"})}),"\n",(0,t.jsx)(n.p,{children:"Not very interesting. Let's add some, but only if there aren't any yet:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-javascript",metastring:'title="packages/content/src/index.js"',children:"export const hooks = {\n '@flecks/server.up': async (flecks) => {\n const {Tag} = flecks.db.Models;\n console.log(\n 'There were',\n await Content.count(), 'pieces of content',\n 'and',\n await Tag.count(), 'tags.',\n );\n // highlight-start\n if (0 === await Content.count()) {\n await Content.create(\n {text: 'lorem ipsum', Tags: [{value: 'cool'}, {value: 'trending'}]},\n {include: [Tag]}\n );\n await Content.create(\n {text: 'blah blah', Tags: [{value: 'awesome'}]},\n {include: [Tag]}\n );\n }\n console.log(\n 'There are',\n await Content.count(), 'pieces of content',\n 'and',\n await Tag.count(), 'tags.',\n );\n // highlight-end\n },\n '@flecks/db.models': Flecks.provide(require.context('./models')),\n}\n"})}),"\n",(0,t.jsx)(n.p,{children:"Another"}),"\n",(0,t.jsx)(o.Z,{headless:!0,cmd:"start"}),"\n",(0,t.jsx)(n.p,{children:"You will see:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"There were 0 pieces of content and 0 tags.\nThere are 2 pieces of content and 3 tags.\n"})}),"\n",(0,t.jsx)(n.p,{children:"Great!"}),"\n",(0,t.jsx)(n.h2,{id:"persistence",children:"Persistence"}),"\n",(0,t.jsx)(n.p,{children:"You'll notice that if you run it again, it will always say"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"There were 0 pieces of content and 0 tags.\nThere are 2 pieces of content and 3 tags.\n"})}),"\n",(0,t.jsx)(n.p,{children:"What's up with that? Remember in the beginning:"}),"\n",(0,t.jsxs)(n.blockquote,{children:["\n",(0,t.jsx)(n.p,{children:"By default, flecks will connect to an in-memory SQLite database to get you started instantly."}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["This means that the database will only persist as long as the life of your application. When you\nrestart it, you'll get a fresh new database every time. It was ",(0,t.jsx)(n.strong,{children:"quick to get started"})," developing,\nbut this isn't very helpful for any real purpose. Let's make a change to our ",(0,t.jsx)(n.code,{children:"build/flecks.yml"}),":"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-yml",metastring:'title="build/flecks.yml"',children:"'@db_test/content:./packages/content': {}\n'@flecks/build': {}\n'@flecks/core':\n id: db_test\n// highlight-start\n'@flecks/db':\n database: './persistent.sql'\n// highlight-end\n'@flecks/server': {}\n"})}),"\n",(0,t.jsx)(n.p,{children:"Once again,"}),"\n",(0,t.jsx)(o.Z,{headless:!0,cmd:"start"}),"\n",(0,t.jsx)(n.p,{children:"You'll see our old familiar message:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"There were 0 pieces of content and 0 tags.\nThere are 2 pieces of content and 3 tags.\n"})}),"\n",(0,t.jsxs)(n.p,{children:["This time though, our application wrote the SQLite database to disk at ",(0,t.jsx)(n.code,{children:"./persistent.sql"}),". If we\ngive it one more go, we'll finally see what we expect:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"There were 2 pieces of content and 3 tags.\nThere are 2 pieces of content and 3 tags.\n"})}),"\n",(0,t.jsx)(n.p,{children:"A persistent database!"}),"\n",(0,t.jsx)(n.h2,{id:"containerization",children:"Containerization"}),"\n",(0,t.jsxs)(n.p,{children:["Sure, our database is persistent... kinda. That ",(0,t.jsx)(n.code,{children:"persistent.sql"})," file is a bit of a kludge and\nisn't much of a long-term (or production) solution. Let's remove it:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"rm persistent.sql\n"})}),"\n",(0,t.jsxs)(n.p,{children:["Our small-core philosophy means that you don't pay for spinning up a database by default. However,\nit's trivial to accomplish a ",(0,t.jsx)(n.em,{children:'"real"'})," database connection if you have Docker installed on your\nmachine."]}),"\n",(0,t.jsxs)(s,{children:[(0,t.jsx)("summary",{children:"How do I know if I have Docker running on my machine?"}),(0,t.jsx)(n.p,{children:"A decent way to test if your machine is ready to continue with this guide is to run the following\ncommand:"}),(0,t.jsx)(n.p,{children:(0,t.jsx)(n.code,{children:"docker run -e POSTGRES_PASSWORD=password postgres"})}),(0,t.jsx)(n.p,{children:"if the command appears to spin up a database, you're in good shape!"}),(0,t.jsxs)(n.p,{children:["If not, follow the ",(0,t.jsx)(n.a,{href:"https://docs.docker.com/engine/install/",children:"Docker installation documentation"}),"\nbefore proceeding."]})]}),"\n",(0,t.jsx)(n.p,{children:"Let's add another fleck to our project:"}),"\n",(0,t.jsx)(l.Z,{cmd:"flecks add -d @flecks/docker"}),"\n",(0,t.jsxs)(n.p,{children:["Configure ",(0,t.jsx)(n.code,{children:"build/flecks.yml"}),":"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-yml",metastring:'title="build/flecks.yml"',children:"'@db_test/content:./packages/content': {}\n'@flecks/build': {}\n'@flecks/core':\n id: db_test\n// highlight-start\n'@flecks/db':\n database: db\n dialect: postgres\n password: THIS_PASSWORD_IS_UNSAFE\n username: postgres\n// highlight-end\n'@flecks/docker': {}\n'@flecks/server': {}\n"})}),"\n",(0,t.jsx)(n.p,{children:"Now,"}),"\n",(0,t.jsx)(o.Z,{headless:!0,cmd:"start"}),"\n",(0,t.jsx)(n.p,{children:"You will find the following message in the logs:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:" @flecks/server/entry Error: Please install pg package manually\n"})}),"\n",(0,t.jsx)(n.p,{children:"Pretty straightforward how to proceed:"}),"\n",(0,t.jsx)(i.Z,{headless:!0,pkg:"pg"}),"\n",(0,t.jsxs)(n.p,{children:["Remember, ",(0,t.jsx)(n.strong,{children:"small core"}),"! ","\ud83d\ude04"," Now,"]}),"\n",(0,t.jsx)(o.Z,{headless:!0,cmd:"start"}),"\n",(0,t.jsx)(n.p,{children:"You will see some new lines in the logs:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:" @flecks/docker/container creating datadir '/tmp/flecks/flecks/docker/sequelize' +0ms\n @flecks/docker/container launching: docker run --name flecks_sequelize -d --rm -p 5432:5432 -e POSTGRES_USER=... -e POSTGRES_DB=... -e POSTGRES_PASSWORD=... -v /tmp/flecks/flecks/docker/sequelize:/var/lib/postgresql/data postgres +0ms\n @flecks/docker/container 'sequelize' started +372ms\n @flecks/db/server/connection config: { database: 'db', dialect: 'postgres', host: undefined, password: '*** REDACTED ***', port: undefined, username: 'postgres' } +0ms\n @flecks/db/server/connection synchronizing... +2s\n @flecks/db/server/connection synchronized +3ms\n"})}),"\n",(0,t.jsx)(n.p,{children:"and of course, we see:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"There were 0 tags.\nThere are 2 tags.\n"})}),"\n",(0,t.jsx)(n.p,{children:"because we just created a new postgres database from scratch just then! Kill the application and"}),"\n",(0,t.jsx)(o.Z,{headless:!0,cmd:"start"}),"\n",(0,t.jsx)(n.p,{children:"You will see what you expect:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"There were 2 tags.\nThere are 2 tags.\n"})}),"\n",(0,t.jsx)(n.p,{children:"Awesome, we have a connection to a real postgres database!"}),"\n",(0,t.jsx)(n.h2,{id:"production",children:"Production"}),"\n",(0,t.jsx)(n.p,{children:"Sure, spinning up a database like magic is spiffy for development, but you probably want to be a\nlittle less freewheeling on your production server."}),"\n",(0,t.jsx)(o.Z,{headless:!0,cmd:"build",children:(0,t.jsx)(n.p,{children:"Build the application we've built so far:"})}),"\n",(0,t.jsxs)(n.p,{children:["Then, take a look in the ",(0,t.jsx)(n.code,{children:"dist/server"})," directory. You'll see a file there called\n",(0,t.jsx)(n.code,{children:"docker-compose.yml"}),". ",(0,t.jsx)(n.code,{children:"@flecks/docker"})," automatically emits this file when you build your\napplication for production to make container orchestration easier. Let's take a look:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-yml",metastring:'title="dist/server/docker-compose.yml"',children:"version: '3'\nservices:\n flecks_app:\n build:\n context: ..\n dockerfile: dist/server/Dockerfile\n environment:\n FLECKS_ENV__flecks_docker_server__enabled: 'false'\n // highlight-next-line\n FLECKS_ENV__flecks_db_server__host: sequelize\n volumes:\n - ../node_modules:/var/www/node_modules\n // highlight-start\n sequelize:\n image: postgres\n environment:\n POSTGRES_USER: postgres\n POSTGRES_DB: db\n POSTGRES_PASSWORD: THIS_PASSWORD_IS_UNSAFE\n // highlight-end\n"})}),"\n",(0,t.jsx)(n.p,{children:"Notice our database container is included and already prepopulated with the configuration we\nspecified!"}),"\n",(0,t.jsxs)(n.p,{children:["You can run (after you ",(0,t.jsx)(n.a,{href:"https://docs.docker.com/compose/install/",children:"install Docker Compose"})," if\nnecessary):"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"docker-compose -f dist/server/docker-compose.yml up\n"})}),"\n",(0,t.jsx)(n.p,{children:"This demonstrates that your application is now being orchestrated by Docker Compose and is\nchugging right along!"})]})}function m(e={}){const{wrapper:n}={...(0,a.a)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(g,{...e})}):g(e)}},3200:(e,n,s)=>{s.d(n,{Z:()=>i});var t=s(9286),a=s(4866),r=s(5162),l=s(5893);function i(e){let{children:n,headless:s=!1,pkg:i,type:o}=e;return(0,l.jsxs)(a.Z,{className:s&&"headless",groupId:"package-manager",children:[(0,l.jsxs)(r.Z,{value:"npm",label:"npm",children:[n,(0,l.jsxs)(t.Z,{language:"bash",children:["npm init @flecks/",o," ",i]})]}),(0,l.jsxs)(r.Z,{value:"yarn",label:"Yarn",children:[n,(0,l.jsxs)(t.Z,{language:"bash",children:["yarn create @flecks/",o," ",i]})]}),(0,l.jsxs)(r.Z,{value:"pnpm",label:"pnpm",children:[n,(0,l.jsxs)(t.Z,{language:"bash",children:["pnpm create @flecks/",o," ",i]})]}),(0,l.jsxs)(r.Z,{value:"bun",label:"Bun",children:[n,(0,l.jsxs)(t.Z,{language:"bash",children:["bun create @flecks/",o," ",i]})]})]})}},4283:(e,n,s)=>{s.d(n,{Z:()=>i});var t=s(9286),a=s(4866),r=s(5162),l=s(5893);function i(e){let{children:n,cmd:s,headless:i=!1}=e;const o=Array.isArray(s)?s:[s],c=e=>o.map((n=>`${e} ${n}`)).join("\n");return(0,l.jsxs)(a.Z,{className:i&&"headless",groupId:"package-manager",children:[(0,l.jsxs)(r.Z,{value:"npm",label:"npm",children:[n,(0,l.jsx)(t.Z,{language:"bash",children:c("npx")})]}),(0,l.jsxs)(r.Z,{value:"yarn",label:"Yarn",children:[n,(0,l.jsx)(t.Z,{language:"bash",children:c("yarn")})]}),(0,l.jsxs)(r.Z,{value:"pnpm",label:"pnpm",children:[n,(0,l.jsx)(t.Z,{language:"bash",children:c("pnpx")})]}),(0,l.jsxs)(r.Z,{value:"bun",label:"Bun",children:[n,(0,l.jsx)(t.Z,{language:"bash",children:c("bunx")})]})]})}},385:(e,n,s)=>{s.d(n,{Z:()=>i});var t=s(9286),a=s(4866),r=s(5162),l=s(5893);function i(e){let{children:n,headless:s,pkg:i}=e;return(0,l.jsxs)(a.Z,{className:s&&"headless",groupId:"package-manager",children:[(0,l.jsxs)(r.Z,{value:"npm",label:"npm",children:[n,(0,l.jsxs)(t.Z,{language:"bash",children:["npm install ",i]})]}),(0,l.jsxs)(r.Z,{value:"yarn",label:"Yarn",children:[n,(0,l.jsxs)(t.Z,{language:"bash",children:["yarn add ",i]})]}),(0,l.jsxs)(r.Z,{value:"pnpm",label:"pnpm",children:[n,(0,l.jsxs)(t.Z,{language:"bash",children:["pnpm add ",i]})]}),(0,l.jsxs)(r.Z,{value:"bun",label:"Bun",children:[n,(0,l.jsxs)(t.Z,{language:"bash",children:["bun add ",i]})]})]})}},6569:(e,n,s)=>{s.d(n,{Z:()=>i});var t=s(9286),a=s(4866),r=s(5162),l=s(5893);function i(e){let{children:n,cmd:s,headless:i=!1}=e;return(0,l.jsxs)(a.Z,{className:i&&"headless",groupId:"package-manager",children:[(0,l.jsxs)(r.Z,{value:"npm",label:"npm",children:[n,(0,l.jsxs)(t.Z,{language:"bash",children:["npm run ",s]})]}),(0,l.jsxs)(r.Z,{value:"yarn",label:"Yarn",children:[n,(0,l.jsxs)(t.Z,{language:"bash",children:["yarn run ",s]})]}),(0,l.jsxs)(r.Z,{value:"pnpm",label:"pnpm",children:[n,(0,l.jsxs)(t.Z,{language:"bash",children:["pnpm run ",s]})]}),(0,l.jsxs)(r.Z,{value:"bun",label:"Bun",children:[n,(0,l.jsxs)(t.Z,{language:"bash",children:["bun run ",s]})]})]})}},5162:(e,n,s)=>{s.d(n,{Z:()=>l});s(7294);var t=s(512);const a={tabItem:"tabItem_Ymn6"};var r=s(5893);function l(e){let{children:n,hidden:s,className:l}=e;return(0,r.jsx)("div",{role:"tabpanel",className:(0,t.Z)(a.tabItem,l),hidden:s,children:n})}},4866:(e,n,s)=>{s.d(n,{Z:()=>y});var t=s(7294),a=s(512),r=s(2466),l=s(6550),i=s(469),o=s(1980),c=s(7392),d=s(12);function h(e){return t.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,t.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function u(e){const{values:n,children:s}=e;return(0,t.useMemo)((()=>{const e=n??function(e){return h(e).map((e=>{let{props:{value:n,label:s,attributes:t,default:a}}=e;return{value:n,label:s,attributes:t,default:a}}))}(s);return function(e){const n=(0,c.l)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,s])}function p(e){let{value:n,tabValues:s}=e;return s.some((e=>e.value===n))}function g(e){let{queryString:n=!1,groupId:s}=e;const a=(0,l.k6)(),r=function(e){let{queryString:n=!1,groupId:s}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!s)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return s??null}({queryString:n,groupId:s});return[(0,o._X)(r),(0,t.useCallback)((e=>{if(!r)return;const n=new URLSearchParams(a.location.search);n.set(r,e),a.replace({...a.location,search:n.toString()})}),[r,a])]}function m(e){const{defaultValue:n,queryString:s=!1,groupId:a}=e,r=u(e),[l,o]=(0,t.useState)((()=>function(e){let{defaultValue:n,tabValues:s}=e;if(0===s.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!p({value:n,tabValues:s}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${s.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const t=s.find((e=>e.default))??s[0];if(!t)throw new Error("Unexpected error: 0 tabValues");return t.value}({defaultValue:n,tabValues:r}))),[c,h]=g({queryString:s,groupId:a}),[m,f]=function(e){let{groupId:n}=e;const s=function(e){return e?`docusaurus.tab.${e}`:null}(n),[a,r]=(0,d.Nk)(s);return[a,(0,t.useCallback)((e=>{s&&r.set(e)}),[s,r])]}({groupId:a}),x=(()=>{const e=c??m;return p({value:e,tabValues:r})?e:null})();(0,i.Z)((()=>{x&&o(x)}),[x]);return{selectedValue:l,selectValue:(0,t.useCallback)((e=>{if(!p({value:e,tabValues:r}))throw new Error(`Can't select invalid tab value=${e}`);o(e),h(e),f(e)}),[h,f,r]),tabValues:r}}var f=s(2389);const x={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var j=s(5893);function b(e){let{className:n,block:s,selectedValue:t,selectValue:l,tabValues:i}=e;const o=[],{blockElementScrollPositionUntilNextRender:c}=(0,r.o5)(),d=e=>{const n=e.currentTarget,s=o.indexOf(n),a=i[s].value;a!==t&&(c(n),l(a))},h=e=>{let n=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const s=o.indexOf(e.currentTarget)+1;n=o[s]??o[0];break}case"ArrowLeft":{const s=o.indexOf(e.currentTarget)-1;n=o[s]??o[o.length-1];break}}n?.focus()};return(0,j.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,a.Z)("tabs",{"tabs--block":s},n),children:i.map((e=>{let{value:n,label:s,attributes:r}=e;return(0,j.jsx)("li",{role:"tab",tabIndex:t===n?0:-1,"aria-selected":t===n,ref:e=>o.push(e),onKeyDown:h,onClick:d,...r,className:(0,a.Z)("tabs__item",x.tabItem,r?.className,{"tabs__item--active":t===n}),children:s??n},n)}))})}function k(e){let{lazy:n,children:s,selectedValue:a}=e;const r=(Array.isArray(s)?s:[s]).filter(Boolean);if(n){const e=r.find((e=>e.props.value===a));return e?(0,t.cloneElement)(e,{className:"margin-top--md"}):null}return(0,j.jsx)("div",{className:"margin-top--md",children:r.map(((e,n)=>(0,t.cloneElement)(e,{key:n,hidden:e.props.value!==a})))})}function v(e){const n=m(e);return(0,j.jsxs)("div",{className:(0,a.Z)("tabs-container",x.tabList),children:[(0,j.jsx)(b,{...e,...n}),(0,j.jsx)(k,{...e,...n})]})}function y(e){const n=(0,f.Z)();return(0,j.jsx)(v,{...e,children:h(e.children)},String(n))}}}]); \ No newline at end of file diff --git a/assets/js/3c291670.35a15218.js b/assets/js/3c291670.35a15218.js deleted file mode 100644 index 3567898a..00000000 --- a/assets/js/3c291670.35a15218.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkflecks_docusaurus=self.webpackChunkflecks_docusaurus||[]).push([[1052],{2242:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>i,contentTitle:()=>l,default:()=>h,frontMatter:()=>a,metadata:()=>c,toc:()=>d});var s=t(5893),r=t(1151),o=t(3200);const a={title:"React",description:"Define root components, enable SSR, and more."},l="React",c={id:"react",title:"React",description:"Define root components, enable SSR, and more.",source:"@site/docs/react.mdx",sourceDirName:".",slug:"/react",permalink:"/flecks/docs/react",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{title:"React",description:"Define root components, enable SSR, and more."},sidebar:"flecksSidebar",previous:{title:"Sockets",permalink:"/flecks/docs/sockets"},next:{title:"Electron",permalink:"/flecks/docs/electron"}},i={},d=[{value:"Getting started",id:"getting-started",level:2},{value:"Add a root component",id:"add-a-root-component",level:3},{value:"Go check it out",id:"go-check-it-out",level:3},{value:"Hot module reloading",id:"hot-module-reloading",level:3},{value:"Hooks",id:"hooks",level:2},{value:"useFlecks()",id:"useflecks",level:3},{value:"useEvent(object, eventName, fn)",id:"useeventobject-eventname-fn",level:3},{value:"object",id:"object",level:4},{value:"eventName",id:"eventname",level:4},{value:"fn",id:"fn",level:4},{value:"usePrevious(value)",id:"usepreviousvalue",level:3},{value:"value",id:"value",level:4}];function u(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",h4:"h4",p:"p",pre:"pre",strong:"strong",...(0,r.a)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h1,{id:"react",children:"React"}),"\n",(0,s.jsx)(n.h2,{id:"getting-started",children:"Getting started"}),"\n",(0,s.jsxs)(n.p,{children:["Let's create a little app to demonstrate how to use ",(0,s.jsx)(n.a,{href:"https://react.dev/",children:"React"})," in flecks:"]}),"\n",(0,s.jsx)(o.Z,{type:"app",pkg:"react-test"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"cd react-test\n"})}),"\n",(0,s.jsx)(n.p,{children:"We'll also create a little fleck to hold our root component:"}),"\n",(0,s.jsx)(o.Z,{type:"fleck",pkg:"root"}),"\n",(0,s.jsxs)(n.p,{children:["We'll add the ",(0,s.jsx)(n.code,{children:"react"})," fleck to our new fleck:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"cd packages/root\nnpx flecks add @flecks/react\n"})}),"\n",(0,s.jsx)(n.admonition,{type:"tip",children:(0,s.jsxs)(n.p,{children:["We add ",(0,s.jsx)(n.code,{children:"@flecks/react"})," to ",(0,s.jsx)(n.code,{children:"packages/root"})," instead of our application directory so that our new\nfleck encapsulates all the dependencies it needs. You can distribute your flecks to others if you\ndo this right!"]})}),"\n",(0,s.jsx)(n.h3,{id:"add-a-root-component",children:"Add a root component"}),"\n",(0,s.jsxs)(n.p,{children:["Let's implement a hook to add a component to ",(0,s.jsx)(n.code,{children:"@flecks/react"}),"'s root components:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-js",metastring:'title="packages/root/src/index.js"',children:"import Component from './component';\n\nexport const hooks = {\n '@flecks/react.roots': () => Component,\n};\n"})}),"\n",(0,s.jsx)(n.p,{children:"Let's also add our component source file:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-jsx",metastring:'title="packages/root/src/component.jsx"',children:"import {React} from '@flecks/react';\n\nfunction Component() {\n return

hello world (from React)

;\n}\n\nexport default Component;\n"})}),"\n",(0,s.jsxs)(n.admonition,{title:"Hey, where's my React?",type:"tip",children:[(0,s.jsxs)(n.p,{children:["You may notice we imported ",(0,s.jsx)(n.code,{children:"React"})," from ",(0,s.jsx)(n.code,{children:"@flecks/react"})," instead of ",(0,s.jsx)(n.code,{children:"react"}),". This is provided as a\nconvenience. flecks is a very dynamic system and it may also be possible to load multiple React\nversions on your page."]}),(0,s.jsxs)(n.p,{children:["Using ",(0,s.jsx)(n.code,{children:"@flecks/react"})," makes sure your components are all using the same instance of ",(0,s.jsx)(n.code,{children:"React"}),"."]})]}),"\n",(0,s.jsx)(n.h3,{id:"go-check-it-out",children:"Go check it out"}),"\n",(0,s.jsx)(n.p,{children:"Start your application:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"npm run start\n"})}),"\n",(0,s.jsx)(n.p,{children:"Visit your website in your browser and you will see the hello world message!"}),"\n",(0,s.jsxs)(n.admonition,{title:"Server-Side Rendering (SSR)",type:"tip",children:[(0,s.jsxs)(n.p,{children:["If you disable JavaScript in your browser and reload the page you will still see the message. This\nis because ",(0,s.jsx)(n.strong,{children:"Server-Side Rendering (SSR) is enabled by default"}),"! If you don't want this, update your\n",(0,s.jsx)(n.code,{children:"build/flecks.yml"}),":"]}),(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-yml",metastring:'title="build/flecks.yml"',children:"'@flecks/build': {}\n'@flecks/core':\n id: react-test\n// highlight-start\n'@flecks/react':\n ssr: false\n// highlight-end\n'@flecks/server': {}\n'@react-test/root:./packages/root/src': {}\n"})}),(0,s.jsx)(n.p,{children:"Now if you visit the page with JavaScript disabled, you will get a white page."})]}),"\n",(0,s.jsx)(n.h3,{id:"hot-module-reloading",children:"Hot module reloading"}),"\n",(0,s.jsx)(n.p,{children:"You'll notice that if you edit your component, the changes are immediately reflected on the page.\nThis is because we have HMR support in our application!"}),"\n",(0,s.jsx)(n.h2,{id:"hooks",children:"Hooks"}),"\n",(0,s.jsx)(n.h3,{id:"useflecks",children:(0,s.jsx)(n.code,{children:"useFlecks()"})}),"\n",(0,s.jsxs)(n.p,{children:["You may use this hook from your components to gain access to the ",(0,s.jsx)(n.code,{children:"flecks"})," instance."]}),"\n",(0,s.jsx)(n.p,{children:"Example:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-jsx",children:"function Component() {\n const flecks = useFlecks();\n const id = flecks.get('@flecks/core.id');\n return

Your application ID is {id}

;\n}\n"})}),"\n",(0,s.jsx)(n.h3,{id:"useeventobject-eventname-fn",children:(0,s.jsx)(n.code,{children:"useEvent(object, eventName, fn)"})}),"\n",(0,s.jsx)(n.h4,{id:"object",children:(0,s.jsx)(n.code,{children:"object"})}),"\n",(0,s.jsx)(n.p,{children:"The event emitter to listen to"}),"\n",(0,s.jsx)(n.h4,{id:"eventname",children:(0,s.jsx)(n.code,{children:"eventName"})}),"\n",(0,s.jsx)(n.p,{children:"The name of the event to listen for."}),"\n",(0,s.jsx)(n.h4,{id:"fn",children:(0,s.jsx)(n.code,{children:"fn"})}),"\n",(0,s.jsx)(n.p,{children:"The event handler to call."}),"\n",(0,s.jsx)(n.p,{children:"Example:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-jsx",children:"function Component() {\n const flecks = useFlecks();\n const [isConnected, setIsConnected] = useState(false);\n useEvent(flecks.socket, 'connect', () => {\n setIsConnected(true);\n });\n useEvent(flecks.socket, 'disconnect', () => {\n setIsConnected(false);\n });\n return

Socket is {isConnected ? 'connected' : 'disconnected'}.

;\n}\n"})}),"\n",(0,s.jsx)(n.h3,{id:"usepreviousvalue",children:(0,s.jsx)(n.code,{children:"usePrevious(value)"})}),"\n",(0,s.jsx)(n.h4,{id:"value",children:(0,s.jsx)(n.code,{children:"value"})}),"\n",(0,s.jsx)(n.p,{children:"The value whose previous value we're interested in."}),"\n",(0,s.jsxs)(n.p,{children:["See: ",(0,s.jsx)(n.a,{href:"https://blog.logrocket.com/accessing-previous-props-state-react-hooks/",children:"https://blog.logrocket.com/accessing-previous-props-state-react-hooks/"})]})]})}function h(e={}){const{wrapper:n}={...(0,r.a)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(u,{...e})}):u(e)}},3200:(e,n,t)=>{t.d(n,{Z:()=>l});var s=t(9286),r=t(4866),o=t(5162),a=t(5893);function l(e){let{pkg:n,type:t}=e;return(0,a.jsxs)(r.Z,{children:[(0,a.jsx)(o.Z,{value:"npm",label:"npm",children:(0,a.jsxs)(s.Z,{language:"bash",children:["npm init @flecks/",t," ",n]})}),(0,a.jsx)(o.Z,{value:"yarn",label:"Yarn",children:(0,a.jsxs)(s.Z,{language:"bash",children:["yarn create @flecks/",t," ",n]})}),(0,a.jsx)(o.Z,{value:"bun",label:"Bun",children:(0,a.jsxs)(s.Z,{language:"bash",children:["bun create @flecks/",t," ",n]})})]})}},5162:(e,n,t)=>{t.d(n,{Z:()=>a});t(7294);var s=t(512);const r={tabItem:"tabItem_Ymn6"};var o=t(5893);function a(e){let{children:n,hidden:t,className:a}=e;return(0,o.jsx)("div",{role:"tabpanel",className:(0,s.Z)(r.tabItem,a),hidden:t,children:n})}},4866:(e,n,t)=>{t.d(n,{Z:()=>y});var s=t(7294),r=t(512),o=t(2466),a=t(6550),l=t(469),c=t(1980),i=t(7392),d=t(12);function u(e){return s.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,s.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function h(e){const{values:n,children:t}=e;return(0,s.useMemo)((()=>{const e=n??function(e){return u(e).map((e=>{let{props:{value:n,label:t,attributes:s,default:r}}=e;return{value:n,label:t,attributes:s,default:r}}))}(t);return function(e){const n=(0,i.l)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,t])}function p(e){let{value:n,tabValues:t}=e;return t.some((e=>e.value===n))}function f(e){let{queryString:n=!1,groupId:t}=e;const r=(0,a.k6)(),o=function(e){let{queryString:n=!1,groupId:t}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!t)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return t??null}({queryString:n,groupId:t});return[(0,c._X)(o),(0,s.useCallback)((e=>{if(!o)return;const n=new URLSearchParams(r.location.search);n.set(o,e),r.replace({...r.location,search:n.toString()})}),[o,r])]}function m(e){const{defaultValue:n,queryString:t=!1,groupId:r}=e,o=h(e),[a,c]=(0,s.useState)((()=>function(e){let{defaultValue:n,tabValues:t}=e;if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!p({value:n,tabValues:t}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${t.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const s=t.find((e=>e.default))??t[0];if(!s)throw new Error("Unexpected error: 0 tabValues");return s.value}({defaultValue:n,tabValues:o}))),[i,u]=f({queryString:t,groupId:r}),[m,v]=function(e){let{groupId:n}=e;const t=function(e){return e?`docusaurus.tab.${e}`:null}(n),[r,o]=(0,d.Nk)(t);return[r,(0,s.useCallback)((e=>{t&&o.set(e)}),[t,o])]}({groupId:r}),x=(()=>{const e=i??m;return p({value:e,tabValues:o})?e:null})();(0,l.Z)((()=>{x&&c(x)}),[x]);return{selectedValue:a,selectValue:(0,s.useCallback)((e=>{if(!p({value:e,tabValues:o}))throw new Error(`Can't select invalid tab value=${e}`);c(e),u(e),v(e)}),[u,v,o]),tabValues:o}}var v=t(2389);const x={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var j=t(5893);function b(e){let{className:n,block:t,selectedValue:s,selectValue:a,tabValues:l}=e;const c=[],{blockElementScrollPositionUntilNextRender:i}=(0,o.o5)(),d=e=>{const n=e.currentTarget,t=c.indexOf(n),r=l[t].value;r!==s&&(i(n),a(r))},u=e=>{let n=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const t=c.indexOf(e.currentTarget)+1;n=c[t]??c[0];break}case"ArrowLeft":{const t=c.indexOf(e.currentTarget)-1;n=c[t]??c[c.length-1];break}}n?.focus()};return(0,j.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,r.Z)("tabs",{"tabs--block":t},n),children:l.map((e=>{let{value:n,label:t,attributes:o}=e;return(0,j.jsx)("li",{role:"tab",tabIndex:s===n?0:-1,"aria-selected":s===n,ref:e=>c.push(e),onKeyDown:u,onClick:d,...o,className:(0,r.Z)("tabs__item",x.tabItem,o?.className,{"tabs__item--active":s===n}),children:t??n},n)}))})}function g(e){let{lazy:n,children:t,selectedValue:r}=e;const o=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){const e=o.find((e=>e.props.value===r));return e?(0,s.cloneElement)(e,{className:"margin-top--md"}):null}return(0,j.jsx)("div",{className:"margin-top--md",children:o.map(((e,n)=>(0,s.cloneElement)(e,{key:n,hidden:e.props.value!==r})))})}function k(e){const n=m(e);return(0,j.jsxs)("div",{className:(0,r.Z)("tabs-container",x.tabList),children:[(0,j.jsx)(b,{...e,...n}),(0,j.jsx)(g,{...e,...n})]})}function y(e){const n=(0,v.Z)();return(0,j.jsx)(k,{...e,children:u(e.children)},String(n))}}}]); \ No newline at end of file diff --git a/assets/js/3c291670.cca5d79b.js b/assets/js/3c291670.cca5d79b.js new file mode 100644 index 00000000..13b4b0a4 --- /dev/null +++ b/assets/js/3c291670.cca5d79b.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkflecks_docusaurus=self.webpackChunkflecks_docusaurus||[]).push([[1052],{2242:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>u,contentTitle:()=>i,default:()=>m,frontMatter:()=>c,metadata:()=>d,toc:()=>h});var s=t(5893),a=t(1151),r=t(3200),l=t(4283),o=t(6569);const c={title:"React",description:"Define root components, enable SSR, and more."},i="React",d={id:"react",title:"React",description:"Define root components, enable SSR, and more.",source:"@site/docs/react.mdx",sourceDirName:".",slug:"/react",permalink:"/flecks/docs/react",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{title:"React",description:"Define root components, enable SSR, and more."},sidebar:"flecksSidebar",previous:{title:"Sockets",permalink:"/flecks/docs/sockets"},next:{title:"Electron",permalink:"/flecks/docs/electron"}},u={},h=[{value:"Getting started",id:"getting-started",level:2},{value:"Add a root component",id:"add-a-root-component",level:3},{value:"Go check it out",id:"go-check-it-out",level:3},{value:"Hot module reloading",id:"hot-module-reloading",level:3},{value:"Hooks",id:"hooks",level:2},{value:"useFlecks()",id:"useflecks",level:3},{value:"useEvent(object, eventName, fn)",id:"useeventobject-eventname-fn",level:3},{value:"object",id:"object",level:4},{value:"eventName",id:"eventname",level:4},{value:"fn",id:"fn",level:4},{value:"usePrevious(value)",id:"usepreviousvalue",level:3},{value:"value",id:"value",level:4}];function p(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",h4:"h4",p:"p",pre:"pre",strong:"strong",...(0,a.a)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h1,{id:"react",children:"React"}),"\n",(0,s.jsx)(n.h2,{id:"getting-started",children:"Getting started"}),"\n",(0,s.jsx)(r.Z,{type:"app",pkg:"react-test",children:(0,s.jsxs)(n.p,{children:["Let's create a little app to demonstrate how to use ",(0,s.jsx)(n.a,{href:"https://react.dev/",children:"React"})," in flecks:"]})}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"cd react-test\n"})}),"\n",(0,s.jsx)(r.Z,{headless:!0,type:"fleck",pkg:"root",children:(0,s.jsx)(n.p,{children:"We'll also create a little fleck to hold our root component:"})}),"\n",(0,s.jsxs)(l.Z,{headless:!0,cmd:"flecks add @flecks/react",children:[(0,s.jsxs)(n.p,{children:["We'll add the ",(0,s.jsx)(n.code,{children:"react"})," fleck to our new fleck:"]}),(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"cd packages/root\n"})})]}),"\n",(0,s.jsx)(n.admonition,{type:"tip",children:(0,s.jsxs)(n.p,{children:["We add ",(0,s.jsx)(n.code,{children:"@flecks/react"})," to ",(0,s.jsx)(n.code,{children:"packages/root"})," instead of our application directory so that our new\nfleck encapsulates all the dependencies it needs. You can distribute your flecks to others if you\ndo this right!"]})}),"\n",(0,s.jsx)(n.h3,{id:"add-a-root-component",children:"Add a root component"}),"\n",(0,s.jsxs)(n.p,{children:["Let's implement a hook to add a component to ",(0,s.jsx)(n.code,{children:"@flecks/react"}),"'s root components:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-js",metastring:'title="packages/root/src/index.js"',children:"import Component from './component';\n\nexport const hooks = {\n '@flecks/react.roots': () => Component,\n};\n"})}),"\n",(0,s.jsx)(n.p,{children:"Let's also add our component source file:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-jsx",metastring:'title="packages/root/src/component.jsx"',children:"import {React} from '@flecks/react';\n\nfunction Component() {\n return

hello world (from React)

;\n}\n\nexport default Component;\n"})}),"\n",(0,s.jsxs)(n.admonition,{title:"Hey, where's my React?",type:"tip",children:[(0,s.jsxs)(n.p,{children:["You may notice we imported ",(0,s.jsx)(n.code,{children:"React"})," from ",(0,s.jsx)(n.code,{children:"@flecks/react"})," instead of ",(0,s.jsx)(n.code,{children:"react"}),". This is provided as a\nconvenience. flecks is a very dynamic system and it may also be possible to load multiple React\nversions on your page."]}),(0,s.jsxs)(n.p,{children:["Using ",(0,s.jsx)(n.code,{children:"@flecks/react"})," makes sure your components are all using the same instance of ",(0,s.jsx)(n.code,{children:"React"}),"."]})]}),"\n",(0,s.jsx)(n.h3,{id:"go-check-it-out",children:"Go check it out"}),"\n",(0,s.jsx)(o.Z,{headless:!0,cmd:"start",children:(0,s.jsx)(n.p,{children:"Start your application:"})}),"\n",(0,s.jsx)(n.p,{children:"Visit your website in your browser and you will see the hello world message!"}),"\n",(0,s.jsxs)(n.admonition,{title:"Server-Side Rendering (SSR)",type:"tip",children:[(0,s.jsxs)(n.p,{children:["If you disable JavaScript in your browser and reload the page you will still see the message. This\nis because ",(0,s.jsx)(n.strong,{children:"Server-Side Rendering (SSR) is enabled by default"}),"! If you don't want this, update your\n",(0,s.jsx)(n.code,{children:"build/flecks.yml"}),":"]}),(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-yml",metastring:'title="build/flecks.yml"',children:"'@flecks/build': {}\n'@flecks/core':\n id: react-test\n// highlight-start\n'@flecks/react':\n ssr: false\n// highlight-end\n'@flecks/server': {}\n'@react-test/root:./packages/root/src': {}\n"})}),(0,s.jsx)(n.p,{children:"Now if you visit the page with JavaScript disabled, you will get a white page."})]}),"\n",(0,s.jsx)(n.h3,{id:"hot-module-reloading",children:"Hot module reloading"}),"\n",(0,s.jsx)(n.p,{children:"You'll notice that if you edit your component, the changes are immediately reflected on the page.\nThis is because we have HMR support in our application!"}),"\n",(0,s.jsx)(n.h2,{id:"hooks",children:"Hooks"}),"\n",(0,s.jsx)(n.h3,{id:"useflecks",children:(0,s.jsx)(n.code,{children:"useFlecks()"})}),"\n",(0,s.jsxs)(n.p,{children:["You may use this hook from your components to gain access to the ",(0,s.jsx)(n.code,{children:"flecks"})," instance."]}),"\n",(0,s.jsx)(n.p,{children:"Example:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-jsx",children:"function Component() {\n const flecks = useFlecks();\n const id = flecks.get('@flecks/core.id');\n return

Your application ID is {id}

;\n}\n"})}),"\n",(0,s.jsx)(n.h3,{id:"useeventobject-eventname-fn",children:(0,s.jsx)(n.code,{children:"useEvent(object, eventName, fn)"})}),"\n",(0,s.jsx)(n.h4,{id:"object",children:(0,s.jsx)(n.code,{children:"object"})}),"\n",(0,s.jsx)(n.p,{children:"The event emitter to listen to"}),"\n",(0,s.jsx)(n.h4,{id:"eventname",children:(0,s.jsx)(n.code,{children:"eventName"})}),"\n",(0,s.jsx)(n.p,{children:"The name of the event to listen for."}),"\n",(0,s.jsx)(n.h4,{id:"fn",children:(0,s.jsx)(n.code,{children:"fn"})}),"\n",(0,s.jsx)(n.p,{children:"The event handler to call."}),"\n",(0,s.jsx)(n.p,{children:"Example:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-jsx",children:"function Component() {\n const flecks = useFlecks();\n const [isConnected, setIsConnected] = useState(false);\n useEvent(flecks.socket, 'connect', () => {\n setIsConnected(true);\n });\n useEvent(flecks.socket, 'disconnect', () => {\n setIsConnected(false);\n });\n return

Socket is {isConnected ? 'connected' : 'disconnected'}.

;\n}\n"})}),"\n",(0,s.jsx)(n.h3,{id:"usepreviousvalue",children:(0,s.jsx)(n.code,{children:"usePrevious(value)"})}),"\n",(0,s.jsx)(n.h4,{id:"value",children:(0,s.jsx)(n.code,{children:"value"})}),"\n",(0,s.jsx)(n.p,{children:"The value whose previous value we're interested in."}),"\n",(0,s.jsxs)(n.p,{children:["See: ",(0,s.jsx)(n.a,{href:"https://blog.logrocket.com/accessing-previous-props-state-react-hooks/",children:"https://blog.logrocket.com/accessing-previous-props-state-react-hooks/"})]})]})}function m(e={}){const{wrapper:n}={...(0,a.a)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(p,{...e})}):p(e)}},3200:(e,n,t)=>{t.d(n,{Z:()=>o});var s=t(9286),a=t(4866),r=t(5162),l=t(5893);function o(e){let{children:n,headless:t=!1,pkg:o,type:c}=e;return(0,l.jsxs)(a.Z,{className:t&&"headless",groupId:"package-manager",children:[(0,l.jsxs)(r.Z,{value:"npm",label:"npm",children:[n,(0,l.jsxs)(s.Z,{language:"bash",children:["npm init @flecks/",c," ",o]})]}),(0,l.jsxs)(r.Z,{value:"yarn",label:"Yarn",children:[n,(0,l.jsxs)(s.Z,{language:"bash",children:["yarn create @flecks/",c," ",o]})]}),(0,l.jsxs)(r.Z,{value:"pnpm",label:"pnpm",children:[n,(0,l.jsxs)(s.Z,{language:"bash",children:["pnpm create @flecks/",c," ",o]})]}),(0,l.jsxs)(r.Z,{value:"bun",label:"Bun",children:[n,(0,l.jsxs)(s.Z,{language:"bash",children:["bun create @flecks/",c," ",o]})]})]})}},4283:(e,n,t)=>{t.d(n,{Z:()=>o});var s=t(9286),a=t(4866),r=t(5162),l=t(5893);function o(e){let{children:n,cmd:t,headless:o=!1}=e;const c=Array.isArray(t)?t:[t],i=e=>c.map((n=>`${e} ${n}`)).join("\n");return(0,l.jsxs)(a.Z,{className:o&&"headless",groupId:"package-manager",children:[(0,l.jsxs)(r.Z,{value:"npm",label:"npm",children:[n,(0,l.jsx)(s.Z,{language:"bash",children:i("npx")})]}),(0,l.jsxs)(r.Z,{value:"yarn",label:"Yarn",children:[n,(0,l.jsx)(s.Z,{language:"bash",children:i("yarn")})]}),(0,l.jsxs)(r.Z,{value:"pnpm",label:"pnpm",children:[n,(0,l.jsx)(s.Z,{language:"bash",children:i("pnpx")})]}),(0,l.jsxs)(r.Z,{value:"bun",label:"Bun",children:[n,(0,l.jsx)(s.Z,{language:"bash",children:i("bunx")})]})]})}},6569:(e,n,t)=>{t.d(n,{Z:()=>o});var s=t(9286),a=t(4866),r=t(5162),l=t(5893);function o(e){let{children:n,cmd:t,headless:o=!1}=e;return(0,l.jsxs)(a.Z,{className:o&&"headless",groupId:"package-manager",children:[(0,l.jsxs)(r.Z,{value:"npm",label:"npm",children:[n,(0,l.jsxs)(s.Z,{language:"bash",children:["npm run ",t]})]}),(0,l.jsxs)(r.Z,{value:"yarn",label:"Yarn",children:[n,(0,l.jsxs)(s.Z,{language:"bash",children:["yarn run ",t]})]}),(0,l.jsxs)(r.Z,{value:"pnpm",label:"pnpm",children:[n,(0,l.jsxs)(s.Z,{language:"bash",children:["pnpm run ",t]})]}),(0,l.jsxs)(r.Z,{value:"bun",label:"Bun",children:[n,(0,l.jsxs)(s.Z,{language:"bash",children:["bun run ",t]})]})]})}},5162:(e,n,t)=>{t.d(n,{Z:()=>l});t(7294);var s=t(512);const a={tabItem:"tabItem_Ymn6"};var r=t(5893);function l(e){let{children:n,hidden:t,className:l}=e;return(0,r.jsx)("div",{role:"tabpanel",className:(0,s.Z)(a.tabItem,l),hidden:t,children:n})}},4866:(e,n,t)=>{t.d(n,{Z:()=>y});var s=t(7294),a=t(512),r=t(2466),l=t(6550),o=t(469),c=t(1980),i=t(7392),d=t(12);function u(e){return s.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,s.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function h(e){const{values:n,children:t}=e;return(0,s.useMemo)((()=>{const e=n??function(e){return u(e).map((e=>{let{props:{value:n,label:t,attributes:s,default:a}}=e;return{value:n,label:t,attributes:s,default:a}}))}(t);return function(e){const n=(0,i.l)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,t])}function p(e){let{value:n,tabValues:t}=e;return t.some((e=>e.value===n))}function m(e){let{queryString:n=!1,groupId:t}=e;const a=(0,l.k6)(),r=function(e){let{queryString:n=!1,groupId:t}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!t)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return t??null}({queryString:n,groupId:t});return[(0,c._X)(r),(0,s.useCallback)((e=>{if(!r)return;const n=new URLSearchParams(a.location.search);n.set(r,e),a.replace({...a.location,search:n.toString()})}),[r,a])]}function f(e){const{defaultValue:n,queryString:t=!1,groupId:a}=e,r=h(e),[l,c]=(0,s.useState)((()=>function(e){let{defaultValue:n,tabValues:t}=e;if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!p({value:n,tabValues:t}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${t.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const s=t.find((e=>e.default))??t[0];if(!s)throw new Error("Unexpected error: 0 tabValues");return s.value}({defaultValue:n,tabValues:r}))),[i,u]=m({queryString:t,groupId:a}),[f,x]=function(e){let{groupId:n}=e;const t=function(e){return e?`docusaurus.tab.${e}`:null}(n),[a,r]=(0,d.Nk)(t);return[a,(0,s.useCallback)((e=>{t&&r.set(e)}),[t,r])]}({groupId:a}),j=(()=>{const e=i??f;return p({value:e,tabValues:r})?e:null})();(0,o.Z)((()=>{j&&c(j)}),[j]);return{selectedValue:l,selectValue:(0,s.useCallback)((e=>{if(!p({value:e,tabValues:r}))throw new Error(`Can't select invalid tab value=${e}`);c(e),u(e),x(e)}),[u,x,r]),tabValues:r}}var x=t(2389);const j={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var v=t(5893);function g(e){let{className:n,block:t,selectedValue:s,selectValue:l,tabValues:o}=e;const c=[],{blockElementScrollPositionUntilNextRender:i}=(0,r.o5)(),d=e=>{const n=e.currentTarget,t=c.indexOf(n),a=o[t].value;a!==s&&(i(n),l(a))},u=e=>{let n=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const t=c.indexOf(e.currentTarget)+1;n=c[t]??c[0];break}case"ArrowLeft":{const t=c.indexOf(e.currentTarget)-1;n=c[t]??c[c.length-1];break}}n?.focus()};return(0,v.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,a.Z)("tabs",{"tabs--block":t},n),children:o.map((e=>{let{value:n,label:t,attributes:r}=e;return(0,v.jsx)("li",{role:"tab",tabIndex:s===n?0:-1,"aria-selected":s===n,ref:e=>c.push(e),onKeyDown:u,onClick:d,...r,className:(0,a.Z)("tabs__item",j.tabItem,r?.className,{"tabs__item--active":s===n}),children:t??n},n)}))})}function b(e){let{lazy:n,children:t,selectedValue:a}=e;const r=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){const e=r.find((e=>e.props.value===a));return e?(0,s.cloneElement)(e,{className:"margin-top--md"}):null}return(0,v.jsx)("div",{className:"margin-top--md",children:r.map(((e,n)=>(0,s.cloneElement)(e,{key:n,hidden:e.props.value!==a})))})}function k(e){const n=f(e);return(0,v.jsxs)("div",{className:(0,a.Z)("tabs-container",j.tabList),children:[(0,v.jsx)(g,{...e,...n}),(0,v.jsx)(b,{...e,...n})]})}function y(e){const n=(0,x.Z)();return(0,v.jsx)(k,{...e,children:u(e.children)},String(n))}}}]); \ No newline at end of file diff --git a/assets/js/6cabb5ed.588f71b6.js b/assets/js/6cabb5ed.588f71b6.js deleted file mode 100644 index 4f0fe011..00000000 --- a/assets/js/6cabb5ed.588f71b6.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkflecks_docusaurus=self.webpackChunkflecks_docusaurus||[]).push([[9339],{2034:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>r,contentTitle:()=>o,default:()=>h,frontMatter:()=>c,metadata:()=>l,toc:()=>a});var i=s(5893),t=s(1151);const c={title:"Building and testing",description:"Learn how to build, test, and override defaults for your fleck"},o=void 0,l={id:"building-your-fleck",title:"Building and testing",description:"Learn how to build, test, and override defaults for your fleck",source:"@site/docs/building-your-fleck.mdx",sourceDirName:".",slug:"/building-your-fleck",permalink:"/flecks/docs/building-your-fleck",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{title:"Building and testing",description:"Learn how to build, test, and override defaults for your fleck"},sidebar:"flecksSidebar",previous:{title:"Writing your fleck(s)",permalink:"/flecks/docs/category/writing-your-flecks"},next:{title:"Hooks",permalink:"/flecks/docs/hooks"}},r={},a=[{value:"package.json and entry points",id:"packagejson-and-entry-points",level:2},{value:"Who cares? Everything works without it!",id:"who-cares-everything-works-without-it",level:3},{value:"Processing package.json",id:"processing-packagejson",level:3},{value:"webpack build configuration",id:"webpack-build-configuration",level:2},{value:"build/fleck.webpack.config.js",id:"buildfleckwebpackconfigjs",level:3},{value:"Testing",id:"testing",level:2},{value:"Example source",id:"example-source",level:3},{value:"Example test",id:"example-test",level:3},{value:"Platform-specificity",id:"platform-specificity",level:3},{value:"Check it",id:"check-it",level:4},{value:"Linting",id:"linting",level:2},{value:"build/default.eslint.config.js",id:"builddefaulteslintconfigjs",level:3}];function d(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",img:"img",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,t.a)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"@flecks/create-fleck"})," sets up an environment that makes building, testing, and distributing\nyour flecks easy."]}),"\n",(0,i.jsxs)(n.h2,{id:"packagejson-and-entry-points",children:[(0,i.jsx)(n.code,{children:"package.json"})," and entry points"]}),"\n",(0,i.jsxs)(n.p,{children:["flecks automatically uses the ",(0,i.jsx)(n.code,{children:"files"})," key in your ",(0,i.jsx)(n.code,{children:"package.json"})," to determine the\n",(0,i.jsx)(n.a,{href:"https://webpack.js.org/concepts/entry-points/",children:"entry points"})," of your fleck. Entry points are\nautomatically discovered from the ",(0,i.jsx)(n.strong,{children:(0,i.jsx)(n.code,{children:"src"})})," directory of your fleck."]}),"\n",(0,i.jsxs)(n.p,{children:["Think of your ",(0,i.jsx)(n.code,{children:"files"})," key as a sort of ",(0,i.jsx)(n.code,{children:"exports"}),", but for your files. If your ",(0,i.jsx)(n.code,{children:"package.json"}),"'s\n",(0,i.jsx)(n.code,{children:"files"})," key looks like this:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:' "files": [\n "client.js",\n "index.js",\n "something-else.js"\n ],\n'})}),"\n",(0,i.jsxs)(n.p,{children:["Other code could ",(0,i.jsx)(n.code,{children:"import"})," any of those paths (e.g. ",(0,i.jsx)(n.code,{children:"@your/fleck/client"}),", ",(0,i.jsx)(n.code,{children:"@your/fleck"}),",\n",(0,i.jsx)(n.code,{children:"@your/fleck/something-else"}),")."]}),"\n",(0,i.jsxs)(n.p,{children:["You may have a structure like ",(0,i.jsx)(n.code,{children:"src/client/index.js"})," and the entry point discovery would still\nwork as expected above."]}),"\n",(0,i.jsx)(n.h3,{id:"who-cares-everything-works-without-it",children:"Who cares? Everything works without it!"}),"\n",(0,i.jsxs)(n.p,{children:["Who cares about exporting, though? I created a fleck and everything Just Works","\u2122\ufe0f",". This\nseems like extra busywork for no reason!"]}),"\n",(0,i.jsx)(n.admonition,{title:"Sharing is caring",type:"tip",children:(0,i.jsxs)(n.p,{children:["The reason we take care of the ",(0,i.jsx)(n.code,{children:"files"})," key in our ",(0,i.jsx)(n.code,{children:"package.json"})," is because ",(0,i.jsxs)(n.strong,{children:["this\nis how we make sure we can publish working flecks to ",(0,i.jsx)(n.code,{children:"npm"})]}),"! this tooling is directed toward\nmaking it easier and frictionless to share code."]})}),"\n",(0,i.jsxs)(n.h3,{id:"processing-packagejson",children:["Processing ",(0,i.jsx)(n.code,{children:"package.json"})]}),"\n",(0,i.jsxs)(n.p,{children:["flecks augments your source ",(0,i.jsx)(n.code,{children:"package.json"})," during the build process and outputs a\n",(0,i.jsxs)(n.strong,{children:["built ",(0,i.jsx)(n.code,{children:"package.json"})]})," to ",(0,i.jsx)(n.strong,{children:(0,i.jsx)(n.code,{children:"dist"})}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["If you generate a fleck using ",(0,i.jsx)(n.code,{children:"create-fleck"}),", its ",(0,i.jsx)(n.code,{children:"files"})," key will look like this:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:' "files": [\n "index.js"\n ],\n'})}),"\n",(0,i.jsxs)(n.p,{children:["flecks automatically adds some paths to the ",(0,i.jsx)(n.code,{children:"files"})," key of your built ",(0,i.jsx)(n.code,{children:"package.json"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"build"})," directory"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"src"})," directory (if sources exist)"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"sourcemaps"})," for each entry point (e.g. ",(0,i.jsx)(n.code,{children:"index.js"})," -> ",(0,i.jsx)(n.code,{children:"index.js.map"}),")"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"test"})," directory (if tests exist)"]}),"\n"]}),"\n",(0,i.jsxs)(n.admonition,{title:"Hook that one, too",type:"info",children:[(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"@flecks/fleck"})," invokes a hook\n",(0,i.jsx)(n.a,{href:"./flecks/hooks#flecksfleckpackagejson",children:(0,i.jsx)(n.code,{children:"@flecks/fleck.packageJson"})})," which exposes this for any\nother fleck to process ",(0,i.jsx)(n.code,{children:"package.json"})," when building a fleck."]}),(0,i.jsxs)(n.p,{children:["For instance, ",(0,i.jsx)(n.code,{children:"@flecks/web"})," implements this hook. ",(0,i.jsx)(n.code,{children:"@flecks/web"})," will automatically output\nCSS, fonts, and other frontend assets to the ",(0,i.jsx)(n.code,{children:"assets"})," directory in your build output. If any of\nthese frontend assets exist, ",(0,i.jsx)(n.code,{children:"@flecks/web"})," will automatically add the ",(0,i.jsx)(n.code,{children:"assets"})," directory to the\n",(0,i.jsx)(n.code,{children:"files"})," key of your built ",(0,i.jsx)(n.code,{children:"package.json"}),". You don't have to think about it!"]})]}),"\n",(0,i.jsxs)(n.admonition,{title:"Normal distribution",type:"warning",children:[(0,i.jsxs)(n.p,{children:["What this means is that when we publish a fleck we don't publish the root directory, ",(0,i.jsxs)(n.strong,{children:["we publish\nthe ",(0,i.jsx)(n.code,{children:"dist"})," output directory"]}),"."]}),(0,i.jsxs)(n.p,{children:["The same applies when ",(0,i.jsx)(n.a,{href:"./building-your-application#symlinks",children:"symlinking your fleck"})," in an\napplication."]})]}),"\n",(0,i.jsx)(n.h2,{id:"webpack-build-configuration",children:"webpack build configuration"}),"\n",(0,i.jsx)(n.h3,{id:"buildfleckwebpackconfigjs",children:(0,i.jsx)(n.code,{children:"build/fleck.webpack.config.js"})}),"\n",(0,i.jsx)(n.p,{children:"flecks provides a default webpack configuration for your fleck. This may not be what you want, so\nyou may override it:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-js",metastring:'title="build/fleck.webpack.config.js"',children:"const flecksWebpackDefaults = require('@flecks/fleck/build/fleck.webpack.config');\nmodule.exports = async (env, argv, flecks) => {\n const config = await flecksWebpackDefaults(env, argv, flecks);\n // ...\n return config;\n};\n"})}),"\n",(0,i.jsx)(n.p,{children:"You don't actually have to extend the configuration like that, you could return your own! That's\njust an illustration of how you can override the defaults."}),"\n",(0,i.jsx)(n.p,{children:"That being said, the defaults (including the automatic entry point stuff above and so much more)\nwill absolutely make your life easier."}),"\n",(0,i.jsx)(n.h2,{id:"testing",children:"Testing"}),"\n",(0,i.jsxs)(n.p,{children:["flecks uses Mocha and Chai to run your tests. When you create a fleck, it includes a run script\n",(0,i.jsx)(n.code,{children:"test"}),". If you run it in your new empty fleck, you will see the output:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"No fleck tests found.\n"})}),"\n",(0,i.jsx)(n.p,{children:"No tests exist by default. Let's look at some example code and tests to understand how it works."}),"\n",(0,i.jsx)(n.h3,{id:"example-source",children:"Example source"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-javascript",metastring:'title="packages/example/src/index.js"',children:"export const add2 = (n) => n + 2;\n\nexport const add3 = (n) => n + 3;\n"})}),"\n",(0,i.jsx)(n.h3,{id:"example-test",children:"Example test"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-javascript",metastring:'title="packages/example/test/add2.js"',children:"import {expect} from 'chai';\n\nconst {add2} = require('@testing/unit');\n\nit('can add two to a number', () => {\n // highlight-next-line\n expect(add2(2)).to.equal(5);\n});\n"})}),"\n",(0,i.jsx)(n.admonition,{type:"note",children:(0,i.jsx)(n.p,{children:"We intentionally made an error so we can see what a failed test looks like."})}),"\n",(0,i.jsxs)(n.p,{children:["If we run the following command ",(0,i.jsxs)(n.strong,{children:["from within ",(0,i.jsx)(n.code,{children:"packages/example"})]}),":"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"npm run test\n"})}),"\n",(0,i.jsx)(n.p,{children:"We would see the following output:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:" 1) can add two to a number\n\n 0 passing (11ms)\n 1 failing\n\n 1) can add two to a number:\n\n AssertionError: expected 4 to equal 5\n + expected - actual\n\n -4\n +5\n"})}),"\n",(0,i.jsx)(n.p,{children:"It catches the error! If we fixed it:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-javascript",metastring:'title="packages/example/test/add2.js"',children:"import {expect} from 'chai';\n\nconst {add2} = require('@testing/unit');\n\nit('can add two to a number', () => {\n // highlight-next-line\n expect(add2(2)).to.equal(4);\n});\n"})}),"\n",(0,i.jsx)(n.p,{children:"and try again:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"npm run test\n"})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:" \u2713 can add two to a number\n\n 1 passing (4ms)\n"})}),"\n",(0,i.jsx)(n.p,{children:"Everything's good!"}),"\n",(0,i.jsx)(n.h3,{id:"platform-specificity",children:"Platform-specificity"}),"\n",(0,i.jsx)(n.p,{children:"flecks also allows you to write tests that only target a specific platform. Let's add web support\nand then write a test that only runs for the client:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"npx flecks add @flecks/web\n"})}),"\n",(0,i.jsxs)(n.p,{children:["Now, let's add a test. We add a client test by adding a ",(0,i.jsx)(n.code,{children:"client"})," directory to our ",(0,i.jsx)(n.code,{children:"test"}),"\ndirectory and putting tests there:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-javascript",metastring:'title="packages/example/test/client/add3.js"',children:"import {expect} from 'chai';\n\nconst {add3} = require('@testing/unit');\n\nit('can add three to a number', () => {\n // highlight-next-line\n expect(add3(2)).to.equal(6);\n});\n"})}),"\n",(0,i.jsx)(n.admonition,{type:"note",children:(0,i.jsx)(n.p,{children:"We intentionally made a mistake again to show a test failure."})}),"\n",(0,i.jsx)(n.h4,{id:"check-it",children:"Check it"}),"\n",(0,i.jsx)(n.p,{children:"Start your application, visit your website in the browser, and you will see:"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"A screenshot of a browser showing the test runner page with our test failing",src:s(5408).Z+"",width:"1800",height:"1141"})}),"\n",(0,i.jsx)(n.p,{children:"The test is failing! That's what we expected."}),"\n",(0,i.jsx)(n.p,{children:"Now, edit your client test to fix it:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-javascript",metastring:'title="packages/unit/test/client/add3.js"',children:"import {expect} from 'chai';\n\nconst {add3} = require('@testing/unit');\n\nit('can add three to a number', () => {\n // highlight-next-line\n expect(add3(2)).to.equal(5);\n});\n"})}),"\n",(0,i.jsxs)(n.p,{children:["Save the file. If you still have your application running, go look at the page. You'll notice that\n",(0,i.jsx)(n.strong,{children:"it updated automatically"})," to look like:"]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"A screenshot of a browser showing the test runner page with our test passing",src:s(5480).Z+"",width:"1833",height:"850"})}),"\n",(0,i.jsx)(n.p,{children:"Awesome, everything passes!"}),"\n",(0,i.jsxs)(n.admonition,{title:"Sanity check",type:"info",children:[(0,i.jsxs)(n.p,{children:["If you run ",(0,i.jsx)(n.code,{children:"npm run test"})," in your ",(0,i.jsx)(n.code,{children:"packages/example"})," directory, you will see that only one test was\nrun:"]}),(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:" \u2713 can add two to a number\n\n 1 passing (3ms)\n"})}),(0,i.jsx)(n.p,{children:"That's correct; we only run client tests on the client."})]}),"\n",(0,i.jsx)(n.h2,{id:"linting",children:"Linting"}),"\n",(0,i.jsxs)(n.p,{children:["flecks automatically includes support for ESLint through a ",(0,i.jsx)(n.code,{children:"lint"})," run script. flecks configures a\nlot of default rules including a lightly-tweaked version of\n",(0,i.jsx)(n.a,{href:"https://airbnb.io/javascript/",children:(0,i.jsx)(n.code,{children:"eslint-config-airbnb"})})," as well as overrides for special\ncircumstances: for instance, loosening some rules for the ",(0,i.jsx)(n.code,{children:"test"})," directory."]}),"\n",(0,i.jsx)(n.h3,{id:"builddefaulteslintconfigjs",children:(0,i.jsx)(n.code,{children:"build/default.eslint.config.js"})}),"\n",(0,i.jsxs)(n.p,{children:["You may want to completely change these defaults and you can do so by creating a file\n",(0,i.jsx)(n.code,{children:"build/default.eslint.config.js"}),":"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-js",metastring:'title="build/default.eslint.config.js"',children:"const flecksEslintDefaults = require('@flecks/build/build/default.eslint.config');\nmodule.exports = async (flecks) => ({\n extends: [\n await flecksEslintDefaults(flecks),\n ],\n // ...\n});\n"})}),"\n",(0,i.jsx)(n.p,{children:"Again, you don't actually have to extend the configuration like that, you could return your own!"}),"\n",(0,i.jsx)(n.admonition,{title:"Wait a minute, is that asynchronous ESLint configuration?",type:"info",children:(0,i.jsxs)(n.p,{children:["ESLint has made *",(0,i.jsx)(n.em,{children:"async noises"}),"* lately, but as of this writing, the actually-working version requires\nyou to write synchronous configuration files. ",(0,i.jsx)(n.em,{children:"So how does flecks do it"}),"? Honestly?\n",(0,i.jsx)(n.a,{href:"https://github.com/cha0s/flecks/blob/master/packages/build/build/eslint.config.js",children:"Don't ask..."}),"\nWe interface with torturous APIs so you don't have to!"]})})]})}function h(e={}){const{wrapper:n}={...(0,t.a)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},5408:(e,n,s)=>{s.d(n,{Z:()=>i});const i=s.p+"assets/images/flecks-test-client-failed-49e983143a480c8c9d4923f33d085bb9.png"},5480:(e,n,s)=>{s.d(n,{Z:()=>i});const i=s.p+"assets/images/flecks-test-client-passed-8ca37755e8231280a12ef6a2240da94b.png"},1151:(e,n,s)=>{s.d(n,{Z:()=>l,a:()=>o});var i=s(7294);const t={},c=i.createContext(t);function o(e){const n=i.useContext(c);return i.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(t):e.components||t:o(e.components),i.createElement(c.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/6cabb5ed.c176a9c3.js b/assets/js/6cabb5ed.c176a9c3.js new file mode 100644 index 00000000..8a3b0abc --- /dev/null +++ b/assets/js/6cabb5ed.c176a9c3.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkflecks_docusaurus=self.webpackChunkflecks_docusaurus||[]).push([[9339],{2034:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>o,default:()=>p,frontMatter:()=>a,metadata:()=>c,toc:()=>u});var s=t(5893),i=t(1151),l=t(4283),r=t(6569);const a={title:"Building and testing",description:"Learn how to build, test, and override defaults for your fleck"},o=void 0,c={id:"building-your-fleck",title:"Building and testing",description:"Learn how to build, test, and override defaults for your fleck",source:"@site/docs/building-your-fleck.mdx",sourceDirName:".",slug:"/building-your-fleck",permalink:"/flecks/docs/building-your-fleck",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{title:"Building and testing",description:"Learn how to build, test, and override defaults for your fleck"},sidebar:"flecksSidebar",previous:{title:"Writing your fleck(s)",permalink:"/flecks/docs/category/writing-your-flecks"},next:{title:"Hooks",permalink:"/flecks/docs/hooks"}},d={},u=[{value:"package.json and entry points",id:"packagejson-and-entry-points",level:2},{value:"Who cares? Everything works without it!",id:"who-cares-everything-works-without-it",level:3},{value:"Processing package.json",id:"processing-packagejson",level:3},{value:"webpack build configuration",id:"webpack-build-configuration",level:2},{value:"build/fleck.webpack.config.js",id:"buildfleckwebpackconfigjs",level:3},{value:"Testing",id:"testing",level:2},{value:"Example source",id:"example-source",level:3},{value:"Example test",id:"example-test",level:3},{value:"Platform-specificity",id:"platform-specificity",level:3},{value:"Check it",id:"check-it",level:4},{value:"Linting",id:"linting",level:2},{value:"build/default.eslint.config.js",id:"builddefaulteslintconfigjs",level:3}];function h(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",img:"img",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.a)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"@flecks/create-fleck"})," sets up an environment that makes building, testing, and distributing\nyour flecks easy."]}),"\n",(0,s.jsxs)(n.h2,{id:"packagejson-and-entry-points",children:[(0,s.jsx)(n.code,{children:"package.json"})," and entry points"]}),"\n",(0,s.jsxs)(n.p,{children:["flecks automatically uses the ",(0,s.jsx)(n.code,{children:"files"})," key in your ",(0,s.jsx)(n.code,{children:"package.json"})," to determine the\n",(0,s.jsx)(n.a,{href:"https://webpack.js.org/concepts/entry-points/",children:"entry points"})," of your fleck. Entry points are\nautomatically discovered from the ",(0,s.jsx)(n.strong,{children:(0,s.jsx)(n.code,{children:"src"})})," directory of your fleck."]}),"\n",(0,s.jsxs)(n.p,{children:["Think of your ",(0,s.jsx)(n.code,{children:"files"})," key as a sort of ",(0,s.jsx)(n.code,{children:"exports"}),", but for your files. If your ",(0,s.jsx)(n.code,{children:"package.json"}),"'s\n",(0,s.jsx)(n.code,{children:"files"})," key looks like this:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-json",children:' "files": [\n "client.js",\n "index.js",\n "something-else.js"\n ],\n'})}),"\n",(0,s.jsxs)(n.p,{children:["Other code could ",(0,s.jsx)(n.code,{children:"import"})," any of those paths (e.g. ",(0,s.jsx)(n.code,{children:"@your/fleck/client"}),", ",(0,s.jsx)(n.code,{children:"@your/fleck"}),",\n",(0,s.jsx)(n.code,{children:"@your/fleck/something-else"}),")."]}),"\n",(0,s.jsxs)(n.p,{children:["You may have a structure like ",(0,s.jsx)(n.code,{children:"src/client/index.js"})," and the entry point discovery would still\nwork as expected above."]}),"\n",(0,s.jsx)(n.h3,{id:"who-cares-everything-works-without-it",children:"Who cares? Everything works without it!"}),"\n",(0,s.jsxs)(n.p,{children:["Who cares about exporting, though? I created a fleck and everything Just Works","\u2122\ufe0f",". This\nseems like extra busywork for no reason!"]}),"\n",(0,s.jsx)(n.admonition,{title:"Sharing is caring",type:"tip",children:(0,s.jsxs)(n.p,{children:["The reason we take care of the ",(0,s.jsx)(n.code,{children:"files"})," key in our ",(0,s.jsx)(n.code,{children:"package.json"})," is because ",(0,s.jsxs)(n.strong,{children:["this\nis how we make sure we can publish working flecks to ",(0,s.jsx)(n.code,{children:"npm"})]}),"! this tooling is directed toward\nmaking it easier and frictionless to share code."]})}),"\n",(0,s.jsxs)(n.h3,{id:"processing-packagejson",children:["Processing ",(0,s.jsx)(n.code,{children:"package.json"})]}),"\n",(0,s.jsxs)(n.p,{children:["flecks augments your source ",(0,s.jsx)(n.code,{children:"package.json"})," during the build process and outputs a\n",(0,s.jsxs)(n.strong,{children:["built ",(0,s.jsx)(n.code,{children:"package.json"})]})," to ",(0,s.jsx)(n.strong,{children:(0,s.jsx)(n.code,{children:"dist"})}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["If you generate a fleck using ",(0,s.jsx)(n.code,{children:"@flecks/create-fleck"}),", its ",(0,s.jsx)(n.code,{children:"files"})," key will look like this:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-json",children:' "files": [\n "index.js"\n ],\n'})}),"\n",(0,s.jsxs)(n.p,{children:["flecks automatically adds some paths to the ",(0,s.jsx)(n.code,{children:"files"})," key of your built ",(0,s.jsx)(n.code,{children:"package.json"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"build"})," directory"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"src"})," directory (if sources exist)"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"sourcemaps"})," for each entry point (e.g. ",(0,s.jsx)(n.code,{children:"index.js"})," -> ",(0,s.jsx)(n.code,{children:"index.js.map"}),")"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"test"})," directory (if tests exist)"]}),"\n"]}),"\n",(0,s.jsxs)(n.admonition,{title:"Hook that one, too",type:"info",children:[(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"@flecks/fleck"})," invokes a hook\n",(0,s.jsx)(n.a,{href:"./flecks/hooks#flecksfleckpackagejson",children:(0,s.jsx)(n.code,{children:"@flecks/fleck.packageJson"})})," which exposes this for any\nother fleck to process ",(0,s.jsx)(n.code,{children:"package.json"})," when building a fleck."]}),(0,s.jsxs)(n.p,{children:["For instance, ",(0,s.jsx)(n.code,{children:"@flecks/web"})," implements this hook. ",(0,s.jsx)(n.code,{children:"@flecks/web"})," will automatically output\nCSS, fonts, and other frontend assets to the ",(0,s.jsx)(n.code,{children:"assets"})," directory in your build output. If any of\nthese frontend assets exist, ",(0,s.jsx)(n.code,{children:"@flecks/web"})," will automatically add the ",(0,s.jsx)(n.code,{children:"assets"})," directory to the\n",(0,s.jsx)(n.code,{children:"files"})," key of your built ",(0,s.jsx)(n.code,{children:"package.json"}),". You don't have to think about it!"]})]}),"\n",(0,s.jsxs)(n.admonition,{title:"Normal distribution",type:"warning",children:[(0,s.jsxs)(n.p,{children:["What this means is that when we publish a fleck we don't publish the root directory, ",(0,s.jsxs)(n.strong,{children:["we publish\nthe ",(0,s.jsx)(n.code,{children:"dist"})," output directory"]}),"."]}),(0,s.jsxs)(n.p,{children:["The same applies when ",(0,s.jsx)(n.a,{href:"./building-your-application#symlinks",children:"symlinking your fleck"})," in an\napplication."]})]}),"\n",(0,s.jsx)(n.h2,{id:"webpack-build-configuration",children:"webpack build configuration"}),"\n",(0,s.jsx)(n.h3,{id:"buildfleckwebpackconfigjs",children:(0,s.jsx)(n.code,{children:"build/fleck.webpack.config.js"})}),"\n",(0,s.jsx)(n.p,{children:"flecks provides a default webpack configuration for your fleck. This may not be what you want, so\nyou may override it:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-js",metastring:'title="build/fleck.webpack.config.js"',children:"const flecksWebpackDefaults = require('@flecks/fleck/build/fleck.webpack.config');\nmodule.exports = async (env, argv, flecks) => {\n const config = await flecksWebpackDefaults(env, argv, flecks);\n // ...\n return config;\n};\n"})}),"\n",(0,s.jsx)(n.p,{children:"You don't actually have to extend the configuration like that, you could return your own! That's\njust an illustration of how you can override the defaults."}),"\n",(0,s.jsx)(n.p,{children:"That being said, the defaults (including the automatic entry point stuff above and so much more)\nwill absolutely make your life easier."}),"\n",(0,s.jsx)(n.h2,{id:"testing",children:"Testing"}),"\n",(0,s.jsxs)(n.p,{children:["flecks uses Mocha and Chai to run your tests. When you create a fleck, it includes a run script\n",(0,s.jsx)(n.code,{children:"test"}),". If you run it in your new empty fleck, you will see the output:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"No fleck tests found.\n"})}),"\n",(0,s.jsx)(n.p,{children:"No tests exist by default. Let's look at some example code and tests to understand how it works."}),"\n",(0,s.jsx)(n.h3,{id:"example-source",children:"Example source"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-javascript",metastring:'title="packages/example/src/index.js"',children:"export const add2 = (n) => n + 2;\n\nexport const add3 = (n) => n + 3;\n"})}),"\n",(0,s.jsx)(n.h3,{id:"example-test",children:"Example test"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-javascript",metastring:'title="packages/example/test/add2.js"',children:"import {expect} from 'chai';\n\nconst {add2} = require('@testing/unit');\n\nit('can add two to a number', () => {\n // highlight-next-line\n expect(add2(2)).to.equal(5);\n});\n"})}),"\n",(0,s.jsx)(n.admonition,{type:"note",children:(0,s.jsx)(n.p,{children:"We intentionally made an error so we can see what a failed test looks like."})}),"\n",(0,s.jsx)(r.Z,{cmd:"test",children:(0,s.jsxs)(n.p,{children:["If we run the following command ",(0,s.jsxs)(n.strong,{children:["from within ",(0,s.jsx)(n.code,{children:"packages/example"})]}),":"]})}),"\n",(0,s.jsx)(n.p,{children:"We would see the following output:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:" 1) can add two to a number\n\n 0 passing (11ms)\n 1 failing\n\n 1) can add two to a number:\n\n AssertionError: expected 4 to equal 5\n + expected - actual\n\n -4\n +5\n"})}),"\n",(0,s.jsx)(n.p,{children:"It catches the error! If we fixed it:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-javascript",metastring:'title="packages/example/test/add2.js"',children:"import {expect} from 'chai';\n\nconst {add2} = require('@testing/unit');\n\nit('can add two to a number', () => {\n // highlight-next-line\n expect(add2(2)).to.equal(4);\n});\n"})}),"\n",(0,s.jsx)(r.Z,{cmd:"test",children:(0,s.jsx)(n.p,{children:"and try again:"})}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:" \u2713 can add two to a number\n\n 1 passing (4ms)\n"})}),"\n",(0,s.jsx)(n.p,{children:"Everything's good!"}),"\n",(0,s.jsx)(n.h3,{id:"platform-specificity",children:"Platform-specificity"}),"\n",(0,s.jsx)(n.p,{children:"flecks also allows you to write tests that only target a specific platform. Let's add web support\nand then write a test that only runs for the client:"}),"\n",(0,s.jsx)(l.Z,{cmd:"flecks add @flecks/web"}),"\n",(0,s.jsxs)(n.p,{children:["Now, let's add a test. We add a client test by adding a ",(0,s.jsx)(n.code,{children:"client"})," directory to our ",(0,s.jsx)(n.code,{children:"test"}),"\ndirectory and putting tests there:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-javascript",metastring:'title="packages/example/test/client/add3.js"',children:"import {expect} from 'chai';\n\nconst {add3} = require('@testing/unit');\n\nit('can add three to a number', () => {\n // highlight-next-line\n expect(add3(2)).to.equal(6);\n});\n"})}),"\n",(0,s.jsx)(n.admonition,{type:"note",children:(0,s.jsx)(n.p,{children:"We intentionally made a mistake again to show a test failure."})}),"\n",(0,s.jsx)(n.h4,{id:"check-it",children:"Check it"}),"\n",(0,s.jsx)(n.p,{children:"Start your application, visit your website in the browser, and you will see:"}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"A screenshot of a browser showing the test runner page with our test failing",src:t(5408).Z+"",width:"1800",height:"1141"})}),"\n",(0,s.jsx)(n.p,{children:"The test is failing! That's what we expected."}),"\n",(0,s.jsx)(n.p,{children:"Now, edit your client test to fix it:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-javascript",metastring:'title="packages/unit/test/client/add3.js"',children:"import {expect} from 'chai';\n\nconst {add3} = require('@testing/unit');\n\nit('can add three to a number', () => {\n // highlight-next-line\n expect(add3(2)).to.equal(5);\n});\n"})}),"\n",(0,s.jsxs)(n.p,{children:["Save the file. If you still have your application running, go look at the page. You'll notice that\n",(0,s.jsx)(n.strong,{children:"it updated automatically"})," to look like:"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"A screenshot of a browser showing the test runner page with our test passing",src:t(5480).Z+"",width:"1833",height:"850"})}),"\n",(0,s.jsx)(n.p,{children:"Awesome, everything passes!"}),"\n",(0,s.jsxs)(n.admonition,{title:"Sanity check",type:"info",children:[(0,s.jsx)(r.Z,{cmd:"test",children:(0,s.jsxs)(n.p,{children:["If you run ",(0,s.jsxs)(n.strong,{children:["from your ",(0,s.jsx)(n.code,{children:"packages/example"})," directory"]}),":"]})}),(0,s.jsx)(n.p,{children:"You will see that only one test was run:"}),(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:" \u2713 can add two to a number\n\n 1 passing (3ms)\n"})}),(0,s.jsx)(n.p,{children:"That's correct; we only run client tests on the client."})]}),"\n",(0,s.jsx)(n.h2,{id:"linting",children:"Linting"}),"\n",(0,s.jsxs)(n.p,{children:["flecks automatically includes support for ESLint through a ",(0,s.jsx)(n.code,{children:"lint"})," run script. flecks configures a\nlot of default rules including a lightly-tweaked version of\n",(0,s.jsx)(n.a,{href:"https://airbnb.io/javascript/",children:(0,s.jsx)(n.code,{children:"eslint-config-airbnb"})})," as well as overrides for special\ncircumstances: for instance, loosening some rules for the ",(0,s.jsx)(n.code,{children:"test"})," directory."]}),"\n",(0,s.jsx)(n.h3,{id:"builddefaulteslintconfigjs",children:(0,s.jsx)(n.code,{children:"build/default.eslint.config.js"})}),"\n",(0,s.jsxs)(n.p,{children:["You may want to completely change these defaults and you can do so by creating a file\n",(0,s.jsx)(n.code,{children:"build/default.eslint.config.js"}),":"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-js",metastring:'title="build/default.eslint.config.js"',children:"const flecksEslintDefaults = require('@flecks/build/build/default.eslint.config');\nmodule.exports = async (flecks) => ({\n extends: [\n await flecksEslintDefaults(flecks),\n ],\n // ...\n});\n"})}),"\n",(0,s.jsx)(n.p,{children:"Again, you don't actually have to extend the configuration like that, you could return your own!"}),"\n",(0,s.jsx)(n.admonition,{title:"Wait a minute, is that asynchronous ESLint configuration?",type:"info",children:(0,s.jsxs)(n.p,{children:["ESLint has made *",(0,s.jsx)(n.em,{children:"async noises"}),"* lately, but as of this writing, the actually-working version requires\nyou to write synchronous configuration files. ",(0,s.jsx)(n.em,{children:"So how does flecks do it"}),"? Honestly?\n",(0,s.jsx)(n.a,{href:"https://github.com/cha0s/flecks/blob/master/packages/build/build/eslint.config.js",children:"Don't ask..."}),"\nWe interface with torturous APIs so you don't have to!"]})})]})}function p(e={}){const{wrapper:n}={...(0,i.a)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},4283:(e,n,t)=>{t.d(n,{Z:()=>a});var s=t(9286),i=t(4866),l=t(5162),r=t(5893);function a(e){let{children:n,cmd:t,headless:a=!1}=e;const o=Array.isArray(t)?t:[t],c=e=>o.map((n=>`${e} ${n}`)).join("\n");return(0,r.jsxs)(i.Z,{className:a&&"headless",groupId:"package-manager",children:[(0,r.jsxs)(l.Z,{value:"npm",label:"npm",children:[n,(0,r.jsx)(s.Z,{language:"bash",children:c("npx")})]}),(0,r.jsxs)(l.Z,{value:"yarn",label:"Yarn",children:[n,(0,r.jsx)(s.Z,{language:"bash",children:c("yarn")})]}),(0,r.jsxs)(l.Z,{value:"pnpm",label:"pnpm",children:[n,(0,r.jsx)(s.Z,{language:"bash",children:c("pnpx")})]}),(0,r.jsxs)(l.Z,{value:"bun",label:"Bun",children:[n,(0,r.jsx)(s.Z,{language:"bash",children:c("bunx")})]})]})}},6569:(e,n,t)=>{t.d(n,{Z:()=>a});var s=t(9286),i=t(4866),l=t(5162),r=t(5893);function a(e){let{children:n,cmd:t,headless:a=!1}=e;return(0,r.jsxs)(i.Z,{className:a&&"headless",groupId:"package-manager",children:[(0,r.jsxs)(l.Z,{value:"npm",label:"npm",children:[n,(0,r.jsxs)(s.Z,{language:"bash",children:["npm run ",t]})]}),(0,r.jsxs)(l.Z,{value:"yarn",label:"Yarn",children:[n,(0,r.jsxs)(s.Z,{language:"bash",children:["yarn run ",t]})]}),(0,r.jsxs)(l.Z,{value:"pnpm",label:"pnpm",children:[n,(0,r.jsxs)(s.Z,{language:"bash",children:["pnpm run ",t]})]}),(0,r.jsxs)(l.Z,{value:"bun",label:"Bun",children:[n,(0,r.jsxs)(s.Z,{language:"bash",children:["bun run ",t]})]})]})}},5162:(e,n,t)=>{t.d(n,{Z:()=>r});t(7294);var s=t(512);const i={tabItem:"tabItem_Ymn6"};var l=t(5893);function r(e){let{children:n,hidden:t,className:r}=e;return(0,l.jsx)("div",{role:"tabpanel",className:(0,s.Z)(i.tabItem,r),hidden:t,children:n})}},4866:(e,n,t)=>{t.d(n,{Z:()=>w});var s=t(7294),i=t(512),l=t(2466),r=t(6550),a=t(469),o=t(1980),c=t(7392),d=t(12);function u(e){return s.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,s.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function h(e){const{values:n,children:t}=e;return(0,s.useMemo)((()=>{const e=n??function(e){return u(e).map((e=>{let{props:{value:n,label:t,attributes:s,default:i}}=e;return{value:n,label:t,attributes:s,default:i}}))}(t);return function(e){const n=(0,c.l)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,t])}function p(e){let{value:n,tabValues:t}=e;return t.some((e=>e.value===n))}function f(e){let{queryString:n=!1,groupId:t}=e;const i=(0,r.k6)(),l=function(e){let{queryString:n=!1,groupId:t}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!t)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return t??null}({queryString:n,groupId:t});return[(0,o._X)(l),(0,s.useCallback)((e=>{if(!l)return;const n=new URLSearchParams(i.location.search);n.set(l,e),i.replace({...i.location,search:n.toString()})}),[l,i])]}function x(e){const{defaultValue:n,queryString:t=!1,groupId:i}=e,l=h(e),[r,o]=(0,s.useState)((()=>function(e){let{defaultValue:n,tabValues:t}=e;if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!p({value:n,tabValues:t}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${t.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const s=t.find((e=>e.default))??t[0];if(!s)throw new Error("Unexpected error: 0 tabValues");return s.value}({defaultValue:n,tabValues:l}))),[c,u]=f({queryString:t,groupId:i}),[x,g]=function(e){let{groupId:n}=e;const t=function(e){return e?`docusaurus.tab.${e}`:null}(n),[i,l]=(0,d.Nk)(t);return[i,(0,s.useCallback)((e=>{t&&l.set(e)}),[t,l])]}({groupId:i}),j=(()=>{const e=c??x;return p({value:e,tabValues:l})?e:null})();(0,a.Z)((()=>{j&&o(j)}),[j]);return{selectedValue:r,selectValue:(0,s.useCallback)((e=>{if(!p({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);o(e),u(e),g(e)}),[u,g,l]),tabValues:l}}var g=t(2389);const j={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var m=t(5893);function k(e){let{className:n,block:t,selectedValue:s,selectValue:r,tabValues:a}=e;const o=[],{blockElementScrollPositionUntilNextRender:c}=(0,l.o5)(),d=e=>{const n=e.currentTarget,t=o.indexOf(n),i=a[t].value;i!==s&&(c(n),r(i))},u=e=>{let n=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const t=o.indexOf(e.currentTarget)+1;n=o[t]??o[0];break}case"ArrowLeft":{const t=o.indexOf(e.currentTarget)-1;n=o[t]??o[o.length-1];break}}n?.focus()};return(0,m.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,i.Z)("tabs",{"tabs--block":t},n),children:a.map((e=>{let{value:n,label:t,attributes:l}=e;return(0,m.jsx)("li",{role:"tab",tabIndex:s===n?0:-1,"aria-selected":s===n,ref:e=>o.push(e),onKeyDown:u,onClick:d,...l,className:(0,i.Z)("tabs__item",j.tabItem,l?.className,{"tabs__item--active":s===n}),children:t??n},n)}))})}function b(e){let{lazy:n,children:t,selectedValue:i}=e;const l=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){const e=l.find((e=>e.props.value===i));return e?(0,s.cloneElement)(e,{className:"margin-top--md"}):null}return(0,m.jsx)("div",{className:"margin-top--md",children:l.map(((e,n)=>(0,s.cloneElement)(e,{key:n,hidden:e.props.value!==i})))})}function y(e){const n=x(e);return(0,m.jsxs)("div",{className:(0,i.Z)("tabs-container",j.tabList),children:[(0,m.jsx)(k,{...e,...n}),(0,m.jsx)(b,{...e,...n})]})}function w(e){const n=(0,g.Z)();return(0,m.jsx)(y,{...e,children:u(e.children)},String(n))}},5408:(e,n,t)=>{t.d(n,{Z:()=>s});const s=t.p+"assets/images/flecks-test-client-failed-49e983143a480c8c9d4923f33d085bb9.png"},5480:(e,n,t)=>{t.d(n,{Z:()=>s});const s=t.p+"assets/images/flecks-test-client-passed-8ca37755e8231280a12ef6a2240da94b.png"}}]); \ No newline at end of file diff --git a/assets/js/773fe5c0.316c3d4e.js b/assets/js/773fe5c0.316c3d4e.js deleted file mode 100644 index c9713610..00000000 --- a/assets/js/773fe5c0.316c3d4e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkflecks_docusaurus=self.webpackChunkflecks_docusaurus||[]).push([[1144],{9192:(e,s,c)=>{c.r(s),c.d(s,{assets:()=>o,contentTitle:()=>a,default:()=>x,frontMatter:()=>r,metadata:()=>t,toc:()=>h});var l=c(5893),n=c(1151),i=c(9286),d=c(7113);const r={title:"Fleck configuration",description:"All the configurable flecks in this project."},a=void 0,t={id:"flecks/config",title:"Fleck configuration",description:"All the configurable flecks in this project.",source:"@site/docs/flecks/config.mdx",sourceDirName:"flecks",slug:"/flecks/config",permalink:"/flecks/docs/flecks/config",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{title:"Fleck configuration",description:"All the configurable flecks in this project."},sidebar:"flecksSidebar",previous:{title:"Hooks",permalink:"/flecks/docs/flecks/hooks"},next:{title:"Build files",permalink:"/flecks/docs/flecks/build-files"}},o={},h=[{value:"@flecks/build",id:"flecksbuild",level:2},{value:"@flecks/core",id:"fleckscore",level:2},{value:"@flecks/db",id:"flecksdb",level:2},{value:"@flecks/docker",id:"flecksdocker",level:2},{value:"@flecks/dox",id:"flecksdox",level:2},{value:"@flecks/electron",id:"fleckselectron",level:2},{value:"@flecks/fleck",id:"flecksfleck",level:2},{value:"@flecks/passport",id:"fleckspassport",level:2},{value:"@flecks/react",id:"flecksreact",level:2},{value:"@flecks/redis",id:"flecksredis",level:2},{value:"@flecks/server",id:"flecksserver",level:2},{value:"@flecks/session/server",id:"fleckssessionserver",level:2},{value:"@flecks/web",id:"flecksweb",level:2}];function j(e){const s={a:"a",code:"code",h2:"h2",p:"p",...(0,n.a)(),...e.components};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(s.p,{children:"This page documents all configurable flecks in this project."}),"\n",(0,l.jsx)(s.h2,{id:"flecksbuild",children:(0,l.jsx)(s.code,{children:"@flecks/build"})}),"\n",(0,l.jsxs)("table",{className:d.Z.configTable,children:[(0,l.jsxs)("thead",{children:[(0,l.jsx)("td",{className:d.Z.configBig,children:"Description"}),(0,l.jsx)("td",{children:"Name"}),(0,l.jsx)("td",{children:"Default value"})]}),(0,l.jsxs)("tbody",{children:[(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2"})}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2",children:"The package manager used for tasks."})}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("td",{className:d.Z.configBig,children:"The package manager used for tasks."}),(0,l.jsx)("td",{children:(0,l.jsx)(s.code,{children:"packageManager"})}),(0,l.jsx)("td",{children:(0,l.jsx)(i.Z,{language:"javascript",children:"'npm'"})})]}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2"})}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsxs)("td",{colspan:"2",children:["Build targets to profile with ",(0,l.jsx)(s.code,{children:"webpack.debug.ProfilingPlugin"}),"."]})}),(0,l.jsxs)("tr",{children:[(0,l.jsxs)("td",{className:d.Z.configBig,children:["Build targets to profile with ",(0,l.jsx)(s.code,{children:"webpack.debug.ProfilingPlugin"}),"."]}),(0,l.jsx)("td",{children:(0,l.jsx)(s.code,{children:"profile"})}),(0,l.jsx)("td",{children:(0,l.jsx)(i.Z,{language:"javascript",children:"[]"})})]})]})]}),"\n",(0,l.jsx)(s.h2,{id:"fleckscore",children:(0,l.jsx)(s.code,{children:"@flecks/core"})}),"\n",(0,l.jsxs)("table",{className:d.Z.configTable,children:[(0,l.jsxs)("thead",{children:[(0,l.jsx)("td",{className:d.Z.configBig,children:"Description"}),(0,l.jsx)("td",{children:"Name"}),(0,l.jsx)("td",{children:"Default value"})]}),(0,l.jsxs)("tbody",{children:[(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2"})}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2",children:"The ID of your application."})}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("td",{className:d.Z.configBig,children:"The ID of your application."}),(0,l.jsx)("td",{children:(0,l.jsx)(s.code,{children:"id"})}),(0,l.jsx)("td",{children:(0,l.jsx)(i.Z,{language:"javascript",children:"'flecks'"})})]})]})]}),"\n",(0,l.jsx)(s.h2,{id:"flecksdb",children:(0,l.jsx)(s.code,{children:"@flecks/db"})}),"\n",(0,l.jsxs)("table",{className:d.Z.configTable,children:[(0,l.jsxs)("thead",{children:[(0,l.jsx)("td",{className:d.Z.configBig,children:"Description"}),(0,l.jsx)("td",{children:"Name"}),(0,l.jsx)("td",{children:"Default value"})]}),(0,l.jsxs)("tbody",{children:[(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2"})}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2",children:"The database to connect to."})}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("td",{className:d.Z.configBig,children:"The database to connect to."}),(0,l.jsx)("td",{children:(0,l.jsx)(s.code,{children:"database"})}),(0,l.jsx)("td",{children:(0,l.jsx)(i.Z,{language:"javascript",children:"':memory:'"})})]}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2"})}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsxs)("td",{colspan:"2",children:["SQL dialect. See: ",(0,l.jsx)(s.a,{href:"https://sequelize.org/v5/manual/dialects.html",children:"https://sequelize.org/v5/manual/dialects.html"})]})}),(0,l.jsxs)("tr",{children:[(0,l.jsxs)("td",{className:d.Z.configBig,children:["SQL dialect. See: ",(0,l.jsx)(s.a,{href:"https://sequelize.org/v5/manual/dialects.html",children:"https://sequelize.org/v5/manual/dialects.html"})]}),(0,l.jsx)("td",{children:(0,l.jsx)(s.code,{children:"dialect"})}),(0,l.jsx)("td",{children:(0,l.jsx)(i.Z,{language:"javascript",children:"'sqlite'"})})]}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2"})}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2",children:"Database server host."})}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("td",{className:d.Z.configBig,children:"Database server host."}),(0,l.jsx)("td",{children:(0,l.jsx)(s.code,{children:"host"})}),(0,l.jsx)("td",{children:(0,l.jsx)(i.Z,{language:"javascript",children:"undefined"})})]}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2"})}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2",children:"Database server password."})}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("td",{className:d.Z.configBig,children:"Database server password."}),(0,l.jsx)("td",{children:(0,l.jsx)(s.code,{children:"password"})}),(0,l.jsx)("td",{children:(0,l.jsx)(i.Z,{language:"javascript",children:"undefined"})})]}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2"})}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2",children:"Database server port."})}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("td",{className:d.Z.configBig,children:"Database server port."}),(0,l.jsx)("td",{children:(0,l.jsx)(s.code,{children:"port"})}),(0,l.jsx)("td",{children:(0,l.jsx)(i.Z,{language:"javascript",children:"undefined"})})]}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2"})}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2",children:"Database server username."})}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("td",{className:d.Z.configBig,children:"Database server username."}),(0,l.jsx)("td",{children:(0,l.jsx)(s.code,{children:"username"})}),(0,l.jsx)("td",{children:(0,l.jsx)(i.Z,{language:"javascript",children:"undefined"})})]})]})]}),"\n",(0,l.jsx)(s.h2,{id:"flecksdocker",children:(0,l.jsx)(s.code,{children:"@flecks/docker"})}),"\n",(0,l.jsxs)("table",{className:d.Z.configTable,children:[(0,l.jsxs)("thead",{children:[(0,l.jsx)("td",{className:d.Z.configBig,children:"Description"}),(0,l.jsx)("td",{children:"Name"}),(0,l.jsx)("td",{children:"Default value"})]}),(0,l.jsxs)("tbody",{children:[(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2"})}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2",children:"Whether to run docker containers."})}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("td",{className:d.Z.configBig,children:"Whether to run docker containers."}),(0,l.jsx)("td",{children:(0,l.jsx)(s.code,{children:"enabled"})}),(0,l.jsx)("td",{children:(0,l.jsx)(i.Z,{language:"javascript",children:"true"})})]})]})]}),"\n",(0,l.jsx)(s.h2,{id:"flecksdox",children:(0,l.jsx)(s.code,{children:"@flecks/dox"})}),"\n",(0,l.jsxs)("table",{className:d.Z.configTable,children:[(0,l.jsxs)("thead",{children:[(0,l.jsx)("td",{className:d.Z.configBig,children:"Description"}),(0,l.jsx)("td",{children:"Name"}),(0,l.jsx)("td",{children:"Default value"})]}),(0,l.jsxs)("tbody",{children:[(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2"})}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2",children:"Pattern pairs used to rewrite filenames in generated documentation."})}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("td",{className:d.Z.configBig,children:"Pattern pairs used to rewrite filenames in generated documentation."}),(0,l.jsx)("td",{children:(0,l.jsx)(s.code,{children:"rewriteFilenames"})}),(0,l.jsx)("td",{children:(0,l.jsx)(i.Z,{language:"javascript",children:"[]"})})]})]})]}),"\n",(0,l.jsx)(s.h2,{id:"fleckselectron",children:(0,l.jsx)(s.code,{children:"@flecks/electron"})}),"\n",(0,l.jsxs)("table",{className:d.Z.configTable,children:[(0,l.jsxs)("thead",{children:[(0,l.jsx)("td",{className:d.Z.configBig,children:"Description"}),(0,l.jsx)("td",{children:"Name"}),(0,l.jsx)("td",{children:"Default value"})]}),(0,l.jsxs)("tbody",{children:[(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2"})}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsxs)("td",{colspan:"2",children:["Browser window options. See: ",(0,l.jsx)(s.a,{href:"https://www.electronjs.org/docs/latest/api/browser-window",children:"https://www.electronjs.org/docs/latest/api/browser-window"})]})}),(0,l.jsxs)("tr",{children:[(0,l.jsxs)("td",{className:d.Z.configBig,children:["Browser window options. See: ",(0,l.jsx)(s.a,{href:"https://www.electronjs.org/docs/latest/api/browser-window",children:"https://www.electronjs.org/docs/latest/api/browser-window"})]}),(0,l.jsx)("td",{children:(0,l.jsx)(s.code,{children:"browserWindowOptions"})}),(0,l.jsx)("td",{children:(0,l.jsx)(i.Z,{language:"javascript",children:"{}"})})]}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2"})}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2",children:"Install devtools extensions (by default). You can pass an array of Chrome store IDs to install a list of custom extensions."})}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("td",{className:d.Z.configBig,children:"Install devtools extensions (by default). You can pass an array of Chrome store IDs to install a list of custom extensions."}),(0,l.jsx)("td",{children:(0,l.jsx)(s.code,{children:"installExtensions"})}),(0,l.jsx)("td",{children:(0,l.jsx)(i.Z,{language:"javascript",children:"true"})})]}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2"})}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2",children:"Quit the app when all windows are closed."})}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("td",{className:d.Z.configBig,children:"Quit the app when all windows are closed."}),(0,l.jsx)("td",{children:(0,l.jsx)(s.code,{children:"quitOnClosed"})}),(0,l.jsx)("td",{children:(0,l.jsx)(i.Z,{language:"javascript",children:"true"})})]}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2"})}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsxs)("td",{colspan:"2",children:["The URL to load in electron by default. Defaults to ",(0,l.jsx)(s.code,{children:"http://${flecks.get('@flecks/web.public')}"}),"."]})}),(0,l.jsxs)("tr",{children:[(0,l.jsxs)("td",{className:d.Z.configBig,children:["The URL to load in electron by default. Defaults to ",(0,l.jsx)(s.code,{children:"http://${flecks.get('@flecks/web.public')}"}),"."]}),(0,l.jsx)("td",{children:(0,l.jsx)(s.code,{children:"url"})}),(0,l.jsx)("td",{children:(0,l.jsx)(i.Z,{language:"javascript",children:"undefined"})})]})]})]}),"\n",(0,l.jsx)(s.h2,{id:"flecksfleck",children:(0,l.jsx)(s.code,{children:"@flecks/fleck"})}),"\n",(0,l.jsxs)("table",{className:d.Z.configTable,children:[(0,l.jsxs)("thead",{children:[(0,l.jsx)("td",{className:d.Z.configBig,children:"Description"}),(0,l.jsx)("td",{children:"Name"}),(0,l.jsx)("td",{children:"Default value"})]}),(0,l.jsxs)("tbody",{children:[(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2"})}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2",children:"Webpack stats configuration."})}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("td",{className:d.Z.configBig,children:"Webpack stats configuration."}),(0,l.jsx)("td",{children:(0,l.jsx)(s.code,{children:"stats"})}),(0,l.jsx)("td",{children:(0,l.jsx)(i.Z,{language:"javascript",children:"{\n colors: true,\n errorDetails: true,\n}"})})]})]})]}),"\n",(0,l.jsx)(s.h2,{id:"fleckspassport",children:(0,l.jsx)(s.code,{children:"@flecks/passport"})}),"\n",(0,l.jsxs)("table",{className:d.Z.configTable,children:[(0,l.jsxs)("thead",{children:[(0,l.jsx)("td",{className:d.Z.configBig,children:"Description"}),(0,l.jsx)("td",{children:"Name"}),(0,l.jsx)("td",{children:"Default value"})]}),(0,l.jsxs)("tbody",{children:[(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2"})}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2",children:"Path to redirect to after failed login."})}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("td",{className:d.Z.configBig,children:"Path to redirect to after failed login."}),(0,l.jsx)("td",{children:(0,l.jsx)(s.code,{children:"failureRedirect"})}),(0,l.jsx)("td",{children:(0,l.jsx)(i.Z,{language:"javascript",children:"'/'"})})]}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2"})}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2",children:"Path to redirect to after logout."})}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("td",{className:d.Z.configBig,children:"Path to redirect to after logout."}),(0,l.jsx)("td",{children:(0,l.jsx)(s.code,{children:"logoutRedirect"})}),(0,l.jsx)("td",{children:(0,l.jsx)(i.Z,{language:"javascript",children:"'/'"})})]}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2"})}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2",children:"Path to redirect to after successful login."})}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("td",{className:d.Z.configBig,children:"Path to redirect to after successful login."}),(0,l.jsx)("td",{children:(0,l.jsx)(s.code,{children:"successRedirect"})}),(0,l.jsx)("td",{children:(0,l.jsx)(i.Z,{language:"javascript",children:"'/'"})})]})]})]}),"\n",(0,l.jsx)(s.h2,{id:"flecksreact",children:(0,l.jsx)(s.code,{children:"@flecks/react"})}),"\n",(0,l.jsxs)("table",{className:d.Z.configTable,children:[(0,l.jsxs)("thead",{children:[(0,l.jsx)("td",{className:d.Z.configBig,children:"Description"}),(0,l.jsx)("td",{children:"Name"}),(0,l.jsx)("td",{children:"Default value"})]}),(0,l.jsxs)("tbody",{children:[(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2"})}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2",children:"React providers."})}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("td",{className:d.Z.configBig,children:"React providers."}),(0,l.jsx)("td",{children:(0,l.jsx)(s.code,{children:"providers"})}),(0,l.jsx)("td",{children:(0,l.jsx)(i.Z,{language:"javascript",children:"['...']"})})]}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2"})}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2",children:"Whether to enable server-side rendering."})}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("td",{className:d.Z.configBig,children:"Whether to enable server-side rendering."}),(0,l.jsx)("td",{children:(0,l.jsx)(s.code,{children:"ssr"})}),(0,l.jsx)("td",{children:(0,l.jsx)(i.Z,{language:"javascript",children:"true"})})]})]})]}),"\n",(0,l.jsx)(s.h2,{id:"flecksredis",children:(0,l.jsx)(s.code,{children:"@flecks/redis"})}),"\n",(0,l.jsxs)("table",{className:d.Z.configTable,children:[(0,l.jsxs)("thead",{children:[(0,l.jsx)("td",{className:d.Z.configBig,children:"Description"}),(0,l.jsx)("td",{children:"Name"}),(0,l.jsx)("td",{children:"Default value"})]}),(0,l.jsxs)("tbody",{children:[(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2"})}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2",children:"Redis server host."})}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("td",{className:d.Z.configBig,children:"Redis server host."}),(0,l.jsx)("td",{children:(0,l.jsx)(s.code,{children:"host"})}),(0,l.jsx)("td",{children:(0,l.jsx)(i.Z,{language:"javascript",children:"'localhost'"})})]}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2"})}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2",children:"Redis server port."})}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("td",{className:d.Z.configBig,children:"Redis server port."}),(0,l.jsx)("td",{children:(0,l.jsx)(s.code,{children:"port"})}),(0,l.jsx)("td",{children:(0,l.jsx)(i.Z,{language:"javascript",children:"6379"})})]})]})]}),"\n",(0,l.jsx)(s.h2,{id:"flecksserver",children:(0,l.jsx)(s.code,{children:"@flecks/server"})}),"\n",(0,l.jsxs)("table",{className:d.Z.configTable,children:[(0,l.jsxs)("thead",{children:[(0,l.jsx)("td",{className:d.Z.configBig,children:"Description"}),(0,l.jsx)("td",{children:"Name"}),(0,l.jsx)("td",{children:"Default value"})]}),(0,l.jsxs)("tbody",{children:[(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2"})}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2",children:"Whether HMR is enabled."})}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("td",{className:d.Z.configBig,children:"Whether HMR is enabled."}),(0,l.jsx)("td",{children:(0,l.jsx)(s.code,{children:"hot"})}),(0,l.jsx)("td",{children:(0,l.jsx)(i.Z,{language:"javascript",children:"false"})})]}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2"})}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsxs)("td",{colspan:"2",children:["Arguments to pass along to node. See: ",(0,l.jsx)(s.a,{href:"https://nodejs.org/api/cli.html",children:"https://nodejs.org/api/cli.html"})]})}),(0,l.jsxs)("tr",{children:[(0,l.jsxs)("td",{className:d.Z.configBig,children:["Arguments to pass along to node. See: ",(0,l.jsx)(s.a,{href:"https://nodejs.org/api/cli.html",children:"https://nodejs.org/api/cli.html"})]}),(0,l.jsx)("td",{children:(0,l.jsx)(s.code,{children:"nodeArgs"})}),(0,l.jsx)("td",{children:(0,l.jsx)(i.Z,{language:"javascript",children:"[]"})})]}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2"})}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsxs)("td",{colspan:"2",children:["Environment to pass along to node. See: ",(0,l.jsx)(s.a,{href:"https://nodejs.org/api/cli.html#environment-variables",children:"https://nodejs.org/api/cli.html#environment-variables"})]})}),(0,l.jsxs)("tr",{children:[(0,l.jsxs)("td",{className:d.Z.configBig,children:["Environment to pass along to node. See: ",(0,l.jsx)(s.a,{href:"https://nodejs.org/api/cli.html#environment-variables",children:"https://nodejs.org/api/cli.html#environment-variables"})]}),(0,l.jsx)("td",{children:(0,l.jsx)(s.code,{children:"nodeEnv"})}),(0,l.jsx)("td",{children:(0,l.jsx)(i.Z,{language:"javascript",children:"{}"})})]}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2"})}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2",children:"Whether to start the server after building."})}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("td",{className:d.Z.configBig,children:"Whether to start the server after building."}),(0,l.jsx)("td",{children:(0,l.jsx)(s.code,{children:"start"})}),(0,l.jsx)("td",{children:(0,l.jsx)(i.Z,{language:"javascript",children:"true"})})]}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2"})}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2",children:"Webpack stats configuration."})}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("td",{className:d.Z.configBig,children:"Webpack stats configuration."}),(0,l.jsx)("td",{children:(0,l.jsx)(s.code,{children:"stats"})}),(0,l.jsx)("td",{children:(0,l.jsx)(i.Z,{language:"javascript",children:"{\n colors: true,\n errorDetails: true,\n}"})})]})]})]}),"\n",(0,l.jsx)(s.h2,{id:"fleckssessionserver",children:(0,l.jsx)(s.code,{children:"@flecks/session/server"})}),"\n",(0,l.jsxs)("table",{className:d.Z.configTable,children:[(0,l.jsxs)("thead",{children:[(0,l.jsx)("td",{className:d.Z.configBig,children:"Description"}),(0,l.jsx)("td",{children:"Name"}),(0,l.jsx)("td",{children:"Default value"})]}),(0,l.jsxs)("tbody",{children:[(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2"})}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsxs)("td",{colspan:"2",children:["Set the cookie secret for session encryption. See: ",(0,l.jsx)(s.a,{href:"http://expressjs.com/en/resources/middleware/cookie-parser.html",children:"http://expressjs.com/en/resources/middleware/cookie-parser.html"})]})}),(0,l.jsxs)("tr",{children:[(0,l.jsxs)("td",{className:d.Z.configBig,children:["Set the cookie secret for session encryption. See: ",(0,l.jsx)(s.a,{href:"http://expressjs.com/en/resources/middleware/cookie-parser.html",children:"http://expressjs.com/en/resources/middleware/cookie-parser.html"})]}),(0,l.jsx)("td",{children:(0,l.jsx)(s.code,{children:"cookieSecret"})}),(0,l.jsx)("td",{children:(0,l.jsx)(i.Z,{language:"javascript",children:"'Set the FLECKS_ENV__flecks_session_server__cookieSecret environment variable!'"})})]})]})]}),"\n",(0,l.jsx)(s.h2,{id:"flecksweb",children:(0,l.jsx)(s.code,{children:"@flecks/web"})}),"\n",(0,l.jsxs)("table",{className:d.Z.configTable,children:[(0,l.jsxs)("thead",{children:[(0,l.jsx)("td",{className:d.Z.configBig,children:"Description"}),(0,l.jsx)("td",{children:"Name"}),(0,l.jsx)("td",{children:"Default value"})]}),(0,l.jsxs)("tbody",{children:[(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2"})}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2",children:"The ID of the root element on the page."})}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("td",{className:d.Z.configBig,children:"The ID of the root element on the page."}),(0,l.jsx)("td",{children:(0,l.jsx)(s.code,{children:"appMountId"})}),(0,l.jsx)("td",{children:(0,l.jsx)(i.Z,{language:"javascript",children:"'root'"})})]}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2"})}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2",children:"Base tag path."})}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("td",{className:d.Z.configBig,children:"Base tag path."}),(0,l.jsx)("td",{children:(0,l.jsx)(s.code,{children:"base"})}),(0,l.jsx)("td",{children:(0,l.jsx)(i.Z,{language:"javascript",children:"'/'"})})]}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2"})}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsxs)("td",{colspan:"2",children:["(webpack-dev-server) Disable the host check. See: ",(0,l.jsx)(s.a,{href:"https://github.com/webpack/webpack-dev-server/issues/887",children:"https://github.com/webpack/webpack-dev-server/issues/887"})]})}),(0,l.jsxs)("tr",{children:[(0,l.jsxs)("td",{className:d.Z.configBig,children:["(webpack-dev-server) Disable the host check. See: ",(0,l.jsx)(s.a,{href:"https://github.com/webpack/webpack-dev-server/issues/887",children:"https://github.com/webpack/webpack-dev-server/issues/887"})]}),(0,l.jsx)("td",{children:(0,l.jsx)(s.code,{children:"devDisableHostCheck"})}),(0,l.jsx)("td",{children:(0,l.jsx)(i.Z,{language:"javascript",children:"false"})})]}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2"})}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2",children:"(webpack-dev-server) Host to bind."})}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("td",{className:d.Z.configBig,children:"(webpack-dev-server) Host to bind."}),(0,l.jsx)("td",{children:(0,l.jsx)(s.code,{children:"devHost"})}),(0,l.jsx)("td",{children:(0,l.jsx)(i.Z,{language:"javascript",children:"'localhost'"})})]}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2"})}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2",children:"(webpack-dev-server) Port to bind."})}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("td",{className:d.Z.configBig,children:"(webpack-dev-server) Port to bind."}),(0,l.jsx)("td",{children:(0,l.jsx)(s.code,{children:"devPort"})}),(0,l.jsx)("td",{children:(0,l.jsx)(i.Z,{language:"javascript",children:"undefined"})})]}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2"})}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsxs)("td",{colspan:"2",children:["(webpack-dev-server) Public path to serve. Defaults to ",(0,l.jsx)(s.code,{children:"flecks.get('@flecks/web.public')"}),"."]})}),(0,l.jsxs)("tr",{children:[(0,l.jsxs)("td",{className:d.Z.configBig,children:["(webpack-dev-server) Public path to serve. Defaults to ",(0,l.jsx)(s.code,{children:"flecks.get('@flecks/web.public')"}),"."]}),(0,l.jsx)("td",{children:(0,l.jsx)(s.code,{children:"devPublic"})}),(0,l.jsx)("td",{children:(0,l.jsx)(i.Z,{language:"javascript",children:"undefined"})})]}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2"})}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2",children:"(webpack-dev-server) Webpack stats output."})}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("td",{className:d.Z.configBig,children:"(webpack-dev-server) Webpack stats output."}),(0,l.jsx)("td",{children:(0,l.jsx)(s.code,{children:"devStats"})}),(0,l.jsx)("td",{children:(0,l.jsx)(i.Z,{language:"javascript",children:"{\n colors: true,\n errorDetails: true,\n}"})})]}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2"})}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsxs)("td",{colspan:"2",children:["Modules to externalize using ",(0,l.jsx)(s.code,{children:"webpack.DllPlugin"}),"."]})}),(0,l.jsxs)("tr",{children:[(0,l.jsxs)("td",{className:d.Z.configBig,children:["Modules to externalize using ",(0,l.jsx)(s.code,{children:"webpack.DllPlugin"}),"."]}),(0,l.jsx)("td",{children:(0,l.jsx)(s.code,{children:"dll"})}),(0,l.jsx)("td",{children:(0,l.jsx)(i.Z,{language:"javascript",children:"[]"})})]}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2"})}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2",children:"Host to bind."})}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("td",{className:d.Z.configBig,children:"Host to bind."}),(0,l.jsx)("td",{children:(0,l.jsx)(s.code,{children:"host"})}),(0,l.jsx)("td",{children:(0,l.jsx)(i.Z,{language:"javascript",children:"'0.0.0.0'"})})]}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2"})}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2",children:"Path to icon."})}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("td",{className:d.Z.configBig,children:"Path to icon."}),(0,l.jsx)("td",{children:(0,l.jsx)(s.code,{children:"icon"})}),(0,l.jsx)("td",{children:(0,l.jsx)(i.Z,{language:"javascript",children:"''"})})]}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2"})}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2",children:"Port to bind."})}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("td",{className:d.Z.configBig,children:"Port to bind."}),(0,l.jsx)("td",{children:(0,l.jsx)(s.code,{children:"port"})}),(0,l.jsx)("td",{children:(0,l.jsx)(i.Z,{language:"javascript",children:"32340"})})]}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2"})}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2",children:"Meta tags."})}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("td",{className:d.Z.configBig,children:"Meta tags."}),(0,l.jsx)("td",{children:(0,l.jsx)(s.code,{children:"meta"})}),(0,l.jsx)("td",{children:(0,l.jsx)(i.Z,{language:"javascript",children:"{\n charset: 'utf-8',\n viewport: 'width=device-width, user-scalable=no',\n}"})})]}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2"})}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2",children:"Public path to server."})}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("td",{className:d.Z.configBig,children:"Public path to server."}),(0,l.jsx)("td",{children:(0,l.jsx)(s.code,{children:"public"})}),(0,l.jsx)("td",{children:(0,l.jsx)(i.Z,{language:"javascript",children:"'localhost:32340'"})})]}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2"})}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2",children:"Webpack stats configuration."})}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("td",{className:d.Z.configBig,children:"Webpack stats configuration."}),(0,l.jsx)("td",{children:(0,l.jsx)(s.code,{children:"stats"})}),(0,l.jsx)("td",{children:(0,l.jsx)(i.Z,{language:"javascript",children:"{\n colors: true,\n errorDetails: true,\n}"})})]}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2"})}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2",children:"HTML title."})}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("td",{className:d.Z.configBig,children:"HTML title."}),(0,l.jsx)("td",{children:(0,l.jsx)(s.code,{children:"title"})}),(0,l.jsx)("td",{children:(0,l.jsx)(i.Z,{language:"javascript",children:"'[@flecks/core.id]'"})})]}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsx)("td",{colspan:"2"})}),(0,l.jsx)("tr",{className:d.Z.configSmall,children:(0,l.jsxs)("td",{colspan:"2",children:["Proxies to trust. See: ",(0,l.jsx)(s.a,{href:"https://www.npmjs.com/package/proxy-addr",children:"https://www.npmjs.com/package/proxy-addr"})]})}),(0,l.jsxs)("tr",{children:[(0,l.jsxs)("td",{className:d.Z.configBig,children:["Proxies to trust. See: ",(0,l.jsx)(s.a,{href:"https://www.npmjs.com/package/proxy-addr",children:"https://www.npmjs.com/package/proxy-addr"})]}),(0,l.jsx)("td",{children:(0,l.jsx)(s.code,{children:"trust"})}),(0,l.jsx)("td",{children:(0,l.jsx)(i.Z,{language:"javascript",children:"false"})})]})]})]})]})}function x(e={}){const{wrapper:s}={...(0,n.a)(),...e.components};return s?(0,l.jsx)(s,{...e,children:(0,l.jsx)(j,{...e})}):j(e)}},7113:(e,s,c)=>{c.d(s,{Z:()=>l});const l={configBig:"configBig_NxNb",configSmall:"configSmall_SLee",configTable:"configTable_hbGc",hooks:"hooks_uvt_"}}}]); \ No newline at end of file diff --git a/assets/js/773fe5c0.c31691b0.js b/assets/js/773fe5c0.c31691b0.js new file mode 100644 index 00000000..e28b3dc8 --- /dev/null +++ b/assets/js/773fe5c0.c31691b0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkflecks_docusaurus=self.webpackChunkflecks_docusaurus||[]).push([[1144],{9192:(e,s,l)=>{l.r(s),l.d(s,{assets:()=>o,contentTitle:()=>a,default:()=>x,frontMatter:()=>r,metadata:()=>t,toc:()=>h});var c=l(5893),i=l(1151),n=l(9286),d=l(7113);const r={title:"Fleck configuration",description:"All the configurable flecks in this project."},a=void 0,t={id:"flecks/config",title:"Fleck configuration",description:"All the configurable flecks in this project.",source:"@site/docs/flecks/config.mdx",sourceDirName:"flecks",slug:"/flecks/config",permalink:"/flecks/docs/flecks/config",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{title:"Fleck configuration",description:"All the configurable flecks in this project."},sidebar:"flecksSidebar",previous:{title:"Hooks",permalink:"/flecks/docs/flecks/hooks"},next:{title:"Build files",permalink:"/flecks/docs/flecks/build-files"}},o={},h=[{value:"@flecks/build",id:"flecksbuild",level:2},{value:"@flecks/core",id:"fleckscore",level:2},{value:"@flecks/db",id:"flecksdb",level:2},{value:"@flecks/docker",id:"flecksdocker",level:2},{value:"@flecks/dox",id:"flecksdox",level:2},{value:"@flecks/electron",id:"fleckselectron",level:2},{value:"@flecks/fleck",id:"flecksfleck",level:2},{value:"@flecks/passport",id:"fleckspassport",level:2},{value:"@flecks/react",id:"flecksreact",level:2},{value:"@flecks/redis",id:"flecksredis",level:2},{value:"@flecks/server",id:"flecksserver",level:2},{value:"@flecks/session/server",id:"fleckssessionserver",level:2},{value:"@flecks/web",id:"flecksweb",level:2}];function j(e){const s={a:"a",code:"code",h2:"h2",p:"p",...(0,i.a)(),...e.components};return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(s.p,{children:"This page documents all configurable flecks in this project."}),"\n",(0,c.jsx)(s.h2,{id:"flecksbuild",children:(0,c.jsx)(s.code,{children:"@flecks/build"})}),"\n",(0,c.jsxs)("table",{className:d.Z.configTable,children:[(0,c.jsxs)("thead",{children:[(0,c.jsx)("td",{className:d.Z.configBig,children:"Description"}),(0,c.jsx)("td",{children:"Name"}),(0,c.jsx)("td",{children:"Default value"})]}),(0,c.jsxs)("tbody",{children:[(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2"})}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsxs)("td",{colspan:"2",children:["Build targets to profile with ",(0,c.jsx)(s.code,{children:"webpack.debug.ProfilingPlugin"}),"."]})}),(0,c.jsxs)("tr",{children:[(0,c.jsxs)("td",{className:d.Z.configBig,children:["Build targets to profile with ",(0,c.jsx)(s.code,{children:"webpack.debug.ProfilingPlugin"}),"."]}),(0,c.jsx)("td",{children:(0,c.jsx)(s.code,{children:"profile"})}),(0,c.jsx)("td",{children:(0,c.jsx)(n.Z,{language:"javascript",children:"[]"})})]})]})]}),"\n",(0,c.jsx)(s.h2,{id:"fleckscore",children:(0,c.jsx)(s.code,{children:"@flecks/core"})}),"\n",(0,c.jsxs)("table",{className:d.Z.configTable,children:[(0,c.jsxs)("thead",{children:[(0,c.jsx)("td",{className:d.Z.configBig,children:"Description"}),(0,c.jsx)("td",{children:"Name"}),(0,c.jsx)("td",{children:"Default value"})]}),(0,c.jsxs)("tbody",{children:[(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2"})}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2",children:"The ID of your application."})}),(0,c.jsxs)("tr",{children:[(0,c.jsx)("td",{className:d.Z.configBig,children:"The ID of your application."}),(0,c.jsx)("td",{children:(0,c.jsx)(s.code,{children:"id"})}),(0,c.jsx)("td",{children:(0,c.jsx)(n.Z,{language:"javascript",children:"'flecks'"})})]})]})]}),"\n",(0,c.jsx)(s.h2,{id:"flecksdb",children:(0,c.jsx)(s.code,{children:"@flecks/db"})}),"\n",(0,c.jsxs)("table",{className:d.Z.configTable,children:[(0,c.jsxs)("thead",{children:[(0,c.jsx)("td",{className:d.Z.configBig,children:"Description"}),(0,c.jsx)("td",{children:"Name"}),(0,c.jsx)("td",{children:"Default value"})]}),(0,c.jsxs)("tbody",{children:[(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2"})}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2",children:"The database to connect to."})}),(0,c.jsxs)("tr",{children:[(0,c.jsx)("td",{className:d.Z.configBig,children:"The database to connect to."}),(0,c.jsx)("td",{children:(0,c.jsx)(s.code,{children:"database"})}),(0,c.jsx)("td",{children:(0,c.jsx)(n.Z,{language:"javascript",children:"':memory:'"})})]}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2"})}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsxs)("td",{colspan:"2",children:["SQL dialect. See: ",(0,c.jsx)(s.a,{href:"https://sequelize.org/v5/manual/dialects.html",children:"https://sequelize.org/v5/manual/dialects.html"})]})}),(0,c.jsxs)("tr",{children:[(0,c.jsxs)("td",{className:d.Z.configBig,children:["SQL dialect. See: ",(0,c.jsx)(s.a,{href:"https://sequelize.org/v5/manual/dialects.html",children:"https://sequelize.org/v5/manual/dialects.html"})]}),(0,c.jsx)("td",{children:(0,c.jsx)(s.code,{children:"dialect"})}),(0,c.jsx)("td",{children:(0,c.jsx)(n.Z,{language:"javascript",children:"'sqlite'"})})]}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2"})}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2",children:"Database server host."})}),(0,c.jsxs)("tr",{children:[(0,c.jsx)("td",{className:d.Z.configBig,children:"Database server host."}),(0,c.jsx)("td",{children:(0,c.jsx)(s.code,{children:"host"})}),(0,c.jsx)("td",{children:(0,c.jsx)(n.Z,{language:"javascript",children:"undefined"})})]}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2"})}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2",children:"Database server password."})}),(0,c.jsxs)("tr",{children:[(0,c.jsx)("td",{className:d.Z.configBig,children:"Database server password."}),(0,c.jsx)("td",{children:(0,c.jsx)(s.code,{children:"password"})}),(0,c.jsx)("td",{children:(0,c.jsx)(n.Z,{language:"javascript",children:"undefined"})})]}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2"})}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2",children:"Database server port."})}),(0,c.jsxs)("tr",{children:[(0,c.jsx)("td",{className:d.Z.configBig,children:"Database server port."}),(0,c.jsx)("td",{children:(0,c.jsx)(s.code,{children:"port"})}),(0,c.jsx)("td",{children:(0,c.jsx)(n.Z,{language:"javascript",children:"undefined"})})]}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2"})}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2",children:"Database server username."})}),(0,c.jsxs)("tr",{children:[(0,c.jsx)("td",{className:d.Z.configBig,children:"Database server username."}),(0,c.jsx)("td",{children:(0,c.jsx)(s.code,{children:"username"})}),(0,c.jsx)("td",{children:(0,c.jsx)(n.Z,{language:"javascript",children:"undefined"})})]})]})]}),"\n",(0,c.jsx)(s.h2,{id:"flecksdocker",children:(0,c.jsx)(s.code,{children:"@flecks/docker"})}),"\n",(0,c.jsxs)("table",{className:d.Z.configTable,children:[(0,c.jsxs)("thead",{children:[(0,c.jsx)("td",{className:d.Z.configBig,children:"Description"}),(0,c.jsx)("td",{children:"Name"}),(0,c.jsx)("td",{children:"Default value"})]}),(0,c.jsxs)("tbody",{children:[(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2"})}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2",children:"Whether to run docker containers."})}),(0,c.jsxs)("tr",{children:[(0,c.jsx)("td",{className:d.Z.configBig,children:"Whether to run docker containers."}),(0,c.jsx)("td",{children:(0,c.jsx)(s.code,{children:"enabled"})}),(0,c.jsx)("td",{children:(0,c.jsx)(n.Z,{language:"javascript",children:"true"})})]})]})]}),"\n",(0,c.jsx)(s.h2,{id:"flecksdox",children:(0,c.jsx)(s.code,{children:"@flecks/dox"})}),"\n",(0,c.jsxs)("table",{className:d.Z.configTable,children:[(0,c.jsxs)("thead",{children:[(0,c.jsx)("td",{className:d.Z.configBig,children:"Description"}),(0,c.jsx)("td",{children:"Name"}),(0,c.jsx)("td",{children:"Default value"})]}),(0,c.jsxs)("tbody",{children:[(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2"})}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2",children:"Pattern pairs used to rewrite filenames in generated documentation."})}),(0,c.jsxs)("tr",{children:[(0,c.jsx)("td",{className:d.Z.configBig,children:"Pattern pairs used to rewrite filenames in generated documentation."}),(0,c.jsx)("td",{children:(0,c.jsx)(s.code,{children:"rewriteFilenames"})}),(0,c.jsx)("td",{children:(0,c.jsx)(n.Z,{language:"javascript",children:"[]"})})]})]})]}),"\n",(0,c.jsx)(s.h2,{id:"fleckselectron",children:(0,c.jsx)(s.code,{children:"@flecks/electron"})}),"\n",(0,c.jsxs)("table",{className:d.Z.configTable,children:[(0,c.jsxs)("thead",{children:[(0,c.jsx)("td",{className:d.Z.configBig,children:"Description"}),(0,c.jsx)("td",{children:"Name"}),(0,c.jsx)("td",{children:"Default value"})]}),(0,c.jsxs)("tbody",{children:[(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2"})}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsxs)("td",{colspan:"2",children:["Browser window options. See: ",(0,c.jsx)(s.a,{href:"https://www.electronjs.org/docs/latest/api/browser-window",children:"https://www.electronjs.org/docs/latest/api/browser-window"})]})}),(0,c.jsxs)("tr",{children:[(0,c.jsxs)("td",{className:d.Z.configBig,children:["Browser window options. See: ",(0,c.jsx)(s.a,{href:"https://www.electronjs.org/docs/latest/api/browser-window",children:"https://www.electronjs.org/docs/latest/api/browser-window"})]}),(0,c.jsx)("td",{children:(0,c.jsx)(s.code,{children:"browserWindowOptions"})}),(0,c.jsx)("td",{children:(0,c.jsx)(n.Z,{language:"javascript",children:"{}"})})]}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2"})}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2",children:"Install devtools extensions (by default). You can pass an array of Chrome store IDs to install a list of custom extensions."})}),(0,c.jsxs)("tr",{children:[(0,c.jsx)("td",{className:d.Z.configBig,children:"Install devtools extensions (by default). You can pass an array of Chrome store IDs to install a list of custom extensions."}),(0,c.jsx)("td",{children:(0,c.jsx)(s.code,{children:"installExtensions"})}),(0,c.jsx)("td",{children:(0,c.jsx)(n.Z,{language:"javascript",children:"true"})})]}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2"})}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2",children:"Quit the app when all windows are closed."})}),(0,c.jsxs)("tr",{children:[(0,c.jsx)("td",{className:d.Z.configBig,children:"Quit the app when all windows are closed."}),(0,c.jsx)("td",{children:(0,c.jsx)(s.code,{children:"quitOnClosed"})}),(0,c.jsx)("td",{children:(0,c.jsx)(n.Z,{language:"javascript",children:"true"})})]}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2"})}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsxs)("td",{colspan:"2",children:["The URL to load in electron by default. Defaults to ",(0,c.jsx)(s.code,{children:"http://${flecks.get('@flecks/web.public')}"}),"."]})}),(0,c.jsxs)("tr",{children:[(0,c.jsxs)("td",{className:d.Z.configBig,children:["The URL to load in electron by default. Defaults to ",(0,c.jsx)(s.code,{children:"http://${flecks.get('@flecks/web.public')}"}),"."]}),(0,c.jsx)("td",{children:(0,c.jsx)(s.code,{children:"url"})}),(0,c.jsx)("td",{children:(0,c.jsx)(n.Z,{language:"javascript",children:"undefined"})})]})]})]}),"\n",(0,c.jsx)(s.h2,{id:"flecksfleck",children:(0,c.jsx)(s.code,{children:"@flecks/fleck"})}),"\n",(0,c.jsxs)("table",{className:d.Z.configTable,children:[(0,c.jsxs)("thead",{children:[(0,c.jsx)("td",{className:d.Z.configBig,children:"Description"}),(0,c.jsx)("td",{children:"Name"}),(0,c.jsx)("td",{children:"Default value"})]}),(0,c.jsxs)("tbody",{children:[(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2"})}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2",children:"Webpack stats configuration."})}),(0,c.jsxs)("tr",{children:[(0,c.jsx)("td",{className:d.Z.configBig,children:"Webpack stats configuration."}),(0,c.jsx)("td",{children:(0,c.jsx)(s.code,{children:"stats"})}),(0,c.jsx)("td",{children:(0,c.jsx)(n.Z,{language:"javascript",children:"{\n colors: true,\n errorDetails: true,\n}"})})]})]})]}),"\n",(0,c.jsx)(s.h2,{id:"fleckspassport",children:(0,c.jsx)(s.code,{children:"@flecks/passport"})}),"\n",(0,c.jsxs)("table",{className:d.Z.configTable,children:[(0,c.jsxs)("thead",{children:[(0,c.jsx)("td",{className:d.Z.configBig,children:"Description"}),(0,c.jsx)("td",{children:"Name"}),(0,c.jsx)("td",{children:"Default value"})]}),(0,c.jsxs)("tbody",{children:[(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2"})}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2",children:"Path to redirect to after failed login."})}),(0,c.jsxs)("tr",{children:[(0,c.jsx)("td",{className:d.Z.configBig,children:"Path to redirect to after failed login."}),(0,c.jsx)("td",{children:(0,c.jsx)(s.code,{children:"failureRedirect"})}),(0,c.jsx)("td",{children:(0,c.jsx)(n.Z,{language:"javascript",children:"'/'"})})]}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2"})}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2",children:"Path to redirect to after logout."})}),(0,c.jsxs)("tr",{children:[(0,c.jsx)("td",{className:d.Z.configBig,children:"Path to redirect to after logout."}),(0,c.jsx)("td",{children:(0,c.jsx)(s.code,{children:"logoutRedirect"})}),(0,c.jsx)("td",{children:(0,c.jsx)(n.Z,{language:"javascript",children:"'/'"})})]}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2"})}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2",children:"Path to redirect to after successful login."})}),(0,c.jsxs)("tr",{children:[(0,c.jsx)("td",{className:d.Z.configBig,children:"Path to redirect to after successful login."}),(0,c.jsx)("td",{children:(0,c.jsx)(s.code,{children:"successRedirect"})}),(0,c.jsx)("td",{children:(0,c.jsx)(n.Z,{language:"javascript",children:"'/'"})})]})]})]}),"\n",(0,c.jsx)(s.h2,{id:"flecksreact",children:(0,c.jsx)(s.code,{children:"@flecks/react"})}),"\n",(0,c.jsxs)("table",{className:d.Z.configTable,children:[(0,c.jsxs)("thead",{children:[(0,c.jsx)("td",{className:d.Z.configBig,children:"Description"}),(0,c.jsx)("td",{children:"Name"}),(0,c.jsx)("td",{children:"Default value"})]}),(0,c.jsxs)("tbody",{children:[(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2"})}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2",children:"React providers."})}),(0,c.jsxs)("tr",{children:[(0,c.jsx)("td",{className:d.Z.configBig,children:"React providers."}),(0,c.jsx)("td",{children:(0,c.jsx)(s.code,{children:"providers"})}),(0,c.jsx)("td",{children:(0,c.jsx)(n.Z,{language:"javascript",children:"['...']"})})]}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2"})}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2",children:"Whether to enable server-side rendering."})}),(0,c.jsxs)("tr",{children:[(0,c.jsx)("td",{className:d.Z.configBig,children:"Whether to enable server-side rendering."}),(0,c.jsx)("td",{children:(0,c.jsx)(s.code,{children:"ssr"})}),(0,c.jsx)("td",{children:(0,c.jsx)(n.Z,{language:"javascript",children:"true"})})]})]})]}),"\n",(0,c.jsx)(s.h2,{id:"flecksredis",children:(0,c.jsx)(s.code,{children:"@flecks/redis"})}),"\n",(0,c.jsxs)("table",{className:d.Z.configTable,children:[(0,c.jsxs)("thead",{children:[(0,c.jsx)("td",{className:d.Z.configBig,children:"Description"}),(0,c.jsx)("td",{children:"Name"}),(0,c.jsx)("td",{children:"Default value"})]}),(0,c.jsxs)("tbody",{children:[(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2"})}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2",children:"Redis server host."})}),(0,c.jsxs)("tr",{children:[(0,c.jsx)("td",{className:d.Z.configBig,children:"Redis server host."}),(0,c.jsx)("td",{children:(0,c.jsx)(s.code,{children:"host"})}),(0,c.jsx)("td",{children:(0,c.jsx)(n.Z,{language:"javascript",children:"'localhost'"})})]}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2"})}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2",children:"Redis server port."})}),(0,c.jsxs)("tr",{children:[(0,c.jsx)("td",{className:d.Z.configBig,children:"Redis server port."}),(0,c.jsx)("td",{children:(0,c.jsx)(s.code,{children:"port"})}),(0,c.jsx)("td",{children:(0,c.jsx)(n.Z,{language:"javascript",children:"6379"})})]})]})]}),"\n",(0,c.jsx)(s.h2,{id:"flecksserver",children:(0,c.jsx)(s.code,{children:"@flecks/server"})}),"\n",(0,c.jsxs)("table",{className:d.Z.configTable,children:[(0,c.jsxs)("thead",{children:[(0,c.jsx)("td",{className:d.Z.configBig,children:"Description"}),(0,c.jsx)("td",{children:"Name"}),(0,c.jsx)("td",{children:"Default value"})]}),(0,c.jsxs)("tbody",{children:[(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2"})}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2",children:"Whether HMR is enabled."})}),(0,c.jsxs)("tr",{children:[(0,c.jsx)("td",{className:d.Z.configBig,children:"Whether HMR is enabled."}),(0,c.jsx)("td",{children:(0,c.jsx)(s.code,{children:"hot"})}),(0,c.jsx)("td",{children:(0,c.jsx)(n.Z,{language:"javascript",children:"false"})})]}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2"})}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsxs)("td",{colspan:"2",children:["Arguments to pass along to node. See: ",(0,c.jsx)(s.a,{href:"https://nodejs.org/api/cli.html",children:"https://nodejs.org/api/cli.html"})]})}),(0,c.jsxs)("tr",{children:[(0,c.jsxs)("td",{className:d.Z.configBig,children:["Arguments to pass along to node. See: ",(0,c.jsx)(s.a,{href:"https://nodejs.org/api/cli.html",children:"https://nodejs.org/api/cli.html"})]}),(0,c.jsx)("td",{children:(0,c.jsx)(s.code,{children:"nodeArgs"})}),(0,c.jsx)("td",{children:(0,c.jsx)(n.Z,{language:"javascript",children:"[]"})})]}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2"})}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsxs)("td",{colspan:"2",children:["Environment to pass along to node. See: ",(0,c.jsx)(s.a,{href:"https://nodejs.org/api/cli.html#environment-variables",children:"https://nodejs.org/api/cli.html#environment-variables"})]})}),(0,c.jsxs)("tr",{children:[(0,c.jsxs)("td",{className:d.Z.configBig,children:["Environment to pass along to node. See: ",(0,c.jsx)(s.a,{href:"https://nodejs.org/api/cli.html#environment-variables",children:"https://nodejs.org/api/cli.html#environment-variables"})]}),(0,c.jsx)("td",{children:(0,c.jsx)(s.code,{children:"nodeEnv"})}),(0,c.jsx)("td",{children:(0,c.jsx)(n.Z,{language:"javascript",children:"{}"})})]}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2"})}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2",children:"Whether to start the server after building."})}),(0,c.jsxs)("tr",{children:[(0,c.jsx)("td",{className:d.Z.configBig,children:"Whether to start the server after building."}),(0,c.jsx)("td",{children:(0,c.jsx)(s.code,{children:"start"})}),(0,c.jsx)("td",{children:(0,c.jsx)(n.Z,{language:"javascript",children:"true"})})]}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2"})}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2",children:"Webpack stats configuration."})}),(0,c.jsxs)("tr",{children:[(0,c.jsx)("td",{className:d.Z.configBig,children:"Webpack stats configuration."}),(0,c.jsx)("td",{children:(0,c.jsx)(s.code,{children:"stats"})}),(0,c.jsx)("td",{children:(0,c.jsx)(n.Z,{language:"javascript",children:"{\n colors: true,\n errorDetails: true,\n}"})})]})]})]}),"\n",(0,c.jsx)(s.h2,{id:"fleckssessionserver",children:(0,c.jsx)(s.code,{children:"@flecks/session/server"})}),"\n",(0,c.jsxs)("table",{className:d.Z.configTable,children:[(0,c.jsxs)("thead",{children:[(0,c.jsx)("td",{className:d.Z.configBig,children:"Description"}),(0,c.jsx)("td",{children:"Name"}),(0,c.jsx)("td",{children:"Default value"})]}),(0,c.jsxs)("tbody",{children:[(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2"})}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsxs)("td",{colspan:"2",children:["Set the cookie secret for session encryption. See: ",(0,c.jsx)(s.a,{href:"http://expressjs.com/en/resources/middleware/cookie-parser.html",children:"http://expressjs.com/en/resources/middleware/cookie-parser.html"})]})}),(0,c.jsxs)("tr",{children:[(0,c.jsxs)("td",{className:d.Z.configBig,children:["Set the cookie secret for session encryption. See: ",(0,c.jsx)(s.a,{href:"http://expressjs.com/en/resources/middleware/cookie-parser.html",children:"http://expressjs.com/en/resources/middleware/cookie-parser.html"})]}),(0,c.jsx)("td",{children:(0,c.jsx)(s.code,{children:"cookieSecret"})}),(0,c.jsx)("td",{children:(0,c.jsx)(n.Z,{language:"javascript",children:"'Set the FLECKS_ENV__flecks_session_server__cookieSecret environment variable!'"})})]})]})]}),"\n",(0,c.jsx)(s.h2,{id:"flecksweb",children:(0,c.jsx)(s.code,{children:"@flecks/web"})}),"\n",(0,c.jsxs)("table",{className:d.Z.configTable,children:[(0,c.jsxs)("thead",{children:[(0,c.jsx)("td",{className:d.Z.configBig,children:"Description"}),(0,c.jsx)("td",{children:"Name"}),(0,c.jsx)("td",{children:"Default value"})]}),(0,c.jsxs)("tbody",{children:[(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2"})}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2",children:"The ID of the root element on the page."})}),(0,c.jsxs)("tr",{children:[(0,c.jsx)("td",{className:d.Z.configBig,children:"The ID of the root element on the page."}),(0,c.jsx)("td",{children:(0,c.jsx)(s.code,{children:"appMountId"})}),(0,c.jsx)("td",{children:(0,c.jsx)(n.Z,{language:"javascript",children:"'root'"})})]}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2"})}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2",children:"Base tag path."})}),(0,c.jsxs)("tr",{children:[(0,c.jsx)("td",{className:d.Z.configBig,children:"Base tag path."}),(0,c.jsx)("td",{children:(0,c.jsx)(s.code,{children:"base"})}),(0,c.jsx)("td",{children:(0,c.jsx)(n.Z,{language:"javascript",children:"'/'"})})]}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2"})}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsxs)("td",{colspan:"2",children:["(webpack-dev-server) Disable the host check. See: ",(0,c.jsx)(s.a,{href:"https://github.com/webpack/webpack-dev-server/issues/887",children:"https://github.com/webpack/webpack-dev-server/issues/887"})]})}),(0,c.jsxs)("tr",{children:[(0,c.jsxs)("td",{className:d.Z.configBig,children:["(webpack-dev-server) Disable the host check. See: ",(0,c.jsx)(s.a,{href:"https://github.com/webpack/webpack-dev-server/issues/887",children:"https://github.com/webpack/webpack-dev-server/issues/887"})]}),(0,c.jsx)("td",{children:(0,c.jsx)(s.code,{children:"devDisableHostCheck"})}),(0,c.jsx)("td",{children:(0,c.jsx)(n.Z,{language:"javascript",children:"false"})})]}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2"})}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2",children:"(webpack-dev-server) Host to bind."})}),(0,c.jsxs)("tr",{children:[(0,c.jsx)("td",{className:d.Z.configBig,children:"(webpack-dev-server) Host to bind."}),(0,c.jsx)("td",{children:(0,c.jsx)(s.code,{children:"devHost"})}),(0,c.jsx)("td",{children:(0,c.jsx)(n.Z,{language:"javascript",children:"'localhost'"})})]}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2"})}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2",children:"(webpack-dev-server) Port to bind."})}),(0,c.jsxs)("tr",{children:[(0,c.jsx)("td",{className:d.Z.configBig,children:"(webpack-dev-server) Port to bind."}),(0,c.jsx)("td",{children:(0,c.jsx)(s.code,{children:"devPort"})}),(0,c.jsx)("td",{children:(0,c.jsx)(n.Z,{language:"javascript",children:"undefined"})})]}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2"})}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsxs)("td",{colspan:"2",children:["(webpack-dev-server) Public path to serve. Defaults to ",(0,c.jsx)(s.code,{children:"flecks.get('@flecks/web.public')"}),"."]})}),(0,c.jsxs)("tr",{children:[(0,c.jsxs)("td",{className:d.Z.configBig,children:["(webpack-dev-server) Public path to serve. Defaults to ",(0,c.jsx)(s.code,{children:"flecks.get('@flecks/web.public')"}),"."]}),(0,c.jsx)("td",{children:(0,c.jsx)(s.code,{children:"devPublic"})}),(0,c.jsx)("td",{children:(0,c.jsx)(n.Z,{language:"javascript",children:"undefined"})})]}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2"})}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2",children:"(webpack-dev-server) Webpack stats output."})}),(0,c.jsxs)("tr",{children:[(0,c.jsx)("td",{className:d.Z.configBig,children:"(webpack-dev-server) Webpack stats output."}),(0,c.jsx)("td",{children:(0,c.jsx)(s.code,{children:"devStats"})}),(0,c.jsx)("td",{children:(0,c.jsx)(n.Z,{language:"javascript",children:"{\n colors: true,\n errorDetails: true,\n}"})})]}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2"})}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsxs)("td",{colspan:"2",children:["Modules to externalize using ",(0,c.jsx)(s.code,{children:"webpack.DllPlugin"}),"."]})}),(0,c.jsxs)("tr",{children:[(0,c.jsxs)("td",{className:d.Z.configBig,children:["Modules to externalize using ",(0,c.jsx)(s.code,{children:"webpack.DllPlugin"}),"."]}),(0,c.jsx)("td",{children:(0,c.jsx)(s.code,{children:"dll"})}),(0,c.jsx)("td",{children:(0,c.jsx)(n.Z,{language:"javascript",children:"[]"})})]}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2"})}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2",children:"Host to bind."})}),(0,c.jsxs)("tr",{children:[(0,c.jsx)("td",{className:d.Z.configBig,children:"Host to bind."}),(0,c.jsx)("td",{children:(0,c.jsx)(s.code,{children:"host"})}),(0,c.jsx)("td",{children:(0,c.jsx)(n.Z,{language:"javascript",children:"'0.0.0.0'"})})]}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2"})}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2",children:"Path to icon."})}),(0,c.jsxs)("tr",{children:[(0,c.jsx)("td",{className:d.Z.configBig,children:"Path to icon."}),(0,c.jsx)("td",{children:(0,c.jsx)(s.code,{children:"icon"})}),(0,c.jsx)("td",{children:(0,c.jsx)(n.Z,{language:"javascript",children:"''"})})]}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2"})}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2",children:"Port to bind."})}),(0,c.jsxs)("tr",{children:[(0,c.jsx)("td",{className:d.Z.configBig,children:"Port to bind."}),(0,c.jsx)("td",{children:(0,c.jsx)(s.code,{children:"port"})}),(0,c.jsx)("td",{children:(0,c.jsx)(n.Z,{language:"javascript",children:"32340"})})]}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2"})}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2",children:"Meta tags."})}),(0,c.jsxs)("tr",{children:[(0,c.jsx)("td",{className:d.Z.configBig,children:"Meta tags."}),(0,c.jsx)("td",{children:(0,c.jsx)(s.code,{children:"meta"})}),(0,c.jsx)("td",{children:(0,c.jsx)(n.Z,{language:"javascript",children:"{\n charset: 'utf-8',\n viewport: 'width=device-width, user-scalable=no',\n}"})})]}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2"})}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2",children:"Public path to server."})}),(0,c.jsxs)("tr",{children:[(0,c.jsx)("td",{className:d.Z.configBig,children:"Public path to server."}),(0,c.jsx)("td",{children:(0,c.jsx)(s.code,{children:"public"})}),(0,c.jsx)("td",{children:(0,c.jsx)(n.Z,{language:"javascript",children:"'localhost:32340'"})})]}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2"})}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2",children:"Webpack stats configuration."})}),(0,c.jsxs)("tr",{children:[(0,c.jsx)("td",{className:d.Z.configBig,children:"Webpack stats configuration."}),(0,c.jsx)("td",{children:(0,c.jsx)(s.code,{children:"stats"})}),(0,c.jsx)("td",{children:(0,c.jsx)(n.Z,{language:"javascript",children:"{\n colors: true,\n errorDetails: true,\n}"})})]}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2"})}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2",children:"HTML title."})}),(0,c.jsxs)("tr",{children:[(0,c.jsx)("td",{className:d.Z.configBig,children:"HTML title."}),(0,c.jsx)("td",{children:(0,c.jsx)(s.code,{children:"title"})}),(0,c.jsx)("td",{children:(0,c.jsx)(n.Z,{language:"javascript",children:"'[@flecks/core.id]'"})})]}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsx)("td",{colspan:"2"})}),(0,c.jsx)("tr",{className:d.Z.configSmall,children:(0,c.jsxs)("td",{colspan:"2",children:["Proxies to trust. See: ",(0,c.jsx)(s.a,{href:"https://www.npmjs.com/package/proxy-addr",children:"https://www.npmjs.com/package/proxy-addr"})]})}),(0,c.jsxs)("tr",{children:[(0,c.jsxs)("td",{className:d.Z.configBig,children:["Proxies to trust. See: ",(0,c.jsx)(s.a,{href:"https://www.npmjs.com/package/proxy-addr",children:"https://www.npmjs.com/package/proxy-addr"})]}),(0,c.jsx)("td",{children:(0,c.jsx)(s.code,{children:"trust"})}),(0,c.jsx)("td",{children:(0,c.jsx)(n.Z,{language:"javascript",children:"false"})})]})]})]})]})}function x(e={}){const{wrapper:s}={...(0,i.a)(),...e.components};return s?(0,c.jsx)(s,{...e,children:(0,c.jsx)(j,{...e})}):j(e)}},7113:(e,s,l)=>{l.d(s,{Z:()=>c});const c={configBig:"configBig_NxNb",configSmall:"configSmall_SLee",configTable:"configTable_hbGc",hooks:"hooks_uvt_"}}}]); \ No newline at end of file diff --git a/assets/js/8b0cd02a.27a74d98.js b/assets/js/8b0cd02a.27a74d98.js deleted file mode 100644 index fd7ad4b8..00000000 --- a/assets/js/8b0cd02a.27a74d98.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkflecks_docusaurus=self.webpackChunkflecks_docusaurus||[]).push([[6911],{1039:(e,r,t)=>{t.r(r),t.d(r,{assets:()=>o,contentTitle:()=>i,default:()=>p,frontMatter:()=>s,metadata:()=>c,toc:()=>u});var n=t(5893),a=t(1151),l=t(3200);const s={title:"REPL",description:"Start a REPL server and connect to it."},i=void 0,c={id:"repl",title:"REPL",description:"Start a REPL server and connect to it.",source:"@site/docs/repl.mdx",sourceDirName:".",slug:"/repl",permalink:"/flecks/docs/repl",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{title:"REPL",description:"Start a REPL server and connect to it."},sidebar:"flecksSidebar",previous:{title:"Redux",permalink:"/flecks/docs/redux"},next:{title:"Generated details",permalink:"/flecks/docs/category/generated-details"}},o={},u=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Play with a REPL",id:"play-with-a-repl",level:2},{value:"Extend the REPL",id:"extend-the-repl",level:2}];function d(e){const r={a:"a",admonition:"admonition",code:"code",h2:"h2",p:"p",pre:"pre",...(0,a.a)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(r.p,{children:["flecks provides ",(0,n.jsx)(r.code,{children:"@flecks/repl"})," to make it easy to run a\n",(0,n.jsx)(r.a,{href:"https://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop",children:"REPL"})," inside your running\napplication. ",(0,n.jsx)(r.code,{children:"@flecks/repl"})," provides a ",(0,n.jsx)(r.a,{href:"./cli#repl",children:"command"})," to easily connect to your application."]}),"\n",(0,n.jsx)(r.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,n.jsxs)(r.p,{children:["In order to use it you will need to have ",(0,n.jsx)(r.a,{href:"https://manpages.org/socat",children:"socat"}),"."]}),"\n",(0,n.jsx)(r.h2,{id:"play-with-a-repl",children:"Play with a REPL"}),"\n",(0,n.jsx)(r.p,{children:"Let's create an application to test the REPL:"}),"\n",(0,n.jsx)(l.Z,{type:"app",pkg:"repl-test"}),"\n",(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{children:"npx flecks add -d @flecks/repl\n"})}),"\n",(0,n.jsx)(r.p,{children:"Start your application:"}),"\n",(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{children:"npm run start\n"})}),"\n",(0,n.jsx)(r.p,{children:"It will just sit there. Open another terminal in the project directory and run the command:"}),"\n",(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{children:"npx flecks repl\n"})}),"\n",(0,n.jsxs)(r.admonition,{type:"tip",children:[(0,n.jsx)(r.p,{children:"For a more ergonomic experience, you may use:"}),(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{children:"npx flecks repl -r\n"})}),(0,n.jsxs)(r.p,{children:["If you have ",(0,n.jsx)(r.a,{href:"https://manpages.org/rlwrap",children:"rlwrap"})," installed."]})]}),"\n",(0,n.jsx)(r.p,{children:"and you will be greeted with a prompt:"}),"\n",(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{children:"repl-test>\n"})}),"\n",(0,n.jsx)(r.p,{children:"That's our application ID! We can run commands:"}),"\n",(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-js",children:"repl-test> flecks.get('@flecks/core')\n{ id: 'repl-test' }\n"})}),"\n",(0,n.jsx)(r.p,{children:"Confirm we're actually in our application by killing it:"}),"\n",(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{children:"repl-test> process.exit(0)\n"})}),"\n",(0,n.jsx)(r.p,{children:"That will kick us back out to the terminal. If we try to run the command again, we'll get an error\nthat looks something like this:"}),"\n",(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'[...] socat[...] E connect(5, AF=1 "/tmp/flecks/repl-test/repl/repl-test-[...].sock", 57): Connection refused\n'})}),"\n",(0,n.jsx)(r.p,{children:"This is because there's no application to connect to anymore."}),"\n",(0,n.jsx)(r.h2,{id:"extend-the-repl",children:"Extend the REPL"}),"\n",(0,n.jsxs)(r.p,{children:["Your flecks can implement ",(0,n.jsx)(r.a,{href:"./flecks/hooks#flecksreplcommands",children:"@flecks/repl.commands"})," and/or\n",(0,n.jsx)(r.a,{href:"./flecks/hooks#flecksreplcontext",children:"@flecks/repl.context"})," to add context or commands to the REPL."]}),"\n",(0,n.jsxs)(r.p,{children:["For instance, ",(0,n.jsx)(r.code,{children:"@flecks/passport-local"})," implements a command to easily create a user account in\nthe REPL."]})]})}function p(e={}){const{wrapper:r}={...(0,a.a)(),...e.components};return r?(0,n.jsx)(r,{...e,children:(0,n.jsx)(d,{...e})}):d(e)}},3200:(e,r,t)=>{t.d(r,{Z:()=>i});var n=t(9286),a=t(4866),l=t(5162),s=t(5893);function i(e){let{pkg:r,type:t}=e;return(0,s.jsxs)(a.Z,{children:[(0,s.jsx)(l.Z,{value:"npm",label:"npm",children:(0,s.jsxs)(n.Z,{language:"bash",children:["npm init @flecks/",t," ",r]})}),(0,s.jsx)(l.Z,{value:"yarn",label:"Yarn",children:(0,s.jsxs)(n.Z,{language:"bash",children:["yarn create @flecks/",t," ",r]})}),(0,s.jsx)(l.Z,{value:"bun",label:"Bun",children:(0,s.jsxs)(n.Z,{language:"bash",children:["bun create @flecks/",t," ",r]})})]})}},5162:(e,r,t)=>{t.d(r,{Z:()=>s});t(7294);var n=t(512);const a={tabItem:"tabItem_Ymn6"};var l=t(5893);function s(e){let{children:r,hidden:t,className:s}=e;return(0,l.jsx)("div",{role:"tabpanel",className:(0,n.Z)(a.tabItem,s),hidden:t,children:r})}},4866:(e,r,t)=>{t.d(r,{Z:()=>y});var n=t(7294),a=t(512),l=t(2466),s=t(6550),i=t(469),c=t(1980),o=t(7392),u=t(12);function d(e){return n.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,n.isValidElement)(e)&&function(e){const{props:r}=e;return!!r&&"object"==typeof r&&"value"in r}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function p(e){const{values:r,children:t}=e;return(0,n.useMemo)((()=>{const e=r??function(e){return d(e).map((e=>{let{props:{value:r,label:t,attributes:n,default:a}}=e;return{value:r,label:t,attributes:n,default:a}}))}(t);return function(e){const r=(0,o.l)(e,((e,r)=>e.value===r.value));if(r.length>0)throw new Error(`Docusaurus error: Duplicate values "${r.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[r,t])}function h(e){let{value:r,tabValues:t}=e;return t.some((e=>e.value===r))}function f(e){let{queryString:r=!1,groupId:t}=e;const a=(0,s.k6)(),l=function(e){let{queryString:r=!1,groupId:t}=e;if("string"==typeof r)return r;if(!1===r)return null;if(!0===r&&!t)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return t??null}({queryString:r,groupId:t});return[(0,c._X)(l),(0,n.useCallback)((e=>{if(!l)return;const r=new URLSearchParams(a.location.search);r.set(l,e),a.replace({...a.location,search:r.toString()})}),[l,a])]}function m(e){const{defaultValue:r,queryString:t=!1,groupId:a}=e,l=p(e),[s,c]=(0,n.useState)((()=>function(e){let{defaultValue:r,tabValues:t}=e;if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(r){if(!h({value:r,tabValues:t}))throw new Error(`Docusaurus error: The has a defaultValue "${r}" but none of its children has the corresponding value. Available values are: ${t.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return r}const n=t.find((e=>e.default))??t[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:r,tabValues:l}))),[o,d]=f({queryString:t,groupId:a}),[m,x]=function(e){let{groupId:r}=e;const t=function(e){return e?`docusaurus.tab.${e}`:null}(r),[a,l]=(0,u.Nk)(t);return[a,(0,n.useCallback)((e=>{t&&l.set(e)}),[t,l])]}({groupId:a}),b=(()=>{const e=o??m;return h({value:e,tabValues:l})?e:null})();(0,i.Z)((()=>{b&&c(b)}),[b]);return{selectedValue:s,selectValue:(0,n.useCallback)((e=>{if(!h({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);c(e),d(e),x(e)}),[d,x,l]),tabValues:l}}var x=t(2389);const b={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var j=t(5893);function v(e){let{className:r,block:t,selectedValue:n,selectValue:s,tabValues:i}=e;const c=[],{blockElementScrollPositionUntilNextRender:o}=(0,l.o5)(),u=e=>{const r=e.currentTarget,t=c.indexOf(r),a=i[t].value;a!==n&&(o(r),s(a))},d=e=>{let r=null;switch(e.key){case"Enter":u(e);break;case"ArrowRight":{const t=c.indexOf(e.currentTarget)+1;r=c[t]??c[0];break}case"ArrowLeft":{const t=c.indexOf(e.currentTarget)-1;r=c[t]??c[c.length-1];break}}r?.focus()};return(0,j.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,a.Z)("tabs",{"tabs--block":t},r),children:i.map((e=>{let{value:r,label:t,attributes:l}=e;return(0,j.jsx)("li",{role:"tab",tabIndex:n===r?0:-1,"aria-selected":n===r,ref:e=>c.push(e),onKeyDown:d,onClick:u,...l,className:(0,a.Z)("tabs__item",b.tabItem,l?.className,{"tabs__item--active":n===r}),children:t??r},r)}))})}function k(e){let{lazy:r,children:t,selectedValue:a}=e;const l=(Array.isArray(t)?t:[t]).filter(Boolean);if(r){const e=l.find((e=>e.props.value===a));return e?(0,n.cloneElement)(e,{className:"margin-top--md"}):null}return(0,j.jsx)("div",{className:"margin-top--md",children:l.map(((e,r)=>(0,n.cloneElement)(e,{key:r,hidden:e.props.value!==a})))})}function g(e){const r=m(e);return(0,j.jsxs)("div",{className:(0,a.Z)("tabs-container",b.tabList),children:[(0,j.jsx)(v,{...e,...r}),(0,j.jsx)(k,{...e,...r})]})}function y(e){const r=(0,x.Z)();return(0,j.jsx)(g,{...e,children:d(e.children)},String(r))}}}]); \ No newline at end of file diff --git a/assets/js/8b0cd02a.cb84f799.js b/assets/js/8b0cd02a.cb84f799.js new file mode 100644 index 00000000..8d23631c --- /dev/null +++ b/assets/js/8b0cd02a.cb84f799.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkflecks_docusaurus=self.webpackChunkflecks_docusaurus||[]).push([[6911],{1039:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>d,contentTitle:()=>o,default:()=>m,frontMatter:()=>i,metadata:()=>u,toc:()=>p});var a=r(5893),t=r(1151),l=r(3200),s=r(4283),c=r(6569);const i={title:"REPL",description:"Start a REPL server and connect to it."},o=void 0,u={id:"repl",title:"REPL",description:"Start a REPL server and connect to it.",source:"@site/docs/repl.mdx",sourceDirName:".",slug:"/repl",permalink:"/flecks/docs/repl",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{title:"REPL",description:"Start a REPL server and connect to it."},sidebar:"flecksSidebar",previous:{title:"Redux",permalink:"/flecks/docs/redux"},next:{title:"Generated details",permalink:"/flecks/docs/category/generated-details"}},d={},p=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Play with a REPL",id:"play-with-a-repl",level:2},{value:"Extend the REPL",id:"extend-the-repl",level:2}];function h(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",p:"p",pre:"pre",...(0,t.a)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(n.p,{children:["flecks provides ",(0,a.jsx)(n.code,{children:"@flecks/repl"})," to make it easy to run a\n",(0,a.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop",children:"REPL"})," inside your running\napplication. ",(0,a.jsx)(n.code,{children:"@flecks/repl"})," provides a ",(0,a.jsx)(n.a,{href:"./cli#repl",children:"command"})," to easily connect to your application."]}),"\n",(0,a.jsx)(n.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,a.jsxs)(n.p,{children:["In order to use it you will need to have ",(0,a.jsx)(n.a,{href:"https://manpages.org/socat",children:"socat"}),"."]}),"\n",(0,a.jsx)(n.h2,{id:"play-with-a-repl",children:"Play with a REPL"}),"\n",(0,a.jsx)(n.p,{children:"Let's create an application to test the REPL:"}),"\n",(0,a.jsx)(l.Z,{type:"app",pkg:"repl-test"}),"\n",(0,a.jsx)(s.Z,{headless:!0,cmd:"flecks add -d @flecks/repl"}),"\n",(0,a.jsx)(c.Z,{headless:!0,cmd:"start",children:(0,a.jsx)(n.p,{children:"Start your application:"})}),"\n",(0,a.jsx)(n.p,{children:"It will just sit there. Open another terminal in the project directory and run the command:"}),"\n",(0,a.jsx)(s.Z,{headless:!0,cmd:"flecks repl"}),"\n",(0,a.jsxs)(n.admonition,{type:"tip",children:[(0,a.jsx)(n.p,{children:"For a more ergonomic experience, you may use:"}),(0,a.jsx)(s.Z,{headless:!0,cmd:"flecks repl -r"}),(0,a.jsxs)(n.p,{children:["If you have ",(0,a.jsx)(n.a,{href:"https://manpages.org/rlwrap",children:"rlwrap"})," installed."]})]}),"\n",(0,a.jsx)(n.p,{children:"and you will be greeted with a prompt:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"repl-test>\n"})}),"\n",(0,a.jsx)(n.p,{children:"That's our application ID! We can run commands:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-js",children:"repl-test> flecks.get('@flecks/core')\n{ id: 'repl-test' }\n"})}),"\n",(0,a.jsx)(n.p,{children:"Confirm we're actually in our application by killing it:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"repl-test> process.exit(0)\n"})}),"\n",(0,a.jsx)(n.p,{children:"That will kick us back out to the terminal. If we try to run the command again, we'll get an error\nthat looks something like this:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'[...] socat[...] E connect(5, AF=1 "/tmp/flecks/repl-test/repl/repl-test-[...].sock", 57): Connection refused\n'})}),"\n",(0,a.jsx)(n.p,{children:"This is because there's no application to connect to anymore."}),"\n",(0,a.jsx)(n.h2,{id:"extend-the-repl",children:"Extend the REPL"}),"\n",(0,a.jsxs)(n.p,{children:["Your flecks can implement ",(0,a.jsx)(n.a,{href:"./flecks/hooks#flecksreplcommands",children:"@flecks/repl.commands"})," and/or\n",(0,a.jsx)(n.a,{href:"./flecks/hooks#flecksreplcontext",children:"@flecks/repl.context"})," to add context or commands to the REPL."]}),"\n",(0,a.jsxs)(n.p,{children:["For instance, ",(0,a.jsx)(n.code,{children:"@flecks/passport-local"})," implements a command to easily create a user account in\nthe REPL."]})]})}function m(e={}){const{wrapper:n}={...(0,t.a)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(h,{...e})}):h(e)}},3200:(e,n,r)=>{r.d(n,{Z:()=>c});var a=r(9286),t=r(4866),l=r(5162),s=r(5893);function c(e){let{children:n,headless:r=!1,pkg:c,type:i}=e;return(0,s.jsxs)(t.Z,{className:r&&"headless",groupId:"package-manager",children:[(0,s.jsxs)(l.Z,{value:"npm",label:"npm",children:[n,(0,s.jsxs)(a.Z,{language:"bash",children:["npm init @flecks/",i," ",c]})]}),(0,s.jsxs)(l.Z,{value:"yarn",label:"Yarn",children:[n,(0,s.jsxs)(a.Z,{language:"bash",children:["yarn create @flecks/",i," ",c]})]}),(0,s.jsxs)(l.Z,{value:"pnpm",label:"pnpm",children:[n,(0,s.jsxs)(a.Z,{language:"bash",children:["pnpm create @flecks/",i," ",c]})]}),(0,s.jsxs)(l.Z,{value:"bun",label:"Bun",children:[n,(0,s.jsxs)(a.Z,{language:"bash",children:["bun create @flecks/",i," ",c]})]})]})}},4283:(e,n,r)=>{r.d(n,{Z:()=>c});var a=r(9286),t=r(4866),l=r(5162),s=r(5893);function c(e){let{children:n,cmd:r,headless:c=!1}=e;const i=Array.isArray(r)?r:[r],o=e=>i.map((n=>`${e} ${n}`)).join("\n");return(0,s.jsxs)(t.Z,{className:c&&"headless",groupId:"package-manager",children:[(0,s.jsxs)(l.Z,{value:"npm",label:"npm",children:[n,(0,s.jsx)(a.Z,{language:"bash",children:o("npx")})]}),(0,s.jsxs)(l.Z,{value:"yarn",label:"Yarn",children:[n,(0,s.jsx)(a.Z,{language:"bash",children:o("yarn")})]}),(0,s.jsxs)(l.Z,{value:"pnpm",label:"pnpm",children:[n,(0,s.jsx)(a.Z,{language:"bash",children:o("pnpx")})]}),(0,s.jsxs)(l.Z,{value:"bun",label:"Bun",children:[n,(0,s.jsx)(a.Z,{language:"bash",children:o("bunx")})]})]})}},6569:(e,n,r)=>{r.d(n,{Z:()=>c});var a=r(9286),t=r(4866),l=r(5162),s=r(5893);function c(e){let{children:n,cmd:r,headless:c=!1}=e;return(0,s.jsxs)(t.Z,{className:c&&"headless",groupId:"package-manager",children:[(0,s.jsxs)(l.Z,{value:"npm",label:"npm",children:[n,(0,s.jsxs)(a.Z,{language:"bash",children:["npm run ",r]})]}),(0,s.jsxs)(l.Z,{value:"yarn",label:"Yarn",children:[n,(0,s.jsxs)(a.Z,{language:"bash",children:["yarn run ",r]})]}),(0,s.jsxs)(l.Z,{value:"pnpm",label:"pnpm",children:[n,(0,s.jsxs)(a.Z,{language:"bash",children:["pnpm run ",r]})]}),(0,s.jsxs)(l.Z,{value:"bun",label:"Bun",children:[n,(0,s.jsxs)(a.Z,{language:"bash",children:["bun run ",r]})]})]})}},5162:(e,n,r)=>{r.d(n,{Z:()=>s});r(7294);var a=r(512);const t={tabItem:"tabItem_Ymn6"};var l=r(5893);function s(e){let{children:n,hidden:r,className:s}=e;return(0,l.jsx)("div",{role:"tabpanel",className:(0,a.Z)(t.tabItem,s),hidden:r,children:n})}},4866:(e,n,r)=>{r.d(n,{Z:()=>y});var a=r(7294),t=r(512),l=r(2466),s=r(6550),c=r(469),i=r(1980),o=r(7392),u=r(12);function d(e){return a.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,a.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function p(e){const{values:n,children:r}=e;return(0,a.useMemo)((()=>{const e=n??function(e){return d(e).map((e=>{let{props:{value:n,label:r,attributes:a,default:t}}=e;return{value:n,label:r,attributes:a,default:t}}))}(r);return function(e){const n=(0,o.l)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,r])}function h(e){let{value:n,tabValues:r}=e;return r.some((e=>e.value===n))}function m(e){let{queryString:n=!1,groupId:r}=e;const t=(0,s.k6)(),l=function(e){let{queryString:n=!1,groupId:r}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!r)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return r??null}({queryString:n,groupId:r});return[(0,i._X)(l),(0,a.useCallback)((e=>{if(!l)return;const n=new URLSearchParams(t.location.search);n.set(l,e),t.replace({...t.location,search:n.toString()})}),[l,t])]}function f(e){const{defaultValue:n,queryString:r=!1,groupId:t}=e,l=p(e),[s,i]=(0,a.useState)((()=>function(e){let{defaultValue:n,tabValues:r}=e;if(0===r.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!h({value:n,tabValues:r}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${r.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const a=r.find((e=>e.default))??r[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:n,tabValues:l}))),[o,d]=m({queryString:r,groupId:t}),[f,x]=function(e){let{groupId:n}=e;const r=function(e){return e?`docusaurus.tab.${e}`:null}(n),[t,l]=(0,u.Nk)(r);return[t,(0,a.useCallback)((e=>{r&&l.set(e)}),[r,l])]}({groupId:t}),b=(()=>{const e=o??f;return h({value:e,tabValues:l})?e:null})();(0,c.Z)((()=>{b&&i(b)}),[b]);return{selectedValue:s,selectValue:(0,a.useCallback)((e=>{if(!h({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);i(e),d(e),x(e)}),[d,x,l]),tabValues:l}}var x=r(2389);const b={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var g=r(5893);function j(e){let{className:n,block:r,selectedValue:a,selectValue:s,tabValues:c}=e;const i=[],{blockElementScrollPositionUntilNextRender:o}=(0,l.o5)(),u=e=>{const n=e.currentTarget,r=i.indexOf(n),t=c[r].value;t!==a&&(o(n),s(t))},d=e=>{let n=null;switch(e.key){case"Enter":u(e);break;case"ArrowRight":{const r=i.indexOf(e.currentTarget)+1;n=i[r]??i[0];break}case"ArrowLeft":{const r=i.indexOf(e.currentTarget)-1;n=i[r]??i[i.length-1];break}}n?.focus()};return(0,g.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,t.Z)("tabs",{"tabs--block":r},n),children:c.map((e=>{let{value:n,label:r,attributes:l}=e;return(0,g.jsx)("li",{role:"tab",tabIndex:a===n?0:-1,"aria-selected":a===n,ref:e=>i.push(e),onKeyDown:d,onClick:u,...l,className:(0,t.Z)("tabs__item",b.tabItem,l?.className,{"tabs__item--active":a===n}),children:r??n},n)}))})}function v(e){let{lazy:n,children:r,selectedValue:t}=e;const l=(Array.isArray(r)?r:[r]).filter(Boolean);if(n){const e=l.find((e=>e.props.value===t));return e?(0,a.cloneElement)(e,{className:"margin-top--md"}):null}return(0,g.jsx)("div",{className:"margin-top--md",children:l.map(((e,n)=>(0,a.cloneElement)(e,{key:n,hidden:e.props.value!==t})))})}function k(e){const n=f(e);return(0,g.jsxs)("div",{className:(0,t.Z)("tabs-container",b.tabList),children:[(0,g.jsx)(j,{...e,...n}),(0,g.jsx)(v,{...e,...n})]})}function y(e){const n=(0,x.Z)();return(0,g.jsx)(k,{...e,children:d(e.children)},String(n))}}}]); \ No newline at end of file diff --git a/assets/js/8d4b214a.67f5ed96.js b/assets/js/8d4b214a.67f5ed96.js new file mode 100644 index 00000000..f4004129 --- /dev/null +++ b/assets/js/8d4b214a.67f5ed96.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkflecks_docusaurus=self.webpackChunkflecks_docusaurus||[]).push([[4639],{3839:(e,n,l)=>{l.r(n),l.d(n,{assets:()=>u,contentTitle:()=>c,default:()=>f,frontMatter:()=>o,metadata:()=>d,toc:()=>h});var s=l(5893),a=l(1151),r=l(4283),t=l(385),i=l(6569);const o={title:"Adding flecks",description:"Add flecks to your application to extend its functionality."},c="Adding flecks",d={id:"adding-flecks",title:"Adding flecks",description:"Add flecks to your application to extend its functionality.",source:"@site/docs/adding-flecks.mdx",sourceDirName:".",slug:"/adding-flecks",permalink:"/flecks/docs/adding-flecks",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{title:"Adding flecks",description:"Add flecks to your application to extend its functionality."},sidebar:"flecksSidebar",previous:{title:"Building your application",permalink:"/flecks/docs/building-your-application"},next:{title:"Guides",permalink:"/flecks/docs/category/guides"}},u={},h=[{value:"Finally... a white page?",id:"finally-a-white-page",level:2},{value:"Proceed with the hooking",id:"proceed-with-the-hooking",level:2},{value:"Everything so far... plus Electron!",id:"everything-so-far-plus-electron",level:2}];function p(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",img:"img",p:"p",pre:"pre",...(0,a.a)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h1,{id:"adding-flecks",children:"Adding flecks"}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"@flecks/web"})," is a fleck that builds and serves a webpage. You can add it to your application\nusing the CLI:"]}),"\n",(0,s.jsx)(r.Z,{cmd:"flecks add @flecks/web"}),"\n",(0,s.jsxs)(n.admonition,{title:"Really, a command just to add a fleck?",type:"tip",children:[(0,s.jsx)(t.Z,{headless:!0,pkg:"@flecks/web",children:(0,s.jsx)(n.p,{children:"Yep! This is only for your convenience however, as it is equivalent to doing:"})}),(0,s.jsx)(n.p,{children:"and then adding:"}),(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"'@flecks/web': {}\n"})}),(0,s.jsxs)(n.p,{children:["to your ",(0,s.jsx)(n.code,{children:"build/flecks.yml"}),"; that's all it does!"]})]}),"\n",(0,s.jsx)(n.p,{children:"Now, if you run:"}),"\n",(0,s.jsx)(i.Z,{headless:!0,cmd:"start"}),"\n",(0,s.jsx)(n.p,{children:"you'll see a line in the output:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:" @flecks/web/server/http HTTP server up @ 0.0.0.0:32340!\n"})}),"\n",(0,s.jsx)(n.h2,{id:"finally-a-white-page",children:"Finally... a white page?"}),"\n",(0,s.jsxs)(n.p,{children:["If you visit ",(0,s.jsx)(n.code,{children:"localhost:32340"})," in your browser, you should now see... a blank white page! Don't fret\nthough; if you open the devtools in your browser, you will see a little messaging from your\napplication that will look something like:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"[webpack-dev-server] Server started: Hot Module Replacement enabled, Live Reloading enabled, Progress disabled, Overlay enabled.\n[HMR] Waiting for update signal from WDS...\nflecks client v3.1.5 loading runtime...\n"})}),"\n",(0,s.jsx)(n.p,{children:"This is a good sign! This means we successfully added a web server with HMR enabled by default.\nOh, the possibilities..."}),"\n",(0,s.jsx)(n.h2,{id:"proceed-with-the-hooking",children:"Proceed with the hooking"}),"\n",(0,s.jsxs)(n.p,{children:["Let's make our fleck ",(0,s.jsx)(n.code,{children:"say-hello"})," hook into ",(0,s.jsx)(n.code,{children:"@flecks/web"})," client to do something when the client\ncomes up (e.g. the browser loads the page)."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-javascript",metastring:'title="packages/say-hello/src/index.js"',children:"export const hooks = {\n // highlight-start\n '@flecks/web/client.up': async () => {\n window.document.body.append('hello world');\n },\n // highlight-end\n '@flecks/server.up': async (flecks) => {\n const {id} = flecks.get('@flecks/core');\n process.stdout.write(` hello server: ID ${id}\\n`);\n },\n};\n"})}),"\n",(0,s.jsx)(n.p,{children:"Now, restart your application and refresh your website. Glorious, isn't it?"}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"An image of our simple hello world application running inside a Chromium browser window",src:l(7929).Z+"",width:"628",height:"509"})}),"\n",(0,s.jsx)(n.h2,{id:"everything-so-far-plus-electron",children:"Everything so far... plus Electron!"}),"\n",(0,s.jsx)(r.Z,{cmd:"flecks add -d @flecks/electron",children:(0,s.jsxs)(n.p,{children:["Let's add another core fleck. flecks ships with a core fleck ",(0,s.jsx)(n.code,{children:"@flecks/electron"}),". This runs your\napplication inside of an instance of ",(0,s.jsx)(n.a,{href:"https://www.electronjs.org/",children:"Electron"}),". You'll add the fleck:"]})}),"\n",(0,s.jsx)(n.p,{children:"Finally,"}),"\n",(0,s.jsx)(i.Z,{headless:!0,cmd:"start"}),"\n",(0,s.jsx)(n.p,{children:"and you will see something like this:"}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"An image of our simple hello world application running inside an Electron window",src:l(6323).Z+"",width:"820",height:"655"})}),"\n",(0,s.jsxs)(n.p,{children:["Isn't it beautiful? ","\ud83d\ude0c"]}),"\n",(0,s.jsx)(n.admonition,{type:"note",children:(0,s.jsxs)(n.p,{children:["We used the ",(0,s.jsx)(n.code,{children:"-d"})," option with ",(0,s.jsx)(n.code,{children:"flecks add"})," to add ",(0,s.jsx)(n.code,{children:"@flecks/electron"})," to\n",(0,s.jsx)(n.a,{href:"https://docs.npmjs.com/specifying-dependencies-and-devdependencies-in-a-package-json-file",children:(0,s.jsx)(n.code,{children:"devDependencies"})}),"\nsince it's only needed for development."]})})]})}function f(e={}){const{wrapper:n}={...(0,a.a)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(p,{...e})}):p(e)}},4283:(e,n,l)=>{l.d(n,{Z:()=>i});var s=l(9286),a=l(4866),r=l(5162),t=l(5893);function i(e){let{children:n,cmd:l,headless:i=!1}=e;const o=Array.isArray(l)?l:[l],c=e=>o.map((n=>`${e} ${n}`)).join("\n");return(0,t.jsxs)(a.Z,{className:i&&"headless",groupId:"package-manager",children:[(0,t.jsxs)(r.Z,{value:"npm",label:"npm",children:[n,(0,t.jsx)(s.Z,{language:"bash",children:c("npx")})]}),(0,t.jsxs)(r.Z,{value:"yarn",label:"Yarn",children:[n,(0,t.jsx)(s.Z,{language:"bash",children:c("yarn")})]}),(0,t.jsxs)(r.Z,{value:"pnpm",label:"pnpm",children:[n,(0,t.jsx)(s.Z,{language:"bash",children:c("pnpx")})]}),(0,t.jsxs)(r.Z,{value:"bun",label:"Bun",children:[n,(0,t.jsx)(s.Z,{language:"bash",children:c("bunx")})]})]})}},385:(e,n,l)=>{l.d(n,{Z:()=>i});var s=l(9286),a=l(4866),r=l(5162),t=l(5893);function i(e){let{children:n,headless:l,pkg:i}=e;return(0,t.jsxs)(a.Z,{className:l&&"headless",groupId:"package-manager",children:[(0,t.jsxs)(r.Z,{value:"npm",label:"npm",children:[n,(0,t.jsxs)(s.Z,{language:"bash",children:["npm install ",i]})]}),(0,t.jsxs)(r.Z,{value:"yarn",label:"Yarn",children:[n,(0,t.jsxs)(s.Z,{language:"bash",children:["yarn add ",i]})]}),(0,t.jsxs)(r.Z,{value:"pnpm",label:"pnpm",children:[n,(0,t.jsxs)(s.Z,{language:"bash",children:["pnpm add ",i]})]}),(0,t.jsxs)(r.Z,{value:"bun",label:"Bun",children:[n,(0,t.jsxs)(s.Z,{language:"bash",children:["bun add ",i]})]})]})}},6569:(e,n,l)=>{l.d(n,{Z:()=>i});var s=l(9286),a=l(4866),r=l(5162),t=l(5893);function i(e){let{children:n,cmd:l,headless:i=!1}=e;return(0,t.jsxs)(a.Z,{className:i&&"headless",groupId:"package-manager",children:[(0,t.jsxs)(r.Z,{value:"npm",label:"npm",children:[n,(0,t.jsxs)(s.Z,{language:"bash",children:["npm run ",l]})]}),(0,t.jsxs)(r.Z,{value:"yarn",label:"Yarn",children:[n,(0,t.jsxs)(s.Z,{language:"bash",children:["yarn run ",l]})]}),(0,t.jsxs)(r.Z,{value:"pnpm",label:"pnpm",children:[n,(0,t.jsxs)(s.Z,{language:"bash",children:["pnpm run ",l]})]}),(0,t.jsxs)(r.Z,{value:"bun",label:"Bun",children:[n,(0,t.jsxs)(s.Z,{language:"bash",children:["bun run ",l]})]})]})}},5162:(e,n,l)=>{l.d(n,{Z:()=>t});l(7294);var s=l(512);const a={tabItem:"tabItem_Ymn6"};var r=l(5893);function t(e){let{children:n,hidden:l,className:t}=e;return(0,r.jsx)("div",{role:"tabpanel",className:(0,s.Z)(a.tabItem,t),hidden:l,children:n})}},4866:(e,n,l)=>{l.d(n,{Z:()=>y});var s=l(7294),a=l(512),r=l(2466),t=l(6550),i=l(469),o=l(1980),c=l(7392),d=l(12);function u(e){return s.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,s.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function h(e){const{values:n,children:l}=e;return(0,s.useMemo)((()=>{const e=n??function(e){return u(e).map((e=>{let{props:{value:n,label:l,attributes:s,default:a}}=e;return{value:n,label:l,attributes:s,default:a}}))}(l);return function(e){const n=(0,c.l)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,l])}function p(e){let{value:n,tabValues:l}=e;return l.some((e=>e.value===n))}function f(e){let{queryString:n=!1,groupId:l}=e;const a=(0,t.k6)(),r=function(e){let{queryString:n=!1,groupId:l}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!l)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return l??null}({queryString:n,groupId:l});return[(0,o._X)(r),(0,s.useCallback)((e=>{if(!r)return;const n=new URLSearchParams(a.location.search);n.set(r,e),a.replace({...a.location,search:n.toString()})}),[r,a])]}function g(e){const{defaultValue:n,queryString:l=!1,groupId:a}=e,r=h(e),[t,o]=(0,s.useState)((()=>function(e){let{defaultValue:n,tabValues:l}=e;if(0===l.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!p({value:n,tabValues:l}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${l.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const s=l.find((e=>e.default))??l[0];if(!s)throw new Error("Unexpected error: 0 tabValues");return s.value}({defaultValue:n,tabValues:r}))),[c,u]=f({queryString:l,groupId:a}),[g,b]=function(e){let{groupId:n}=e;const l=function(e){return e?`docusaurus.tab.${e}`:null}(n),[a,r]=(0,d.Nk)(l);return[a,(0,s.useCallback)((e=>{l&&r.set(e)}),[l,r])]}({groupId:a}),m=(()=>{const e=c??g;return p({value:e,tabValues:r})?e:null})();(0,i.Z)((()=>{m&&o(m)}),[m]);return{selectedValue:t,selectValue:(0,s.useCallback)((e=>{if(!p({value:e,tabValues:r}))throw new Error(`Can't select invalid tab value=${e}`);o(e),u(e),b(e)}),[u,b,r]),tabValues:r}}var b=l(2389);const m={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var x=l(5893);function j(e){let{className:n,block:l,selectedValue:s,selectValue:t,tabValues:i}=e;const o=[],{blockElementScrollPositionUntilNextRender:c}=(0,r.o5)(),d=e=>{const n=e.currentTarget,l=o.indexOf(n),a=i[l].value;a!==s&&(c(n),t(a))},u=e=>{let n=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const l=o.indexOf(e.currentTarget)+1;n=o[l]??o[0];break}case"ArrowLeft":{const l=o.indexOf(e.currentTarget)-1;n=o[l]??o[o.length-1];break}}n?.focus()};return(0,x.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,a.Z)("tabs",{"tabs--block":l},n),children:i.map((e=>{let{value:n,label:l,attributes:r}=e;return(0,x.jsx)("li",{role:"tab",tabIndex:s===n?0:-1,"aria-selected":s===n,ref:e=>o.push(e),onKeyDown:u,onClick:d,...r,className:(0,a.Z)("tabs__item",m.tabItem,r?.className,{"tabs__item--active":s===n}),children:l??n},n)}))})}function v(e){let{lazy:n,children:l,selectedValue:a}=e;const r=(Array.isArray(l)?l:[l]).filter(Boolean);if(n){const e=r.find((e=>e.props.value===a));return e?(0,s.cloneElement)(e,{className:"margin-top--md"}):null}return(0,x.jsx)("div",{className:"margin-top--md",children:r.map(((e,n)=>(0,s.cloneElement)(e,{key:n,hidden:e.props.value!==a})))})}function k(e){const n=g(e);return(0,x.jsxs)("div",{className:(0,a.Z)("tabs-container",m.tabList),children:[(0,x.jsx)(j,{...e,...n}),(0,x.jsx)(v,{...e,...n})]})}function y(e){const n=(0,b.Z)();return(0,x.jsx)(k,{...e,children:u(e.children)},String(n))}},6323:(e,n,l)=>{l.d(n,{Z:()=>s});const s=l.p+"assets/images/flecks-electron-a0aa8d1371582b485c87402b0aa5b555.png"},7929:(e,n,l)=>{l.d(n,{Z:()=>s});const s=l.p+"assets/images/flecks-web-4d794c79b53faa14d140b2dde7e51709.png"}}]); \ No newline at end of file diff --git a/assets/js/8d4b214a.ee67ee9c.js b/assets/js/8d4b214a.ee67ee9c.js deleted file mode 100644 index cca1007f..00000000 --- a/assets/js/8d4b214a.ee67ee9c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkflecks_docusaurus=self.webpackChunkflecks_docusaurus||[]).push([[4639],{3839:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>d,contentTitle:()=>o,default:()=>h,frontMatter:()=>t,metadata:()=>c,toc:()=>r});var s=i(5893),l=i(1151);const t={title:"Adding flecks",description:"Add flecks to your application to extend its functionality."},o="Adding flecks",c={id:"adding-flecks",title:"Adding flecks",description:"Add flecks to your application to extend its functionality.",source:"@site/docs/adding-flecks.mdx",sourceDirName:".",slug:"/adding-flecks",permalink:"/flecks/docs/adding-flecks",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{title:"Adding flecks",description:"Add flecks to your application to extend its functionality."},sidebar:"flecksSidebar",previous:{title:"Building your application",permalink:"/flecks/docs/building-your-application"},next:{title:"Guides",permalink:"/flecks/docs/category/guides"}},d={},r=[{value:"Finally... a white page?",id:"finally-a-white-page",level:2},{value:"Proceed with the hooking",id:"proceed-with-the-hooking",level:2},{value:"Everything so far... plus Electron!",id:"everything-so-far-plus-electron",level:2}];function a(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",img:"img",p:"p",pre:"pre",...(0,l.a)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h1,{id:"adding-flecks",children:"Adding flecks"}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"@flecks/web"})," is a fleck that builds and serves a webpage. You can add it to your application\nusing the CLI:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"npx flecks add @flecks/web\n"})}),"\n",(0,s.jsxs)(n.admonition,{title:"Really, a command just to add a fleck?",type:"tip",children:[(0,s.jsx)(n.p,{children:"Yep! This is only for your convenience however, as it is equivalent to doing:"}),(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"[your package manager] install @flecks/web\n"})}),(0,s.jsx)(n.p,{children:"and then adding:"}),(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"'@flecks/web': {}\n"})}),(0,s.jsxs)(n.p,{children:["to your ",(0,s.jsx)(n.code,{children:"build/flecks.yml"}),"; that's all it does!"]})]}),"\n",(0,s.jsxs)(n.p,{children:["Now, if you run ",(0,s.jsx)(n.code,{children:"npm start"}),", you'll see a line in the output:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:" @flecks/web/server/http HTTP server up @ 0.0.0.0:32340!\n"})}),"\n",(0,s.jsx)(n.h2,{id:"finally-a-white-page",children:"Finally... a white page?"}),"\n",(0,s.jsxs)(n.p,{children:["If you visit ",(0,s.jsx)(n.code,{children:"localhost:32340"})," in your browser, you should now see... a blank white page! Don't fret\nthough; if you open the devtools in your browser, you will see a little messaging from your\napplication that will look something like:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"[webpack-dev-server] Server started: Hot Module Replacement enabled, Live Reloading enabled, Progress disabled, Overlay enabled.\n[HMR] Waiting for update signal from WDS...\nflecks client v3.1.5 loading runtime...\n"})}),"\n",(0,s.jsx)(n.p,{children:"This is a good sign! This means we successfully added a web server with HMR enabled by default.\nOh, the possibilities..."}),"\n",(0,s.jsx)(n.h2,{id:"proceed-with-the-hooking",children:"Proceed with the hooking"}),"\n",(0,s.jsxs)(n.p,{children:["Let's make our fleck ",(0,s.jsx)(n.code,{children:"say-hello"})," hook into ",(0,s.jsx)(n.code,{children:"@flecks/web"})," client to do something when the client\ncomes up (e.g. the browser loads the page)."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-javascript",metastring:'title="packages/say-hello/src/index.js"',children:"export const hooks = {\n // highlight-start\n '@flecks/web/client.up': async () => {\n window.document.body.append('hello world');\n },\n // highlight-end\n '@flecks/server.up': async (flecks) => {\n const {id} = flecks.get('@flecks/core');\n process.stdout.write(` hello server: ID ${id}\\n`);\n },\n};\n"})}),"\n",(0,s.jsx)(n.p,{children:"Now, restart your application and refresh your website. Glorious, isn't it?"}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"An image of our simple hello world application running inside a Chromium browser window",src:i(7929).Z+"",width:"628",height:"509"})}),"\n",(0,s.jsx)(n.h2,{id:"everything-so-far-plus-electron",children:"Everything so far... plus Electron!"}),"\n",(0,s.jsxs)(n.p,{children:["Let's add another core fleck. flecks ships with a core fleck ",(0,s.jsx)(n.code,{children:"@flecks/electron"}),". This runs your\napplication inside of an instance of ",(0,s.jsx)(n.a,{href:"https://www.electronjs.org/",children:"Electron"}),". You'll add the fleck:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"npx flecks add -d @flecks/electron\n"})}),"\n",(0,s.jsxs)(n.p,{children:["Finally ",(0,s.jsx)(n.code,{children:"npm start"})," and you will see something like this:"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"An image of our simple hello world application running inside an Electron window",src:i(6323).Z+"",width:"820",height:"655"})}),"\n",(0,s.jsxs)(n.p,{children:["Isn't it beautiful? ","\ud83d\ude0c"]}),"\n",(0,s.jsx)(n.admonition,{type:"note",children:(0,s.jsxs)(n.p,{children:["We used the ",(0,s.jsx)(n.code,{children:"-d"})," option with ",(0,s.jsx)(n.code,{children:"flecks add"})," to add ",(0,s.jsx)(n.code,{children:"@flecks/electron"})," to\n",(0,s.jsx)(n.a,{href:"https://docs.npmjs.com/specifying-dependencies-and-devdependencies-in-a-package-json-file",children:(0,s.jsx)(n.code,{children:"devDependencies"})}),"\nsince it's only needed for development."]})})]})}function h(e={}){const{wrapper:n}={...(0,l.a)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(a,{...e})}):a(e)}},6323:(e,n,i)=>{i.d(n,{Z:()=>s});const s=i.p+"assets/images/flecks-electron-a0aa8d1371582b485c87402b0aa5b555.png"},7929:(e,n,i)=>{i.d(n,{Z:()=>s});const s=i.p+"assets/images/flecks-web-4d794c79b53faa14d140b2dde7e51709.png"},1151:(e,n,i)=>{i.d(n,{Z:()=>c,a:()=>o});var s=i(7294);const l={},t=s.createContext(l);function o(e){const n=s.useContext(t);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(l):e.components||l:o(e.components),s.createElement(t.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/b045326f.d6474522.js b/assets/js/b045326f.d6474522.js deleted file mode 100644 index 25d26595..00000000 --- a/assets/js/b045326f.d6474522.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkflecks_docusaurus=self.webpackChunkflecks_docusaurus||[]).push([[1851],{4345:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>r,contentTitle:()=>i,default:()=>u,frontMatter:()=>c,metadata:()=>d,toc:()=>l});var o=t(5893),s=t(1151);const c={title:"Documentation",description:"Document your project."},i="Documentation",d={id:"documentation",title:"Documentation",description:"Document your project.",source:"@site/docs/documentation.mdx",sourceDirName:".",slug:"/documentation",permalink:"/flecks/docs/documentation",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{title:"Documentation",description:"Document your project."},sidebar:"flecksSidebar",previous:{title:"Platforms",permalink:"/flecks/docs/platforms"},next:{title:"Command-line interface",permalink:"/flecks/docs/cli"}},r={},l=[{value:"Install @flecks/dox",id:"install-flecksdox",level:2},{value:"Output for Docusaurus",id:"output-for-docusaurus",level:2},{value:"Raw output",id:"raw-output",level:2}];function a(e){const n={a:"a",admonition:"admonition",code:"code",del:"del",h1:"h1",h2:"h2",p:"p",pre:"pre",...(0,s.a)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h1,{id:"documentation",children:"Documentation"}),"\n",(0,o.jsxs)(n.p,{children:["Ah, the most ",(0,o.jsx)(n.del,{children:"boring"})," awesome part of development."]}),"\n",(0,o.jsxs)(n.p,{children:["flecks provides a fleck called ",(0,o.jsx)(n.code,{children:"@flecks/dox"})," that helps you generate documentation for your\nproject."]}),"\n",(0,o.jsx)(n.admonition,{title:"Mmm, dog food",type:"tip",children:(0,o.jsxs)(n.p,{children:["In fact, this very website you're viewing uses the same tooling! Check out the\n",(0,o.jsx)(n.a,{href:"./category/generated-details",children:"Generated details page"}),"."]})}),"\n",(0,o.jsxs)(n.h2,{id:"install-flecksdox",children:["Install ",(0,o.jsx)(n.code,{children:"@flecks/dox"})]}),"\n",(0,o.jsxs)(n.p,{children:["To get started, add ",(0,o.jsx)(n.code,{children:"@flecks/dox"})," to your project:"]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"npx flecks add -d @flecks/dox\n"})}),"\n",(0,o.jsx)(n.h2,{id:"output-for-docusaurus",children:"Output for Docusaurus"}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.a,{href:"https://docusaurus.io",children:"Docusaurus"})," is a nice way to generate a documentation website.\n",(0,o.jsx)(n.code,{children:"@flecks/dox"})," can output MDX files for Docusaurus:"]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{children:"npx flecks dox docusaurus\n"})}),"\n",(0,o.jsxs)(n.p,{children:["By default this command will output the files to ",(0,o.jsx)(n.code,{children:"website/docs/flecks"}),"."]}),"\n",(0,o.jsxs)(n.p,{children:["As an example, this website defines an entry in ",(0,o.jsx)(n.code,{children:"sidebars.js"})," like so:"]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-js",children:"{\n type: 'category',\n label: 'Generated details',\n link: {\n type: 'generated-index',\n },\n items: [\n 'flecks/hooks',\n 'flecks/config',\n 'flecks/build-files',\n 'flecks/todos',\n ],\n},\n"})}),"\n",(0,o.jsx)(n.h2,{id:"raw-output",children:"Raw output"}),"\n",(0,o.jsx)(n.p,{children:"You may also output JSON files for your own processing:"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{children:"npx flecks dox json\n"})}),"\n",(0,o.jsxs)(n.p,{children:["By default this command will output the files to ",(0,o.jsx)(n.code,{children:"dist/dox"}),"."]})]})}function u(e={}){const{wrapper:n}={...(0,s.a)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(a,{...e})}):a(e)}},1151:(e,n,t)=>{t.d(n,{Z:()=>d,a:()=>i});var o=t(7294);const s={},c=o.createContext(s);function i(e){const n=o.useContext(c);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),o.createElement(c.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/b045326f.ef17d5be.js b/assets/js/b045326f.ef17d5be.js new file mode 100644 index 00000000..974cbd95 --- /dev/null +++ b/assets/js/b045326f.ef17d5be.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkflecks_docusaurus=self.webpackChunkflecks_docusaurus||[]).push([[1851],{4345:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>o,default:()=>h,frontMatter:()=>l,metadata:()=>u,toc:()=>i});var r=n(5893),a=n(1151),s=n(4283);const l={title:"Documentation",description:"Document your project."},o="Documentation",u={id:"documentation",title:"Documentation",description:"Document your project.",source:"@site/docs/documentation.mdx",sourceDirName:".",slug:"/documentation",permalink:"/flecks/docs/documentation",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{title:"Documentation",description:"Document your project."},sidebar:"flecksSidebar",previous:{title:"Platforms",permalink:"/flecks/docs/platforms"},next:{title:"Command-line interface",permalink:"/flecks/docs/cli"}},c={},i=[{value:"Install @flecks/dox",id:"install-flecksdox",level:2},{value:"Output for Docusaurus",id:"output-for-docusaurus",level:2},{value:"Raw output",id:"raw-output",level:2}];function d(e){const t={a:"a",admonition:"admonition",code:"code",del:"del",h1:"h1",h2:"h2",p:"p",pre:"pre",...(0,a.a)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.h1,{id:"documentation",children:"Documentation"}),"\n",(0,r.jsxs)(t.p,{children:["Ah, the most ",(0,r.jsx)(t.del,{children:"boring"})," awesome part of development."]}),"\n",(0,r.jsxs)(t.p,{children:["flecks provides a fleck called ",(0,r.jsx)(t.code,{children:"@flecks/dox"})," that helps you generate documentation for your\nproject."]}),"\n",(0,r.jsx)(t.admonition,{title:"Mmm, dog food",type:"tip",children:(0,r.jsxs)(t.p,{children:["In fact, this very website you're viewing uses the same tooling! Check out the\n",(0,r.jsx)(t.a,{href:"./category/generated-details",children:"Generated details page"}),"."]})}),"\n",(0,r.jsxs)(t.h2,{id:"install-flecksdox",children:["Install ",(0,r.jsx)(t.code,{children:"@flecks/dox"})]}),"\n",(0,r.jsxs)(t.p,{children:["To get started, add ",(0,r.jsx)(t.code,{children:"@flecks/dox"})," to your project:"]}),"\n",(0,r.jsx)(s.Z,{cmd:"flecks add -d @flecks/dox"}),"\n",(0,r.jsx)(t.h2,{id:"output-for-docusaurus",children:"Output for Docusaurus"}),"\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.a,{href:"https://docusaurus.io",children:"Docusaurus"})," is a nice way to generate a documentation website.\n",(0,r.jsx)(t.code,{children:"@flecks/dox"})," can output MDX files for Docusaurus:"]}),"\n",(0,r.jsx)(s.Z,{headless:!0,cmd:"flecks dox docusaurus"}),"\n",(0,r.jsxs)(t.p,{children:["By default this command will output the files to ",(0,r.jsx)(t.code,{children:"website/docs/flecks"}),"."]}),"\n",(0,r.jsxs)(t.p,{children:["As an example, this website defines an entry in ",(0,r.jsx)(t.code,{children:"sidebars.js"})," like so:"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-js",children:"{\n type: 'category',\n label: 'Generated details',\n link: {\n type: 'generated-index',\n },\n items: [\n 'flecks/hooks',\n 'flecks/config',\n 'flecks/build-files',\n 'flecks/todos',\n ],\n},\n"})}),"\n",(0,r.jsx)(t.h2,{id:"raw-output",children:"Raw output"}),"\n",(0,r.jsx)(t.p,{children:"You may also output JSON files for your own processing:"}),"\n",(0,r.jsx)(s.Z,{headless:!0,cmd:"flecks dox json"}),"\n",(0,r.jsxs)(t.p,{children:["By default this command will output the files to ",(0,r.jsx)(t.code,{children:"dist/dox"}),"."]})]})}function h(e={}){const{wrapper:t}={...(0,a.a)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},4283:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(9286),a=n(4866),s=n(5162),l=n(5893);function o(e){let{children:t,cmd:n,headless:o=!1}=e;const u=Array.isArray(n)?n:[n],c=e=>u.map((t=>`${e} ${t}`)).join("\n");return(0,l.jsxs)(a.Z,{className:o&&"headless",groupId:"package-manager",children:[(0,l.jsxs)(s.Z,{value:"npm",label:"npm",children:[t,(0,l.jsx)(r.Z,{language:"bash",children:c("npx")})]}),(0,l.jsxs)(s.Z,{value:"yarn",label:"Yarn",children:[t,(0,l.jsx)(r.Z,{language:"bash",children:c("yarn")})]}),(0,l.jsxs)(s.Z,{value:"pnpm",label:"pnpm",children:[t,(0,l.jsx)(r.Z,{language:"bash",children:c("pnpx")})]}),(0,l.jsxs)(s.Z,{value:"bun",label:"Bun",children:[t,(0,l.jsx)(r.Z,{language:"bash",children:c("bunx")})]})]})}},5162:(e,t,n)=>{n.d(t,{Z:()=>l});n(7294);var r=n(512);const a={tabItem:"tabItem_Ymn6"};var s=n(5893);function l(e){let{children:t,hidden:n,className:l}=e;return(0,s.jsx)("div",{role:"tabpanel",className:(0,r.Z)(a.tabItem,l),hidden:n,children:t})}},4866:(e,t,n)=>{n.d(t,{Z:()=>y});var r=n(7294),a=n(512),s=n(2466),l=n(6550),o=n(469),u=n(1980),c=n(7392),i=n(12);function d(e){return r.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function h(e){const{values:t,children:n}=e;return(0,r.useMemo)((()=>{const e=t??function(e){return d(e).map((e=>{let{props:{value:t,label:n,attributes:r,default:a}}=e;return{value:t,label:n,attributes:r,default:a}}))}(n);return function(e){const t=(0,c.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function p(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function f(e){let{queryString:t=!1,groupId:n}=e;const a=(0,l.k6)(),s=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return n??null}({queryString:t,groupId:n});return[(0,u._X)(s),(0,r.useCallback)((e=>{if(!s)return;const t=new URLSearchParams(a.location.search);t.set(s,e),a.replace({...a.location,search:t.toString()})}),[s,a])]}function m(e){const{defaultValue:t,queryString:n=!1,groupId:a}=e,s=h(e),[l,u]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!p({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const r=n.find((e=>e.default))??n[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:t,tabValues:s}))),[c,d]=f({queryString:n,groupId:a}),[m,b]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[a,s]=(0,i.Nk)(n);return[a,(0,r.useCallback)((e=>{n&&s.set(e)}),[n,s])]}({groupId:a}),x=(()=>{const e=c??m;return p({value:e,tabValues:s})?e:null})();(0,o.Z)((()=>{x&&u(x)}),[x]);return{selectedValue:l,selectValue:(0,r.useCallback)((e=>{if(!p({value:e,tabValues:s}))throw new Error(`Can't select invalid tab value=${e}`);u(e),d(e),b(e)}),[d,b,s]),tabValues:s}}var b=n(2389);const x={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var j=n(5893);function g(e){let{className:t,block:n,selectedValue:r,selectValue:l,tabValues:o}=e;const u=[],{blockElementScrollPositionUntilNextRender:c}=(0,s.o5)(),i=e=>{const t=e.currentTarget,n=u.indexOf(t),a=o[n].value;a!==r&&(c(t),l(a))},d=e=>{let t=null;switch(e.key){case"Enter":i(e);break;case"ArrowRight":{const n=u.indexOf(e.currentTarget)+1;t=u[n]??u[0];break}case"ArrowLeft":{const n=u.indexOf(e.currentTarget)-1;t=u[n]??u[u.length-1];break}}t?.focus()};return(0,j.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,a.Z)("tabs",{"tabs--block":n},t),children:o.map((e=>{let{value:t,label:n,attributes:s}=e;return(0,j.jsx)("li",{role:"tab",tabIndex:r===t?0:-1,"aria-selected":r===t,ref:e=>u.push(e),onKeyDown:d,onClick:i,...s,className:(0,a.Z)("tabs__item",x.tabItem,s?.className,{"tabs__item--active":r===t}),children:n??t},t)}))})}function v(e){let{lazy:t,children:n,selectedValue:a}=e;const s=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=s.find((e=>e.props.value===a));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return(0,j.jsx)("div",{className:"margin-top--md",children:s.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==a})))})}function k(e){const t=m(e);return(0,j.jsxs)("div",{className:(0,a.Z)("tabs-container",x.tabList),children:[(0,j.jsx)(g,{...e,...t}),(0,j.jsx)(v,{...e,...t})]})}function y(e){const t=(0,b.Z)();return(0,j.jsx)(k,{...e,children:d(e.children)},String(t))}}}]); \ No newline at end of file diff --git a/assets/js/ba61d949.1c6e4952.js b/assets/js/ba61d949.1c6e4952.js deleted file mode 100644 index ee85a3fd..00000000 --- a/assets/js/ba61d949.1c6e4952.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkflecks_docusaurus=self.webpackChunkflecks_docusaurus||[]).push([[7041],{5053:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>s,default:()=>h,frontMatter:()=>a,metadata:()=>i,toc:()=>d});var l=t(5893),r=t(1151),o=t(3200);const a={title:"Command-line interface",description:"Use built-in commands and write your own."},s="Command-line interface",i={id:"cli",title:"Command-line interface",description:"Use built-in commands and write your own.",source:"@site/docs/cli.mdx",sourceDirName:".",slug:"/cli",permalink:"/flecks/docs/cli",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{title:"Command-line interface",description:"Use built-in commands and write your own."},sidebar:"flecksSidebar",previous:{title:"Documentation",permalink:"/flecks/docs/documentation"},next:{title:"Environment Variables",permalink:"/flecks/docs/environment"}},c={},d=[{value:"Built-in commands",id:"built-in-commands",level:2},{value:"add",id:"add",level:3},{value:"build",id:"build",level:3},{value:"clean",id:"clean",level:3},{value:"dox",id:"dox",level:3},{value:"lint",id:"lint",level:3},{value:"repl",id:"repl",level:3},{value:"test",id:"test",level:3},{value:"Your commands",id:"your-commands",level:2},{value:"Implement @flecks/build\u200b.commands",id:"implement-flecksbuildcommands",level:3},{value:"Create a command that takes an option",id:"create-a-command-that-takes-an-option",level:3},{value:"Inspect and invoke your command",id:"inspect-and-invoke-your-command",level:3},{value:"Define arguments",id:"define-arguments",level:3},{value:"Going further",id:"going-further",level:3}];function u(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",p:"p",pre:"pre",...(0,r.a)(),...e.components};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(n.h1,{id:"command-line-interface",children:"Command-line interface"}),"\n",(0,l.jsx)(n.p,{children:"flecks has a command-line interface for building, linting, testing, and so much more."}),"\n",(0,l.jsx)(n.h2,{id:"built-in-commands",children:"Built-in commands"}),"\n",(0,l.jsx)(n.h3,{id:"add",children:(0,l.jsx)(n.code,{children:"add"})}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{children:"Usage: flecks add [options] \n\nadd a fleck to your application\n\nArguments:\n fleck fleck\n\nOptions:\n -d, --dev-dependency add to dev dependencies\n -h, --help display help for command\n"})}),"\n",(0,l.jsx)(n.h3,{id:"build",children:(0,l.jsx)(n.code,{children:"build"})}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{children:'Usage: flecks build [options] [target]\n\nBuild a target in your application.\n\nArguments:\n target build target (choices: "fleck")\n\nOptions:\n -d, --no-production dev build\n -h, --hot build with hot module reloading\n -w, --watch watch for changes\n --help display help for command\n'})}),"\n",(0,l.jsx)(n.h3,{id:"clean",children:(0,l.jsx)(n.code,{children:"clean"})}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{children:"Usage: flecks clean [options]\n\nRemove node_modules, lock file, and build artifacts.\n\nOptions:\n -h, --help display help for command\n"})}),"\n",(0,l.jsx)(n.h3,{id:"dox",children:(0,l.jsx)(n.code,{children:"dox"})}),"\n",(0,l.jsxs)(n.p,{children:["(Implemented by ",(0,l.jsx)(n.code,{children:"@flecks/dox"}),")"]}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{children:'Usage: flecks dox [options] [output path]\n\nGenerate documentation\n\nArguments:\n subcommand Generation type (choices: "docusaurus", "json")\n output path Where the files are output\n\nOptions:\n -r, --rewrite-filenames [pairs...] rewrite filenames\n -h, --help display help for command\n'})}),"\n",(0,l.jsx)(n.h3,{id:"lint",children:(0,l.jsx)(n.code,{children:"lint"})}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{children:"Usage: flecks lint [options]\n\nRun ESLint.\n\nOptions:\n -h, --help display help for command\n"})}),"\n",(0,l.jsx)(n.h3,{id:"repl",children:(0,l.jsx)(n.code,{children:"repl"})}),"\n",(0,l.jsxs)(n.p,{children:["(Implemented by ",(0,l.jsx)(n.code,{children:"@flecks/repl"}),")"]}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{children:"Usage: flecks repl [options]\n\nConnect to REPL.\n\nOptions:\n -r, --rlwrap use rlwrap around socat\n -h, --help display help for command\n"})}),"\n",(0,l.jsx)(n.h3,{id:"test",children:(0,l.jsx)(n.code,{children:"test"})}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{children:"Usage: flecks test [options]\n\nRun tests.\n\nOptions:\n -d, --no-production dev build\n -w, --watch watch for changes\n -v, --verbose verbose output\n -h, --help display help for command\n\nThe options are passed along to the `build` command.\n"})}),"\n",(0,l.jsx)(n.h2,{id:"your-commands",children:"Your commands"}),"\n",(0,l.jsxs)(n.p,{children:["You can implement your own command by implementing\n",(0,l.jsx)(n.a,{href:"./flecks/hooks#flecksbuildcommands",children:(0,l.jsx)(n.code,{children:"@flecks/build.commands"})})," in your fleck. Let's\nrun through the process."]}),"\n",(0,l.jsxs)(n.h3,{id:"implement-flecksbuildcommands",children:["Implement ",(0,l.jsx)("code",{children:"@flecks/build\u200b.commands"})]}),"\n",(0,l.jsx)(n.p,{children:"First, create an application:"}),"\n",(0,l.jsx)(o.Z,{type:"app",pkg:"cli_test"}),"\n",(0,l.jsx)(n.p,{children:"Move into the new project and create a fleck:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"npx create-fleck fortune\n"})}),"\n",(0,l.jsxs)(n.p,{children:["We're going to be creating a fortune teller command that will tell you when you will find love.\n","\ud83d\ude0d"]}),"\n",(0,l.jsx)(n.h3,{id:"create-a-command-that-takes-an-option",children:"Create a command that takes an option"}),"\n",(0,l.jsx)(n.p,{children:"Commands are gathered during the bootstrap phase and therefore your hook must be\nimplemented in a bootstrap script."}),"\n",(0,l.jsxs)(n.p,{children:["Edit your bootstrap script at ",(0,l.jsx)(n.code,{children:"packages/fortune/build/flecks.bootstrap.js"})," to look like this:"]}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-javascript",metastring:'title="packages/fortune/build/flecks.bootstrap.js"',children:"export const hooks = {\n '@flecks/build.commands': (program) => ({\n fortune: {\n options: [\n program.createOption('-n, --be-nice', 'be nice'),\n ],\n description: 'find your true love',\n action: async ({beNice}) => {\n console.log(`It will be ${Math.floor(Math.random() * 10) + 2} days until you meet your true love!`);\n if (!beNice) {\n console.log('You might also stub your toe.');\n }\n },\n },\n }),\n};\n"})}),"\n",(0,l.jsx)(n.h3,{id:"inspect-and-invoke-your-command",children:"Inspect and invoke your command"}),"\n",(0,l.jsx)(n.p,{children:"Now, invoke flecks like so:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"npx flecks --help\n"})}),"\n",(0,l.jsx)(n.p,{children:"You will see among the commands listed:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{children:" fortune [options] find your true love\n"})}),"\n",(0,l.jsxs)(n.p,{children:["Run the command with the ",(0,l.jsx)(n.code,{children:"--help"})," option:"]}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"npx flecks fortune --help\n"})}),"\n",(0,l.jsx)(n.p,{children:"You will see this output:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{children:"Usage: flecks fortune [options]\n\nfind your true love\n\nOptions:\n -n, --be-nice be nice\n"})}),"\n",(0,l.jsx)(n.p,{children:"Let's try it!"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"npx flecks fortune --be-nice\n"})}),"\n",(0,l.jsx)(n.p,{children:"You will see something like:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{children:"It will be 11 days until you meet your true love!\n"})}),"\n",(0,l.jsx)(n.p,{children:"How about without our option:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"npx flecks fortune\n"})}),"\n",(0,l.jsx)(n.p,{children:"You will see something like:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{children:"It will be 7 days until you meet your true love!\nYou might also stub your toe.\n"})}),"\n",(0,l.jsx)(n.h3,{id:"define-arguments",children:"Define arguments"}),"\n",(0,l.jsx)(n.p,{children:"You can also define arguments in addition to options. Let's add an argument that takes the user's\nname to personalize the output:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-javascript",metastring:'title="packages/fortune/build/flecks.bootstrap.js"',children:"const {Argument} = require('@flecks/core/build/commands');\n\nexport const hooks = {\n '@flecks/build.commands': (program, flecks) => {\n return {\n fortune: {\n // highlight-start\n args: [\n program.createArgument('[name]', 'your name')\n ],\n // highlight-end\n options: [\n program.createOption('-n, --be-nice', 'be nice'),\n ],\n description: 'find your true love',\n // highlight-next-line\n action: async (name = 'person', {beNice}) => {\n // highlight-next-line\n console.log(`Hey, ${name}. It will be ${Math.floor(Math.random() * 10) + 2} days until you meet your true love!`);\n if (!beNice) {\n console.log('You might also stub your toe.');\n }\n },\n },\n };\n },\n};\n"})}),"\n",(0,l.jsx)(n.p,{children:"Notice that we added the argument to... the arguments."}),"\n",(0,l.jsx)(n.p,{children:"Try it again:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"npx flecks fortune --be-nice\n"})}),"\n",(0,l.jsx)(n.p,{children:"You will see e.g.:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{children:"Hey, person. It will be 7 days until you meet your true love!\n"})}),"\n",(0,l.jsxs)(n.p,{children:["That's because we set the default name to ",(0,l.jsx)(n.code,{children:"'person'"})," in the code above. Let's try passing in a\nname:"]}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"npx flecks fortune cha0s\n"})}),"\n",(0,l.jsx)(n.p,{children:"Now the output looks like:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{children:"Hey, cha0s. It will be 4 days until you meet your true love!\nYou might also stub your toe.\n"})}),"\n",(0,l.jsx)(n.h3,{id:"going-further",children:"Going further"}),"\n",(0,l.jsxs)(n.p,{children:["flecks uses ",(0,l.jsx)(n.a,{href:"https://github.com/tj/commander.js#quick-start",children:"Commander.js"})," under the hood to build its CLI.\nIt might be worth checking out their documentation for any more advanced usage."]})]})}function h(e={}){const{wrapper:n}={...(0,r.a)(),...e.components};return n?(0,l.jsx)(n,{...e,children:(0,l.jsx)(u,{...e})}):u(e)}},3200:(e,n,t)=>{t.d(n,{Z:()=>s});var l=t(9286),r=t(4866),o=t(5162),a=t(5893);function s(e){let{pkg:n,type:t}=e;return(0,a.jsxs)(r.Z,{children:[(0,a.jsx)(o.Z,{value:"npm",label:"npm",children:(0,a.jsxs)(l.Z,{language:"bash",children:["npm init @flecks/",t," ",n]})}),(0,a.jsx)(o.Z,{value:"yarn",label:"Yarn",children:(0,a.jsxs)(l.Z,{language:"bash",children:["yarn create @flecks/",t," ",n]})}),(0,a.jsx)(o.Z,{value:"bun",label:"Bun",children:(0,a.jsxs)(l.Z,{language:"bash",children:["bun create @flecks/",t," ",n]})})]})}},5162:(e,n,t)=>{t.d(n,{Z:()=>a});t(7294);var l=t(512);const r={tabItem:"tabItem_Ymn6"};var o=t(5893);function a(e){let{children:n,hidden:t,className:a}=e;return(0,o.jsx)("div",{role:"tabpanel",className:(0,l.Z)(r.tabItem,a),hidden:t,children:n})}},4866:(e,n,t)=>{t.d(n,{Z:()=>y});var l=t(7294),r=t(512),o=t(2466),a=t(6550),s=t(469),i=t(1980),c=t(7392),d=t(12);function u(e){return l.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,l.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function h(e){const{values:n,children:t}=e;return(0,l.useMemo)((()=>{const e=n??function(e){return u(e).map((e=>{let{props:{value:n,label:t,attributes:l,default:r}}=e;return{value:n,label:t,attributes:l,default:r}}))}(t);return function(e){const n=(0,c.l)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,t])}function p(e){let{value:n,tabValues:t}=e;return t.some((e=>e.value===n))}function m(e){let{queryString:n=!1,groupId:t}=e;const r=(0,a.k6)(),o=function(e){let{queryString:n=!1,groupId:t}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!t)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return t??null}({queryString:n,groupId:t});return[(0,i._X)(o),(0,l.useCallback)((e=>{if(!o)return;const n=new URLSearchParams(r.location.search);n.set(o,e),r.replace({...r.location,search:n.toString()})}),[o,r])]}function f(e){const{defaultValue:n,queryString:t=!1,groupId:r}=e,o=h(e),[a,i]=(0,l.useState)((()=>function(e){let{defaultValue:n,tabValues:t}=e;if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!p({value:n,tabValues:t}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${t.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const l=t.find((e=>e.default))??t[0];if(!l)throw new Error("Unexpected error: 0 tabValues");return l.value}({defaultValue:n,tabValues:o}))),[c,u]=m({queryString:t,groupId:r}),[f,b]=function(e){let{groupId:n}=e;const t=function(e){return e?`docusaurus.tab.${e}`:null}(n),[r,o]=(0,d.Nk)(t);return[r,(0,l.useCallback)((e=>{t&&o.set(e)}),[t,o])]}({groupId:r}),x=(()=>{const e=c??f;return p({value:e,tabValues:o})?e:null})();(0,s.Z)((()=>{x&&i(x)}),[x]);return{selectedValue:a,selectValue:(0,l.useCallback)((e=>{if(!p({value:e,tabValues:o}))throw new Error(`Can't select invalid tab value=${e}`);i(e),u(e),b(e)}),[u,b,o]),tabValues:o}}var b=t(2389);const x={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var g=t(5893);function j(e){let{className:n,block:t,selectedValue:l,selectValue:a,tabValues:s}=e;const i=[],{blockElementScrollPositionUntilNextRender:c}=(0,o.o5)(),d=e=>{const n=e.currentTarget,t=i.indexOf(n),r=s[t].value;r!==l&&(c(n),a(r))},u=e=>{let n=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const t=i.indexOf(e.currentTarget)+1;n=i[t]??i[0];break}case"ArrowLeft":{const t=i.indexOf(e.currentTarget)-1;n=i[t]??i[i.length-1];break}}n?.focus()};return(0,g.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,r.Z)("tabs",{"tabs--block":t},n),children:s.map((e=>{let{value:n,label:t,attributes:o}=e;return(0,g.jsx)("li",{role:"tab",tabIndex:l===n?0:-1,"aria-selected":l===n,ref:e=>i.push(e),onKeyDown:u,onClick:d,...o,className:(0,r.Z)("tabs__item",x.tabItem,o?.className,{"tabs__item--active":l===n}),children:t??n},n)}))})}function v(e){let{lazy:n,children:t,selectedValue:r}=e;const o=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){const e=o.find((e=>e.props.value===r));return e?(0,l.cloneElement)(e,{className:"margin-top--md"}):null}return(0,g.jsx)("div",{className:"margin-top--md",children:o.map(((e,n)=>(0,l.cloneElement)(e,{key:n,hidden:e.props.value!==r})))})}function k(e){const n=f(e);return(0,g.jsxs)("div",{className:(0,r.Z)("tabs-container",x.tabList),children:[(0,g.jsx)(j,{...e,...n}),(0,g.jsx)(v,{...e,...n})]})}function y(e){const n=(0,b.Z)();return(0,g.jsx)(k,{...e,children:u(e.children)},String(n))}}}]); \ No newline at end of file diff --git a/assets/js/ba61d949.dda33883.js b/assets/js/ba61d949.dda33883.js new file mode 100644 index 00000000..52fbed5e --- /dev/null +++ b/assets/js/ba61d949.dda33883.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkflecks_docusaurus=self.webpackChunkflecks_docusaurus||[]).push([[7041],{5053:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>i,default:()=>p,frontMatter:()=>o,metadata:()=>c,toc:()=>u});var l=t(5893),r=t(1151),a=t(3200),s=t(4283);const o={title:"Command-line interface",description:"Use built-in commands and write your own."},i="Command-line interface",c={id:"cli",title:"Command-line interface",description:"Use built-in commands and write your own.",source:"@site/docs/cli.mdx",sourceDirName:".",slug:"/cli",permalink:"/flecks/docs/cli",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{title:"Command-line interface",description:"Use built-in commands and write your own."},sidebar:"flecksSidebar",previous:{title:"Documentation",permalink:"/flecks/docs/documentation"},next:{title:"Environment Variables",permalink:"/flecks/docs/environment"}},d={},u=[{value:"Built-in commands",id:"built-in-commands",level:2},{value:"add",id:"add",level:3},{value:"build",id:"build",level:3},{value:"clean",id:"clean",level:3},{value:"dox",id:"dox",level:3},{value:"lint",id:"lint",level:3},{value:"repl",id:"repl",level:3},{value:"test",id:"test",level:3},{value:"Your commands",id:"your-commands",level:2},{value:"Implement @flecks/build\u200b.commands",id:"implement-flecksbuildcommands",level:3},{value:"Create a command that takes an option",id:"create-a-command-that-takes-an-option",level:3},{value:"Inspect and invoke your command",id:"inspect-and-invoke-your-command",level:3},{value:"Define arguments",id:"define-arguments",level:3},{value:"Going further",id:"going-further",level:3}];function h(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",p:"p",pre:"pre",...(0,r.a)(),...e.components};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(n.h1,{id:"command-line-interface",children:"Command-line interface"}),"\n",(0,l.jsx)(n.p,{children:"flecks has a command-line interface for building, linting, testing, and so much more."}),"\n",(0,l.jsx)(n.h2,{id:"built-in-commands",children:"Built-in commands"}),"\n",(0,l.jsx)(n.h3,{id:"add",children:(0,l.jsx)(n.code,{children:"add"})}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{children:"Usage: flecks add [options] \n\nadd a fleck to your application\n\nArguments:\n fleck fleck\n\nOptions:\n -d, --dev-dependency add to dev dependencies\n -h, --help display help for command\n"})}),"\n",(0,l.jsx)(n.h3,{id:"build",children:(0,l.jsx)(n.code,{children:"build"})}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{children:'Usage: flecks build [options] [target]\n\nBuild a target in your application.\n\nArguments:\n target build target (choices: "fleck")\n\nOptions:\n -d, --no-production dev build\n -h, --hot build with hot module reloading\n -w, --watch watch for changes\n --help display help for command\n'})}),"\n",(0,l.jsx)(n.h3,{id:"clean",children:(0,l.jsx)(n.code,{children:"clean"})}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{children:"Usage: flecks clean [options]\n\nRemove node_modules, lock file, and build artifacts.\n\nOptions:\n -h, --help display help for command\n"})}),"\n",(0,l.jsx)(n.h3,{id:"dox",children:(0,l.jsx)(n.code,{children:"dox"})}),"\n",(0,l.jsxs)(n.p,{children:["(Implemented by ",(0,l.jsx)(n.code,{children:"@flecks/dox"}),")"]}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{children:'Usage: flecks dox [options] [output path]\n\nGenerate documentation\n\nArguments:\n subcommand Generation type (choices: "docusaurus", "json")\n output path Where the files are output\n\nOptions:\n -r, --rewrite-filenames [pairs...] rewrite filenames\n -h, --help display help for command\n'})}),"\n",(0,l.jsx)(n.h3,{id:"lint",children:(0,l.jsx)(n.code,{children:"lint"})}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{children:"Usage: flecks lint [options]\n\nRun ESLint.\n\nOptions:\n -h, --help display help for command\n"})}),"\n",(0,l.jsx)(n.h3,{id:"repl",children:(0,l.jsx)(n.code,{children:"repl"})}),"\n",(0,l.jsxs)(n.p,{children:["(Implemented by ",(0,l.jsx)(n.code,{children:"@flecks/repl"}),")"]}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{children:"Usage: flecks repl [options]\n\nConnect to REPL.\n\nOptions:\n -r, --rlwrap use rlwrap around socat\n -h, --help display help for command\n"})}),"\n",(0,l.jsx)(n.h3,{id:"test",children:(0,l.jsx)(n.code,{children:"test"})}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{children:"Usage: flecks test [options]\n\nRun tests.\n\nOptions:\n -d, --no-production dev build\n -w, --watch watch for changes\n -v, --verbose verbose output\n -h, --help display help for command\n\nThe options are passed along to the `build` command.\n"})}),"\n",(0,l.jsx)(n.h2,{id:"your-commands",children:"Your commands"}),"\n",(0,l.jsxs)(n.p,{children:["You can implement your own command by implementing\n",(0,l.jsx)(n.a,{href:"./flecks/hooks#flecksbuildcommands",children:(0,l.jsx)(n.code,{children:"@flecks/build.commands"})})," in your fleck. Let's\nrun through the process."]}),"\n",(0,l.jsxs)(n.h3,{id:"implement-flecksbuildcommands",children:["Implement ",(0,l.jsx)("code",{children:"@flecks/build\u200b.commands"})]}),"\n",(0,l.jsx)(a.Z,{type:"app",pkg:"cli_test",children:(0,l.jsx)(n.p,{children:"First, create an application:"})}),"\n",(0,l.jsx)(a.Z,{headless:!0,type:"fleck",pkg:"fortune",children:(0,l.jsx)(n.p,{children:"Move into the new project and create a fleck:"})}),"\n",(0,l.jsxs)(n.p,{children:["We're going to be creating a fortune teller command that will tell you when you will find love.\n","\ud83d\ude0d"]}),"\n",(0,l.jsx)(n.h3,{id:"create-a-command-that-takes-an-option",children:"Create a command that takes an option"}),"\n",(0,l.jsx)(n.p,{children:"Commands are gathered during the bootstrap phase and therefore your hook must be\nimplemented in a bootstrap script."}),"\n",(0,l.jsxs)(n.p,{children:["Edit your bootstrap script at ",(0,l.jsx)(n.code,{children:"packages/fortune/build/flecks.bootstrap.js"})," to look like this:"]}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-javascript",metastring:'title="packages/fortune/build/flecks.bootstrap.js"',children:"export const hooks = {\n '@flecks/build.commands': (program) => ({\n fortune: {\n options: [\n program.createOption('-n, --be-nice', 'be nice'),\n ],\n description: 'find your true love',\n action: async ({beNice}) => {\n console.log(`It will be ${Math.floor(Math.random() * 10) + 2} days until you meet your true love!`);\n if (!beNice) {\n console.log('You might also stub your toe.');\n }\n },\n },\n }),\n};\n"})}),"\n",(0,l.jsx)(n.h3,{id:"inspect-and-invoke-your-command",children:"Inspect and invoke your command"}),"\n",(0,l.jsx)(s.Z,{cmd:"flecks --help",children:(0,l.jsx)(n.p,{children:"Now, invoke flecks like so:"})}),"\n",(0,l.jsx)(n.p,{children:"You will see among the commands listed:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{children:" fortune [options] find your true love\n"})}),"\n",(0,l.jsx)(s.Z,{headless:!0,cmd:"flecks fortune --help",children:(0,l.jsxs)(n.p,{children:["Run the command with the ",(0,l.jsx)(n.code,{children:"--help"})," option:"]})}),"\n",(0,l.jsx)(n.p,{children:"You will see this output:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{children:"Usage: flecks fortune [options]\n\nfind your true love\n\nOptions:\n -n, --be-nice be nice\n"})}),"\n",(0,l.jsx)(s.Z,{headless:!0,cmd:"flecks fortune --be-nice",children:(0,l.jsx)(n.p,{children:"Let's try it!"})}),"\n",(0,l.jsx)(n.p,{children:"You will see something like:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{children:"It will be 11 days until you meet your true love!\n"})}),"\n",(0,l.jsx)(s.Z,{headless:!0,cmd:"flecks fortune",children:(0,l.jsx)(n.p,{children:"How about without our option:"})}),"\n",(0,l.jsx)(n.p,{children:"You will see something like:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{children:"It will be 7 days until you meet your true love!\nYou might also stub your toe.\n"})}),"\n",(0,l.jsx)(n.h3,{id:"define-arguments",children:"Define arguments"}),"\n",(0,l.jsx)(n.p,{children:"You can also define arguments in addition to options. Let's add an argument that takes the user's\nname to personalize the output:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-javascript",metastring:'title="packages/fortune/build/flecks.bootstrap.js"',children:"export const hooks = {\n '@flecks/build.commands': (program, flecks) => {\n return {\n fortune: {\n // highlight-start\n args: [\n program.createArgument('[name]', 'your name')\n ],\n // highlight-end\n options: [\n program.createOption('-n, --be-nice', 'be nice'),\n ],\n description: 'find your true love',\n // highlight-next-line\n action: async (name = 'person', {beNice}) => {\n // highlight-next-line\n console.log(`Hey, ${name}. It will be ${Math.floor(Math.random() * 10) + 2} days until you meet your true love!`);\n if (!beNice) {\n console.log('You might also stub your toe.');\n }\n },\n },\n };\n },\n};\n"})}),"\n",(0,l.jsx)(n.p,{children:"Notice that we added the argument to... the arguments."}),"\n",(0,l.jsx)(s.Z,{cmd:"flecks fortune --be-nice",children:(0,l.jsx)(n.p,{children:"Try it again:"})}),"\n",(0,l.jsx)(n.p,{children:"You will see e.g.:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{children:"Hey, person. It will be 7 days until you meet your true love!\n"})}),"\n",(0,l.jsx)(s.Z,{headless:!0,cmd:"flecks fortune cha0s",children:(0,l.jsxs)(n.p,{children:["That's because we set the default name to ",(0,l.jsx)(n.code,{children:"'person'"})," in the code above. Let's try passing in a\nname:"]})}),"\n",(0,l.jsx)(n.p,{children:"Now the output looks like:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{children:"Hey, cha0s. It will be 4 days until you meet your true love!\nYou might also stub your toe.\n"})}),"\n",(0,l.jsx)(n.h3,{id:"going-further",children:"Going further"}),"\n",(0,l.jsxs)(n.p,{children:["flecks uses ",(0,l.jsx)(n.a,{href:"https://github.com/tj/commander.js#quick-start",children:"Commander.js"})," under the hood to build its CLI.\nIt might be worth checking out their documentation for any more advanced usage."]})]})}function p(e={}){const{wrapper:n}={...(0,r.a)(),...e.components};return n?(0,l.jsx)(n,{...e,children:(0,l.jsx)(h,{...e})}):h(e)}},3200:(e,n,t)=>{t.d(n,{Z:()=>o});var l=t(9286),r=t(4866),a=t(5162),s=t(5893);function o(e){let{children:n,headless:t=!1,pkg:o,type:i}=e;return(0,s.jsxs)(r.Z,{className:t&&"headless",groupId:"package-manager",children:[(0,s.jsxs)(a.Z,{value:"npm",label:"npm",children:[n,(0,s.jsxs)(l.Z,{language:"bash",children:["npm init @flecks/",i," ",o]})]}),(0,s.jsxs)(a.Z,{value:"yarn",label:"Yarn",children:[n,(0,s.jsxs)(l.Z,{language:"bash",children:["yarn create @flecks/",i," ",o]})]}),(0,s.jsxs)(a.Z,{value:"pnpm",label:"pnpm",children:[n,(0,s.jsxs)(l.Z,{language:"bash",children:["pnpm create @flecks/",i," ",o]})]}),(0,s.jsxs)(a.Z,{value:"bun",label:"Bun",children:[n,(0,s.jsxs)(l.Z,{language:"bash",children:["bun create @flecks/",i," ",o]})]})]})}},4283:(e,n,t)=>{t.d(n,{Z:()=>o});var l=t(9286),r=t(4866),a=t(5162),s=t(5893);function o(e){let{children:n,cmd:t,headless:o=!1}=e;const i=Array.isArray(t)?t:[t],c=e=>i.map((n=>`${e} ${n}`)).join("\n");return(0,s.jsxs)(r.Z,{className:o&&"headless",groupId:"package-manager",children:[(0,s.jsxs)(a.Z,{value:"npm",label:"npm",children:[n,(0,s.jsx)(l.Z,{language:"bash",children:c("npx")})]}),(0,s.jsxs)(a.Z,{value:"yarn",label:"Yarn",children:[n,(0,s.jsx)(l.Z,{language:"bash",children:c("yarn")})]}),(0,s.jsxs)(a.Z,{value:"pnpm",label:"pnpm",children:[n,(0,s.jsx)(l.Z,{language:"bash",children:c("pnpx")})]}),(0,s.jsxs)(a.Z,{value:"bun",label:"Bun",children:[n,(0,s.jsx)(l.Z,{language:"bash",children:c("bunx")})]})]})}},5162:(e,n,t)=>{t.d(n,{Z:()=>s});t(7294);var l=t(512);const r={tabItem:"tabItem_Ymn6"};var a=t(5893);function s(e){let{children:n,hidden:t,className:s}=e;return(0,a.jsx)("div",{role:"tabpanel",className:(0,l.Z)(r.tabItem,s),hidden:t,children:n})}},4866:(e,n,t)=>{t.d(n,{Z:()=>y});var l=t(7294),r=t(512),a=t(2466),s=t(6550),o=t(469),i=t(1980),c=t(7392),d=t(12);function u(e){return l.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,l.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function h(e){const{values:n,children:t}=e;return(0,l.useMemo)((()=>{const e=n??function(e){return u(e).map((e=>{let{props:{value:n,label:t,attributes:l,default:r}}=e;return{value:n,label:t,attributes:l,default:r}}))}(t);return function(e){const n=(0,c.l)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,t])}function p(e){let{value:n,tabValues:t}=e;return t.some((e=>e.value===n))}function m(e){let{queryString:n=!1,groupId:t}=e;const r=(0,s.k6)(),a=function(e){let{queryString:n=!1,groupId:t}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!t)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return t??null}({queryString:n,groupId:t});return[(0,i._X)(a),(0,l.useCallback)((e=>{if(!a)return;const n=new URLSearchParams(r.location.search);n.set(a,e),r.replace({...r.location,search:n.toString()})}),[a,r])]}function f(e){const{defaultValue:n,queryString:t=!1,groupId:r}=e,a=h(e),[s,i]=(0,l.useState)((()=>function(e){let{defaultValue:n,tabValues:t}=e;if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!p({value:n,tabValues:t}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${t.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const l=t.find((e=>e.default))??t[0];if(!l)throw new Error("Unexpected error: 0 tabValues");return l.value}({defaultValue:n,tabValues:a}))),[c,u]=m({queryString:t,groupId:r}),[f,b]=function(e){let{groupId:n}=e;const t=function(e){return e?`docusaurus.tab.${e}`:null}(n),[r,a]=(0,d.Nk)(t);return[r,(0,l.useCallback)((e=>{t&&a.set(e)}),[t,a])]}({groupId:r}),x=(()=>{const e=c??f;return p({value:e,tabValues:a})?e:null})();(0,o.Z)((()=>{x&&i(x)}),[x]);return{selectedValue:s,selectValue:(0,l.useCallback)((e=>{if(!p({value:e,tabValues:a}))throw new Error(`Can't select invalid tab value=${e}`);i(e),u(e),b(e)}),[u,b,a]),tabValues:a}}var b=t(2389);const x={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var g=t(5893);function j(e){let{className:n,block:t,selectedValue:l,selectValue:s,tabValues:o}=e;const i=[],{blockElementScrollPositionUntilNextRender:c}=(0,a.o5)(),d=e=>{const n=e.currentTarget,t=i.indexOf(n),r=o[t].value;r!==l&&(c(n),s(r))},u=e=>{let n=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const t=i.indexOf(e.currentTarget)+1;n=i[t]??i[0];break}case"ArrowLeft":{const t=i.indexOf(e.currentTarget)-1;n=i[t]??i[i.length-1];break}}n?.focus()};return(0,g.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,r.Z)("tabs",{"tabs--block":t},n),children:o.map((e=>{let{value:n,label:t,attributes:a}=e;return(0,g.jsx)("li",{role:"tab",tabIndex:l===n?0:-1,"aria-selected":l===n,ref:e=>i.push(e),onKeyDown:u,onClick:d,...a,className:(0,r.Z)("tabs__item",x.tabItem,a?.className,{"tabs__item--active":l===n}),children:t??n},n)}))})}function v(e){let{lazy:n,children:t,selectedValue:r}=e;const a=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){const e=a.find((e=>e.props.value===r));return e?(0,l.cloneElement)(e,{className:"margin-top--md"}):null}return(0,g.jsx)("div",{className:"margin-top--md",children:a.map(((e,n)=>(0,l.cloneElement)(e,{key:n,hidden:e.props.value!==r})))})}function k(e){const n=f(e);return(0,g.jsxs)("div",{className:(0,r.Z)("tabs-container",x.tabList),children:[(0,g.jsx)(j,{...e,...n}),(0,g.jsx)(v,{...e,...n})]})}function y(e){const n=(0,b.Z)();return(0,g.jsx)(k,{...e,children:u(e.children)},String(n))}}}]); \ No newline at end of file diff --git a/assets/js/be07d3f5.448f2004.js b/assets/js/be07d3f5.448f2004.js new file mode 100644 index 00000000..68203346 --- /dev/null +++ b/assets/js/be07d3f5.448f2004.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkflecks_docusaurus=self.webpackChunkflecks_docusaurus||[]).push([[1204],{1538:(e,n,l)=>{l.r(n),l.d(n,{assets:()=>u,contentTitle:()=>o,default:()=>p,frontMatter:()=>i,metadata:()=>c,toc:()=>d});var r=l(5893),s=l(1151),a=l(3200),t=l(6569);const i={title:"Creating a fleck",description:"A fleck is a module but also so much more."},o=void 0,c={id:"creating-a-fleck",title:"Creating a fleck",description:"A fleck is a module but also so much more.",source:"@site/docs/creating-a-fleck.mdx",sourceDirName:".",slug:"/creating-a-fleck",permalink:"/flecks/docs/creating-a-fleck",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{title:"Creating a fleck",description:"A fleck is a module but also so much more."},sidebar:"flecksSidebar",previous:{title:"Configuration",permalink:"/flecks/docs/configuration"},next:{title:"Building your application",permalink:"/flecks/docs/building-your-application"}},u={},d=[{value:"Your first fleck",id:"your-first-fleck",level:2},{value:"Create the fleck",id:"create-the-fleck",level:3},{value:"Aliasing for the win",id:"aliasing-for-the-win",level:3},{value:"Your first hook implementation",id:"your-first-hook-implementation",level:3},{value:"flecks injection",id:"flecks-injection",level:3}];function h(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.a)(),...e.components},{Details:l}=n;return l||function(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(n.p,{children:["If you are following along from the previous getting started\n",(0,r.jsx)(n.a,{href:"./configuration",children:"configuration page"}),", you have an application with 3 flecks:"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"@flecks/build"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"@flecks/core"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"@flecks/server"})}),"\n"]}),"\n",(0,r.jsxs)(l,{children:[(0,r.jsx)("summary",{children:'About that "3 flecks" thing...'}),(0,r.jsxs)(n.p,{children:["Actually, your server application has ",(0,r.jsx)(n.strong,{children:"5 flecks"})," at this point:"]}),(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"@flecks/build"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"@flecks/build/server"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"@flecks/core"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"@flecks/core/server"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"@flecks/server"})}),"\n"]}),(0,r.jsxs)(n.p,{children:["flecks will load the ",(0,r.jsx)(n.code,{children:"[...]/server"})," fleck under any fleck that is loaded on the server. This is\nalso the case when using ",(0,r.jsx)(n.code,{children:"@flecks/web"})," which will automatically load ",(0,r.jsx)(n.code,{children:"[...]/client"})," flecks\nwhich are only loaded in the browser."]})]}),"\n",(0,r.jsx)(n.h2,{id:"your-first-fleck",children:"Your first fleck"}),"\n",(0,r.jsxs)(n.p,{children:["Let's make your website greet the user with a good ol' ",(0,r.jsx)(n.strong,{children:"hello world"}),"."]}),"\n",(0,r.jsx)(n.p,{children:"To do this, you'll be creating your own little fleck. flecks also provides a built-in utility to\ncreate a fleck."}),"\n",(0,r.jsxs)(n.admonition,{title:"Your application is a monorepo by default",type:"note",children:[(0,r.jsxs)(n.p,{children:["You may have noticed that your little starter application has a ",(0,r.jsx)(n.code,{children:"packages"})," directory. By default,\nflecks structures your application as a monorepo."]}),(0,r.jsx)(n.p,{children:"This isn't any hard requirement, it's only a suggestion."})]}),"\n",(0,r.jsx)(n.h3,{id:"create-the-fleck",children:"Create the fleck"}),"\n",(0,r.jsx)(a.Z,{type:"fleck",pkg:"say-hello",children:(0,r.jsx)(n.p,{children:"Let's create our little fleck:"})}),"\n",(0,r.jsxs)(n.p,{children:["After some output, you'll find your new fleck at ",(0,r.jsx)(n.code,{children:"packages/say-hello"}),". Let's inspect our\n",(0,r.jsx)(n.code,{children:"build/flecks.yml"}),":"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-yml",metastring:'title="build/flecks.yml"',children:"'@flecks/build': {}\n'@flecks/core':\n id: 'hello-world'\n'@flecks/server': {}\n// highlight-next-line\n'@hello-world/say-hello:./packages/say-hello': {}\n"})}),"\n",(0,r.jsx)(n.h3,{id:"aliasing-for-the-win",children:"Aliasing for the win"}),"\n",(0,r.jsx)(n.p,{children:"Notice there's a colon separating the path for this one. This is because this is an aliased fleck.\nThe part before the colon is the alias and the part after is the path to the package."}),"\n",(0,r.jsxs)(n.p,{children:["By the way, your other application code can import using the alias (e.g.\n",(0,r.jsx)(n.code,{children:"require('@hello-world/say-hello');"}),")\n",(0,r.jsx)(n.a,{href:"https://webpack.js.org/configuration/resolve/#resolvealias",children:"as if it were a package"}),"."]}),"\n",(0,r.jsxs)(l,{children:[(0,r.jsxs)("summary",{children:["Wait, my modules don't have to be in ",(0,r.jsx)("code",{children:"node_modules"}),"?"]}),(0,r.jsx)(n.p,{children:'Nope! When you\'re developing applications, it can be real nice to\njust pull in local source "packages".'}),(0,r.jsx)(n.p,{children:"That being said, sharing your packages on npm is a cool thing to do, so be rad and share your\nawesome flecks with the rest of us!"})]}),"\n",(0,r.jsx)(n.h3,{id:"your-first-hook-implementation",children:"Your first hook implementation"}),"\n",(0,r.jsxs)(n.p,{children:["There is a source file at ",(0,r.jsx)(n.code,{children:"packages/say-hello/src/index.js"})," but for now it's empty. Let's fill it\nout a bit:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-javascript",metastring:'title="packages/say-hello/src/index.js"',children:"export const hooks = {\n '@flecks/server.up': async () => {\n process.stdout.write(' hello server\\n');\n },\n};\n"})}),"\n",(0,r.jsx)(t.Z,{cmd:"start",children:(0,r.jsx)(n.p,{children:"Now, restart your application:"})}),"\n",(0,r.jsx)(n.p,{children:"You will be greeted by a line in the output:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-terminal",children:" hello server\n"})}),"\n",(0,r.jsx)(n.h3,{id:"flecks-injection",children:"flecks injection"}),"\n",(0,r.jsxs)(n.p,{children:["Hook implementations may receive arguments. After any arguments, the ",(0,r.jsx)(n.code,{children:"flecks"})," instance is always\npassed."]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"@flecks/server.up"})," doesn't pass any arguments, so the ",(0,r.jsx)(n.code,{children:"flecks"})," instance is the first argument.\nLet's see how to use the instance to read some configuration:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-javascript",metastring:'title="packages/say-hello/src/index.js"',children:"export const hooks = {\n '@flecks/server.up': async (flecks) => {\n const {id} = flecks.get('@flecks/core');\n process.stdout.write(` hello server: ID ${id}\\n`);\n },\n};\n"})}),"\n",(0,r.jsx)(n.p,{children:"This time, you will see:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-terminal",children:" hello server: ID hello-world\n"})}),"\n",(0,r.jsx)(n.admonition,{title:"Still with us?",type:"note",children:(0,r.jsxs)(n.p,{children:["...or whatever your application's ID is. We're assuming you're following along from\n",(0,r.jsx)(n.a,{href:"./configuration",children:"the configuration page"}),"."]})}),"\n",(0,r.jsx)(n.p,{children:"Next, we'll go over some of the nuts and bolts of how your application is built."})]})}function p(e={}){const{wrapper:n}={...(0,s.a)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}},3200:(e,n,l)=>{l.d(n,{Z:()=>i});var r=l(9286),s=l(4866),a=l(5162),t=l(5893);function i(e){let{children:n,headless:l=!1,pkg:i,type:o}=e;return(0,t.jsxs)(s.Z,{className:l&&"headless",groupId:"package-manager",children:[(0,t.jsxs)(a.Z,{value:"npm",label:"npm",children:[n,(0,t.jsxs)(r.Z,{language:"bash",children:["npm init @flecks/",o," ",i]})]}),(0,t.jsxs)(a.Z,{value:"yarn",label:"Yarn",children:[n,(0,t.jsxs)(r.Z,{language:"bash",children:["yarn create @flecks/",o," ",i]})]}),(0,t.jsxs)(a.Z,{value:"pnpm",label:"pnpm",children:[n,(0,t.jsxs)(r.Z,{language:"bash",children:["pnpm create @flecks/",o," ",i]})]}),(0,t.jsxs)(a.Z,{value:"bun",label:"Bun",children:[n,(0,t.jsxs)(r.Z,{language:"bash",children:["bun create @flecks/",o," ",i]})]})]})}},6569:(e,n,l)=>{l.d(n,{Z:()=>i});var r=l(9286),s=l(4866),a=l(5162),t=l(5893);function i(e){let{children:n,cmd:l,headless:i=!1}=e;return(0,t.jsxs)(s.Z,{className:i&&"headless",groupId:"package-manager",children:[(0,t.jsxs)(a.Z,{value:"npm",label:"npm",children:[n,(0,t.jsxs)(r.Z,{language:"bash",children:["npm run ",l]})]}),(0,t.jsxs)(a.Z,{value:"yarn",label:"Yarn",children:[n,(0,t.jsxs)(r.Z,{language:"bash",children:["yarn run ",l]})]}),(0,t.jsxs)(a.Z,{value:"pnpm",label:"pnpm",children:[n,(0,t.jsxs)(r.Z,{language:"bash",children:["pnpm run ",l]})]}),(0,t.jsxs)(a.Z,{value:"bun",label:"Bun",children:[n,(0,t.jsxs)(r.Z,{language:"bash",children:["bun run ",l]})]})]})}},5162:(e,n,l)=>{l.d(n,{Z:()=>t});l(7294);var r=l(512);const s={tabItem:"tabItem_Ymn6"};var a=l(5893);function t(e){let{children:n,hidden:l,className:t}=e;return(0,a.jsx)("div",{role:"tabpanel",className:(0,r.Z)(s.tabItem,t),hidden:l,children:n})}},4866:(e,n,l)=>{l.d(n,{Z:()=>y});var r=l(7294),s=l(512),a=l(2466),t=l(6550),i=l(469),o=l(1980),c=l(7392),u=l(12);function d(e){return r.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function h(e){const{values:n,children:l}=e;return(0,r.useMemo)((()=>{const e=n??function(e){return d(e).map((e=>{let{props:{value:n,label:l,attributes:r,default:s}}=e;return{value:n,label:l,attributes:r,default:s}}))}(l);return function(e){const n=(0,c.l)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,l])}function p(e){let{value:n,tabValues:l}=e;return l.some((e=>e.value===n))}function f(e){let{queryString:n=!1,groupId:l}=e;const s=(0,t.k6)(),a=function(e){let{queryString:n=!1,groupId:l}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!l)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return l??null}({queryString:n,groupId:l});return[(0,o._X)(a),(0,r.useCallback)((e=>{if(!a)return;const n=new URLSearchParams(s.location.search);n.set(a,e),s.replace({...s.location,search:n.toString()})}),[a,s])]}function m(e){const{defaultValue:n,queryString:l=!1,groupId:s}=e,a=h(e),[t,o]=(0,r.useState)((()=>function(e){let{defaultValue:n,tabValues:l}=e;if(0===l.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!p({value:n,tabValues:l}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${l.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const r=l.find((e=>e.default))??l[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:n,tabValues:a}))),[c,d]=f({queryString:l,groupId:s}),[m,g]=function(e){let{groupId:n}=e;const l=function(e){return e?`docusaurus.tab.${e}`:null}(n),[s,a]=(0,u.Nk)(l);return[s,(0,r.useCallback)((e=>{l&&a.set(e)}),[l,a])]}({groupId:s}),x=(()=>{const e=c??m;return p({value:e,tabValues:a})?e:null})();(0,i.Z)((()=>{x&&o(x)}),[x]);return{selectedValue:t,selectValue:(0,r.useCallback)((e=>{if(!p({value:e,tabValues:a}))throw new Error(`Can't select invalid tab value=${e}`);o(e),d(e),g(e)}),[d,g,a]),tabValues:a}}var g=l(2389);const x={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var j=l(5893);function b(e){let{className:n,block:l,selectedValue:r,selectValue:t,tabValues:i}=e;const o=[],{blockElementScrollPositionUntilNextRender:c}=(0,a.o5)(),u=e=>{const n=e.currentTarget,l=o.indexOf(n),s=i[l].value;s!==r&&(c(n),t(s))},d=e=>{let n=null;switch(e.key){case"Enter":u(e);break;case"ArrowRight":{const l=o.indexOf(e.currentTarget)+1;n=o[l]??o[0];break}case"ArrowLeft":{const l=o.indexOf(e.currentTarget)-1;n=o[l]??o[o.length-1];break}}n?.focus()};return(0,j.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,s.Z)("tabs",{"tabs--block":l},n),children:i.map((e=>{let{value:n,label:l,attributes:a}=e;return(0,j.jsx)("li",{role:"tab",tabIndex:r===n?0:-1,"aria-selected":r===n,ref:e=>o.push(e),onKeyDown:d,onClick:u,...a,className:(0,s.Z)("tabs__item",x.tabItem,a?.className,{"tabs__item--active":r===n}),children:l??n},n)}))})}function k(e){let{lazy:n,children:l,selectedValue:s}=e;const a=(Array.isArray(l)?l:[l]).filter(Boolean);if(n){const e=a.find((e=>e.props.value===s));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return(0,j.jsx)("div",{className:"margin-top--md",children:a.map(((e,n)=>(0,r.cloneElement)(e,{key:n,hidden:e.props.value!==s})))})}function v(e){const n=m(e);return(0,j.jsxs)("div",{className:(0,s.Z)("tabs-container",x.tabList),children:[(0,j.jsx)(b,{...e,...n}),(0,j.jsx)(k,{...e,...n})]})}function y(e){const n=(0,g.Z)();return(0,j.jsx)(v,{...e,children:d(e.children)},String(n))}}}]); \ No newline at end of file diff --git a/assets/js/be07d3f5.4f4d23d1.js b/assets/js/be07d3f5.4f4d23d1.js deleted file mode 100644 index e77326f4..00000000 --- a/assets/js/be07d3f5.4f4d23d1.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkflecks_docusaurus=self.webpackChunkflecks_docusaurus||[]).push([[1204],{1538:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>c,contentTitle:()=>o,default:()=>h,frontMatter:()=>r,metadata:()=>t,toc:()=>a});var i=s(5893),l=s(1151);const r={title:"Creating a fleck",description:"A fleck is a module but also so much more."},o=void 0,t={id:"creating-a-fleck",title:"Creating a fleck",description:"A fleck is a module but also so much more.",source:"@site/docs/creating-a-fleck.mdx",sourceDirName:".",slug:"/creating-a-fleck",permalink:"/flecks/docs/creating-a-fleck",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{title:"Creating a fleck",description:"A fleck is a module but also so much more."},sidebar:"flecksSidebar",previous:{title:"Configuration",permalink:"/flecks/docs/configuration"},next:{title:"Building your application",permalink:"/flecks/docs/building-your-application"}},c={},a=[{value:"Your first fleck",id:"your-first-fleck",level:2},{value:"Create the fleck",id:"create-the-fleck",level:3},{value:"Aliasing for the win",id:"aliasing-for-the-win",level:3},{value:"Your first hook implementation",id:"your-first-hook-implementation",level:3},{value:"flecks injection",id:"flecks-injection",level:3}];function d(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,l.a)(),...e.components},{Details:s}=n;return s||function(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(n.p,{children:["If you are following along from the previous getting started\n",(0,i.jsx)(n.a,{href:"./configuration",children:"configuration page"}),", you have an application with 3 flecks:"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"@flecks/build"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"@flecks/core"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"@flecks/server"})}),"\n"]}),"\n",(0,i.jsxs)(s,{children:[(0,i.jsx)("summary",{children:'About that "3 flecks" thing...'}),(0,i.jsxs)(n.p,{children:["Actually, your server application has ",(0,i.jsx)(n.strong,{children:"5 flecks"})," at this point:"]}),(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"@flecks/build"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"@flecks/build/server"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"@flecks/core"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"@flecks/core/server"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"@flecks/server"})}),"\n"]}),(0,i.jsxs)(n.p,{children:["flecks will load the ",(0,i.jsx)(n.code,{children:"[...]/server"})," fleck under any fleck that is loaded on the server. This is\nalso the case when using ",(0,i.jsx)(n.code,{children:"@flecks/web"})," which will automatically load ",(0,i.jsx)(n.code,{children:"[...]/client"})," flecks\nwhich are only loaded in the browser."]})]}),"\n",(0,i.jsx)(n.h2,{id:"your-first-fleck",children:"Your first fleck"}),"\n",(0,i.jsxs)(n.p,{children:["Let's make your website greet the user with a good ol' ",(0,i.jsx)(n.strong,{children:"hello world"}),"."]}),"\n",(0,i.jsx)(n.p,{children:"To do this, you'll be creating your own little fleck. flecks also provides a built-in utility to\ncreate a fleck."}),"\n",(0,i.jsxs)(n.admonition,{title:"Your application is a monorepo by default",type:"note",children:[(0,i.jsxs)(n.p,{children:["You may have noticed that your little starter application has a ",(0,i.jsx)(n.code,{children:"packages"})," directory. By default,\nflecks structures your application as a monorepo."]}),(0,i.jsx)(n.p,{children:"This isn't any hard requirement, it's only a suggestion."})]}),"\n",(0,i.jsx)(n.h3,{id:"create-the-fleck",children:"Create the fleck"}),"\n",(0,i.jsx)(n.p,{children:"Let's create our little fleck:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"npx create-fleck say-hello\n"})}),"\n",(0,i.jsxs)(n.p,{children:["After some output, you'll find your new fleck at ",(0,i.jsx)(n.code,{children:"packages/say-hello"}),". Let's inspect our\n",(0,i.jsx)(n.code,{children:"build/flecks.yml"}),":"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-yml",metastring:'title="build/flecks.yml"',children:"'@flecks/build': {}\n'@flecks/core':\n id: 'hello-world'\n'@flecks/server': {}\n// highlight-next-line\n'@hello-world/say-hello:./packages/say-hello': {}\n"})}),"\n",(0,i.jsx)(n.h3,{id:"aliasing-for-the-win",children:"Aliasing for the win"}),"\n",(0,i.jsx)(n.p,{children:"Notice there's a colon separating the path for this one. This is because this is an aliased fleck.\nThe part before the colon is the alias and the part after is the path to the package."}),"\n",(0,i.jsxs)(n.p,{children:["By the way, your other application code can import using the alias (e.g.\n",(0,i.jsx)(n.code,{children:"require('@hello-world/say-hello');"}),")\n",(0,i.jsx)(n.a,{href:"https://webpack.js.org/configuration/resolve/#resolvealias",children:"as if it were a package"}),"."]}),"\n",(0,i.jsxs)(s,{children:[(0,i.jsxs)("summary",{children:["Wait, my modules don't have to be in ",(0,i.jsx)("code",{children:"node_modules"}),"?"]}),(0,i.jsx)(n.p,{children:'Nope! When you\'re developing applications, it can be real nice to\njust pull in local source "packages".'}),(0,i.jsx)(n.p,{children:"That being said, sharing your packages on npm is a cool thing to do, so be rad and share your\nawesome flecks with the rest of us!"})]}),"\n",(0,i.jsx)(n.h3,{id:"your-first-hook-implementation",children:"Your first hook implementation"}),"\n",(0,i.jsxs)(n.p,{children:["There is a source file at ",(0,i.jsx)(n.code,{children:"packages/say-hello/src/index.js"})," but for now it's empty. Let's fill it\nout a bit:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-javascript",metastring:'title="packages/say-hello/src/index.js"',children:"export const hooks = {\n '@flecks/server.up': async () => {\n process.stdout.write(' hello server\\n');\n },\n};\n"})}),"\n",(0,i.jsx)(n.p,{children:"Now, restart your application:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"npm run start\n"})}),"\n",(0,i.jsx)(n.p,{children:"You will be greeted by a line in the output:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-terminal",children:" hello server\n"})}),"\n",(0,i.jsx)(n.h3,{id:"flecks-injection",children:"flecks injection"}),"\n",(0,i.jsxs)(n.p,{children:["Hook implementations may receive arguments. After any arguments, the ",(0,i.jsx)(n.code,{children:"flecks"})," instance is always\npassed."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"@flecks/server.up"})," doesn't pass any arguments, so the ",(0,i.jsx)(n.code,{children:"flecks"})," instance is the first argument.\nLet's see how to use the instance to read some configuration:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-javascript",metastring:'title="packages/say-hello/src/index.js"',children:"export const hooks = {\n '@flecks/server.up': async (flecks) => {\n const {id} = flecks.get('@flecks/core');\n process.stdout.write(` hello server: ID ${id}\\n`);\n },\n};\n"})}),"\n",(0,i.jsx)(n.p,{children:"This time, you will see:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-terminal",children:" hello server: ID hello-world\n"})}),"\n",(0,i.jsx)(n.admonition,{title:"Still with us?",type:"note",children:(0,i.jsxs)(n.p,{children:["...or whatever your application's ID is. We're assuming you're following along from\n",(0,i.jsx)(n.a,{href:"./configuration",children:"the configuration page"}),"."]})}),"\n",(0,i.jsx)(n.p,{children:"Next, we'll go over some of the nuts and bolts of how your application is built."})]})}function h(e={}){const{wrapper:n}={...(0,l.a)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},1151:(e,n,s)=>{s.d(n,{Z:()=>t,a:()=>o});var i=s(7294);const l={},r=i.createContext(l);function o(e){const n=i.useContext(r);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function t(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(l):e.components||l:o(e.components),i.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/fa4d91bf.15c66744.js b/assets/js/fa4d91bf.15c66744.js deleted file mode 100644 index 664c36d6..00000000 --- a/assets/js/fa4d91bf.15c66744.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkflecks_docusaurus=self.webpackChunkflecks_docusaurus||[]).push([[5930],{4099:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>u,contentTitle:()=>i,default:()=>p,frontMatter:()=>s,metadata:()=>o,toc:()=>c});var a=n(5893),r=n(1151),l=n(3200);const s={title:"Installation",description:"How to get started with your first flecks project."},i="Installation",o={id:"installation",title:"Installation",description:"How to get started with your first flecks project.",source:"@site/docs/installation.mdx",sourceDirName:".",slug:"/installation",permalink:"/flecks/docs/installation",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{title:"Installation",description:"How to get started with your first flecks project."},sidebar:"flecksSidebar",previous:{title:"Getting Started",permalink:"/flecks/docs/category/getting-started"},next:{title:"Configuration",permalink:"/flecks/docs/configuration"}},u={},c=[{value:"Start your application",id:"start-your-application",level:2},{value:"Do something interesting",id:"do-something-interesting",level:2}];function d(e){const t={admonition:"admonition",code:"code",h1:"h1",h2:"h2",p:"p",pre:"pre",...(0,r.a)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(t.h1,{id:"installation",children:"Installation"}),"\n",(0,a.jsx)(t.p,{children:"The first step toward creating an application with flecks is to use the built-in\ncreation utility:"}),"\n",(0,a.jsx)(l.Z,{type:"app",pkg:"hello-world"}),"\n",(0,a.jsxs)(t.admonition,{type:"tip",children:[(0,a.jsx)(t.p,{children:"You may also inspect the utility command options:"}),(0,a.jsx)(l.Z,{type:"app",pkg:"-- --help"}),(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{children:'Usage: create-app [options] \n\nArguments:\n app name of the app to create\n\nOptions:\n -pm,--package-manager package manager binary (choices: "npm", "bun", "yarn", default: "npm")\n -h, --help display help for command\n'})})]}),"\n",(0,a.jsx)(t.h2,{id:"start-your-application",children:"Start your application"}),"\n",(0,a.jsxs)(t.p,{children:["Now, move into your new project directory and run ",(0,a.jsx)(t.code,{children:"npm start"}),". You'll see a bunch of output, but the\nimportant thing is the last line:"]}),"\n",(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{children:" @flecks/server/entry up! +7ms\n"})}),"\n",(0,a.jsx)(t.p,{children:"That means we've got an application up and running!"}),"\n",(0,a.jsx)(t.h2,{id:"do-something-interesting",children:"Do something interesting"}),"\n",(0,a.jsx)(t.p,{children:"The only problem is that it doesn't do a single\nthing except sit there. Let's get into how to configure our application to do something interesting\nand start working on creating a fleck of our own."})]})}function p(e={}){const{wrapper:t}={...(0,r.a)(),...e.components};return t?(0,a.jsx)(t,{...e,children:(0,a.jsx)(d,{...e})}):d(e)}},3200:(e,t,n)=>{n.d(t,{Z:()=>i});var a=n(9286),r=n(4866),l=n(5162),s=n(5893);function i(e){let{pkg:t,type:n}=e;return(0,s.jsxs)(r.Z,{children:[(0,s.jsx)(l.Z,{value:"npm",label:"npm",children:(0,s.jsxs)(a.Z,{language:"bash",children:["npm init @flecks/",n," ",t]})}),(0,s.jsx)(l.Z,{value:"yarn",label:"Yarn",children:(0,s.jsxs)(a.Z,{language:"bash",children:["yarn create @flecks/",n," ",t]})}),(0,s.jsx)(l.Z,{value:"bun",label:"Bun",children:(0,s.jsxs)(a.Z,{language:"bash",children:["bun create @flecks/",n," ",t]})})]})}},5162:(e,t,n)=>{n.d(t,{Z:()=>s});n(7294);var a=n(512);const r={tabItem:"tabItem_Ymn6"};var l=n(5893);function s(e){let{children:t,hidden:n,className:s}=e;return(0,l.jsx)("div",{role:"tabpanel",className:(0,a.Z)(r.tabItem,s),hidden:n,children:t})}},4866:(e,t,n)=>{n.d(t,{Z:()=>j});var a=n(7294),r=n(512),l=n(2466),s=n(6550),i=n(469),o=n(1980),u=n(7392),c=n(12);function d(e){return a.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,a.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function p(e){const{values:t,children:n}=e;return(0,a.useMemo)((()=>{const e=t??function(e){return d(e).map((e=>{let{props:{value:t,label:n,attributes:a,default:r}}=e;return{value:t,label:n,attributes:a,default:r}}))}(n);return function(e){const t=(0,u.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function h(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function f(e){let{queryString:t=!1,groupId:n}=e;const r=(0,s.k6)(),l=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return n??null}({queryString:t,groupId:n});return[(0,o._X)(l),(0,a.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(r.location.search);t.set(l,e),r.replace({...r.location,search:t.toString()})}),[l,r])]}function m(e){const{defaultValue:t,queryString:n=!1,groupId:r}=e,l=p(e),[s,o]=(0,a.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!h({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const a=n.find((e=>e.default))??n[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:t,tabValues:l}))),[u,d]=f({queryString:n,groupId:r}),[m,b]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[r,l]=(0,c.Nk)(n);return[r,(0,a.useCallback)((e=>{n&&l.set(e)}),[n,l])]}({groupId:r}),g=(()=>{const e=u??m;return h({value:e,tabValues:l})?e:null})();(0,i.Z)((()=>{g&&o(g)}),[g]);return{selectedValue:s,selectValue:(0,a.useCallback)((e=>{if(!h({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);o(e),d(e),b(e)}),[d,b,l]),tabValues:l}}var b=n(2389);const g={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var v=n(5893);function y(e){let{className:t,block:n,selectedValue:a,selectValue:s,tabValues:i}=e;const o=[],{blockElementScrollPositionUntilNextRender:u}=(0,l.o5)(),c=e=>{const t=e.currentTarget,n=o.indexOf(t),r=i[n].value;r!==a&&(u(t),s(r))},d=e=>{let t=null;switch(e.key){case"Enter":c(e);break;case"ArrowRight":{const n=o.indexOf(e.currentTarget)+1;t=o[n]??o[0];break}case"ArrowLeft":{const n=o.indexOf(e.currentTarget)-1;t=o[n]??o[o.length-1];break}}t?.focus()};return(0,v.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,r.Z)("tabs",{"tabs--block":n},t),children:i.map((e=>{let{value:t,label:n,attributes:l}=e;return(0,v.jsx)("li",{role:"tab",tabIndex:a===t?0:-1,"aria-selected":a===t,ref:e=>o.push(e),onKeyDown:d,onClick:c,...l,className:(0,r.Z)("tabs__item",g.tabItem,l?.className,{"tabs__item--active":a===t}),children:n??t},t)}))})}function x(e){let{lazy:t,children:n,selectedValue:r}=e;const l=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===r));return e?(0,a.cloneElement)(e,{className:"margin-top--md"}):null}return(0,v.jsx)("div",{className:"margin-top--md",children:l.map(((e,t)=>(0,a.cloneElement)(e,{key:t,hidden:e.props.value!==r})))})}function k(e){const t=m(e);return(0,v.jsxs)("div",{className:(0,r.Z)("tabs-container",g.tabList),children:[(0,v.jsx)(y,{...e,...t}),(0,v.jsx)(x,{...e,...t})]})}function j(e){const t=(0,b.Z)();return(0,v.jsx)(k,{...e,children:d(e.children)},String(t))}}}]); \ No newline at end of file diff --git a/assets/js/fa4d91bf.237bde14.js b/assets/js/fa4d91bf.237bde14.js new file mode 100644 index 00000000..c698554c --- /dev/null +++ b/assets/js/fa4d91bf.237bde14.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkflecks_docusaurus=self.webpackChunkflecks_docusaurus||[]).push([[5930],{4099:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>o,default:()=>h,frontMatter:()=>i,metadata:()=>u,toc:()=>d});var a=n(5893),r=n(1151),s=n(3200),l=n(6569);const i={title:"Installation",description:"How to get started with your first flecks project."},o="Installation",u={id:"installation",title:"Installation",description:"How to get started with your first flecks project.",source:"@site/docs/installation.mdx",sourceDirName:".",slug:"/installation",permalink:"/flecks/docs/installation",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{title:"Installation",description:"How to get started with your first flecks project."},sidebar:"flecksSidebar",previous:{title:"Getting Started",permalink:"/flecks/docs/category/getting-started"},next:{title:"Configuration",permalink:"/flecks/docs/configuration"}},c={},d=[{value:"Start your application",id:"start-your-application",level:2},{value:"Do something interesting",id:"do-something-interesting",level:2}];function p(e){const t={admonition:"admonition",code:"code",h1:"h1",h2:"h2",p:"p",pre:"pre",...(0,r.a)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(t.h1,{id:"installation",children:"Installation"}),"\n",(0,a.jsx)(t.p,{children:"The first step toward creating an application with flecks is to use the built-in\ncreation utility:"}),"\n",(0,a.jsx)(s.Z,{type:"app",pkg:"hello-world"}),"\n",(0,a.jsxs)(t.admonition,{type:"tip",children:[(0,a.jsx)(t.p,{children:"You may also inspect the utility command options:"}),(0,a.jsx)(s.Z,{headless:!0,type:"app",pkg:"-- --help"}),(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{children:'Usage: create-app [options] \n\nArguments:\n app name of the app to create\n\nOptions:\n -pm,--package-manager package manager binary (choices: "npm", "pnpm", "bun", "yarn")\n -h, --help display help for command\n'})})]}),"\n",(0,a.jsx)(t.h2,{id:"start-your-application",children:"Start your application"}),"\n",(0,a.jsx)(t.p,{children:"Now, move into your new project directory and"}),"\n",(0,a.jsx)(l.Z,{headless:!0,cmd:"start"}),"\n",(0,a.jsx)(t.p,{children:"You'll see a bunch of output, but the important thing is the last line:"}),"\n",(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{children:" @flecks/server/entry up! +7ms\n"})}),"\n",(0,a.jsx)(t.p,{children:"That means we've got an application up and running!"}),"\n",(0,a.jsx)(t.h2,{id:"do-something-interesting",children:"Do something interesting"}),"\n",(0,a.jsx)(t.p,{children:"The only problem is that it doesn't do a single\nthing except sit there. Let's get into how to configure our application to do something interesting\nand start working on creating a fleck of our own."})]})}function h(e={}){const{wrapper:t}={...(0,r.a)(),...e.components};return t?(0,a.jsx)(t,{...e,children:(0,a.jsx)(p,{...e})}):p(e)}},3200:(e,t,n)=>{n.d(t,{Z:()=>i});var a=n(9286),r=n(4866),s=n(5162),l=n(5893);function i(e){let{children:t,headless:n=!1,pkg:i,type:o}=e;return(0,l.jsxs)(r.Z,{className:n&&"headless",groupId:"package-manager",children:[(0,l.jsxs)(s.Z,{value:"npm",label:"npm",children:[t,(0,l.jsxs)(a.Z,{language:"bash",children:["npm init @flecks/",o," ",i]})]}),(0,l.jsxs)(s.Z,{value:"yarn",label:"Yarn",children:[t,(0,l.jsxs)(a.Z,{language:"bash",children:["yarn create @flecks/",o," ",i]})]}),(0,l.jsxs)(s.Z,{value:"pnpm",label:"pnpm",children:[t,(0,l.jsxs)(a.Z,{language:"bash",children:["pnpm create @flecks/",o," ",i]})]}),(0,l.jsxs)(s.Z,{value:"bun",label:"Bun",children:[t,(0,l.jsxs)(a.Z,{language:"bash",children:["bun create @flecks/",o," ",i]})]})]})}},6569:(e,t,n)=>{n.d(t,{Z:()=>i});var a=n(9286),r=n(4866),s=n(5162),l=n(5893);function i(e){let{children:t,cmd:n,headless:i=!1}=e;return(0,l.jsxs)(r.Z,{className:i&&"headless",groupId:"package-manager",children:[(0,l.jsxs)(s.Z,{value:"npm",label:"npm",children:[t,(0,l.jsxs)(a.Z,{language:"bash",children:["npm run ",n]})]}),(0,l.jsxs)(s.Z,{value:"yarn",label:"Yarn",children:[t,(0,l.jsxs)(a.Z,{language:"bash",children:["yarn run ",n]})]}),(0,l.jsxs)(s.Z,{value:"pnpm",label:"pnpm",children:[t,(0,l.jsxs)(a.Z,{language:"bash",children:["pnpm run ",n]})]}),(0,l.jsxs)(s.Z,{value:"bun",label:"Bun",children:[t,(0,l.jsxs)(a.Z,{language:"bash",children:["bun run ",n]})]})]})}},5162:(e,t,n)=>{n.d(t,{Z:()=>l});n(7294);var a=n(512);const r={tabItem:"tabItem_Ymn6"};var s=n(5893);function l(e){let{children:t,hidden:n,className:l}=e;return(0,s.jsx)("div",{role:"tabpanel",className:(0,a.Z)(r.tabItem,l),hidden:n,children:t})}},4866:(e,t,n)=>{n.d(t,{Z:()=>k});var a=n(7294),r=n(512),s=n(2466),l=n(6550),i=n(469),o=n(1980),u=n(7392),c=n(12);function d(e){return a.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,a.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function p(e){const{values:t,children:n}=e;return(0,a.useMemo)((()=>{const e=t??function(e){return d(e).map((e=>{let{props:{value:t,label:n,attributes:a,default:r}}=e;return{value:t,label:n,attributes:a,default:r}}))}(n);return function(e){const t=(0,u.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function h(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function m(e){let{queryString:t=!1,groupId:n}=e;const r=(0,l.k6)(),s=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return n??null}({queryString:t,groupId:n});return[(0,o._X)(s),(0,a.useCallback)((e=>{if(!s)return;const t=new URLSearchParams(r.location.search);t.set(s,e),r.replace({...r.location,search:t.toString()})}),[s,r])]}function f(e){const{defaultValue:t,queryString:n=!1,groupId:r}=e,s=p(e),[l,o]=(0,a.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!h({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const a=n.find((e=>e.default))??n[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:t,tabValues:s}))),[u,d]=m({queryString:n,groupId:r}),[f,g]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[r,s]=(0,c.Nk)(n);return[r,(0,a.useCallback)((e=>{n&&s.set(e)}),[n,s])]}({groupId:r}),b=(()=>{const e=u??f;return h({value:e,tabValues:s})?e:null})();(0,i.Z)((()=>{b&&o(b)}),[b]);return{selectedValue:l,selectValue:(0,a.useCallback)((e=>{if(!h({value:e,tabValues:s}))throw new Error(`Can't select invalid tab value=${e}`);o(e),d(e),g(e)}),[d,g,s]),tabValues:s}}var g=n(2389);const b={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var v=n(5893);function x(e){let{className:t,block:n,selectedValue:a,selectValue:l,tabValues:i}=e;const o=[],{blockElementScrollPositionUntilNextRender:u}=(0,s.o5)(),c=e=>{const t=e.currentTarget,n=o.indexOf(t),r=i[n].value;r!==a&&(u(t),l(r))},d=e=>{let t=null;switch(e.key){case"Enter":c(e);break;case"ArrowRight":{const n=o.indexOf(e.currentTarget)+1;t=o[n]??o[0];break}case"ArrowLeft":{const n=o.indexOf(e.currentTarget)-1;t=o[n]??o[o.length-1];break}}t?.focus()};return(0,v.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,r.Z)("tabs",{"tabs--block":n},t),children:i.map((e=>{let{value:t,label:n,attributes:s}=e;return(0,v.jsx)("li",{role:"tab",tabIndex:a===t?0:-1,"aria-selected":a===t,ref:e=>o.push(e),onKeyDown:d,onClick:c,...s,className:(0,r.Z)("tabs__item",b.tabItem,s?.className,{"tabs__item--active":a===t}),children:n??t},t)}))})}function j(e){let{lazy:t,children:n,selectedValue:r}=e;const s=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=s.find((e=>e.props.value===r));return e?(0,a.cloneElement)(e,{className:"margin-top--md"}):null}return(0,v.jsx)("div",{className:"margin-top--md",children:s.map(((e,t)=>(0,a.cloneElement)(e,{key:t,hidden:e.props.value!==r})))})}function y(e){const t=f(e);return(0,v.jsxs)("div",{className:(0,r.Z)("tabs-container",b.tabList),children:[(0,v.jsx)(x,{...e,...t}),(0,v.jsx)(j,{...e,...t})]})}function k(e){const t=(0,g.Z)();return(0,v.jsx)(y,{...e,children:d(e.children)},String(t))}}}]); \ No newline at end of file diff --git a/assets/js/main.2244df9d.js b/assets/js/main.2244df9d.js new file mode 100644 index 00000000..e61a0266 --- /dev/null +++ b/assets/js/main.2244df9d.js @@ -0,0 +1,2 @@ +/*! For license information please see main.2244df9d.js.LICENSE.txt */ +(self.webpackChunkflecks_docusaurus=self.webpackChunkflecks_docusaurus||[]).push([[179],{5002:(e,t,n)=>{"use strict";n.d(t,{Z:()=>f});n(7294);var r=n(8356),o=n.n(r),a=n(1834);const i={"01a85c17":[()=>Promise.all([n.e(532),n.e(4013)]).then(n.bind(n,1223)),"@theme/BlogTagsListPage",1223],"01bbcd7b":[()=>n.e(6324).then(n.t.bind(n,1206,19)),"/home/cha0s/sync/src/code/flecks/website/node_modules/.cache/docusaurus/docusaurus-plugin-content-docs/default/plugin-route-context-module-100.json",1206],"041c5cc5":[()=>Promise.all([n.e(532),n.e(2312),n.e(9686)]).then(n.bind(n,5898)),"@site/docs/redux.mdx",5898],"06d8b529":[()=>Promise.all([n.e(532),n.e(2312),n.e(9091)]).then(n.bind(n,2127)),"@site/docs/database.mdx",2127],"0a6dca49":[()=>n.e(8151).then(n.t.bind(n,9583,19)),"~blog/default/flecks-blog-tags-introducing-be3.json",9583],"14eb3368":[()=>Promise.all([n.e(532),n.e(9817)]).then(n.bind(n,4228)),"@theme/DocCategoryGeneratedIndexPage",4228],"14f78a16":[()=>n.e(2163).then(n.t.bind(n,8506,19)),"~blog/default/flecks-blog-55a.json",8506],"160a3b85":[()=>n.e(6128).then(n.bind(n,3987)),"@site/docs/ordering.mdx",3987],"16e47f6f":[()=>n.e(2837).then(n.bind(n,2011)),"@site/docs/building-your-application.mdx",2011],17896441:[()=>Promise.all([n.e(532),n.e(2312),n.e(8071),n.e(7918)]).then(n.bind(n,5154)),"@theme/DocItem",5154],18911325:[()=>n.e(2873).then(n.bind(n,2494)),"@site/docs/docker.mdx",2494],"1ecec20c":[()=>n.e(3850).then(n.t.bind(n,7257,19)),"~docs/default/category-flecksdocs-fleckssidebar-category-generated-details-d06.json",7257],"2357b171":[()=>n.e(1695).then(n.t.bind(n,3048,19)),"~blog/default/flecks-blog-tags-announcement-75b-list.json",3048],"32a57bab":[()=>Promise.all([n.e(532),n.e(8532)]).then(n.bind(n,2343)),"@site/docs/sockets.mdx",2343],"32e8e2d9":[()=>n.e(1156).then(n.bind(n,8012)),"@site/blog/2024-01-30/introducing-flecks.mdx",8012],"357e2da2":[()=>n.e(2596).then(n.t.bind(n,8055,19)),"~docs/default/category-flecksdocs-fleckssidebar-category-getting-started-69a.json",8055],"3c291670":[()=>Promise.all([n.e(532),n.e(2312),n.e(1052)]).then(n.bind(n,2242)),"@site/docs/react.mdx",2242],"3d909a3c":[()=>n.e(4138).then(n.t.bind(n,3814,19)),"~blog/default/flecks-blog-tags-flecks-2a4.json",3814],"55ec95f7":[()=>Promise.all([n.e(532),n.e(6419)]).then(n.bind(n,3688)),"@site/pages/flecks/index.jsx",3688],"57cdf011":[()=>Promise.all([n.e(532),n.e(2312),n.e(944)]).then(n.bind(n,6586)),"@site/docs/flecks/todos.mdx",6586],"5df00a39":[()=>n.e(4364).then(n.bind(n,732)),"@site/docs/electron.mdx",732],"5e95c892":[()=>n.e(9661).then(n.bind(n,1892)),"@theme/DocsRoot",1892],"5e9f5e1a":[()=>Promise.resolve().then(n.bind(n,8970)),"@generated/docusaurus.config",8970],"6875c492":[()=>Promise.all([n.e(532),n.e(2312),n.e(8071),n.e(130),n.e(8610)]).then(n.bind(n,1714)),"@theme/BlogTagsPostsPage",1714],"6cabb5ed":[()=>Promise.all([n.e(532),n.e(2312),n.e(9339)]).then(n.bind(n,2034)),"@site/docs/building-your-fleck.mdx",2034],72512343:[()=>Promise.all([n.e(532),n.e(5679)]).then(n.bind(n,6057)),"@site/docs/flecks/hooks.mdx",6057],"773fe5c0":[()=>Promise.all([n.e(532),n.e(2312),n.e(1144)]).then(n.bind(n,9192)),"@site/docs/flecks/config.mdx",9192],"814f3328":[()=>n.e(2535).then(n.t.bind(n,2625,19)),"~blog/default/blog-post-list-prop-default.json",2625],"8333feff":[()=>n.e(7279).then(n.t.bind(n,9779,19)),"~blog/default/flecks-blog-tags-introducing-be3-list.json",9779],"8b0cd02a":[()=>Promise.all([n.e(532),n.e(2312),n.e(6911)]).then(n.bind(n,1039)),"@site/docs/repl.mdx",1039],"8d2f4c1c":[()=>n.e(5287).then(n.t.bind(n,1774,19)),"/home/cha0s/sync/src/code/flecks/website/node_modules/.cache/docusaurus/docusaurus-plugin-content-pages/default/plugin-route-context-module-100.json",1774],"8d4b214a":[()=>Promise.all([n.e(532),n.e(2312),n.e(4639)]).then(n.bind(n,3839)),"@site/docs/adding-flecks.mdx",3839],"8f92789c":[()=>Promise.all([n.e(532),n.e(6325)]).then(n.bind(n,9458)),"@site/pages/index.jsx",9458],"935f2afb":[()=>n.e(53).then(n.t.bind(n,7676,19)),"~docs/default/version-current-metadata-prop-751.json",7676],"972d9d57":[()=>n.e(937).then(n.bind(n,3134)),"@site/docs/introduction.mdx",3134],"9967cc6c":[()=>n.e(1073).then(n.bind(n,3899)),"@site/docs/hooks.mdx",3899],"9e4087bc":[()=>n.e(3608).then(n.bind(n,3169)),"@theme/BlogArchivePage",3169],a0957561:[()=>n.e(5048).then(n.t.bind(n,8536,19)),"~blog/default/flecks-blog-archive-6c6.json",8536],a6aa9e1f:[()=>Promise.all([n.e(532),n.e(2312),n.e(8071),n.e(130),n.e(3089)]).then(n.bind(n,46)),"@theme/BlogListPage",46],a7bd4aaa:[()=>n.e(8518).then(n.bind(n,8564)),"@theme/DocVersionRoot",8564],a94703ab:[()=>Promise.all([n.e(532),n.e(4368)]).then(n.bind(n,2674)),"@theme/DocRoot",2674],af7d3287:[()=>n.e(3541).then(n.bind(n,8065)),"@site/docs/environment.mdx",8065],b045326f:[()=>Promise.all([n.e(532),n.e(2312),n.e(1851)]).then(n.bind(n,4345)),"@site/docs/documentation.mdx",4345],ba61d949:[()=>Promise.all([n.e(532),n.e(2312),n.e(7041)]).then(n.bind(n,5053)),"@site/docs/cli.mdx",5053],bb194406:[()=>n.e(8883).then(n.bind(n,8076)),"@site/blog/2024-01-30/introducing-flecks.mdx?truncated=true",8076],be07d3f5:[()=>Promise.all([n.e(532),n.e(2312),n.e(1204)]).then(n.bind(n,1538)),"@site/docs/creating-a-fleck.mdx",1538],bfa2a205:[()=>n.e(8312).then(n.t.bind(n,5143,19)),"~docs/default/category-flecksdocs-fleckssidebar-category-guides-724.json",5143],c208b484:[()=>n.e(1825).then(n.bind(n,5019)),"@site/docs/gathering.mdx",5019],c6694cff:[()=>n.e(5722).then(n.t.bind(n,3363,19)),"~blog/default/flecks-blog-tags-tags-674.json",3363],c6ac44d3:[()=>n.e(1540).then(n.t.bind(n,3928,19)),"~blog/default/flecks-blog-tags-release-5c4.json",3928],cbb899e4:[()=>n.e(196).then(n.bind(n,8282)),"@site/docs/configuration.mdx",8282],ccc49370:[()=>Promise.all([n.e(532),n.e(2312),n.e(8071),n.e(130),n.e(6103)]).then(n.bind(n,5203)),"@theme/BlogPostPage",5203],cdb1c15d:[()=>n.e(107).then(n.t.bind(n,8175,19)),"~blog/default/flecks-blog-tags-flecks-2a4-list.json",8175],cdde611f:[()=>n.e(4100).then(n.t.bind(n,20,19)),"/home/cha0s/sync/src/code/flecks/website/node_modules/.cache/docusaurus/docusaurus-plugin-content-blog/default/plugin-route-context-module-100.json",20],dad808ed:[()=>n.e(9832).then(n.t.bind(n,1281,19)),"~docs/default/category-flecksdocs-fleckssidebar-category-writing-your-flecks-ad3.json",1281],e6ab389f:[()=>n.e(2297).then(n.t.bind(n,9098,19)),"~blog/default/flecks-blog-tags-release-5c4-list.json",9098],e98a169a:[()=>n.e(4861).then(n.t.bind(n,2576,19)),"~blog/default/flecks-blog-tags-announcement-75b.json",2576],f9a0490a:[()=>n.e(3630).then(n.bind(n,9734)),"@site/docs/platforms.mdx",9734],fa4d91bf:[()=>Promise.all([n.e(532),n.e(2312),n.e(5930)]).then(n.bind(n,4099)),"@site/docs/installation.mdx",4099],fb49b6cf:[()=>n.e(9828).then(n.bind(n,30)),"@site/docs/flecks/build-files.mdx",30]};var l=n(5893);function s(e){let{error:t,retry:n,pastDelay:r}=e;return t?(0,l.jsxs)("div",{style:{textAlign:"center",color:"#fff",backgroundColor:"#fa383e",borderColor:"#fa383e",borderStyle:"solid",borderRadius:"0.25rem",borderWidth:"1px",boxSizing:"border-box",display:"block",padding:"1rem",flex:"0 0 50%",marginLeft:"25%",marginRight:"25%",marginTop:"5rem",maxWidth:"50%",width:"100%"},children:[(0,l.jsx)("p",{children:String(t)}),(0,l.jsx)("div",{children:(0,l.jsx)("button",{type:"button",onClick:n,children:"Retry"})})]}):r?(0,l.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh"},children:(0,l.jsx)("svg",{id:"loader",style:{width:128,height:110,position:"absolute",top:"calc(100vh - 64%)"},viewBox:"0 0 45 45",xmlns:"http://www.w3.org/2000/svg",stroke:"#61dafb",children:(0,l.jsxs)("g",{fill:"none",fillRule:"evenodd",transform:"translate(1 1)",strokeWidth:"2",children:[(0,l.jsxs)("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0",children:[(0,l.jsx)("animate",{attributeName:"r",begin:"1.5s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),(0,l.jsx)("animate",{attributeName:"stroke-opacity",begin:"1.5s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),(0,l.jsx)("animate",{attributeName:"stroke-width",begin:"1.5s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})]}),(0,l.jsxs)("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0",children:[(0,l.jsx)("animate",{attributeName:"r",begin:"3s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),(0,l.jsx)("animate",{attributeName:"stroke-opacity",begin:"3s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),(0,l.jsx)("animate",{attributeName:"stroke-width",begin:"3s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})]}),(0,l.jsx)("circle",{cx:"22",cy:"22",r:"8",children:(0,l.jsx)("animate",{attributeName:"r",begin:"0s",dur:"1.5s",values:"6;1;2;3;4;5;6",calcMode:"linear",repeatCount:"indefinite"})})]})})}):null}var c=n(9670),u=n(226);function d(e,t){if("*"===e)return o()({loading:s,loader:()=>n.e(1772).then(n.bind(n,1772)),modules:["@theme/NotFound"],webpack:()=>[1772],render(e,t){const n=e.default;return(0,l.jsx)(u.z,{value:{plugin:{name:"native",id:"default"}},children:(0,l.jsx)(n,{...t})})}});const r=a[`${e}-${t}`],d={},f=[],p=[],m=(0,c.Z)(r);return Object.entries(m).forEach((e=>{let[t,n]=e;const r=i[n];r&&(d[t]=r[0],f.push(r[1]),p.push(r[2]))})),o().Map({loading:s,loader:d,modules:f,webpack:()=>p,render(t,n){const o=JSON.parse(JSON.stringify(r));Object.entries(t).forEach((t=>{let[n,r]=t;const a=r.default;if(!a)throw new Error(`The page component at ${e} doesn't have a default export. This makes it impossible to render anything. Consider default-exporting a React component.`);"object"!=typeof a&&"function"!=typeof a||Object.keys(r).filter((e=>"default"!==e)).forEach((e=>{a[e]=r[e]}));let i=o;const l=n.split(".");l.slice(0,-1).forEach((e=>{i=i[e]})),i[l[l.length-1]]=a}));const a=o.__comp;delete o.__comp;const i=o.__context;return delete o.__context,(0,l.jsx)(u.z,{value:i,children:(0,l.jsx)(a,{...o,...n})})}})}const f=[{path:"/flecks/blog",component:d("/flecks/blog","173"),exact:!0},{path:"/flecks/blog/archive",component:d("/flecks/blog/archive","b63"),exact:!0},{path:"/flecks/blog/introducing-flecks",component:d("/flecks/blog/introducing-flecks","f4d"),exact:!0},{path:"/flecks/blog/tags",component:d("/flecks/blog/tags","9cb"),exact:!0},{path:"/flecks/blog/tags/announcement",component:d("/flecks/blog/tags/announcement","23a"),exact:!0},{path:"/flecks/blog/tags/flecks",component:d("/flecks/blog/tags/flecks","101"),exact:!0},{path:"/flecks/blog/tags/introducing",component:d("/flecks/blog/tags/introducing","8b5"),exact:!0},{path:"/flecks/blog/tags/release",component:d("/flecks/blog/tags/release","32d"),exact:!0},{path:"/flecks/flecks",component:d("/flecks/flecks","0dd"),exact:!0},{path:"/flecks/docs",component:d("/flecks/docs","12b"),routes:[{path:"/flecks/docs",component:d("/flecks/docs","033"),routes:[{path:"/flecks/docs",component:d("/flecks/docs","adf"),routes:[{path:"/flecks/docs",component:d("/flecks/docs","742"),exact:!0,sidebar:"flecksSidebar"},{path:"/flecks/docs/adding-flecks",component:d("/flecks/docs/adding-flecks","372"),exact:!0,sidebar:"flecksSidebar"},{path:"/flecks/docs/building-your-application",component:d("/flecks/docs/building-your-application","f6c"),exact:!0,sidebar:"flecksSidebar"},{path:"/flecks/docs/building-your-fleck",component:d("/flecks/docs/building-your-fleck","091"),exact:!0,sidebar:"flecksSidebar"},{path:"/flecks/docs/category/generated-details",component:d("/flecks/docs/category/generated-details","a6e"),exact:!0,sidebar:"flecksSidebar"},{path:"/flecks/docs/category/getting-started",component:d("/flecks/docs/category/getting-started","e49"),exact:!0,sidebar:"flecksSidebar"},{path:"/flecks/docs/category/guides",component:d("/flecks/docs/category/guides","729"),exact:!0,sidebar:"flecksSidebar"},{path:"/flecks/docs/category/writing-your-flecks",component:d("/flecks/docs/category/writing-your-flecks","408"),exact:!0,sidebar:"flecksSidebar"},{path:"/flecks/docs/cli",component:d("/flecks/docs/cli","882"),exact:!0,sidebar:"flecksSidebar"},{path:"/flecks/docs/configuration",component:d("/flecks/docs/configuration","399"),exact:!0,sidebar:"flecksSidebar"},{path:"/flecks/docs/creating-a-fleck",component:d("/flecks/docs/creating-a-fleck","8d3"),exact:!0,sidebar:"flecksSidebar"},{path:"/flecks/docs/database",component:d("/flecks/docs/database","c2c"),exact:!0,sidebar:"flecksSidebar"},{path:"/flecks/docs/docker",component:d("/flecks/docs/docker","0ea"),exact:!0,sidebar:"flecksSidebar"},{path:"/flecks/docs/documentation",component:d("/flecks/docs/documentation","227"),exact:!0,sidebar:"flecksSidebar"},{path:"/flecks/docs/electron",component:d("/flecks/docs/electron","437"),exact:!0,sidebar:"flecksSidebar"},{path:"/flecks/docs/environment",component:d("/flecks/docs/environment","9ae"),exact:!0,sidebar:"flecksSidebar"},{path:"/flecks/docs/flecks/build-files",component:d("/flecks/docs/flecks/build-files","749"),exact:!0,sidebar:"flecksSidebar"},{path:"/flecks/docs/flecks/config",component:d("/flecks/docs/flecks/config","6bc"),exact:!0,sidebar:"flecksSidebar"},{path:"/flecks/docs/flecks/hooks",component:d("/flecks/docs/flecks/hooks","cd1"),exact:!0,sidebar:"flecksSidebar"},{path:"/flecks/docs/flecks/todos",component:d("/flecks/docs/flecks/todos","4a8"),exact:!0,sidebar:"flecksSidebar"},{path:"/flecks/docs/gathering",component:d("/flecks/docs/gathering","e63"),exact:!0,sidebar:"flecksSidebar"},{path:"/flecks/docs/hooks",component:d("/flecks/docs/hooks","14d"),exact:!0,sidebar:"flecksSidebar"},{path:"/flecks/docs/installation",component:d("/flecks/docs/installation","145"),exact:!0,sidebar:"flecksSidebar"},{path:"/flecks/docs/ordering",component:d("/flecks/docs/ordering","2dd"),exact:!0,sidebar:"flecksSidebar"},{path:"/flecks/docs/platforms",component:d("/flecks/docs/platforms","039"),exact:!0,sidebar:"flecksSidebar"},{path:"/flecks/docs/react",component:d("/flecks/docs/react","ce0"),exact:!0,sidebar:"flecksSidebar"},{path:"/flecks/docs/redux",component:d("/flecks/docs/redux","b6c"),exact:!0,sidebar:"flecksSidebar"},{path:"/flecks/docs/repl",component:d("/flecks/docs/repl","7ca"),exact:!0,sidebar:"flecksSidebar"},{path:"/flecks/docs/sockets",component:d("/flecks/docs/sockets","f16"),exact:!0,sidebar:"flecksSidebar"}]}]}]},{path:"/flecks/",component:d("/flecks/","ace"),exact:!0},{path:"*",component:d("*")}]},8934:(e,t,n)=>{"use strict";n.d(t,{_:()=>a,t:()=>i});var r=n(7294),o=n(5893);const a=r.createContext(!1);function i(e){let{children:t}=e;const[n,i]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{i(!0)}),[]),(0,o.jsx)(a.Provider,{value:n,children:t})}},7428:(e,t,n)=>{"use strict";var r=n(7294),o=n(745),a=n(3727),i=n(405),l=n(412);const s=[n(2497),n(3310),n(8320),n(92)];var c=n(5002),u=n(6550),d=n(8790),f=n(5893);function p(e){let{children:t}=e;return(0,f.jsx)(f.Fragment,{children:t})}var m=n(5742),g=n(2263),h=n(4996),b=n(6668),y=n(1944),v=n(4711),k=n(9727),w=n(3320),x=n(8780),S=n(197);function E(){const{i18n:{currentLocale:e,defaultLocale:t,localeConfigs:n}}=(0,g.Z)(),r=(0,v.l)(),o=n[e].htmlLang,a=e=>e.replace("-","_");return(0,f.jsxs)(m.Z,{children:[Object.entries(n).map((e=>{let[t,{htmlLang:n}]=e;return(0,f.jsx)("link",{rel:"alternate",href:r.createUrl({locale:t,fullyQualified:!0}),hrefLang:n},t)})),(0,f.jsx)("link",{rel:"alternate",href:r.createUrl({locale:t,fullyQualified:!0}),hrefLang:"x-default"}),(0,f.jsx)("meta",{property:"og:locale",content:a(o)}),Object.values(n).filter((e=>o!==e.htmlLang)).map((e=>(0,f.jsx)("meta",{property:"og:locale:alternate",content:a(e.htmlLang)},`meta-og-${e.htmlLang}`)))]})}function C(e){let{permalink:t}=e;const{siteConfig:{url:n}}=(0,g.Z)(),r=function(){const{siteConfig:{url:e,baseUrl:t,trailingSlash:n}}=(0,g.Z)(),{pathname:r}=(0,u.TH)();return e+(0,x.applyTrailingSlash)((0,h.Z)(r),{trailingSlash:n,baseUrl:t})}(),o=t?`${n}${t}`:r;return(0,f.jsxs)(m.Z,{children:[(0,f.jsx)("meta",{property:"og:url",content:o}),(0,f.jsx)("link",{rel:"canonical",href:o})]})}function _(){const{i18n:{currentLocale:e}}=(0,g.Z)(),{metadata:t,image:n}=(0,b.L)();return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(m.Z,{children:[(0,f.jsx)("meta",{name:"twitter:card",content:"summary_large_image"}),(0,f.jsx)("body",{className:k.h})]}),n&&(0,f.jsx)(y.d,{image:n}),(0,f.jsx)(C,{}),(0,f.jsx)(E,{}),(0,f.jsx)(S.Z,{tag:w.HX,locale:e}),(0,f.jsx)(m.Z,{children:t.map(((e,t)=>(0,f.jsx)("meta",{...e},t)))})]})}const T=new Map;function j(e){if(T.has(e.pathname))return{...e,pathname:T.get(e.pathname)};if((0,d.f)(c.Z,e.pathname).some((e=>{let{route:t}=e;return!0===t.exact})))return T.set(e.pathname,e.pathname),e;const t=e.pathname.trim().replace(/(?:\/index)?\.html$/,"")||"/";return T.set(e.pathname,t),{...e,pathname:t}}var L=n(8934),A=n(6565),N=n(469);function R(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r{const r=t.default?.[e]??t[e];return r?.(...n)}));return()=>o.forEach((e=>e?.()))}const P=function(e){let{children:t,location:n,previousLocation:r}=e;return(0,N.Z)((()=>{r!==n&&(!function(e){let{location:t,previousLocation:n}=e;if(!n)return;const r=t.pathname===n.pathname,o=t.hash===n.hash,a=t.search===n.search;if(r&&o&&!a)return;const{hash:i}=t;if(i){const e=decodeURIComponent(i.substring(1)),t=document.getElementById(e);t?.scrollIntoView()}else window.scrollTo(0,0)}({location:n,previousLocation:r}),R("onRouteDidUpdate",{previousLocation:r,location:n}))}),[r,n]),t};function O(e){const t=Array.from(new Set([e,decodeURI(e)])).map((e=>(0,d.f)(c.Z,e))).flat();return Promise.all(t.map((e=>e.route.component.preload?.())))}class D extends r.Component{previousLocation;routeUpdateCleanupCb;constructor(e){super(e),this.previousLocation=null,this.routeUpdateCleanupCb=l.Z.canUseDOM?R("onRouteUpdate",{previousLocation:null,location:this.props.location}):()=>{},this.state={nextRouteHasLoaded:!0}}shouldComponentUpdate(e,t){if(e.location===this.props.location)return t.nextRouteHasLoaded;const n=e.location;return this.previousLocation=this.props.location,this.setState({nextRouteHasLoaded:!1}),this.routeUpdateCleanupCb=R("onRouteUpdate",{previousLocation:this.previousLocation,location:n}),O(n.pathname).then((()=>{this.routeUpdateCleanupCb(),this.setState({nextRouteHasLoaded:!0})})).catch((e=>{console.warn(e),window.location.reload()})),!1}render(){const{children:e,location:t}=this.props;return(0,f.jsx)(P,{previousLocation:this.previousLocation,location:t,children:(0,f.jsx)(u.AW,{location:t,render:()=>e})})}}const I=D,F="__docusaurus-base-url-issue-banner-container",M="__docusaurus-base-url-issue-banner",z="__docusaurus-base-url-issue-banner-suggestion-container";function B(e){return`\ndocument.addEventListener('DOMContentLoaded', function maybeInsertBanner() {\n var shouldInsert = typeof window['docusaurus'] === 'undefined';\n shouldInsert && insertBanner();\n});\n\nfunction insertBanner() {\n var bannerContainer = document.createElement('div');\n bannerContainer.id = '${F}';\n var bannerHtml = ${JSON.stringify(function(e){return`\n
\n

Your Docusaurus site did not load properly.

\n

A very common reason is a wrong site baseUrl configuration.

\n

Current configured baseUrl = ${e} ${"/"===e?" (default value)":""}

\n

We suggest trying baseUrl =

\n
\n`}(e)).replace(/{if("undefined"==typeof document)return void n();const r=document.createElement("link");r.setAttribute("rel","prefetch"),r.setAttribute("href",e),r.onload=()=>t(),r.onerror=()=>n();const o=document.getElementsByTagName("head")[0]??document.getElementsByName("script")[0]?.parentNode;o?.appendChild(r)}))}:function(e){return new Promise(((t,n)=>{const r=new XMLHttpRequest;r.open("GET",e,!0),r.withCredentials=!0,r.onload=()=>{200===r.status?t():n()},r.send(null)}))};var Y=n(9670);const K=new Set,X=new Set,J=()=>navigator.connection?.effectiveType.includes("2g")||navigator.connection?.saveData,ee={prefetch(e){if(!(e=>!J()&&!X.has(e)&&!K.has(e))(e))return!1;K.add(e);const t=(0,d.f)(c.Z,e).flatMap((e=>{return t=e.route.path,Object.entries(W).filter((e=>{let[n]=e;return n.replace(/-[^-]+$/,"")===t})).flatMap((e=>{let[,t]=e;return Object.values((0,Y.Z)(t))}));var t}));return Promise.all(t.map((e=>{const t=n.gca(e);return t&&!t.includes("undefined")?Q(t).catch((()=>{})):Promise.resolve()})))},preload:e=>!!(e=>!J()&&!X.has(e))(e)&&(X.add(e),O(e))},te=Object.freeze(ee),ne=Boolean(!0);if(l.Z.canUseDOM){window.docusaurus=te;const e=document.getElementById("__docusaurus"),t=(0,f.jsx)(i.B6,{children:(0,f.jsx)(a.VK,{children:(0,f.jsx)(V,{})})}),n=(e,t)=>{console.error("Docusaurus React Root onRecoverableError:",e,t)},l=()=>{if(ne)r.startTransition((()=>{o.hydrateRoot(e,t,{onRecoverableError:n})}));else{const a=o.createRoot(e,{onRecoverableError:n});r.startTransition((()=>{a.render(t)}))}};O(window.location.pathname).then(l)}},6565:(e,t,n)=>{"use strict";n.d(t,{_:()=>d,M:()=>f});var r=n(7294),o=n(8970);const a=JSON.parse('{"docusaurus-plugin-content-docs":{"default":{"path":"/flecks/docs","versions":[{"name":"current","label":"Next","isLast":true,"path":"/flecks/docs","mainDocId":"introduction","docs":[{"id":"adding-flecks","path":"/flecks/docs/adding-flecks","sidebar":"flecksSidebar"},{"id":"building-your-application","path":"/flecks/docs/building-your-application","sidebar":"flecksSidebar"},{"id":"building-your-fleck","path":"/flecks/docs/building-your-fleck","sidebar":"flecksSidebar"},{"id":"cli","path":"/flecks/docs/cli","sidebar":"flecksSidebar"},{"id":"configuration","path":"/flecks/docs/configuration","sidebar":"flecksSidebar"},{"id":"creating-a-fleck","path":"/flecks/docs/creating-a-fleck","sidebar":"flecksSidebar"},{"id":"database","path":"/flecks/docs/database","sidebar":"flecksSidebar"},{"id":"docker","path":"/flecks/docs/docker","sidebar":"flecksSidebar"},{"id":"documentation","path":"/flecks/docs/documentation","sidebar":"flecksSidebar"},{"id":"electron","path":"/flecks/docs/electron","sidebar":"flecksSidebar"},{"id":"environment","path":"/flecks/docs/environment","sidebar":"flecksSidebar"},{"id":"flecks/build-files","path":"/flecks/docs/flecks/build-files","sidebar":"flecksSidebar"},{"id":"flecks/config","path":"/flecks/docs/flecks/config","sidebar":"flecksSidebar"},{"id":"flecks/hooks","path":"/flecks/docs/flecks/hooks","sidebar":"flecksSidebar"},{"id":"flecks/todos","path":"/flecks/docs/flecks/todos","sidebar":"flecksSidebar"},{"id":"gathering","path":"/flecks/docs/gathering","sidebar":"flecksSidebar"},{"id":"hooks","path":"/flecks/docs/hooks","sidebar":"flecksSidebar"},{"id":"installation","path":"/flecks/docs/installation","sidebar":"flecksSidebar"},{"id":"introduction","path":"/flecks/docs/","sidebar":"flecksSidebar"},{"id":"ordering","path":"/flecks/docs/ordering","sidebar":"flecksSidebar"},{"id":"platforms","path":"/flecks/docs/platforms","sidebar":"flecksSidebar"},{"id":"react","path":"/flecks/docs/react","sidebar":"flecksSidebar"},{"id":"redux","path":"/flecks/docs/redux","sidebar":"flecksSidebar"},{"id":"repl","path":"/flecks/docs/repl","sidebar":"flecksSidebar"},{"id":"sockets","path":"/flecks/docs/sockets","sidebar":"flecksSidebar"},{"id":"/category/getting-started","path":"/flecks/docs/category/getting-started","sidebar":"flecksSidebar"},{"id":"/category/guides","path":"/flecks/docs/category/guides","sidebar":"flecksSidebar"},{"id":"/category/writing-your-flecks","path":"/flecks/docs/category/writing-your-flecks","sidebar":"flecksSidebar"},{"id":"/category/generated-details","path":"/flecks/docs/category/generated-details","sidebar":"flecksSidebar"}],"draftIds":[],"sidebars":{"flecksSidebar":{"link":{"path":"/flecks/docs/","label":"introduction"}}}}],"breadcrumbs":true}}}'),i=JSON.parse('{"defaultLocale":"en","locales":["en"],"path":"i18n","currentLocale":"en","localeConfigs":{"en":{"label":"English","direction":"ltr","htmlLang":"en","calendar":"gregory","path":"en"}}}');var l=n(6856);const s=JSON.parse('{"docusaurusVersion":"3.0.1","siteVersion":"0.0.0","pluginVersions":{"docusaurus-plugin-content-docs":{"type":"package","name":"@docusaurus/plugin-content-docs","version":"3.0.1"},"docusaurus-plugin-content-blog":{"type":"package","name":"@docusaurus/plugin-content-blog","version":"3.0.1"},"docusaurus-plugin-content-pages":{"type":"package","name":"@docusaurus/plugin-content-pages","version":"3.0.1"},"docusaurus-plugin-sitemap":{"type":"package","name":"@docusaurus/plugin-sitemap","version":"3.0.1"},"docusaurus-theme-classic":{"type":"package","name":"@docusaurus/theme-classic","version":"3.0.1"},"docusaurus-theme-mermaid":{"type":"package","name":"@docusaurus/theme-mermaid","version":"3.0.1"}}}');var c=n(5893);const u={siteConfig:o.default,siteMetadata:s,globalData:a,i18n:i,codeTranslations:l},d=r.createContext(u);function f(e){let{children:t}=e;return(0,c.jsx)(d.Provider,{value:u,children:t})}},4763:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var r=n(7294),o=n(412),a=n(5742),i=n(8780),l=n(7293),s=n(5893);function c(e){let{error:t,tryAgain:n}=e;return(0,s.jsxs)("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"flex-start",minHeight:"100vh",width:"100%",maxWidth:"80ch",fontSize:"20px",margin:"0 auto",padding:"1rem"},children:[(0,s.jsx)("h1",{style:{fontSize:"3rem"},children:"This page crashed"}),(0,s.jsx)("button",{type:"button",onClick:n,style:{margin:"1rem 0",fontSize:"2rem",cursor:"pointer",borderRadius:20,padding:"1rem"},children:"Try again"}),(0,s.jsx)(u,{error:t})]})}function u(e){let{error:t}=e;const n=(0,i.getErrorCausalChain)(t).map((e=>e.message)).join("\n\nCause:\n");return(0,s.jsx)("p",{style:{whiteSpace:"pre-wrap"},children:n})}function d(e){let{error:t,tryAgain:n}=e;return(0,s.jsxs)(p,{fallback:()=>(0,s.jsx)(c,{error:t,tryAgain:n}),children:[(0,s.jsx)(a.Z,{children:(0,s.jsx)("title",{children:"Page Error"})}),(0,s.jsx)(l.Z,{children:(0,s.jsx)(c,{error:t,tryAgain:n})})]})}const f=e=>(0,s.jsx)(d,{...e});class p extends r.Component{constructor(e){super(e),this.state={error:null}}componentDidCatch(e){o.Z.canUseDOM&&this.setState({error:e})}render(){const{children:e}=this.props,{error:t}=this.state;if(t){const e={error:t,tryAgain:()=>this.setState({error:null})};return(this.props.fallback??f)(e)}return e??null}}},412:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});const r="undefined"!=typeof window&&"document"in window&&"createElement"in window.document,o={canUseDOM:r,canUseEventListeners:r&&("addEventListener"in window||"attachEvent"in window),canUseIntersectionObserver:r&&"IntersectionObserver"in window,canUseViewport:r&&"screen"in window}},5742:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});n(7294);var r=n(405),o=n(5893);function a(e){return(0,o.jsx)(r.ql,{...e})}},9960:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var r=n(7294),o=n(3727),a=n(8780),i=n(2263),l=n(3919),s=n(412),c=n(5893);const u=r.createContext({collectLink:()=>{}});var d=n(4996);function f(e,t){let{isNavLink:n,to:f,href:p,activeClassName:m,isActive:g,"data-noBrokenLinkCheck":h,autoAddBaseUrl:b=!0,...y}=e;const{siteConfig:{trailingSlash:v,baseUrl:k}}=(0,i.Z)(),{withBaseUrl:w}=(0,d.C)(),x=(0,r.useContext)(u),S=(0,r.useRef)(null);(0,r.useImperativeHandle)(t,(()=>S.current));const E=f||p;const C=(0,l.Z)(E),_=E?.replace("pathname://","");let T=void 0!==_?(j=_,b&&(e=>e.startsWith("/"))(j)?w(j):j):void 0;var j;T&&C&&(T=(0,a.applyTrailingSlash)(T,{trailingSlash:v,baseUrl:k}));const L=(0,r.useRef)(!1),A=n?o.OL:o.rU,N=s.Z.canUseIntersectionObserver,R=(0,r.useRef)(),P=()=>{L.current||null==T||(window.docusaurus.preload(T),L.current=!0)};(0,r.useEffect)((()=>(!N&&C&&null!=T&&window.docusaurus.prefetch(T),()=>{N&&R.current&&R.current.disconnect()})),[R,T,N,C]);const O=T?.startsWith("#")??!1,D=!T||!C||O;return D||h||x.collectLink(T),D?(0,c.jsx)("a",{ref:S,href:T,...E&&!C&&{target:"_blank",rel:"noopener noreferrer"},...y}):(0,c.jsx)(A,{...y,onMouseEnter:P,onTouchStart:P,innerRef:e=>{S.current=e,N&&e&&C&&(R.current=new window.IntersectionObserver((t=>{t.forEach((t=>{e===t.target&&(t.isIntersecting||t.intersectionRatio>0)&&(R.current.unobserve(e),R.current.disconnect(),null!=T&&window.docusaurus.prefetch(T))}))})),R.current.observe(e))},to:T,...n&&{isActive:g,activeClassName:m}})}const p=r.forwardRef(f)},5999:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c,I:()=>s});var r=n(7294),o=n(5893);function a(e,t){const n=e.split(/(\{\w+\})/).map(((e,n)=>{if(n%2==1){const n=t?.[e.slice(1,-1)];if(void 0!==n)return n}return e}));return n.some((e=>(0,r.isValidElement)(e)))?n.map(((e,t)=>(0,r.isValidElement)(e)?r.cloneElement(e,{key:t}):e)).filter((e=>""!==e)):n.join("")}var i=n(6856);function l(e){let{id:t,message:n}=e;if(void 0===t&&void 0===n)throw new Error("Docusaurus translation declarations must have at least a translation id or a default translation message");return i[t??n]??n??t}function s(e,t){let{message:n,id:r}=e;return a(l({message:n,id:r}),t)}function c(e){let{children:t,id:n,values:r}=e;if(t&&"string"!=typeof t)throw console.warn("Illegal children",t),new Error("The Docusaurus component only accept simple string values");const i=l({message:t,id:n});return(0,o.jsx)(o.Fragment,{children:a(i,r)})}},9935:(e,t,n)=>{"use strict";n.d(t,{m:()=>r});const r="default"},3919:(e,t,n)=>{"use strict";function r(e){return/^(?:\w*:|\/\/)/.test(e)}function o(e){return void 0!==e&&!r(e)}n.d(t,{Z:()=>o,b:()=>r})},4996:(e,t,n)=>{"use strict";n.d(t,{C:()=>i,Z:()=>l});var r=n(7294),o=n(2263),a=n(3919);function i(){const{siteConfig:{baseUrl:e,url:t}}=(0,o.Z)(),n=(0,r.useCallback)(((n,r)=>function(e,t,n,r){let{forcePrependBaseUrl:o=!1,absolute:i=!1}=void 0===r?{}:r;if(!n||n.startsWith("#")||(0,a.b)(n))return n;if(o)return t+n.replace(/^\//,"");if(n===t.replace(/\/$/,""))return t;const l=n.startsWith(t)?n:t+n.replace(/^\//,"");return i?e+l:l}(t,e,n,r)),[t,e]);return{withBaseUrl:n}}function l(e,t){void 0===t&&(t={});const{withBaseUrl:n}=i();return n(e,t)}},2263:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(7294),o=n(6565);function a(){return(0,r.useContext)(o._)}},2389:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(7294),o=n(8934);function a(){return(0,r.useContext)(o._)}},469:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(7294);const o=n(412).Z.canUseDOM?r.useLayoutEffect:r.useEffect},9670:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});const r=e=>"object"==typeof e&&!!e&&Object.keys(e).length>0;function o(e){const t={};return function e(n,o){Object.entries(n).forEach((n=>{let[a,i]=n;const l=o?`${o}.${a}`:a;r(i)?e(i,l):t[l]=i}))}(e),t}},226:(e,t,n)=>{"use strict";n.d(t,{_:()=>a,z:()=>i});var r=n(7294),o=n(5893);const a=r.createContext(null);function i(e){let{children:t,value:n}=e;const i=r.useContext(a),l=(0,r.useMemo)((()=>function(e){let{parent:t,value:n}=e;if(!t){if(!n)throw new Error("Unexpected: no Docusaurus route context found");if(!("plugin"in n))throw new Error("Unexpected: Docusaurus topmost route context has no `plugin` attribute");return n}const r={...t.data,...n?.data};return{plugin:t.plugin,data:r}}({parent:i,value:n})),[i,n]);return(0,o.jsx)(a.Provider,{value:l,children:t})}},143:(e,t,n)=>{"use strict";n.d(t,{Iw:()=>g,gA:()=>f,_r:()=>u,Jo:()=>h,zh:()=>d,yW:()=>m,gB:()=>p});var r=n(6550),o=n(2263),a=n(9935);function i(e,t){void 0===t&&(t={});const n=function(){const{globalData:e}=(0,o.Z)();return e}()[e];if(!n&&t.failfast)throw new Error(`Docusaurus plugin global data not found for "${e}" plugin.`);return n}const l=e=>e.versions.find((e=>e.isLast));function s(e,t){const n=function(e,t){const n=l(e);return[...e.versions.filter((e=>e!==n)),n].find((e=>!!(0,r.LX)(t,{path:e.path,exact:!1,strict:!1})))}(e,t),o=n?.docs.find((e=>!!(0,r.LX)(t,{path:e.path,exact:!0,strict:!1})));return{activeVersion:n,activeDoc:o,alternateDocVersions:o?function(t){const n={};return e.versions.forEach((e=>{e.docs.forEach((r=>{r.id===t&&(n[e.name]=r)}))})),n}(o.id):{}}}const c={},u=()=>i("docusaurus-plugin-content-docs")??c,d=e=>function(e,t,n){void 0===t&&(t=a.m),void 0===n&&(n={});const r=i(e),o=r?.[t];if(!o&&n.failfast)throw new Error(`Docusaurus plugin global data not found for "${e}" plugin with id "${t}".`);return o}("docusaurus-plugin-content-docs",e,{failfast:!0});function f(e){void 0===e&&(e={});const t=u(),{pathname:n}=(0,r.TH)();return function(e,t,n){void 0===n&&(n={});const o=Object.entries(e).sort(((e,t)=>t[1].path.localeCompare(e[1].path))).find((e=>{let[,n]=e;return!!(0,r.LX)(t,{path:n.path,exact:!1,strict:!1})})),a=o?{pluginId:o[0],pluginData:o[1]}:void 0;if(!a&&n.failfast)throw new Error(`Can't find active docs plugin for "${t}" pathname, while it was expected to be found. Maybe you tried to use a docs feature that can only be used on a docs-related page? Existing docs plugin paths are: ${Object.values(e).map((e=>e.path)).join(", ")}`);return a}(t,n,e)}function p(e){return d(e).versions}function m(e){const t=d(e);return l(t)}function g(e){const t=d(e),{pathname:n}=(0,r.TH)();return s(t,n)}function h(e){const t=d(e),{pathname:n}=(0,r.TH)();return function(e,t){const n=l(e);return{latestDocSuggestion:s(e,t).alternateDocVersions[n.name],latestVersionSuggestion:n}}(t,n)}},8320:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(4865),o=n.n(r);o().configure({showSpinner:!1});const a={onRouteUpdate(e){let{location:t,previousLocation:n}=e;if(n&&t.pathname!==n.pathname){const e=window.setTimeout((()=>{o().start()}),200);return()=>window.clearTimeout(e)}},onRouteDidUpdate(){o().done()}}},3310:(e,t,n)=>{"use strict";n.r(t);var r=n(2573),o=n(8970);!function(e){const{themeConfig:{prism:t}}=o.default,{additionalLanguages:r}=t;globalThis.Prism=e,r.forEach((e=>{"php"===e&&n(6854),n(6726)(`./prism-${e}`)})),delete globalThis.Prism}(r.p1)},2503:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});n(7294);var r=n(512),o=n(5999),a=n(6668),i=n(9960);const l={anchorWithStickyNavbar:"anchorWithStickyNavbar_LWe7",anchorWithHideOnScrollNavbar:"anchorWithHideOnScrollNavbar_WYt5"};var s=n(5893);function c(e){let{as:t,id:n,...c}=e;const{navbar:{hideOnScroll:u}}=(0,a.L)();if("h1"===t||!n)return(0,s.jsx)(t,{...c,id:void 0});const d=(0,o.I)({id:"theme.common.headingLinkTitle",message:"Direct link to {heading}",description:"Title for link to heading"},{heading:"string"==typeof c.children?c.children:n});return(0,s.jsxs)(t,{...c,className:(0,r.Z)("anchor",u?l.anchorWithHideOnScrollNavbar:l.anchorWithStickyNavbar,c.className),id:n,children:[c.children,(0,s.jsx)(i.Z,{className:"hash-link",to:`#${n}`,"aria-label":d,title:d,children:"\u200b"})]})}},9471:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});n(7294);const r={iconExternalLink:"iconExternalLink_nPIU"};var o=n(5893);function a(e){let{width:t=13.5,height:n=13.5}=e;return(0,o.jsx)("svg",{width:t,height:n,"aria-hidden":"true",viewBox:"0 0 24 24",className:r.iconExternalLink,children:(0,o.jsx)("path",{fill:"currentColor",d:"M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"})})}},7293:(e,t,n)=>{"use strict";n.d(t,{Z:()=>ct});var r=n(7294),o=n(512),a=n(4763),i=n(1944),l=n(6550),s=n(5999),c=n(5936),u=n(5893);const d="__docusaurus_skipToContent_fallback";function f(e){e.setAttribute("tabindex","-1"),e.focus(),e.removeAttribute("tabindex")}function p(){const e=(0,r.useRef)(null),{action:t}=(0,l.k6)(),n=(0,r.useCallback)((e=>{e.preventDefault();const t=document.querySelector("main:first-of-type")??document.getElementById(d);t&&f(t)}),[]);return(0,c.S)((n=>{let{location:r}=n;e.current&&!r.hash&&"PUSH"===t&&f(e.current)})),{containerRef:e,onClick:n}}const m=(0,s.I)({id:"theme.common.skipToMainContent",description:"The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation",message:"Skip to main content"});function g(e){const t=e.children??m,{containerRef:n,onClick:r}=p();return(0,u.jsx)("div",{ref:n,role:"region","aria-label":m,children:(0,u.jsx)("a",{...e,href:`#${d}`,onClick:r,children:t})})}var h=n(5281),b=n(9727);const y={skipToContent:"skipToContent_fXgn"};function v(){return(0,u.jsx)(g,{className:y.skipToContent})}var k=n(6668),w=n(9689);function x(e){let{width:t=21,height:n=21,color:r="currentColor",strokeWidth:o=1.2,className:a,...i}=e;return(0,u.jsx)("svg",{viewBox:"0 0 15 15",width:t,height:n,...i,children:(0,u.jsx)("g",{stroke:r,strokeWidth:o,children:(0,u.jsx)("path",{d:"M.75.75l13.5 13.5M14.25.75L.75 14.25"})})})}const S={closeButton:"closeButton_CVFx"};function E(e){return(0,u.jsx)("button",{type:"button","aria-label":(0,s.I)({id:"theme.AnnouncementBar.closeButtonAriaLabel",message:"Close",description:"The ARIA label for close button of announcement bar"}),...e,className:(0,o.Z)("clean-btn close",S.closeButton,e.className),children:(0,u.jsx)(x,{width:14,height:14,strokeWidth:3.1})})}const C={content:"content_knG7"};function _(e){const{announcementBar:t}=(0,k.L)(),{content:n}=t;return(0,u.jsx)("div",{...e,className:(0,o.Z)(C.content,e.className),dangerouslySetInnerHTML:{__html:n}})}const T={announcementBar:"announcementBar_mb4j",announcementBarPlaceholder:"announcementBarPlaceholder_vyr4",announcementBarClose:"announcementBarClose_gvF7",announcementBarContent:"announcementBarContent_xLdY"};function j(){const{announcementBar:e}=(0,k.L)(),{isActive:t,close:n}=(0,w.nT)();if(!t)return null;const{backgroundColor:r,textColor:o,isCloseable:a}=e;return(0,u.jsxs)("div",{className:T.announcementBar,style:{backgroundColor:r,color:o},role:"banner",children:[a&&(0,u.jsx)("div",{className:T.announcementBarPlaceholder}),(0,u.jsx)(_,{className:T.announcementBarContent}),a&&(0,u.jsx)(E,{onClick:n,className:T.announcementBarClose})]})}var L=n(3163),A=n(2466);var N=n(902),R=n(3102);const P=r.createContext(null);function O(e){let{children:t}=e;const n=function(){const e=(0,L.e)(),t=(0,R.HY)(),[n,o]=(0,r.useState)(!1),a=null!==t.component,i=(0,N.D9)(a);return(0,r.useEffect)((()=>{a&&!i&&o(!0)}),[a,i]),(0,r.useEffect)((()=>{a?e.shown||o(!0):o(!1)}),[e.shown,a]),(0,r.useMemo)((()=>[n,o]),[n])}();return(0,u.jsx)(P.Provider,{value:n,children:t})}function D(e){if(e.component){const t=e.component;return(0,u.jsx)(t,{...e.props})}}function I(){const e=(0,r.useContext)(P);if(!e)throw new N.i6("NavbarSecondaryMenuDisplayProvider");const[t,n]=e,o=(0,r.useCallback)((()=>n(!1)),[n]),a=(0,R.HY)();return(0,r.useMemo)((()=>({shown:t,hide:o,content:D(a)})),[o,a,t])}function F(e){let{header:t,primaryMenu:n,secondaryMenu:r}=e;const{shown:a}=I();return(0,u.jsxs)("div",{className:"navbar-sidebar",children:[t,(0,u.jsxs)("div",{className:(0,o.Z)("navbar-sidebar__items",{"navbar-sidebar__items--show-secondary":a}),children:[(0,u.jsx)("div",{className:"navbar-sidebar__item menu",children:n}),(0,u.jsx)("div",{className:"navbar-sidebar__item menu",children:r})]})]})}var M=n(2949),z=n(2389);function B(e){return(0,u.jsx)("svg",{viewBox:"0 0 24 24",width:24,height:24,...e,children:(0,u.jsx)("path",{fill:"currentColor",d:"M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"})})}function $(e){return(0,u.jsx)("svg",{viewBox:"0 0 24 24",width:24,height:24,...e,children:(0,u.jsx)("path",{fill:"currentColor",d:"M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"})})}const U={toggle:"toggle_vylO",toggleButton:"toggleButton_gllP",darkToggleIcon:"darkToggleIcon_wfgR",lightToggleIcon:"lightToggleIcon_pyhR",toggleButtonDisabled:"toggleButtonDisabled_aARS"};function q(e){let{className:t,buttonClassName:n,value:r,onChange:a}=e;const i=(0,z.Z)(),l=(0,s.I)({message:"Switch between dark and light mode (currently {mode})",id:"theme.colorToggle.ariaLabel",description:"The ARIA label for the navbar color mode toggle"},{mode:"dark"===r?(0,s.I)({message:"dark mode",id:"theme.colorToggle.ariaLabel.mode.dark",description:"The name for the dark color mode"}):(0,s.I)({message:"light mode",id:"theme.colorToggle.ariaLabel.mode.light",description:"The name for the light color mode"})});return(0,u.jsx)("div",{className:(0,o.Z)(U.toggle,t),children:(0,u.jsxs)("button",{className:(0,o.Z)("clean-btn",U.toggleButton,!i&&U.toggleButtonDisabled,n),type:"button",onClick:()=>a("dark"===r?"light":"dark"),disabled:!i,title:l,"aria-label":l,"aria-live":"polite",children:[(0,u.jsx)(B,{className:(0,o.Z)(U.toggleIcon,U.lightToggleIcon)}),(0,u.jsx)($,{className:(0,o.Z)(U.toggleIcon,U.darkToggleIcon)})]})})}const H=r.memo(q),Z={darkNavbarColorModeToggle:"darkNavbarColorModeToggle_X3D1"};function G(e){let{className:t}=e;const n=(0,k.L)().navbar.style,r=(0,k.L)().colorMode.disableSwitch,{colorMode:o,setColorMode:a}=(0,M.I)();return r?null:(0,u.jsx)(H,{className:t,buttonClassName:"dark"===n?Z.darkNavbarColorModeToggle:void 0,value:o,onChange:a})}var V=n(1327);function W(){return(0,u.jsx)(V.Z,{className:"navbar__brand",imageClassName:"navbar__logo",titleClassName:"navbar__title text--truncate"})}function Q(){const e=(0,L.e)();return(0,u.jsx)("button",{type:"button","aria-label":(0,s.I)({id:"theme.docs.sidebar.closeSidebarButtonAriaLabel",message:"Close navigation bar",description:"The ARIA label for close button of mobile sidebar"}),className:"clean-btn navbar-sidebar__close",onClick:()=>e.toggle(),children:(0,u.jsx)(x,{color:"var(--ifm-color-emphasis-600)"})})}function Y(){return(0,u.jsxs)("div",{className:"navbar-sidebar__brand",children:[(0,u.jsx)(W,{}),(0,u.jsx)(G,{className:"margin-right--md"}),(0,u.jsx)(Q,{})]})}var K=n(9960),X=n(4996),J=n(3919);function ee(e,t){return void 0!==e&&void 0!==t&&new RegExp(e,"gi").test(t)}var te=n(9471);function ne(e){let{activeBasePath:t,activeBaseRegex:n,to:r,href:o,label:a,html:i,isDropdownLink:l,prependBaseUrlToHref:s,...c}=e;const d=(0,X.Z)(r),f=(0,X.Z)(t),p=(0,X.Z)(o,{forcePrependBaseUrl:!0}),m=a&&o&&!(0,J.Z)(o),g=i?{dangerouslySetInnerHTML:{__html:i}}:{children:(0,u.jsxs)(u.Fragment,{children:[a,m&&(0,u.jsx)(te.Z,{...l&&{width:12,height:12}})]})};return o?(0,u.jsx)(K.Z,{href:s?p:o,...c,...g}):(0,u.jsx)(K.Z,{to:d,isNavLink:!0,...(t||n)&&{isActive:(e,t)=>n?ee(n,t.pathname):t.pathname.startsWith(f)},...c,...g})}function re(e){let{className:t,isDropdownItem:n=!1,...r}=e;const a=(0,u.jsx)(ne,{className:(0,o.Z)(n?"dropdown__link":"navbar__item navbar__link",t),isDropdownLink:n,...r});return n?(0,u.jsx)("li",{children:a}):a}function oe(e){let{className:t,isDropdownItem:n,...r}=e;return(0,u.jsx)("li",{className:"menu__list-item",children:(0,u.jsx)(ne,{className:(0,o.Z)("menu__link",t),...r})})}function ae(e){let{mobile:t=!1,position:n,...r}=e;const o=t?oe:re;return(0,u.jsx)(o,{...r,activeClassName:r.activeClassName??(t?"menu__link--active":"navbar__link--active")})}var ie=n(6043),le=n(8596),se=n(2263);const ce={dropdownNavbarItemMobile:"dropdownNavbarItemMobile_S0Fm"};function ue(e,t){return e.some((e=>function(e,t){return!!(0,le.Mg)(e.to,t)||!!ee(e.activeBaseRegex,t)||!(!e.activeBasePath||!t.startsWith(e.activeBasePath))}(e,t)))}function de(e){let{items:t,position:n,className:a,onClick:i,...l}=e;const s=(0,r.useRef)(null),[c,d]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{const e=e=>{s.current&&!s.current.contains(e.target)&&d(!1)};return document.addEventListener("mousedown",e),document.addEventListener("touchstart",e),document.addEventListener("focusin",e),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e),document.removeEventListener("focusin",e)}}),[s]),(0,u.jsxs)("div",{ref:s,className:(0,o.Z)("navbar__item","dropdown","dropdown--hoverable",{"dropdown--right":"right"===n,"dropdown--show":c}),children:[(0,u.jsx)(ne,{"aria-haspopup":"true","aria-expanded":c,role:"button",href:l.to?void 0:"#",className:(0,o.Z)("navbar__link",a),...l,onClick:l.to?void 0:e=>e.preventDefault(),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),d(!c))},children:l.children??l.label}),(0,u.jsx)("ul",{className:"dropdown__menu",children:t.map(((e,t)=>(0,r.createElement)(Ce,{isDropdownItem:!0,activeClassName:"dropdown__link--active",...e,key:t})))})]})}function fe(e){let{items:t,className:n,position:a,onClick:i,...s}=e;const c=function(){const{siteConfig:{baseUrl:e}}=(0,se.Z)(),{pathname:t}=(0,l.TH)();return t.replace(e,"/")}(),d=ue(t,c),{collapsed:f,toggleCollapsed:p,setCollapsed:m}=(0,ie.u)({initialState:()=>!d});return(0,r.useEffect)((()=>{d&&m(!d)}),[c,d,m]),(0,u.jsxs)("li",{className:(0,o.Z)("menu__list-item",{"menu__list-item--collapsed":f}),children:[(0,u.jsx)(ne,{role:"button",className:(0,o.Z)(ce.dropdownNavbarItemMobile,"menu__link menu__link--sublist menu__link--sublist-caret",n),...s,onClick:e=>{e.preventDefault(),p()},children:s.children??s.label}),(0,u.jsx)(ie.z,{lazy:!0,as:"ul",className:"menu__list",collapsed:f,children:t.map(((e,t)=>(0,r.createElement)(Ce,{mobile:!0,isDropdownItem:!0,onClick:i,activeClassName:"menu__link--active",...e,key:t})))})]})}function pe(e){let{mobile:t=!1,...n}=e;const r=t?fe:de;return(0,u.jsx)(r,{...n})}var me=n(4711);function ge(e){let{width:t=20,height:n=20,...r}=e;return(0,u.jsx)("svg",{viewBox:"0 0 24 24",width:t,height:n,"aria-hidden":!0,...r,children:(0,u.jsx)("path",{fill:"currentColor",d:"M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"})})}const he="iconLanguage_nlXk";const be=()=>null,ye={navbarSearchContainer:"navbarSearchContainer_Bca1"};function ve(e){let{children:t,className:n}=e;return(0,u.jsx)("div",{className:(0,o.Z)(n,ye.navbarSearchContainer),children:t})}var ke=n(143),we=n(3438);var xe=n(373);const Se=e=>e.docs.find((t=>t.id===e.mainDocId));const Ee={default:ae,localeDropdown:function(e){let{mobile:t,dropdownItemsBefore:n,dropdownItemsAfter:r,queryString:o="",...a}=e;const{i18n:{currentLocale:i,locales:c,localeConfigs:d}}=(0,se.Z)(),f=(0,me.l)(),{search:p,hash:m}=(0,l.TH)(),g=[...n,...c.map((e=>{const n=`${`pathname://${f.createUrl({locale:e,fullyQualified:!1})}`}${p}${m}${o}`;return{label:d[e].label,lang:d[e].htmlLang,to:n,target:"_self",autoAddBaseUrl:!1,className:e===i?t?"menu__link--active":"dropdown__link--active":""}})),...r],h=t?(0,s.I)({message:"Languages",id:"theme.navbar.mobileLanguageDropdown.label",description:"The label for the mobile language switcher dropdown"}):d[i].label;return(0,u.jsx)(pe,{...a,mobile:t,label:(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(ge,{className:he}),h]}),items:g})},search:function(e){let{mobile:t,className:n}=e;return t?null:(0,u.jsx)(ve,{className:n,children:(0,u.jsx)(be,{})})},dropdown:pe,html:function(e){let{value:t,className:n,mobile:r=!1,isDropdownItem:a=!1}=e;const i=a?"li":"div";return(0,u.jsx)(i,{className:(0,o.Z)({navbar__item:!r&&!a,"menu__list-item":r},n),dangerouslySetInnerHTML:{__html:t}})},doc:function(e){let{docId:t,label:n,docsPluginId:r,...o}=e;const{activeDoc:a}=(0,ke.Iw)(r),i=(0,we.vY)(t,r),l=a?.path===i?.path;return null===i||i.unlisted&&!l?null:(0,u.jsx)(ae,{exact:!0,...o,isActive:()=>l||!!a?.sidebar&&a.sidebar===i.sidebar,label:n??i.id,to:i.path})},docSidebar:function(e){let{sidebarId:t,label:n,docsPluginId:r,...o}=e;const{activeDoc:a}=(0,ke.Iw)(r),i=(0,we.oz)(t,r).link;if(!i)throw new Error(`DocSidebarNavbarItem: Sidebar with ID "${t}" doesn't have anything to be linked to.`);return(0,u.jsx)(ae,{exact:!0,...o,isActive:()=>a?.sidebar===t,label:n??i.label,to:i.path})},docsVersion:function(e){let{label:t,to:n,docsPluginId:r,...o}=e;const a=(0,we.lO)(r)[0],i=t??a.label,l=n??(e=>e.docs.find((t=>t.id===e.mainDocId)))(a).path;return(0,u.jsx)(ae,{...o,label:i,to:l})},docsVersionDropdown:function(e){let{mobile:t,docsPluginId:n,dropdownActiveClassDisabled:r,dropdownItemsBefore:o,dropdownItemsAfter:a,...i}=e;const{search:c,hash:d}=(0,l.TH)(),f=(0,ke.Iw)(n),p=(0,ke.gB)(n),{savePreferredVersionName:m}=(0,xe.J)(n),g=[...o,...p.map((e=>{const t=f.alternateDocVersions[e.name]??Se(e);return{label:e.label,to:`${t.path}${c}${d}`,isActive:()=>e===f.activeVersion,onClick:()=>m(e.name)}})),...a],h=(0,we.lO)(n)[0],b=t&&g.length>1?(0,s.I)({id:"theme.navbar.mobileVersionsDropdown.label",message:"Versions",description:"The label for the navbar versions dropdown on mobile view"}):h.label,y=t&&g.length>1?void 0:Se(h).path;return g.length<=1?(0,u.jsx)(ae,{...i,mobile:t,label:b,to:y,isActive:r?()=>!1:void 0}):(0,u.jsx)(pe,{...i,mobile:t,label:b,to:y,items:g,isActive:r?()=>!1:void 0})}};function Ce(e){let{type:t,...n}=e;const r=function(e,t){return e&&"default"!==e?e:"items"in t?"dropdown":"default"}(t,n),o=Ee[r];if(!o)throw new Error(`No NavbarItem component found for type "${t}".`);return(0,u.jsx)(o,{...n})}function _e(){const e=(0,L.e)(),t=(0,k.L)().navbar.items;return(0,u.jsx)("ul",{className:"menu__list",children:t.map(((t,n)=>(0,r.createElement)(Ce,{mobile:!0,...t,onClick:()=>e.toggle(),key:n})))})}function Te(e){return(0,u.jsx)("button",{...e,type:"button",className:"clean-btn navbar-sidebar__back",children:(0,u.jsx)(s.Z,{id:"theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel",description:"The label of the back button to return to main menu, inside the mobile navbar sidebar secondary menu (notably used to display the docs sidebar)",children:"\u2190 Back to main menu"})})}function je(){const e=0===(0,k.L)().navbar.items.length,t=I();return(0,u.jsxs)(u.Fragment,{children:[!e&&(0,u.jsx)(Te,{onClick:()=>t.hide()}),t.content]})}function Le(){const e=(0,L.e)();var t;return void 0===(t=e.shown)&&(t=!0),(0,r.useEffect)((()=>(document.body.style.overflow=t?"hidden":"visible",()=>{document.body.style.overflow="visible"})),[t]),e.shouldRender?(0,u.jsx)(F,{header:(0,u.jsx)(Y,{}),primaryMenu:(0,u.jsx)(_e,{}),secondaryMenu:(0,u.jsx)(je,{})}):null}const Ae={navbarHideable:"navbarHideable_m1mJ",navbarHidden:"navbarHidden_jGov"};function Ne(e){return(0,u.jsx)("div",{role:"presentation",...e,className:(0,o.Z)("navbar-sidebar__backdrop",e.className)})}function Re(e){let{children:t}=e;const{navbar:{hideOnScroll:n,style:a}}=(0,k.L)(),i=(0,L.e)(),{navbarRef:l,isNavbarVisible:d}=function(e){const[t,n]=(0,r.useState)(e),o=(0,r.useRef)(!1),a=(0,r.useRef)(0),i=(0,r.useCallback)((e=>{null!==e&&(a.current=e.getBoundingClientRect().height)}),[]);return(0,A.RF)(((t,r)=>{let{scrollY:i}=t;if(!e)return;if(i=l?n(!1):i+c{if(!e)return;const r=t.location.hash;if(r?document.getElementById(r.substring(1)):void 0)return o.current=!0,void n(!1);n(!0)})),{navbarRef:i,isNavbarVisible:t}}(n);return(0,u.jsxs)("nav",{ref:l,"aria-label":(0,s.I)({id:"theme.NavBar.navAriaLabel",message:"Main",description:"The ARIA label for the main navigation"}),className:(0,o.Z)("navbar","navbar--fixed-top",n&&[Ae.navbarHideable,!d&&Ae.navbarHidden],{"navbar--dark":"dark"===a,"navbar--primary":"primary"===a,"navbar-sidebar--show":i.shown}),children:[t,(0,u.jsx)(Ne,{onClick:i.toggle}),(0,u.jsx)(Le,{})]})}var Pe=n(9690);const Oe="right";function De(e){let{width:t=30,height:n=30,className:r,...o}=e;return(0,u.jsx)("svg",{className:r,width:t,height:n,viewBox:"0 0 30 30","aria-hidden":"true",...o,children:(0,u.jsx)("path",{stroke:"currentColor",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"2",d:"M4 7h22M4 15h22M4 23h22"})})}function Ie(){const{toggle:e,shown:t}=(0,L.e)();return(0,u.jsx)("button",{onClick:e,"aria-label":(0,s.I)({id:"theme.docs.sidebar.toggleSidebarButtonAriaLabel",message:"Toggle navigation bar",description:"The ARIA label for hamburger menu button of mobile navigation"}),"aria-expanded":t,className:"navbar__toggle clean-btn",type:"button",children:(0,u.jsx)(De,{})})}const Fe={colorModeToggle:"colorModeToggle_DEke"};function Me(e){let{items:t}=e;return(0,u.jsx)(u.Fragment,{children:t.map(((e,t)=>(0,u.jsx)(Pe.QW,{onError:t=>new Error(`A theme navbar item failed to render.\nPlease double-check the following navbar item (themeConfig.navbar.items) of your Docusaurus config:\n${JSON.stringify(e,null,2)}`,{cause:t}),children:(0,u.jsx)(Ce,{...e})},t)))})}function ze(e){let{left:t,right:n}=e;return(0,u.jsxs)("div",{className:"navbar__inner",children:[(0,u.jsx)("div",{className:"navbar__items",children:t}),(0,u.jsx)("div",{className:"navbar__items navbar__items--right",children:n})]})}function Be(){const e=(0,L.e)(),t=(0,k.L)().navbar.items,[n,r]=function(e){function t(e){return"left"===(e.position??Oe)}return[e.filter(t),e.filter((e=>!t(e)))]}(t),o=t.find((e=>"search"===e.type));return(0,u.jsx)(ze,{left:(0,u.jsxs)(u.Fragment,{children:[!e.disabled&&(0,u.jsx)(Ie,{}),(0,u.jsx)(W,{}),(0,u.jsx)(Me,{items:n})]}),right:(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(Me,{items:r}),(0,u.jsx)(G,{className:Fe.colorModeToggle}),!o&&(0,u.jsx)(ve,{children:(0,u.jsx)(be,{})})]})})}function $e(){return(0,u.jsx)(Re,{children:(0,u.jsx)(Be,{})})}function Ue(e){let{item:t}=e;const{to:n,href:r,label:o,prependBaseUrlToHref:a,...i}=t,l=(0,X.Z)(n),s=(0,X.Z)(r,{forcePrependBaseUrl:!0});return(0,u.jsxs)(K.Z,{className:"footer__link-item",...r?{href:a?s:r}:{to:l},...i,children:[o,r&&!(0,J.Z)(r)&&(0,u.jsx)(te.Z,{})]})}function qe(e){let{item:t}=e;return t.html?(0,u.jsx)("li",{className:"footer__item",dangerouslySetInnerHTML:{__html:t.html}}):(0,u.jsx)("li",{className:"footer__item",children:(0,u.jsx)(Ue,{item:t})},t.href??t.to)}function He(e){let{column:t}=e;return(0,u.jsxs)("div",{className:"col footer__col",children:[(0,u.jsx)("div",{className:"footer__title",children:t.title}),(0,u.jsx)("ul",{className:"footer__items clean-list",children:t.items.map(((e,t)=>(0,u.jsx)(qe,{item:e},t)))})]})}function Ze(e){let{columns:t}=e;return(0,u.jsx)("div",{className:"row footer__links",children:t.map(((e,t)=>(0,u.jsx)(He,{column:e},t)))})}function Ge(){return(0,u.jsx)("span",{className:"footer__link-separator",children:"\xb7"})}function Ve(e){let{item:t}=e;return t.html?(0,u.jsx)("span",{className:"footer__link-item",dangerouslySetInnerHTML:{__html:t.html}}):(0,u.jsx)(Ue,{item:t})}function We(e){let{links:t}=e;return(0,u.jsx)("div",{className:"footer__links text--center",children:(0,u.jsx)("div",{className:"footer__links",children:t.map(((e,n)=>(0,u.jsxs)(r.Fragment,{children:[(0,u.jsx)(Ve,{item:e}),t.length!==n+1&&(0,u.jsx)(Ge,{})]},n)))})})}function Qe(e){let{links:t}=e;return function(e){return"title"in e[0]}(t)?(0,u.jsx)(Ze,{columns:t}):(0,u.jsx)(We,{links:t})}var Ye=n(9965);const Ke={footerLogoLink:"footerLogoLink_BH7S"};function Xe(e){let{logo:t}=e;const{withBaseUrl:n}=(0,X.C)(),r={light:n(t.src),dark:n(t.srcDark??t.src)};return(0,u.jsx)(Ye.Z,{className:(0,o.Z)("footer__logo",t.className),alt:t.alt,sources:r,width:t.width,height:t.height,style:t.style})}function Je(e){let{logo:t}=e;return t.href?(0,u.jsx)(K.Z,{href:t.href,className:Ke.footerLogoLink,target:t.target,children:(0,u.jsx)(Xe,{logo:t})}):(0,u.jsx)(Xe,{logo:t})}function et(e){let{copyright:t}=e;return(0,u.jsx)("div",{className:"footer__copyright",dangerouslySetInnerHTML:{__html:t}})}function tt(e){let{style:t,links:n,logo:r,copyright:a}=e;return(0,u.jsx)("footer",{className:(0,o.Z)("footer",{"footer--dark":"dark"===t}),children:(0,u.jsxs)("div",{className:"container container-fluid",children:[n,(r||a)&&(0,u.jsxs)("div",{className:"footer__bottom text--center",children:[r&&(0,u.jsx)("div",{className:"margin-bottom--sm",children:r}),a]})]})})}function nt(){const{footer:e}=(0,k.L)();if(!e)return null;const{copyright:t,links:n,logo:r,style:o}=e;return(0,u.jsx)(tt,{style:o,links:n&&n.length>0&&(0,u.jsx)(Qe,{links:n}),logo:r&&(0,u.jsx)(Je,{logo:r}),copyright:t&&(0,u.jsx)(et,{copyright:t})})}const rt=r.memo(nt),ot=(0,N.Qc)([M.S,w.pl,A.OC,xe.L5,i.VC,function(e){let{children:t}=e;return(0,u.jsx)(R.n2,{children:(0,u.jsx)(L.M,{children:(0,u.jsx)(O,{children:t})})})}]);function at(e){let{children:t}=e;return(0,u.jsx)(ot,{children:t})}var it=n(2503);function lt(e){let{error:t,tryAgain:n}=e;return(0,u.jsx)("main",{className:"container margin-vert--xl",children:(0,u.jsx)("div",{className:"row",children:(0,u.jsxs)("div",{className:"col col--6 col--offset-3",children:[(0,u.jsx)(it.Z,{as:"h1",className:"hero__title",children:(0,u.jsx)(s.Z,{id:"theme.ErrorPageContent.title",description:"The title of the fallback page when the page crashed",children:"This page crashed."})}),(0,u.jsx)("div",{className:"margin-vert--lg",children:(0,u.jsx)(Pe.Cw,{onClick:n,className:"button button--primary shadow--lw"})}),(0,u.jsx)("hr",{}),(0,u.jsx)("div",{className:"margin-vert--md",children:(0,u.jsx)(Pe.aG,{error:t})})]})})})}const st={mainWrapper:"mainWrapper_z2l0"};function ct(e){const{children:t,noFooter:n,wrapperClassName:r,title:l,description:s}=e;return(0,b.t)(),(0,u.jsxs)(at,{children:[(0,u.jsx)(i.d,{title:l,description:s}),(0,u.jsx)(v,{}),(0,u.jsx)(j,{}),(0,u.jsx)($e,{}),(0,u.jsx)("div",{id:d,className:(0,o.Z)(h.k.wrapper.main,st.mainWrapper,r),children:(0,u.jsx)(a.Z,{fallback:e=>(0,u.jsx)(lt,{...e}),children:t})}),!n&&(0,u.jsx)(rt,{})]})}},1327:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});n(7294);var r=n(9960),o=n(4996),a=n(2263),i=n(6668),l=n(9965),s=n(5893);function c(e){let{logo:t,alt:n,imageClassName:r}=e;const a={light:(0,o.Z)(t.src),dark:(0,o.Z)(t.srcDark||t.src)},i=(0,s.jsx)(l.Z,{className:t.className,sources:a,height:t.height,width:t.width,alt:n,style:t.style});return r?(0,s.jsx)("div",{className:r,children:i}):i}function u(e){const{siteConfig:{title:t}}=(0,a.Z)(),{navbar:{title:n,logo:l}}=(0,i.L)(),{imageClassName:u,titleClassName:d,...f}=e,p=(0,o.Z)(l?.href||"/"),m=n?"":t,g=l?.alt??m;return(0,s.jsxs)(r.Z,{to:p,...f,...l?.target&&{target:l.target},children:[l&&(0,s.jsx)(c,{logo:l,alt:g,imageClassName:u}),null!=n&&(0,s.jsx)("b",{className:d,children:n})]})}},197:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});n(7294);var r=n(5742),o=n(5893);function a(e){let{locale:t,version:n,tag:a}=e;const i=t;return(0,o.jsxs)(r.Z,{children:[t&&(0,o.jsx)("meta",{name:"docusaurus_locale",content:t}),n&&(0,o.jsx)("meta",{name:"docusaurus_version",content:n}),a&&(0,o.jsx)("meta",{name:"docusaurus_tag",content:a}),i&&(0,o.jsx)("meta",{name:"docsearch:language",content:i}),n&&(0,o.jsx)("meta",{name:"docsearch:version",content:n}),a&&(0,o.jsx)("meta",{name:"docsearch:docusaurus_tag",content:a})]})}},9965:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(7294),o=n(512),a=n(2389),i=n(2949);const l={themedComponent:"themedComponent_mlkZ","themedComponent--light":"themedComponent--light_NVdE","themedComponent--dark":"themedComponent--dark_xIcU"};var s=n(5893);function c(e){let{className:t,children:n}=e;const c=(0,a.Z)(),{colorMode:u}=(0,i.I)();return(0,s.jsx)(s.Fragment,{children:(c?"dark"===u?["dark"]:["light"]:["light","dark"]).map((e=>{const a=n({theme:e,className:(0,o.Z)(t,l.themedComponent,l[`themedComponent--${e}`])});return(0,s.jsx)(r.Fragment,{children:a},e)}))})}function u(e){const{sources:t,className:n,alt:r,...o}=e;return(0,s.jsx)(c,{className:n,children:e=>{let{theme:n,className:a}=e;return(0,s.jsx)("img",{src:t[n],alt:r,className:a,...o})}})}},6043:(e,t,n)=>{"use strict";n.d(t,{u:()=>c,z:()=>b});var r=n(7294),o=n(412),a=n(469),i=n(1442),l=n(5893);const s="ease-in-out";function c(e){let{initialState:t}=e;const[n,o]=(0,r.useState)(t??!1),a=(0,r.useCallback)((()=>{o((e=>!e))}),[]);return{collapsed:n,setCollapsed:o,toggleCollapsed:a}}const u={display:"none",overflow:"hidden",height:"0px"},d={display:"block",overflow:"visible",height:"auto"};function f(e,t){const n=t?u:d;e.style.display=n.display,e.style.overflow=n.overflow,e.style.height=n.height}function p(e){let{collapsibleRef:t,collapsed:n,animation:o}=e;const a=(0,r.useRef)(!1);(0,r.useEffect)((()=>{const e=t.current;function r(){const t=e.scrollHeight,n=o?.duration??function(e){if((0,i.n)())return 1;const t=e/36;return Math.round(10*(4+15*t**.25+t/5))}(t);return{transition:`height ${n}ms ${o?.easing??s}`,height:`${t}px`}}function l(){const t=r();e.style.transition=t.transition,e.style.height=t.height}if(!a.current)return f(e,n),void(a.current=!0);return e.style.willChange="height",function(){const t=requestAnimationFrame((()=>{n?(l(),requestAnimationFrame((()=>{e.style.height=u.height,e.style.overflow=u.overflow}))):(e.style.display="block",requestAnimationFrame((()=>{l()})))}));return()=>cancelAnimationFrame(t)}()}),[t,n,o])}function m(e){if(!o.Z.canUseDOM)return e?u:d}function g(e){let{as:t="div",collapsed:n,children:o,animation:a,onCollapseTransitionEnd:i,className:s,disableSSRStyle:c}=e;const u=(0,r.useRef)(null);return p({collapsibleRef:u,collapsed:n,animation:a}),(0,l.jsx)(t,{ref:u,style:c?void 0:m(n),onTransitionEnd:e=>{"height"===e.propertyName&&(f(u.current,n),i?.(n))},className:s,children:o})}function h(e){let{collapsed:t,...n}=e;const[o,i]=(0,r.useState)(!t),[s,c]=(0,r.useState)(t);return(0,a.Z)((()=>{t||i(!0)}),[t]),(0,a.Z)((()=>{o&&c(t)}),[o,t]),o?(0,l.jsx)(g,{...n,collapsed:s}):null}function b(e){let{lazy:t,...n}=e;const r=t?h:g;return(0,l.jsx)(r,{...n})}},9689:(e,t,n)=>{"use strict";n.d(t,{nT:()=>g,pl:()=>m});var r=n(7294),o=n(2389),a=n(12),i=n(902),l=n(6668),s=n(5893);const c=(0,a.WA)("docusaurus.announcement.dismiss"),u=(0,a.WA)("docusaurus.announcement.id"),d=()=>"true"===c.get(),f=e=>c.set(String(e)),p=r.createContext(null);function m(e){let{children:t}=e;const n=function(){const{announcementBar:e}=(0,l.L)(),t=(0,o.Z)(),[n,a]=(0,r.useState)((()=>!!t&&d()));(0,r.useEffect)((()=>{a(d())}),[]);const i=(0,r.useCallback)((()=>{f(!0),a(!0)}),[]);return(0,r.useEffect)((()=>{if(!e)return;const{id:t}=e;let n=u.get();"annoucement-bar"===n&&(n="announcement-bar");const r=t!==n;u.set(t),r&&f(!1),!r&&d()||a(!1)}),[e]),(0,r.useMemo)((()=>({isActive:!!e&&!n,close:i})),[e,n,i])}();return(0,s.jsx)(p.Provider,{value:n,children:t})}function g(){const e=(0,r.useContext)(p);if(!e)throw new i.i6("AnnouncementBarProvider");return e}},2949:(e,t,n)=>{"use strict";n.d(t,{I:()=>b,S:()=>h});var r=n(7294),o=n(412),a=n(902),i=n(12),l=n(6668),s=n(5893);const c=r.createContext(void 0),u="theme",d=(0,i.WA)(u),f={light:"light",dark:"dark"},p=e=>e===f.dark?f.dark:f.light,m=e=>o.Z.canUseDOM?p(document.documentElement.getAttribute("data-theme")):p(e),g=e=>{d.set(p(e))};function h(e){let{children:t}=e;const n=function(){const{colorMode:{defaultMode:e,disableSwitch:t,respectPrefersColorScheme:n}}=(0,l.L)(),[o,a]=(0,r.useState)(m(e));(0,r.useEffect)((()=>{t&&d.del()}),[t]);const i=(0,r.useCallback)((function(t,r){void 0===r&&(r={});const{persist:o=!0}=r;t?(a(t),o&&g(t)):(a(n?window.matchMedia("(prefers-color-scheme: dark)").matches?f.dark:f.light:e),d.del())}),[n,e]);(0,r.useEffect)((()=>{document.documentElement.setAttribute("data-theme",p(o))}),[o]),(0,r.useEffect)((()=>{if(t)return;const e=e=>{if(e.key!==u)return;const t=d.get();null!==t&&i(p(t))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)}),[t,i]);const s=(0,r.useRef)(!1);return(0,r.useEffect)((()=>{if(t&&!n)return;const e=window.matchMedia("(prefers-color-scheme: dark)"),r=()=>{window.matchMedia("print").matches||s.current?s.current=window.matchMedia("print").matches:i(null)};return e.addListener(r),()=>e.removeListener(r)}),[i,t,n]),(0,r.useMemo)((()=>({colorMode:o,setColorMode:i,get isDarkTheme(){return o===f.dark},setLightTheme(){i(f.light)},setDarkTheme(){i(f.dark)}})),[o,i])}();return(0,s.jsx)(c.Provider,{value:n,children:t})}function b(){const e=(0,r.useContext)(c);if(null==e)throw new a.i6("ColorModeProvider","Please see https://docusaurus.io/docs/api/themes/configuration#use-color-mode.");return e}},373:(e,t,n)=>{"use strict";n.d(t,{J:()=>v,L5:()=>b});var r=n(7294),o=n(143),a=n(9935),i=n(6668),l=n(3438),s=n(902),c=n(12),u=n(5893);const d=e=>`docs-preferred-version-${e}`,f={save:(e,t,n)=>{(0,c.WA)(d(e),{persistence:t}).set(n)},read:(e,t)=>(0,c.WA)(d(e),{persistence:t}).get(),clear:(e,t)=>{(0,c.WA)(d(e),{persistence:t}).del()}},p=e=>Object.fromEntries(e.map((e=>[e,{preferredVersionName:null}])));const m=r.createContext(null);function g(){const e=(0,o._r)(),t=(0,i.L)().docs.versionPersistence,n=(0,r.useMemo)((()=>Object.keys(e)),[e]),[a,l]=(0,r.useState)((()=>p(n)));(0,r.useEffect)((()=>{l(function(e){let{pluginIds:t,versionPersistence:n,allDocsData:r}=e;function o(e){const t=f.read(e,n);return r[e].versions.some((e=>e.name===t))?{preferredVersionName:t}:(f.clear(e,n),{preferredVersionName:null})}return Object.fromEntries(t.map((e=>[e,o(e)])))}({allDocsData:e,versionPersistence:t,pluginIds:n}))}),[e,t,n]);return[a,(0,r.useMemo)((()=>({savePreferredVersion:function(e,n){f.save(e,t,n),l((t=>({...t,[e]:{preferredVersionName:n}})))}})),[t])]}function h(e){let{children:t}=e;const n=g();return(0,u.jsx)(m.Provider,{value:n,children:t})}function b(e){let{children:t}=e;return l.cE?(0,u.jsx)(h,{children:t}):(0,u.jsx)(u.Fragment,{children:t})}function y(){const e=(0,r.useContext)(m);if(!e)throw new s.i6("DocsPreferredVersionContextProvider");return e}function v(e){void 0===e&&(e=a.m);const t=(0,o.zh)(e),[n,i]=y(),{preferredVersionName:l}=n[e];return{preferredVersion:t.versions.find((e=>e.name===l))??null,savePreferredVersionName:(0,r.useCallback)((t=>{i.savePreferredVersion(e,t)}),[i,e])}}},1116:(e,t,n)=>{"use strict";n.d(t,{V:()=>c,b:()=>s});var r=n(7294),o=n(902),a=n(5893);const i=Symbol("EmptyContext"),l=r.createContext(i);function s(e){let{children:t,name:n,items:o}=e;const i=(0,r.useMemo)((()=>n&&o?{name:n,items:o}:null),[n,o]);return(0,a.jsx)(l.Provider,{value:i,children:t})}function c(){const e=(0,r.useContext)(l);if(e===i)throw new o.i6("DocsSidebarProvider");return e}},4477:(e,t,n)=>{"use strict";n.d(t,{E:()=>s,q:()=>l});var r=n(7294),o=n(902),a=n(5893);const i=r.createContext(null);function l(e){let{children:t,version:n}=e;return(0,a.jsx)(i.Provider,{value:n,children:t})}function s(){const e=(0,r.useContext)(i);if(null===e)throw new o.i6("DocsVersionProvider");return e}},3163:(e,t,n)=>{"use strict";n.d(t,{M:()=>f,e:()=>p});var r=n(7294),o=n(3102),a=n(7524),i=n(1980),l=n(6668),s=n(902),c=n(5893);const u=r.createContext(void 0);function d(){const e=function(){const e=(0,o.HY)(),{items:t}=(0,l.L)().navbar;return 0===t.length&&!e.component}(),t=(0,a.i)(),n=!e&&"mobile"===t,[s,c]=(0,r.useState)(!1);(0,i.Rb)((()=>{if(s)return c(!1),!1}));const u=(0,r.useCallback)((()=>{c((e=>!e))}),[]);return(0,r.useEffect)((()=>{"desktop"===t&&c(!1)}),[t]),(0,r.useMemo)((()=>({disabled:e,shouldRender:n,toggle:u,shown:s})),[e,n,u,s])}function f(e){let{children:t}=e;const n=d();return(0,c.jsx)(u.Provider,{value:n,children:t})}function p(){const e=r.useContext(u);if(void 0===e)throw new s.i6("NavbarMobileSidebarProvider");return e}},3102:(e,t,n)=>{"use strict";n.d(t,{HY:()=>s,Zo:()=>c,n2:()=>l});var r=n(7294),o=n(902),a=n(5893);const i=r.createContext(null);function l(e){let{children:t}=e;const n=(0,r.useState)({component:null,props:null});return(0,a.jsx)(i.Provider,{value:n,children:t})}function s(){const e=(0,r.useContext)(i);if(!e)throw new o.i6("NavbarSecondaryMenuContentProvider");return e[0]}function c(e){let{component:t,props:n}=e;const a=(0,r.useContext)(i);if(!a)throw new o.i6("NavbarSecondaryMenuContentProvider");const[,l]=a,s=(0,o.Ql)(n);return(0,r.useEffect)((()=>{l({component:t,props:s})}),[l,t,s]),(0,r.useEffect)((()=>()=>l({component:null,props:null})),[l]),null}},9727:(e,t,n)=>{"use strict";n.d(t,{h:()=>o,t:()=>a});var r=n(7294);const o="navigation-with-keyboard";function a(){(0,r.useEffect)((()=>{function e(e){"keydown"===e.type&&"Tab"===e.key&&document.body.classList.add(o),"mousedown"===e.type&&document.body.classList.remove(o)}return document.addEventListener("keydown",e),document.addEventListener("mousedown",e),()=>{document.body.classList.remove(o),document.removeEventListener("keydown",e),document.removeEventListener("mousedown",e)}}),[])}},7524:(e,t,n)=>{"use strict";n.d(t,{i:()=>l});var r=n(7294),o=n(412);const a={desktop:"desktop",mobile:"mobile",ssr:"ssr"},i=996;function l(){const[e,t]=(0,r.useState)((()=>"ssr"));return(0,r.useEffect)((()=>{function e(){t(function(){if(!o.Z.canUseDOM)throw new Error("getWindowSize() should only be called after React hydration");return window.innerWidth>i?a.desktop:a.mobile}())}return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]),e}},5281:(e,t,n)=>{"use strict";n.d(t,{k:()=>r});const r={page:{blogListPage:"blog-list-page",blogPostPage:"blog-post-page",blogTagsListPage:"blog-tags-list-page",blogTagPostListPage:"blog-tags-post-list-page",docsDocPage:"docs-doc-page",docsTagsListPage:"docs-tags-list-page",docsTagDocListPage:"docs-tags-doc-list-page",mdxPage:"mdx-page"},wrapper:{main:"main-wrapper",blogPages:"blog-wrapper",docsPages:"docs-wrapper",mdxPages:"mdx-wrapper"},common:{editThisPage:"theme-edit-this-page",lastUpdated:"theme-last-updated",backToTopButton:"theme-back-to-top-button",codeBlock:"theme-code-block",admonition:"theme-admonition",unlistedBanner:"theme-unlisted-banner",admonitionType:e=>`theme-admonition-${e}`},layout:{},docs:{docVersionBanner:"theme-doc-version-banner",docVersionBadge:"theme-doc-version-badge",docBreadcrumbs:"theme-doc-breadcrumbs",docMarkdown:"theme-doc-markdown",docTocMobile:"theme-doc-toc-mobile",docTocDesktop:"theme-doc-toc-desktop",docFooter:"theme-doc-footer",docFooterTagsRow:"theme-doc-footer-tags-row",docFooterEditMetaRow:"theme-doc-footer-edit-meta-row",docSidebarContainer:"theme-doc-sidebar-container",docSidebarMenu:"theme-doc-sidebar-menu",docSidebarItemCategory:"theme-doc-sidebar-item-category",docSidebarItemLink:"theme-doc-sidebar-item-link",docSidebarItemCategoryLevel:e=>`theme-doc-sidebar-item-category-level-${e}`,docSidebarItemLinkLevel:e=>`theme-doc-sidebar-item-link-level-${e}`},blog:{}}},1442:(e,t,n)=>{"use strict";function r(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}n.d(t,{n:()=>r})},3438:(e,t,n)=>{"use strict";n.d(t,{LM:()=>m,MN:()=>T,SN:()=>_,_F:()=>y,cE:()=>f,f:()=>k,jA:()=>g,lO:()=>S,oz:()=>E,s1:()=>x,vY:()=>C,xz:()=>p});var r=n(7294),o=n(6550),a=n(8790),i=n(143),l=n(373),s=n(4477),c=n(1116),u=n(7392),d=n(8596);const f=!!i._r;function p(e){const t=(0,s.E)();if(!e)return;const n=t.docs[e];if(!n)throw new Error(`no version doc found by id=${e}`);return n}function m(e){return"link"!==e.type||e.unlisted?"category"===e.type?function(e){if(e.href&&!e.linkUnlisted)return e.href;for(const t of e.items){const e=m(t);if(e)return e}}(e):void 0:e.href}function g(){const{pathname:e}=(0,o.TH)(),t=(0,c.V)();if(!t)throw new Error("Unexpected: cant find current sidebar in context");const n=w({sidebarItems:t.items,pathname:e,onlyCategories:!0}).slice(-1)[0];if(!n)throw new Error(`${e} is not associated with a category. useCurrentSidebarCategory() should only be used on category index pages.`);return n}const h=(e,t)=>void 0!==e&&(0,d.Mg)(e,t),b=(e,t)=>e.some((e=>y(e,t)));function y(e,t){return"link"===e.type?h(e.href,t):"category"===e.type&&(h(e.href,t)||b(e.items,t))}function v(e,t){switch(e.type){case"category":return y(e,t)||e.items.some((e=>v(e,t)));case"link":return!e.unlisted||y(e,t);default:return!0}}function k(e,t){return(0,r.useMemo)((()=>e.filter((e=>v(e,t)))),[e,t])}function w(e){let{sidebarItems:t,pathname:n,onlyCategories:r=!1}=e;const o=[];return function e(t){for(const a of t)if("category"===a.type&&((0,d.Mg)(a.href,n)||e(a.items))||"link"===a.type&&(0,d.Mg)(a.href,n)){return r&&"category"!==a.type||o.unshift(a),!0}return!1}(t),o}function x(){const e=(0,c.V)(),{pathname:t}=(0,o.TH)(),n=(0,i.gA)()?.pluginData.breadcrumbs;return!1!==n&&e?w({sidebarItems:e.items,pathname:t}):null}function S(e){const{activeVersion:t}=(0,i.Iw)(e),{preferredVersion:n}=(0,l.J)(e),o=(0,i.yW)(e);return(0,r.useMemo)((()=>(0,u.j)([t,n,o].filter(Boolean))),[t,n,o])}function E(e,t){const n=S(t);return(0,r.useMemo)((()=>{const t=n.flatMap((e=>e.sidebars?Object.entries(e.sidebars):[])),r=t.find((t=>t[0]===e));if(!r)throw new Error(`Can't find any sidebar with id "${e}" in version${n.length>1?"s":""} ${n.map((e=>e.name)).join(", ")}".\nAvailable sidebar ids are:\n- ${t.map((e=>e[0])).join("\n- ")}`);return r[1]}),[e,n])}function C(e,t){const n=S(t);return(0,r.useMemo)((()=>{const t=n.flatMap((e=>e.docs)),r=t.find((t=>t.id===e));if(!r){if(n.flatMap((e=>e.draftIds)).includes(e))return null;throw new Error(`Couldn't find any doc with id "${e}" in version${n.length>1?"s":""} "${n.map((e=>e.name)).join(", ")}".\nAvailable doc ids are:\n- ${(0,u.j)(t.map((e=>e.id))).join("\n- ")}`)}return r}),[e,n])}function _(e){let{route:t}=e;const n=(0,o.TH)(),r=(0,s.E)(),i=t.routes,l=i.find((e=>(0,o.LX)(n.pathname,e)));if(!l)return null;const c=l.sidebar,u=c?r.docsSidebars[c]:void 0;return{docElement:(0,a.H)(i),sidebarName:c,sidebarItems:u}}function T(e){return e.filter((e=>!("category"===e.type||"link"===e.type)||!!m(e)))}},9690:(e,t,n)=>{"use strict";n.d(t,{aG:()=>u,Ac:()=>c,Cw:()=>s,QW:()=>d});var r=n(7294),o=n(5999),a=n(8780);const i={errorBoundaryError:"errorBoundaryError_a6uf",errorBoundaryFallback:"errorBoundaryFallback_VBag"};var l=n(5893);function s(e){return(0,l.jsx)("button",{type:"button",...e,children:(0,l.jsx)(o.Z,{id:"theme.ErrorPageContent.tryAgain",description:"The label of the button to try again rendering when the React error boundary captures an error",children:"Try again"})})}function c(e){let{error:t,tryAgain:n}=e;return(0,l.jsxs)("div",{className:i.errorBoundaryFallback,children:[(0,l.jsx)("p",{children:t.message}),(0,l.jsx)(s,{onClick:n})]})}function u(e){let{error:t}=e;const n=(0,a.getErrorCausalChain)(t).map((e=>e.message)).join("\n\nCause:\n");return(0,l.jsx)("p",{className:i.errorBoundaryError,children:n})}class d extends r.Component{componentDidCatch(e,t){throw this.props.onError(e,t)}render(){return this.props.children}}},1980:(e,t,n)=>{"use strict";n.d(t,{Rb:()=>i,_X:()=>l});var r=n(7294),o=n(6550),a=n(902);function i(e){!function(e){const t=(0,o.k6)(),n=(0,a.zX)(e);(0,r.useEffect)((()=>t.block(((e,t)=>n(e,t)))),[t,n])}(((t,n)=>{if("POP"===n)return e(t,n)}))}function l(e){return function(e){const t=(0,o.k6)();return(0,r.useSyncExternalStore)(t.listen,(()=>e(t)),(()=>e(t)))}((t=>null===e?null:new URLSearchParams(t.location.search).get(e)))}},7392:(e,t,n)=>{"use strict";function r(e,t){return void 0===t&&(t=(e,t)=>e===t),e.filter(((n,r)=>e.findIndex((e=>t(e,n)))!==r))}function o(e){return Array.from(new Set(e))}n.d(t,{j:()=>o,l:()=>r})},1944:(e,t,n)=>{"use strict";n.d(t,{FG:()=>p,d:()=>d,VC:()=>m});var r=n(7294),o=n(512),a=n(5742),i=n(226);function l(){const e=r.useContext(i._);if(!e)throw new Error("Unexpected: no Docusaurus route context found");return e}var s=n(4996),c=n(2263);var u=n(5893);function d(e){let{title:t,description:n,keywords:r,image:o,children:i}=e;const l=function(e){const{siteConfig:t}=(0,c.Z)(),{title:n,titleDelimiter:r}=t;return e?.trim().length?`${e.trim()} ${r} ${n}`:n}(t),{withBaseUrl:d}=(0,s.C)(),f=o?d(o,{absolute:!0}):void 0;return(0,u.jsxs)(a.Z,{children:[t&&(0,u.jsx)("title",{children:l}),t&&(0,u.jsx)("meta",{property:"og:title",content:l}),n&&(0,u.jsx)("meta",{name:"description",content:n}),n&&(0,u.jsx)("meta",{property:"og:description",content:n}),r&&(0,u.jsx)("meta",{name:"keywords",content:Array.isArray(r)?r.join(","):r}),f&&(0,u.jsx)("meta",{property:"og:image",content:f}),f&&(0,u.jsx)("meta",{name:"twitter:image",content:f}),i]})}const f=r.createContext(void 0);function p(e){let{className:t,children:n}=e;const i=r.useContext(f),l=(0,o.Z)(i,t);return(0,u.jsxs)(f.Provider,{value:l,children:[(0,u.jsx)(a.Z,{children:(0,u.jsx)("html",{className:l})}),n]})}function m(e){let{children:t}=e;const n=l(),r=`plugin-${n.plugin.name.replace(/docusaurus-(?:plugin|theme)-(?:content-)?/gi,"")}`;const a=`plugin-id-${n.plugin.id}`;return(0,u.jsx)(p,{className:(0,o.Z)(r,a),children:t})}},902:(e,t,n)=>{"use strict";n.d(t,{D9:()=>l,Qc:()=>u,Ql:()=>c,i6:()=>s,zX:()=>i});var r=n(7294),o=n(469),a=n(5893);function i(e){const t=(0,r.useRef)(e);return(0,o.Z)((()=>{t.current=e}),[e]),(0,r.useCallback)((function(){return t.current(...arguments)}),[])}function l(e){const t=(0,r.useRef)();return(0,o.Z)((()=>{t.current=e})),t.current}class s extends Error{constructor(e,t){super(),this.name="ReactContextError",this.message=`Hook ${this.stack?.split("\n")[1]?.match(/at (?:\w+\.)?(?\w+)/)?.groups.name??""} is called outside the <${e}>. ${t??""}`}}function c(e){const t=Object.entries(e);return t.sort(((e,t)=>e[0].localeCompare(t[0]))),(0,r.useMemo)((()=>e),t.flat())}function u(e){return t=>{let{children:n}=t;return(0,a.jsx)(a.Fragment,{children:e.reduceRight(((e,t)=>(0,a.jsx)(t,{children:e})),n)})}}},8596:(e,t,n)=>{"use strict";n.d(t,{Mg:()=>i,Ns:()=>l});var r=n(7294),o=n(5002),a=n(2263);function i(e,t){const n=e=>(!e||e.endsWith("/")?e:`${e}/`)?.toLowerCase();return n(e)===n(t)}function l(){const{baseUrl:e}=(0,a.Z)().siteConfig;return(0,r.useMemo)((()=>function(e){let{baseUrl:t,routes:n}=e;function r(e){return e.path===t&&!0===e.exact}function o(e){return e.path===t&&!e.exact}return function e(t){if(0===t.length)return;return t.find(r)||e(t.filter(o).flatMap((e=>e.routes??[])))}(n)}({routes:o.Z,baseUrl:e})),[e])}},2466:(e,t,n)=>{"use strict";n.d(t,{Ct:()=>g,OC:()=>u,RF:()=>p,o5:()=>m});var r=n(7294),o=n(412),a=n(2389),i=n(469),l=n(902),s=n(5893);const c=r.createContext(void 0);function u(e){let{children:t}=e;const n=function(){const e=(0,r.useRef)(!0);return(0,r.useMemo)((()=>({scrollEventsEnabledRef:e,enableScrollEvents:()=>{e.current=!0},disableScrollEvents:()=>{e.current=!1}})),[])}();return(0,s.jsx)(c.Provider,{value:n,children:t})}function d(){const e=(0,r.useContext)(c);if(null==e)throw new l.i6("ScrollControllerProvider");return e}const f=()=>o.Z.canUseDOM?{scrollX:window.pageXOffset,scrollY:window.pageYOffset}:null;function p(e,t){void 0===t&&(t=[]);const{scrollEventsEnabledRef:n}=d(),o=(0,r.useRef)(f()),a=(0,l.zX)(e);(0,r.useEffect)((()=>{const e=()=>{if(!n.current)return;const e=f();a(e,o.current),o.current=e},t={passive:!0};return e(),window.addEventListener("scroll",e,t),()=>window.removeEventListener("scroll",e,t)}),[a,n,...t])}function m(){const e=d(),t=function(){const e=(0,r.useRef)({elem:null,top:0}),t=(0,r.useCallback)((t=>{e.current={elem:t,top:t.getBoundingClientRect().top}}),[]),n=(0,r.useCallback)((()=>{const{current:{elem:t,top:n}}=e;if(!t)return{restored:!1};const r=t.getBoundingClientRect().top-n;return r&&window.scrollBy({left:0,top:r}),e.current={elem:null,top:0},{restored:0!==r}}),[]);return(0,r.useMemo)((()=>({save:t,restore:n})),[n,t])}(),n=(0,r.useRef)(void 0),o=(0,r.useCallback)((r=>{t.save(r),e.disableScrollEvents(),n.current=()=>{const{restored:r}=t.restore();if(n.current=void 0,r){const t=()=>{e.enableScrollEvents(),window.removeEventListener("scroll",t)};window.addEventListener("scroll",t)}else e.enableScrollEvents()}}),[e,t]);return(0,i.Z)((()=>{queueMicrotask((()=>n.current?.()))})),{blockElementScrollPositionUntilNextRender:o}}function g(){const e=(0,r.useRef)(null),t=(0,a.Z)()&&"smooth"===getComputedStyle(document.documentElement).scrollBehavior;return{startScroll:n=>{e.current=t?function(e){return window.scrollTo({top:e,behavior:"smooth"}),()=>{}}(n):function(e){let t=null;const n=document.documentElement.scrollTop>e;return function r(){const o=document.documentElement.scrollTop;(n&&o>e||!n&&ot&&cancelAnimationFrame(t)}(n)},cancelScroll:()=>e.current?.()}}},3320:(e,t,n)=>{"use strict";n.d(t,{HX:()=>r,os:()=>o});n(2263);const r="default";function o(e,t){return`docs-${e}-${t}`}},12:(e,t,n)=>{"use strict";n.d(t,{Nk:()=>u,WA:()=>c});var r=n(7294);const o="localStorage";function a(e){let{key:t,oldValue:n,newValue:r,storage:o}=e;if(n===r)return;const a=document.createEvent("StorageEvent");a.initStorageEvent("storage",!1,!1,t,n,r,window.location.href,o),window.dispatchEvent(a)}function i(e){if(void 0===e&&(e=o),"undefined"==typeof window)throw new Error("Browser storage is not available on Node.js/Docusaurus SSR process.");if("none"===e)return null;try{return window[e]}catch(n){return t=n,l||(console.warn("Docusaurus browser storage is not available.\nPossible reasons: running Docusaurus in an iframe, in an incognito browser session, or using too strict browser privacy settings.",t),l=!0),null}var t}let l=!1;const s={get:()=>null,set:()=>{},del:()=>{},listen:()=>()=>{}};function c(e,t){if("undefined"==typeof window)return function(e){function t(){throw new Error(`Illegal storage API usage for storage key "${e}".\nDocusaurus storage APIs are not supposed to be called on the server-rendering process.\nPlease only call storage APIs in effects and event handlers.`)}return{get:t,set:t,del:t,listen:t}}(e);const n=i(t?.persistence);return null===n?s:{get:()=>{try{return n.getItem(e)}catch(t){return console.error(`Docusaurus storage error, can't get key=${e}`,t),null}},set:t=>{try{const r=n.getItem(e);n.setItem(e,t),a({key:e,oldValue:r,newValue:t,storage:n})}catch(r){console.error(`Docusaurus storage error, can't set ${e}=${t}`,r)}},del:()=>{try{const t=n.getItem(e);n.removeItem(e),a({key:e,oldValue:t,newValue:null,storage:n})}catch(t){console.error(`Docusaurus storage error, can't delete key=${e}`,t)}},listen:t=>{try{const r=r=>{r.storageArea===n&&r.key===e&&t(r)};return window.addEventListener("storage",r),()=>window.removeEventListener("storage",r)}catch(r){return console.error(`Docusaurus storage error, can't listen for changes of key=${e}`,r),()=>{}}}}}function u(e,t){const n=(0,r.useRef)((()=>null===e?s:c(e,t))).current(),o=(0,r.useCallback)((e=>"undefined"==typeof window?()=>{}:n.listen(e)),[n]);return[(0,r.useSyncExternalStore)(o,(()=>"undefined"==typeof window?null:n.get()),(()=>null)),n]}},4711:(e,t,n)=>{"use strict";n.d(t,{l:()=>i});var r=n(2263),o=n(6550),a=n(8780);function i(){const{siteConfig:{baseUrl:e,url:t,trailingSlash:n},i18n:{defaultLocale:i,currentLocale:l}}=(0,r.Z)(),{pathname:s}=(0,o.TH)(),c=(0,a.applyTrailingSlash)(s,{trailingSlash:n,baseUrl:e}),u=l===i?e:e.replace(`/${l}/`,"/"),d=c.replace(e,"");return{createUrl:function(e){let{locale:n,fullyQualified:r}=e;return`${r?t:""}${function(e){return e===i?`${u}`:`${u}${e}/`}(n)}${d}`}}}},5936:(e,t,n)=>{"use strict";n.d(t,{S:()=>i});var r=n(7294),o=n(6550),a=n(902);function i(e){const t=(0,o.TH)(),n=(0,a.D9)(t),i=(0,a.zX)(e);(0,r.useEffect)((()=>{n&&t!==n&&i({location:t,previousLocation:n})}),[i,t,n])}},6668:(e,t,n)=>{"use strict";n.d(t,{L:()=>o});var r=n(2263);function o(){return(0,r.Z)().siteConfig.themeConfig}},8802:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){const{trailingSlash:n,baseUrl:r}=t;if(e.startsWith("#"))return e;if(void 0===n)return e;const[o]=e.split(/[#?]/),a="/"===o||o===r?o:(i=o,n?function(e){return e.endsWith("/")?e:`${e}/`}(i):function(e){return e.endsWith("/")?e.slice(0,-1):e}(i));var i;return e.replace(o,a)}},4143:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorCausalChain=void 0,t.getErrorCausalChain=function e(t){return t.cause?[t,...e(t.cause)]:[t]}},8780:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorCausalChain=t.applyTrailingSlash=t.blogPostContainerID=void 0,t.blogPostContainerID="__blog-post-container";var o=n(8802);Object.defineProperty(t,"applyTrailingSlash",{enumerable:!0,get:function(){return r(o).default}});var a=n(4143);Object.defineProperty(t,"getErrorCausalChain",{enumerable:!0,get:function(){return a.getErrorCausalChain}})},9318:(e,t,n)=>{"use strict";n.d(t,{lX:()=>k,q_:()=>_,ob:()=>p,PP:()=>j,Ep:()=>f});var r=n(7462);function o(e){return"/"===e.charAt(0)}function a(e,t){for(var n=t,r=n+1,o=e.length;r=0;f--){var p=i[f];"."===p?a(i,f):".."===p?(a(i,f),d++):d&&(a(i,f),d--)}if(!c)for(;d--;d)i.unshift("..");!c||""===i[0]||i[0]&&o(i[0])||i.unshift("");var m=i.join("/");return n&&"/"!==m.substr(-1)&&(m+="/"),m};var l=n(8776);function s(e){return"/"===e.charAt(0)?e:"/"+e}function c(e){return"/"===e.charAt(0)?e.substr(1):e}function u(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function d(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function f(e){var t=e.pathname,n=e.search,r=e.hash,o=t||"/";return n&&"?"!==n&&(o+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o}function p(e,t,n,o){var a;"string"==typeof e?(a=function(e){var t=e||"/",n="",r="",o=t.indexOf("#");-1!==o&&(r=t.substr(o),t=t.substr(0,o));var a=t.indexOf("?");return-1!==a&&(n=t.substr(a),t=t.substr(0,a)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e),a.state=t):(void 0===(a=(0,r.Z)({},e)).pathname&&(a.pathname=""),a.search?"?"!==a.search.charAt(0)&&(a.search="?"+a.search):a.search="",a.hash?"#"!==a.hash.charAt(0)&&(a.hash="#"+a.hash):a.hash="",void 0!==t&&void 0===a.state&&(a.state=t));try{a.pathname=decodeURI(a.pathname)}catch(l){throw l instanceof URIError?new URIError('Pathname "'+a.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):l}return n&&(a.key=n),o?a.pathname?"/"!==a.pathname.charAt(0)&&(a.pathname=i(a.pathname,o.pathname)):a.pathname=o.pathname:a.pathname||(a.pathname="/"),a}function m(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,o){if(null!=e){var a="function"==typeof e?e(t,n):e;"string"==typeof a?"function"==typeof r?r(a,o):o(!0):o(!1!==a)}else o(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;rt?n.splice(t,n.length-t,o):n.push(o),d({action:r,location:o,index:t,entries:n})}}))},replace:function(e,t){var r="REPLACE",o=p(e,t,g(),k.location);u.confirmTransitionTo(o,r,n,(function(e){e&&(k.entries[k.index]=o,d({action:r,location:o}))}))},go:v,goBack:function(){v(-1)},goForward:function(){v(1)},canGo:function(e){var t=k.index+e;return t>=0&&t{"use strict";var r=n(9864),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},l={};function s(e){return r.isMemo(e)?i:l[e.$$typeof]||o}l[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},l[r.Memo]=i;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,m=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(m){var o=p(n);o&&o!==m&&e(t,o,r)}var i=u(n);d&&(i=i.concat(d(n)));for(var l=s(t),g=s(n),h=0;h{"use strict";e.exports=function(e,t,n,r,o,a,i,l){if(!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,o,a,i,l],u=0;(s=new Error(t.replace(/%s/g,(function(){return c[u++]})))).name="Invariant Violation"}throw s.framesToPop=1,s}}},5826:e=>{e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},92:(e,t,n)=>{"use strict";n.r(t)},2497:(e,t,n)=>{"use strict";n.r(t)},4865:function(e,t,n){var r,o;r=function(){var e,t,n={version:"0.2.0"},r=n.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'
'};function o(e,t,n){return en?n:e}function a(e){return 100*(-1+e)}function i(e,t,n){var o;return(o="translate3d"===r.positionUsing?{transform:"translate3d("+a(e)+"%,0,0)"}:"translate"===r.positionUsing?{transform:"translate("+a(e)+"%,0)"}:{"margin-left":a(e)+"%"}).transition="all "+t+"ms "+n,o}n.configure=function(e){var t,n;for(t in e)void 0!==(n=e[t])&&e.hasOwnProperty(t)&&(r[t]=n);return this},n.status=null,n.set=function(e){var t=n.isStarted();e=o(e,r.minimum,1),n.status=1===e?null:e;var a=n.render(!t),c=a.querySelector(r.barSelector),u=r.speed,d=r.easing;return a.offsetWidth,l((function(t){""===r.positionUsing&&(r.positionUsing=n.getPositioningCSS()),s(c,i(e,u,d)),1===e?(s(a,{transition:"none",opacity:1}),a.offsetWidth,setTimeout((function(){s(a,{transition:"all "+u+"ms linear",opacity:0}),setTimeout((function(){n.remove(),t()}),u)}),u)):setTimeout(t,u)})),this},n.isStarted=function(){return"number"==typeof n.status},n.start=function(){n.status||n.set(0);var e=function(){setTimeout((function(){n.status&&(n.trickle(),e())}),r.trickleSpeed)};return r.trickle&&e(),this},n.done=function(e){return e||n.status?n.inc(.3+.5*Math.random()).set(1):this},n.inc=function(e){var t=n.status;return t?("number"!=typeof e&&(e=(1-t)*o(Math.random()*t,.1,.95)),t=o(t+e,0,.994),n.set(t)):n.start()},n.trickle=function(){return n.inc(Math.random()*r.trickleRate)},e=0,t=0,n.promise=function(r){return r&&"resolved"!==r.state()?(0===t&&n.start(),e++,t++,r.always((function(){0==--t?(e=0,n.done()):n.set((e-t)/e)})),this):this},n.render=function(e){if(n.isRendered())return document.getElementById("nprogress");u(document.documentElement,"nprogress-busy");var t=document.createElement("div");t.id="nprogress",t.innerHTML=r.template;var o,i=t.querySelector(r.barSelector),l=e?"-100":a(n.status||0),c=document.querySelector(r.parent);return s(i,{transition:"all 0 linear",transform:"translate3d("+l+"%,0,0)"}),r.showSpinner||(o=t.querySelector(r.spinnerSelector))&&p(o),c!=document.body&&u(c,"nprogress-custom-parent"),c.appendChild(t),t},n.remove=function(){d(document.documentElement,"nprogress-busy"),d(document.querySelector(r.parent),"nprogress-custom-parent");var e=document.getElementById("nprogress");e&&p(e)},n.isRendered=function(){return!!document.getElementById("nprogress")},n.getPositioningCSS=function(){var e=document.body.style,t="WebkitTransform"in e?"Webkit":"MozTransform"in e?"Moz":"msTransform"in e?"ms":"OTransform"in e?"O":"";return t+"Perspective"in e?"translate3d":t+"Transform"in e?"translate":"margin"};var l=function(){var e=[];function t(){var n=e.shift();n&&n(t)}return function(n){e.push(n),1==e.length&&t()}}(),s=function(){var e=["Webkit","O","Moz","ms"],t={};function n(e){return e.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,(function(e,t){return t.toUpperCase()}))}function r(t){var n=document.body.style;if(t in n)return t;for(var r,o=e.length,a=t.charAt(0).toUpperCase()+t.slice(1);o--;)if((r=e[o]+a)in n)return r;return t}function o(e){return e=n(e),t[e]||(t[e]=r(e))}function a(e,t,n){t=o(t),e.style[t]=n}return function(e,t){var n,r,o=arguments;if(2==o.length)for(n in t)void 0!==(r=t[n])&&t.hasOwnProperty(n)&&a(e,n,r);else a(e,o[1],o[2])}}();function c(e,t){return("string"==typeof e?e:f(e)).indexOf(" "+t+" ")>=0}function u(e,t){var n=f(e),r=n+t;c(n,t)||(e.className=r.substring(1))}function d(e,t){var n,r=f(e);c(e,t)&&(n=r.replace(" "+t+" "," "),e.className=n.substring(1,n.length-1))}function f(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function p(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return n},void 0===(o="function"==typeof r?r.call(t,n,t,e):r)||(e.exports=o)},9901:e=>{e.exports&&(e.exports={core:{meta:{path:"components/prism-core.js",option:"mandatory"},core:"Core"},themes:{meta:{path:"themes/{id}.css",link:"index.html?theme={id}",exclusive:!0},prism:{title:"Default",option:"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{title:"Okaidia",owner:"ocodia"},"prism-twilight":{title:"Twilight",owner:"remybach"},"prism-coy":{title:"Coy",owner:"tshedor"},"prism-solarizedlight":{title:"Solarized Light",owner:"hectormatos2011 "},"prism-tomorrow":{title:"Tomorrow Night",owner:"Rosey"}},languages:{meta:{path:"components/prism-{id}",noCSS:!0,examplesPath:"examples/prism-{id}",addCheckAll:!0},markup:{title:"Markup",alias:["html","xml","svg","mathml","ssml","atom","rss"],aliasTitles:{html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",ssml:"SSML",atom:"Atom",rss:"RSS"},option:"default"},css:{title:"CSS",option:"default",modify:"markup"},clike:{title:"C-like",option:"default"},javascript:{title:"JavaScript",require:"clike",modify:"markup",optional:"regex",alias:"js",option:"default"},abap:{title:"ABAP",owner:"dellagustin"},abnf:{title:"ABNF",owner:"RunDevelopment"},actionscript:{title:"ActionScript",require:"javascript",modify:"markup",owner:"Golmote"},ada:{title:"Ada",owner:"Lucretia"},agda:{title:"Agda",owner:"xy-ren"},al:{title:"AL",owner:"RunDevelopment"},antlr4:{title:"ANTLR4",alias:"g4",owner:"RunDevelopment"},apacheconf:{title:"Apache Configuration",owner:"GuiTeK"},apex:{title:"Apex",require:["clike","sql"],owner:"RunDevelopment"},apl:{title:"APL",owner:"ngn"},applescript:{title:"AppleScript",owner:"Golmote"},aql:{title:"AQL",owner:"RunDevelopment"},arduino:{title:"Arduino",require:"cpp",alias:"ino",owner:"dkern"},arff:{title:"ARFF",owner:"Golmote"},armasm:{title:"ARM Assembly",alias:"arm-asm",owner:"RunDevelopment"},arturo:{title:"Arturo",alias:"art",optional:["bash","css","javascript","markup","markdown","sql"],owner:"drkameleon"},asciidoc:{alias:"adoc",title:"AsciiDoc",owner:"Golmote"},aspnet:{title:"ASP.NET (C#)",require:["markup","csharp"],owner:"nauzilus"},asm6502:{title:"6502 Assembly",owner:"kzurawel"},asmatmel:{title:"Atmel AVR Assembly",owner:"cerkit"},autohotkey:{title:"AutoHotkey",owner:"aviaryan"},autoit:{title:"AutoIt",owner:"Golmote"},avisynth:{title:"AviSynth",alias:"avs",owner:"Zinfidel"},"avro-idl":{title:"Avro IDL",alias:"avdl",owner:"RunDevelopment"},awk:{title:"AWK",alias:"gawk",aliasTitles:{gawk:"GAWK"},owner:"RunDevelopment"},bash:{title:"Bash",alias:["sh","shell"],aliasTitles:{sh:"Shell",shell:"Shell"},owner:"zeitgeist87"},basic:{title:"BASIC",owner:"Golmote"},batch:{title:"Batch",owner:"Golmote"},bbcode:{title:"BBcode",alias:"shortcode",aliasTitles:{shortcode:"Shortcode"},owner:"RunDevelopment"},bbj:{title:"BBj",owner:"hyyan"},bicep:{title:"Bicep",owner:"johnnyreilly"},birb:{title:"Birb",require:"clike",owner:"Calamity210"},bison:{title:"Bison",require:"c",owner:"Golmote"},bnf:{title:"BNF",alias:"rbnf",aliasTitles:{rbnf:"RBNF"},owner:"RunDevelopment"},bqn:{title:"BQN",owner:"yewscion"},brainfuck:{title:"Brainfuck",owner:"Golmote"},brightscript:{title:"BrightScript",owner:"RunDevelopment"},bro:{title:"Bro",owner:"wayward710"},bsl:{title:"BSL (1C:Enterprise)",alias:"oscript",aliasTitles:{oscript:"OneScript"},owner:"Diversus23"},c:{title:"C",require:"clike",owner:"zeitgeist87"},csharp:{title:"C#",require:"clike",alias:["cs","dotnet"],owner:"mvalipour"},cpp:{title:"C++",require:"c",owner:"zeitgeist87"},cfscript:{title:"CFScript",require:"clike",alias:"cfc",owner:"mjclemente"},chaiscript:{title:"ChaiScript",require:["clike","cpp"],owner:"RunDevelopment"},cil:{title:"CIL",owner:"sbrl"},cilkc:{title:"Cilk/C",require:"c",alias:"cilk-c",owner:"OpenCilk"},cilkcpp:{title:"Cilk/C++",require:"cpp",alias:["cilk-cpp","cilk"],owner:"OpenCilk"},clojure:{title:"Clojure",owner:"troglotit"},cmake:{title:"CMake",owner:"mjrogozinski"},cobol:{title:"COBOL",owner:"RunDevelopment"},coffeescript:{title:"CoffeeScript",require:"javascript",alias:"coffee",owner:"R-osey"},concurnas:{title:"Concurnas",alias:"conc",owner:"jasontatton"},csp:{title:"Content-Security-Policy",owner:"ScottHelme"},cooklang:{title:"Cooklang",owner:"ahue"},coq:{title:"Coq",owner:"RunDevelopment"},crystal:{title:"Crystal",require:"ruby",owner:"MakeNowJust"},"css-extras":{title:"CSS Extras",require:"css",modify:"css",owner:"milesj"},csv:{title:"CSV",owner:"RunDevelopment"},cue:{title:"CUE",owner:"RunDevelopment"},cypher:{title:"Cypher",owner:"RunDevelopment"},d:{title:"D",require:"clike",owner:"Golmote"},dart:{title:"Dart",require:"clike",owner:"Golmote"},dataweave:{title:"DataWeave",owner:"machaval"},dax:{title:"DAX",owner:"peterbud"},dhall:{title:"Dhall",owner:"RunDevelopment"},diff:{title:"Diff",owner:"uranusjr"},django:{title:"Django/Jinja2",require:"markup-templating",alias:"jinja2",owner:"romanvm"},"dns-zone-file":{title:"DNS zone file",owner:"RunDevelopment",alias:"dns-zone"},docker:{title:"Docker",alias:"dockerfile",owner:"JustinBeckwith"},dot:{title:"DOT (Graphviz)",alias:"gv",optional:"markup",owner:"RunDevelopment"},ebnf:{title:"EBNF",owner:"RunDevelopment"},editorconfig:{title:"EditorConfig",owner:"osipxd"},eiffel:{title:"Eiffel",owner:"Conaclos"},ejs:{title:"EJS",require:["javascript","markup-templating"],owner:"RunDevelopment",alias:"eta",aliasTitles:{eta:"Eta"}},elixir:{title:"Elixir",owner:"Golmote"},elm:{title:"Elm",owner:"zwilias"},etlua:{title:"Embedded Lua templating",require:["lua","markup-templating"],owner:"RunDevelopment"},erb:{title:"ERB",require:["ruby","markup-templating"],owner:"Golmote"},erlang:{title:"Erlang",owner:"Golmote"},"excel-formula":{title:"Excel Formula",alias:["xlsx","xls"],owner:"RunDevelopment"},fsharp:{title:"F#",require:"clike",owner:"simonreynolds7"},factor:{title:"Factor",owner:"catb0t"},false:{title:"False",owner:"edukisto"},"firestore-security-rules":{title:"Firestore security rules",require:"clike",owner:"RunDevelopment"},flow:{title:"Flow",require:"javascript",owner:"Golmote"},fortran:{title:"Fortran",owner:"Golmote"},ftl:{title:"FreeMarker Template Language",require:"markup-templating",owner:"RunDevelopment"},gml:{title:"GameMaker Language",alias:"gamemakerlanguage",require:"clike",owner:"LiarOnce"},gap:{title:"GAP (CAS)",owner:"RunDevelopment"},gcode:{title:"G-code",owner:"RunDevelopment"},gdscript:{title:"GDScript",owner:"RunDevelopment"},gedcom:{title:"GEDCOM",owner:"Golmote"},gettext:{title:"gettext",alias:"po",owner:"RunDevelopment"},gherkin:{title:"Gherkin",owner:"hason"},git:{title:"Git",owner:"lgiraudel"},glsl:{title:"GLSL",require:"c",owner:"Golmote"},gn:{title:"GN",alias:"gni",owner:"RunDevelopment"},"linker-script":{title:"GNU Linker Script",alias:"ld",owner:"RunDevelopment"},go:{title:"Go",require:"clike",owner:"arnehormann"},"go-module":{title:"Go module",alias:"go-mod",owner:"RunDevelopment"},gradle:{title:"Gradle",require:"clike",owner:"zeabdelkhalek-badido18"},graphql:{title:"GraphQL",optional:"markdown",owner:"Golmote"},groovy:{title:"Groovy",require:"clike",owner:"robfletcher"},haml:{title:"Haml",require:"ruby",optional:["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],owner:"Golmote"},handlebars:{title:"Handlebars",require:"markup-templating",alias:["hbs","mustache"],aliasTitles:{mustache:"Mustache"},owner:"Golmote"},haskell:{title:"Haskell",alias:"hs",owner:"bholst"},haxe:{title:"Haxe",require:"clike",optional:"regex",owner:"Golmote"},hcl:{title:"HCL",owner:"outsideris"},hlsl:{title:"HLSL",require:"c",owner:"RunDevelopment"},hoon:{title:"Hoon",owner:"matildepark"},http:{title:"HTTP",optional:["csp","css","hpkp","hsts","javascript","json","markup","uri"],owner:"danielgtaylor"},hpkp:{title:"HTTP Public-Key-Pins",owner:"ScottHelme"},hsts:{title:"HTTP Strict-Transport-Security",owner:"ScottHelme"},ichigojam:{title:"IchigoJam",owner:"BlueCocoa"},icon:{title:"Icon",owner:"Golmote"},"icu-message-format":{title:"ICU Message Format",owner:"RunDevelopment"},idris:{title:"Idris",alias:"idr",owner:"KeenS",require:"haskell"},ignore:{title:".ignore",owner:"osipxd",alias:["gitignore","hgignore","npmignore"],aliasTitles:{gitignore:".gitignore",hgignore:".hgignore",npmignore:".npmignore"}},inform7:{title:"Inform 7",owner:"Golmote"},ini:{title:"Ini",owner:"aviaryan"},io:{title:"Io",owner:"AlesTsurko"},j:{title:"J",owner:"Golmote"},java:{title:"Java",require:"clike",owner:"sherblot"},javadoc:{title:"JavaDoc",require:["markup","java","javadoclike"],modify:"java",optional:"scala",owner:"RunDevelopment"},javadoclike:{title:"JavaDoc-like",modify:["java","javascript","php"],owner:"RunDevelopment"},javastacktrace:{title:"Java stack trace",owner:"RunDevelopment"},jexl:{title:"Jexl",owner:"czosel"},jolie:{title:"Jolie",require:"clike",owner:"thesave"},jq:{title:"JQ",owner:"RunDevelopment"},jsdoc:{title:"JSDoc",require:["javascript","javadoclike","typescript"],modify:"javascript",optional:["actionscript","coffeescript"],owner:"RunDevelopment"},"js-extras":{title:"JS Extras",require:"javascript",modify:"javascript",optional:["actionscript","coffeescript","flow","n4js","typescript"],owner:"RunDevelopment"},json:{title:"JSON",alias:"webmanifest",aliasTitles:{webmanifest:"Web App Manifest"},owner:"CupOfTea696"},json5:{title:"JSON5",require:"json",owner:"RunDevelopment"},jsonp:{title:"JSONP",require:"json",owner:"RunDevelopment"},jsstacktrace:{title:"JS stack trace",owner:"sbrl"},"js-templates":{title:"JS Templates",require:"javascript",modify:"javascript",optional:["css","css-extras","graphql","markdown","markup","sql"],owner:"RunDevelopment"},julia:{title:"Julia",owner:"cdagnino"},keepalived:{title:"Keepalived Configure",owner:"dev-itsheng"},keyman:{title:"Keyman",owner:"mcdurdin"},kotlin:{title:"Kotlin",alias:["kt","kts"],aliasTitles:{kts:"Kotlin Script"},require:"clike",owner:"Golmote"},kumir:{title:"KuMir (\u041a\u0443\u041c\u0438\u0440)",alias:"kum",owner:"edukisto"},kusto:{title:"Kusto",owner:"RunDevelopment"},latex:{title:"LaTeX",alias:["tex","context"],aliasTitles:{tex:"TeX",context:"ConTeXt"},owner:"japborst"},latte:{title:"Latte",require:["clike","markup-templating","php"],owner:"nette"},less:{title:"Less",require:"css",optional:"css-extras",owner:"Golmote"},lilypond:{title:"LilyPond",require:"scheme",alias:"ly",owner:"RunDevelopment"},liquid:{title:"Liquid",require:"markup-templating",owner:"cinhtau"},lisp:{title:"Lisp",alias:["emacs","elisp","emacs-lisp"],owner:"JuanCaicedo"},livescript:{title:"LiveScript",owner:"Golmote"},llvm:{title:"LLVM IR",owner:"porglezomp"},log:{title:"Log file",optional:"javastacktrace",owner:"RunDevelopment"},lolcode:{title:"LOLCODE",owner:"Golmote"},lua:{title:"Lua",owner:"Golmote"},magma:{title:"Magma (CAS)",owner:"RunDevelopment"},makefile:{title:"Makefile",owner:"Golmote"},markdown:{title:"Markdown",require:"markup",optional:"yaml",alias:"md",owner:"Golmote"},"markup-templating":{title:"Markup templating",require:"markup",owner:"Golmote"},mata:{title:"Mata",owner:"RunDevelopment"},matlab:{title:"MATLAB",owner:"Golmote"},maxscript:{title:"MAXScript",owner:"RunDevelopment"},mel:{title:"MEL",owner:"Golmote"},mermaid:{title:"Mermaid",owner:"RunDevelopment"},metafont:{title:"METAFONT",owner:"LaeriExNihilo"},mizar:{title:"Mizar",owner:"Golmote"},mongodb:{title:"MongoDB",owner:"airs0urce",require:"javascript"},monkey:{title:"Monkey",owner:"Golmote"},moonscript:{title:"MoonScript",alias:"moon",owner:"RunDevelopment"},n1ql:{title:"N1QL",owner:"TMWilds"},n4js:{title:"N4JS",require:"javascript",optional:"jsdoc",alias:"n4jsd",owner:"bsmith-n4"},"nand2tetris-hdl":{title:"Nand To Tetris HDL",owner:"stephanmax"},naniscript:{title:"Naninovel Script",owner:"Elringus",alias:"nani"},nasm:{title:"NASM",owner:"rbmj"},neon:{title:"NEON",owner:"nette"},nevod:{title:"Nevod",owner:"nezaboodka"},nginx:{title:"nginx",owner:"volado"},nim:{title:"Nim",owner:"Golmote"},nix:{title:"Nix",owner:"Golmote"},nsis:{title:"NSIS",owner:"idleberg"},objectivec:{title:"Objective-C",require:"c",alias:"objc",owner:"uranusjr"},ocaml:{title:"OCaml",owner:"Golmote"},odin:{title:"Odin",owner:"edukisto"},opencl:{title:"OpenCL",require:"c",modify:["c","cpp"],owner:"Milania1"},openqasm:{title:"OpenQasm",alias:"qasm",owner:"RunDevelopment"},oz:{title:"Oz",owner:"Golmote"},parigp:{title:"PARI/GP",owner:"Golmote"},parser:{title:"Parser",require:"markup",owner:"Golmote"},pascal:{title:"Pascal",alias:"objectpascal",aliasTitles:{objectpascal:"Object Pascal"},owner:"Golmote"},pascaligo:{title:"Pascaligo",owner:"DefinitelyNotAGoat"},psl:{title:"PATROL Scripting Language",owner:"bertysentry"},pcaxis:{title:"PC-Axis",alias:"px",owner:"RunDevelopment"},peoplecode:{title:"PeopleCode",alias:"pcode",owner:"RunDevelopment"},perl:{title:"Perl",owner:"Golmote"},php:{title:"PHP",require:"markup-templating",owner:"milesj"},phpdoc:{title:"PHPDoc",require:["php","javadoclike"],modify:"php",owner:"RunDevelopment"},"php-extras":{title:"PHP Extras",require:"php",modify:"php",owner:"milesj"},"plant-uml":{title:"PlantUML",alias:"plantuml",owner:"RunDevelopment"},plsql:{title:"PL/SQL",require:"sql",owner:"Golmote"},powerquery:{title:"PowerQuery",alias:["pq","mscript"],owner:"peterbud"},powershell:{title:"PowerShell",owner:"nauzilus"},processing:{title:"Processing",require:"clike",owner:"Golmote"},prolog:{title:"Prolog",owner:"Golmote"},promql:{title:"PromQL",owner:"arendjr"},properties:{title:".properties",owner:"Golmote"},protobuf:{title:"Protocol Buffers",require:"clike",owner:"just-boris"},pug:{title:"Pug",require:["markup","javascript"],optional:["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],owner:"Golmote"},puppet:{title:"Puppet",owner:"Golmote"},pure:{title:"Pure",optional:["c","cpp","fortran"],owner:"Golmote"},purebasic:{title:"PureBasic",require:"clike",alias:"pbfasm",owner:"HeX0R101"},purescript:{title:"PureScript",require:"haskell",alias:"purs",owner:"sriharshachilakapati"},python:{title:"Python",alias:"py",owner:"multipetros"},qsharp:{title:"Q#",require:"clike",alias:"qs",owner:"fedonman"},q:{title:"Q (kdb+ database)",owner:"Golmote"},qml:{title:"QML",require:"javascript",owner:"RunDevelopment"},qore:{title:"Qore",require:"clike",owner:"temnroegg"},r:{title:"R",owner:"Golmote"},racket:{title:"Racket",require:"scheme",alias:"rkt",owner:"RunDevelopment"},cshtml:{title:"Razor C#",alias:"razor",require:["markup","csharp"],optional:["css","css-extras","javascript","js-extras"],owner:"RunDevelopment"},jsx:{title:"React JSX",require:["markup","javascript"],optional:["jsdoc","js-extras","js-templates"],owner:"vkbansal"},tsx:{title:"React TSX",require:["jsx","typescript"]},reason:{title:"Reason",require:"clike",owner:"Golmote"},regex:{title:"Regex",owner:"RunDevelopment"},rego:{title:"Rego",owner:"JordanSh"},renpy:{title:"Ren'py",alias:"rpy",owner:"HyuchiaDiego"},rescript:{title:"ReScript",alias:"res",owner:"vmarcosp"},rest:{title:"reST (reStructuredText)",owner:"Golmote"},rip:{title:"Rip",owner:"ravinggenius"},roboconf:{title:"Roboconf",owner:"Golmote"},robotframework:{title:"Robot Framework",alias:"robot",owner:"RunDevelopment"},ruby:{title:"Ruby",require:"clike",alias:"rb",owner:"samflores"},rust:{title:"Rust",owner:"Golmote"},sas:{title:"SAS",optional:["groovy","lua","sql"],owner:"Golmote"},sass:{title:"Sass (Sass)",require:"css",optional:"css-extras",owner:"Golmote"},scss:{title:"Sass (SCSS)",require:"css",optional:"css-extras",owner:"MoOx"},scala:{title:"Scala",require:"java",owner:"jozic"},scheme:{title:"Scheme",owner:"bacchus123"},"shell-session":{title:"Shell session",require:"bash",alias:["sh-session","shellsession"],owner:"RunDevelopment"},smali:{title:"Smali",owner:"RunDevelopment"},smalltalk:{title:"Smalltalk",owner:"Golmote"},smarty:{title:"Smarty",require:"markup-templating",optional:"php",owner:"Golmote"},sml:{title:"SML",alias:"smlnj",aliasTitles:{smlnj:"SML/NJ"},owner:"RunDevelopment"},solidity:{title:"Solidity (Ethereum)",alias:"sol",require:"clike",owner:"glachaud"},"solution-file":{title:"Solution file",alias:"sln",owner:"RunDevelopment"},soy:{title:"Soy (Closure Template)",require:"markup-templating",owner:"Golmote"},sparql:{title:"SPARQL",require:"turtle",owner:"Triply-Dev",alias:"rq"},"splunk-spl":{title:"Splunk SPL",owner:"RunDevelopment"},sqf:{title:"SQF: Status Quo Function (Arma 3)",require:"clike",owner:"RunDevelopment"},sql:{title:"SQL",owner:"multipetros"},squirrel:{title:"Squirrel",require:"clike",owner:"RunDevelopment"},stan:{title:"Stan",owner:"RunDevelopment"},stata:{title:"Stata Ado",require:["mata","java","python"],owner:"RunDevelopment"},iecst:{title:"Structured Text (IEC 61131-3)",owner:"serhioromano"},stylus:{title:"Stylus",owner:"vkbansal"},supercollider:{title:"SuperCollider",alias:"sclang",owner:"RunDevelopment"},swift:{title:"Swift",owner:"chrischares"},systemd:{title:"Systemd configuration file",owner:"RunDevelopment"},"t4-templating":{title:"T4 templating",owner:"RunDevelopment"},"t4-cs":{title:"T4 Text Templates (C#)",require:["t4-templating","csharp"],alias:"t4",owner:"RunDevelopment"},"t4-vb":{title:"T4 Text Templates (VB)",require:["t4-templating","vbnet"],owner:"RunDevelopment"},tap:{title:"TAP",owner:"isaacs",require:"yaml"},tcl:{title:"Tcl",owner:"PeterChaplin"},tt2:{title:"Template Toolkit 2",require:["clike","markup-templating"],owner:"gflohr"},textile:{title:"Textile",require:"markup",optional:"css",owner:"Golmote"},toml:{title:"TOML",owner:"RunDevelopment"},tremor:{title:"Tremor",alias:["trickle","troy"],owner:"darach",aliasTitles:{trickle:"trickle",troy:"troy"}},turtle:{title:"Turtle",alias:"trig",aliasTitles:{trig:"TriG"},owner:"jakubklimek"},twig:{title:"Twig",require:"markup-templating",owner:"brandonkelly"},typescript:{title:"TypeScript",require:"javascript",optional:"js-templates",alias:"ts",owner:"vkbansal"},typoscript:{title:"TypoScript",alias:"tsconfig",aliasTitles:{tsconfig:"TSConfig"},owner:"dkern"},unrealscript:{title:"UnrealScript",alias:["uscript","uc"],owner:"RunDevelopment"},uorazor:{title:"UO Razor Script",owner:"jaseowns"},uri:{title:"URI",alias:"url",aliasTitles:{url:"URL"},owner:"RunDevelopment"},v:{title:"V",require:"clike",owner:"taggon"},vala:{title:"Vala",require:"clike",optional:"regex",owner:"TemplarVolk"},vbnet:{title:"VB.Net",require:"basic",owner:"Bigsby"},velocity:{title:"Velocity",require:"markup",owner:"Golmote"},verilog:{title:"Verilog",owner:"a-rey"},vhdl:{title:"VHDL",owner:"a-rey"},vim:{title:"vim",owner:"westonganger"},"visual-basic":{title:"Visual Basic",alias:["vb","vba"],aliasTitles:{vba:"VBA"},owner:"Golmote"},warpscript:{title:"WarpScript",owner:"RunDevelopment"},wasm:{title:"WebAssembly",owner:"Golmote"},"web-idl":{title:"Web IDL",alias:"webidl",owner:"RunDevelopment"},wgsl:{title:"WGSL",owner:"Dr4gonthree"},wiki:{title:"Wiki markup",require:"markup",owner:"Golmote"},wolfram:{title:"Wolfram language",alias:["mathematica","nb","wl"],aliasTitles:{mathematica:"Mathematica",nb:"Mathematica Notebook"},owner:"msollami"},wren:{title:"Wren",owner:"clsource"},xeora:{title:"Xeora",require:"markup",alias:"xeoracube",aliasTitles:{xeoracube:"XeoraCube"},owner:"freakmaxi"},"xml-doc":{title:"XML doc (.net)",require:"markup",modify:["csharp","fsharp","vbnet"],owner:"RunDevelopment"},xojo:{title:"Xojo (REALbasic)",owner:"Golmote"},xquery:{title:"XQuery",require:"markup",owner:"Golmote"},yaml:{title:"YAML",alias:"yml",owner:"hason"},yang:{title:"YANG",owner:"RunDevelopment"},zig:{title:"Zig",owner:"RunDevelopment"}},plugins:{meta:{path:"plugins/{id}/prism-{id}",link:"plugins/{id}/"},"line-highlight":{title:"Line Highlight",description:"Highlights specific lines and/or line ranges."},"line-numbers":{title:"Line Numbers",description:"Line number at the beginning of code lines.",owner:"kuba-kubula"},"show-invisibles":{title:"Show Invisibles",description:"Show hidden characters such as tabs and line breaks.",optional:["autolinker","data-uri-highlight"]},autolinker:{title:"Autolinker",description:"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},wpd:{title:"WebPlatform Docs",description:'Makes tokens link to WebPlatform.org documentation. The links open in a new tab.'},"custom-class":{title:"Custom Class",description:"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.",owner:"dvkndn",noCSS:!0},"file-highlight":{title:"File Highlight",description:"Fetch external files and highlight them with Prism. Used on the Prism website itself.",noCSS:!0},"show-language":{title:"Show Language",description:"Display the highlighted language in code blocks (inline code does not show the label).",owner:"nauzilus",noCSS:!0,require:"toolbar"},"jsonp-highlight":{title:"JSONP Highlight",description:"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).",noCSS:!0,owner:"nauzilus"},"highlight-keywords":{title:"Highlight Keywords",description:"Adds special CSS classes for each keyword for fine-grained highlighting.",owner:"vkbansal",noCSS:!0},"remove-initial-line-feed":{title:"Remove initial line feed",description:"Removes the initial line feed in code blocks.",owner:"Golmote",noCSS:!0},"inline-color":{title:"Inline color",description:"Adds a small inline preview for colors in style sheets.",require:"css-extras",owner:"RunDevelopment"},previewers:{title:"Previewers",description:"Previewers for angles, colors, gradients, easing and time.",require:"css-extras",owner:"Golmote"},autoloader:{title:"Autoloader",description:"Automatically loads the needed languages to highlight the code blocks.",owner:"Golmote",noCSS:!0},"keep-markup":{title:"Keep Markup",description:"Prevents custom markup from being dropped out during highlighting.",owner:"Golmote",optional:"normalize-whitespace",noCSS:!0},"command-line":{title:"Command Line",description:"Display a command line with a prompt and, optionally, the output/response from the commands.",owner:"chriswells0"},"unescaped-markup":{title:"Unescaped Markup",description:"Write markup without having to escape anything."},"normalize-whitespace":{title:"Normalize Whitespace",description:"Supports multiple operations to normalize whitespace in code blocks.",owner:"zeitgeist87",optional:"unescaped-markup",noCSS:!0},"data-uri-highlight":{title:"Data-URI Highlight",description:"Highlights data-URI contents.",owner:"Golmote",noCSS:!0},toolbar:{title:"Toolbar",description:"Attach a toolbar for plugins to easily register buttons on the top of a code block.",owner:"mAAdhaTTah"},"copy-to-clipboard":{title:"Copy to Clipboard Button",description:"Add a button that copies the code block to the clipboard when clicked.",owner:"mAAdhaTTah",require:"toolbar",noCSS:!0},"download-button":{title:"Download Button",description:"A button in the toolbar of a code block adding a convenient way to download a code file.",owner:"Golmote",require:"toolbar",noCSS:!0},"match-braces":{title:"Match braces",description:"Highlights matching braces.",owner:"RunDevelopment"},"diff-highlight":{title:"Diff Highlight",description:"Highlights the code inside diff blocks.",owner:"RunDevelopment",require:"diff"},"filter-highlight-all":{title:"Filter highlightAll",description:"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.",owner:"RunDevelopment",noCSS:!0},treeview:{title:"Treeview",description:"A language with special styles to highlight file system tree structures.",owner:"Golmote"}}})},2885:(e,t,n)=>{const r=n(9901),o=n(9642),a=new Set;function i(e){void 0===e?e=Object.keys(r.languages).filter((e=>"meta"!=e)):Array.isArray(e)||(e=[e]);const t=[...a,...Object.keys(Prism.languages)];o(r,e,t).load((e=>{if(!(e in r.languages))return void(i.silent||console.warn("Language does not exist: "+e));const t="./prism-"+e;delete n.c[n(6500).resolve(t)],delete Prism.languages[e],n(6500)(t),a.add(e)}))}i.silent=!1,e.exports=i},6854:()=>{!function(e){function t(e,t){return"___"+e.toUpperCase()+t+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,r,o,a){if(n.language===r){var i=n.tokenStack=[];n.code=n.code.replace(o,(function(e){if("function"==typeof a&&!a(e))return e;for(var o,l=i.length;-1!==n.code.indexOf(o=t(r,l));)++l;return i[l]=e,o})),n.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(n,r){if(n.language===r&&n.tokenStack){n.grammar=e.languages[r];var o=0,a=Object.keys(n.tokenStack);!function i(l){for(var s=0;s=a.length);s++){var c=l[s];if("string"==typeof c||c.content&&"string"==typeof c.content){var u=a[o],d=n.tokenStack[u],f="string"==typeof c?c:c.content,p=t(r,u),m=f.indexOf(p);if(m>-1){++o;var g=f.substring(0,m),h=new e.Token(r,e.tokenize(d,n.grammar),"language-"+r,d),b=f.substring(m+p.length),y=[];g&&y.push.apply(y,i([g])),y.push(h),b&&y.push.apply(y,i([b])),"string"==typeof c?l.splice.apply(l,[s,1].concat(y)):c.content=y}}else c.content&&i(c.content)}return l}(n.tokens)}}}})}(Prism)},6726:(e,t,n)=>{var r={"./":2885};function o(e){var t=a(e);return n(t)}function a(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}o.keys=function(){return Object.keys(r)},o.resolve=a,e.exports=o,o.id=6726},6500:(e,t,n)=>{var r={"./":2885};function o(e){var t=a(e);return n(t)}function a(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}o.keys=function(){return Object.keys(r)},o.resolve=a,e.exports=o,o.id=6500},9642:e=>{"use strict";var t=function(){var e=function(){};function t(e,t){Array.isArray(e)?e.forEach(t):null!=e&&t(e,0)}function n(e){for(var t={},n=0,r=e.length;n "));var l={},s=e[r];if(s){function c(t){if(!(t in e))throw new Error(r+" depends on an unknown component "+t);if(!(t in l))for(var i in o(t,a),l[t]=!0,n[t])l[i]=!0}t(s.require,c),t(s.optional,c),t(s.modify,c)}n[r]=l,a.pop()}}return function(e){var t=n[e];return t||(o(e,r),t=n[e]),t}}function o(e){for(var t in e)return!0;return!1}return function(a,i,l){var s=function(e){var t={};for(var n in e){var r=e[n];for(var o in r)if("meta"!=o){var a=r[o];t[o]="string"==typeof a?{title:a}:a}}return t}(a),c=function(e){var n;return function(r){if(r in e)return r;if(!n)for(var o in n={},e){var a=e[o];t(a&&a.alias,(function(t){if(t in n)throw new Error(t+" cannot be alias for both "+o+" and "+n[t]);if(t in e)throw new Error(t+" cannot be alias of "+o+" because it is a component.");n[t]=o}))}return n[r]||r}}(s);i=i.map(c),l=(l||[]).map(c);var u=n(i),d=n(l);i.forEach((function e(n){var r=s[n];t(r&&r.require,(function(t){t in d||(u[t]=!0,e(t))}))}));for(var f,p=r(s),m=u;o(m);){for(var g in f={},m){var h=s[g];t(h&&h.modify,(function(e){e in d&&(f[e]=!0)}))}for(var b in d)if(!(b in u))for(var y in p(b))if(y in u){f[b]=!0;break}for(var v in m=f)u[v]=!0}var k={getIds:function(){var e=[];return k.load((function(t){e.push(t)})),e},load:function(t,n){return function(t,n,r,o){var a=o?o.series:void 0,i=o?o.parallel:e,l={},s={};function c(e){if(e in l)return l[e];s[e]=!0;var o,u=[];for(var d in t(e))d in n&&u.push(d);if(0===u.length)o=r(e);else{var f=i(u.map((function(e){var t=c(e);return delete s[e],t})));a?o=a(f,(function(){return r(e)})):r(e)}return l[e]=o}for(var u in n)c(u);var d=[];for(var f in s)d.push(l[f]);return i(d)}(p,u,t,n)}};return k}}();e.exports=t},2703:(e,t,n)=>{"use strict";var r=n(414);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:o};return n.PropTypes=n,n}},5697:(e,t,n)=>{e.exports=n(2703)()},414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},4448:(e,t,n)=>{"use strict";var r=n(7294),o=n(3840);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n