@almadar/ui 5.151.0 → 5.153.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/{UISlotContext-D8_SoDsD.d.cts → UISlotContext-BlRDbHDy.d.cts} +1 -1
- package/dist/{UISlotContext-C1FsU9GB.d.ts → UISlotContext-CB89mv7N.d.ts} +1 -1
- package/dist/avl/index.cjs +749 -116
- package/dist/avl/index.js +752 -119
- package/dist/{avl-schema-parser-Cx_4SVg9.d.ts → avl-schema-parser-CLIm28Wa.d.ts} +1 -1
- package/dist/{avl-schema-parser-CVzkNzg7.d.cts → avl-schema-parser-Do_LPV1o.d.cts} +1 -1
- package/dist/{cn-DJTUjk1M.d.ts → cn-CFurBb2q.d.ts} +1 -1
- package/dist/{cn-BnAJZcNb.d.cts → cn-TH-RHihd.d.cts} +1 -1
- package/dist/components/index.cjs +751 -116
- package/dist/components/index.d.cts +114 -16
- package/dist/components/index.d.ts +114 -16
- package/dist/components/index.js +754 -120
- package/dist/context/index.d.cts +2 -2
- package/dist/context/index.d.ts +2 -2
- package/dist/hooks/index.d.cts +1 -1
- package/dist/hooks/index.d.ts +1 -1
- package/dist/lib/drawable/three/index.cjs +212 -0
- package/dist/lib/drawable/three/index.d.cts +3 -3
- package/dist/lib/drawable/three/index.d.ts +3 -3
- package/dist/lib/drawable/three/index.js +212 -0
- package/dist/lib/index.cjs +11 -2
- package/dist/lib/index.d.cts +10 -3
- package/dist/lib/index.d.ts +10 -3
- package/dist/lib/index.js +11 -3
- package/dist/{paintDispatch-CxdLjHQq.d.ts → paintDispatch-B5n2DTB-.d.ts} +178 -2
- package/dist/{paintDispatch-BjZjUbcb.d.cts → paintDispatch-DgBctxIq.d.cts} +178 -2
- package/dist/providers/index.cjs +749 -116
- package/dist/providers/index.js +752 -119
- package/dist/runtime/index.cjs +749 -116
- package/dist/runtime/index.d.cts +2 -2
- package/dist/runtime/index.d.ts +2 -2
- package/dist/runtime/index.js +752 -119
- package/dist/{useUISlots-BesZYMks.d.cts → useUISlots-GNwGLlW2.d.cts} +1 -1
- package/dist/{useUISlots-BesZYMks.d.ts → useUISlots-GNwGLlW2.d.ts} +1 -1
- package/package.json +4 -4
package/dist/context/index.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { U as UISlotContext, a as UISlotProvider, u as useSlotContent, b as useSlotHasContent, c as useUISlots } from '../UISlotContext-
|
|
1
|
+
export { U as UISlotContext, a as UISlotProvider, u as useSlotContent, b as useSlotHasContent, c as useUISlots } from '../UISlotContext-BlRDbHDy.cjs';
|
|
2
2
|
export { B as BUILT_IN_THEMES, C as ColorMode, a as CurrentPagePathContext, b as CurrentPagePathProvider, c as CurrentPagePathProviderProps, D as DesignTheme, d as DesignThemeProvider, O as OrbitalThemeProvider, e as OrbitalThemeProviderProps, R as ResolvedMode, T as ThemeContext, f as ThemeProvider, g as ThemeProviderProps, U as UIThemeDefinition, h as UserContext, i as UserContextValue, j as UserData, k as UserProvider, l as UserProviderProps, u as useCurrentPagePath, m as useDesignTheme, n as useHasPermission, o as useHasRole, p as useTheme, q as useUser, r as useUserForEvaluation } from '../UserContext-g_LcDiGN.cjs';
|
|
3
3
|
import { ThemeRef, ThemeDefinition, ThemeTokens, ThemeVariant } from '@almadar/core';
|
|
4
4
|
export { ANONYMOUS_USER, UISlot } from '@almadar/core';
|
|
5
|
-
export { S as SlotAnimation, a as SlotChangeCallback, b as SlotContent, c as SlotRenderConfig, U as UISlotManager } from '../useUISlots-
|
|
5
|
+
export { S as SlotAnimation, a as SlotChangeCallback, b as SlotContent, c as SlotRenderConfig, U as UISlotManager } from '../useUISlots-GNwGLlW2.cjs';
|
|
6
6
|
import 'react';
|
|
7
7
|
|
|
8
8
|
/**
|
package/dist/context/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { U as UISlotContext, a as UISlotProvider, u as useSlotContent, b as useSlotHasContent, c as useUISlots } from '../UISlotContext-
|
|
1
|
+
export { U as UISlotContext, a as UISlotProvider, u as useSlotContent, b as useSlotHasContent, c as useUISlots } from '../UISlotContext-CB89mv7N.js';
|
|
2
2
|
export { B as BUILT_IN_THEMES, C as ColorMode, a as CurrentPagePathContext, b as CurrentPagePathProvider, c as CurrentPagePathProviderProps, D as DesignTheme, d as DesignThemeProvider, O as OrbitalThemeProvider, e as OrbitalThemeProviderProps, R as ResolvedMode, T as ThemeContext, f as ThemeProvider, g as ThemeProviderProps, U as UIThemeDefinition, h as UserContext, i as UserContextValue, j as UserData, k as UserProvider, l as UserProviderProps, u as useCurrentPagePath, m as useDesignTheme, n as useHasPermission, o as useHasRole, p as useTheme, q as useUser, r as useUserForEvaluation } from '../UserContext-g_LcDiGN.js';
|
|
3
3
|
import { ThemeRef, ThemeDefinition, ThemeTokens, ThemeVariant } from '@almadar/core';
|
|
4
4
|
export { ANONYMOUS_USER, UISlot } from '@almadar/core';
|
|
5
|
-
export { S as SlotAnimation, a as SlotChangeCallback, b as SlotContent, c as SlotRenderConfig, U as UISlotManager } from '../useUISlots-
|
|
5
|
+
export { S as SlotAnimation, a as SlotChangeCallback, b as SlotContent, c as SlotRenderConfig, U as UISlotManager } from '../useUISlots-GNwGLlW2.js';
|
|
6
6
|
import 'react';
|
|
7
7
|
|
|
8
8
|
/**
|
package/dist/hooks/index.d.cts
CHANGED
|
@@ -3,7 +3,7 @@ export { BusEvent, BusEventListener, BusEventSource, BusEventListener as EventLi
|
|
|
3
3
|
import { a as useEventBus } from '../useEventBus-Ckr4wqW3.cjs';
|
|
4
4
|
export { u as useEmitEvent, b as useEventListener } from '../useEventBus-Ckr4wqW3.cjs';
|
|
5
5
|
export { E as EventBusContextType } from '../event-bus-types-Bl78kokd.cjs';
|
|
6
|
-
export { D as DEFAULT_SLOTS, S as SlotAnimation, a as SlotChangeCallback, b as SlotContent, c as SlotRenderConfig, U as UISlotManager, u as useUISlotManager } from '../useUISlots-
|
|
6
|
+
export { D as DEFAULT_SLOTS, S as SlotAnimation, a as SlotChangeCallback, b as SlotContent, c as SlotRenderConfig, U as UISlotManager, u as useUISlotManager } from '../useUISlots-GNwGLlW2.cjs';
|
|
7
7
|
import * as React$1 from 'react';
|
|
8
8
|
import React__default from 'react';
|
|
9
9
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export { BusEvent, BusEventListener, BusEventSource, BusEventListener as EventLi
|
|
|
3
3
|
import { a as useEventBus } from '../useEventBus-CQWyAWpK.js';
|
|
4
4
|
export { u as useEmitEvent, b as useEventListener } from '../useEventBus-CQWyAWpK.js';
|
|
5
5
|
export { E as EventBusContextType } from '../event-bus-types-Bl78kokd.js';
|
|
6
|
-
export { D as DEFAULT_SLOTS, S as SlotAnimation, a as SlotChangeCallback, b as SlotContent, c as SlotRenderConfig, U as UISlotManager, u as useUISlotManager } from '../useUISlots-
|
|
6
|
+
export { D as DEFAULT_SLOTS, S as SlotAnimation, a as SlotChangeCallback, b as SlotContent, c as SlotRenderConfig, U as UISlotManager, u as useUISlotManager } from '../useUISlots-GNwGLlW2.js';
|
|
7
7
|
import * as React$1 from 'react';
|
|
8
8
|
import React__default from 'react';
|
|
9
9
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
@@ -712,6 +712,201 @@ function applyMeshAnimation(node, timeMs) {
|
|
|
712
712
|
emissive: trackValue("emissive")
|
|
713
713
|
};
|
|
714
714
|
}
|
|
715
|
+
|
|
716
|
+
// components/core/atoms/fx.ts
|
|
717
|
+
function resolveFxView(item, presets) {
|
|
718
|
+
const row = presets?.find((p) => p.type === item.type);
|
|
719
|
+
if (!row) return item;
|
|
720
|
+
return {
|
|
721
|
+
...item,
|
|
722
|
+
space: item.space ?? row.space,
|
|
723
|
+
effect: item.effect ?? row.effect,
|
|
724
|
+
color: item.color ?? row.color,
|
|
725
|
+
size: item.size ?? row.size,
|
|
726
|
+
vx: item.vx ?? row.vx,
|
|
727
|
+
vy: item.vy ?? row.vy,
|
|
728
|
+
vz: item.vz ?? row.vz,
|
|
729
|
+
particleCount: item.particleCount ?? row.particleCount,
|
|
730
|
+
shape: row.shape,
|
|
731
|
+
count: row.count,
|
|
732
|
+
glow: row.glow,
|
|
733
|
+
gravity: row.gravity,
|
|
734
|
+
color2: row.color2
|
|
735
|
+
};
|
|
736
|
+
}
|
|
737
|
+
function fxLifecycle(item, epochNowMs, tickMs) {
|
|
738
|
+
const maxTtl = Math.max(item.maxTtl ?? item.ttl, item.ttl, 1);
|
|
739
|
+
const lifeMs = maxTtl * tickMs;
|
|
740
|
+
const ageMs = item.bornAt !== void 0 && epochNowMs > 0 ? Math.max(0, epochNowMs - item.bornAt) : (1 - item.ttl / maxTtl) * lifeMs;
|
|
741
|
+
const progress = Math.min(1, Math.max(0, ageMs / lifeMs));
|
|
742
|
+
return { lifeMs, ageMs, progress, fade: 1 - progress };
|
|
743
|
+
}
|
|
744
|
+
function fxHash01(seed, salt) {
|
|
745
|
+
let h = 2166136261 ^ salt;
|
|
746
|
+
for (let i = 0; i < seed.length; i++) {
|
|
747
|
+
h ^= seed.charCodeAt(i);
|
|
748
|
+
h = Math.imul(h, 16777619);
|
|
749
|
+
}
|
|
750
|
+
h ^= h >>> 13;
|
|
751
|
+
h = Math.imul(h, 1274126177);
|
|
752
|
+
h ^= h >>> 16;
|
|
753
|
+
return (h >>> 0) / 4294967296;
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
// components/game/molecules/DrawFxLayer.tsx
|
|
757
|
+
var DEFAULT_TICK_MS = 500;
|
|
758
|
+
var DEFAULT_TEXT_COLOR = "#ffe066";
|
|
759
|
+
var DEFAULT_SPARK_COLOR = "#ffffff";
|
|
760
|
+
var easeOut = (t) => 1 - (1 - t) * (1 - t);
|
|
761
|
+
function fxPosition(view, dim, ageSec) {
|
|
762
|
+
const g = view.gravity ?? 0;
|
|
763
|
+
const fall = 0.5 * g * ageSec * ageSec;
|
|
764
|
+
const base = view.position ?? { x: view.x, y: view.z ?? 0, z: view.y };
|
|
765
|
+
if (!Number.isFinite(base.x) || !Number.isFinite(base.y)) return void 0;
|
|
766
|
+
return {
|
|
767
|
+
x: base.x + (view.vx ?? 0) * ageSec,
|
|
768
|
+
y: base.y + (view.vz ?? 0) * ageSec,
|
|
769
|
+
...base.z !== void 0 || view.vy !== void 0 || g !== 0 ? { z: (base.z ?? 0) + (view.vy ?? 0) * ageSec - fall } : {}
|
|
770
|
+
};
|
|
771
|
+
}
|
|
772
|
+
function sparkShape(view, pos, i, fade, progress) {
|
|
773
|
+
const size = view.size ?? 0.5;
|
|
774
|
+
const angle = fxHash01(view.id, i * 3) * Math.PI * 2;
|
|
775
|
+
const dist = size * (0.4 + 0.6 * fxHash01(view.id, i * 3 + 1)) * easeOut(progress);
|
|
776
|
+
const r = size * (0.06 + 0.06 * fxHash01(view.id, i * 3 + 2));
|
|
777
|
+
const color = view.color ?? DEFAULT_SPARK_COLOR;
|
|
778
|
+
return {
|
|
779
|
+
type: "draw-shape",
|
|
780
|
+
shape: "ellipse",
|
|
781
|
+
position: { ...pos, x: pos.x + Math.cos(angle) * dist, y: pos.y + Math.sin(angle) * dist },
|
|
782
|
+
anchor: "center",
|
|
783
|
+
radiusX: r,
|
|
784
|
+
fill: color,
|
|
785
|
+
blendMode: "lighter",
|
|
786
|
+
opacity: fade,
|
|
787
|
+
...view.glow ? { shadow: { color, blur: view.glow } } : {}
|
|
788
|
+
};
|
|
789
|
+
}
|
|
790
|
+
function proceduralShapes(view, pos, fade, progress) {
|
|
791
|
+
const size = view.size ?? 0.5;
|
|
792
|
+
const color = view.color ?? DEFAULT_SPARK_COLOR;
|
|
793
|
+
switch (view.shape ?? "spark") {
|
|
794
|
+
case "ring": {
|
|
795
|
+
return [
|
|
796
|
+
{
|
|
797
|
+
type: "draw-shape",
|
|
798
|
+
shape: "ellipse",
|
|
799
|
+
position: pos,
|
|
800
|
+
anchor: "center",
|
|
801
|
+
radiusX: size * easeOut(progress),
|
|
802
|
+
stroke: view.color2 ?? color,
|
|
803
|
+
strokeWidth: 2,
|
|
804
|
+
blendMode: "lighter",
|
|
805
|
+
opacity: fade,
|
|
806
|
+
...view.glow ? { shadow: { color, blur: view.glow } } : {}
|
|
807
|
+
}
|
|
808
|
+
];
|
|
809
|
+
}
|
|
810
|
+
case "puff": {
|
|
811
|
+
const count = view.count ?? 3;
|
|
812
|
+
return Array.from({ length: count }, (_, i) => {
|
|
813
|
+
const angle = fxHash01(view.id, i * 5) * Math.PI * 2;
|
|
814
|
+
const drift = size * 0.3 * fxHash01(view.id, i * 5 + 1) * easeOut(progress);
|
|
815
|
+
return {
|
|
816
|
+
type: "draw-shape",
|
|
817
|
+
shape: "ellipse",
|
|
818
|
+
position: { ...pos, x: pos.x + Math.cos(angle) * drift, y: pos.y + Math.sin(angle) * drift },
|
|
819
|
+
anchor: "center",
|
|
820
|
+
radiusX: size * (0.15 + 0.35 * progress) * (0.7 + 0.6 * fxHash01(view.id, i * 5 + 2)),
|
|
821
|
+
fill: i === 0 && view.color2 ? view.color2 : color,
|
|
822
|
+
opacity: fade * 0.6,
|
|
823
|
+
...view.glow ? { shadow: { color, blur: view.glow } } : {}
|
|
824
|
+
};
|
|
825
|
+
});
|
|
826
|
+
}
|
|
827
|
+
case "streak": {
|
|
828
|
+
const count = view.count ?? 5;
|
|
829
|
+
return Array.from({ length: count }, (_, i) => {
|
|
830
|
+
const angle = fxHash01(view.id, i * 3) * Math.PI * 2;
|
|
831
|
+
const inner = size * (0.2 + 0.8 * easeOut(progress)) * (0.6 + 0.4 * fxHash01(view.id, i * 3 + 1));
|
|
832
|
+
const len = size * 0.35;
|
|
833
|
+
return {
|
|
834
|
+
type: "draw-shape",
|
|
835
|
+
shape: "ellipse",
|
|
836
|
+
position: pos,
|
|
837
|
+
anchor: "center",
|
|
838
|
+
offsetX: inner + len / 2,
|
|
839
|
+
offsetY: 0,
|
|
840
|
+
radiusX: len / 2,
|
|
841
|
+
radiusY: size * 0.04,
|
|
842
|
+
rotate: angle,
|
|
843
|
+
fill: color,
|
|
844
|
+
blendMode: "lighter",
|
|
845
|
+
opacity: fade,
|
|
846
|
+
...view.glow ? { shadow: { color, blur: view.glow } } : {}
|
|
847
|
+
};
|
|
848
|
+
});
|
|
849
|
+
}
|
|
850
|
+
default: {
|
|
851
|
+
const count = view.count ?? 6;
|
|
852
|
+
return Array.from({ length: count }, (_, i) => sparkShape(view, pos, i, fade, progress));
|
|
853
|
+
}
|
|
854
|
+
}
|
|
855
|
+
}
|
|
856
|
+
function expandFxItem(view, node, epochNowMs, dim) {
|
|
857
|
+
if (view.space === "screen") return [];
|
|
858
|
+
const tickMs = node.tickMs ?? DEFAULT_TICK_MS;
|
|
859
|
+
const { ageMs, progress, fade } = fxLifecycle(view, epochNowMs, tickMs);
|
|
860
|
+
if (progress >= 1) return [];
|
|
861
|
+
const pos = fxPosition(view, dim, ageMs / 1e3);
|
|
862
|
+
if (!pos) return [];
|
|
863
|
+
const out = [];
|
|
864
|
+
const artItems = node.art?.[view.type]?.["idle"];
|
|
865
|
+
const sprite = node.sprites?.[view.type];
|
|
866
|
+
if (Array.isArray(artItems)) {
|
|
867
|
+
out.push({
|
|
868
|
+
type: "draw-group",
|
|
869
|
+
position: pos,
|
|
870
|
+
opacity: fade,
|
|
871
|
+
...view.size !== void 0 ? { scale: view.size } : {},
|
|
872
|
+
items: artItems
|
|
873
|
+
});
|
|
874
|
+
} else if (sprite?.url) {
|
|
875
|
+
const spriteSize = view.size ?? 0.6;
|
|
876
|
+
out.push({
|
|
877
|
+
type: "draw-sprite",
|
|
878
|
+
position: pos,
|
|
879
|
+
asset: sprite,
|
|
880
|
+
anchor: "center",
|
|
881
|
+
width: spriteSize,
|
|
882
|
+
height: spriteSize,
|
|
883
|
+
opacity: fade
|
|
884
|
+
});
|
|
885
|
+
} else {
|
|
886
|
+
out.push(...proceduralShapes(view, pos, fade, progress));
|
|
887
|
+
}
|
|
888
|
+
if (view.message) {
|
|
889
|
+
const text = {
|
|
890
|
+
type: "draw-text",
|
|
891
|
+
text: view.message,
|
|
892
|
+
position: pos,
|
|
893
|
+
offsetY: -(0.15 + 0.55 * progress),
|
|
894
|
+
color: view.color ?? node.textColor ?? DEFAULT_TEXT_COLOR,
|
|
895
|
+
opacity: fade
|
|
896
|
+
};
|
|
897
|
+
out.push(text);
|
|
898
|
+
}
|
|
899
|
+
return out;
|
|
900
|
+
}
|
|
901
|
+
function expandFxLayer(node, epochNowMs, dim) {
|
|
902
|
+
if (!Array.isArray(node.items)) return [];
|
|
903
|
+
const out = [];
|
|
904
|
+
for (const item of node.items) {
|
|
905
|
+
if (!item || typeof item.id !== "string") continue;
|
|
906
|
+
out.push(...expandFxItem(resolveFxView(item, node.presets), node, epochNowMs, dim));
|
|
907
|
+
}
|
|
908
|
+
return out;
|
|
909
|
+
}
|
|
715
910
|
var NUMERIC_TRACKS2 = [
|
|
716
911
|
"offsetX",
|
|
717
912
|
"offsetY",
|
|
@@ -1577,6 +1772,8 @@ function Drawable3D({ node, projector, groupOpacity = 1 }) {
|
|
|
1577
1772
|
if (node.clip) warnUnsupported3d("draw-group:clip");
|
|
1578
1773
|
return /* @__PURE__ */ jsxRuntime.jsx(Group3D, { node, projector, groupOpacity });
|
|
1579
1774
|
}
|
|
1775
|
+
case "draw-fx-layer":
|
|
1776
|
+
return /* @__PURE__ */ jsxRuntime.jsx(FxLayer3D, { node, projector, groupOpacity });
|
|
1580
1777
|
}
|
|
1581
1778
|
})();
|
|
1582
1779
|
return node.id ? /* @__PURE__ */ jsxRuntime.jsx("group", { userData: { drawableId: node.id }, children: rendered }) : rendered;
|
|
@@ -1624,6 +1821,21 @@ function Group3D({
|
|
|
1624
1821
|
] });
|
|
1625
1822
|
return scopedStore ? /* @__PURE__ */ jsxRuntime.jsx(BoneRegistryContext.Provider, { value: scopedStore, children }) : children;
|
|
1626
1823
|
}
|
|
1824
|
+
function FxLayer3D({
|
|
1825
|
+
node,
|
|
1826
|
+
projector,
|
|
1827
|
+
groupOpacity
|
|
1828
|
+
}) {
|
|
1829
|
+
const [, setFrame] = React3.useState(0);
|
|
1830
|
+
const live = Array.isArray(node.items) && node.items.length > 0;
|
|
1831
|
+
fiber.useFrame(() => {
|
|
1832
|
+
if (live) setFrame((f) => (f + 1) % 1e6);
|
|
1833
|
+
});
|
|
1834
|
+
if (!live) return null;
|
|
1835
|
+
const epochNow = typeof performance !== "undefined" ? performance.timeOrigin + performance.now() : 0;
|
|
1836
|
+
const children = expandFxLayer(node, epochNow, "3d");
|
|
1837
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: children.map((c, i) => /* @__PURE__ */ jsxRuntime.jsx(Drawable3D, { node: c, projector, groupOpacity }, i)) });
|
|
1838
|
+
}
|
|
1627
1839
|
|
|
1628
1840
|
// lib/drawable/three/game3dTheme.ts
|
|
1629
1841
|
var GRID_COLORS_3D = {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { C as CanvasPointLightConfig, I as IsometricTile, a as IsometricUnit, b as IsometricFeature, A as ApplicationLevelData, O as OrbitalLevelData, T as TraitLevelData, c as TransitionLevelData } from '../../../avl-schema-parser-
|
|
2
|
-
export { d as Canvas3DHost, e as Canvas3DHostHandle, f as Canvas3DHostProps, d as GameCanvas3D, U as UnitAnimationState } from '../../../avl-schema-parser-
|
|
1
|
+
import { C as CanvasPointLightConfig, I as IsometricTile, a as IsometricUnit, b as IsometricFeature, A as ApplicationLevelData, O as OrbitalLevelData, T as TraitLevelData, c as TransitionLevelData } from '../../../avl-schema-parser-Do_LPV1o.cjs';
|
|
2
|
+
export { d as Canvas3DHost, e as Canvas3DHostHandle, f as Canvas3DHostProps, d as GameCanvas3D, U as UnitAnimationState } from '../../../avl-schema-parser-Do_LPV1o.cjs';
|
|
3
3
|
import * as React$1 from 'react';
|
|
4
4
|
import React__default, { Component, ReactNode, ErrorInfo } from 'react';
|
|
5
5
|
import * as THREE from 'three';
|
|
6
6
|
import { QuadraticBezierCurve3 } from 'three';
|
|
7
7
|
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js';
|
|
8
8
|
import { JsonObject, EventEmit, OrbitalSchema } from '@almadar/core';
|
|
9
|
-
import '../../../paintDispatch-
|
|
9
|
+
import '../../../paintDispatch-DgBctxIq.cjs';
|
|
10
10
|
import '../../../types-B3nHgnMG.cjs';
|
|
11
11
|
|
|
12
12
|
/**
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { C as CanvasPointLightConfig, I as IsometricTile, a as IsometricUnit, b as IsometricFeature, A as ApplicationLevelData, O as OrbitalLevelData, T as TraitLevelData, c as TransitionLevelData } from '../../../avl-schema-parser-
|
|
2
|
-
export { d as Canvas3DHost, e as Canvas3DHostHandle, f as Canvas3DHostProps, d as GameCanvas3D, U as UnitAnimationState } from '../../../avl-schema-parser-
|
|
1
|
+
import { C as CanvasPointLightConfig, I as IsometricTile, a as IsometricUnit, b as IsometricFeature, A as ApplicationLevelData, O as OrbitalLevelData, T as TraitLevelData, c as TransitionLevelData } from '../../../avl-schema-parser-CLIm28Wa.js';
|
|
2
|
+
export { d as Canvas3DHost, e as Canvas3DHostHandle, f as Canvas3DHostProps, d as GameCanvas3D, U as UnitAnimationState } from '../../../avl-schema-parser-CLIm28Wa.js';
|
|
3
3
|
import * as React$1 from 'react';
|
|
4
4
|
import React__default, { Component, ReactNode, ErrorInfo } from 'react';
|
|
5
5
|
import * as THREE from 'three';
|
|
6
6
|
import { QuadraticBezierCurve3 } from 'three';
|
|
7
7
|
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js';
|
|
8
8
|
import { JsonObject, EventEmit, OrbitalSchema } from '@almadar/core';
|
|
9
|
-
import '../../../paintDispatch-
|
|
9
|
+
import '../../../paintDispatch-B5n2DTB-.js';
|
|
10
10
|
import '../../../types-B3nHgnMG.js';
|
|
11
11
|
|
|
12
12
|
/**
|
|
@@ -688,6 +688,201 @@ function applyMeshAnimation(node, timeMs) {
|
|
|
688
688
|
emissive: trackValue("emissive")
|
|
689
689
|
};
|
|
690
690
|
}
|
|
691
|
+
|
|
692
|
+
// components/core/atoms/fx.ts
|
|
693
|
+
function resolveFxView(item, presets) {
|
|
694
|
+
const row = presets?.find((p) => p.type === item.type);
|
|
695
|
+
if (!row) return item;
|
|
696
|
+
return {
|
|
697
|
+
...item,
|
|
698
|
+
space: item.space ?? row.space,
|
|
699
|
+
effect: item.effect ?? row.effect,
|
|
700
|
+
color: item.color ?? row.color,
|
|
701
|
+
size: item.size ?? row.size,
|
|
702
|
+
vx: item.vx ?? row.vx,
|
|
703
|
+
vy: item.vy ?? row.vy,
|
|
704
|
+
vz: item.vz ?? row.vz,
|
|
705
|
+
particleCount: item.particleCount ?? row.particleCount,
|
|
706
|
+
shape: row.shape,
|
|
707
|
+
count: row.count,
|
|
708
|
+
glow: row.glow,
|
|
709
|
+
gravity: row.gravity,
|
|
710
|
+
color2: row.color2
|
|
711
|
+
};
|
|
712
|
+
}
|
|
713
|
+
function fxLifecycle(item, epochNowMs, tickMs) {
|
|
714
|
+
const maxTtl = Math.max(item.maxTtl ?? item.ttl, item.ttl, 1);
|
|
715
|
+
const lifeMs = maxTtl * tickMs;
|
|
716
|
+
const ageMs = item.bornAt !== void 0 && epochNowMs > 0 ? Math.max(0, epochNowMs - item.bornAt) : (1 - item.ttl / maxTtl) * lifeMs;
|
|
717
|
+
const progress = Math.min(1, Math.max(0, ageMs / lifeMs));
|
|
718
|
+
return { lifeMs, ageMs, progress, fade: 1 - progress };
|
|
719
|
+
}
|
|
720
|
+
function fxHash01(seed, salt) {
|
|
721
|
+
let h = 2166136261 ^ salt;
|
|
722
|
+
for (let i = 0; i < seed.length; i++) {
|
|
723
|
+
h ^= seed.charCodeAt(i);
|
|
724
|
+
h = Math.imul(h, 16777619);
|
|
725
|
+
}
|
|
726
|
+
h ^= h >>> 13;
|
|
727
|
+
h = Math.imul(h, 1274126177);
|
|
728
|
+
h ^= h >>> 16;
|
|
729
|
+
return (h >>> 0) / 4294967296;
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
// components/game/molecules/DrawFxLayer.tsx
|
|
733
|
+
var DEFAULT_TICK_MS = 500;
|
|
734
|
+
var DEFAULT_TEXT_COLOR = "#ffe066";
|
|
735
|
+
var DEFAULT_SPARK_COLOR = "#ffffff";
|
|
736
|
+
var easeOut = (t) => 1 - (1 - t) * (1 - t);
|
|
737
|
+
function fxPosition(view, dim, ageSec) {
|
|
738
|
+
const g = view.gravity ?? 0;
|
|
739
|
+
const fall = 0.5 * g * ageSec * ageSec;
|
|
740
|
+
const base = view.position ?? { x: view.x, y: view.z ?? 0, z: view.y };
|
|
741
|
+
if (!Number.isFinite(base.x) || !Number.isFinite(base.y)) return void 0;
|
|
742
|
+
return {
|
|
743
|
+
x: base.x + (view.vx ?? 0) * ageSec,
|
|
744
|
+
y: base.y + (view.vz ?? 0) * ageSec,
|
|
745
|
+
...base.z !== void 0 || view.vy !== void 0 || g !== 0 ? { z: (base.z ?? 0) + (view.vy ?? 0) * ageSec - fall } : {}
|
|
746
|
+
};
|
|
747
|
+
}
|
|
748
|
+
function sparkShape(view, pos, i, fade, progress) {
|
|
749
|
+
const size = view.size ?? 0.5;
|
|
750
|
+
const angle = fxHash01(view.id, i * 3) * Math.PI * 2;
|
|
751
|
+
const dist = size * (0.4 + 0.6 * fxHash01(view.id, i * 3 + 1)) * easeOut(progress);
|
|
752
|
+
const r = size * (0.06 + 0.06 * fxHash01(view.id, i * 3 + 2));
|
|
753
|
+
const color = view.color ?? DEFAULT_SPARK_COLOR;
|
|
754
|
+
return {
|
|
755
|
+
type: "draw-shape",
|
|
756
|
+
shape: "ellipse",
|
|
757
|
+
position: { ...pos, x: pos.x + Math.cos(angle) * dist, y: pos.y + Math.sin(angle) * dist },
|
|
758
|
+
anchor: "center",
|
|
759
|
+
radiusX: r,
|
|
760
|
+
fill: color,
|
|
761
|
+
blendMode: "lighter",
|
|
762
|
+
opacity: fade,
|
|
763
|
+
...view.glow ? { shadow: { color, blur: view.glow } } : {}
|
|
764
|
+
};
|
|
765
|
+
}
|
|
766
|
+
function proceduralShapes(view, pos, fade, progress) {
|
|
767
|
+
const size = view.size ?? 0.5;
|
|
768
|
+
const color = view.color ?? DEFAULT_SPARK_COLOR;
|
|
769
|
+
switch (view.shape ?? "spark") {
|
|
770
|
+
case "ring": {
|
|
771
|
+
return [
|
|
772
|
+
{
|
|
773
|
+
type: "draw-shape",
|
|
774
|
+
shape: "ellipse",
|
|
775
|
+
position: pos,
|
|
776
|
+
anchor: "center",
|
|
777
|
+
radiusX: size * easeOut(progress),
|
|
778
|
+
stroke: view.color2 ?? color,
|
|
779
|
+
strokeWidth: 2,
|
|
780
|
+
blendMode: "lighter",
|
|
781
|
+
opacity: fade,
|
|
782
|
+
...view.glow ? { shadow: { color, blur: view.glow } } : {}
|
|
783
|
+
}
|
|
784
|
+
];
|
|
785
|
+
}
|
|
786
|
+
case "puff": {
|
|
787
|
+
const count = view.count ?? 3;
|
|
788
|
+
return Array.from({ length: count }, (_, i) => {
|
|
789
|
+
const angle = fxHash01(view.id, i * 5) * Math.PI * 2;
|
|
790
|
+
const drift = size * 0.3 * fxHash01(view.id, i * 5 + 1) * easeOut(progress);
|
|
791
|
+
return {
|
|
792
|
+
type: "draw-shape",
|
|
793
|
+
shape: "ellipse",
|
|
794
|
+
position: { ...pos, x: pos.x + Math.cos(angle) * drift, y: pos.y + Math.sin(angle) * drift },
|
|
795
|
+
anchor: "center",
|
|
796
|
+
radiusX: size * (0.15 + 0.35 * progress) * (0.7 + 0.6 * fxHash01(view.id, i * 5 + 2)),
|
|
797
|
+
fill: i === 0 && view.color2 ? view.color2 : color,
|
|
798
|
+
opacity: fade * 0.6,
|
|
799
|
+
...view.glow ? { shadow: { color, blur: view.glow } } : {}
|
|
800
|
+
};
|
|
801
|
+
});
|
|
802
|
+
}
|
|
803
|
+
case "streak": {
|
|
804
|
+
const count = view.count ?? 5;
|
|
805
|
+
return Array.from({ length: count }, (_, i) => {
|
|
806
|
+
const angle = fxHash01(view.id, i * 3) * Math.PI * 2;
|
|
807
|
+
const inner = size * (0.2 + 0.8 * easeOut(progress)) * (0.6 + 0.4 * fxHash01(view.id, i * 3 + 1));
|
|
808
|
+
const len = size * 0.35;
|
|
809
|
+
return {
|
|
810
|
+
type: "draw-shape",
|
|
811
|
+
shape: "ellipse",
|
|
812
|
+
position: pos,
|
|
813
|
+
anchor: "center",
|
|
814
|
+
offsetX: inner + len / 2,
|
|
815
|
+
offsetY: 0,
|
|
816
|
+
radiusX: len / 2,
|
|
817
|
+
radiusY: size * 0.04,
|
|
818
|
+
rotate: angle,
|
|
819
|
+
fill: color,
|
|
820
|
+
blendMode: "lighter",
|
|
821
|
+
opacity: fade,
|
|
822
|
+
...view.glow ? { shadow: { color, blur: view.glow } } : {}
|
|
823
|
+
};
|
|
824
|
+
});
|
|
825
|
+
}
|
|
826
|
+
default: {
|
|
827
|
+
const count = view.count ?? 6;
|
|
828
|
+
return Array.from({ length: count }, (_, i) => sparkShape(view, pos, i, fade, progress));
|
|
829
|
+
}
|
|
830
|
+
}
|
|
831
|
+
}
|
|
832
|
+
function expandFxItem(view, node, epochNowMs, dim) {
|
|
833
|
+
if (view.space === "screen") return [];
|
|
834
|
+
const tickMs = node.tickMs ?? DEFAULT_TICK_MS;
|
|
835
|
+
const { ageMs, progress, fade } = fxLifecycle(view, epochNowMs, tickMs);
|
|
836
|
+
if (progress >= 1) return [];
|
|
837
|
+
const pos = fxPosition(view, dim, ageMs / 1e3);
|
|
838
|
+
if (!pos) return [];
|
|
839
|
+
const out = [];
|
|
840
|
+
const artItems = node.art?.[view.type]?.["idle"];
|
|
841
|
+
const sprite = node.sprites?.[view.type];
|
|
842
|
+
if (Array.isArray(artItems)) {
|
|
843
|
+
out.push({
|
|
844
|
+
type: "draw-group",
|
|
845
|
+
position: pos,
|
|
846
|
+
opacity: fade,
|
|
847
|
+
...view.size !== void 0 ? { scale: view.size } : {},
|
|
848
|
+
items: artItems
|
|
849
|
+
});
|
|
850
|
+
} else if (sprite?.url) {
|
|
851
|
+
const spriteSize = view.size ?? 0.6;
|
|
852
|
+
out.push({
|
|
853
|
+
type: "draw-sprite",
|
|
854
|
+
position: pos,
|
|
855
|
+
asset: sprite,
|
|
856
|
+
anchor: "center",
|
|
857
|
+
width: spriteSize,
|
|
858
|
+
height: spriteSize,
|
|
859
|
+
opacity: fade
|
|
860
|
+
});
|
|
861
|
+
} else {
|
|
862
|
+
out.push(...proceduralShapes(view, pos, fade, progress));
|
|
863
|
+
}
|
|
864
|
+
if (view.message) {
|
|
865
|
+
const text = {
|
|
866
|
+
type: "draw-text",
|
|
867
|
+
text: view.message,
|
|
868
|
+
position: pos,
|
|
869
|
+
offsetY: -(0.15 + 0.55 * progress),
|
|
870
|
+
color: view.color ?? node.textColor ?? DEFAULT_TEXT_COLOR,
|
|
871
|
+
opacity: fade
|
|
872
|
+
};
|
|
873
|
+
out.push(text);
|
|
874
|
+
}
|
|
875
|
+
return out;
|
|
876
|
+
}
|
|
877
|
+
function expandFxLayer(node, epochNowMs, dim) {
|
|
878
|
+
if (!Array.isArray(node.items)) return [];
|
|
879
|
+
const out = [];
|
|
880
|
+
for (const item of node.items) {
|
|
881
|
+
if (!item || typeof item.id !== "string") continue;
|
|
882
|
+
out.push(...expandFxItem(resolveFxView(item, node.presets), node, epochNowMs, dim));
|
|
883
|
+
}
|
|
884
|
+
return out;
|
|
885
|
+
}
|
|
691
886
|
var NUMERIC_TRACKS2 = [
|
|
692
887
|
"offsetX",
|
|
693
888
|
"offsetY",
|
|
@@ -1553,6 +1748,8 @@ function Drawable3D({ node, projector, groupOpacity = 1 }) {
|
|
|
1553
1748
|
if (node.clip) warnUnsupported3d("draw-group:clip");
|
|
1554
1749
|
return /* @__PURE__ */ jsx(Group3D, { node, projector, groupOpacity });
|
|
1555
1750
|
}
|
|
1751
|
+
case "draw-fx-layer":
|
|
1752
|
+
return /* @__PURE__ */ jsx(FxLayer3D, { node, projector, groupOpacity });
|
|
1556
1753
|
}
|
|
1557
1754
|
})();
|
|
1558
1755
|
return node.id ? /* @__PURE__ */ jsx("group", { userData: { drawableId: node.id }, children: rendered }) : rendered;
|
|
@@ -1600,6 +1797,21 @@ function Group3D({
|
|
|
1600
1797
|
] });
|
|
1601
1798
|
return scopedStore ? /* @__PURE__ */ jsx(BoneRegistryContext.Provider, { value: scopedStore, children }) : children;
|
|
1602
1799
|
}
|
|
1800
|
+
function FxLayer3D({
|
|
1801
|
+
node,
|
|
1802
|
+
projector,
|
|
1803
|
+
groupOpacity
|
|
1804
|
+
}) {
|
|
1805
|
+
const [, setFrame] = useState(0);
|
|
1806
|
+
const live = Array.isArray(node.items) && node.items.length > 0;
|
|
1807
|
+
useFrame(() => {
|
|
1808
|
+
if (live) setFrame((f) => (f + 1) % 1e6);
|
|
1809
|
+
});
|
|
1810
|
+
if (!live) return null;
|
|
1811
|
+
const epochNow = typeof performance !== "undefined" ? performance.timeOrigin + performance.now() : 0;
|
|
1812
|
+
const children = expandFxLayer(node, epochNow, "3d");
|
|
1813
|
+
return /* @__PURE__ */ jsx(Fragment, { children: children.map((c, i) => /* @__PURE__ */ jsx(Drawable3D, { node: c, projector, groupOpacity }, i)) });
|
|
1814
|
+
}
|
|
1603
1815
|
|
|
1604
1816
|
// lib/drawable/three/game3dTheme.ts
|
|
1605
1817
|
var GRID_COLORS_3D = {
|
package/dist/lib/index.cjs
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
var clsx = require('clsx');
|
|
4
4
|
var tailwindMerge = require('tailwind-merge');
|
|
5
5
|
var logger = require('@almadar/logger');
|
|
6
|
+
var core = require('@almadar/core');
|
|
6
7
|
|
|
7
8
|
var __defProp = Object.defineProperty;
|
|
8
9
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
@@ -866,8 +867,6 @@ function sortRows(rows, field, direction = "asc") {
|
|
|
866
867
|
const dir = direction === "desc" ? -1 : 1;
|
|
867
868
|
return [...rows].sort((a, b) => dir * compareCellValues(a?.[field], b?.[field]));
|
|
868
869
|
}
|
|
869
|
-
|
|
870
|
-
// lib/getNestedValue.ts
|
|
871
870
|
function getNestedValue(obj, path) {
|
|
872
871
|
if (obj === null || obj === void 0 || !path) {
|
|
873
872
|
return void 0;
|
|
@@ -888,6 +887,15 @@ function getNestedValue(obj, path) {
|
|
|
888
887
|
}
|
|
889
888
|
return value;
|
|
890
889
|
}
|
|
890
|
+
function resolveImageUrl(value) {
|
|
891
|
+
if (typeof value === "string") {
|
|
892
|
+
return value;
|
|
893
|
+
}
|
|
894
|
+
if (core.isFileValue(value)) {
|
|
895
|
+
return value.url;
|
|
896
|
+
}
|
|
897
|
+
return void 0;
|
|
898
|
+
}
|
|
891
899
|
function formatNestedFieldLabel(path) {
|
|
892
900
|
const lastPart = path.includes(".") ? path.split(".").pop() : path;
|
|
893
901
|
return lastPart.replace(/([A-Z])/g, " $1").replace(/^./, (str) => str.toUpperCase()).replace(/Id$/, "").trim();
|
|
@@ -2116,6 +2124,7 @@ exports.registerTrait = registerTrait;
|
|
|
2116
2124
|
exports.registerTraitSnapshot = registerTraitSnapshot;
|
|
2117
2125
|
exports.renderStateMachineToDomData = renderStateMachineToDomData;
|
|
2118
2126
|
exports.renderStateMachineToSvg = renderStateMachineToSvg;
|
|
2127
|
+
exports.resolveImageUrl = resolveImageUrl;
|
|
2119
2128
|
exports.setDebugEnabled = setDebugEnabled;
|
|
2120
2129
|
exports.setEntityProvider = setEntityProvider;
|
|
2121
2130
|
exports.setTickActive = setTickActive;
|
package/dist/lib/index.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { C as ContentSegment, D as DEFAULT_CONFIG, a as DomEntityBox, b as DomLayoutData, c as DomOutputsBox, d as DomStateNode, e as DomTransitionLabel, f as DomTransitionPath, E as EntityDefinition, L as LessonSegment, R as RenderOptions, S as StateDefinition, g as StateMachineDefinition, T as TraitSnapshotGetter, h as TransitionDefinition, V as VisualizerConfig, i as bindCanvasCapture, j as bindEventBus, k as bindLastDrawables, l as bindTraitStateGetter, m as clearVerification, n as cn, o as extractOutputsFromTransitions, p as extractStateMachine, q as formatGuard, r as getAllChecks, s as getBridgeHealth, t as getEffectSummary, u as getSnapshot, v as getSummary, w as getTraitSnapshots, x as getTransitions, y as getTransitionsForTrait, z as parseContentSegments, A as parseLessonSegments, B as parseMarkdownWithCodeBlocks, F as recordServerResponse, G as recordTransition, H as registerCheck, I as registerTraitSnapshot, J as renderStateMachineToDomData, K as renderStateMachineToSvg, M as subscribeToVerification, N as updateAssetStatus, O as updateBridgeHealth, P as updateCheck, Q as waitForTransition } from '../cn-
|
|
1
|
+
export { C as ContentSegment, D as DEFAULT_CONFIG, a as DomEntityBox, b as DomLayoutData, c as DomOutputsBox, d as DomStateNode, e as DomTransitionLabel, f as DomTransitionPath, E as EntityDefinition, L as LessonSegment, R as RenderOptions, S as StateDefinition, g as StateMachineDefinition, T as TraitSnapshotGetter, h as TransitionDefinition, V as VisualizerConfig, i as bindCanvasCapture, j as bindEventBus, k as bindLastDrawables, l as bindTraitStateGetter, m as clearVerification, n as cn, o as extractOutputsFromTransitions, p as extractStateMachine, q as formatGuard, r as getAllChecks, s as getBridgeHealth, t as getEffectSummary, u as getSnapshot, v as getSummary, w as getTraitSnapshots, x as getTransitions, y as getTransitionsForTrait, z as parseContentSegments, A as parseLessonSegments, B as parseMarkdownWithCodeBlocks, F as recordServerResponse, G as recordTransition, H as registerCheck, I as registerTraitSnapshot, J as renderStateMachineToDomData, K as renderStateMachineToSvg, M as subscribeToVerification, N as updateAssetStatus, O as updateBridgeHealth, P as updateCheck, Q as waitForTransition } from '../cn-TH-RHihd.cjs';
|
|
2
2
|
import { FieldValue, EntityRow, EventPayload } from '@almadar/core';
|
|
3
3
|
export { AssetLoadStatus, BridgeHealth, CheckStatus, EffectTrace, EventLogEntry, OrbitalVerificationAPI, ServerResponseTrace, TraitStateSnapshot, TransitionTrace, VerificationCheck, VerificationSnapshot, VerificationSummary } from '@almadar/core';
|
|
4
4
|
import 'react';
|
|
5
|
-
import '../paintDispatch-
|
|
5
|
+
import '../paintDispatch-DgBctxIq.cjs';
|
|
6
6
|
import '../types-B3nHgnMG.cjs';
|
|
7
7
|
import 'clsx';
|
|
8
8
|
|
|
@@ -354,6 +354,13 @@ declare function sortRows<T extends Record<string, FieldValue | undefined>>(rows
|
|
|
354
354
|
* getNestedValue(data, "company.missing"); // => undefined
|
|
355
355
|
*/
|
|
356
356
|
declare function getNestedValue(obj: EventPayload | Record<string, FieldValue | undefined> | null | undefined, path: string): FieldValue | undefined;
|
|
357
|
+
/**
|
|
358
|
+
* Resolve a field value that may be a raw URL string (legacy `image`/`url` fields) or a
|
|
359
|
+
* structured `file`-typed {@link FileValue} into the URL an `<img src>` can use. Gallery/card
|
|
360
|
+
* grid image tiles only ever rendered the raw-string case before the file-type promotion —
|
|
361
|
+
* this keeps them working once a field is retyped to `file`.
|
|
362
|
+
*/
|
|
363
|
+
declare function resolveImageUrl(value: FieldValue | undefined): string | undefined;
|
|
357
364
|
/**
|
|
358
365
|
* Format a nested field path as a human-readable label.
|
|
359
366
|
*
|
|
@@ -551,4 +558,4 @@ declare function eightPointedStarPath(cx: number, cy: number, outerR: number, in
|
|
|
551
558
|
*/
|
|
552
559
|
declare function arrowheadPath(size: number): string;
|
|
553
560
|
|
|
554
|
-
export { ApiError, type DebugEvent, type DebugEventType, type EntitySnapshot, type EntityState, type GuardContext, type GuardEvaluation, JAZARI_COLORS, type JazariArmLayout, type JazariEffectInfo, type JazariGearLayout, type JazariGuardInfo, type JazariLayout, type LayoutInput, type LayoutState, type LayoutTransition, type PersistentEntityInfo, type RuntimeEntity, type SortDirection, type TickExecution, type TraitDebugInfo, type TraitGuard, type TraitTransition, type ValueFormat, apiClient, arrowheadPath, brainIconPath, clearDebugEvents, clearEntityProvider, clearGuardHistory, clearTicks, clearTraits, compareCellValues, computeJazariLayout, debug, debugCollision, debugError, debugGameState, debugGroup, debugGroupEnd, debugInput, debugPhysics, debugTable, debugTime, debugTimeEnd, debugWarn, eightPointedStarPath, formatDate, formatDateTime, formatNestedFieldLabel, formatTime, formatValue, gearTeethPath, getAllTicks, getAllTraits, getDebugEvents, getEntitiesByType, getEntityById, getEntitySnapshot, getEventsBySource, getEventsByType, getGuardEvaluationsForTrait, getGuardHistory, getNestedValue, getRecentEvents, getRecentGuardEvaluations, getTick, getTrait, humanizeEnumValue, humanizeFieldName, initDebugShortcut, isDebugEnabled, lockIconPath, logDebugEvent, logEffectExecuted, logError, logEventFired, logInfo, logStateChange, logWarning, onDebugToggle, pipeIconPath, recordGuardEvaluation, registerTick, registerTrait, setDebugEnabled, setEntityProvider, setTickActive, sortRows, subscribeToDebugEvents, subscribeToGuardChanges, subscribeToTickChanges, subscribeToTraitChanges, toggleDebug, unregisterTick, unregisterTrait, updateGuardResult, updateTickExecution, updateTraitState };
|
|
561
|
+
export { ApiError, type DebugEvent, type DebugEventType, type EntitySnapshot, type EntityState, type GuardContext, type GuardEvaluation, JAZARI_COLORS, type JazariArmLayout, type JazariEffectInfo, type JazariGearLayout, type JazariGuardInfo, type JazariLayout, type LayoutInput, type LayoutState, type LayoutTransition, type PersistentEntityInfo, type RuntimeEntity, type SortDirection, type TickExecution, type TraitDebugInfo, type TraitGuard, type TraitTransition, type ValueFormat, apiClient, arrowheadPath, brainIconPath, clearDebugEvents, clearEntityProvider, clearGuardHistory, clearTicks, clearTraits, compareCellValues, computeJazariLayout, debug, debugCollision, debugError, debugGameState, debugGroup, debugGroupEnd, debugInput, debugPhysics, debugTable, debugTime, debugTimeEnd, debugWarn, eightPointedStarPath, formatDate, formatDateTime, formatNestedFieldLabel, formatTime, formatValue, gearTeethPath, getAllTicks, getAllTraits, getDebugEvents, getEntitiesByType, getEntityById, getEntitySnapshot, getEventsBySource, getEventsByType, getGuardEvaluationsForTrait, getGuardHistory, getNestedValue, getRecentEvents, getRecentGuardEvaluations, getTick, getTrait, humanizeEnumValue, humanizeFieldName, initDebugShortcut, isDebugEnabled, lockIconPath, logDebugEvent, logEffectExecuted, logError, logEventFired, logInfo, logStateChange, logWarning, onDebugToggle, pipeIconPath, recordGuardEvaluation, registerTick, registerTrait, resolveImageUrl, setDebugEnabled, setEntityProvider, setTickActive, sortRows, subscribeToDebugEvents, subscribeToGuardChanges, subscribeToTickChanges, subscribeToTraitChanges, toggleDebug, unregisterTick, unregisterTrait, updateGuardResult, updateTickExecution, updateTraitState };
|
package/dist/lib/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { C as ContentSegment, D as DEFAULT_CONFIG, a as DomEntityBox, b as DomLayoutData, c as DomOutputsBox, d as DomStateNode, e as DomTransitionLabel, f as DomTransitionPath, E as EntityDefinition, L as LessonSegment, R as RenderOptions, S as StateDefinition, g as StateMachineDefinition, T as TraitSnapshotGetter, h as TransitionDefinition, V as VisualizerConfig, i as bindCanvasCapture, j as bindEventBus, k as bindLastDrawables, l as bindTraitStateGetter, m as clearVerification, n as cn, o as extractOutputsFromTransitions, p as extractStateMachine, q as formatGuard, r as getAllChecks, s as getBridgeHealth, t as getEffectSummary, u as getSnapshot, v as getSummary, w as getTraitSnapshots, x as getTransitions, y as getTransitionsForTrait, z as parseContentSegments, A as parseLessonSegments, B as parseMarkdownWithCodeBlocks, F as recordServerResponse, G as recordTransition, H as registerCheck, I as registerTraitSnapshot, J as renderStateMachineToDomData, K as renderStateMachineToSvg, M as subscribeToVerification, N as updateAssetStatus, O as updateBridgeHealth, P as updateCheck, Q as waitForTransition } from '../cn-
|
|
1
|
+
export { C as ContentSegment, D as DEFAULT_CONFIG, a as DomEntityBox, b as DomLayoutData, c as DomOutputsBox, d as DomStateNode, e as DomTransitionLabel, f as DomTransitionPath, E as EntityDefinition, L as LessonSegment, R as RenderOptions, S as StateDefinition, g as StateMachineDefinition, T as TraitSnapshotGetter, h as TransitionDefinition, V as VisualizerConfig, i as bindCanvasCapture, j as bindEventBus, k as bindLastDrawables, l as bindTraitStateGetter, m as clearVerification, n as cn, o as extractOutputsFromTransitions, p as extractStateMachine, q as formatGuard, r as getAllChecks, s as getBridgeHealth, t as getEffectSummary, u as getSnapshot, v as getSummary, w as getTraitSnapshots, x as getTransitions, y as getTransitionsForTrait, z as parseContentSegments, A as parseLessonSegments, B as parseMarkdownWithCodeBlocks, F as recordServerResponse, G as recordTransition, H as registerCheck, I as registerTraitSnapshot, J as renderStateMachineToDomData, K as renderStateMachineToSvg, M as subscribeToVerification, N as updateAssetStatus, O as updateBridgeHealth, P as updateCheck, Q as waitForTransition } from '../cn-CFurBb2q.js';
|
|
2
2
|
import { FieldValue, EntityRow, EventPayload } from '@almadar/core';
|
|
3
3
|
export { AssetLoadStatus, BridgeHealth, CheckStatus, EffectTrace, EventLogEntry, OrbitalVerificationAPI, ServerResponseTrace, TraitStateSnapshot, TransitionTrace, VerificationCheck, VerificationSnapshot, VerificationSummary } from '@almadar/core';
|
|
4
4
|
import 'react';
|
|
5
|
-
import '../paintDispatch-
|
|
5
|
+
import '../paintDispatch-B5n2DTB-.js';
|
|
6
6
|
import '../types-B3nHgnMG.js';
|
|
7
7
|
import 'clsx';
|
|
8
8
|
|
|
@@ -354,6 +354,13 @@ declare function sortRows<T extends Record<string, FieldValue | undefined>>(rows
|
|
|
354
354
|
* getNestedValue(data, "company.missing"); // => undefined
|
|
355
355
|
*/
|
|
356
356
|
declare function getNestedValue(obj: EventPayload | Record<string, FieldValue | undefined> | null | undefined, path: string): FieldValue | undefined;
|
|
357
|
+
/**
|
|
358
|
+
* Resolve a field value that may be a raw URL string (legacy `image`/`url` fields) or a
|
|
359
|
+
* structured `file`-typed {@link FileValue} into the URL an `<img src>` can use. Gallery/card
|
|
360
|
+
* grid image tiles only ever rendered the raw-string case before the file-type promotion —
|
|
361
|
+
* this keeps them working once a field is retyped to `file`.
|
|
362
|
+
*/
|
|
363
|
+
declare function resolveImageUrl(value: FieldValue | undefined): string | undefined;
|
|
357
364
|
/**
|
|
358
365
|
* Format a nested field path as a human-readable label.
|
|
359
366
|
*
|
|
@@ -551,4 +558,4 @@ declare function eightPointedStarPath(cx: number, cy: number, outerR: number, in
|
|
|
551
558
|
*/
|
|
552
559
|
declare function arrowheadPath(size: number): string;
|
|
553
560
|
|
|
554
|
-
export { ApiError, type DebugEvent, type DebugEventType, type EntitySnapshot, type EntityState, type GuardContext, type GuardEvaluation, JAZARI_COLORS, type JazariArmLayout, type JazariEffectInfo, type JazariGearLayout, type JazariGuardInfo, type JazariLayout, type LayoutInput, type LayoutState, type LayoutTransition, type PersistentEntityInfo, type RuntimeEntity, type SortDirection, type TickExecution, type TraitDebugInfo, type TraitGuard, type TraitTransition, type ValueFormat, apiClient, arrowheadPath, brainIconPath, clearDebugEvents, clearEntityProvider, clearGuardHistory, clearTicks, clearTraits, compareCellValues, computeJazariLayout, debug, debugCollision, debugError, debugGameState, debugGroup, debugGroupEnd, debugInput, debugPhysics, debugTable, debugTime, debugTimeEnd, debugWarn, eightPointedStarPath, formatDate, formatDateTime, formatNestedFieldLabel, formatTime, formatValue, gearTeethPath, getAllTicks, getAllTraits, getDebugEvents, getEntitiesByType, getEntityById, getEntitySnapshot, getEventsBySource, getEventsByType, getGuardEvaluationsForTrait, getGuardHistory, getNestedValue, getRecentEvents, getRecentGuardEvaluations, getTick, getTrait, humanizeEnumValue, humanizeFieldName, initDebugShortcut, isDebugEnabled, lockIconPath, logDebugEvent, logEffectExecuted, logError, logEventFired, logInfo, logStateChange, logWarning, onDebugToggle, pipeIconPath, recordGuardEvaluation, registerTick, registerTrait, setDebugEnabled, setEntityProvider, setTickActive, sortRows, subscribeToDebugEvents, subscribeToGuardChanges, subscribeToTickChanges, subscribeToTraitChanges, toggleDebug, unregisterTick, unregisterTrait, updateGuardResult, updateTickExecution, updateTraitState };
|
|
561
|
+
export { ApiError, type DebugEvent, type DebugEventType, type EntitySnapshot, type EntityState, type GuardContext, type GuardEvaluation, JAZARI_COLORS, type JazariArmLayout, type JazariEffectInfo, type JazariGearLayout, type JazariGuardInfo, type JazariLayout, type LayoutInput, type LayoutState, type LayoutTransition, type PersistentEntityInfo, type RuntimeEntity, type SortDirection, type TickExecution, type TraitDebugInfo, type TraitGuard, type TraitTransition, type ValueFormat, apiClient, arrowheadPath, brainIconPath, clearDebugEvents, clearEntityProvider, clearGuardHistory, clearTicks, clearTraits, compareCellValues, computeJazariLayout, debug, debugCollision, debugError, debugGameState, debugGroup, debugGroupEnd, debugInput, debugPhysics, debugTable, debugTime, debugTimeEnd, debugWarn, eightPointedStarPath, formatDate, formatDateTime, formatNestedFieldLabel, formatTime, formatValue, gearTeethPath, getAllTicks, getAllTraits, getDebugEvents, getEntitiesByType, getEntityById, getEntitySnapshot, getEventsBySource, getEventsByType, getGuardEvaluationsForTrait, getGuardHistory, getNestedValue, getRecentEvents, getRecentGuardEvaluations, getTick, getTrait, humanizeEnumValue, humanizeFieldName, initDebugShortcut, isDebugEnabled, lockIconPath, logDebugEvent, logEffectExecuted, logError, logEventFired, logInfo, logStateChange, logWarning, onDebugToggle, pipeIconPath, recordGuardEvaluation, registerTick, registerTrait, resolveImageUrl, setDebugEnabled, setEntityProvider, setTickActive, sortRows, subscribeToDebugEvents, subscribeToGuardChanges, subscribeToTickChanges, subscribeToTraitChanges, toggleDebug, unregisterTick, unregisterTrait, updateGuardResult, updateTickExecution, updateTraitState };
|