@cosmicdrift/kumiko-headless 0.39.0 → 0.40.1

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cosmicdrift/kumiko-headless",
3
- "version": "0.39.0",
3
+ "version": "0.40.1",
4
4
  "description": "Headless UI logic for Kumiko — Dispatcher contract, Form-Controller, View-Model, Nav-Resolver. Plattform- und React-frei; jeder Renderer (renderer, renderer-web, renderer-native, …) komponiert darauf.",
5
5
  "license": "BUSL-1.1",
6
6
  "author": "Marc Frost <marc@cosmicdriftgamestudio.com>",
@@ -12,6 +12,8 @@ export function escapeHtmlAttr(s: string): string {
12
12
  return escapeHtml(s).replace(/'/g, "&#39;");
13
13
  }
14
14
 
15
+ // Shared API for app repos (publicstatus badge-SVG renders XML by hand) —
16
+ // no in-repo consumer yet, deliberately exported for cross-repo dedup.
15
17
  export function escapeXml(s: string): string {
16
18
  return s
17
19
  .replace(/&/g, "&amp;")
@@ -4,6 +4,7 @@ import type {
4
4
  FieldCondition,
5
5
  } from "@cosmicdrift/kumiko-framework/ui-types";
6
6
  import {
7
+ evalFieldCondition,
7
8
  isExtensionEditSection,
8
9
  normalizeEditField,
9
10
  parseRefTarget,
@@ -154,8 +155,6 @@ function evalCondition<TValues>(
154
155
  values: TValues,
155
156
  ): boolean {
156
157
  if (condition === undefined) return fallback;
157
- if (typeof condition === "boolean") return condition;
158
- const val = (values as Record<string, unknown>)[condition.field];
159
- if ("eq" in condition) return val === condition.eq;
160
- return val !== condition.ne;
158
+ // @cast-boundary view-model: TValues ist strukturell ein Record.
159
+ return evalFieldCondition(condition, values as Record<string, unknown>);
161
160
  }