@cosmicdrift/kumiko-types 0.193.0 → 0.194.0
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 +1 -1
- package/src/fields.ts +3 -0
- package/src/handlers.ts +4 -2
- package/src/screen.ts +26 -14
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cosmicdrift/kumiko-types",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.194.0",
|
|
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>",
|
package/src/fields.ts
CHANGED
|
@@ -604,6 +604,9 @@ export type ImageFieldDef = {
|
|
|
604
604
|
* thing a caller may ask for — the spec lives here, never in a request,
|
|
605
605
|
* so nobody can drive arbitrary renders. Boot-validated. */
|
|
606
606
|
readonly variants?: Readonly<Record<string, VariantSpec>>;
|
|
607
|
+
/** Forwarded to the file input's `capture` attribute so a phone opens the
|
|
608
|
+
* camera instead of the file picker. */
|
|
609
|
+
readonly capture?: "environment" | "user";
|
|
607
610
|
readonly access?: FieldAccess;
|
|
608
611
|
};
|
|
609
612
|
|
package/src/handlers.ts
CHANGED
|
@@ -343,8 +343,10 @@ export type AppContext = SharedContextFields & {
|
|
|
343
343
|
export type HandlerContext<TMap extends object = KumikoEventTypeMap> = SharedContextFields & {
|
|
344
344
|
readonly db: TenantDb;
|
|
345
345
|
// Same tenant scoping as `db`, but never bound to the handler's tx: writes
|
|
346
|
-
// through it survive a rollback, for side effects that already happened
|
|
347
|
-
|
|
346
|
+
// through it survive a rollback, for side effects that already happened
|
|
347
|
+
// outside the DB. `undefined` when the pipeline has no outside-tx source
|
|
348
|
+
// for this dispatch (see dispatch-shared.ts) — callers must check before use.
|
|
349
|
+
readonly dbOutsideTransaction: TenantDb | undefined;
|
|
348
350
|
readonly registry: Registry;
|
|
349
351
|
/** Aktiver SessionUser des Handler-Aufrufs — Convenience-Alias zu
|
|
350
352
|
* `event.user`. Existiert weil Handler intuitiv `ctx.user.tenantId`
|
package/src/screen.ts
CHANGED
|
@@ -607,7 +607,11 @@ export type EntityEditScreenDefinition = {
|
|
|
607
607
|
* resolves both against the schema; boot-validator checks the target
|
|
608
608
|
* resolves to a registered screen. Overrides the default post-save
|
|
609
609
|
* target (the entity's list screen); delete is unaffected and still
|
|
610
|
-
* always navigates to the list.
|
|
610
|
+
* always navigates to the list. A cross-feature QN hard-couples this
|
|
611
|
+
* feature to the target at boot time — an app that doesn't mount the
|
|
612
|
+
* target feature fails the boot-validator; only use this form in a
|
|
613
|
+
* reusable feature when the target feature is guaranteed to be
|
|
614
|
+
* mounted alongside it. */
|
|
611
615
|
readonly redirect?: string;
|
|
612
616
|
/** Optionaler per-Field-Label-i18n-Key (Field-Name → Key), überschreibt
|
|
613
617
|
* die Default-Konvention `<feature>:entity:<entity>:field:<name>`.
|
|
@@ -655,20 +659,28 @@ export type ActionFormScreenDefinition = {
|
|
|
655
659
|
/** i18n-key für den Submit-Button. Default: i18n-Default des
|
|
656
660
|
* Renderers (typischerweise "actions.submit"). */
|
|
657
661
|
readonly submitLabel?: string;
|
|
658
|
-
/**
|
|
659
|
-
*
|
|
660
|
-
*
|
|
661
|
-
* (`<feature>:screen:<id>`).
|
|
662
|
-
*
|
|
663
|
-
*
|
|
662
|
+
/** Navigate to this screen ID after a successful submit: either a short
|
|
663
|
+
* ID (e.g. "item-list" — same feature, the nav-router resolves to the
|
|
664
|
+
* full path) or a fully-qualified cross-feature QN
|
|
665
|
+
* (`<feature>:screen:<id>`). If not set, the user stays on the form
|
|
666
|
+
* screen. Boot-validator checks that the target resolves to a
|
|
667
|
+
* registered screen. A cross-feature QN hard-couples this feature to
|
|
668
|
+
* the target at boot time — an app that doesn't mount the target
|
|
669
|
+
* feature fails the boot-validator; only use this form in a reusable
|
|
670
|
+
* feature when the target feature is guaranteed to be mounted
|
|
671
|
+
* alongside it. */
|
|
664
672
|
readonly redirect?: string;
|
|
665
|
-
/**
|
|
666
|
-
*
|
|
667
|
-
* `false` =
|
|
668
|
-
*
|
|
669
|
-
*
|
|
670
|
-
*
|
|
671
|
-
*
|
|
673
|
+
/** Target of the Cancel button. Default: `redirect` (historical
|
|
674
|
+
* behavior — Cancel and the submit-redirect then land in the same
|
|
675
|
+
* place). `false` = no Cancel button; correct for single-action
|
|
676
|
+
* screens with no discardable state (e.g. "Send test mail"), where
|
|
677
|
+
* Cancel would just be a second path to the same target. Accepts the
|
|
678
|
+
* same string targets as `redirect` (short ID or cross-feature QN);
|
|
679
|
+
* boot-validator checks it. A cross-feature QN hard-couples this
|
|
680
|
+
* feature to the target at boot time — an app that doesn't mount the
|
|
681
|
+
* target feature fails the boot-validator; only use this form in a
|
|
682
|
+
* reusable feature when the target feature is guaranteed to be
|
|
683
|
+
* mounted alongside it. */
|
|
672
684
|
readonly cancelTarget?: string | false;
|
|
673
685
|
readonly slots?: ScreenSlots;
|
|
674
686
|
readonly access?: AccessRule;
|