@almadar/core 10.50.0 → 10.51.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 +13 -3
- package/dist/builders.js.map +1 -1
- package/dist/{effect-DjMRX8sI.d.ts → effect-CqTo1gAF.d.ts} +79 -13
- package/dist/{entityAccess-dYpx6Ipw.d.ts → entityAccess-3QD5qbqw.d.ts} +1 -1
- package/dist/factory/index.d.ts +4 -4
- package/dist/factory-runtime/index.d.ts +3 -3
- package/dist/factory-runtime/index.js +13 -3
- package/dist/factory-runtime/index.js.map +1 -1
- package/dist/index.d.ts +71 -10
- package/dist/index.js +150 -8
- package/dist/index.js.map +1 -1
- package/dist/mock/index.d.ts +12 -5
- package/dist/mock/index.js +21 -5
- package/dist/mock/index.js.map +1 -1
- package/dist/patterns/component-mapping.json +1 -1
- package/dist/patterns/event-contracts.json +1 -1
- package/dist/patterns/index.d.ts +89 -6
- package/dist/patterns/index.js +41 -4
- package/dist/patterns/index.js.map +1 -1
- package/dist/patterns/patterns-registry.json +39 -2
- package/dist/patterns/registry.json +39 -2
- package/dist/{schema-1bzTH92n.d.ts → schema-h6xcymfn.d.ts} +99 -99
- package/dist/{trait-DkMVtmED.d.ts → trait-CnbGhs6A.d.ts} +31 -23
- package/dist/types/index.d.ts +25 -8
- package/dist/types/index.js +17 -4
- package/dist/types/index.js.map +1 -1
- package/dist/{types-CUdqUyzi.d.ts → types-jWqiZC2S.d.ts} +2 -2
- package/package.json +1 -1
package/dist/mock/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { O as OrbitalSchema } from '../schema-
|
|
2
|
-
export { E as EntityAccessPolicies, e as entityAccessPolicies, a as entityAccessTable } from '../entityAccess-
|
|
3
|
-
import { a as EntityPersistence, E as EntityField, F as FieldValue, f as EntityRow } from '../effect-
|
|
4
|
-
import '../trait-
|
|
1
|
+
import { O as OrbitalSchema } from '../schema-h6xcymfn.js';
|
|
2
|
+
export { E as EntityAccessPolicies, e as entityAccessPolicies, a as entityAccessTable } from '../entityAccess-3QD5qbqw.js';
|
|
3
|
+
import { a as EntityPersistence, E as EntityField, F as FieldValue, f as EntityRow } from '../effect-CqTo1gAF.js';
|
|
4
|
+
import '../trait-CnbGhs6A.js';
|
|
5
5
|
import '../expression-Yf7qvvOs.js';
|
|
6
6
|
import 'zod';
|
|
7
7
|
|
|
@@ -39,6 +39,13 @@ declare function randomPastDate({ years }?: {
|
|
|
39
39
|
declare function randomRecentDate({ days }?: {
|
|
40
40
|
days?: number;
|
|
41
41
|
}): Date;
|
|
42
|
+
/** ISO-8601 date string straddling now: `[-days, +days]`. One PRNG draw,
|
|
43
|
+
* same call shape as `randomRecentDate`, so seeded field order is unchanged —
|
|
44
|
+
* only the window shifts from past-only to centered-on-now. Past-only starved
|
|
45
|
+
* any calendar/upcoming view, since every seeded `startsAt` was already over. */
|
|
46
|
+
declare function randomStraddlingDate({ days }?: {
|
|
47
|
+
days?: number;
|
|
48
|
+
}): Date;
|
|
42
49
|
/** Any date in the last ~100 years. */
|
|
43
50
|
declare function randomAnytimeDate(): Date;
|
|
44
51
|
/** A few random words. */
|
|
@@ -147,4 +154,4 @@ declare function sampleRow(entity: SampleEntity, ctx: Omit<SampleContext, 'entit
|
|
|
147
154
|
/** `count` rows, 1-based, honoring the runtime-singleton gate. */
|
|
148
155
|
declare function sampleRows(entity: SampleEntity, count: number, strategy: SampleStrategy): EntityRow[];
|
|
149
156
|
|
|
150
|
-
export { IMAGE_FIELD_NAMES, type SampleContext, type SampleEntity, type SampleStrategy, identityEntityName, isDeclaredDefaultHonored, ownerFieldsFromSchema, randomAnytimeDate, randomArrayElement, randomBoolean, randomColor, randomEmail, randomFloat, randomInt, randomPassword, randomPastDate, randomPhone, randomRecentDate, randomSentence, randomUrl, randomUuid, randomWords, sampleFieldValue, sampleImageUrl, sampleRow, sampleRowCount, sampleRows, seedRandom, shuffleArray };
|
|
157
|
+
export { IMAGE_FIELD_NAMES, type SampleContext, type SampleEntity, type SampleStrategy, identityEntityName, isDeclaredDefaultHonored, ownerFieldsFromSchema, randomAnytimeDate, randomArrayElement, randomBoolean, randomColor, randomEmail, randomFloat, randomInt, randomPassword, randomPastDate, randomPhone, randomRecentDate, randomSentence, randomStraddlingDate, randomUrl, randomUuid, randomWords, sampleFieldValue, sampleImageUrl, sampleRow, sampleRowCount, sampleRows, seedRandom, shuffleArray };
|
package/dist/mock/index.js
CHANGED
|
@@ -49,6 +49,12 @@ function randomRecentDate({ days = 30 } = {}) {
|
|
|
49
49
|
const age = Math.floor(nextFloat() * maxAge);
|
|
50
50
|
return new Date(now - age);
|
|
51
51
|
}
|
|
52
|
+
function randomStraddlingDate({ days = 15 } = {}) {
|
|
53
|
+
const now = Date.now();
|
|
54
|
+
const span = days * 24 * 60 * 60 * 1e3;
|
|
55
|
+
const offset = Math.floor(nextFloat() * span * 2) - span;
|
|
56
|
+
return new Date(now + offset);
|
|
57
|
+
}
|
|
52
58
|
function randomAnytimeDate() {
|
|
53
59
|
const now = Date.now();
|
|
54
60
|
const maxAge = 100 * 365 * 24 * 60 * 60 * 1e3;
|
|
@@ -470,8 +476,10 @@ var ASSET_ASPECTS = ["1:1", "16:9", "5:7", "8:1"];
|
|
|
470
476
|
var AssetAspectSchema = z.enum(ASSET_ASPECTS);
|
|
471
477
|
var ANIMATION_NAMES = ["idle", "walk", "attack", "hit", "death"];
|
|
472
478
|
var AnimationNameSchema = z.enum(ANIMATION_NAMES);
|
|
473
|
-
var SPRITE_DIRECTIONS = ["se", "sw"];
|
|
479
|
+
var SPRITE_DIRECTIONS = ["se", "sw", "ne", "nw"];
|
|
474
480
|
var SpriteDirectionSchema = z.enum(SPRITE_DIRECTIONS);
|
|
481
|
+
var SHEET_PROJECTIONS = ["iso", "front", "back", "top", "perspective"];
|
|
482
|
+
z.enum(SHEET_PROJECTIONS);
|
|
475
483
|
var AnimationDefSchema = z.object({
|
|
476
484
|
row: z.number().int().nonnegative(),
|
|
477
485
|
frames: z.number().int().positive(),
|
|
@@ -487,7 +495,14 @@ z.object({
|
|
|
487
495
|
rows: z.number().int().positive(),
|
|
488
496
|
directions: z.array(SpriteDirectionSchema),
|
|
489
497
|
sheets: z.record(SpriteDirectionSchema, z.string()),
|
|
490
|
-
animations: z.record(AnimationNameSchema, AnimationDefSchema)
|
|
498
|
+
animations: z.record(AnimationNameSchema, AnimationDefSchema),
|
|
499
|
+
projections: z.object({
|
|
500
|
+
iso: z.record(SpriteDirectionSchema, z.string()).optional(),
|
|
501
|
+
front: z.string().optional(),
|
|
502
|
+
back: z.string().optional(),
|
|
503
|
+
top: z.string().optional(),
|
|
504
|
+
perspective: z.string().optional()
|
|
505
|
+
}).optional()
|
|
491
506
|
});
|
|
492
507
|
var SubTextureSchema = z.object({
|
|
493
508
|
x: z.number().nonnegative(),
|
|
@@ -551,7 +566,8 @@ z.object({
|
|
|
551
566
|
target: ScenePosSchema.optional(),
|
|
552
567
|
zoom: z.number().optional(),
|
|
553
568
|
fov: z.number().optional(),
|
|
554
|
-
mode: CameraModeSchema.optional()
|
|
569
|
+
mode: CameraModeSchema.optional(),
|
|
570
|
+
azimuth: z.number().optional()
|
|
555
571
|
});
|
|
556
572
|
var SExprDataSchema = z.lazy(
|
|
557
573
|
() => z.union([SExprAtomSchema, z.array(SExprDataSchema)])
|
|
@@ -694,7 +710,7 @@ function sampleDate(ctx, dateOnly) {
|
|
|
694
710
|
const month = String(ctx.index % 12 + 1).padStart(2, "0");
|
|
695
711
|
return dateOnly ? `2026-${month}-15` : `2026-${month}-15T00:00:00.000Z`;
|
|
696
712
|
}
|
|
697
|
-
const iso =
|
|
713
|
+
const iso = randomStraddlingDate({ days: 15 }).toISOString();
|
|
698
714
|
return dateOnly ? iso.split("T")[0] : iso;
|
|
699
715
|
}
|
|
700
716
|
function sampleRelation(field) {
|
|
@@ -809,6 +825,6 @@ function sampleRows(entity, count, strategy) {
|
|
|
809
825
|
return rows;
|
|
810
826
|
}
|
|
811
827
|
|
|
812
|
-
export { IMAGE_FIELD_NAMES, entityAccessPolicies, entityAccessTable, identityEntityName, isDeclaredDefaultHonored, ownerFieldsFromSchema, randomAnytimeDate, randomArrayElement, randomBoolean, randomColor, randomEmail, randomFloat, randomInt, randomPassword, randomPastDate, randomPhone, randomRecentDate, randomSentence, randomUrl, randomUuid, randomWords, sampleFieldValue, sampleImageUrl, sampleRow, sampleRowCount, sampleRows, seedRandom, shuffleArray };
|
|
828
|
+
export { IMAGE_FIELD_NAMES, entityAccessPolicies, entityAccessTable, identityEntityName, isDeclaredDefaultHonored, ownerFieldsFromSchema, randomAnytimeDate, randomArrayElement, randomBoolean, randomColor, randomEmail, randomFloat, randomInt, randomPassword, randomPastDate, randomPhone, randomRecentDate, randomSentence, randomStraddlingDate, randomUrl, randomUuid, randomWords, sampleFieldValue, sampleImageUrl, sampleRow, sampleRowCount, sampleRows, seedRandom, shuffleArray };
|
|
813
829
|
//# sourceMappingURL=index.js.map
|
|
814
830
|
//# sourceMappingURL=index.js.map
|