@omniharmonic/openspace-cli 0.1.6 → 0.1.7

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.
@@ -28384,9 +28384,70 @@ function useSiteServer() {
28384
28384
  const { doc } = useRenderContext();
28385
28385
  return !doc || doc.config.deploy.target === "cloudflare";
28386
28386
  }
28387
- function UnavailableNotice({ children, hint }) {
28387
+ var ELSEWHERE_PATHS = {
28388
+ store: "/shop-elsewhere",
28389
+ donations: "/give-elsewhere"
28390
+ };
28391
+ var SECONDARY = "secondary";
28392
+ var SOON_COPY = {
28393
+ store: {
28394
+ title: "Online ordering opens here soon.",
28395
+ text: "Have a look around \u2014 you'll be able to order right here very soon.",
28396
+ elsewhere: "Until then, you can order from our current shop.",
28397
+ button: "Order from our current shop",
28398
+ icon: "shopping-bag"
28399
+ },
28400
+ donations: {
28401
+ title: "Online giving opens here soon.",
28402
+ text: "Thank you for wanting to help \u2014 you'll be able to give right here very soon.",
28403
+ elsewhere: "Until then, you can give on our current donation page.",
28404
+ button: "Give on our current page",
28405
+ icon: "hand-heart"
28406
+ },
28407
+ members: {
28408
+ title: "Member sign-in opens here soon.",
28409
+ text: "Members will be able to sign in right here very soon.",
28410
+ elsewhere: "",
28411
+ button: "",
28412
+ icon: "key-round"
28413
+ }
28414
+ };
28415
+ function useElsewhere(kind) {
28416
+ const { doc } = useRenderContext();
28417
+ if (kind === "members") return null;
28418
+ const from = ELSEWHERE_PATHS[kind];
28419
+ const hit = doc?.site.redirects?.find((r2) => r2.from.replace(/\/+$/, "") === from);
28420
+ return hit?.to ?? null;
28421
+ }
28422
+ function OpeningSoon({
28423
+ kind,
28424
+ hint,
28425
+ compact
28426
+ }) {
28427
+ const copy2 = SOON_COPY[kind];
28428
+ const elsewhere = useElsewhere(kind);
28429
+ if (compact)
28430
+ return /* @__PURE__ */ jsxs7(Fragment5, { children: [
28431
+ /* @__PURE__ */ jsx11("p", { className: cx("os-unavailable", "os-soon", "os-soon--compact"), children: copy2.title }),
28432
+ /* @__PURE__ */ jsx11(EditorNotice, { children: hint })
28433
+ ] });
28388
28434
  return /* @__PURE__ */ jsxs7(Fragment5, { children: [
28389
- /* @__PURE__ */ jsx11("p", { className: "os-unavailable", children }),
28435
+ /* @__PURE__ */ jsxs7("div", { className: cx("os-soon", `os-soon--${kind}`), children: [
28436
+ /* @__PURE__ */ jsx11("span", { className: "os-soon__mark", "aria-hidden": "true", children: /* @__PURE__ */ jsx11(Icon, { name: copy2.icon, size: 20 }) }),
28437
+ /* @__PURE__ */ jsxs7("div", { className: "os-soon__body", children: [
28438
+ /* @__PURE__ */ jsx11("p", { className: "os-unavailable os-soon__title", children: copy2.title }),
28439
+ /* @__PURE__ */ jsx11("p", { className: "os-soon__text", children: elsewhere ? copy2.elsewhere : copy2.text }),
28440
+ elsewhere ? /* @__PURE__ */ jsx11(
28441
+ Button,
28442
+ {
28443
+ to: { type: "url", url: elsewhere },
28444
+ role: SECONDARY,
28445
+ className: "os-soon__link",
28446
+ children: copy2.button
28447
+ }
28448
+ ) : null
28449
+ ] })
28450
+ ] }),
28390
28451
  /* @__PURE__ */ jsx11(EditorNotice, { children: hint })
28391
28452
  ] });
28392
28453
  }
@@ -29788,7 +29849,7 @@ var chartCss = `
29788
29849
 
29789
29850
  // ../blocks/src/blocks/collections.tsx
29790
29851
  import { Fragment as Fragment7, jsx as jsx19, jsxs as jsxs15 } from "react/jsx-runtime";
29791
- var SECONDARY = "secondary";
29852
+ var SECONDARY2 = "secondary";
29792
29853
  function itemImage(item3) {
29793
29854
  const fm = item3.frontmatter;
29794
29855
  if (fm.image) return { src: fm.image, alt: fm.imageAlt ?? "" };
@@ -29903,7 +29964,7 @@ var summaryBlock = defineBlock({
29903
29964
  const items = useCollectionQuery(fields.source);
29904
29965
  const columns2 = Number(fields.columns);
29905
29966
  const heading2 = fields.heading ? /* @__PURE__ */ jsx19(HTag, { className: "os-summary__heading os-type-h3", id: sub(id, "h"), children: fields.heading }) : null;
29906
- const footer = fields.linkLabel && fields.link ? /* @__PURE__ */ jsx19("div", { className: "os-summary__foot", children: /* @__PURE__ */ jsx19(Button, { to: fields.link, role: SECONDARY, children: fields.linkLabel }) }) : null;
29967
+ const footer = fields.linkLabel && fields.link ? /* @__PURE__ */ jsx19("div", { className: "os-summary__foot", children: /* @__PURE__ */ jsx19(Button, { to: fields.link, role: SECONDARY2, children: fields.linkLabel }) }) : null;
29907
29968
  if (!items.length)
29908
29969
  return /* @__PURE__ */ jsxs15("div", { className: cx("os-summary", `os-summary--${variant}`), children: [
29909
29970
  heading2,
@@ -30735,7 +30796,13 @@ var productBlock = defineBlock({
30735
30796
  ),
30736
30797
  price ? /* @__PURE__ */ jsx21("p", { className: "os-product__price", children: /* @__PURE__ */ jsx21(PriceText, { price }) }) : null,
30737
30798
  fields.showDescription && fm.excerpt ? /* @__PURE__ */ jsx21("p", { className: "os-product__desc", children: fm.excerpt }) : null,
30738
- firstAvailable && !canSell ? /* @__PURE__ */ jsx21(UnavailableNotice, { hint: "Checkout needs the Cloudflare hosting option and a connected Stripe account (Settings \u2192 Hosting). Until then visitors see this message instead of \u201CAdd to cart\u201D.", children: "Online ordering isn't open yet." }) : firstAvailable ? /* @__PURE__ */ jsxs17("div", { className: "os-product__buy", children: [
30799
+ firstAvailable && !canSell ? /* @__PURE__ */ jsx21(
30800
+ OpeningSoon,
30801
+ {
30802
+ kind: "store",
30803
+ hint: "Visitors see this friendly \u201Copening soon\u201D note instead of \u201CAdd to cart\u201D until you turn on your shop in Finish setting up (about 10 minutes, free)."
30804
+ }
30805
+ ) : firstAvailable ? /* @__PURE__ */ jsxs17("div", { className: "os-product__buy", children: [
30739
30806
  options.length > 1 ? /* @__PURE__ */ jsxs17("div", { className: "os-field os-product__option", children: [
30740
30807
  /* @__PURE__ */ jsx21("label", { className: "os-label", htmlFor: pickId, children: fm.options?.map((o) => o.name).join(" / ") || "Option" }),
30741
30808
  /* @__PURE__ */ jsx21("select", { className: "os-select", id: pickId, defaultValue: firstAvailable.sku, children: options.map((o) => /* @__PURE__ */ jsxs17(
@@ -30903,7 +30970,13 @@ var donationBlock = defineBlock({
30903
30970
  if (!canCheckout) {
30904
30971
  return /* @__PURE__ */ jsxs17("div", { className: cx("os-donation", `os-donation--${variant}`), children: [
30905
30972
  intro10,
30906
- /* @__PURE__ */ jsx21(UnavailableNotice, { hint: "Donations through Stripe need the Cloudflare hosting option (Settings \u2192 Hosting). Until then visitors see this message \u2014 or choose \u201CLink to another donation page\u201D to take gifts now.", children: "Online giving isn't open yet." })
30973
+ /* @__PURE__ */ jsx21(
30974
+ OpeningSoon,
30975
+ {
30976
+ kind: "donations",
30977
+ hint: "Visitors see this friendly \u201Copening soon\u201D note until you turn on donations in Finish setting up \u2014 or choose \u201CLink to another donation page\u201D to take gifts today."
30978
+ }
30979
+ )
30907
30980
  ] });
30908
30981
  }
30909
30982
  const amountName = "amount";
@@ -32879,7 +32952,14 @@ var memberLoginBlock = defineBlock({
32879
32952
  const { hub, siteId } = useHub();
32880
32953
  const source = useSourcePath();
32881
32954
  const canSignIn = useSiteServer();
32882
- const unavailable = /* @__PURE__ */ jsx34(UnavailableNotice, { hint: "Member sign-in needs the Cloudflare hosting option (Settings \u2192 Hosting). Until then visitors see this message instead of a sign-in form.", children: "Member sign-in isn't open yet." });
32955
+ const unavailable = /* @__PURE__ */ jsx34(
32956
+ OpeningSoon,
32957
+ {
32958
+ kind: "members",
32959
+ compact: variant !== "form",
32960
+ hint: "Visitors see this friendly \u201Copening soon\u201D note instead of a sign-in form until you turn on member sign-in in Finish setting up."
32961
+ }
32962
+ );
32883
32963
  const heading2 = fields.heading ? /* @__PURE__ */ jsx34(
32884
32964
  HTag,
32885
32965
  {
@@ -34185,7 +34265,7 @@ var socialCss = `
34185
34265
 
34186
34266
  // ../blocks/src/blocks/social-feed.tsx
34187
34267
  import { jsx as jsx42, jsxs as jsxs36 } from "react/jsx-runtime";
34188
- var SECONDARY2 = "secondary";
34268
+ var SECONDARY3 = "secondary";
34189
34269
  var NETWORKS = ["instagram", "bluesky", "mastodon", "pinterest", "tiktok", "youtube"];
34190
34270
  function profileUrl(network, handle) {
34191
34271
  const h = handle.trim().replace(/^@/, "");
@@ -34267,7 +34347,7 @@ var socialFeedBlock = defineBlock({
34267
34347
  Button,
34268
34348
  {
34269
34349
  to: { type: "url", url: profile, newTab: true },
34270
- role: SECONDARY2,
34350
+ role: SECONDARY3,
34271
34351
  className: "os-feed__follow",
34272
34352
  children: [
34273
34353
  /* @__PURE__ */ jsx42(SocialIcon, { network }),
@@ -35113,6 +35193,13 @@ ${[
35113
35193
  commerceCss,
35114
35194
  membersCss,
35115
35195
  `.os-unavailable{margin:0;padding:var(--os-space-xs) var(--os-space-sm);border-inline-start:3px solid var(--os-color-text-muted);background:var(--os-color-surface);border-radius:var(--os-radius-sm);color:var(--os-color-text);max-inline-size:var(--os-measure)}`,
35196
+ `.os-soon{display:flex;gap:var(--os-space-sm);align-items:flex-start;padding:var(--os-space-md);border-radius:var(--os-radius-card);background:color-mix(in srgb,var(--os-color-accent) 7%,var(--os-color-surface));border:1px solid color-mix(in srgb,var(--os-color-accent) 24%,transparent);color:var(--os-color-text);max-inline-size:var(--os-measure);text-align:start}`,
35197
+ `.os-soon__mark{flex:none;display:grid;place-items:center;inline-size:2.5rem;block-size:2.5rem;border-radius:var(--os-radius-full);background:var(--os-color-accent);color:var(--os-color-accent-text)}`,
35198
+ `.os-soon__body{min-inline-size:0}`,
35199
+ `.os-soon .os-soon__title{margin:0;padding:0;border:0;background:none;font-family:var(--os-type-h4-font-family);font-weight:var(--os-type-h4-font-weight);letter-spacing:var(--os-type-h4-letter-spacing);color:var(--os-color-heading)}`,
35200
+ `.os-soon__text{margin:var(--os-space-3xs) 0 0;color:var(--os-color-text-muted);font-size:var(--os-type-small-font-size);line-height:var(--os-type-small-line-height)}`,
35201
+ `.os-soon__link{margin-block-start:var(--os-space-sm)}`,
35202
+ `.os-soon.os-soon--compact{display:block;padding:var(--os-space-xs) var(--os-space-sm);border-radius:var(--os-radius-full);font-weight:var(--os-type-h4-font-weight)}`,
35116
35203
  `.os-empty{margin:0;padding:var(--os-space-xs) var(--os-space-sm);border:1px dashed var(--os-color-text-muted);border-radius:var(--os-radius-sm);font-size:var(--os-type-small-font-size);color:var(--os-color-text-muted)}`
35117
35204
  ].map((s) => s.trim()).join("\n")}
35118
35205
  }
@@ -49880,4 +49967,4 @@ lucide/dist/esm/lucide.mjs:
49880
49967
  * See the LICENSE file in the root directory of this source tree.
49881
49968
  *)
49882
49969
  */
49883
- //# sourceMappingURL=chunk-BW42R6WD.js.map
49970
+ //# sourceMappingURL=chunk-KAJOS2YV.js.map