@omniharmonic/openspace-cli 0.1.11 → 0.1.13

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"];
@@ -24099,6 +24107,127 @@ var SiteConfigSchema = named(
24099
24107
  })
24100
24108
  );
24101
24109
 
24110
+ // ../schema/src/design-system.ts
24111
+ var DESIGN_SYSTEM_FILE = "content/design-system.json";
24112
+ var Text = (max) => external_exports.string().max(max);
24113
+ var DesignColorSchema = external_exports.strictObject({
24114
+ /** `#rrggbb` (or any CSS colour the theme can read). */
24115
+ value: Text(80),
24116
+ role: external_exports.enum([...COLOR_ROLES, "brand", "secondary"]).optional(),
24117
+ /** Where it is used ("labels and rules only"). */
24118
+ usage: Text(200).optional()
24119
+ });
24120
+ var DesignFontSchema = external_exports.strictObject({
24121
+ family: Text(80),
24122
+ /** The full CSS stack as given (`'Lora', Georgia, serif`). */
24123
+ stack: Text(200).optional(),
24124
+ category: external_exports.enum(["serif", "sans-serif", "monospace", "display", "handwriting"]).optional(),
24125
+ weights: external_exports.array(external_exports.int().min(100).max(900)).max(9).optional(),
24126
+ /** Served by Google Fonts (so the site can self-host it). */
24127
+ google: external_exports.boolean().optional()
24128
+ });
24129
+ var DesignTypeStepSchema = external_exports.strictObject({
24130
+ size: external_exports.number().min(6).max(240).optional(),
24131
+ sizeMobile: external_exports.number().min(6).max(200).optional(),
24132
+ lineHeight: external_exports.number().min(0.6).max(4).optional(),
24133
+ letterSpacing: external_exports.number().min(-0.5).max(2).optional(),
24134
+ weight: external_exports.int().min(100).max(900).optional(),
24135
+ case: external_exports.enum(["none", "uppercase", "lowercase", "capitalize"]).optional(),
24136
+ font: external_exports.enum(["heading", "body", "label", "mono"]).optional()
24137
+ });
24138
+ var DesignTokensSchema = external_exports.strictObject({
24139
+ colors: external_exports.record(Text(60), DesignColorSchema).optional(),
24140
+ fonts: external_exports.strictObject({
24141
+ heading: DesignFontSchema.optional(),
24142
+ body: DesignFontSchema.optional(),
24143
+ label: DesignFontSchema.optional(),
24144
+ mono: DesignFontSchema.optional()
24145
+ }).optional(),
24146
+ /** Type scale by role (`display`, `h1`…`h4`, `lead`, `body`, `small`, `eyebrow`, `button`, `nav`). */
24147
+ type: external_exports.record(Text(40), DesignTypeStepSchema).optional(),
24148
+ /** Page rhythm and spacing steps in px. */
24149
+ space: external_exports.strictObject({
24150
+ contentWidth: external_exports.number().min(0).max(4e3).optional(),
24151
+ narrowWidth: external_exports.number().min(0).max(4e3).optional(),
24152
+ sectionPadding: external_exports.number().min(0).max(400).optional(),
24153
+ sectionPaddingMobile: external_exports.number().min(0).max(400).optional(),
24154
+ gutter: external_exports.number().min(0).max(400).optional(),
24155
+ gutterMobile: external_exports.number().min(0).max(400).optional(),
24156
+ scale: external_exports.record(Text(40), external_exports.number().min(0).max(2e3)).optional()
24157
+ }).optional(),
24158
+ /** Corner radii in px (`base`, `button`, `card`, `image`; 9999 = pill). */
24159
+ radius: external_exports.record(Text(40), external_exports.number().min(0).max(1e4)).optional(),
24160
+ shadow: external_exports.record(Text(40), Text(200)).optional()
24161
+ });
24162
+ var DESIGN_SOURCE_KINDS = [
24163
+ "tokens",
24164
+ "brand-kit",
24165
+ "html",
24166
+ "brand-doc",
24167
+ "logo",
24168
+ "photos",
24169
+ "manual",
24170
+ "template",
24171
+ "claude"
24172
+ ];
24173
+ var DesignSystemSchema = named(
24174
+ "DesignSystem",
24175
+ "content/design-system.json: the brief, brand material, distilled design tokens and how they map onto Site Styles (read by Claude's design skills).",
24176
+ external_exports.strictObject({
24177
+ $schema: external_exports.string().optional(),
24178
+ version: external_exports.literal(1),
24179
+ /** The person's own words about the site (Start with Claude). */
24180
+ brief: external_exports.strictObject({
24181
+ about: Text(2e3).optional(),
24182
+ audience: Text(1e3).optional(),
24183
+ /** How it should feel ("warm", "calm", "bold"…). */
24184
+ feeling: external_exports.array(Text(40)).max(12).optional(),
24185
+ /** Anything else they said (must-haves, places they love). */
24186
+ notes: Text(2e3).optional()
24187
+ }).optional(),
24188
+ brand: external_exports.strictObject({
24189
+ name: Text(120).optional(),
24190
+ /** How the brand speaks (from a brand document, or Claude's notes). */
24191
+ voice: Text(2e3).optional(),
24192
+ /** Text of a brand document the owner brought (trimmed). */
24193
+ guidelines: Text(2e4).optional(),
24194
+ logo: MediaPathSchema.optional(),
24195
+ /** Brand photos the owner brought (media paths). */
24196
+ photos: external_exports.array(MediaPathSchema).max(24).optional(),
24197
+ /** Files kept in the repository for reference (PDF brand books…), not published. */
24198
+ documents: external_exports.array(external_exports.strictObject({ name: Text(120), path: Text(300) })).max(12).optional()
24199
+ }).optional(),
24200
+ tokens: DesignTokensSchema,
24201
+ /** Design principles to keep ("Rust is for labels and rules only; never body text"). */
24202
+ rules: external_exports.array(Text(300)).max(40).optional(),
24203
+ /** How the tokens became Site Styles: plain sentences, contrast changes included. */
24204
+ mapping: external_exports.strictObject({
24205
+ notes: external_exports.array(Text(400)).max(40),
24206
+ contrast: external_exports.array(
24207
+ external_exports.strictObject({
24208
+ theme: Text(40),
24209
+ role: Text(40),
24210
+ from: Text(40),
24211
+ to: Text(40),
24212
+ against: Text(40)
24213
+ })
24214
+ ).max(80).optional()
24215
+ }).optional(),
24216
+ /** Bespoke components and what each is for (kept in step with content/components). */
24217
+ components: external_exports.record(Text(40), external_exports.strictObject({ purpose: Text(300), source: Text(200).optional() })).optional(),
24218
+ sources: external_exports.array(
24219
+ external_exports.strictObject({
24220
+ kind: external_exports.enum(DESIGN_SOURCE_KINDS),
24221
+ name: Text(200).optional(),
24222
+ /** Token format (`dtcg`, `style-dictionary`, `tokens-studio`, `canva`, `plain`). */
24223
+ format: Text(40).optional(),
24224
+ at: Text(40).optional()
24225
+ })
24226
+ ).max(40).optional(),
24227
+ updatedAt: Text(40).optional()
24228
+ })
24229
+ );
24230
+
24102
24231
  // ../schema/src/media.ts
