@almadar/core 4.2.0 → 4.3.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 +13 -7
- package/dist/builders.js +34 -7
- package/dist/builders.js.map +1 -1
- package/dist/{compose-behaviors-DQTTCmR2.d.ts → compose-behaviors--NQpnVOA.d.ts} +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +10 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -80,8 +80,8 @@ declare function detectLayoutStrategy(orbitals: OrbitalDefinition[], eventWiring
|
|
|
80
80
|
interface ComposeBehaviorsInput {
|
|
81
81
|
/** Application name */
|
|
82
82
|
appName: string;
|
|
83
|
-
/** Orbital definitions to compose */
|
|
84
|
-
orbitals: OrbitalDefinition[];
|
|
83
|
+
/** Orbital definitions (or schemas) to compose */
|
|
84
|
+
orbitals: (OrbitalDefinition | OrbitalSchema)[];
|
|
85
85
|
/** Layout strategy override, or 'auto' to detect */
|
|
86
86
|
layoutStrategy?: LayoutStrategy | 'auto';
|
|
87
87
|
/** Cross-orbital event wiring */
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export { A as AGENT_DOMAIN_CATEGORIES, f as ALLOWED_CUSTOM_COMPONENTS, g as Agen
|
|
|
3
3
|
import { ResolvedIR, ResolvedEntity, ResolvedPage, ResolvedTrait, SchemaChange, CategorizedRemovals, PageContentReduction, SemanticSchemaChange } from './types/index.js';
|
|
4
4
|
export { AgentCodeSearchResult, AgentCompactResult, AgentCompactStrategy, AgentContext, AgentGenerateOptions, AgentMemoryCategory, AgentMemoryRecord, AppSummary, BINDING_CONTEXT_RULES, BINDING_DOCS, BindingContext, BindingSchema, ChangeAuthor, ChangeSetDocument, ChangeSummary, CreateFlow, DEFAULT_INTERACTION_MODELS, DeleteFlow, EditFlow, GitHubLink, HistoryMeta, InteractionModel, InteractionModelInput, InteractionModelSchema, LazyService, ListInteraction, OperatorName, PatternTypeSchema, PersistActionName, ResolvedEntityBinding, ResolvedField, ResolvedNavigation, ResolvedPattern, ResolvedSection, ResolvedSectionEvent, ResolvedTraitBinding, ResolvedTraitDataEntity, ResolvedTraitEvent, ResolvedTraitGuard, ResolvedTraitListener, ResolvedTraitState, ResolvedTraitTick, ResolvedTraitTransition, ResolvedTraitUIBinding, SaveOptions, SaveResult, SemanticChangeKind, ServiceAction, ServiceActionName, ServiceContract, ServiceEvents, SnapshotDocument, StatsView, StoreContract, StoreFilter, StoreFilterOp, TransitionFrom, ValidationDocument, ValidationIssue, ValidationMeta, ValidationResults, ViewFlow, createEmptyResolvedPage, createEmptyResolvedTrait, createLazyService, createResolvedField, createTypedEventBus, getAllOperators, getAllPatternTypes, getBindingExamples, getInteractionModelForDomain, inferTsType, isResolvedIR, validateBindingInContext } from './types/index.js';
|
|
5
5
|
export { ASTNode, ComparisonCondition, ComparisonOperator, DomainBehavior, DomainChunk, DomainDocument, DomainEffect, DomainEntity, DomainField, DomainFieldType, DomainGuard, DomainPage, DomainPageAction, DomainPageSection, DomainRelationship, DomainTick, DomainToSchemaResult, DomainTransition, EFFECT_REGISTRY, EffectMapping, EffectType, FIELD_TYPE_REGISTRY, FieldCheckCondition, FieldReference, FieldTypeMapping, GUARD_REGISTRY, GuardCondition, GuardMapping, KEYWORDS, Lexer, LogicalCondition, LogicalOperator, MULTI_WORD_KEYWORDS, MappingStore, MergeResult, ParseError, ParseResult, RelationshipType, SchemaToDomainResult, SectionMapping, SourceLocation, SourceRange, Token, TokenType, UserCheckCondition, applySectionUpdate, computeSchemaHash, convertDomainToSchema, convertEntitiesToDomain, convertPagesToDomain, convertSchemaToDomain, convertTraitsToDomain, createMappingStore, deleteSection, detectChanges, domainKeywordToSchemaType, findMapping, findMappingByPath, findMappingsByType, formatBehaviorToDomain, formatBehaviorToSchema, formatDomainGuardToSchema, formatEntityToDomain, formatEntityToSchema, formatGuardConditionToDomain, formatGuardToDomain, formatGuardToSchema, formatMergeSummary, formatPageToDomain, formatPageToSchema, formatSchemaEntityToDomain, formatSchemaGuardToDomain, formatSchemaPageToDomain, formatSchemaTraitToDomain, generateDomainLanguageReference, generateSectionId, getEffectMapping, getFieldTypeMapping, getGuardMapping, getRegisteredEffects, getRegisteredFieldTypes, getRegisteredGuards, getRegistryStats, getSchemaPath, hasSchemaChanged, isEffectRegistered, isFieldTypeRegistered, isGuardRegistered, mergeDomainChunks, parseBehavior, parseDomainEffect, parseDomainEffects, parseDomainGuard, parseEntity, parseGuard, parsePage, parseSectionId, removeMapping, resolveConflict, schemaEntityToDomainEntity, schemaPageToDomainPage, schemaTraitToDomainBehavior, schemaTypeToDomainKeyword, tokenize, updateMappingRange, updateSchemaHash, upsertMapping, validateDomainChunk } from './domain-language/index.js';
|
|
6
|
-
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
|
|
6
|
+
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--NQpnVOA.js';
|
|
7
7
|
export { BFSNode, BFSPathNode, EdgeWalkTransition, GraphTransition, GuardPayload, ReplayStep, ReplayTransition, StateEdge, WalkStep, buildEdgeCoveringWalk, buildGuardPayloads, buildReplayPaths, buildStateGraph, collectReachableStates, extractPayloadFieldRef, walkStatePairs } from './state-machine/index.js';
|
|
8
8
|
export { CATEGORIES, CategoryMeta, OPERATORS, OPERATORS_SCHEMA, OPERATOR_NAMES, OperatorCategory, OperatorMeta, OperatorStats, OperatorsSchema, TargetPlatform, getOperatorMeta, getOperatorStats, getOperatorsByCategory, getOperatorsForTarget, isEffectOperator, isGuardOperator, isKnownOperator, validateOperatorArity } from '@almadar/operators';
|
|
9
9
|
export { PATTERN_TYPES, PatternConfig, PatternType, isValidPatternType } from '@almadar/patterns';
|
package/dist/index.js
CHANGED
|
@@ -8087,6 +8087,14 @@ function applyEventWiring(orbitals, wiring) {
|
|
|
8087
8087
|
}
|
|
8088
8088
|
|
|
8089
8089
|
// src/builders/compose-behaviors.ts
|
|
8090
|
+
function asDefinitions(inputs) {
|
|
8091
|
+
return inputs.flatMap((input) => {
|
|
8092
|
+
if ("orbitals" in input && Array.isArray(input.orbitals)) {
|
|
8093
|
+
return input.orbitals;
|
|
8094
|
+
}
|
|
8095
|
+
return [input];
|
|
8096
|
+
});
|
|
8097
|
+
}
|
|
8090
8098
|
function toKebabCase3(name) {
|
|
8091
8099
|
return name.replace(/([a-z])([A-Z])/g, "$1-$2").replace(/[\s_]+/g, "-").toLowerCase();
|
|
8092
8100
|
}
|
|
@@ -8137,10 +8145,11 @@ function getEntityName3(orbital) {
|
|
|
8137
8145
|
function composeBehaviors(input) {
|
|
8138
8146
|
const {
|
|
8139
8147
|
appName,
|
|
8140
|
-
orbitals:
|
|
8148
|
+
orbitals: rawInputs,
|
|
8141
8149
|
layoutStrategy: strategyInput,
|
|
8142
8150
|
eventWiring
|
|
8143
8151
|
} = input;
|
|
8152
|
+
const rawOrbitals = asDefinitions(rawInputs);
|
|
8144
8153
|
const wiredOrbitals = eventWiring && eventWiring.length > 0 ? applyEventWiring(rawOrbitals, eventWiring) : rawOrbitals;
|
|
8145
8154
|
const strategy = !strategyInput || strategyInput === "auto" ? detectLayoutStrategy(wiredOrbitals, eventWiring) : strategyInput;
|
|
8146
8155
|
const pages = generatePages(wiredOrbitals, strategy);
|