@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.
@@ -15819,13 +15819,24 @@ var S101_TABLES = {
15819
15819
  DUSK: S101_DUSK,
15820
15820
  NIGHT: S101_NIGHT
15821
15821
  };
15822
+ var warnedTokens = /* @__PURE__ */ new Set();
15823
+ function reportUnresolvedToken(token, table) {
15824
+ const key = `${table}:${token}`;
15825
+ if (warnedTokens.has(key)) return;
15826
+ warnedTokens.add(key);
15827
+ console.warn(
15828
+ `[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.`
15829
+ );
15830
+ }
15822
15831
  function getThemedS101Svg(symbolName, table = "DAY") {
15823
15832
  const raw = S101_POINT_SVGS[symbolName];
15824
15833
  if (!raw) return null;
15825
15834
  return raw.replace(/(fill|stroke)="([A-Z][A-Z0-9]{3,5})"/g, (match, attr, token) => {
15826
15835
  if (token === "none") return match;
15827
15836
  const hex = S101_TABLES[table][token];
15828
- return hex ? `${attr}="${hex}"` : match;
15837
+ if (hex) return `${attr}="${hex}"`;
15838
+ reportUnresolvedToken(token, table);
15839
+ return match;
15829
15840
  });
15830
15841
  }
15831
15842