24103
24232
  var MEDIA_KINDS = ["image", "video", "audio", "file"];
24104
24233
  var MAX_PLACEHOLDER_LENGTH = 1024;
@@ -24366,7 +24495,12 @@ var SiteDocumentSchema = named(
24366
24495
  * Custom components by name (`content/components/<name>.json`, ADR custom-components).
24367
24496
  * Optional: documents without components are unchanged.
24368
24497
  */
24369
- components: ComponentsSchema.optional()
24498
+ components: ComponentsSchema.optional(),
24499
+ /**
24500
+ * The design-system record (`content/design-system.json`): brief, brand material, tokens and
24501
+ * their Site Styles mapping, for Claude's design skills. Optional; never rendered.
24502
+ */
24503
+ designSystem: DesignSystemSchema.optional()
24370
24504
  }).superRefine((doc, ctx) => {
24371
24505
  const slugs = /* @__PURE__ */ new Map();
24372
24506
  const sectionIds = /* @__PURE__ */ new Map();
@@ -27580,7 +27714,9 @@ function StackBody({ section: section2 }) {
27580
27714
  "os-section__inner os-stack",
27581
27715
  `os-w-${layout.width ?? "content"}`,
27582
27716
  layout.align && `is-align-${layout.align}`,
27583
- cols.length > 1 && "is-multi"
27717
+ cols.length > 1 && "is-multi",
27718
+ // A full-width designer section draws its own edges (no side gutter).
27719
+ layout.width === "full" && section2.blocks.length === 1 && section2.blocks[0]?.type.startsWith("component/") && "is-bleed"
27584
27720
  ),
27585
27721
  style: stackVars(layout),
27586
27722
  children: cols.map((blocks2, i) => {
@@ -28277,22 +28413,29 @@ function navFit(input2) {
28277
28413
  if (need(29) <= 1440 - 96) return "wide";
28278
28414
  return "collapse";
28279
28415
  }
28280
- function Brand({ site, className }) {
28416
+ function Brand({
28417
+ site,
28418
+ className,
28419
+ withTitle
28420
+ }) {
28281
28421
  const { basePath } = useRenderContext();
28282
28422
  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 }) });
28423
+ return /* @__PURE__ */ jsxs6("a", { className: cx("os-header__brand", className), href: `${normalizeBasePath(basePath)}/`, children: [
28424
+ logo ? /* @__PURE__ */ jsx9(
28425
+ Img,
28426
+ {
28427
+ src: logo.src,
28428
+ alt: withTitle ? "" : logo.alt || site.title,
28429
+ ...logo.width ? { width: logo.width } : {},
28430
+ ...logo.height ? { height: logo.height } : {},
28431
+ sizes: "240px",
28432
+ treatment: "none",
28433
+ priority: true,
28434
+ className: "os-header__logo"
28435
+ }
28436
+ ) : null,
28437
+ !logo || withTitle ? /* @__PURE__ */ jsx9("span", { className: "os-header__title", children: site.title }) : null
28438
+ ] });
28296
28439
  }
28297
28440
  function MenuIcon() {
28298
28441
  return /* @__PURE__ */ jsx9(
@@ -28352,7 +28495,8 @@ function Header({ site, page, heroTheme, cart }) {
28352
28495
  );
28353
28496
  const social3 = h.showSocial ? site.social ?? [] : [];
28354
28497
  const theme = h.overlay && heroTheme ? heroTheme : h.colorTheme ?? "light";
28355
- const fit = DRAWER_VARIANTS.includes(h.variant) ? "fits" : navFit({
28498
+ const sidebar = h.variant === "sidebar-left";
28499
+ const fit = DRAWER_VARIANTS.includes(h.variant) || sidebar ? "fits" : navFit({
28356
28500
  title: site.title,
28357
28501
  logo: site.logo,
28358
28502
  nav: nav.map((i) => ({ label: i.label, kind: i.kind })),
@@ -28396,7 +28540,15 @@ function Header({ site, page, heroTheme, cart }) {
28396
28540
  "data-os-behavior": "menu",
28397
28541
  children: [
28398
28542
  /* @__PURE__ */ jsxs6("div", { className: "os-header__bar", children: [
28399
- /* @__PURE__ */ jsx9(Brand, { site, className: split ? "os-header__brand--main" : void 0 }),
28543
+ /* @__PURE__ */ jsx9(
28544
+ Brand,
28545
+ {
28546
+ site,
28547
+ ...split ? { className: "os-header__brand--main" } : {},
28548
+ ...sidebar ? { withTitle: true } : {}
28549
+ }
28550
+ ),
28551
+ sidebar && site.tagline ? /* @__PURE__ */ jsx9("p", { className: "os-header__tagline", children: site.tagline }) : null,
28400
28552
  desktopNav,
28401
28553
  actions,
28402
28554
  cart && /* @__PURE__ */ jsx9(CartButton, {}),
@@ -28646,6 +28798,7 @@ ${typeClasses}
28646
28798
  /* Stack mode: 1\u20134 columns, per-breakpoint ratios (--cols/--tcols/--mcols) and order (--to/--mo) */
28647
28799
  .os-stack{display:grid;max-inline-size:calc(var(--content-max) + 2 * ${v(T.section.gutter)});padding-inline:${v(T.section.gutter)};grid-template-columns:var(--mcols,minmax(0,1fr));row-gap:var(--gap,${v(T.section.blockGap)});column-gap:var(--gap,${v(T.space.xl)});align-items:start}
28648
28800
  .os-w-full.os-stack{max-inline-size:none}
28801
+ .os-stack.is-bleed{padding-inline:0}
28649
28802
  .os-stack.is-align-center{align-items:center}
28650
28803
  .os-stack.is-align-end{align-items:end}
28651
28804
  .os-stack.is-align-stretch{align-items:stretch}
@@ -28795,7 +28948,7 @@ ${button("tertiary")}
28795
28948
  .os-header__logo{height:var(--mlogo-h,2rem);width:auto;border-radius:0;background:none}
28796
28949
  .os-header__logo .os-img__img{height:100%;width:auto;object-fit:contain}
28797
28950
  .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}
28951
+ .os-header__brand--split,.os-nav,.os-header__tagline{display:none}
28799
28952
  .os-header__actions{display:none;align-items:center;gap:${v(T.space.xs)}}
28800
28953
  .os-header__actions .os-button{min-height:2.5rem;padding-block:0.5rem}
28801
28954
  .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 +29011,24 @@ html:not(.os-js) .os-header__toggle{display:none}
28858
29011
  .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
29012
  .os-header--split-nav .os-nav__list--start{justify-content:flex-end}
28860
29013
  .os-header--split-nav .os-header__brand--split{display:inline-flex;margin:0}
29014
+ .os-header--nav-left-logo-center .os-header__bar{position:relative}
29015
+ .os-header--nav-left-logo-center .os-header__brand{position:absolute;inset-inline-start:50%;translate:-50% 0;margin:0;max-inline-size:34%}
29016
+ [dir=rtl] .os-header--nav-left-logo-center .os-header__brand{translate:50% 0}
29017
+ .os-header--nav-left-logo-center .os-nav{order:-1;margin-inline-end:auto;max-inline-size:33%}
29018
+ .os-header--nav-left-logo-center .os-nav__list{justify-content:flex-start}
29019
+ .os-page:has(>.os-header--sidebar-left){--sidebar-w:clamp(16rem,28vw,28rem);padding-inline-start:var(--sidebar-w)}
29020
+ .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
+ .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
+ .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)}
29024
+ .os-header.os-header--sidebar-left .os-header__title{white-space:normal;max-inline-size:none}
29025
+ .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
+ .os-header--sidebar-left .os-nav{inline-size:100%;margin-block-start:${v(T.space.sm)}}
29027
+ .os-header--sidebar-left .os-nav__list{flex-direction:column;align-items:stretch;row-gap:0}
29028
+ .os-header--sidebar-left .os-nav__link{display:flex;padding-block:0.55rem;border-bottom:1px solid ${v(c2.border)};white-space:normal}
29029
+ .os-header--sidebar-left .os-nav__link::after{display:none}
29030
+ .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}
29031
+ .os-header--sidebar-left .os-header__actions{flex-direction:column;align-items:flex-start}
28861
29032
  .os-header--logo-center-nav-below,.os-header--stacked{--header-row:3rem}
28862
29033
  .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
29034
  .os-header--logo-center-nav-below .os-header__brand{grid-area:brand;margin:0}
@@ -43276,6 +43447,44 @@ var headerPresets = [
43276
43447
  colorTheme: theme
43277
43448
  })
43278
43449
  }),
43450
+ defineHeaderPreset({
43451
+ category: "header",
43452
+ name: "logo-centered",
43453
+ label: "Logo centred, menu left",
43454
+ description: "The navigation on the left, a centred logo, buttons and cart on the right.",
43455
+ tags: ["boutique", "centered", "shop"],
43456
+ ai: {
43457
+ purpose: "A fashion- and boutique-style header with the brand in the middle.",
43458
+ whenToUse: "Shops and studios whose wordmark should sit centre stage.",
43459
+ avoid: HEADER_AVOID
43460
+ },
43461
+ make: (theme) => ({
43462
+ variant: "nav-left-logo-center",
43463
+ sticky: false,
43464
+ transparentOnHero: false,
43465
+ mobileMenu: "fullscreen",
43466
+ colorTheme: theme
43467
+ })
43468
+ }),
43469
+ defineHeaderPreset({
43470
+ category: "header",
43471
+ name: "sidebar",
43472
+ label: "Sidebar",
43473
+ description: "Logo, title and the menu in a column down the left; the page beside it.",
43474
+ tags: ["blog", "editorial", "sidebar"],
43475
+ ai: {
43476
+ purpose: "A blog- or journal-style layout with the site's identity always in view.",
43477
+ whenToUse: "Writers, journals and foundations with a short menu and a strong colour.",
43478
+ avoid: HEADER_AVOID
43479
+ },
43480
+ make: (theme) => ({
43481
+ variant: "sidebar-left",
43482
+ sticky: false,
43483
+ transparentOnHero: false,
43484
+ mobileMenu: "slide",
43485
+ colorTheme: theme
43486
+ })
43487
+ }),
43279
43488
  defineHeaderPreset({
43280
43489
  category: "header",
43281
43490
  name: "logo-above",
@@ -52875,6 +53084,8 @@ export {
52875
53084
  componentInstances,
52876
53085
  expandComponent,
52877
53086
  SiteConfigSchema,
53087
+ DESIGN_SYSTEM_FILE,
53088
+ DesignSystemSchema,
52878
53089
  MediaMetaSchema,
52879
53090
  DENSITIES,
52880
53091
  SHAPES,
@@ -52890,7 +53101,9 @@ export {
52890
53101
  fallbackMobileRects,
52891
53102
  toJsonSchema,
52892
53103
  blockFieldsJsonSchema,
53104
+ oklchToHex,
52893
53105
  parseColor,
53106
+ isColor,
52894
53107
  toHex,
52895
53108
  deltaEOK,
52896
53109
  relativeLuminance,
@@ -52899,6 +53112,7 @@ export {
52899
53112
  TYPE_PAIRINGS,
52900
53113
  getPairing,
52901
53114
  pairingFamilies,
53115
+ SPACE_SCALES,
52902
53116
  flattenDtcg,
52903
53117
  compileStyles,
52904
53118
  COMPONENT_PREVIEW_IDS,
@@ -53030,4 +53244,4 @@ lucide/dist/esm/lucide.mjs:
53030
53244
  * See the LICENSE file in the root directory of this source tree.
53031
53245
  *)
53032
53246
  */
53033
- //# sourceMappingURL=chunk-FPW2XAQ5.js.map
53247
+ //# sourceMappingURL=chunk-IXN2CNGL.js.map