@hyperframes/producer 0.1.6 → 0.1.8

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.
@@ -102034,6 +102034,37 @@ function lintHyperframeHtml(html, options = {}) {
102034
102034
  fixHint: "Register each composition timeline on `window.__timelines[compositionId]`."
102035
102035
  });
102036
102036
  }
102037
+ if (TIMELINE_REGISTRY_ASSIGN_PATTERN.test(source2) && !TIMELINE_REGISTRY_INIT_PATTERN.test(source2)) {
102038
+ pushFinding({
102039
+ code: "timeline_registry_missing_init",
102040
+ severity: "error",
102041
+ message: "`window.__timelines[\u2026] = \u2026` is used without initializing `window.__timelines` first.",
102042
+ fixHint: "Add `window.__timelines = window.__timelines || {};` before any timeline assignment."
102043
+ });
102044
+ }
102045
+ {
102046
+ const htmlCompIds = /* @__PURE__ */ new Set();
102047
+ const timelineRegKeys = /* @__PURE__ */ new Set();
102048
+ const compIdRe = /data-composition-id\s*=\s*["']([^"']+)["']/gi;
102049
+ const tlKeyRe = /window\.__timelines\[\s*["']([^"']+)["']\s*\]/g;
102050
+ let m;
102051
+ while ((m = compIdRe.exec(source2)) !== null) {
102052
+ if (m[1]) htmlCompIds.add(m[1]);
102053
+ }
102054
+ while ((m = tlKeyRe.exec(source2)) !== null) {
102055
+ if (m[1]) timelineRegKeys.add(m[1]);
102056
+ }
102057
+ for (const key2 of timelineRegKeys) {
102058
+ if (!htmlCompIds.has(key2)) {
102059
+ pushFinding({
102060
+ code: "timeline_id_mismatch",
102061
+ severity: "error",
102062
+ message: `Timeline registered as "${key2}" but no element has data-composition-id="${key2}". The runtime cannot auto-nest this timeline.`,
102063
+ fixHint: `Change window.__timelines["${key2}"] to match the data-composition-id attribute, or vice versa.`
102064
+ });
102065
+ }
102066
+ }
102067
+ }
102037
102068
  if (INVALID_SCRIPT_CLOSE_PATTERN.test(source2)) {
102038
102069
  pushFinding({
102039
102070
  code: "invalid_inline_script_syntax",