@almadar/ui 2.17.0 → 2.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/components/index.cjs +1004 -1000
- package/dist/components/index.js +143 -139
- package/dist/components/organisms/game/three/index.cjs +121 -123
- package/dist/components/organisms/game/three/index.js +4 -6
- package/dist/hooks/index.cjs +221 -223
- package/dist/hooks/index.js +3 -5
- package/dist/marketing/index.cjs +8 -2
- package/dist/marketing/index.js +8 -2
- package/dist/providers/EventBusProvider.d.ts +2 -8
- package/dist/providers/index.cjs +5 -4
- package/dist/providers/index.js +4 -3
- package/dist/runtime/OrbPreview.d.ts +39 -0
- package/dist/runtime/index.cjs +139 -2
- package/dist/runtime/index.d.ts +1 -0
- package/dist/runtime/index.js +138 -2
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React7, { forwardRef, useRef, useEffect, useImperativeHandle, useState, useMemo, useCallback, Component, useContext } from 'react';
|
|
2
2
|
import { useThree, useFrame, Canvas } from '@react-three/fiber';
|
|
3
3
|
import * as THREE6 from 'three';
|
|
4
4
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
@@ -7,6 +7,7 @@ import { GLTFLoader as GLTFLoader$1 } from 'three/examples/jsm/loaders/GLTFLoade
|
|
|
7
7
|
import { OrbitControls as OrbitControls$1 } from 'three/examples/jsm/controls/OrbitControls.js';
|
|
8
8
|
import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js';
|
|
9
9
|
import { OBJLoader } from 'three/examples/jsm/loaders/OBJLoader.js';
|
|
10
|
+
import { EventBusContext } from '@almadar/ui/providers';
|
|
10
11
|
import { clsx } from 'clsx';
|
|
11
12
|
import { twMerge } from 'tailwind-merge';
|
|
12
13
|
|
|
@@ -1348,9 +1349,6 @@ function useRaycaster(options) {
|
|
|
1348
1349
|
isWithinCanvas
|
|
1349
1350
|
};
|
|
1350
1351
|
}
|
|
1351
|
-
var EventBusContext = createContext(null);
|
|
1352
|
-
|
|
1353
|
-
// hooks/useEventBus.ts
|
|
1354
1352
|
function getGlobalEventBus() {
|
|
1355
1353
|
if (typeof window !== "undefined") {
|
|
1356
1354
|
return window.__kflowEventBus ?? null;
|
|
@@ -1818,7 +1816,7 @@ function UnitRenderer({
|
|
|
1818
1816
|
onAnimationStateChange,
|
|
1819
1817
|
animationSpeed = 1
|
|
1820
1818
|
}) {
|
|
1821
|
-
const handleUnitClick =
|
|
1819
|
+
const handleUnitClick = React7.useCallback(
|
|
1822
1820
|
(unit) => {
|
|
1823
1821
|
onUnitClick?.(unit);
|
|
1824
1822
|
},
|
|
@@ -2797,7 +2795,7 @@ var positionStyles = {
|
|
|
2797
2795
|
fixed: "fixed",
|
|
2798
2796
|
sticky: "sticky"
|
|
2799
2797
|
};
|
|
2800
|
-
var Box =
|
|
2798
|
+
var Box = React7.forwardRef(
|
|
2801
2799
|
({
|
|
2802
2800
|
padding,
|
|
2803
2801
|
paddingX,
|