@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/builders.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { T as TraitConfig, U as UISlot, E as Effect, a as Trait, R as RenderBinding, b as RenderUIEffect, c as TraitEventContract, d as Entity, e as TraitEventListener, C as CallSiteConfig, f as EntityField, g as EntityPersistence, h as EntityRow, i as TraitRef, j as TraitReference } from './trait-
|
|
2
|
-
import { O as OrbitalSchema, U as UseDeclaration, E as EntityRef, P as PageRef, a as OrbitalDefinition, b as Page, c as PageRefObject } from './schema-
|
|
1
|
+
import { T as TraitConfig, U as UISlot, E as Effect, a as Trait, R as RenderBinding, b as RenderUIEffect, c as TraitEventContract, d as Entity, e as TraitEventListener, C as CallSiteConfig, f as EntityField, g as EntityPersistence, h as EntityRow, i as TraitRef, j as TraitReference } from './trait-Ctj2l6ma.js';
|
|
2
|
+
import { O as OrbitalSchema, U as UseDeclaration, E as EntityRef, P as PageRef, a as OrbitalDefinition, b as Page, c as PageRefObject } from './schema-BVcq7eXk.js';
|
|
3
3
|
import { S as SExpr } from './expression-BUIi9ezJ.js';
|
|
4
|
-
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-
|
|
4
|
+
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-Ds6d_mMY.js';
|
|
5
5
|
import { AnyPatternConfig } from '@almadar/patterns';
|
|
6
6
|
import 'zod';
|
|
7
7
|
|
package/dist/builders.js
CHANGED
|
@@ -163,11 +163,63 @@ var GAME_TYPES = [
|
|
|
163
163
|
"rpg"
|
|
164
164
|
];
|
|
165
165
|
var GameTypeSchema = z.enum(GAME_TYPES);
|
|
166
|
+
var ANIMATION_NAMES = ["idle", "walk", "attack", "hit", "death"];
|
|
167
|
+
var AnimationNameSchema = z.enum(ANIMATION_NAMES);
|
|
168
|
+
var SPRITE_DIRECTIONS = ["se", "sw"];
|
|
169
|
+
var SpriteDirectionSchema = z.enum(SPRITE_DIRECTIONS);
|
|
166
170
|
var AnimationDefSchema = z.object({
|
|
167
|
-
|
|
168
|
-
|
|
171
|
+
row: z.number().int().nonnegative(),
|
|
172
|
+
frames: z.number().int().positive(),
|
|
173
|
+
frameRate: z.number().positive(),
|
|
169
174
|
loop: z.boolean()
|
|
170
175
|
});
|
|
176
|
+
z.object({
|
|
177
|
+
unit: z.string().optional(),
|
|
178
|
+
type: z.string().optional(),
|
|
179
|
+
frameWidth: z.number().positive(),
|
|
180
|
+
frameHeight: z.number().positive(),
|
|
181
|
+
columns: z.number().int().positive(),
|
|
182
|
+
rows: z.number().int().positive(),
|
|
183
|
+
directions: z.array(SpriteDirectionSchema),
|
|
184
|
+
sheets: z.record(SpriteDirectionSchema, z.string()),
|
|
185
|
+
animations: z.record(AnimationNameSchema, AnimationDefSchema)
|
|
186
|
+
});
|
|
187
|
+
var SubTextureSchema = z.object({
|
|
188
|
+
x: z.number().nonnegative(),
|
|
189
|
+
y: z.number().nonnegative(),
|
|
190
|
+
width: z.number().positive(),
|
|
191
|
+
height: z.number().positive(),
|
|
192
|
+
frameX: z.number().optional(),
|
|
193
|
+
frameY: z.number().optional(),
|
|
194
|
+
frameWidth: z.number().positive().optional(),
|
|
195
|
+
frameHeight: z.number().positive().optional()
|
|
196
|
+
});
|
|
197
|
+
z.object({
|
|
198
|
+
imagePath: z.string(),
|
|
199
|
+
subTextures: z.record(z.string(), SubTextureSchema)
|
|
200
|
+
});
|
|
201
|
+
z.object({
|
|
202
|
+
imagePath: z.string(),
|
|
203
|
+
tileWidth: z.number().positive(),
|
|
204
|
+
tileHeight: z.number().positive(),
|
|
205
|
+
columns: z.number().int().positive(),
|
|
206
|
+
rows: z.number().int().positive(),
|
|
207
|
+
margin: z.number().nonnegative().optional(),
|
|
208
|
+
spacing: z.number().nonnegative().optional(),
|
|
209
|
+
names: z.array(z.string()).optional()
|
|
210
|
+
});
|
|
211
|
+
var PACK_CLASSES = ["board-tileset", "character-kit", "shared-primitive"];
|
|
212
|
+
z.enum(PACK_CLASSES);
|
|
213
|
+
var CharacterKitLayerSchema = z.object({
|
|
214
|
+
slot: z.enum(["body", "head", "face", "hair", "facialHair", "shirt", "pants", "shoes", "accessory"]),
|
|
215
|
+
url: z.string(),
|
|
216
|
+
atlas: z.string().optional(),
|
|
217
|
+
sprite: z.string().optional()
|
|
218
|
+
});
|
|
219
|
+
z.object({
|
|
220
|
+
pack: z.string(),
|
|
221
|
+
layers: z.array(CharacterKitLayerSchema)
|
|
222
|
+
});
|
|
171
223
|
var SemanticAssetRefSchema = z.object({
|
|
172
224
|
role: EntityRoleSchema,
|
|
173
225
|
category: z.string().min(1),
|
|
@@ -179,6 +231,8 @@ var SemanticAssetRefSchema = z.object({
|
|
|
179
231
|
});
|
|
180
232
|
SemanticAssetRefSchema.extend({
|
|
181
233
|
url: z.string(),
|
|
234
|
+
atlas: z.string().optional(),
|
|
235
|
+
sprite: z.string().optional(),
|
|
182
236
|
name: z.string().optional(),
|
|
183
237
|
thumbnailUrl: z.string().optional()
|
|
184
238
|
});
|