@omniharmonic/openspace-cli 0.1.11 → 0.1.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -20415,7 +20415,15 @@ var HEADER_VARIANTS = [
20415
20415
  /** Navigation lives in a side drawer opened from the header. */
20416
20416
  "sidebar-drawer",
20417
20417
  /** Header overlays the first section (transparent until scrolled). */
20418
- "transparent-overlay"
20418
+ "transparent-overlay",
20419
+ /** Navigation on the left, logo centered, buttons and cart on the right. */
20420
+ "nav-left-logo-center",
20421
+ /**
20422
+ * A column down the left on wide screens (logo, title, tagline, the navigation as a list),
20423
+ * the page to its right; a top bar with a menu button on phones. Sidebar themes (WordPress
20424
+ * Twenty Fifteen and the like).
20425
+ */
20426
+ "sidebar-left"
20419
20427
  ];
20420
20428
  var HeaderVariantSchema = external_exports.enum(HEADER_VARIANTS);
20421
20429
  var MOBILE_MENU_STYLES = ["slide", "fullscreen", "dropdown"];
@@ -28277,22 +28285,29 @@ function navFit(input2) {
28277
28285
  if (need(29) <= 1440 - 96) return "wide";
28278
28286
  return "collapse";
28279
28287
  }
28280
- function Brand({ site, className }) {
28288
+ function Brand({
28289
+ site,
28290
+ className,
28291
+ withTitle
28292
+ }) {
28281
28293
  const { basePath } = useRenderContext();
28282
28294
  const logo = site.logo;
28283
- return /* @__PURE__ */ jsx9("a", { className: cx("os-header__brand", className), href: `${normalizeBasePath(basePath)}/`, children: logo ? /* @__PURE__ */ jsx9(
28284
- Img,
28285
- {
28286
- src: logo.src,
28287
- alt: logo.alt || site.title,
28288
- ...logo.width ? { width: logo.width } : {},
28289
- ...logo.height ? { height: logo.height } : {},
28290
- sizes: "240px",
28291
- treatment: "none",
28292
- priority: true,
28293
- className: "os-header__logo"
28294
- }
28295
- ) : /* @__PURE__ */ jsx9("span", { className: "os-header__title", children: site.title }) });
28295
+ return /* @__PURE__ */ jsxs6("a", { className: cx("os-header__brand", className), href: `${normalizeBasePath(basePath)}/`, children: [
28296
+ logo ? /* @__PURE__ */ jsx9(
28297
+ Img,
28298
+ {
28299
+ src: logo.src,
28300
+ alt: withTitle ? "" : logo.alt || site.title,
28301
+ ...logo.width ? { width: logo.width } : {},
28302
+ ...logo.height ? { height: logo.height } : {},
28303
+ sizes: "240px",
28304
+ treatment: "none",
28305
+ priority: true,
28306
+ className: "os-header__logo"
28307
+ }
28308
+ ) : null,
28309
+ !logo || withTitle ? /* @__PURE__ */ jsx9("span", { className: "os-header__title", children: site.title }) : null
28310
+ ] });
28296
28311
  }
28297
28312
  function MenuIcon() {
28298
28313
  return /* @__PURE__ */ jsx9(
@@ -28352,7 +28367,8 @@ function Header({ site, page, heroTheme, cart }) {
28352
28367
  );
28353
28368
  const social3 = h.showSocial ? site.social ?? [] : [];
28354
28369
  const theme = h.overlay && heroTheme ? heroTheme : h.colorTheme ?? "light";
28355
- const fit = DRAWER_VARIANTS.includes(h.variant) ? "fits" : navFit({
28370
+ const sidebar = h.variant === "sidebar-left";
28371
+ const fit = DRAWER_VARIANTS.includes(h.variant) || sidebar ? "fits" : navFit({
28356
28372
  title: site.title,
28357
28373
  logo: site.logo,
28358
28374
  nav: nav.map((i) => ({ label: i.label, kind: i.kind })),
@@ -28396,7 +28412,15 @@ function Header({ site, page, heroTheme, cart }) {
28396
28412
  "data-os-behavior": "menu",
28397
28413
  children: [
28398
28414
  /* @__PURE__ */ jsxs6("div", { className: "os-header__bar", children: [
28399
- /* @__PURE__ */ jsx9(Brand, { site, className: split ? "os-header__brand--main" : void 0 }),
28415
+ /* @__PURE__ */ jsx9(
28416
+ Brand,
28417
+ {
28418
+ site,
28419
+ ...split ? { className: "os-header__brand--main" } : {},
28420
+ ...sidebar ? { withTitle: true } : {}
28421
+ }
28422
+ ),
28423
+ sidebar && site.tagline ? /* @__PURE__ */ jsx9("p", { className: "os-header__tagline", children: site.tagline }) : null,
28400
28424
  desktopNav,
28401
28425
  actions,
28402
28426
  cart && /* @__PURE__ */ jsx9(CartButton, {}),
@@ -28795,7 +28819,7 @@ ${button("tertiary")}
28795
28819
  .os-header__logo{height:var(--mlogo-h,2rem);width:auto;border-radius:0;background:none}
28796
28820
  .os-header__logo .os-img__img{height:100%;width:auto;object-fit:contain}
28797
28821
  .os-header__title{${typePreset("wordmark")};text-wrap:balance;overflow-wrap:break-word;max-inline-size:30ch}
28798
- .os-header__brand--split,.os-nav{display:none}
28822
+ .os-header__brand--split,.os-nav,.os-header__tagline{display:none}
28799
28823
  .os-header__actions{display:none;align-items:center;gap:${v(T.space.xs)}}
28800
28824
  .os-header__actions .os-button{min-height:2.5rem;padding-block:0.5rem}
28801
28825
  .os-header__toggle,.os-header__cart,.os-menu__close{position:relative;display:inline-grid;place-items:center;width:2.75rem;height:2.75rem;padding:0;border:0;border-radius:${v(T.radius.full)};background:transparent;color:inherit}
@@ -28858,6 +28882,24 @@ html:not(.os-js) .os-header__toggle{display:none}
28858
28882
  .os-header.os-header--split-nav .os-nav--split{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:clamp(1.5rem,3vw,3rem)}
28859
28883
  .os-header--split-nav .os-nav__list--start{justify-content:flex-end}
28860
28884
  .os-header--split-nav .os-header__brand--split{display:inline-flex;margin:0}
28885
+ .os-header--nav-left-logo-center .os-header__bar{position:relative}
28886
+ .os-header--nav-left-logo-center .os-header__brand{position:absolute;inset-inline-start:50%;translate:-50% 0;margin:0;max-inline-size:34%}
28887
+ [dir=rtl] .os-header--nav-left-logo-center .os-header__brand{translate:50% 0}
28888
+ .os-header--nav-left-logo-center .os-nav{order:-1;margin-inline-end:auto;max-inline-size:33%}
28889
+ .os-header--nav-left-logo-center .os-nav__list{justify-content:flex-start}
28890
+ .os-page:has(>.os-header--sidebar-left){--sidebar-w:clamp(16rem,28vw,28rem);padding-inline-start:var(--sidebar-w)}
28891
+ .os-header.os-header--sidebar-left{position:fixed;inset-block:0;inset-inline-start:0;inline-size:var(--sidebar-w);overflow-y:auto;overscroll-behavior:contain}
28892
+ .os-header--sidebar-left .os-header__bar{flex-direction:column;align-items:flex-start;gap:${v(T.space.sm)};min-height:0;max-inline-size:none;margin:0;padding:clamp(2rem,4vw,4rem) clamp(1.5rem,3.5vw,3.5rem)}
28893
+ .os-header--sidebar-left .os-header__brand{flex-direction:column;align-items:flex-start;gap:0.75rem;margin:0}
28894
+ .os-header--sidebar-left .os-header__logo{height:auto;max-inline-size:min(100%,8rem)}
28895
+ .os-header.os-header--sidebar-left .os-header__title{white-space:normal;max-inline-size:none}
28896
+ .os-header--sidebar-left .os-header__tagline{display:block;margin:0;font-size:${v(T.type.small["font-size"])};line-height:${v(T.type.small["line-height"])};color:${v(c2["text-muted"])}}
28897
+ .os-header--sidebar-left .os-nav{inline-size:100%;margin-block-start:${v(T.space.sm)}}
28898
+ .os-header--sidebar-left .os-nav__list{flex-direction:column;align-items:stretch;row-gap:0}
28899
+ .os-header--sidebar-left .os-nav__link{display:flex;padding-block:0.55rem;border-bottom:1px solid ${v(c2.border)};white-space:normal}
28900
+ .os-header--sidebar-left .os-nav__link::after{display:none}
28901
+ .os-header--sidebar-left .os-nav .os-nav__sub{position:static;min-width:0;padding:0 0 0 1rem;background:none;box-shadow:none;color:inherit}
28902
+ .os-header--sidebar-left .os-header__actions{flex-direction:column;align-items:flex-start}
28861
28903
  .os-header--logo-center-nav-below,.os-header--stacked{--header-row:3rem}
28862
28904
  .os-header--logo-center-nav-below .os-header__bar{display:grid;grid-template-columns:1fr auto 1fr;grid-template-areas:". brand actions" "nav nav nav";row-gap:0;padding-bottom:0}
28863
28905
  .os-header--logo-center-nav-below .os-header__brand{grid-area:brand;margin:0}
@@ -43276,6 +43318,44 @@ var headerPresets = [
43276
43318
  colorTheme: theme
43277
43319
  })
43278
43320
  }),
43321
+ defineHeaderPreset({
43322
+ category: "header",
43323
+ name: "logo-centered",
43324
+ label: "Logo centred, menu left",
43325
+ description: "The navigation on the left, a centred logo, buttons and cart on the right.",
43326
+ tags: ["boutique", "centered", "shop"],
43327
+ ai: {
43328
+ purpose: "A fashion- and boutique-style header with the brand in the middle.",
43329
+ whenToUse: "Shops and studios whose wordmark should sit centre stage.",
43330
+ avoid: HEADER_AVOID
43331
+ },
43332
+ make: (theme) => ({
43333
+ variant: "nav-left-logo-center",
43334
+ sticky: false,
43335
+ transparentOnHero: false,
43336
+ mobileMenu: "fullscreen",
43337
+ colorTheme: theme
43338
+ })
43339
+ }),
43340
+ defineHeaderPreset({
43341
+ category: "header",
43342
+ name: "sidebar",
43343
+ label: "Sidebar",
43344
+ description: "Logo, title and the menu in a column down the left; the page beside it.",
43345
+ tags: ["blog", "editorial", "sidebar"],
43346
+ ai: {
43347
+ purpose: "A blog- or journal-style layout with the site's identity always in view.",
43348
+ whenToUse: "Writers, journals and foundations with a short menu and a strong colour.",
43349
+ avoid: HEADER_AVOID
43350
+ },
43351
+ make: (theme) => ({
43352
+ variant: "sidebar-left",
43353
+ sticky: false,
43354
+ transparentOnHero: false,
43355
+ mobileMenu: "slide",
43356
+ colorTheme: theme
43357
+ })
43358
+ }),
43279
43359
  defineHeaderPreset({
43280
43360
  category: "header",
43281
43361
  name: "logo-above",
@@ -52899,6 +52979,7 @@ export {
52899
52979
  TYPE_PAIRINGS,
52900
52980
  getPairing,
52901
52981
  pairingFamilies,
52982
+ SPACE_SCALES,
52902
52983
  flattenDtcg,
52903
52984
  compileStyles,
52904
52985
  COMPONENT_PREVIEW_IDS,
@@ -53030,4 +53111,4 @@ lucide/dist/esm/lucide.mjs:
53030
53111
  * See the LICENSE file in the root directory of this source tree.
53031
53112
  *)
53032
53113
  */
53033
- //# sourceMappingURL=chunk-FPW2XAQ5.js.map
53114
+ //# sourceMappingURL=chunk-O55O7EA5.js.map