@omniharmonic/openspace-cli 0.1.13 → 0.1.14

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.
@@ -24377,14 +24377,21 @@ var TypographyChoicesSchema = named(
24377
24377
  );
24378
24378
  var LayoutChoicesSchema = named(
24379
24379
  "LayoutChoices",
24380
- "Page rhythm: content width and narrow width (px), section padding (px at desktop and on phones), side gutter.",
24380
+ "Page rhythm: content width and narrow width (px), section padding (px at desktop and on phones), side gutter, and an optional raised content card over a page background.",
24381
24381
  external_exports.strictObject({
24382
24382
  contentWidth: external_exports.int().min(480).max(2400).optional(),
24383
24383
  narrowWidth: external_exports.int().min(360).max(1600).optional(),
24384
24384
  sectionPadding: external_exports.int().min(0).max(320).optional(),
24385
24385
  sectionPaddingMobile: external_exports.int().min(0).max(240).optional(),
24386
24386
  gutter: external_exports.int().min(0).max(160).optional(),
24387
- gutterMobile: external_exports.int().min(0).max(80).optional()
24387
+ gutterMobile: external_exports.int().min(0).max(80).optional(),
24388
+ /**
24389
+ * `card`: the page's sections sit on a raised panel over the page background (a blog
24390
+ * theme's content card); absent or `none`: sections run edge to edge.
24391
+ */
24392
+ surface: external_exports.enum(["none", "card"]).optional(),
24393
+ /** The page background around a `card` surface (absent: the light theme's muted surface). */
24394
+ pageBackground: CssColorSchema.optional()
24388
24395
  })
24389
24396
  );
