@almadar/core 4.8.2 → 4.10.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 +2 -2
- package/dist/builders.js +2 -0
- package/dist/builders.js.map +1 -1
- package/dist/{compose-behaviors-aBzjGsxn.d.ts → compose-behaviors-Dg_ADhIl.d.ts} +1 -1
- package/dist/domain-language/index.d.ts +1 -1
- package/dist/domain-language/index.js +4 -3
- package/dist/domain-language/index.js.map +1 -1
- package/dist/index.d.ts +4 -5
- package/dist/index.js +5 -6
- package/dist/index.js.map +1 -1
- package/dist/{schema-BCEjl1a1.d.ts → schema-DI8_HaRx.d.ts} +93 -0
- package/dist/types/index.d.ts +3 -34
- package/dist/types/index.js +3 -4
- package/dist/types/index.js.map +1 -1
- package/package.json +1 -2
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { getPatternDefinition } from '@almadar/patterns';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import '@almadar/operators';
|
|
4
3
|
|
|
5
4
|
// src/domain-language/tokens.ts
|
|
6
5
|
var TokenType = /* @__PURE__ */ ((TokenType2) => {
|
|
@@ -3756,11 +3755,13 @@ z.object({
|
|
|
3756
3755
|
path: ["events"]
|
|
3757
3756
|
}
|
|
3758
3757
|
);
|
|
3758
|
+
var TraitScopeSchema = z.enum(["instance", "collection"]);
|
|
3759
3759
|
var TraitSchema = z.object({
|
|
3760
3760
|
name: z.string().min(1),
|
|
3761
3761
|
description: z.string().optional(),
|
|
3762
3762
|
description_visual_prompt: z.string().optional(),
|
|
3763
3763
|
category: TraitCategorySchema.optional(),
|
|
3764
|
+
scope: TraitScopeSchema.optional(),
|
|
3764
3765
|
linkedEntity: z.string().optional(),
|
|
3765
3766
|
requiredFields: z.array(RequiredFieldSchema).optional(),
|
|
3766
3767
|
dataEntities: z.array(TraitDataEntitySchema).optional(),
|
|
@@ -4232,7 +4233,7 @@ function formatSExprToDomain(expr, context) {
|
|
|
4232
4233
|
if (isControlOperator(op)) {
|
|
4233
4234
|
return formatControl(op, args);
|
|
4234
4235
|
}
|
|
4235
|
-
if (
|
|
4236
|
+
if (isEffectOperator(op)) {
|
|
4236
4237
|
return formatEffect(op, args);
|
|
4237
4238
|
}
|
|
4238
4239
|
if (op.includes("/")) {
|
|
@@ -4264,7 +4265,7 @@ function isLogicalOperator(op) {
|
|
|
4264
4265
|
function isControlOperator(op) {
|
|
4265
4266
|
return CONTROL_OPERATORS.includes(op);
|
|
4266
4267
|
}
|
|
4267
|
-
function
|
|
4268
|
+
function isEffectOperator(op) {
|
|
4268
4269
|
return EFFECT_OPERATORS.includes(op);
|
|
4269
4270
|
}
|
|
4270
4271
|
function formatPrimitive(value) {
|