@almadar/core 10.12.0 → 10.14.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 -3
- package/dist/builders.js +56 -2
- package/dist/builders.js.map +1 -1
- package/dist/{compose-behaviors-Bhf-XFFc.d.ts → compose-behaviors-Ds6d_mMY.d.ts} +1 -1
- package/dist/factory/index.d.ts +3 -3
- package/dist/factory-runtime/index.d.ts +3 -3
- package/dist/factory-runtime/index.js +56 -2
- package/dist/factory-runtime/index.js.map +1 -1
- package/dist/index.d.ts +7 -7
- package/dist/index.js +57 -3
- package/dist/index.js.map +1 -1
- package/dist/{schema-CSn8gU27.d.ts → schema-BVcq7eXk.d.ts} +1459 -1459
- package/dist/{trait-DecHZfpm.d.ts → trait-Ctj2l6ma.d.ts} +443 -48
- package/dist/types/index.d.ts +6 -6
- package/dist/types/index.js +57 -3
- package/dist/types/index.js.map +1 -1
- package/dist/{types-C16w56HW.d.ts → types-QQ9BTzkx.d.ts} +1 -1
- package/package.json +1 -1
package/dist/factory/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { g as FactoryParamValue, c as FactoryConfigTier, b as FactoryConfigParam, F as FactoryCallSite, h as FactorySignature, R as RuleOverlay, p as RuleOverlayEntry, o as PresentationOverlay, q as TraitOverlay } from '../types-
|
|
2
|
-
export { a as FactoryCallSiteParams, d as FactoryEntitySignature, e as FactoryEventSignature, f as FactoryPageSignature, i as FactorySignatureCatalog, j as FactorySignatureEntityField, k as FactoryTraitSignature, m as JsonSchema, n as JsonSchemaType, J as JsonValue, O as OwnershipOverlayEntry, P as PresentationNavItem, S as SchemaFieldType, r as TraitOverlayEntry, s as TraitOverlayListener } from '../types-
|
|
3
|
-
import { g as EntityPersistence, f as EntityField, j as TraitReference } from '../trait-
|
|
1
|
+
import { g as FactoryParamValue, c as FactoryConfigTier, b as FactoryConfigParam, F as FactoryCallSite, h as FactorySignature, R as RuleOverlay, p as RuleOverlayEntry, o as PresentationOverlay, q as TraitOverlay } from '../types-QQ9BTzkx.js';
|
|
2
|
+
export { a as FactoryCallSiteParams, d as FactoryEntitySignature, e as FactoryEventSignature, f as FactoryPageSignature, i as FactorySignatureCatalog, j as FactorySignatureEntityField, k as FactoryTraitSignature, m as JsonSchema, n as JsonSchemaType, J as JsonValue, O as OwnershipOverlayEntry, P as PresentationNavItem, S as SchemaFieldType, r as TraitOverlayEntry, s as TraitOverlayListener } from '../types-QQ9BTzkx.js';
|
|
3
|
+
import { g as EntityPersistence, f as EntityField, j as TraitReference } from '../trait-Ctj2l6ma.js';
|
|
4
4
|
import 'zod';
|
|
5
5
|
import '../expression-BUIi9ezJ.js';
|
|
6
6
|
import '@almadar/patterns';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { O as OrbitalSchema, a as OrbitalDefinition } from '../schema-
|
|
2
|
-
import { f as EntityField, g as EntityPersistence, C as CallSiteConfig,
|
|
1
|
+
import { O as OrbitalSchema, a as OrbitalDefinition } from '../schema-BVcq7eXk.js';
|
|
2
|
+
import { f as EntityField, g as EntityPersistence, C as CallSiteConfig, $ as CallSiteConfigEntry, a as Trait } from '../trait-Ctj2l6ma.js';
|
|
3
3
|
import { MakeTraitRefOpts } from '../builders.js';
|
|
4
4
|
import '../expression-BUIi9ezJ.js';
|
|
5
5
|
import 'zod';
|
|
6
6
|
import '@almadar/patterns';
|
|
7
|
-
import '../compose-behaviors-
|
|
7
|
+
import '../compose-behaviors-Ds6d_mMY.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Orbital factory manifest types — shared across all packages.
|
|
@@ -164,11 +164,63 @@ var GAME_TYPES = [
|
|
|
164
164
|
"rpg"
|
|
165
165
|
];
|
|
166
166
|
var GameTypeSchema = z.enum(GAME_TYPES);
|
|
167
|
+
var ANIMATION_NAMES = ["idle", "walk", "attack", "hit", "death"];
|
|
168
|
+
var AnimationNameSchema = z.enum(ANIMATION_NAMES);
|
|
169
|
+
var SPRITE_DIRECTIONS = ["se", "sw"];
|
|
170
|
+
var SpriteDirectionSchema = z.enum(SPRITE_DIRECTIONS);
|
|
167
171
|
var AnimationDefSchema = z.object({
|
|
168
|
-
|
|
169
|
-
|
|
172
|
+
row: z.number().int().nonnegative(),
|
|
173
|
+
frames: z.number().int().positive(),
|
|
174
|
+
frameRate: z.number().positive(),
|
|
170
175
|
loop: z.boolean()
|
|
171
176
|
});
|
|
177
|
+
z.object({
|
|
178
|
+
unit: z.string().optional(),
|
|
179
|
+
type: z.string().optional(),
|
|
180
|
+
frameWidth: z.number().positive(),
|
|
181
|
+
frameHeight: z.number().positive(),
|
|
182
|
+
columns: z.number().int().positive(),
|
|
183
|
+
rows: z.number().int().positive(),
|
|
184
|
+
directions: z.array(SpriteDirectionSchema),
|
|
185
|
+
sheets: z.record(SpriteDirectionSchema, z.string()),
|
|
186
|
+
animations: z.record(AnimationNameSchema, AnimationDefSchema)
|
|
187
|
+
});
|
|
188
|
+
var SubTextureSchema = z.object({
|
|
189
|
+
x: z.number().nonnegative(),
|
|
190
|
+
y: z.number().nonnegative(),
|
|
191
|
+
width: z.number().positive(),
|
|
192
|
+
height: z.number().positive(),
|
|
193
|
+
frameX: z.number().optional(),
|
|
194
|
+
frameY: z.number().optional(),
|
|
195
|
+
frameWidth: z.number().positive().optional(),
|
|
196
|
+
frameHeight: z.number().positive().optional()
|
|
197
|
+
});
|
|
198
|
+
z.object({
|
|
199
|
+
imagePath: z.string(),
|
|
200
|
+
subTextures: z.record(z.string(), SubTextureSchema)
|
|
201
|
+
});
|
|
202
|
+
z.object({
|
|
203
|
+
imagePath: z.string(),
|
|
204
|
+
tileWidth: z.number().positive(),
|
|
205
|
+
tileHeight: z.number().positive(),
|
|
206
|
+
columns: z.number().int().positive(),
|
|
207
|
+
rows: z.number().int().positive(),
|
|
208
|
+
margin: z.number().nonnegative().optional(),
|
|
209
|
+
spacing: z.number().nonnegative().optional(),
|
|
210
|
+
names: z.array(z.string()).optional()
|
|
211
|
+
});
|
|
212
|
+
var PACK_CLASSES = ["board-tileset", "character-kit", "shared-primitive"];
|
|
213
|
+
z.enum(PACK_CLASSES);
|
|
214
|
+
var CharacterKitLayerSchema = z.object({
|
|
215
|
+
slot: z.enum(["body", "head", "face", "hair", "facialHair", "shirt", "pants", "shoes", "accessory"]),
|
|
216
|
+
url: z.string(),
|
|
217
|
+
atlas: z.string().optional(),
|
|
218
|
+
sprite: z.string().optional()
|
|
219
|
+
});
|
|
220
|
+
z.object({
|
|
221
|
+
pack: z.string(),
|
|
222
|
+
layers: z.array(CharacterKitLayerSchema)
|
|
223
|
+
});
|
|
172
224
|
var SemanticAssetRefSchema = z.object({
|
|
173
225
|
role: EntityRoleSchema,
|
|
174
226
|
category: z.string().min(1),
|
|
@@ -180,6 +232,8 @@ var SemanticAssetRefSchema = z.object({
|
|
|
180
232
|
});
|
|
181
233
|
SemanticAssetRefSchema.extend({
|
|
182
234
|
url: z.string(),
|
|
235
|
+
atlas: z.string().optional(),
|
|
236
|
+
sprite: z.string().optional(),
|
|
183
237
|
name: z.string().optional(),
|
|
184
238
|
thumbnailUrl: z.string().optional()
|
|
185
239
|
});
|