@chrtco/sdk 0.10.6 → 0.10.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.
@@ -15781,13 +15781,24 @@ var S101_TABLES = {
15781
15781
  DUSK: S101_DUSK,
15782
15782
  NIGHT: S101_NIGHT
15783
15783
  };
15784
+ var warnedTokens = /* @__PURE__ */ new Set();
15785
+ function reportUnresolvedToken(token, table) {
15786
+ const key = `${table}:${token}`;
15787
+ if (warnedTokens.has(key)) return;
15788
+ warnedTokens.add(key);
15789
+ console.warn(
15790
+ `[chrt/s101] colour token "${token}" is not defined in the official S-101 ${table} profile. The symbol using it will draw with a substituted colour, which on a chart changes what the symbol MEANS. Re-check the vendored assets/s101/css/${table.toLowerCase()}SvgStyle.css against the pinned catalogue commit.`
15791
+ );
15792
+ }
15784
15793
  function getThemedS101Svg(symbolName, table = "DAY") {
15785
15794
  const raw = S101_POINT_SVGS[symbolName];
15786
15795
  if (!raw) return null;
15787
15796
  return raw.replace(/(fill|stroke)="([A-Z][A-Z0-9]{3,5})"/g, (match, attr, token) => {
15788
15797
  if (token === "none") return match;
15789
15798
  const hex = S101_TABLES[table][token];
15790
- return hex ? `${attr}="${hex}"` : match;
15799
+ if (hex) return `${attr}="${hex}"`;
15800
+ reportUnresolvedToken(token, table);
15801
+ return match;
15791
15802
  });
15792
15803
  }
15793
15804