@almadar/ui 5.28.3 → 5.28.4
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/avl/index.cjs +42 -5
- package/dist/avl/index.js +42 -5
- package/dist/components/game/organisms/UncontrolledBattleBoard.d.ts +10 -1
- package/dist/components/game/templates/BattleTemplate.d.ts +11 -1
- package/dist/components/index.cjs +42 -5
- package/dist/components/index.js +42 -5
- package/dist/providers/index.cjs +42 -5
- package/dist/providers/index.js +42 -5
- package/dist/runtime/index.cjs +42 -5
- package/dist/runtime/index.js +42 -5
- package/package.json +1 -1
package/dist/avl/index.cjs
CHANGED
|
@@ -15211,14 +15211,22 @@ function BattleTemplate({
|
|
|
15211
15211
|
entity,
|
|
15212
15212
|
scale = 0.45,
|
|
15213
15213
|
unitScale = 1,
|
|
15214
|
+
tiles,
|
|
15215
|
+
units,
|
|
15216
|
+
features,
|
|
15217
|
+
assetManifest,
|
|
15214
15218
|
className
|
|
15215
15219
|
}) {
|
|
15216
15220
|
const resolved = entity && typeof entity === "object" && !Array.isArray(entity) ? entity : void 0;
|
|
15217
|
-
if (!resolved) return null;
|
|
15221
|
+
if (!resolved && !tiles && !units && !features && !assetManifest) return null;
|
|
15218
15222
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
15219
15223
|
BattleBoard,
|
|
15220
15224
|
{
|
|
15221
15225
|
entity: resolved,
|
|
15226
|
+
tiles,
|
|
15227
|
+
units,
|
|
15228
|
+
features,
|
|
15229
|
+
assetManifest,
|
|
15222
15230
|
scale,
|
|
15223
15231
|
unitScale,
|
|
15224
15232
|
tileClickEvent: "TILE_CLICK",
|
|
@@ -47969,7 +47977,14 @@ var init_useBattleState = __esm({
|
|
|
47969
47977
|
init_boardEntity();
|
|
47970
47978
|
}
|
|
47971
47979
|
});
|
|
47972
|
-
function UncontrolledBattleBoard({
|
|
47980
|
+
function UncontrolledBattleBoard({
|
|
47981
|
+
entity,
|
|
47982
|
+
tiles,
|
|
47983
|
+
units,
|
|
47984
|
+
features,
|
|
47985
|
+
assetManifest,
|
|
47986
|
+
...rest
|
|
47987
|
+
}) {
|
|
47973
47988
|
const resolved = boardEntity(entity);
|
|
47974
47989
|
const battleState = useBattleState(
|
|
47975
47990
|
rows(resolved?.initialUnits),
|
|
@@ -47989,19 +48004,23 @@ function UncontrolledBattleBoard({ entity, ...rest }) {
|
|
|
47989
48004
|
calculateDamage: rest.calculateDamage
|
|
47990
48005
|
}
|
|
47991
48006
|
);
|
|
47992
|
-
if (!resolved) return null;
|
|
48007
|
+
if (!resolved && !tiles && !units && !features && !assetManifest) return null;
|
|
47993
48008
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
47994
48009
|
BattleBoard,
|
|
47995
48010
|
{
|
|
47996
48011
|
...rest,
|
|
47997
|
-
|
|
48012
|
+
tiles,
|
|
48013
|
+
units,
|
|
48014
|
+
features,
|
|
48015
|
+
assetManifest,
|
|
48016
|
+
entity: resolved ? {
|
|
47998
48017
|
...resolved,
|
|
47999
48018
|
units: battleState.units,
|
|
48000
48019
|
phase: battleState.phase,
|
|
48001
48020
|
turn: battleState.turn,
|
|
48002
48021
|
gameResult: battleState.gameResult,
|
|
48003
48022
|
selectedUnitId: battleState.selectedUnitId
|
|
48004
|
-
}
|
|
48023
|
+
} : void 0
|
|
48005
48024
|
}
|
|
48006
48025
|
);
|
|
48007
48026
|
}
|
|
@@ -49532,6 +49551,24 @@ function renderPatternProps(props, onDismiss) {
|
|
|
49532
49551
|
priority: 0
|
|
49533
49552
|
};
|
|
49534
49553
|
rendered[key] = /* @__PURE__ */ jsxRuntime.jsx(SlotContentRenderer, { content: childContent, onDismiss });
|
|
49554
|
+
} else if (Array.isArray(value)) {
|
|
49555
|
+
rendered[key] = value.map((item, i) => {
|
|
49556
|
+
const el = item;
|
|
49557
|
+
if (isPatternConfig(el)) {
|
|
49558
|
+
const nestedProps = {};
|
|
49559
|
+
for (const [k, v] of Object.entries(el)) {
|
|
49560
|
+
if (k !== "type") nestedProps[k] = v;
|
|
49561
|
+
}
|
|
49562
|
+
const childContent = {
|
|
49563
|
+
id: `prop-${key}-${i}`,
|
|
49564
|
+
pattern: el.type,
|
|
49565
|
+
props: nestedProps,
|
|
49566
|
+
priority: 0
|
|
49567
|
+
};
|
|
49568
|
+
return /* @__PURE__ */ jsxRuntime.jsx(SlotContentRenderer, { content: childContent, onDismiss }, i);
|
|
49569
|
+
}
|
|
49570
|
+
return substituteTraitRefsDeep(el, `prop:${key}[${i}]`);
|
|
49571
|
+
});
|
|
49535
49572
|
} else {
|
|
49536
49573
|
rendered[key] = substituteTraitRefsDeep(value, `prop:${key}`);
|
|
49537
49574
|
}
|
package/dist/avl/index.js
CHANGED
|
@@ -15162,14 +15162,22 @@ function BattleTemplate({
|
|
|
15162
15162
|
entity,
|
|
15163
15163
|
scale = 0.45,
|
|
15164
15164
|
unitScale = 1,
|
|
15165
|
+
tiles,
|
|
15166
|
+
units,
|
|
15167
|
+
features,
|
|
15168
|
+
assetManifest,
|
|
15165
15169
|
className
|
|
15166
15170
|
}) {
|
|
15167
15171
|
const resolved = entity && typeof entity === "object" && !Array.isArray(entity) ? entity : void 0;
|
|
15168
|
-
if (!resolved) return null;
|
|
15172
|
+
if (!resolved && !tiles && !units && !features && !assetManifest) return null;
|
|
15169
15173
|
return /* @__PURE__ */ jsx(
|
|
15170
15174
|
BattleBoard,
|
|
15171
15175
|
{
|
|
15172
15176
|
entity: resolved,
|
|
15177
|
+
tiles,
|
|
15178
|
+
units,
|
|
15179
|
+
features,
|
|
15180
|
+
assetManifest,
|
|
15173
15181
|
scale,
|
|
15174
15182
|
unitScale,
|
|
15175
15183
|
tileClickEvent: "TILE_CLICK",
|
|
@@ -47920,7 +47928,14 @@ var init_useBattleState = __esm({
|
|
|
47920
47928
|
init_boardEntity();
|
|
47921
47929
|
}
|
|
47922
47930
|
});
|
|
47923
|
-
function UncontrolledBattleBoard({
|
|
47931
|
+
function UncontrolledBattleBoard({
|
|
47932
|
+
entity,
|
|
47933
|
+
tiles,
|
|
47934
|
+
units,
|
|
47935
|
+
features,
|
|
47936
|
+
assetManifest,
|
|
47937
|
+
...rest
|
|
47938
|
+
}) {
|
|
47924
47939
|
const resolved = boardEntity(entity);
|
|
47925
47940
|
const battleState = useBattleState(
|
|
47926
47941
|
rows(resolved?.initialUnits),
|
|
@@ -47940,19 +47955,23 @@ function UncontrolledBattleBoard({ entity, ...rest }) {
|
|
|
47940
47955
|
calculateDamage: rest.calculateDamage
|
|
47941
47956
|
}
|
|
47942
47957
|
);
|
|
47943
|
-
if (!resolved) return null;
|
|
47958
|
+
if (!resolved && !tiles && !units && !features && !assetManifest) return null;
|
|
47944
47959
|
return /* @__PURE__ */ jsx(
|
|
47945
47960
|
BattleBoard,
|
|
47946
47961
|
{
|
|
47947
47962
|
...rest,
|
|
47948
|
-
|
|
47963
|
+
tiles,
|
|
47964
|
+
units,
|
|
47965
|
+
features,
|
|
47966
|
+
assetManifest,
|
|
47967
|
+
entity: resolved ? {
|
|
47949
47968
|
...resolved,
|
|
47950
47969
|
units: battleState.units,
|
|
47951
47970
|
phase: battleState.phase,
|
|
47952
47971
|
turn: battleState.turn,
|
|
47953
47972
|
gameResult: battleState.gameResult,
|
|
47954
47973
|
selectedUnitId: battleState.selectedUnitId
|
|
47955
|
-
}
|
|
47974
|
+
} : void 0
|
|
47956
47975
|
}
|
|
47957
47976
|
);
|
|
47958
47977
|
}
|
|
@@ -49483,6 +49502,24 @@ function renderPatternProps(props, onDismiss) {
|
|
|
49483
49502
|
priority: 0
|
|
49484
49503
|
};
|
|
49485
49504
|
rendered[key] = /* @__PURE__ */ jsx(SlotContentRenderer, { content: childContent, onDismiss });
|
|
49505
|
+
} else if (Array.isArray(value)) {
|
|
49506
|
+
rendered[key] = value.map((item, i) => {
|
|
49507
|
+
const el = item;
|
|
49508
|
+
if (isPatternConfig(el)) {
|
|
49509
|
+
const nestedProps = {};
|
|
49510
|
+
for (const [k, v] of Object.entries(el)) {
|
|
49511
|
+
if (k !== "type") nestedProps[k] = v;
|
|
49512
|
+
}
|
|
49513
|
+
const childContent = {
|
|
49514
|
+
id: `prop-${key}-${i}`,
|
|
49515
|
+
pattern: el.type,
|
|
49516
|
+
props: nestedProps,
|
|
49517
|
+
priority: 0
|
|
49518
|
+
};
|
|
49519
|
+
return /* @__PURE__ */ jsx(SlotContentRenderer, { content: childContent, onDismiss }, i);
|
|
49520
|
+
}
|
|
49521
|
+
return substituteTraitRefsDeep(el, `prop:${key}[${i}]`);
|
|
49522
|
+
});
|
|
49486
49523
|
} else {
|
|
49487
49524
|
rendered[key] = substituteTraitRefsDeep(value, `prop:${key}`);
|
|
49488
49525
|
}
|
|
@@ -16,10 +16,19 @@
|
|
|
16
16
|
import * as React from 'react';
|
|
17
17
|
import type { EntityRow } from '@almadar/core';
|
|
18
18
|
import { type BattleBoardProps } from './BattleBoard';
|
|
19
|
+
import type { IsometricTile, IsometricUnit, IsometricFeature } from './types/isometric';
|
|
19
20
|
export interface UncontrolledBattleBoardProps extends Omit<BattleBoardProps, 'entity'> {
|
|
20
21
|
entity?: EntityRow | readonly EntityRow[];
|
|
22
|
+
/** Direct tile data — takes priority over entity-derived tiles. */
|
|
23
|
+
tiles?: IsometricTile[];
|
|
24
|
+
/** Direct unit data — takes priority over entity-derived units. */
|
|
25
|
+
units?: IsometricUnit[];
|
|
26
|
+
/** Direct feature data — takes priority over entity-derived features. */
|
|
27
|
+
features?: IsometricFeature[];
|
|
28
|
+
/** Direct asset manifest — takes priority over entity-derived manifest. */
|
|
29
|
+
assetManifest?: BattleBoardProps['assetManifest'];
|
|
21
30
|
}
|
|
22
|
-
export declare function UncontrolledBattleBoard({ entity, ...rest }: UncontrolledBattleBoardProps): React.JSX.Element | null;
|
|
31
|
+
export declare function UncontrolledBattleBoard({ entity, tiles, units, features, assetManifest, ...rest }: UncontrolledBattleBoardProps): React.JSX.Element | null;
|
|
23
32
|
export declare namespace UncontrolledBattleBoard {
|
|
24
33
|
var displayName: string;
|
|
25
34
|
}
|
|
@@ -10,14 +10,24 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import React from 'react';
|
|
12
12
|
import type { TemplateProps } from '../../core/templates/types';
|
|
13
|
+
import type { BattleBoardProps } from '../organisms/BattleBoard';
|
|
14
|
+
import type { IsometricTile, IsometricUnit, IsometricFeature } from '../organisms/types/isometric';
|
|
13
15
|
export type { BattlePhase, BattleSlotContext, } from '../organisms/BattleBoard';
|
|
14
16
|
export interface BattleTemplateProps extends TemplateProps {
|
|
15
17
|
/** Canvas render scale */
|
|
16
18
|
scale?: number;
|
|
17
19
|
/** Unit draw-size multiplier */
|
|
18
20
|
unitScale?: number;
|
|
21
|
+
/** Direct tile data — forwarded to BattleBoard; takes priority over entity. */
|
|
22
|
+
tiles?: IsometricTile[];
|
|
23
|
+
/** Direct unit data — forwarded to BattleBoard; takes priority over entity. */
|
|
24
|
+
units?: IsometricUnit[];
|
|
25
|
+
/** Direct feature data — forwarded to BattleBoard; takes priority over entity. */
|
|
26
|
+
features?: IsometricFeature[];
|
|
27
|
+
/** Direct asset manifest — forwarded to BattleBoard; takes priority over entity. */
|
|
28
|
+
assetManifest?: BattleBoardProps['assetManifest'];
|
|
19
29
|
}
|
|
20
|
-
export declare function BattleTemplate({ entity, scale, unitScale, className, }: BattleTemplateProps): React.JSX.Element | null;
|
|
30
|
+
export declare function BattleTemplate({ entity, scale, unitScale, tiles, units, features, assetManifest, className, }: BattleTemplateProps): React.JSX.Element | null;
|
|
21
31
|
export declare namespace BattleTemplate {
|
|
22
32
|
var displayName: string;
|
|
23
33
|
}
|
|
@@ -10448,14 +10448,22 @@ function BattleTemplate({
|
|
|
10448
10448
|
entity,
|
|
10449
10449
|
scale = 0.45,
|
|
10450
10450
|
unitScale = 1,
|
|
10451
|
+
tiles,
|
|
10452
|
+
units,
|
|
10453
|
+
features,
|
|
10454
|
+
assetManifest,
|
|
10451
10455
|
className
|
|
10452
10456
|
}) {
|
|
10453
10457
|
const resolved = entity && typeof entity === "object" && !Array.isArray(entity) ? entity : void 0;
|
|
10454
|
-
if (!resolved) return null;
|
|
10458
|
+
if (!resolved && !tiles && !units && !features && !assetManifest) return null;
|
|
10455
10459
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10456
10460
|
BattleBoard,
|
|
10457
10461
|
{
|
|
10458
10462
|
entity: resolved,
|
|
10463
|
+
tiles,
|
|
10464
|
+
units,
|
|
10465
|
+
features,
|
|
10466
|
+
assetManifest,
|
|
10459
10467
|
scale,
|
|
10460
10468
|
unitScale,
|
|
10461
10469
|
tileClickEvent: "TILE_CLICK",
|
|
@@ -46636,7 +46644,14 @@ var init_useBattleState = __esm({
|
|
|
46636
46644
|
init_boardEntity();
|
|
46637
46645
|
}
|
|
46638
46646
|
});
|
|
46639
|
-
function UncontrolledBattleBoard({
|
|
46647
|
+
function UncontrolledBattleBoard({
|
|
46648
|
+
entity,
|
|
46649
|
+
tiles,
|
|
46650
|
+
units,
|
|
46651
|
+
features,
|
|
46652
|
+
assetManifest,
|
|
46653
|
+
...rest
|
|
46654
|
+
}) {
|
|
46640
46655
|
const resolved = boardEntity(entity);
|
|
46641
46656
|
const battleState = useBattleState(
|
|
46642
46657
|
rows(resolved?.initialUnits),
|
|
@@ -46656,19 +46671,23 @@ function UncontrolledBattleBoard({ entity, ...rest }) {
|
|
|
46656
46671
|
calculateDamage: rest.calculateDamage
|
|
46657
46672
|
}
|
|
46658
46673
|
);
|
|
46659
|
-
if (!resolved) return null;
|
|
46674
|
+
if (!resolved && !tiles && !units && !features && !assetManifest) return null;
|
|
46660
46675
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
46661
46676
|
BattleBoard,
|
|
46662
46677
|
{
|
|
46663
46678
|
...rest,
|
|
46664
|
-
|
|
46679
|
+
tiles,
|
|
46680
|
+
units,
|
|
46681
|
+
features,
|
|
46682
|
+
assetManifest,
|
|
46683
|
+
entity: resolved ? {
|
|
46665
46684
|
...resolved,
|
|
46666
46685
|
units: battleState.units,
|
|
46667
46686
|
phase: battleState.phase,
|
|
46668
46687
|
turn: battleState.turn,
|
|
46669
46688
|
gameResult: battleState.gameResult,
|
|
46670
46689
|
selectedUnitId: battleState.selectedUnitId
|
|
46671
|
-
}
|
|
46690
|
+
} : void 0
|
|
46672
46691
|
}
|
|
46673
46692
|
);
|
|
46674
46693
|
}
|
|
@@ -48283,6 +48302,24 @@ function renderPatternProps(props, onDismiss) {
|
|
|
48283
48302
|
priority: 0
|
|
48284
48303
|
};
|
|
48285
48304
|
rendered[key] = /* @__PURE__ */ jsxRuntime.jsx(SlotContentRenderer, { content: childContent, onDismiss });
|
|
48305
|
+
} else if (Array.isArray(value)) {
|
|
48306
|
+
rendered[key] = value.map((item, i) => {
|
|
48307
|
+
const el = item;
|
|
48308
|
+
if (isPatternConfig(el)) {
|
|
48309
|
+
const nestedProps = {};
|
|
48310
|
+
for (const [k, v] of Object.entries(el)) {
|
|
48311
|
+
if (k !== "type") nestedProps[k] = v;
|
|
48312
|
+
}
|
|
48313
|
+
const childContent = {
|
|
48314
|
+
id: `prop-${key}-${i}`,
|
|
48315
|
+
pattern: el.type,
|
|
48316
|
+
props: nestedProps,
|
|
48317
|
+
priority: 0
|
|
48318
|
+
};
|
|
48319
|
+
return /* @__PURE__ */ jsxRuntime.jsx(SlotContentRenderer, { content: childContent, onDismiss }, i);
|
|
48320
|
+
}
|
|
48321
|
+
return substituteTraitRefsDeep(el, `prop:${key}[${i}]`);
|
|
48322
|
+
});
|
|
48286
48323
|
} else {
|
|
48287
48324
|
rendered[key] = substituteTraitRefsDeep(value, `prop:${key}`);
|
|
48288
48325
|
}
|
package/dist/components/index.js
CHANGED
|
@@ -10400,14 +10400,22 @@ function BattleTemplate({
|
|
|
10400
10400
|
entity,
|
|
10401
10401
|
scale = 0.45,
|
|
10402
10402
|
unitScale = 1,
|
|
10403
|
+
tiles,
|
|
10404
|
+
units,
|
|
10405
|
+
features,
|
|
10406
|
+
assetManifest,
|
|
10403
10407
|
className
|
|
10404
10408
|
}) {
|
|
10405
10409
|
const resolved = entity && typeof entity === "object" && !Array.isArray(entity) ? entity : void 0;
|
|
10406
|
-
if (!resolved) return null;
|
|
10410
|
+
if (!resolved && !tiles && !units && !features && !assetManifest) return null;
|
|
10407
10411
|
return /* @__PURE__ */ jsx(
|
|
10408
10412
|
BattleBoard,
|
|
10409
10413
|
{
|
|
10410
10414
|
entity: resolved,
|
|
10415
|
+
tiles,
|
|
10416
|
+
units,
|
|
10417
|
+
features,
|
|
10418
|
+
assetManifest,
|
|
10411
10419
|
scale,
|
|
10412
10420
|
unitScale,
|
|
10413
10421
|
tileClickEvent: "TILE_CLICK",
|
|
@@ -46588,7 +46596,14 @@ var init_useBattleState = __esm({
|
|
|
46588
46596
|
init_boardEntity();
|
|
46589
46597
|
}
|
|
46590
46598
|
});
|
|
46591
|
-
function UncontrolledBattleBoard({
|
|
46599
|
+
function UncontrolledBattleBoard({
|
|
46600
|
+
entity,
|
|
46601
|
+
tiles,
|
|
46602
|
+
units,
|
|
46603
|
+
features,
|
|
46604
|
+
assetManifest,
|
|
46605
|
+
...rest
|
|
46606
|
+
}) {
|
|
46592
46607
|
const resolved = boardEntity(entity);
|
|
46593
46608
|
const battleState = useBattleState(
|
|
46594
46609
|
rows(resolved?.initialUnits),
|
|
@@ -46608,19 +46623,23 @@ function UncontrolledBattleBoard({ entity, ...rest }) {
|
|
|
46608
46623
|
calculateDamage: rest.calculateDamage
|
|
46609
46624
|
}
|
|
46610
46625
|
);
|
|
46611
|
-
if (!resolved) return null;
|
|
46626
|
+
if (!resolved && !tiles && !units && !features && !assetManifest) return null;
|
|
46612
46627
|
return /* @__PURE__ */ jsx(
|
|
46613
46628
|
BattleBoard,
|
|
46614
46629
|
{
|
|
46615
46630
|
...rest,
|
|
46616
|
-
|
|
46631
|
+
tiles,
|
|
46632
|
+
units,
|
|
46633
|
+
features,
|
|
46634
|
+
assetManifest,
|
|
46635
|
+
entity: resolved ? {
|
|
46617
46636
|
...resolved,
|
|
46618
46637
|
units: battleState.units,
|
|
46619
46638
|
phase: battleState.phase,
|
|
46620
46639
|
turn: battleState.turn,
|
|
46621
46640
|
gameResult: battleState.gameResult,
|
|
46622
46641
|
selectedUnitId: battleState.selectedUnitId
|
|
46623
|
-
}
|
|
46642
|
+
} : void 0
|
|
46624
46643
|
}
|
|
46625
46644
|
);
|
|
46626
46645
|
}
|
|
@@ -48235,6 +48254,24 @@ function renderPatternProps(props, onDismiss) {
|
|
|
48235
48254
|
priority: 0
|
|
48236
48255
|
};
|
|
48237
48256
|
rendered[key] = /* @__PURE__ */ jsx(SlotContentRenderer, { content: childContent, onDismiss });
|
|
48257
|
+
} else if (Array.isArray(value)) {
|
|
48258
|
+
rendered[key] = value.map((item, i) => {
|
|
48259
|
+
const el = item;
|
|
48260
|
+
if (isPatternConfig(el)) {
|
|
48261
|
+
const nestedProps = {};
|
|
48262
|
+
for (const [k, v] of Object.entries(el)) {
|
|
48263
|
+
if (k !== "type") nestedProps[k] = v;
|
|
48264
|
+
}
|
|
48265
|
+
const childContent = {
|
|
48266
|
+
id: `prop-${key}-${i}`,
|
|
48267
|
+
pattern: el.type,
|
|
48268
|
+
props: nestedProps,
|
|
48269
|
+
priority: 0
|
|
48270
|
+
};
|
|
48271
|
+
return /* @__PURE__ */ jsx(SlotContentRenderer, { content: childContent, onDismiss }, i);
|
|
48272
|
+
}
|
|
48273
|
+
return substituteTraitRefsDeep(el, `prop:${key}[${i}]`);
|
|
48274
|
+
});
|
|
48238
48275
|
} else {
|
|
48239
48276
|
rendered[key] = substituteTraitRefsDeep(value, `prop:${key}`);
|
|
48240
48277
|
}
|
package/dist/providers/index.cjs
CHANGED
|
@@ -11905,14 +11905,22 @@ function BattleTemplate({
|
|
|
11905
11905
|
entity,
|
|
11906
11906
|
scale = 0.45,
|
|
11907
11907
|
unitScale = 1,
|
|
11908
|
+
tiles,
|
|
11909
|
+
units,
|
|
11910
|
+
features,
|
|
11911
|
+
assetManifest,
|
|
11908
11912
|
className
|
|
11909
11913
|
}) {
|
|
11910
11914
|
const resolved = entity && typeof entity === "object" && !Array.isArray(entity) ? entity : void 0;
|
|
11911
|
-
if (!resolved) return null;
|
|
11915
|
+
if (!resolved && !tiles && !units && !features && !assetManifest) return null;
|
|
11912
11916
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11913
11917
|
BattleBoard,
|
|
11914
11918
|
{
|
|
11915
11919
|
entity: resolved,
|
|
11920
|
+
tiles,
|
|
11921
|
+
units,
|
|
11922
|
+
features,
|
|
11923
|
+
assetManifest,
|
|
11916
11924
|
scale,
|
|
11917
11925
|
unitScale,
|
|
11918
11926
|
tileClickEvent: "TILE_CLICK",
|
|
@@ -45882,7 +45890,14 @@ var init_useBattleState = __esm({
|
|
|
45882
45890
|
init_boardEntity();
|
|
45883
45891
|
}
|
|
45884
45892
|
});
|
|
45885
|
-
function UncontrolledBattleBoard({
|
|
45893
|
+
function UncontrolledBattleBoard({
|
|
45894
|
+
entity,
|
|
45895
|
+
tiles,
|
|
45896
|
+
units,
|
|
45897
|
+
features,
|
|
45898
|
+
assetManifest,
|
|
45899
|
+
...rest
|
|
45900
|
+
}) {
|
|
45886
45901
|
const resolved = boardEntity(entity);
|
|
45887
45902
|
const battleState = useBattleState(
|
|
45888
45903
|
rows(resolved?.initialUnits),
|
|
@@ -45902,19 +45917,23 @@ function UncontrolledBattleBoard({ entity, ...rest }) {
|
|
|
45902
45917
|
calculateDamage: rest.calculateDamage
|
|
45903
45918
|
}
|
|
45904
45919
|
);
|
|
45905
|
-
if (!resolved) return null;
|
|
45920
|
+
if (!resolved && !tiles && !units && !features && !assetManifest) return null;
|
|
45906
45921
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
45907
45922
|
BattleBoard,
|
|
45908
45923
|
{
|
|
45909
45924
|
...rest,
|
|
45910
|
-
|
|
45925
|
+
tiles,
|
|
45926
|
+
units,
|
|
45927
|
+
features,
|
|
45928
|
+
assetManifest,
|
|
45929
|
+
entity: resolved ? {
|
|
45911
45930
|
...resolved,
|
|
45912
45931
|
units: battleState.units,
|
|
45913
45932
|
phase: battleState.phase,
|
|
45914
45933
|
turn: battleState.turn,
|
|
45915
45934
|
gameResult: battleState.gameResult,
|
|
45916
45935
|
selectedUnitId: battleState.selectedUnitId
|
|
45917
|
-
}
|
|
45936
|
+
} : void 0
|
|
45918
45937
|
}
|
|
45919
45938
|
);
|
|
45920
45939
|
}
|
|
@@ -47445,6 +47464,24 @@ function renderPatternProps(props, onDismiss) {
|
|
|
47445
47464
|
priority: 0
|
|
47446
47465
|
};
|
|
47447
47466
|
rendered[key] = /* @__PURE__ */ jsxRuntime.jsx(SlotContentRenderer, { content: childContent, onDismiss });
|
|
47467
|
+
} else if (Array.isArray(value)) {
|
|
47468
|
+
rendered[key] = value.map((item, i) => {
|
|
47469
|
+
const el = item;
|
|
47470
|
+
if (isPatternConfig(el)) {
|
|
47471
|
+
const nestedProps = {};
|
|
47472
|
+
for (const [k, v] of Object.entries(el)) {
|
|
47473
|
+
if (k !== "type") nestedProps[k] = v;
|
|
47474
|
+
}
|
|
47475
|
+
const childContent = {
|
|
47476
|
+
id: `prop-${key}-${i}`,
|
|
47477
|
+
pattern: el.type,
|
|
47478
|
+
props: nestedProps,
|
|
47479
|
+
priority: 0
|
|
47480
|
+
};
|
|
47481
|
+
return /* @__PURE__ */ jsxRuntime.jsx(SlotContentRenderer, { content: childContent, onDismiss }, i);
|
|
47482
|
+
}
|
|
47483
|
+
return substituteTraitRefsDeep(el, `prop:${key}[${i}]`);
|
|
47484
|
+
});
|
|
47448
47485
|
} else {
|
|
47449
47486
|
rendered[key] = substituteTraitRefsDeep(value, `prop:${key}`);
|
|
47450
47487
|
}
|
package/dist/providers/index.js
CHANGED
|
@@ -11856,14 +11856,22 @@ function BattleTemplate({
|
|
|
11856
11856
|
entity,
|
|
11857
11857
|
scale = 0.45,
|
|
11858
11858
|
unitScale = 1,
|
|
11859
|
+
tiles,
|
|
11860
|
+
units,
|
|
11861
|
+
features,
|
|
11862
|
+
assetManifest,
|
|
11859
11863
|
className
|
|
11860
11864
|
}) {
|
|
11861
11865
|
const resolved = entity && typeof entity === "object" && !Array.isArray(entity) ? entity : void 0;
|
|
11862
|
-
if (!resolved) return null;
|
|
11866
|
+
if (!resolved && !tiles && !units && !features && !assetManifest) return null;
|
|
11863
11867
|
return /* @__PURE__ */ jsx(
|
|
11864
11868
|
BattleBoard,
|
|
11865
11869
|
{
|
|
11866
11870
|
entity: resolved,
|
|
11871
|
+
tiles,
|
|
11872
|
+
units,
|
|
11873
|
+
features,
|
|
11874
|
+
assetManifest,
|
|
11867
11875
|
scale,
|
|
11868
11876
|
unitScale,
|
|
11869
11877
|
tileClickEvent: "TILE_CLICK",
|
|
@@ -45833,7 +45841,14 @@ var init_useBattleState = __esm({
|
|
|
45833
45841
|
init_boardEntity();
|
|
45834
45842
|
}
|
|
45835
45843
|
});
|
|
45836
|
-
function UncontrolledBattleBoard({
|
|
45844
|
+
function UncontrolledBattleBoard({
|
|
45845
|
+
entity,
|
|
45846
|
+
tiles,
|
|
45847
|
+
units,
|
|
45848
|
+
features,
|
|
45849
|
+
assetManifest,
|
|
45850
|
+
...rest
|
|
45851
|
+
}) {
|
|
45837
45852
|
const resolved = boardEntity(entity);
|
|
45838
45853
|
const battleState = useBattleState(
|
|
45839
45854
|
rows(resolved?.initialUnits),
|
|
@@ -45853,19 +45868,23 @@ function UncontrolledBattleBoard({ entity, ...rest }) {
|
|
|
45853
45868
|
calculateDamage: rest.calculateDamage
|
|
45854
45869
|
}
|
|
45855
45870
|
);
|
|
45856
|
-
if (!resolved) return null;
|
|
45871
|
+
if (!resolved && !tiles && !units && !features && !assetManifest) return null;
|
|
45857
45872
|
return /* @__PURE__ */ jsx(
|
|
45858
45873
|
BattleBoard,
|
|
45859
45874
|
{
|
|
45860
45875
|
...rest,
|
|
45861
|
-
|
|
45876
|
+
tiles,
|
|
45877
|
+
units,
|
|
45878
|
+
features,
|
|
45879
|
+
assetManifest,
|
|
45880
|
+
entity: resolved ? {
|
|
45862
45881
|
...resolved,
|
|
45863
45882
|
units: battleState.units,
|
|
45864
45883
|
phase: battleState.phase,
|
|
45865
45884
|
turn: battleState.turn,
|
|
45866
45885
|
gameResult: battleState.gameResult,
|
|
45867
45886
|
selectedUnitId: battleState.selectedUnitId
|
|
45868
|
-
}
|
|
45887
|
+
} : void 0
|
|
45869
45888
|
}
|
|
45870
45889
|
);
|
|
45871
45890
|
}
|
|
@@ -47396,6 +47415,24 @@ function renderPatternProps(props, onDismiss) {
|
|
|
47396
47415
|
priority: 0
|
|
47397
47416
|
};
|
|
47398
47417
|
rendered[key] = /* @__PURE__ */ jsx(SlotContentRenderer, { content: childContent, onDismiss });
|
|
47418
|
+
} else if (Array.isArray(value)) {
|
|
47419
|
+
rendered[key] = value.map((item, i) => {
|
|
47420
|
+
const el = item;
|
|
47421
|
+
if (isPatternConfig(el)) {
|
|
47422
|
+
const nestedProps = {};
|
|
47423
|
+
for (const [k, v] of Object.entries(el)) {
|
|
47424
|
+
if (k !== "type") nestedProps[k] = v;
|
|
47425
|
+
}
|
|
47426
|
+
const childContent = {
|
|
47427
|
+
id: `prop-${key}-${i}`,
|
|
47428
|
+
pattern: el.type,
|
|
47429
|
+
props: nestedProps,
|
|
47430
|
+
priority: 0
|
|
47431
|
+
};
|
|
47432
|
+
return /* @__PURE__ */ jsx(SlotContentRenderer, { content: childContent, onDismiss }, i);
|
|
47433
|
+
}
|
|
47434
|
+
return substituteTraitRefsDeep(el, `prop:${key}[${i}]`);
|
|
47435
|
+
});
|
|
47399
47436
|
} else {
|
|
47400
47437
|
rendered[key] = substituteTraitRefsDeep(value, `prop:${key}`);
|
|
47401
47438
|
}
|
package/dist/runtime/index.cjs
CHANGED
|
@@ -11472,14 +11472,22 @@ function BattleTemplate({
|
|
|
11472
11472
|
entity,
|
|
11473
11473
|
scale = 0.45,
|
|
11474
11474
|
unitScale = 1,
|
|
11475
|
+
tiles,
|
|
11476
|
+
units,
|
|
11477
|
+
features,
|
|
11478
|
+
assetManifest,
|
|
11475
11479
|
className
|
|
11476
11480
|
}) {
|
|
11477
11481
|
const resolved = entity && typeof entity === "object" && !Array.isArray(entity) ? entity : void 0;
|
|
11478
|
-
if (!resolved) return null;
|
|
11482
|
+
if (!resolved && !tiles && !units && !features && !assetManifest) return null;
|
|
11479
11483
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11480
11484
|
BattleBoard,
|
|
11481
11485
|
{
|
|
11482
11486
|
entity: resolved,
|
|
11487
|
+
tiles,
|
|
11488
|
+
units,
|
|
11489
|
+
features,
|
|
11490
|
+
assetManifest,
|
|
11483
11491
|
scale,
|
|
11484
11492
|
unitScale,
|
|
11485
11493
|
tileClickEvent: "TILE_CLICK",
|
|
@@ -45468,7 +45476,14 @@ var init_useBattleState = __esm({
|
|
|
45468
45476
|
init_boardEntity();
|
|
45469
45477
|
}
|
|
45470
45478
|
});
|
|
45471
|
-
function UncontrolledBattleBoard({
|
|
45479
|
+
function UncontrolledBattleBoard({
|
|
45480
|
+
entity,
|
|
45481
|
+
tiles,
|
|
45482
|
+
units,
|
|
45483
|
+
features,
|
|
45484
|
+
assetManifest,
|
|
45485
|
+
...rest
|
|
45486
|
+
}) {
|
|
45472
45487
|
const resolved = boardEntity(entity);
|
|
45473
45488
|
const battleState = useBattleState(
|
|
45474
45489
|
rows(resolved?.initialUnits),
|
|
@@ -45488,19 +45503,23 @@ function UncontrolledBattleBoard({ entity, ...rest }) {
|
|
|
45488
45503
|
calculateDamage: rest.calculateDamage
|
|
45489
45504
|
}
|
|
45490
45505
|
);
|
|
45491
|
-
if (!resolved) return null;
|
|
45506
|
+
if (!resolved && !tiles && !units && !features && !assetManifest) return null;
|
|
45492
45507
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
45493
45508
|
BattleBoard,
|
|
45494
45509
|
{
|
|
45495
45510
|
...rest,
|
|
45496
|
-
|
|
45511
|
+
tiles,
|
|
45512
|
+
units,
|
|
45513
|
+
features,
|
|
45514
|
+
assetManifest,
|
|
45515
|
+
entity: resolved ? {
|
|
45497
45516
|
...resolved,
|
|
45498
45517
|
units: battleState.units,
|
|
45499
45518
|
phase: battleState.phase,
|
|
45500
45519
|
turn: battleState.turn,
|
|
45501
45520
|
gameResult: battleState.gameResult,
|
|
45502
45521
|
selectedUnitId: battleState.selectedUnitId
|
|
45503
|
-
}
|
|
45522
|
+
} : void 0
|
|
45504
45523
|
}
|
|
45505
45524
|
);
|
|
45506
45525
|
}
|
|
@@ -47031,6 +47050,24 @@ function renderPatternProps(props, onDismiss) {
|
|
|
47031
47050
|
priority: 0
|
|
47032
47051
|
};
|
|
47033
47052
|
rendered[key] = /* @__PURE__ */ jsxRuntime.jsx(SlotContentRenderer, { content: childContent, onDismiss });
|
|
47053
|
+
} else if (Array.isArray(value)) {
|
|
47054
|
+
rendered[key] = value.map((item, i) => {
|
|
47055
|
+
const el = item;
|
|
47056
|
+
if (isPatternConfig(el)) {
|
|
47057
|
+
const nestedProps = {};
|
|
47058
|
+
for (const [k, v] of Object.entries(el)) {
|
|
47059
|
+
if (k !== "type") nestedProps[k] = v;
|
|
47060
|
+
}
|
|
47061
|
+
const childContent = {
|
|
47062
|
+
id: `prop-${key}-${i}`,
|
|
47063
|
+
pattern: el.type,
|
|
47064
|
+
props: nestedProps,
|
|
47065
|
+
priority: 0
|
|
47066
|
+
};
|
|
47067
|
+
return /* @__PURE__ */ jsxRuntime.jsx(SlotContentRenderer, { content: childContent, onDismiss }, i);
|
|
47068
|
+
}
|
|
47069
|
+
return substituteTraitRefsDeep(el, `prop:${key}[${i}]`);
|
|
47070
|
+
});
|
|
47034
47071
|
} else {
|
|
47035
47072
|
rendered[key] = substituteTraitRefsDeep(value, `prop:${key}`);
|
|
47036
47073
|
}
|
package/dist/runtime/index.js
CHANGED
|
@@ -11423,14 +11423,22 @@ function BattleTemplate({
|
|
|
11423
11423
|
entity,
|
|
11424
11424
|
scale = 0.45,
|
|
11425
11425
|
unitScale = 1,
|
|
11426
|
+
tiles,
|
|
11427
|
+
units,
|
|
11428
|
+
features,
|
|
11429
|
+
assetManifest,
|
|
11426
11430
|
className
|
|
11427
11431
|
}) {
|
|
11428
11432
|
const resolved = entity && typeof entity === "object" && !Array.isArray(entity) ? entity : void 0;
|
|
11429
|
-
if (!resolved) return null;
|
|
11433
|
+
if (!resolved && !tiles && !units && !features && !assetManifest) return null;
|
|
11430
11434
|
return /* @__PURE__ */ jsx(
|
|
11431
11435
|
BattleBoard,
|
|
11432
11436
|
{
|
|
11433
11437
|
entity: resolved,
|
|
11438
|
+
tiles,
|
|
11439
|
+
units,
|
|
11440
|
+
features,
|
|
11441
|
+
assetManifest,
|
|
11434
11442
|
scale,
|
|
11435
11443
|
unitScale,
|
|
11436
11444
|
tileClickEvent: "TILE_CLICK",
|
|
@@ -45419,7 +45427,14 @@ var init_useBattleState = __esm({
|
|
|
45419
45427
|
init_boardEntity();
|
|
45420
45428
|
}
|
|
45421
45429
|
});
|
|
45422
|
-
function UncontrolledBattleBoard({
|
|
45430
|
+
function UncontrolledBattleBoard({
|
|
45431
|
+
entity,
|
|
45432
|
+
tiles,
|
|
45433
|
+
units,
|
|
45434
|
+
features,
|
|
45435
|
+
assetManifest,
|
|
45436
|
+
...rest
|
|
45437
|
+
}) {
|
|
45423
45438
|
const resolved = boardEntity(entity);
|
|
45424
45439
|
const battleState = useBattleState(
|
|
45425
45440
|
rows(resolved?.initialUnits),
|
|
@@ -45439,19 +45454,23 @@ function UncontrolledBattleBoard({ entity, ...rest }) {
|
|
|
45439
45454
|
calculateDamage: rest.calculateDamage
|
|
45440
45455
|
}
|
|
45441
45456
|
);
|
|
45442
|
-
if (!resolved) return null;
|
|
45457
|
+
if (!resolved && !tiles && !units && !features && !assetManifest) return null;
|
|
45443
45458
|
return /* @__PURE__ */ jsx(
|
|
45444
45459
|
BattleBoard,
|
|
45445
45460
|
{
|
|
45446
45461
|
...rest,
|
|
45447
|
-
|
|
45462
|
+
tiles,
|
|
45463
|
+
units,
|
|
45464
|
+
features,
|
|
45465
|
+
assetManifest,
|
|
45466
|
+
entity: resolved ? {
|
|
45448
45467
|
...resolved,
|
|
45449
45468
|
units: battleState.units,
|
|
45450
45469
|
phase: battleState.phase,
|
|
45451
45470
|
turn: battleState.turn,
|
|
45452
45471
|
gameResult: battleState.gameResult,
|
|
45453
45472
|
selectedUnitId: battleState.selectedUnitId
|
|
45454
|
-
}
|
|
45473
|
+
} : void 0
|
|
45455
45474
|
}
|
|
45456
45475
|
);
|
|
45457
45476
|
}
|
|
@@ -46982,6 +47001,24 @@ function renderPatternProps(props, onDismiss) {
|
|
|
46982
47001
|
priority: 0
|
|
46983
47002
|
};
|
|
46984
47003
|
rendered[key] = /* @__PURE__ */ jsx(SlotContentRenderer, { content: childContent, onDismiss });
|
|
47004
|
+
} else if (Array.isArray(value)) {
|
|
47005
|
+
rendered[key] = value.map((item, i) => {
|
|
47006
|
+
const el = item;
|
|
47007
|
+
if (isPatternConfig(el)) {
|
|
47008
|
+
const nestedProps = {};
|
|
47009
|
+
for (const [k, v] of Object.entries(el)) {
|
|
47010
|
+
if (k !== "type") nestedProps[k] = v;
|
|
47011
|
+
}
|
|
47012
|
+
const childContent = {
|
|
47013
|
+
id: `prop-${key}-${i}`,
|
|
47014
|
+
pattern: el.type,
|
|
47015
|
+
props: nestedProps,
|
|
47016
|
+
priority: 0
|
|
47017
|
+
};
|
|
47018
|
+
return /* @__PURE__ */ jsx(SlotContentRenderer, { content: childContent, onDismiss }, i);
|
|
47019
|
+
}
|
|
47020
|
+
return substituteTraitRefsDeep(el, `prop:${key}[${i}]`);
|
|
47021
|
+
});
|
|
46985
47022
|
} else {
|
|
46986
47023
|
rendered[key] = substituteTraitRefsDeep(value, `prop:${key}`);
|
|
46987
47024
|
}
|