@cosmicdrift/kumiko-headless 0.257.0 → 0.258.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.257.0",
3
+ "version": "0.258.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>",
@@ -36,7 +36,7 @@
36
36
  }
37
37
  },
38
38
  "dependencies": {
39
- "@cosmicdrift/kumiko-framework": "0.257.0",
39
+ "@cosmicdrift/kumiko-framework": "0.258.1",
40
40
  "temporal-polyfill": "^0.3.2",
41
41
  "zod": "^4.4.3"
42
42
  },
@@ -232,6 +232,12 @@ export function computeEditViewModel<
232
232
  fieldDef.type === "text" || fieldDef.type === "longText"
233
233
  ? (fieldDef as unknown as { multiline?: boolean | { rows?: number } }).multiline
234
234
  : undefined;
235
+ // format hint for `type: "text"` — "password" makes the renderer mask
236
+ // the input (#2548).
237
+ const format =
238
+ fieldDef.type === "text"
239
+ ? (fieldDef as unknown as { format?: "email" | "url" | "phone" | "password" }).format
240
+ : undefined;
235
241
  // Wall-Clock-Hint bei `type: "timestamp"` mit locatedBy — der
236
242
  // Renderer emittiert dann lokale Zeit ohne `Z` statt UTC-Instant.
237
243
  const wallClock =
@@ -382,6 +388,7 @@ export function computeEditViewModel<
382
388
  ...(columns !== undefined && { columns }),
383
389
  ...(maxRows !== undefined && { maxRows }),
384
390
  ...(multiline !== undefined && { multiline }),
391
+ ...(format !== undefined && { format }),
385
392
  ...(wallClock !== undefined && { wallClock }),
386
393
  ...(min !== undefined && { min }),
387
394
  ...(max !== undefined && { max }),
@@ -165,6 +165,8 @@ export type EditFieldViewModel = {
165
165
  * value; here it only carries an optional `{ rows }` override.
166
166
  * `true` = default rows, `{ rows }` = explicit height. */
167
167
  readonly multiline?: boolean | { readonly rows?: number };
168
+ /** From TextFieldDef.format — `password` makes the renderer mask the input. */
169
+ readonly format?: "email" | "url" | "phone" | "password";
168
170
  /** Nur bei `type: "timestamp"` gesetzt wenn TimestampFieldDef.locatedBy
169
171
  * existiert — Wall-Clock-Zeit ohne Offset. Der Renderer emittiert
170
172
  * dann lokale Zeit ohne `Z` statt eines UTC-Instants. */