@almadar/ui 6.1.0 → 6.2.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/dist/avl/index.cjs +9 -2
- package/dist/avl/index.d.cts +3 -3
- package/dist/avl/index.d.ts +3 -3
- package/dist/avl/index.js +9 -2
- package/dist/{avl-schema-parser-C6Yz2MuW.d.cts → avl-schema-parser-Bt4NzAam.d.cts} +3 -3
- package/dist/{avl-schema-parser-BKbH_SFt.d.ts → avl-schema-parser-dvJKXn-o.d.ts} +3 -3
- package/dist/components/index.cjs +9 -2
- package/dist/components/index.d.cts +24 -24
- package/dist/components/index.d.ts +24 -24
- package/dist/components/index.js +9 -2
- package/dist/lib/drawable/three/index.d.cts +2 -2
- package/dist/lib/drawable/three/index.d.ts +2 -2
- package/dist/providers/index.cjs +9 -2
- package/dist/providers/index.js +9 -2
- package/dist/runtime/index.cjs +9 -2
- package/dist/runtime/index.js +9 -2
- package/package.json +4 -4
package/dist/avl/index.cjs
CHANGED
|
@@ -7142,9 +7142,16 @@ var init_Input = __esm({
|
|
|
7142
7142
|
}
|
|
7143
7143
|
};
|
|
7144
7144
|
const handleKeyDown = (e) => {
|
|
7145
|
-
if (action
|
|
7146
|
-
|
|
7145
|
+
if (!action || e.key !== "Enter") return;
|
|
7146
|
+
const raw = e.currentTarget.value;
|
|
7147
|
+
if (type === "number") {
|
|
7148
|
+
if (raw.trim() === "") return;
|
|
7149
|
+
const numeric = Number(raw);
|
|
7150
|
+
if (Number.isNaN(numeric)) return;
|
|
7151
|
+
eventBus.emit(`UI:${action}`, { value: numeric });
|
|
7152
|
+
return;
|
|
7147
7153
|
}
|
|
7154
|
+
eventBus.emit(`UI:${action}`, { value: raw });
|
|
7148
7155
|
};
|
|
7149
7156
|
const wrapField = (field, fullWidth = true) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: fullWidth ? "w-full" : "w-fit", children: [
|
|
7150
7157
|
label && /* @__PURE__ */ jsxRuntime.jsx("label", { className: "block text-sm font-medium text-foreground mb-1", children: label }),
|
package/dist/avl/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import React__default from 'react';
|
|
3
|
-
import { JsonObject,
|
|
3
|
+
import { JsonObject, SExpr, OrbitalSchema, Expression, UISlot, EntityData, EditFocus, EventPayload, ThemeDefinition } from '@almadar/core';
|
|
4
4
|
import { Node, Edge, NodeProps, EdgeProps } from '@xyflow/react';
|
|
5
5
|
import { AnyPatternConfig } from '@almadar/core/patterns';
|
|
6
6
|
import { useDraggable } from '@dnd-kit/core';
|
|
@@ -457,7 +457,7 @@ declare function curveControlPoint(x1: number, y1: number, x2: number, y2: numbe
|
|
|
457
457
|
|
|
458
458
|
interface SerializedEffect extends JsonObject {
|
|
459
459
|
type: string;
|
|
460
|
-
args:
|
|
460
|
+
args: SExpr[];
|
|
461
461
|
}
|
|
462
462
|
interface ApplicationOrbitalData {
|
|
463
463
|
name: string;
|
|
@@ -526,7 +526,7 @@ interface TraitTransitionInfo extends JsonObject {
|
|
|
526
526
|
from: string;
|
|
527
527
|
to: string;
|
|
528
528
|
event: string;
|
|
529
|
-
guard:
|
|
529
|
+
guard: SExpr | null;
|
|
530
530
|
effects: SerializedEffect[];
|
|
531
531
|
index: number;
|
|
532
532
|
}
|
package/dist/avl/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import React__default from 'react';
|
|
3
|
-
import { JsonObject,
|
|
3
|
+
import { JsonObject, SExpr, OrbitalSchema, Expression, UISlot, EntityData, EditFocus, EventPayload, ThemeDefinition } from '@almadar/core';
|
|
4
4
|
import { Node, Edge, NodeProps, EdgeProps } from '@xyflow/react';
|
|
5
5
|
import { AnyPatternConfig } from '@almadar/core/patterns';
|
|
6
6
|
import { useDraggable } from '@dnd-kit/core';
|
|
@@ -457,7 +457,7 @@ declare function curveControlPoint(x1: number, y1: number, x2: number, y2: numbe
|
|
|
457
457
|
|
|
458
458
|
interface SerializedEffect extends JsonObject {
|
|
459
459
|
type: string;
|
|
460
|
-
args:
|
|
460
|
+
args: SExpr[];
|
|
461
461
|
}
|
|
462
462
|
interface ApplicationOrbitalData {
|
|
463
463
|
name: string;
|
|
@@ -526,7 +526,7 @@ interface TraitTransitionInfo extends JsonObject {
|
|
|
526
526
|
from: string;
|
|
527
527
|
to: string;
|
|
528
528
|
event: string;
|
|
529
|
-
guard:
|
|
529
|
+
guard: SExpr | null;
|
|
530
530
|
effects: SerializedEffect[];
|
|
531
531
|
index: number;
|
|
532
532
|
}
|
package/dist/avl/index.js
CHANGED
|
@@ -7066,9 +7066,16 @@ var init_Input = __esm({
|
|
|
7066
7066
|
}
|
|
7067
7067
|
};
|
|
7068
7068
|
const handleKeyDown = (e) => {
|
|
7069
|
-
if (action
|
|
7070
|
-
|
|
7069
|
+
if (!action || e.key !== "Enter") return;
|
|
7070
|
+
const raw = e.currentTarget.value;
|
|
7071
|
+
if (type === "number") {
|
|
7072
|
+
if (raw.trim() === "") return;
|
|
7073
|
+
const numeric = Number(raw);
|
|
7074
|
+
if (Number.isNaN(numeric)) return;
|
|
7075
|
+
eventBus.emit(`UI:${action}`, { value: numeric });
|
|
7076
|
+
return;
|
|
7071
7077
|
}
|
|
7078
|
+
eventBus.emit(`UI:${action}`, { value: raw });
|
|
7072
7079
|
};
|
|
7073
7080
|
const wrapField = (field, fullWidth = true) => /* @__PURE__ */ jsxs("div", { className: fullWidth ? "w-full" : "w-fit", children: [
|
|
7074
7081
|
label && /* @__PURE__ */ jsx("label", { className: "block text-sm font-medium text-foreground mb-1", children: label }),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnimationName, Asset, ScenePos, EventEmit, JsonObject,
|
|
1
|
+
import { AnimationName, Asset, ScenePos, EventEmit, JsonObject, SExpr } from '@almadar/core';
|
|
2
2
|
import React__default from 'react';
|
|
3
3
|
import * as THREE from 'three';
|
|
4
4
|
import { D as DrawableNode } from './paintDispatch-D3R8NNmV.cjs';
|
|
@@ -541,7 +541,7 @@ declare const Canvas3DHost: React__default.ForwardRefExoticComponent<Canvas3DHos
|
|
|
541
541
|
|
|
542
542
|
interface SerializedEffect extends JsonObject {
|
|
543
543
|
type: string;
|
|
544
|
-
args:
|
|
544
|
+
args: SExpr[];
|
|
545
545
|
}
|
|
546
546
|
interface ApplicationOrbitalData {
|
|
547
547
|
name: string;
|
|
@@ -610,7 +610,7 @@ interface TraitTransitionInfo extends JsonObject {
|
|
|
610
610
|
from: string;
|
|
611
611
|
to: string;
|
|
612
612
|
event: string;
|
|
613
|
-
guard:
|
|
613
|
+
guard: SExpr | null;
|
|
614
614
|
effects: SerializedEffect[];
|
|
615
615
|
index: number;
|
|
616
616
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnimationName, Asset, ScenePos, EventEmit, JsonObject,
|
|
1
|
+
import { AnimationName, Asset, ScenePos, EventEmit, JsonObject, SExpr } from '@almadar/core';
|
|
2
2
|
import React__default from 'react';
|
|
3
3
|
import * as THREE from 'three';
|
|
4
4
|
import { D as DrawableNode } from './paintDispatch-B5ObLnUv.js';
|
|
@@ -541,7 +541,7 @@ declare const Canvas3DHost: React__default.ForwardRefExoticComponent<Canvas3DHos
|
|
|
541
541
|
|
|
542
542
|
interface SerializedEffect extends JsonObject {
|
|
543
543
|
type: string;
|
|
544
|
-
args:
|
|
544
|
+
args: SExpr[];
|
|
545
545
|
}
|
|
546
546
|
interface ApplicationOrbitalData {
|
|
547
547
|
name: string;
|
|
@@ -610,7 +610,7 @@ interface TraitTransitionInfo extends JsonObject {
|
|
|
610
610
|
from: string;
|
|
611
611
|
to: string;
|
|
612
612
|
event: string;
|
|
613
|
-
guard:
|
|
613
|
+
guard: SExpr | null;
|
|
614
614
|
effects: SerializedEffect[];
|
|
615
615
|
index: number;
|
|
616
616
|
}
|
|
@@ -1977,9 +1977,16 @@ var init_Input = __esm({
|
|
|
1977
1977
|
}
|
|
1978
1978
|
};
|
|
1979
1979
|
const handleKeyDown = (e) => {
|
|
1980
|
-
if (action
|
|
1981
|
-
|
|
1980
|
+
if (!action || e.key !== "Enter") return;
|
|
1981
|
+
const raw = e.currentTarget.value;
|
|
1982
|
+
if (type === "number") {
|
|
1983
|
+
if (raw.trim() === "") return;
|
|
1984
|
+
const numeric = Number(raw);
|
|
1985
|
+
if (Number.isNaN(numeric)) return;
|
|
1986
|
+
eventBus.emit(`UI:${action}`, { value: numeric });
|
|
1987
|
+
return;
|
|
1982
1988
|
}
|
|
1989
|
+
eventBus.emit(`UI:${action}`, { value: raw });
|
|
1983
1990
|
};
|
|
1984
1991
|
const wrapField = (field, fullWidth = true) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: fullWidth ? "w-full" : "w-fit", children: [
|
|
1985
1992
|
label && /* @__PURE__ */ jsxRuntime.jsx("label", { className: "block text-sm font-medium text-foreground mb-1", children: label }),
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
2
|
import React__default, { ReactNode, ErrorInfo } from 'react';
|
|
3
|
-
import { Asset, EventKey, EventPayload, EventEmit, AssetUrl,
|
|
3
|
+
import { Asset, EventKey, EventPayload, EventEmit, AssetUrl, FieldValue, EntityRow, EntityRole, AnimationName, SpriteDirection, AnimationDef, ScenePos, Camera, EntityWith, TraitConfigValue, JsonValue, AssetCatalog, JsonObject, EventPayloadValue, DeclaredTraitConfig, TraitConfig, ControlValue, OrbitalSchema, Trait, OrbitalEntity, FormSubmitPayload, UISlot, EditFocus, TraceSubagent, TraceActivity, TraceChatMessage } from '@almadar/core';
|
|
4
4
|
export { AnimationDef, AnimationName, BusEvent, BusEventListener, BusEventSource, BusEventListener as EventListener, SpriteDirection, UISlot, Unsubscribe } from '@almadar/core';
|
|
5
5
|
import { LucideIcon } from 'lucide-react';
|
|
6
6
|
import { C as ColorToken, U as UiError, P as Point, L as LinkAction, I as ImageSource } from '../types-B3nHgnMG.cjs';
|
|
7
7
|
export { R as Rect } from '../types-B3nHgnMG.cjs';
|
|
8
8
|
import { SExpr } from '@almadar/evaluator';
|
|
9
|
-
import { U as UnitAnimationState, F as FacingDirection, S as SpriteSheetUrls, g as SpriteFrameDims, R as ResolvedFrame, h as CanvasLighting, i as CanvasPost, a as IsometricUnit, j as CameraState, k as FieldInfo, l as OrbitalTraitInfo, m as OrbitalPageInfo, T as TraitLevelData, E as ExternalLink } from '../avl-schema-parser-
|
|
10
|
-
export { B as BoardTile, G as GameAction, n as GamePhase, o as GameState, p as GameUnit, b as IsometricFeature, I as IsometricTile, P as Position, q as UnitTrait, r as calculateAttackTargets, s as calculateValidMoves, t as createInitialGameState } from '../avl-schema-parser-
|
|
9
|
+
import { U as UnitAnimationState, F as FacingDirection, S as SpriteSheetUrls, g as SpriteFrameDims, R as ResolvedFrame, h as CanvasLighting, i as CanvasPost, a as IsometricUnit, j as CameraState, k as FieldInfo, l as OrbitalTraitInfo, m as OrbitalPageInfo, T as TraitLevelData, E as ExternalLink } from '../avl-schema-parser-Bt4NzAam.cjs';
|
|
10
|
+
export { B as BoardTile, G as GameAction, n as GamePhase, o as GameState, p as GameUnit, b as IsometricFeature, I as IsometricTile, P as Position, q as UnitTrait, r as calculateAttackTargets, s as calculateValidMoves, t as createInitialGameState } from '../avl-schema-parser-Bt4NzAam.cjs';
|
|
11
11
|
import { D as DrawableNode, P as Projector, F as FxOverlayItem, M as MeshShapeKind, a as MeshMaterial, b as DrawGroupProps, c as DrawTextProps, d as DrawMeshProps } from '../paintDispatch-D3R8NNmV.cjs';
|
|
12
12
|
export { e as FxOverlayKind } from '../paintDispatch-D3R8NNmV.cjs';
|
|
13
13
|
export { A as AudioManifest, G as GameAudioContext, a as GameAudioContextValue, e as GameAudioControls, b as GameAudioProvider, c as GameAudioProviderProps, S as SoundEntry, U as UseGameAudioOptions, f as useGameAudio, u as useGameAudioContext } from '../GameAudioProvider-CQAdPreB.cjs';
|
|
@@ -316,7 +316,7 @@ interface InputProps extends Omit<React__default.InputHTMLAttributes<HTMLInputEl
|
|
|
316
316
|
disabled?: boolean;
|
|
317
317
|
/** Declarative event name for trait dispatch */
|
|
318
318
|
action?: EventEmit<{
|
|
319
|
-
value: string;
|
|
319
|
+
value: string | number;
|
|
320
320
|
}>;
|
|
321
321
|
/**
|
|
322
322
|
* Input type — selects the field's data mode. Use 'password' for masked
|
|
@@ -1360,10 +1360,10 @@ declare const Aside: React__default.ForwardRefExoticComponent<AsideProps & React
|
|
|
1360
1360
|
* Context for conditional evaluation
|
|
1361
1361
|
*/
|
|
1362
1362
|
type ConditionalContext = {
|
|
1363
|
-
formValues:
|
|
1364
|
-
globalVariables:
|
|
1365
|
-
localVariables?:
|
|
1366
|
-
entity?:
|
|
1363
|
+
formValues: Record<string, FieldValue>;
|
|
1364
|
+
globalVariables: Record<string, FieldValue>;
|
|
1365
|
+
localVariables?: Record<string, FieldValue>;
|
|
1366
|
+
entity?: Record<string, FieldValue>;
|
|
1367
1367
|
};
|
|
1368
1368
|
interface ConditionalWrapperProps {
|
|
1369
1369
|
/** The S-expression condition to evaluate */
|
|
@@ -10031,38 +10031,38 @@ interface WizardField {
|
|
|
10031
10031
|
label: string;
|
|
10032
10032
|
isDefault?: boolean;
|
|
10033
10033
|
}>;
|
|
10034
|
-
defaultValue?:
|
|
10035
|
-
condition?:
|
|
10034
|
+
defaultValue?: ControlValue;
|
|
10035
|
+
condition?: SExpr;
|
|
10036
10036
|
placeholder?: string;
|
|
10037
10037
|
entityField?: string;
|
|
10038
10038
|
minLength?: number;
|
|
10039
10039
|
maxLength?: number;
|
|
10040
|
-
dataSource?:
|
|
10040
|
+
dataSource?: Record<string, FieldValue>;
|
|
10041
10041
|
displayFields?: string[];
|
|
10042
|
-
searchConfig?:
|
|
10042
|
+
searchConfig?: Record<string, FieldValue>;
|
|
10043
10043
|
hiddenCalculations?: Array<{
|
|
10044
10044
|
variable: string;
|
|
10045
10045
|
expression: string;
|
|
10046
10046
|
scope?: string;
|
|
10047
10047
|
}>;
|
|
10048
|
-
signatureConfig?:
|
|
10049
|
-
displayTemplate?:
|
|
10050
|
-
lawReference?:
|
|
10048
|
+
signatureConfig?: Record<string, FieldValue>;
|
|
10049
|
+
displayTemplate?: Record<string, FieldValue>;
|
|
10050
|
+
lawReference?: Record<string, FieldValue>;
|
|
10051
10051
|
contextMenu?: string[];
|
|
10052
|
-
calculated?:
|
|
10052
|
+
calculated?: Record<string, FieldValue>;
|
|
10053
10053
|
readOnly?: boolean;
|
|
10054
|
-
minDate?:
|
|
10054
|
+
minDate?: string;
|
|
10055
10055
|
stats?: Array<{
|
|
10056
10056
|
label: string;
|
|
10057
|
-
value:
|
|
10057
|
+
value: ControlValue;
|
|
10058
10058
|
icon?: string;
|
|
10059
10059
|
}>;
|
|
10060
10060
|
items?: Array<{
|
|
10061
10061
|
id: string;
|
|
10062
10062
|
label: string;
|
|
10063
|
-
autoCheck?:
|
|
10063
|
+
autoCheck?: boolean;
|
|
10064
10064
|
}>;
|
|
10065
|
-
[key: string]: JsonValue | undefined;
|
|
10065
|
+
[key: string]: JsonValue | SExpr | ControlValue | Record<string, FieldValue> | undefined;
|
|
10066
10066
|
}
|
|
10067
10067
|
/** Section within a wizard step */
|
|
10068
10068
|
interface WizardSection {
|
|
@@ -10071,7 +10071,7 @@ interface WizardSection {
|
|
|
10071
10071
|
description?: string;
|
|
10072
10072
|
fields?: WizardField[];
|
|
10073
10073
|
subsections?: WizardSection[];
|
|
10074
|
-
condition?:
|
|
10074
|
+
condition?: SExpr;
|
|
10075
10075
|
repeatable?: boolean;
|
|
10076
10076
|
minItems?: number;
|
|
10077
10077
|
addButtonLabel?: string;
|
|
@@ -10080,9 +10080,9 @@ interface WizardSection {
|
|
|
10080
10080
|
expression: string;
|
|
10081
10081
|
scope?: string;
|
|
10082
10082
|
}>;
|
|
10083
|
-
dataSource?:
|
|
10083
|
+
dataSource?: Record<string, FieldValue>;
|
|
10084
10084
|
readOnly?: boolean;
|
|
10085
|
-
[key: string]: JsonValue | WizardField[] | WizardSection[] | undefined;
|
|
10085
|
+
[key: string]: JsonValue | SExpr | Record<string, FieldValue> | WizardField[] | WizardSection[] | undefined;
|
|
10086
10086
|
}
|
|
10087
10087
|
/** Entity mapping configuration */
|
|
10088
10088
|
interface WizardEntityMapping {
|
|
@@ -10094,7 +10094,7 @@ interface WizardEntityMapping {
|
|
|
10094
10094
|
}
|
|
10095
10095
|
/** Validation rule for wizard steps */
|
|
10096
10096
|
interface WizardValidationRule {
|
|
10097
|
-
condition:
|
|
10097
|
+
condition: SExpr;
|
|
10098
10098
|
message: string;
|
|
10099
10099
|
}
|
|
10100
10100
|
/** Law reference for compliance */
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
2
|
import React__default, { ReactNode, ErrorInfo } from 'react';
|
|
3
|
-
import { Asset, EventKey, EventPayload, EventEmit, AssetUrl,
|
|
3
|
+
import { Asset, EventKey, EventPayload, EventEmit, AssetUrl, FieldValue, EntityRow, EntityRole, AnimationName, SpriteDirection, AnimationDef, ScenePos, Camera, EntityWith, TraitConfigValue, JsonValue, AssetCatalog, JsonObject, EventPayloadValue, DeclaredTraitConfig, TraitConfig, ControlValue, OrbitalSchema, Trait, OrbitalEntity, FormSubmitPayload, UISlot, EditFocus, TraceSubagent, TraceActivity, TraceChatMessage } from '@almadar/core';
|
|
4
4
|
export { AnimationDef, AnimationName, BusEvent, BusEventListener, BusEventSource, BusEventListener as EventListener, SpriteDirection, UISlot, Unsubscribe } from '@almadar/core';
|
|
5
5
|
import { LucideIcon } from 'lucide-react';
|
|
6
6
|
import { C as ColorToken, U as UiError, P as Point, L as LinkAction, I as ImageSource } from '../types-B3nHgnMG.js';
|
|
7
7
|
export { R as Rect } from '../types-B3nHgnMG.js';
|
|
8
8
|
import { SExpr } from '@almadar/evaluator';
|
|
9
|
-
import { U as UnitAnimationState, F as FacingDirection, S as SpriteSheetUrls, g as SpriteFrameDims, R as ResolvedFrame, h as CanvasLighting, i as CanvasPost, a as IsometricUnit, j as CameraState, k as FieldInfo, l as OrbitalTraitInfo, m as OrbitalPageInfo, T as TraitLevelData, E as ExternalLink } from '../avl-schema-parser-
|
|
10
|
-
export { B as BoardTile, G as GameAction, n as GamePhase, o as GameState, p as GameUnit, b as IsometricFeature, I as IsometricTile, P as Position, q as UnitTrait, r as calculateAttackTargets, s as calculateValidMoves, t as createInitialGameState } from '../avl-schema-parser-
|
|
9
|
+
import { U as UnitAnimationState, F as FacingDirection, S as SpriteSheetUrls, g as SpriteFrameDims, R as ResolvedFrame, h as CanvasLighting, i as CanvasPost, a as IsometricUnit, j as CameraState, k as FieldInfo, l as OrbitalTraitInfo, m as OrbitalPageInfo, T as TraitLevelData, E as ExternalLink } from '../avl-schema-parser-dvJKXn-o.js';
|
|
10
|
+
export { B as BoardTile, G as GameAction, n as GamePhase, o as GameState, p as GameUnit, b as IsometricFeature, I as IsometricTile, P as Position, q as UnitTrait, r as calculateAttackTargets, s as calculateValidMoves, t as createInitialGameState } from '../avl-schema-parser-dvJKXn-o.js';
|
|
11
11
|
import { D as DrawableNode, P as Projector, F as FxOverlayItem, M as MeshShapeKind, a as MeshMaterial, b as DrawGroupProps, c as DrawTextProps, d as DrawMeshProps } from '../paintDispatch-B5ObLnUv.js';
|
|
12
12
|
export { e as FxOverlayKind } from '../paintDispatch-B5ObLnUv.js';
|
|
13
13
|
export { A as AudioManifest, G as GameAudioContext, a as GameAudioContextValue, e as GameAudioControls, b as GameAudioProvider, c as GameAudioProviderProps, S as SoundEntry, U as UseGameAudioOptions, f as useGameAudio, u as useGameAudioContext } from '../GameAudioProvider-B48iXwz3.js';
|
|
@@ -316,7 +316,7 @@ interface InputProps extends Omit<React__default.InputHTMLAttributes<HTMLInputEl
|
|
|
316
316
|
disabled?: boolean;
|
|
317
317
|
/** Declarative event name for trait dispatch */
|
|
318
318
|
action?: EventEmit<{
|
|
319
|
-
value: string;
|
|
319
|
+
value: string | number;
|
|
320
320
|
}>;
|
|
321
321
|
/**
|
|
322
322
|
* Input type — selects the field's data mode. Use 'password' for masked
|
|
@@ -1360,10 +1360,10 @@ declare const Aside: React__default.ForwardRefExoticComponent<AsideProps & React
|
|
|
1360
1360
|
* Context for conditional evaluation
|
|
1361
1361
|
*/
|
|
1362
1362
|
type ConditionalContext = {
|
|
1363
|
-
formValues:
|
|
1364
|
-
globalVariables:
|
|
1365
|
-
localVariables?:
|
|
1366
|
-
entity?:
|
|
1363
|
+
formValues: Record<string, FieldValue>;
|
|
1364
|
+
globalVariables: Record<string, FieldValue>;
|
|
1365
|
+
localVariables?: Record<string, FieldValue>;
|
|
1366
|
+
entity?: Record<string, FieldValue>;
|
|
1367
1367
|
};
|
|
1368
1368
|
interface ConditionalWrapperProps {
|
|
1369
1369
|
/** The S-expression condition to evaluate */
|
|
@@ -10031,38 +10031,38 @@ interface WizardField {
|
|
|
10031
10031
|
label: string;
|
|
10032
10032
|
isDefault?: boolean;
|
|
10033
10033
|
}>;
|
|
10034
|
-
defaultValue?:
|
|
10035
|
-
condition?:
|
|
10034
|
+
defaultValue?: ControlValue;
|
|
10035
|
+
condition?: SExpr;
|
|
10036
10036
|
placeholder?: string;
|
|
10037
10037
|
entityField?: string;
|
|
10038
10038
|
minLength?: number;
|
|
10039
10039
|
maxLength?: number;
|
|
10040
|
-
dataSource?:
|
|
10040
|
+
dataSource?: Record<string, FieldValue>;
|
|
10041
10041
|
displayFields?: string[];
|
|
10042
|
-
searchConfig?:
|
|
10042
|
+
searchConfig?: Record<string, FieldValue>;
|
|
10043
10043
|
hiddenCalculations?: Array<{
|
|
10044
10044
|
variable: string;
|
|
10045
10045
|
expression: string;
|
|
10046
10046
|
scope?: string;
|
|
10047
10047
|
}>;
|
|
10048
|
-
signatureConfig?:
|
|
10049
|
-
displayTemplate?:
|
|
10050
|
-
lawReference?:
|
|
10048
|
+
signatureConfig?: Record<string, FieldValue>;
|
|
10049
|
+
displayTemplate?: Record<string, FieldValue>;
|
|
10050
|
+
lawReference?: Record<string, FieldValue>;
|
|
10051
10051
|
contextMenu?: string[];
|
|
10052
|
-
calculated?:
|
|
10052
|
+
calculated?: Record<string, FieldValue>;
|
|
10053
10053
|
readOnly?: boolean;
|
|
10054
|
-
minDate?:
|
|
10054
|
+
minDate?: string;
|
|
10055
10055
|
stats?: Array<{
|
|
10056
10056
|
label: string;
|
|
10057
|
-
value:
|
|
10057
|
+
value: ControlValue;
|
|
10058
10058
|
icon?: string;
|
|
10059
10059
|
}>;
|
|
10060
10060
|
items?: Array<{
|
|
10061
10061
|
id: string;
|
|
10062
10062
|
label: string;
|
|
10063
|
-
autoCheck?:
|
|
10063
|
+
autoCheck?: boolean;
|
|
10064
10064
|
}>;
|
|
10065
|
-
[key: string]: JsonValue | undefined;
|
|
10065
|
+
[key: string]: JsonValue | SExpr | ControlValue | Record<string, FieldValue> | undefined;
|
|
10066
10066
|
}
|
|
10067
10067
|
/** Section within a wizard step */
|
|
10068
10068
|
interface WizardSection {
|
|
@@ -10071,7 +10071,7 @@ interface WizardSection {
|
|
|
10071
10071
|
description?: string;
|
|
10072
10072
|
fields?: WizardField[];
|
|
10073
10073
|
subsections?: WizardSection[];
|
|
10074
|
-
condition?:
|
|
10074
|
+
condition?: SExpr;
|
|
10075
10075
|
repeatable?: boolean;
|
|
10076
10076
|
minItems?: number;
|
|
10077
10077
|
addButtonLabel?: string;
|
|
@@ -10080,9 +10080,9 @@ interface WizardSection {
|
|
|
10080
10080
|
expression: string;
|
|
10081
10081
|
scope?: string;
|
|
10082
10082
|
}>;
|
|
10083
|
-
dataSource?:
|
|
10083
|
+
dataSource?: Record<string, FieldValue>;
|
|
10084
10084
|
readOnly?: boolean;
|
|
10085
|
-
[key: string]: JsonValue | WizardField[] | WizardSection[] | undefined;
|
|
10085
|
+
[key: string]: JsonValue | SExpr | Record<string, FieldValue> | WizardField[] | WizardSection[] | undefined;
|
|
10086
10086
|
}
|
|
10087
10087
|
/** Entity mapping configuration */
|
|
10088
10088
|
interface WizardEntityMapping {
|
|
@@ -10094,7 +10094,7 @@ interface WizardEntityMapping {
|
|
|
10094
10094
|
}
|
|
10095
10095
|
/** Validation rule for wizard steps */
|
|
10096
10096
|
interface WizardValidationRule {
|
|
10097
|
-
condition:
|
|
10097
|
+
condition: SExpr;
|
|
10098
10098
|
message: string;
|
|
10099
10099
|
}
|
|
10100
10100
|
/** Law reference for compliance */
|
package/dist/components/index.js
CHANGED
|
@@ -1902,9 +1902,16 @@ var init_Input = __esm({
|
|
|
1902
1902
|
}
|
|
1903
1903
|
};
|
|
1904
1904
|
const handleKeyDown = (e) => {
|
|
1905
|
-
if (action
|
|
1906
|
-
|
|
1905
|
+
if (!action || e.key !== "Enter") return;
|
|
1906
|
+
const raw = e.currentTarget.value;
|
|
1907
|
+
if (type === "number") {
|
|
1908
|
+
if (raw.trim() === "") return;
|
|
1909
|
+
const numeric = Number(raw);
|
|
1910
|
+
if (Number.isNaN(numeric)) return;
|
|
1911
|
+
eventBus.emit(`UI:${action}`, { value: numeric });
|
|
1912
|
+
return;
|
|
1907
1913
|
}
|
|
1914
|
+
eventBus.emit(`UI:${action}`, { value: raw });
|
|
1908
1915
|
};
|
|
1909
1916
|
const wrapField = (field, fullWidth = true) => /* @__PURE__ */ jsxs("div", { className: fullWidth ? "w-full" : "w-fit", children: [
|
|
1910
1917
|
label && /* @__PURE__ */ jsx("label", { className: "block text-sm font-medium text-foreground mb-1", children: label }),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as CanvasPointLightConfig, I as IsometricTile, a as IsometricUnit, b as IsometricFeature, A as ApplicationLevelData, O as OrbitalLevelData, T as TraitLevelData, c as TransitionLevelData } from '../../../avl-schema-parser-
|
|
2
|
-
export { d as Canvas3DHost, e as Canvas3DHostHandle, f as Canvas3DHostProps, d as GameCanvas3D, U as UnitAnimationState } from '../../../avl-schema-parser-
|
|
1
|
+
import { C as CanvasPointLightConfig, I as IsometricTile, a as IsometricUnit, b as IsometricFeature, A as ApplicationLevelData, O as OrbitalLevelData, T as TraitLevelData, c as TransitionLevelData } from '../../../avl-schema-parser-Bt4NzAam.cjs';
|
|
2
|
+
export { d as Canvas3DHost, e as Canvas3DHostHandle, f as Canvas3DHostProps, d as GameCanvas3D, U as UnitAnimationState } from '../../../avl-schema-parser-Bt4NzAam.cjs';
|
|
3
3
|
import * as React$1 from 'react';
|
|
4
4
|
import React__default, { Component, ReactNode, ErrorInfo } from 'react';
|
|
5
5
|
import * as THREE from 'three';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as CanvasPointLightConfig, I as IsometricTile, a as IsometricUnit, b as IsometricFeature, A as ApplicationLevelData, O as OrbitalLevelData, T as TraitLevelData, c as TransitionLevelData } from '../../../avl-schema-parser-
|
|
2
|
-
export { d as Canvas3DHost, e as Canvas3DHostHandle, f as Canvas3DHostProps, d as GameCanvas3D, U as UnitAnimationState } from '../../../avl-schema-parser-
|
|
1
|
+
import { C as CanvasPointLightConfig, I as IsometricTile, a as IsometricUnit, b as IsometricFeature, A as ApplicationLevelData, O as OrbitalLevelData, T as TraitLevelData, c as TransitionLevelData } from '../../../avl-schema-parser-dvJKXn-o.js';
|
|
2
|
+
export { d as Canvas3DHost, e as Canvas3DHostHandle, f as Canvas3DHostProps, d as GameCanvas3D, U as UnitAnimationState } from '../../../avl-schema-parser-dvJKXn-o.js';
|
|
3
3
|
import * as React$1 from 'react';
|
|
4
4
|
import React__default, { Component, ReactNode, ErrorInfo } from 'react';
|
|
5
5
|
import * as THREE from 'three';
|
package/dist/providers/index.cjs
CHANGED
|
@@ -3314,9 +3314,16 @@ var init_Input = __esm({
|
|
|
3314
3314
|
}
|
|
3315
3315
|
};
|
|
3316
3316
|
const handleKeyDown = (e) => {
|
|
3317
|
-
if (action
|
|
3318
|
-
|
|
3317
|
+
if (!action || e.key !== "Enter") return;
|
|
3318
|
+
const raw = e.currentTarget.value;
|
|
3319
|
+
if (type === "number") {
|
|
3320
|
+
if (raw.trim() === "") return;
|
|
3321
|
+
const numeric = Number(raw);
|
|
3322
|
+
if (Number.isNaN(numeric)) return;
|
|
3323
|
+
eventBus.emit(`UI:${action}`, { value: numeric });
|
|
3324
|
+
return;
|
|
3319
3325
|
}
|
|
3326
|
+
eventBus.emit(`UI:${action}`, { value: raw });
|
|
3320
3327
|
};
|
|
3321
3328
|
const wrapField = (field, fullWidth = true) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: fullWidth ? "w-full" : "w-fit", children: [
|
|
3322
3329
|
label && /* @__PURE__ */ jsxRuntime.jsx("label", { className: "block text-sm font-medium text-foreground mb-1", children: label }),
|
package/dist/providers/index.js
CHANGED
|
@@ -3240,9 +3240,16 @@ var init_Input = __esm({
|
|
|
3240
3240
|
}
|
|
3241
3241
|
};
|
|
3242
3242
|
const handleKeyDown = (e) => {
|
|
3243
|
-
if (action
|
|
3244
|
-
|
|
3243
|
+
if (!action || e.key !== "Enter") return;
|
|
3244
|
+
const raw = e.currentTarget.value;
|
|
3245
|
+
if (type === "number") {
|
|
3246
|
+
if (raw.trim() === "") return;
|
|
3247
|
+
const numeric = Number(raw);
|
|
3248
|
+
if (Number.isNaN(numeric)) return;
|
|
3249
|
+
eventBus.emit(`UI:${action}`, { value: numeric });
|
|
3250
|
+
return;
|
|
3245
3251
|
}
|
|
3252
|
+
eventBus.emit(`UI:${action}`, { value: raw });
|
|
3246
3253
|
};
|
|
3247
3254
|
const wrapField = (field, fullWidth = true) => /* @__PURE__ */ jsxs("div", { className: fullWidth ? "w-full" : "w-fit", children: [
|
|
3248
3255
|
label && /* @__PURE__ */ jsx("label", { className: "block text-sm font-medium text-foreground mb-1", children: label }),
|
package/dist/runtime/index.cjs
CHANGED
|
@@ -3807,9 +3807,16 @@ var init_Input = __esm({
|
|
|
3807
3807
|
}
|
|
3808
3808
|
};
|
|
3809
3809
|
const handleKeyDown = (e) => {
|
|
3810
|
-
if (action
|
|
3811
|
-
|
|
3810
|
+
if (!action || e.key !== "Enter") return;
|
|
3811
|
+
const raw = e.currentTarget.value;
|
|
3812
|
+
if (type === "number") {
|
|
3813
|
+
if (raw.trim() === "") return;
|
|
3814
|
+
const numeric = Number(raw);
|
|
3815
|
+
if (Number.isNaN(numeric)) return;
|
|
3816
|
+
eventBus.emit(`UI:${action}`, { value: numeric });
|
|
3817
|
+
return;
|
|
3812
3818
|
}
|
|
3819
|
+
eventBus.emit(`UI:${action}`, { value: raw });
|
|
3813
3820
|
};
|
|
3814
3821
|
const wrapField = (field, fullWidth = true) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: fullWidth ? "w-full" : "w-fit", children: [
|
|
3815
3822
|
label && /* @__PURE__ */ jsxRuntime.jsx("label", { className: "block text-sm font-medium text-foreground mb-1", children: label }),
|
package/dist/runtime/index.js
CHANGED
|
@@ -3733,9 +3733,16 @@ var init_Input = __esm({
|
|
|
3733
3733
|
}
|
|
3734
3734
|
};
|
|
3735
3735
|
const handleKeyDown = (e) => {
|
|
3736
|
-
if (action
|
|
3737
|
-
|
|
3736
|
+
if (!action || e.key !== "Enter") return;
|
|
3737
|
+
const raw = e.currentTarget.value;
|
|
3738
|
+
if (type === "number") {
|
|
3739
|
+
if (raw.trim() === "") return;
|
|
3740
|
+
const numeric = Number(raw);
|
|
3741
|
+
if (Number.isNaN(numeric)) return;
|
|
3742
|
+
eventBus.emit(`UI:${action}`, { value: numeric });
|
|
3743
|
+
return;
|
|
3738
3744
|
}
|
|
3745
|
+
eventBus.emit(`UI:${action}`, { value: raw });
|
|
3739
3746
|
};
|
|
3740
3747
|
const wrapField = (field, fullWidth = true) => /* @__PURE__ */ jsxs("div", { className: fullWidth ? "w-full" : "w-fit", children: [
|
|
3741
3748
|
label && /* @__PURE__ */ jsx("label", { className: "block text-sm font-medium text-foreground mb-1", children: label }),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@almadar/ui",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.2.0",
|
|
4
4
|
"description": "React UI components, hooks, and providers for Almadar",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
|
@@ -118,11 +118,11 @@
|
|
|
118
118
|
"access": "public"
|
|
119
119
|
},
|
|
120
120
|
"dependencies": {
|
|
121
|
-
"@almadar/core": "^10.
|
|
121
|
+
"@almadar/core": "^10.79.0",
|
|
122
122
|
"@almadar/evaluator": "^2.43.0",
|
|
123
123
|
"@almadar/logger": "^1.12.0",
|
|
124
|
-
"@almadar/runtime": "^6.
|
|
125
|
-
"@almadar/std": "^16.
|
|
124
|
+
"@almadar/runtime": "^6.69.0",
|
|
125
|
+
"@almadar/std": "^16.199.0",
|
|
126
126
|
"@almadar/syntax": "^1.16.0",
|
|
127
127
|
"@dnd-kit/core": "^6.3.1",
|
|
128
128
|
"@dnd-kit/sortable": "^10.0.0",
|