@wix/himalaya-cli 0.955.0 → 0.956.0

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.
Files changed (2) hide show
  1. package/dist/cli.mjs +33 -0
  2. package/package.json +2 -2
package/dist/cli.mjs CHANGED
@@ -5261,6 +5261,7 @@ function resolveTranslation(value, catalog, sourceCatalog) {
5261
5261
  var BINDING_SIGILS, BINDING_SIGIL_RE, TRANSLATION_PREFIX, TRANSLATION_KEY_RE;
5262
5262
  var init_bindings = __esm({
5263
5263
  "../../core/ts/src/bindings.ts"() {
5264
+ "use strict";
5264
5265
  BINDING_SIGILS = ["service", "flag", "item", "t"];
5265
5266
  BINDING_SIGIL_RE = new RegExp(
5266
5267
  `^\\$(?:${BINDING_SIGILS.filter((s) => s !== "t").join("|")})\\b|^\\$t:`
@@ -46300,6 +46301,33 @@ function withDerivedAccents(tokensOverlay, wst) {
46300
46301
  colors.textOnAccent = keepCrawledLight(family.textOnAccent, tokensOverlay.colors?.textOnAccent);
46301
46302
  return { ...tokensOverlay, colors };
46302
46303
  }
46304
+ function mergedArm(colors, name, arm, fallback) {
46305
+ const value = colors[name];
46306
+ if (typeof value === "string" && value.trim() !== "") return value;
46307
+ if (value && typeof value === "object" && !Array.isArray(value)) {
46308
+ const scheme = value;
46309
+ for (const candidate of [scheme[arm], scheme.light]) {
46310
+ if (typeof candidate === "string" && candidate.trim() !== "") return candidate;
46311
+ }
46312
+ }
46313
+ return fallback;
46314
+ }
46315
+ function alignAccentsToSurfaces(mergedColors, overlayColors) {
46316
+ const primary = lightArm2(overlayColors?.accentPrimary);
46317
+ if (!primary) return mergedColors;
46318
+ const secondary = lightArm2(overlayColors?.accentSecondary) ?? deriveSecondaryAccent(primary);
46319
+ const colors = { ...mergedColors };
46320
+ const family = deriveAccentFamily(primary, secondary, {
46321
+ light: mergedArm(colors, "surfacePrimary", "light", "#FFFFFF"),
46322
+ dark: mergedArm(colors, "surfacePrimary", "dark", "#0D1117"),
46323
+ highContrast: mergedArm(colors, "surfacePrimary", "highContrast", "#000000")
46324
+ });
46325
+ colors.accentPrimary = family.accentPrimary;
46326
+ colors.accentSecondary = family.accentSecondary;
46327
+ colors.accentSurface = family.accentSurface;
46328
+ colors.textOnAccent = family.textOnAccent;
46329
+ return colors;
46330
+ }
46303
46331
  function deriveBranding(input) {
46304
46332
  const primaryColor = lightArm2(input.tokensOverlay.colors?.accentPrimary);
46305
46333
  const secondaryColor = secondBrandColour(input.wst) ?? (primaryColor ? deriveSecondaryAccent(primaryColor) : void 0);
@@ -48835,6 +48863,10 @@ async function applyOverlays(input) {
48835
48863
  if (existsSync52(pkgTokens) && (tokens.colors || tokens.typography)) {
48836
48864
  const cur = JSON.parse(readFileSync62(pkgTokens, "utf8"));
48837
48865
  const merged = deepMerge3(cur, tokens);
48866
+ const mergedColors = merged.colors;
48867
+ if (mergedColors && typeof mergedColors === "object" && !Array.isArray(mergedColors)) {
48868
+ merged.colors = alignAccentsToSurfaces(mergedColors, tokens.colors);
48869
+ }
48838
48870
  writeFileSync21(pkgTokens, JSON.stringify(merged, null, 2) + "\n");
48839
48871
  wrote.push(pkgTokens);
48840
48872
  }
@@ -48951,6 +48983,7 @@ var init_apply2 = __esm({
48951
48983
  init_icon();
48952
48984
  init_brandable_shells();
48953
48985
  init_customer_build();
48986
+ init_branding_derive();
48954
48987
  init_home_descriptor();
48955
48988
  STAGED = ".himi/brand";
48956
48989
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.955.0",
3
+ "version": "0.956.0",
4
4
  "type": "module",
5
5
  "description": "himi — the Himalaya authoring CLI. Build a Tier-5 content package on your own machine, push it to the production serve as a draft, preview it on web + Himi Player, and read worker logs back — the remote dev loop. Wraps @himalaya/serve-cli for transport.",
6
6
  "keywords": [
@@ -64,5 +64,5 @@
64
64
  "artifactId": "himalaya-cli"
65
65
  }
66
66
  },
67
- "falconPackageHash": "488a8187a93cc20d20df3b2397dccd790d4d6e98fd6e4599788d160f"
67
+ "falconPackageHash": "fb07bf20632ab00e2803dd1051fa69df3a13555e1691547c243d156c"
68
68
  }