@almadar/ui 5.18.0 → 5.19.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/avl/index.cjs +7432 -7675
- package/dist/avl/index.d.cts +8 -0
- package/dist/avl/index.js +6297 -6540
- package/dist/components/atoms/DayCell.d.ts +3 -2
- package/dist/components/index.cjs +7640 -7877
- package/dist/components/index.js +6691 -6925
- package/dist/components/{organisms → molecules}/ContentRenderer.d.ts +1 -1
- package/dist/components/{organisms → molecules}/FormSection.d.ts +1 -1
- package/dist/components/molecules/avl/ModuleCard.d.ts +8 -0
- package/dist/components/molecules/index.d.ts +17 -1
- package/dist/components/organisms/game/GameAudioProvider.d.ts +6 -0
- package/dist/components/organisms/game/GameAudioToggle.d.ts +4 -2
- package/dist/components/organisms/game/three/index.cjs +180 -172
- package/dist/components/organisms/game/three/index.js +18 -10
- package/dist/components/organisms/game/three/renderers/FeatureRenderer.d.ts +7 -13
- package/dist/components/organisms/index.d.ts +0 -18
- package/dist/providers/index.cjs +7024 -7275
- package/dist/providers/index.js +6259 -6510
- package/dist/runtime/index.cjs +7063 -7314
- package/dist/runtime/index.js +6262 -6513
- package/package.json +3 -3
- package/dist/components/molecules/CodeExample.d.ts +0 -23
- package/dist/components/organisms/Meter.d.ts +0 -59
- package/dist/components/organisms/Table.d.ts +0 -100
- /package/dist/components/{organisms → molecules}/Chart.d.ts +0 -0
- /package/dist/components/{organisms → molecules}/CodeViewer.d.ts +0 -0
- /package/dist/components/{organisms → molecules}/ConfirmDialog.d.ts +0 -0
- /package/dist/components/{organisms → molecules}/DocumentViewer.d.ts +0 -0
- /package/dist/components/{organisms → molecules}/GraphCanvas.d.ts +0 -0
- /package/dist/components/{organisms → molecules}/Header.d.ts +0 -0
- /package/dist/components/{organisms → molecules}/JazariStateMachine.d.ts +0 -0
- /package/dist/components/{organisms → molecules}/Navigation.d.ts +0 -0
- /package/dist/components/{organisms → molecules}/OrbitalVisualization.d.ts +0 -0
- /package/dist/components/{organisms → molecules}/PageHeader.d.ts +0 -0
- /package/dist/components/{organisms → molecules}/Section.d.ts +0 -0
- /package/dist/components/{organisms → molecules}/Sidebar.d.ts +0 -0
- /package/dist/components/{organisms → molecules}/SignaturePad.d.ts +0 -0
- /package/dist/components/{organisms → molecules}/Split.d.ts +0 -0
- /package/dist/components/{organisms → molecules}/WizardContainer.d.ts +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { useThree, useFrame, Canvas } from '@react-three/fiber';
|
|
1
|
+
import React11, { forwardRef, useRef, useEffect, useImperativeHandle, useState, useMemo, useCallback, createContext, Component, useContext, useReducer } from 'react';
|
|
2
|
+
import { useThree, useFrame, Canvas, context } from '@react-three/fiber';
|
|
3
3
|
import * as THREE6 from 'three';
|
|
4
4
|
import { Vector3, QuadraticBezierCurve3, MathUtils, Quaternion } from 'three';
|
|
5
5
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
@@ -1862,7 +1862,7 @@ function UnitRenderer({
|
|
|
1862
1862
|
onAnimationStateChange,
|
|
1863
1863
|
animationSpeed = 1
|
|
1864
1864
|
}) {
|
|
1865
|
-
const handleUnitClick =
|
|
1865
|
+
const handleUnitClick = React11.useCallback(
|
|
1866
1866
|
(unit) => {
|
|
1867
1867
|
onUnitClick?.(unit);
|
|
1868
1868
|
},
|
|
@@ -2039,15 +2039,14 @@ function FeatureVisual({
|
|
|
2039
2039
|
}
|
|
2040
2040
|
);
|
|
2041
2041
|
}
|
|
2042
|
-
function
|
|
2042
|
+
function FeatureGroup({
|
|
2043
2043
|
features,
|
|
2044
2044
|
cellSize = 1,
|
|
2045
2045
|
offsetX = 0,
|
|
2046
2046
|
offsetZ = 0,
|
|
2047
2047
|
onFeatureClick,
|
|
2048
2048
|
onFeatureHover,
|
|
2049
|
-
selectedFeatureIds = []
|
|
2050
|
-
featureColors
|
|
2049
|
+
selectedFeatureIds = []
|
|
2051
2050
|
}) {
|
|
2052
2051
|
return /* @__PURE__ */ jsx("group", { children: features.map((feature) => {
|
|
2053
2052
|
const x = (feature.x - offsetX) * cellSize;
|
|
@@ -2067,6 +2066,15 @@ function FeatureRenderer({
|
|
|
2067
2066
|
);
|
|
2068
2067
|
}) });
|
|
2069
2068
|
}
|
|
2069
|
+
function FeatureRenderer(props) {
|
|
2070
|
+
const insideCanvas = useContext(context) != null;
|
|
2071
|
+
if (insideCanvas) return /* @__PURE__ */ jsx(FeatureGroup, { ...props });
|
|
2072
|
+
return /* @__PURE__ */ jsxs(Canvas, { camera: { position: [4, 4, 6], fov: 50 }, style: { width: "100%", height: 360 }, children: [
|
|
2073
|
+
/* @__PURE__ */ jsx("ambientLight", { intensity: 0.6 }),
|
|
2074
|
+
/* @__PURE__ */ jsx("directionalLight", { position: [5, 8, 5], intensity: 0.8 }),
|
|
2075
|
+
/* @__PURE__ */ jsx(FeatureGroup, { ...props })
|
|
2076
|
+
] });
|
|
2077
|
+
}
|
|
2070
2078
|
var log5 = createLogger("almadar:ui:game:feature-renderer");
|
|
2071
2079
|
function detectAssetRoot3(modelUrl) {
|
|
2072
2080
|
const idx = modelUrl.indexOf("/3d/");
|
|
@@ -2844,7 +2852,7 @@ var positionStyles = {
|
|
|
2844
2852
|
fixed: "fixed",
|
|
2845
2853
|
sticky: "sticky"
|
|
2846
2854
|
};
|
|
2847
|
-
var Box =
|
|
2855
|
+
var Box = React11.forwardRef(
|
|
2848
2856
|
({
|
|
2849
2857
|
padding,
|
|
2850
2858
|
paddingX,
|
|
@@ -2894,7 +2902,7 @@ var Box = React10.forwardRef(
|
|
|
2894
2902
|
onMouseLeave?.(e);
|
|
2895
2903
|
}, [hoverEvent, eventBus, onMouseLeave]);
|
|
2896
2904
|
const isClickable = action || onClick;
|
|
2897
|
-
return
|
|
2905
|
+
return React11.createElement(
|
|
2898
2906
|
Component2,
|
|
2899
2907
|
{
|
|
2900
2908
|
ref,
|
|
@@ -5637,7 +5645,7 @@ var Avl3DViewer = ({
|
|
|
5637
5645
|
const handleTraitClick = useCallback((name) => {
|
|
5638
5646
|
dispatch({ type: "ZOOM_INTO_TRAIT", trait: name, targetPosition: { x: 0, y: 0 } });
|
|
5639
5647
|
}, []);
|
|
5640
|
-
const [highlightedTrait, setHighlightedTrait] =
|
|
5648
|
+
const [highlightedTrait, setHighlightedTrait] = React11.useState(null);
|
|
5641
5649
|
const handleTransitionClick = useCallback((index) => {
|
|
5642
5650
|
dispatch({ type: "ZOOM_INTO_TRANSITION", transitionIndex: index, targetPosition: { x: 0, y: 0 } });
|
|
5643
5651
|
}, []);
|
|
@@ -5724,7 +5732,7 @@ var Avl3DViewer = ({
|
|
|
5724
5732
|
gap: "xs",
|
|
5725
5733
|
align: "center",
|
|
5726
5734
|
className: "absolute top-2 left-2 z-10 bg-surface/80 backdrop-blur rounded-md px-3 py-1.5",
|
|
5727
|
-
children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(
|
|
5735
|
+
children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(React11.Fragment, { children: [
|
|
5728
5736
|
i > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", className: "mx-1", children: "/" }),
|
|
5729
5737
|
i < breadcrumbs.length - 1 ? /* @__PURE__ */ jsx(
|
|
5730
5738
|
Box,
|
|
@@ -27,18 +27,12 @@ export interface FeatureRendererProps {
|
|
|
27
27
|
featureColors?: Record<string, string>;
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
|
-
* FeatureRenderer
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
* <FeatureRenderer
|
|
37
|
-
* features={features}
|
|
38
|
-
* cellSize={1}
|
|
39
|
-
* onFeatureClick={handleFeatureClick}
|
|
40
|
-
* />
|
|
41
|
-
* ```
|
|
30
|
+
* Self-contained FeatureRenderer. three.js geometry only renders inside an
|
|
31
|
+
* `@react-three/fiber` `<Canvas>`. When already inside one (the fiber context is
|
|
32
|
+
* set) it renders the raw group; standalone it bundles a default `<Canvas>`
|
|
33
|
+
* (camera + lighting) so it shows on its own. The Canvas is an implementation
|
|
34
|
+
* detail, and the conditional check keeps it composable inside a larger scene
|
|
35
|
+
* (no nested Canvas).
|
|
42
36
|
*/
|
|
43
|
-
export declare function FeatureRenderer(
|
|
37
|
+
export declare function FeatureRenderer(props: FeatureRendererProps): React.JSX.Element;
|
|
44
38
|
export default FeatureRenderer;
|
|
@@ -1,25 +1,12 @@
|
|
|
1
1
|
export { type EntityDisplayProps, type UiError, EntityDisplayEvents, type SortPayload, type PaginatePayload, type SearchPayload, type FilterPayload, type SelectPayload, } from "./types";
|
|
2
2
|
export { DataTable, type DataTableProps, type Column, type RowAction, } from "./DataTable";
|
|
3
3
|
export { StatCard, type StatCardProps } from "./StatCard";
|
|
4
|
-
export { PageHeader, type PageHeaderProps, type PageBreadcrumb, } from "./PageHeader";
|
|
5
4
|
export { DetailPanel, type DetailPanelProps, type DetailField, type DetailSection, } from "./DetailPanel";
|
|
6
|
-
export { FormSection, FormLayout, FormActions, type FormSectionProps, type FormLayoutProps, type FormActionsProps, } from "./FormSection";
|
|
7
5
|
export { Form, type FormProps } from "./Form";
|
|
8
|
-
export { Header, type HeaderProps } from "./Header";
|
|
9
|
-
export { Navigation, type NavigationProps, type NavigationItem, } from "./Navigation";
|
|
10
|
-
export { Section, type SectionProps } from "./Section";
|
|
11
|
-
export { Sidebar, type SidebarProps, type SidebarItem } from "./Sidebar";
|
|
12
|
-
export { Split, type SplitProps } from "./Split";
|
|
13
|
-
export { Table, type TableProps, type TableColumn, type SortDirection, } from "./Table";
|
|
14
6
|
export { List, type ListProps, type ListItem } from "./List";
|
|
15
7
|
export { CardGrid, type CardGridProps, type CardGridGap } from "./CardGrid";
|
|
16
8
|
export { MasterDetail, type MasterDetailProps } from "./MasterDetail";
|
|
17
|
-
export { ConfirmDialog, type ConfirmDialogProps, type ConfirmDialogVariant, } from "./ConfirmDialog";
|
|
18
|
-
export { WizardContainer, type WizardContainerProps, type WizardStep, } from "./WizardContainer";
|
|
19
|
-
export { OrbitalVisualization, type OrbitalVisualizationProps, } from "./OrbitalVisualization";
|
|
20
9
|
export { StateMachineView, DomStateMachineVisualizer, OrbitalStateMachineView, type StateMachineViewProps, type TransitionBundle, } from "./StateMachineView";
|
|
21
|
-
export { JazariStateMachine, type JazariStateMachineProps, } from "./JazariStateMachine";
|
|
22
|
-
export { ContentRenderer, type ContentRendererProps, } from "./ContentRenderer";
|
|
23
10
|
export * from "./book";
|
|
24
11
|
export * from "./layout";
|
|
25
12
|
export * from "./game";
|
|
@@ -28,13 +15,8 @@ export { ModalSlot, type ModalSlotProps } from "./ModalSlot";
|
|
|
28
15
|
export { DrawerSlot, type DrawerSlotProps } from "./DrawerSlot";
|
|
29
16
|
export { ToastSlot, type ToastSlotProps } from "./ToastSlot";
|
|
30
17
|
export { NotifyListener } from "./NotifyListener";
|
|
31
|
-
export { Chart, type ChartProps, type ChartType, type ChartSeries, } from "./Chart";
|
|
32
18
|
export { Timeline, type TimelineProps, type TimelineItem, type TimelineItemStatus, } from "./Timeline";
|
|
33
19
|
export { MediaGallery, type MediaGalleryProps, type MediaItem, } from "./MediaGallery";
|
|
34
|
-
export { SignaturePad, type SignaturePadProps, } from "./SignaturePad";
|
|
35
|
-
export { DocumentViewer, type DocumentViewerProps, type DocumentType, } from "./DocumentViewer";
|
|
36
|
-
export { GraphCanvas, type GraphCanvasProps, type GraphNode, type GraphEdge, } from "./GraphCanvas";
|
|
37
|
-
export { CodeViewer, type CodeViewerProps, type CodeViewerMode, type DiffLine, } from "./CodeViewer";
|
|
38
20
|
export { RuntimeDebugger, type RuntimeDebuggerProps, } from "./debug";
|
|
39
21
|
export type { MarketingAction, MarketingImage, HeroEntity, FeatureEntity, PricingPlanEntity, StatEntity, StepEntity, ShowcaseEntity, TeamMemberEntity, CaseStudyEntity, } from "./marketing-types";
|
|
40
22
|
export { HeroOrganism, type HeroOrganismProps, } from "./HeroOrganism";
|