@almadar/core 6.0.0 → 7.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/builders.d.ts +3 -2
- package/dist/builders.js +23 -5
- package/dist/builders.js.map +1 -1
- package/dist/{compose-behaviors-BLX6CbU3.d.ts → compose-behaviors-DPPX5a_s.d.ts} +1 -1
- package/dist/domain-language/index.d.ts +2 -1
- package/dist/domain-language/index.js +23 -5
- package/dist/domain-language/index.js.map +1 -1
- package/dist/expression-eBO9-SQM.d.ts +221 -0
- package/dist/index.d.ts +4 -3
- package/dist/index.js +37 -12
- package/dist/index.js.map +1 -1
- package/dist/{schema-DnLtWO4e.d.ts → schema-OhIbVaYu.d.ts} +434 -562
- package/dist/state-machine/index.d.ts +17 -1
- package/dist/state-machine/index.js +7 -2
- package/dist/state-machine/index.js.map +1 -1
- package/dist/types/index.d.ts +8 -6
- package/dist/types/index.js +27 -9
- package/dist/types/index.js.map +1 -1
- package/package.json +1 -1
package/dist/builders.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { T as TraitEventContract, E as Entity,
|
|
2
|
-
|
|
1
|
+
import { T as TraitEventContract, E as Entity, a as TraitEventListener, b as TraitConfig, c as EntityField, d as EntityPersistence, e as EntityRow, U as UseDeclaration, f as EntityRef, g as TraitRef, P as PageRef, O as OrbitalDefinition, h as OrbitalSchema, i as Trait, j as Page, k as PageRefObject, l as TraitReference } from './schema-OhIbVaYu.js';
|
|
2
|
+
import { S as SExpr } from './expression-eBO9-SQM.js';
|
|
3
|
+
export { C as ComposeBehaviorsInput, a as ComposeBehaviorsResult, E as EventWiringEntry, L as LayoutStrategy, b as applyEventWiring, c as composeBehaviors, d as detectLayoutStrategy } from './compose-behaviors-DPPX5a_s.js';
|
|
3
4
|
import 'zod';
|
|
4
5
|
import '@almadar/patterns';
|
|
5
6
|
|
package/dist/builders.js
CHANGED
|
@@ -65,7 +65,7 @@ var EntityFieldSchema = z.lazy(
|
|
|
65
65
|
return input;
|
|
66
66
|
},
|
|
67
67
|
z.object({
|
|
68
|
-
name: z.string().min(1, "Field name is required"),
|
|
68
|
+
name: z.string().min(1, "Field name is required").optional(),
|
|
69
69
|
type: FieldTypeSchema,
|
|
70
70
|
required: z.boolean().optional(),
|
|
71
71
|
default: z.unknown().optional(),
|
|
@@ -249,7 +249,7 @@ var StateSchema = z.object({
|
|
|
249
249
|
});
|
|
250
250
|
var PayloadFieldSchema = z.object({
|
|
251
251
|
name: z.string().min(1),
|
|
252
|
-
type: z.
|
|
252
|
+
type: z.string().min(1),
|
|
253
253
|
required: z.boolean().optional()
|
|
254
254
|
});
|
|
255
255
|
var EventSchema = z.object({
|
|
@@ -350,15 +350,32 @@ var TraitTickSchema = z.object({
|
|
|
350
350
|
var EventScopeSchema = z.enum(["internal", "external"]);
|
|
351
351
|
var EventPayloadFieldSchema = z.object({
|
|
352
352
|
name: z.string().min(1),
|
|
353
|
-
|
|
353
|
+
/**
|
|
354
|
+
* Field type. Mirrors the Rust validator's acceptance: any non-empty
|
|
355
|
+
* string. Primitives ('string' | 'number' | 'boolean' | 'object' |
|
|
356
|
+
* 'array') are the canonical values; entity-name references like
|
|
357
|
+
* 'ModalRecord' and array-of-entity references like '[ModalRecord]'
|
|
358
|
+
* are also valid because the Rust IR's PayloadField.field_type is
|
|
359
|
+
* just a String. Only enforced narrowly at the call site (e.g.
|
|
360
|
+
* emit-literal type-mismatch warnings in
|
|
361
|
+
* orbital-compiler/phases/validation/emit_payload.rs) — not here.
|
|
362
|
+
*/
|
|
363
|
+
type: z.string().min(1),
|
|
354
364
|
required: z.boolean().optional(),
|
|
355
365
|
description: z.string().optional(),
|
|
356
366
|
entityType: z.string().optional()
|
|
357
367
|
});
|
|
358
368
|
var TraitEventContractSchema = z.object({
|
|
369
|
+
/**
|
|
370
|
+
* Event name. Mirrors the Rust validator's `is_valid_event_identifier`:
|
|
371
|
+
* starts with a letter, then any letters / digits / underscores. Both
|
|
372
|
+
* UPPER_SNAKE_CASE and PascalCase shapes are valid identifiers in the
|
|
373
|
+
* post-Phase 2.5 nominal-event type system (events declared via
|
|
374
|
+
* `type X = Event<T>`).
|
|
375
|
+
*/
|
|
359
376
|
event: z.string().min(1).regex(
|
|
360
|
-
/^[A-
|
|
361
|
-
"Event name must
|
|
377
|
+
/^[A-Za-z][A-Za-z0-9_]*$/,
|
|
378
|
+
"Event name must start with a letter and contain only letters, digits, and underscores"
|
|
362
379
|
),
|
|
363
380
|
description: z.string().optional(),
|
|
364
381
|
payloadSchema: z.array(EventPayloadFieldSchema).optional(),
|
|
@@ -768,6 +785,7 @@ var EntityCallSchema = z.object({
|
|
|
768
785
|
if (!call.fields) return true;
|
|
769
786
|
const seen = /* @__PURE__ */ new Set();
|
|
770
787
|
for (const field of call.fields) {
|
|
788
|
+
if (field.name === void 0) continue;
|
|
771
789
|
if (seen.has(field.name)) return false;
|
|
772
790
|
seen.add(field.name);
|
|
773
791
|
}
|