@almadar/core 2.14.3 → 3.0.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 +590 -64
- package/dist/builders.js.map +1 -1
- package/dist/{compose-behaviors-CQC8hsaL.d.ts → compose-behaviors-tUJ7EcaX.d.ts} +1 -1
- package/dist/domain-language/index.d.ts +1 -1
- package/dist/domain-language/index.js +33 -4
- package/dist/domain-language/index.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +46 -5
- package/dist/index.js.map +1 -1
- package/dist/{schema-BFnZrBhm.d.ts → schema-COvHzxfu.d.ts} +9049 -2878
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.js +30 -4
- package/dist/types/index.js.map +1 -1
- package/package.json +1 -1
package/dist/types/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b as EntityRow,
|
|
2
|
-
export { A as AGENT_DOMAIN_CATEGORIES, f as ALLOWED_CUSTOM_COMPONENTS, g as AgentDomainCategory, h as AgentDomainCategorySchema, i as AgentEffect, j as AllowedCustomComponent, k as AnimationDef, l as AnimationDefInput, m as AnimationDefSchema, c as AppSchema, n as AssetMap, o as AssetMapInput, p as AssetMapSchema, q as AssetMapping, r as AssetMappingInput, s as AssetMappingSchema, t as AtomicEffect, C as CORE_BINDINGS, u as CallServiceConfig, v as ComputedEventContract, w as ComputedEventContractSchema, x as ComputedEventListener, y as ComputedEventListenerSchema, z as CoreBinding, B as CustomPatternDefinition, D as CustomPatternDefinitionInput, F as CustomPatternDefinitionSchema, G as CustomPatternMap, H as CustomPatternMapInput, I as CustomPatternMapSchema, J as DerefEffect, K as DesignPreferences, L as DesignPreferencesInput, M as DesignPreferencesSchema, N as DesignTokens, Q as DesignTokensInput, R as DesignTokensSchema, U as DomainCategory, V as DomainCategorySchema, W as DomainContext, X as DomainContextInput, Y as DomainContextSchema, Z as DomainVocabulary, _ as DomainVocabularySchema, $ as ENTITY_ROLES, a0 as Effect, a1 as EffectInput, a2 as EffectSchema, e as Entity, a3 as EntityData, E as EntityField,
|
|
1
|
+
import { b as EntityRow, aF as FieldValue, bG as SExpr } from '../schema-COvHzxfu.js';
|
|
2
|
+
export { A as AGENT_DOMAIN_CATEGORIES, f as ALLOWED_CUSTOM_COMPONENTS, g as AgentDomainCategory, h as AgentDomainCategorySchema, i as AgentEffect, j as AllowedCustomComponent, k as AnimationDef, l as AnimationDefInput, m as AnimationDefSchema, c as AppSchema, n as AssetMap, o as AssetMapInput, p as AssetMapSchema, q as AssetMapping, r as AssetMappingInput, s as AssetMappingSchema, t as AtomicEffect, C as CORE_BINDINGS, u as CallServiceConfig, v as ComputedEventContract, w as ComputedEventContractSchema, x as ComputedEventListener, y as ComputedEventListenerSchema, z as CoreBinding, B as CustomPatternDefinition, D as CustomPatternDefinitionInput, F as CustomPatternDefinitionSchema, G as CustomPatternMap, H as CustomPatternMapInput, I as CustomPatternMapSchema, J as DerefEffect, K as DesignPreferences, L as DesignPreferencesInput, M as DesignPreferencesSchema, N as DesignTokens, Q as DesignTokensInput, R as DesignTokensSchema, U as DomainCategory, V as DomainCategorySchema, W as DomainContext, X as DomainContextInput, Y as DomainContextSchema, Z as DomainVocabulary, _ as DomainVocabularySchema, $ as ENTITY_ROLES, a0 as Effect, a1 as EffectInput, a2 as EffectSchema, e as Entity, a3 as EntityCall, a4 as EntityCallSchema, a5 as EntityData, E as EntityField, a6 as EntityFieldInput, a7 as EntityFieldSchema, a as EntityPersistence, a8 as EntityPersistenceSchema, a9 as EntityRef, aa as EntityRefSchema, ab as EntityRefStringSchema, ac as EntityRole, ad as EntityRoleSchema, ae as EntitySchema, af as EntitySemanticRole, ag as EntitySemanticRoleSchema, ah as EvalContext, ai as Event, aj as EventInput, ak as EventListener, al as EventListenerSchema, am as EventPayload, an as EventPayloadField, ao as EventPayloadFieldSchema, ap as EventSchema, aq as EventScope, ar as EventScopeSchema, as as EventSemanticRole, at as EventSemanticRoleSchema, au as EventSource, av as EventSourceSchema, aw as Expression, ax as ExpressionInput, ay as ExpressionSchema, az as Field, aA as FieldFormat, aB as FieldFormatSchema, aC as FieldSchema, aD as FieldType, aE as FieldTypeSchema, aG as FullOrbitalUnit, aH as GAME_TYPES, aI as GameSubCategory, aJ as GameSubCategorySchema, aK as GameType, aL as GameTypeSchema, aM as Guard, aN as GuardInput, aO as GuardSchema, aP as LogMeta, aQ as McpServiceDef, aR as McpServiceDefSchema, aS as NodeClassification, aT as NodeClassificationSchema, aG as Orbital, aU as OrbitalConfig, aV as OrbitalConfigInput, aW as OrbitalConfigSchema, O as OrbitalDefinition, aX as OrbitalDefinitionSchema, aY as OrbitalEntity, aZ as OrbitalEntityInput, a_ as OrbitalEntitySchema, a$ as OrbitalInput, b0 as OrbitalPage, b1 as OrbitalPageInput, b2 as OrbitalPageSchema, b3 as OrbitalPageStrictInput, b4 as OrbitalPageStrictSchema, c as OrbitalSchema, b5 as OrbitalSchemaInput, b6 as OrbitalSchemaSchema, b7 as OrbitalTraitRef, b8 as OrbitalTraitRefSchema, b9 as OrbitalUnit, ba as OrbitalUnitSchema, bb as OrbitalZodSchema, P as Page, bc as PageRef, bd as PageRefObject, be as PageRefObjectSchema, bf as PageRefSchema, bg as PageRefStringSchema, bh as PageSchema, bi as PageTraitRef, bj as PageTraitRefSchema, bk as ParsedBinding, bl as PayloadField, bm as PayloadFieldSchema, bn as PresentationType, bo as RefEffect, bp as RelatedLink, bq as RelatedLinkSchema, br as RelationConfig, bs as RelationConfigSchema, bt as RenderUIConfig, bu as RenderUINode, bv as RequiredField, bw as RequiredFieldSchema, bx as ResolvedAsset, by as ResolvedAssetInput, bz as ResolvedAssetSchema, bA as ResolvedPatternProps, bB as RestAuthConfig, bC as RestAuthConfigSchema, bD as RestServiceDef, bE as RestServiceDefSchema, bF as SERVICE_TYPES, bH as SExprAtom, bI as SExprAtomSchema, bJ as SExprInput, bK as SExprSchema, bL as SemanticAssetRef, bM as SemanticAssetRefInput, bN as SemanticAssetRefSchema, bO as ServiceDefinition, bP as ServiceDefinitionSchema, bQ as ServiceParams, bR as ServiceRef, bS as ServiceRefSchema, bT as ServiceRefStringSchema, bU as ServiceType, bV as ServiceTypeSchema, bW as SocketEvents, bX as SocketEventsSchema, bY as SocketServiceDef, bZ as SocketServiceDefSchema, S as State, b_ as StateInput, b$ as StateMachine, c0 as StateMachineInput, c1 as StateMachineSchema, c2 as StateSchema, c3 as StateSemanticRole, c4 as StateSemanticRoleSchema, c5 as SuggestedGuard, c6 as SuggestedGuardSchema, c7 as SwapEffect, c8 as ThemeDefinition, c9 as ThemeDefinitionSchema, ca as ThemeRef, cb as ThemeRefSchema, cc as ThemeRefStringSchema, cd as ThemeTokens, ce as ThemeTokensSchema, cf as ThemeVariant, cg as ThemeVariantSchema, d as Trait, ch as TraitCategory, ci as TraitCategorySchema, cj as TraitDataEntity, ck as TraitDataEntitySchema, cl as TraitEntityField, cm as TraitEntityFieldSchema, T as TraitEventContract, cn as TraitEventContractSchema, co as TraitEventListener, cp as TraitEventListenerSchema, cq as TraitInput, cr as TraitRef, cs as TraitRefSchema, ct as TraitReference, cu as TraitReferenceInput, cv as TraitReferenceSchema, cw as TraitSchema, cx as TraitTick, cy as TraitTickSchema, cz as TraitUIBinding, cA as Transition, cB as TransitionInput, cC as TransitionSchema, cD as UISlot, cE as UISlotSchema, cF as UI_SLOTS, cG as UXHints, cH as UXHintsSchema, cI as UseDeclaration, cJ as UseDeclarationSchema, cK as UserPersona, cL as UserPersonaInput, cM as UserPersonaSchema, cN as VISUAL_STYLES, cO as ViewType, cP as ViewTypeSchema, cQ as VisualStyle, cR as VisualStyleSchema, cS as WatchEffect, cT as WatchOptions, cU as atomic, cV as callService, cW as collectBindings, cX as createAssetKey, cY as deref, cZ as deriveCollection, c_ as despawn, c$ as doEffects, d0 as emit, d1 as findService, d2 as getArgs, d3 as getDefaultAnimationsForRole, d4 as getOperator, d5 as getServiceNames, d6 as getTraitConfig, d7 as getTraitName, d8 as hasService, d9 as isBinding, da as isCircuitEvent, db as isEffect, dc as isEntityCall, dd as isEntityReference, de as isEntityReferenceAny, df as isImportedTraitRef, dg as isInlineTrait, dh as isMcpService, di as isOrbitalDefinition, dj as isPageReference, dk as isPageReferenceObject, dl as isPageReferenceString, dm as isRestService, dn as isRuntimeEntity, dp as isSExpr, dq as isSExprAtom, dr as isSExprCall, ds as isSExprEffect, dt as isServiceReference, du as isSingletonEntity, dv as isSocketService, dw as isThemeReference, dx as isValidBinding, dy as navigate, dz as normalizeTraitRef, dA as notify, dB as parseAssetKey, dC as parseBinding, dD as parseEntityRef, dE as parseImportedTraitRef, dF as parseOrbitalSchema, dG as parsePageRef, dH as parseServiceRef, dI as persist, dJ as ref, dK as renderUI, dL as safeParseOrbitalSchema, dM as set, dN as sexpr, dO as spawn, dP as swap, dQ as validateAssetAnimations, dR as walkSExpr, dS as watch } from '../schema-COvHzxfu.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
export { CATEGORIES, CategoryMeta, OPERATORS, OPERATORS_SCHEMA, OPERATOR_NAMES, OperatorCategory, OperatorMeta, OperatorStats, OperatorsSchema, TargetPlatform, getOperatorMeta, getOperatorStats, getOperatorsByCategory, getOperatorsForTarget, isEffectOperator, isGuardOperator, isKnownOperator, validateOperatorArity } from '@almadar/operators';
|
|
5
5
|
export { PATTERN_TYPES, PatternConfig, PatternType, isValidPatternType } from '@almadar/patterns';
|
package/dist/types/index.js
CHANGED
|
@@ -544,6 +544,8 @@ var RequiredFieldSchema = z.object({
|
|
|
544
544
|
var TraitReferenceSchema = z.object({
|
|
545
545
|
ref: z.string().min(1),
|
|
546
546
|
linkedEntity: z.string().optional(),
|
|
547
|
+
name: z.string().optional(),
|
|
548
|
+
events: z.record(z.string(), z.string()).optional(),
|
|
547
549
|
config: z.record(z.record(z.unknown())).optional(),
|
|
548
550
|
appliesTo: z.array(z.string()).optional()
|
|
549
551
|
});
|
|
@@ -567,7 +569,9 @@ var TraitRefSchema = z.union([
|
|
|
567
569
|
z.object({
|
|
568
570
|
ref: z.string().min(1),
|
|
569
571
|
config: z.record(z.unknown()).optional(),
|
|
570
|
-
linkedEntity: z.string().optional()
|
|
572
|
+
linkedEntity: z.string().optional(),
|
|
573
|
+
name: z.string().optional(),
|
|
574
|
+
events: z.record(z.string(), z.string()).optional()
|
|
571
575
|
}),
|
|
572
576
|
TraitSchema
|
|
573
577
|
// Allow inline trait definitions
|
|
@@ -876,11 +880,31 @@ var UseDeclarationSchema = z.object({
|
|
|
876
880
|
function isEntityReference(entity) {
|
|
877
881
|
return typeof entity === "string";
|
|
878
882
|
}
|
|
883
|
+
function isEntityCall(entity) {
|
|
884
|
+
return typeof entity === "object" && entity !== null && "extends" in entity;
|
|
885
|
+
}
|
|
886
|
+
function isEntityReferenceAny(entity) {
|
|
887
|
+
return isEntityReference(entity) || isEntityCall(entity);
|
|
888
|
+
}
|
|
879
889
|
var EntityRefStringSchema = z.string().regex(
|
|
880
890
|
/^[A-Z][a-zA-Z0-9]*\.entity$/,
|
|
881
891
|
'Entity reference must be in format "Alias.entity" (e.g., "Goblin.entity")'
|
|
882
892
|
);
|
|
883
|
-
var
|
|
893
|
+
var EntityCallSchema = z.object({
|
|
894
|
+
extends: z.string().regex(
|
|
895
|
+
/^[A-Z][a-zA-Z0-9]*\.entity$/,
|
|
896
|
+
'EntityCall "extends" must be in format "Alias.entity"'
|
|
897
|
+
),
|
|
898
|
+
name: z.string().optional(),
|
|
899
|
+
fields: z.array(EntityFieldSchema).optional(),
|
|
900
|
+
persistence: EntityPersistenceSchema.optional(),
|
|
901
|
+
collection: z.string().optional()
|
|
902
|
+
});
|
|
903
|
+
var EntityRefSchema = z.union([
|
|
904
|
+
EntitySchema,
|
|
905
|
+
EntityRefStringSchema,
|
|
906
|
+
EntityCallSchema
|
|
907
|
+
]);
|
|
884
908
|
function isPageReferenceString(page) {
|
|
885
909
|
return typeof page === "string";
|
|
886
910
|
}
|
|
@@ -896,7 +920,9 @@ var PageRefStringSchema = z.string().regex(
|
|
|
896
920
|
);
|
|
897
921
|
var PageRefObjectSchema = z.object({
|
|
898
922
|
ref: PageRefStringSchema,
|
|
899
|
-
path: z.string().startsWith("/").optional()
|
|
923
|
+
path: z.string().startsWith("/").optional(),
|
|
924
|
+
linkedEntity: z.string().optional(),
|
|
925
|
+
traits: z.array(TraitRefSchema).optional()
|
|
900
926
|
});
|
|
901
927
|
var PageRefSchema = z.union([
|
|
902
928
|
PageSchema,
|
|
@@ -1229,6 +1255,6 @@ function isResolvedIR(ir) {
|
|
|
1229
1255
|
return typeof r.appName === "string" && r.traits instanceof Map && r.pages instanceof Map;
|
|
1230
1256
|
}
|
|
1231
1257
|
|
|
1232
|
-
export { AGENT_DOMAIN_CATEGORIES, ALLOWED_CUSTOM_COMPONENTS, AgentDomainCategorySchema, AnimationDefSchema, AssetMapSchema, AssetMappingSchema, BINDING_CONTEXT_RULES, BINDING_DOCS, BindingSchema, CORE_BINDINGS, ComputedEventContractSchema, ComputedEventListenerSchema, CustomPatternDefinitionSchema, CustomPatternMapSchema, DEFAULT_INTERACTION_MODELS, DesignPreferencesSchema, DesignTokensSchema, DomainCategorySchema, DomainContextSchema, DomainVocabularySchema, ENTITY_ROLES, EffectSchema, EntityFieldSchema, EntityPersistenceSchema, EntityRefSchema, EntityRefStringSchema, EntityRoleSchema, EntitySchema, EntitySemanticRoleSchema, EventListenerSchema, EventPayloadFieldSchema, EventSchema, EventScopeSchema, EventSemanticRoleSchema, EventSourceSchema, ExpressionSchema, FieldFormatSchema, FieldSchema, FieldTypeSchema, GAME_TYPES, GameSubCategorySchema, GameTypeSchema, GuardSchema, InteractionModelSchema, McpServiceDefSchema, NodeClassificationSchema, OrbitalConfigSchema, OrbitalDefinitionSchema, OrbitalEntitySchema, OrbitalPageSchema, OrbitalPageStrictSchema, OrbitalSchemaSchema, OrbitalTraitRefSchema, OrbitalUnitSchema, OrbitalSchema as OrbitalZodSchema, PageRefObjectSchema, PageRefSchema, PageRefStringSchema, PageSchema, PageTraitRefSchema, PatternTypeSchema, PayloadFieldSchema, RelatedLinkSchema, RelationConfigSchema, RequiredFieldSchema, ResolvedAssetSchema, RestAuthConfigSchema, RestServiceDefSchema, SERVICE_TYPES, SExprAtomSchema, SExprSchema, SemanticAssetRefSchema, ServiceDefinitionSchema, ServiceRefSchema, ServiceRefStringSchema, ServiceTypeSchema, SocketEventsSchema, SocketServiceDefSchema, StateMachineSchema, StateSchema, StateSemanticRoleSchema, SuggestedGuardSchema, ThemeDefinitionSchema, ThemeRefSchema, ThemeRefStringSchema, ThemeTokensSchema, ThemeVariantSchema, TraitCategorySchema, TraitDataEntitySchema, TraitEntityFieldSchema, TraitEventContractSchema, TraitEventListenerSchema, TraitRefSchema, TraitReferenceSchema, TraitSchema, TraitTickSchema, TransitionSchema, UISlotSchema, UI_SLOTS, UXHintsSchema, UseDeclarationSchema, UserPersonaSchema, VISUAL_STYLES, ViewTypeSchema, VisualStyleSchema, atomic, callService, collectBindings, createAssetKey, createEmptyResolvedPage, createEmptyResolvedTrait, createLazyService, createResolvedField, createTypedEventBus, deref, deriveCollection, despawn, doEffects, emit, findService, getAllOperators, getAllPatternTypes, getArgs, getBindingExamples, getDefaultAnimationsForRole, getInteractionModelForDomain, getOperator, getServiceNames, getTraitConfig, getTraitName, hasService, inferTsType, isBinding, isCircuitEvent, isEffect, isEntityReference, isImportedTraitRef, isInlineTrait, isMcpService, isOrbitalDefinition, isPageReference, isPageReferenceObject, isPageReferenceString, isResolvedIR, isRestService, isRuntimeEntity, isSExpr, isSExprAtom, isSExprCall, isSExprEffect, isServiceReference, isSingletonEntity, isSocketService, isThemeReference, isValidBinding, navigate, normalizeTraitRef, notify, parseAssetKey, parseBinding, parseEntityRef, parseImportedTraitRef, parseOrbitalSchema, parsePageRef, parseServiceRef, persist, ref, renderUI, safeParseOrbitalSchema, set, sexpr, spawn, swap, validateAssetAnimations, validateBindingInContext, walkSExpr, watch };
|
|
1258
|
+
export { AGENT_DOMAIN_CATEGORIES, ALLOWED_CUSTOM_COMPONENTS, AgentDomainCategorySchema, AnimationDefSchema, AssetMapSchema, AssetMappingSchema, BINDING_CONTEXT_RULES, BINDING_DOCS, BindingSchema, CORE_BINDINGS, ComputedEventContractSchema, ComputedEventListenerSchema, CustomPatternDefinitionSchema, CustomPatternMapSchema, DEFAULT_INTERACTION_MODELS, DesignPreferencesSchema, DesignTokensSchema, DomainCategorySchema, DomainContextSchema, DomainVocabularySchema, ENTITY_ROLES, EffectSchema, EntityCallSchema, EntityFieldSchema, EntityPersistenceSchema, EntityRefSchema, EntityRefStringSchema, EntityRoleSchema, EntitySchema, EntitySemanticRoleSchema, EventListenerSchema, EventPayloadFieldSchema, EventSchema, EventScopeSchema, EventSemanticRoleSchema, EventSourceSchema, ExpressionSchema, FieldFormatSchema, FieldSchema, FieldTypeSchema, GAME_TYPES, GameSubCategorySchema, GameTypeSchema, GuardSchema, InteractionModelSchema, McpServiceDefSchema, NodeClassificationSchema, OrbitalConfigSchema, OrbitalDefinitionSchema, OrbitalEntitySchema, OrbitalPageSchema, OrbitalPageStrictSchema, OrbitalSchemaSchema, OrbitalTraitRefSchema, OrbitalUnitSchema, OrbitalSchema as OrbitalZodSchema, PageRefObjectSchema, PageRefSchema, PageRefStringSchema, PageSchema, PageTraitRefSchema, PatternTypeSchema, PayloadFieldSchema, RelatedLinkSchema, RelationConfigSchema, RequiredFieldSchema, ResolvedAssetSchema, RestAuthConfigSchema, RestServiceDefSchema, SERVICE_TYPES, SExprAtomSchema, SExprSchema, SemanticAssetRefSchema, ServiceDefinitionSchema, ServiceRefSchema, ServiceRefStringSchema, ServiceTypeSchema, SocketEventsSchema, SocketServiceDefSchema, StateMachineSchema, StateSchema, StateSemanticRoleSchema, SuggestedGuardSchema, ThemeDefinitionSchema, ThemeRefSchema, ThemeRefStringSchema, ThemeTokensSchema, ThemeVariantSchema, TraitCategorySchema, TraitDataEntitySchema, TraitEntityFieldSchema, TraitEventContractSchema, TraitEventListenerSchema, TraitRefSchema, TraitReferenceSchema, TraitSchema, TraitTickSchema, TransitionSchema, UISlotSchema, UI_SLOTS, UXHintsSchema, UseDeclarationSchema, UserPersonaSchema, VISUAL_STYLES, ViewTypeSchema, VisualStyleSchema, atomic, callService, collectBindings, createAssetKey, createEmptyResolvedPage, createEmptyResolvedTrait, createLazyService, createResolvedField, createTypedEventBus, deref, deriveCollection, despawn, doEffects, emit, findService, getAllOperators, getAllPatternTypes, getArgs, getBindingExamples, getDefaultAnimationsForRole, getInteractionModelForDomain, getOperator, getServiceNames, getTraitConfig, getTraitName, hasService, inferTsType, isBinding, isCircuitEvent, isEffect, isEntityCall, isEntityReference, isEntityReferenceAny, isImportedTraitRef, isInlineTrait, isMcpService, isOrbitalDefinition, isPageReference, isPageReferenceObject, isPageReferenceString, isResolvedIR, isRestService, isRuntimeEntity, isSExpr, isSExprAtom, isSExprCall, isSExprEffect, isServiceReference, isSingletonEntity, isSocketService, isThemeReference, isValidBinding, navigate, normalizeTraitRef, notify, parseAssetKey, parseBinding, parseEntityRef, parseImportedTraitRef, parseOrbitalSchema, parsePageRef, parseServiceRef, persist, ref, renderUI, safeParseOrbitalSchema, set, sexpr, spawn, swap, validateAssetAnimations, validateBindingInContext, walkSExpr, watch };
|
|
1233
1259
|
//# sourceMappingURL=index.js.map
|
|
1234
1260
|
//# sourceMappingURL=index.js.map
|