24390
24397
  var StyleChoicesSchema = named(
@@ -28682,12 +28689,18 @@ function PageView(props) {
28682
28689
  const heroTheme = visible[0]?.style.colorTheme ?? "light";
28683
28690
  const cart = doc.site.integrations?.stripeConnected ?? false;
28684
28691
  const logoVars = header.logoHeight ? responsiveVars("logo-h", header.logoHeight, (px) => `${px}px`) : void 0;
28692
+ const pageBg = doc.styles.choices.layout?.pageBackground;
28693
+ const pageVars = pageBg && doc.styles.choices.layout?.surface === "card" ? { ...logoVars ?? {}, "--page-bg": pageBg } : logoVars;
28685
28694
  const content = /* @__PURE__ */ jsx10(RenderContext.Provider, { value: { doc, page, mode, basePath, hubUrl }, children: /* @__PURE__ */ jsx10(ImageResolverContext.Provider, { value: imageMap, children: /* @__PURE__ */ jsxs7(
28686
28695
  "div",
28687
28696
  {
28688
- className: cx("os-page", header.overlay && !header.hidden && "has-overlay-header"),
28697
+ className: cx(
28698
+ "os-page",
28699
+ header.overlay && !header.hidden && "has-overlay-header",
28700
+ doc.styles.choices.layout?.surface === "card" && "has-surface-card"
28701
+ ),
28689
28702
  "data-os-page": page.id,
28690
- style: logoVars,
28703
+ style: pageVars,
28691
28704
  children: [
28692
28705
  /* @__PURE__ */ jsx10("a", { className: "os-skip-link", href: "#main", children: "Skip to content" }),
28693
28706
  /* @__PURE__ */ jsx10(AnnouncementBar, { announcement: doc.site.announcement }),
@@ -28951,6 +28964,8 @@ ${button("tertiary")}
28951
28964
  .os-header__brand--split,.os-nav,.os-header__tagline{display:none}
28952
28965
  .os-header__actions{display:none;align-items:center;gap:${v(T.space.xs)}}
28953
28966
  .os-header__actions .os-button{min-height:2.5rem;padding-block:0.5rem}
28967
+ /* A short label stays on one line beside narrow columns (it wraps on phones if it must). */
28968
+ @media (min-width:768px){.os-button{white-space:nowrap;flex-shrink:0}}
28954
28969
  .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}
28955
28970
  .os-header__toggle:hover,.os-header__cart:hover,.os-menu__close:hover{background:${v(c2.surface)}}
28956
28971
  html:not(.os-js) .os-header__toggle{display:none}
@@ -29020,7 +29035,7 @@ html:not(.os-js) .os-header__toggle{display:none}
29020
29035
  .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}
29021
29036
  .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)}
29022
29037
  .os-header--sidebar-left .os-header__brand{flex-direction:column;align-items:flex-start;gap:0.75rem;margin:0}
29023
- .os-header--sidebar-left .os-header__logo{height:auto;max-inline-size:min(100%,8rem)}
29038
+ .os-header--sidebar-left .os-header__logo{height:var(--logo-h,auto);max-block-size:var(--logo-h,8rem);max-inline-size:100%;width:auto}
29024
29039
  .os-header.os-header--sidebar-left .os-header__title{white-space:normal;max-inline-size:none}
29025
29040
  .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"])}}
29026
29041
  .os-header--sidebar-left .os-nav{inline-size:100%;margin-block-start:${v(T.space.sm)}}
@@ -29053,6 +29068,13 @@ html:not(.os-js) .os-header__toggle{display:none}
29053
29068
  @media (min-width:768px){.os-header__logo{height:var(--tlogo-h,2.5rem)}}
29054
29069
  @media (min-width:1200px){.os-header__logo{height:var(--logo-h,2.5rem)}}
29055
29070
 
29071
+ /* A raised content card over the page background (Site Styles \u2192 layout.surface "card"). */
29072
+ .os-page.has-surface-card{background:var(--page-bg,${v(c2.surface)})}
29073
+ @media (min-width:768px){
29074
+ .has-surface-card>.os-main{flex:none;margin:8.3333% 8.3333% 0;padding-block:8.3333% 0;background:${v(c2.background)};box-shadow:0 0 1px rgb(0 0 0 / 0.15)}
29075
+ .has-surface-card>.os-footer{margin:8.3333% 8.3333% 8.3333%;box-shadow:0 0 1px rgb(0 0 0 / 0.15)}
29076
+ }
29077
+
29056
29078
  /* Footer */
29057
29079
  .os-footer{margin-top:auto}
29058
29080
  .os-footer .os-footer__section:not(.has-pad){padding-block:${v(T.space["2xl"])}}
@@ -32991,7 +33013,19 @@ var productBlock = defineBlock({
32991
33013
  }),
32992
33014
  quantity: f.boolean({ default: true, label: "Quantity picker" }),
32993
33015
  buttonLabel: f.text({ maxLength: 30, default: "Add to cart" }),
32994
- detailsLabel: f.text({ maxLength: 30, default: "View details" })
33016
+ detailsLabel: f.text({ maxLength: 30, default: "View details" }),
33017
+ showPrice: f.boolean({ optional: true, label: "Show the price", help: "On unless turned off" }),
33018
+ showBuy: f.boolean({
33019
+ optional: true,
33020
+ label: "Show Add to cart",
33021
+ help: "Off: just the picture and name, linking to the product's page (a shop grid)"
33022
+ }),
33023
+ imageAspect: f.select({
33024
+ options: ASPECT_OPTIONS,
33025
+ optional: true,
33026
+ label: "Image shape",
33027
+ help: "Crop for the product photo (default portrait 4:5)"
33028
+ })
32995
33029
  },
32996
33030
  variants: ["card", "split", "minimal"],
32997
33031
  styleSlots: [
@@ -33054,7 +33088,7 @@ var productBlock = defineBlock({
33054
33088
  Img,
33055
33089
  {
33056
33090
  src: image3,
33057
- aspect: "4:5",
33091
+ aspect: fields.imageAspect ?? "4:5",
33058
33092
  sizes: variant === "split" ? "(min-width: 768px) 50vw, 100vw" : "(min-width: 768px) 40vw, 100vw",
33059
33093
  className: cx("os-product__image", imageClass)
33060
33094
  }
@@ -33070,9 +33104,9 @@ var productBlock = defineBlock({
33070
33104
  children: /* @__PURE__ */ jsx22("a", { className: "os-product__link", href, children: fm.title })
33071
33105
  }
33072
33106
  ) : null,
33073
- price ? /* @__PURE__ */ jsx22("p", { className: "os-product__price", children: /* @__PURE__ */ jsx22(PriceText, { price }) }) : null,
33107
+ price && fields.showPrice !== false ? /* @__PURE__ */ jsx22("p", { className: "os-product__price", children: /* @__PURE__ */ jsx22(PriceText, { price }) }) : null,
33074
33108
  fields.showDescription && fm.excerpt ? /* @__PURE__ */ jsx22("p", { className: "os-product__desc", children: fm.excerpt }) : null,
33075
- firstAvailable && !canSell ? /* @__PURE__ */ jsx22(
33109
+ fields.showBuy === false ? null : firstAvailable && !canSell ? /* @__PURE__ */ jsx22(
33076
33110
  OpeningSoon,
33077
33111
  {
33078
33112
  kind: "store",
@@ -33134,7 +33168,7 @@ var productBlock = defineBlock({
33134
33168
  )
33135
33169
  ] })
33136
33170
  ] }) : options.length ? /* @__PURE__ */ jsx22("p", { className: "os-product__soldout", children: "Sold out" }) : /* @__PURE__ */ jsx22(EditorNotice, { children: "Give this product a SKU so it can be added to the cart." }),
33137
- fields.detailsLabel ? /* @__PURE__ */ jsxs18("a", { className: "os-product__details", href, children: [
33171
+ fields.detailsLabel && fields.showBuy !== false ? /* @__PURE__ */ jsxs18("a", { className: "os-product__details", href, children: [
33138
33172
  fields.detailsLabel,
33139
33173
  /* @__PURE__ */ jsxs18("span", { className: "os-visually-hidden", children: [
33140
33174
  ": ",
@@ -34205,6 +34239,15 @@ var galleryBlock = defineBlock({
34205
34239
  display: "segmented",
34206
34240
  help: "Columns on wide screens (grid and masonry)"
34207
34241
  }),
34242
+ fit: f.select({
34243
+ options: [
34244
+ { value: "cover", label: "Fill the frame" },
34245
+ { value: "contain", label: "Show whole photos" }
34246
+ ],
34247
+ optional: true,
34248
+ label: "Fit",
34249
+ help: "Slideshows and carousels: crop each photo to the frame, or show it whole inside it"
34250
+ }),
34208
34251
  lightbox: f.boolean({ default: true, help: "Open photos in a full-screen viewer" }),
34209
34252
  showCaptions: f.boolean({ default: false, label: "Show captions" })
34210
34253
  },
@@ -34241,7 +34284,15 @@ function Gallery({ id, fields, variant }) {
34241
34284
  const lightbox = fields.lightbox && fields.images.some((i) => !i.link);
34242
34285
  const carousel = variant === "carousel" || variant === "slideshow";
34243
34286
  const media2 = (item3, i) => {
34244
- const img = /* @__PURE__ */ jsx28(Img, { src: item3.image, sizes, aspect: crop ?? "original" });
34287
+ const img = /* @__PURE__ */ jsx28(
34288
+ Img,
34289
+ {
34290
+ src: item3.image,
34291
+ sizes,
34292
+ aspect: crop ?? "original",
34293
+ ...fields.fit === "contain" && crop ? { fit: "contain" } : {}
34294
+ }
34295
+ );
34245
34296
  if (item3.link)
34246
34297
  return /* @__PURE__ */ jsx28(Link, { to: item3.link, className: "os-gallery__link", children: img });
34247
34298
  if (fields.lightbox)
@@ -34315,7 +34366,7 @@ var galleryCss = `
34315
34366
  .os-gallery--grid .os-gallery__items{display:grid;gap:var(--os-space-xs);grid-template-columns:repeat(2,minmax(0,1fr))}
34316
34367
  @container block (min-width:44rem){.os-gallery--grid .os-gallery__items{grid-template-columns:repeat(var(--g-tcols,3),minmax(0,1fr));gap:var(--os-space-sm)}}
34317
34368
  @container block (min-width:64rem){.os-gallery--grid .os-gallery__items{grid-template-columns:repeat(var(--g-cols,3),minmax(0,1fr))}}
34318
- @container block (max-width:24rem){.os-gallery--grid .os-gallery__items{grid-template-columns:minmax(0,1fr)}}
34369
+ @container block (max-width:20rem){.os-gallery--grid .os-gallery__items{grid-template-columns:minmax(0,1fr)}}
34319
34370
 
34320
34371
  .os-gallery--masonry .os-gallery__items{columns:2;column-gap:var(--os-space-xs)}
34321
34372
  .os-gallery--masonry .os-gallery__item{break-inside:avoid;margin-bottom:var(--os-space-xs)}
@@ -34563,7 +34614,13 @@ var imageBlock = defineBlock({
34563
34614
  aspect: aspectField("4:5"),
34564
34615
  caption: f.text({ optional: true, maxLength: 200, ai: "Optional; one short sentence." }),
34565
34616
  link: f.link({ optional: true, help: "Make the whole image a link" }),
34566
- lightbox: f.boolean({ default: false, help: "Open a larger view when clicked" })
34617
+ lightbox: f.boolean({ default: false, help: "Open a larger view when clicked" }),
34618
+ size: f.select({
34619
+ options: ["fill", "original"],
34620
+ optional: true,
34621
+ label: "Size",
34622
+ help: "Fill the column, or show the picture no wider than its own size (a book cover, a small portrait)"
34623
+ })
34567
34624
  },
34568
34625
  variants: ["default", "caption-overlay", "inset"],
34569
34626
  styleSlots: ["radius", "shadow", "imageTreatment", "align", "padding", "animation"],
@@ -34628,10 +34685,12 @@ function ImageView({ id, fields, variant }) {
34628
34685
  }
34629
34686
  );
34630
34687
  }
34688
+ const natural = !grid2 && fields.size === "original" && fields.image.width ? fields.image.width : 0;
34631
34689
  return /* @__PURE__ */ jsxs24(
34632
34690
  "figure",
34633
34691
  {
34634
- className: cx("os-image", `os-image--${variant}`, grid2 && "is-fill"),
34692
+ className: cx("os-image", `os-image--${variant}`, grid2 && "is-fill", natural && "is-natural"),
34693
+ style: natural ? { "--image-max": `${natural}px` } : void 0,
34635
34694
  "data-os-behavior": !fields.link && fields.lightbox ? "lightbox" : void 0,
34636
34695
  children: [
34637
34696
  media2,
@@ -34643,7 +34702,13 @@ function ImageView({ id, fields, variant }) {
34643
34702
  var imageCss = `
34644
34703
  .os-image{position:relative;display:grid;gap:var(--os-space-2xs)}
34645
34704
  .os-image.is-fill{height:100%;grid-template-rows:minmax(0,1fr);grid-auto-rows:auto}
34646
- .os-image.is-fill>.os-image__link{display:block;height:100%}
34705
+ .os-image.is-fill>.os-image.is-natural{max-inline-size:min(100%,var(--image-max))}
34706
+ .os-align-center .os-image.is-natural,.os-align-center>.os-image.is-natural{margin-inline:auto}
34707
+ .os-align-end .os-image.is-natural{margin-inline-start:auto}
34708
+ .os-image__link{display:block;height:100%}
34709
+ .os-image.is-natural{max-inline-size:min(100%,var(--image-max))}
34710
+ .os-align-center .os-image.is-natural,.os-align-center>.os-image.is-natural{margin-inline:auto}
34711
+ .os-align-end .os-image.is-natural{margin-inline-start:auto}
34647
34712
  .os-image__link{display:block;color:inherit;border-radius:var(--os-image-radius)}
34648
34713
  .os-image__caption{font-size:var(--os-type-small-font-size);line-height:var(--os-type-small-line-height);color:var(--os-color-text-muted)}
34649
34714
  .os-image--caption-overlay .os-image__caption{position:absolute;inset:auto 0 0 0;z-index:2;padding:var(--os-space-lg) var(--os-space-sm) var(--os-space-xs);color:var(--os-color-neutral-50);background:linear-gradient(to top,color-mix(in oklab,var(--os-color-neutral-950) 62%,transparent),color-mix(in oklab,var(--os-color-neutral-950) 0%,transparent));border-radius:0 0 var(--os-image-radius) var(--os-image-radius);pointer-events:none}
@@ -53244,4 +53309,4 @@ lucide/dist/esm/lucide.mjs:
53244
53309
  * See the LICENSE file in the root directory of this source tree.
53245
53310
  *)
53246
53311
  */
53247
- //# sourceMappingURL=chunk-IXN2CNGL.js.map
53312
+ //# sourceMappingURL=chunk-SY5NDWS2.js.map