@syntrologie/runtime-sdk 2.8.0-canary.72 → 2.8.0-canary.74

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.
@@ -20609,7 +20609,13 @@ Please report this to https://github.com/markedjs/marked.`, e2) {
20609
20609
  }
20610
20610
 
20611
20611
  // src/fetchers/mergeConfigs.ts
20612
- function resolveVariantConfigs(client, keys, _strategy = "first-match") {
20612
+ function resolveVariantConfigs(client, keys, strategy = "merge") {
20613
+ if (strategy === "first-match") {
20614
+ return resolveFirstMatch(client, keys);
20615
+ }
20616
+ return resolveMerge(client, keys);
20617
+ }
20618
+ function resolveFirstMatch(client, keys) {
20613
20619
  for (const key of keys) {
20614
20620
  const value = client.getFeatureValue?.(key, null);
20615
20621
  if (!value || typeof value !== "object") continue;
@@ -20617,21 +20623,59 @@ Please report this to https://github.com/markedjs/marked.`, e2) {
20617
20623
  const hasTiles = variant.tiles && variant.tiles.length > 0;
20618
20624
  const hasActions = variant.actions && variant.actions.length > 0;
20619
20625
  if (hasTiles || hasActions) {
20620
- return {
20621
- tiles: variant.tiles ?? [],
20622
- actions: variant.actions ?? [],
20623
- fetchedAt: variant.fetchedAt ?? (/* @__PURE__ */ new Date()).toISOString(),
20624
- ...variant.schemaVersion && { schemaVersion: variant.schemaVersion },
20625
- ...variant.configVersion && { configVersion: variant.configVersion },
20626
- ...variant.canvasTitle && { canvasTitle: variant.canvasTitle },
20627
- ...variant.theme && { theme: variant.theme },
20628
- ...variant.launcher && { launcher: variant.launcher },
20629
- ...variant.meta && { meta: variant.meta }
20630
- };
20626
+ return buildConfig([variant]);
20631
20627
  }
20632
20628
  }
20633
20629
  return null;
20634
20630
  }
20631
+ function resolveMerge(client, keys) {
20632
+ const variants = [];
20633
+ for (const key of keys) {
20634
+ const value = client.getFeatureValue?.(key, null);
20635
+ if (!value || typeof value !== "object") continue;
20636
+ const variant = value;
20637
+ const hasTiles = variant.tiles && variant.tiles.length > 0;
20638
+ const hasActions = variant.actions && variant.actions.length > 0;
20639
+ if (hasTiles || hasActions) {
20640
+ variants.push(variant);
20641
+ }
20642
+ }
20643
+ if (variants.length === 0) return null;
20644
+ return buildConfig(variants);
20645
+ }
20646
+ function buildConfig(variants) {
20647
+ const allTiles = [];
20648
+ const allActions = [];
20649
+ let fetchedAt;
20650
+ let schemaVersion;
20651
+ let configVersion;
20652
+ let canvasTitle;
20653
+ let theme;
20654
+ let launcher;
20655
+ let meta;
20656
+ for (const variant of variants) {
20657
+ if (variant.tiles) allTiles.push(...variant.tiles);
20658
+ if (variant.actions) allActions.push(...variant.actions);
20659
+ fetchedAt ?? (fetchedAt = variant.fetchedAt);
20660
+ schemaVersion ?? (schemaVersion = variant.schemaVersion);
20661
+ configVersion ?? (configVersion = variant.configVersion);
20662
+ canvasTitle ?? (canvasTitle = variant.canvasTitle);
20663
+ theme ?? (theme = variant.theme);
20664
+ launcher ?? (launcher = variant.launcher);
20665
+ meta ?? (meta = variant.meta);
20666
+ }
20667
+ return {
20668
+ tiles: allTiles,
20669
+ actions: allActions,
20670
+ fetchedAt: fetchedAt ?? (/* @__PURE__ */ new Date()).toISOString(),
20671
+ ...schemaVersion && { schemaVersion },
20672
+ ...configVersion && { configVersion },
20673
+ ...canvasTitle && { canvasTitle },
20674
+ ...theme && { theme },
20675
+ ...launcher && { launcher },
20676
+ ...meta && { meta }
20677
+ };
20678
+ }
20635
20679
 
20636
20680
  // src/logger.ts
20637
20681
  var debugEnabled = false;
@@ -20679,7 +20723,7 @@ Please report this to https://github.com/markedjs/marked.`, e2) {
20679
20723
  }
20680
20724
 
20681
20725
  // src/version.ts
20682
- var SDK_VERSION = "2.8.0-canary.72";
20726
+ var SDK_VERSION = "2.8.0-canary.74";
20683
20727
 
20684
20728
  // src/types.ts
20685
20729
  var SDK_SCHEMA_VERSION = "2.0";
@@ -42188,7 +42232,7 @@ ${cssRules}
42188
42232
  }
42189
42233
 
42190
42234
  // src/index.ts
42191
- var RUNTIME_SDK_BUILD = true ? `${"2026-04-14T20:05:22.929Z"} (${"38cc99cc325"})` : "dev";
42235
+ var RUNTIME_SDK_BUILD = true ? `${"2026-04-14T23:18:39.787Z"} (${"e8c5fd43a3a"})` : "dev";
42192
42236
  if (typeof window !== "undefined") {
42193
42237
  console.log(`[Syntro Runtime] Build: ${RUNTIME_SDK_BUILD}`);
42194
42238
  const existing = window.SynOS;