@cosmicdrift/kumiko-types 0.243.3 → 0.243.4

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-types",
3
- "version": "0.243.3",
3
+ "version": "0.243.4",
4
4
  "description": "Framework-Type-Definitions für Kumiko — FeatureDefinition, BootCheck-Types und die reinen Engine-Types. Erlaubt Downstream-Konsumenten, gegen die Type-Contracts zu bauen, ohne das ganze Framework-Package zu importieren. Enthaelt keine identitaets-sensitiven Runtime-Werte mehr (Error-Klassen leben seit #1629 in kumiko-framework, Brand-Symbole nutzen Symbol.for) und ist deshalb eine plain dependency, keine peerDependency.",
5
5
  "license": "BUSL-1.1",
6
6
  "author": "Marc Frost <marc@cosmicdriftgamestudio.com>",
@@ -5,17 +5,25 @@ export type EntityHandlerOptions = {
5
5
  readonly access?: AccessRule;
6
6
  readonly description?: string;
7
7
  readonly agent?: AgentHandlerHints;
8
- };
9
-
10
- export type EntityQueryHandlerOptions = EntityHandlerOptions & {
11
- /** Reads across every tenant instead of the caller's own — for a
12
- * SystemAdmin-only operator inspector over an otherwise tenant-scoped
13
- * entity. Scope this to the ONE handler that needs it rather than making
14
- * the whole feature r.systemScope(), which would drop tenant isolation
15
- * from every other handler the feature registers too. */
8
+ /** Reads and writes across every tenant instead of the caller's own — for a
9
+ * SystemAdmin-only operator handler over an otherwise tenant-scoped entity.
10
+ * Scope this to the ONE handler that needs it rather than making the whole
11
+ * feature r.systemScope(), which would drop tenant isolation from every
12
+ * other handler the feature registers too. This only lifts row filtering;
13
+ * who may call the handler at all stays gated by `access`.
14
+ *
15
+ * On write handlers it additionally addresses the event stream by the
16
+ * target row's tenant instead of the acting user's, so update/delete/
17
+ * restore hit the row's own stream. `create` has no target row and stays
18
+ * on the acting user's tenant. On write handlers this also satisfies
19
+ * entity write-ownership rules that compare against the acting user's
20
+ * tenant, so `access` is the only remaining gate — grant it to operator
21
+ * roles only. */
16
22
  readonly crossTenant?: boolean;
17
23
  };
18
24
 
25
+ export type EntityQueryHandlerOptions = EntityHandlerOptions;
26
+
19
27
  export type EntityCrudVerb = "create" | "update" | "delete" | "restore" | "list" | "detail";
20
28
 
21
29
  export type RegisterEntityCrudOptions = {
package/src/screen.ts CHANGED
@@ -208,7 +208,10 @@ export type RowFieldExtractor =
208
208
  // - "navigate" (Tier 2.7e): navigiert zu einem anderen Screen,
209
209
  // optional mit URL-Search-Params aus `params`. Use-case: "Edit",
210
210
  // "View Audit-Log", "Open in actionForm" etc.
211
- export type RowAction = RowActionWriteHandler | RowActionNavigate;
211
+ // - "drawer" (fw#2710): mounts an actionForm in a Drawer without leaving
212
+ // the list/detail screen, prefilled from the clicked row via `params`.
213
+ // Row-level pendant to ToolbarAction's "drawer" variant (fw#2225).
214
+ export type RowAction = RowActionWriteHandler | RowActionNavigate | RowActionDrawer;
212
215
 
213
216
  export type RowActionWriteHandler = {
214
217
  /** Default für RowActions ohne explizit gesetzten `kind` —
@@ -294,6 +297,27 @@ export type RowActionNavigate = RowActionNavigateBase &
294
297
  }
295
298
  );
296
299
 
300
+ export type RowActionDrawer = {
301
+ readonly kind: "drawer";
302
+ readonly id: string;
303
+ readonly label: string;
304
+ /** Short, unqualified id of an `actionForm` screen in the same feature.
305
+ * Boot validator rejects a missing screen and a screen whose `type`
306
+ * isn't `actionForm` — same check as ToolbarAction's drawer variant
307
+ * (see docs/plans/bundled-features-screen-standardisierung.md §2.6c). */
308
+ readonly screen: string;
309
+ /** Declarative prefill extracted from the clicked row. `pick` extracts
310
+ * fields of the same name; `map` renames them. */
311
+ readonly params?: RowFieldExtractor;
312
+ /** Per-row conditional visibility. */
313
+ readonly visible?: FieldCondition;
314
+ readonly style?: "primary" | "secondary";
315
+ /** Overrides the id-based default icon (see ACTION_ICON_BY_ID in
316
+ * kumiko-renderer) — closed IconKey vocabulary into the ICONS registry
317
+ * (renderer-web), analogous to EditFieldSpec.icon. */
318
+ readonly icon?: IconKey;
319
+ };
320
+
297
321
  // ToolbarAction — button in the list header. Three variants: navigate to
298
322
  // another screen (e.g. a full-page actionForm), dispatch a handler directly
299
323
  // (e.g. "Sync All" without a form), or mount an actionForm in a Drawer