@almadar/ui 2.5.0 → 2.6.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/{chunk-42WRQA7T.js → chunk-2QM732NQ.js} +46 -3
- package/dist/{chunk-YLKXEXBP.js → chunk-DKQN5FVU.js} +24 -24
- package/dist/{chunk-FYYU3CHN.js → chunk-LEWQP2UP.js} +2538 -430
- package/dist/{chunk-GOZKH7QW.js → chunk-WGJIL4YR.js} +267 -2
- package/dist/components/index.d.ts +419 -7
- package/dist/components/index.js +84 -73
- package/dist/context/index.js +2 -2
- package/dist/hooks/index.d.ts +133 -3
- package/dist/hooks/index.js +2 -2
- package/dist/providers/index.js +4 -4
- package/package.json +1 -1
package/dist/components/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { useAuthContext } from '../chunk-
|
|
2
|
-
export { ENTITY_EVENTS, useAgentChat, useAuthContext, useCompile, useConnectGitHub, useCreateEntity, useDeepAgentGeneration, useDeleteEntity, useDisconnectGitHub, useEntities, useEntitiesByType, useEntity as useEntityById, useEntityMutations, useExtensions, useFileEditor, useFileSystem, useGitHubBranches, useGitHubRepo, useGitHubRepos, useGitHubStatus, useInput, useOrbitalHistory, useOrbitalMutations, usePhysics, usePlayer, usePreview, useResolvedEntity, useSelectedEntity, useSendOrbitalEvent, useSingletonEntity, useUIEvents, useUpdateEntity, useValidation } from '../chunk-
|
|
1
|
+
import { useAuthContext } from '../chunk-2QM732NQ.js';
|
|
2
|
+
export { ENTITY_EVENTS, useAgentChat, useAuthContext, useCompile, useConnectGitHub, useCreateEntity, useDeepAgentGeneration, useDeleteEntity, useDisconnectGitHub, useEntities, useEntitiesByType, useEntity as useEntityById, useEntityMutations, useExtensions, useFileEditor, useFileSystem, useGitHubBranches, useGitHubRepo, useGitHubRepos, useGitHubStatus, useInput, useOrbitalHistory, useOrbitalMutations, usePhysics, usePinchZoom, usePlayer, usePreview, useResolvedEntity, useSelectedEntity, useSendOrbitalEvent, useSingletonEntity, useUIEvents, useUpdateEntity, useValidation } from '../chunk-2QM732NQ.js';
|
|
3
3
|
import { DEFAULT_CONFIG, renderStateMachineToDomData, parseContentSegments } from '../chunk-N6DJVKZ6.js';
|
|
4
4
|
import '../chunk-3HJHHULT.js';
|
|
5
|
-
import { VStack, HStack, Typography, Button, Icon, Box, Card, Avatar, Badge, SearchInput, Checkbox, Menu as Menu$1, Pagination, LoadingState, EmptyState, Modal, ErrorState, QuizBlock, CodeBlock, ScaledDiagram, MarkdownContent, Divider, ProgressBar,
|
|
6
|
-
export { Accordion, ActionButtons, Card2 as ActionCard, Alert, Avatar, Badge, Box, Breadcrumb, Button, ButtonGroup, CalendarGrid, Card, CardBody, CardContent, CardFooter, CardGrid, CardHeader, CardTitle, Center, ChartLegend, Checkbox, CodeBlock, ConditionalWrapper, Container, ControlButton, DPad, DataGrid, DataList, DataTable, DateRangeSelector, DayCell, DetailPanel, Divider, Drawer, EmptyState, EntityDisplayEvents, ErrorBoundary, ErrorState, FilterGroup, Flex, FlipCard, FlipContainer, FloatingActionButton, Form, FormField, FormSectionHeader, GraphView, Grid, HStack, Heading, HealthBar, Icon, Input, InputGroup, Label, LawReferenceTooltip, LineChart, LoadingState, MapView, MarkdownContent, MasterDetail, Menu, Modal, Overlay, PageHeader, Pagination, Popover, ProgressBar, ProgressDots, QuizBlock, Radio, RelationSelect, RepeatableFormSection, ScaledDiagram, ScoreDisplay, SearchInput, Select, SidePanel, SimpleGrid, Skeleton, SlotContentRenderer, Spacer, Spinner, Sprite, Stack, StatBadge, StatCard, StateIndicator, Switch, Tabs, Text, TextHighlight, Textarea, ThemeSelector, ThemeToggle, TimeSlotCell, Toast, Tooltip, Typography, UISlotComponent, UISlotRenderer, VStack, ViolationAlert, WizardNavigation, WizardProgress, drawSprite } from '../chunk-
|
|
7
|
-
import '../chunk-
|
|
8
|
-
import { useTranslate } from '../chunk-
|
|
9
|
-
export { EntityDataProvider, I18nProvider, createTranslate, entityDataKeys, parseQueryBinding, useEntity, useEntityDataAdapter, useEntityDetail, useEntityList, useEntityListSuspense, useEntitySuspense, useQuerySingleton, useTranslate } from '../chunk-
|
|
5
|
+
import { VStack, HStack, Typography, Button, Icon, Box, Card, Avatar, Badge, SearchInput, Checkbox, Menu as Menu$1, Pagination, LoadingState, EmptyState, Modal, ErrorState, QuizBlock, CodeBlock, ScaledDiagram, MarkdownContent, Divider, ProgressBar, Stack, StatBadge, Select, Drawer, Toast, Tabs, Input, ThemeToggle, EntityDisplayEvents, StateIndicator, Container } from '../chunk-LEWQP2UP.js';
|
|
6
|
+
export { Accordion, ActionButtons, Card2 as ActionCard, Alert, AnimatedCounter, Avatar, Badge, Box, Breadcrumb, Button, ButtonGroup, CalendarGrid, Card, CardBody, CardContent, CardFooter, CardGrid, CardHeader, CardTitle, Carousel, Center, ChartLegend, Checkbox, CodeBlock, ConditionalWrapper, ConfettiEffect, Container, ControlButton, DPad, DataGrid, DataList, DataTable, DateRangeSelector, DayCell, DetailPanel, Divider, Drawer, EmptyState, EntityDisplayEvents, ErrorBoundary, ErrorState, FilterGroup, Flex, FlipCard, FlipContainer, FloatingActionButton, Form, FormField, FormSectionHeader, GraphView, Grid, HStack, Heading, HealthBar, Icon, InfiniteScrollSentinel, Input, InputGroup, Label, LawReferenceTooltip, Lightbox, LineChart, LoadingState, MapView, MarkdownContent, MasterDetail, Menu, Modal, NumberStepper, Overlay, PageHeader, Pagination, Popover, ProgressBar, ProgressDots, PullToRefresh, QuizBlock, Radio, RangeSlider, RelationSelect, RepeatableFormSection, ScaledDiagram, ScoreDisplay, SearchInput, Select, SidePanel, SimpleGrid, Skeleton, SlotContentRenderer, SortableList, Spacer, Spinner, Sprite, Stack, StarRating, StatBadge, StatCard, StateIndicator, StatusDot, SwipeableRow, Switch, Tabs, Text, TextHighlight, Textarea, ThemeSelector, ThemeToggle, TimeSlotCell, Toast, Tooltip, TrendIndicator, TypewriterText, Typography, UISlotComponent, UISlotRenderer, UploadDropZone, VStack, ViolationAlert, WizardNavigation, WizardProgress, drawSprite } from '../chunk-LEWQP2UP.js';
|
|
7
|
+
import '../chunk-DKQN5FVU.js';
|
|
8
|
+
import { useTranslate } from '../chunk-WGJIL4YR.js';
|
|
9
|
+
export { EntityDataProvider, I18nProvider, createTranslate, entityDataKeys, parseQueryBinding, useDragReorder, useEntity, useEntityDataAdapter, useEntityDetail, useEntityList, useEntityListSuspense, useEntitySuspense, useInfiniteScroll, useLongPress, usePullToRefresh, useQuerySingleton, useSwipeGesture, useTranslate } from '../chunk-WGJIL4YR.js';
|
|
10
10
|
import { useEventBus, useEventListener } from '../chunk-YXZM3WCF.js';
|
|
11
11
|
export { useEmitEvent, useEventBus, useEventListener } from '../chunk-YXZM3WCF.js';
|
|
12
12
|
export { DEFAULT_SLOTS, useUISlotManager } from '../chunk-3JGAROCW.js';
|
|
@@ -4529,12 +4529,15 @@ function IsometricCanvas({
|
|
|
4529
4529
|
}
|
|
4530
4530
|
if (sortedTiles.length === 0) {
|
|
4531
4531
|
return /* @__PURE__ */ jsx(
|
|
4532
|
-
|
|
4532
|
+
Box,
|
|
4533
4533
|
{
|
|
4534
|
-
|
|
4535
|
-
|
|
4536
|
-
|
|
4537
|
-
className
|
|
4534
|
+
className: cn("relative w-full overflow-hidden rounded-lg", className),
|
|
4535
|
+
style: { height: viewportSize.height },
|
|
4536
|
+
"data-testid": "game-canvas-empty",
|
|
4537
|
+
children: /* @__PURE__ */ jsx(Box, { className: "flex items-center justify-center h-full bg-slate-800 rounded-lg", children: /* @__PURE__ */ jsxs(Stack, { direction: "vertical", gap: "md", align: "center", children: [
|
|
4538
|
+
/* @__PURE__ */ jsx(Icon, { name: "map", size: "xl" }),
|
|
4539
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body", className: "text-slate-400", children: t("canvas.emptyMessage") || "No map data loaded" })
|
|
4540
|
+
] }) })
|
|
4538
4541
|
}
|
|
4539
4542
|
);
|
|
4540
4543
|
}
|
|
@@ -10756,14 +10759,82 @@ function NegotiatorBoard({
|
|
|
10756
10759
|
);
|
|
10757
10760
|
}
|
|
10758
10761
|
NegotiatorBoard.displayName = "NegotiatorBoard";
|
|
10762
|
+
|
|
10763
|
+
// components/organisms/game/physics-sim/presets/mechanics.ts
|
|
10764
|
+
var projectileMotion = {
|
|
10765
|
+
id: "mechanics-projectile",
|
|
10766
|
+
name: "Projectile Motion",
|
|
10767
|
+
description: "Launch a ball and observe parabolic trajectory under gravity.",
|
|
10768
|
+
domain: "natural",
|
|
10769
|
+
gravity: { x: 0, y: 9.81 },
|
|
10770
|
+
bodies: [
|
|
10771
|
+
{ id: "ball", x: 50, y: 350, vx: 80, vy: -120, mass: 1, radius: 10, color: "#e94560", fixed: false },
|
|
10772
|
+
{ id: "ground", x: 300, y: 390, vx: 0, vy: 0, mass: 1e3, radius: 400, color: "#333", fixed: true }
|
|
10773
|
+
],
|
|
10774
|
+
showVelocity: true,
|
|
10775
|
+
parameters: {
|
|
10776
|
+
angle: { value: 45, min: 0, max: 90, step: 1, label: "Launch angle (deg)" },
|
|
10777
|
+
velocity: { value: 100, min: 10, max: 200, step: 5, label: "Initial velocity (m/s)" },
|
|
10778
|
+
gravity: { value: 9.81, min: 0, max: 20, step: 0.1, label: "Gravity (m/s\xB2)" }
|
|
10779
|
+
}
|
|
10780
|
+
};
|
|
10781
|
+
var pendulum = {
|
|
10782
|
+
id: "mechanics-pendulum",
|
|
10783
|
+
name: "Simple Pendulum",
|
|
10784
|
+
description: "A mass on a string swinging under gravity.",
|
|
10785
|
+
domain: "natural",
|
|
10786
|
+
gravity: { x: 0, y: 9.81 },
|
|
10787
|
+
bodies: [
|
|
10788
|
+
{ id: "pivot", x: 300, y: 50, vx: 0, vy: 0, mass: 1e3, radius: 5, color: "#888", fixed: true },
|
|
10789
|
+
{ id: "bob", x: 400, y: 200, vx: 0, vy: 0, mass: 5, radius: 15, color: "#e94560", fixed: false }
|
|
10790
|
+
],
|
|
10791
|
+
constraints: [{ bodyA: 0, bodyB: 1, length: 180, stiffness: 1 }],
|
|
10792
|
+
parameters: {
|
|
10793
|
+
length: { value: 180, min: 50, max: 300, step: 10, label: "String length (px)" },
|
|
10794
|
+
mass: { value: 5, min: 1, max: 20, step: 0.5, label: "Mass (kg)" },
|
|
10795
|
+
gravity: { value: 9.81, min: 0, max: 20, step: 0.1, label: "Gravity (m/s\xB2)" }
|
|
10796
|
+
}
|
|
10797
|
+
};
|
|
10798
|
+
var springOscillator = {
|
|
10799
|
+
id: "mechanics-spring",
|
|
10800
|
+
name: "Spring Oscillator",
|
|
10801
|
+
description: "A mass bouncing on a spring \u2014 simple harmonic motion.",
|
|
10802
|
+
domain: "natural",
|
|
10803
|
+
gravity: { x: 0, y: 0 },
|
|
10804
|
+
bodies: [
|
|
10805
|
+
{ id: "anchor", x: 300, y: 50, vx: 0, vy: 0, mass: 1e3, radius: 8, color: "#888", fixed: true },
|
|
10806
|
+
{ id: "mass", x: 300, y: 250, vx: 0, vy: 0, mass: 2, radius: 20, color: "#0f3460", fixed: false }
|
|
10807
|
+
],
|
|
10808
|
+
constraints: [{ bodyA: 0, bodyB: 1, length: 150, stiffness: 0.5 }],
|
|
10809
|
+
parameters: {
|
|
10810
|
+
stiffness: { value: 0.5, min: 0.1, max: 2, step: 0.05, label: "Spring stiffness (k)" },
|
|
10811
|
+
mass: { value: 2, min: 0.5, max: 10, step: 0.5, label: "Mass (kg)" },
|
|
10812
|
+
damping: { value: 0, min: 0, max: 0.5, step: 0.01, label: "Damping" }
|
|
10813
|
+
}
|
|
10814
|
+
};
|
|
10815
|
+
|
|
10816
|
+
// components/organisms/game/physics-sim/presets/index.ts
|
|
10817
|
+
var ALL_PRESETS = [
|
|
10818
|
+
projectileMotion,
|
|
10819
|
+
pendulum,
|
|
10820
|
+
springOscillator
|
|
10821
|
+
];
|
|
10822
|
+
function resolvePreset(preset) {
|
|
10823
|
+
if (typeof preset !== "string") return preset;
|
|
10824
|
+
const needle = preset.toLowerCase();
|
|
10825
|
+
return ALL_PRESETS.find(
|
|
10826
|
+
(p2) => p2.id === preset || p2.id.includes(needle) || p2.name.toLowerCase().includes(needle)
|
|
10827
|
+
) ?? projectileMotion;
|
|
10828
|
+
}
|
|
10759
10829
|
function SimulationCanvas({
|
|
10760
|
-
preset,
|
|
10830
|
+
preset: presetProp,
|
|
10761
10831
|
width = 600,
|
|
10762
10832
|
height = 400,
|
|
10763
10833
|
running,
|
|
10764
10834
|
speed = 1,
|
|
10765
10835
|
className
|
|
10766
10836
|
}) {
|
|
10837
|
+
const preset = useMemo(() => resolvePreset(presetProp), [presetProp]);
|
|
10767
10838
|
const canvasRef = useRef(null);
|
|
10768
10839
|
const bodiesRef = useRef(structuredClone(preset.bodies));
|
|
10769
10840
|
useEffect(() => {
|
|
@@ -10989,66 +11060,6 @@ function SimulationGraph({
|
|
|
10989
11060
|
] }) });
|
|
10990
11061
|
}
|
|
10991
11062
|
SimulationGraph.displayName = "SimulationGraph";
|
|
10992
|
-
|
|
10993
|
-
// components/organisms/game/physics-sim/presets/mechanics.ts
|
|
10994
|
-
var projectileMotion = {
|
|
10995
|
-
id: "mechanics-projectile",
|
|
10996
|
-
name: "Projectile Motion",
|
|
10997
|
-
description: "Launch a ball and observe parabolic trajectory under gravity.",
|
|
10998
|
-
domain: "natural",
|
|
10999
|
-
gravity: { x: 0, y: 9.81 },
|
|
11000
|
-
bodies: [
|
|
11001
|
-
{ id: "ball", x: 50, y: 350, vx: 80, vy: -120, mass: 1, radius: 10, color: "#e94560", fixed: false },
|
|
11002
|
-
{ id: "ground", x: 300, y: 390, vx: 0, vy: 0, mass: 1e3, radius: 400, color: "#333", fixed: true }
|
|
11003
|
-
],
|
|
11004
|
-
showVelocity: true,
|
|
11005
|
-
parameters: {
|
|
11006
|
-
angle: { value: 45, min: 0, max: 90, step: 1, label: "Launch angle (deg)" },
|
|
11007
|
-
velocity: { value: 100, min: 10, max: 200, step: 5, label: "Initial velocity (m/s)" },
|
|
11008
|
-
gravity: { value: 9.81, min: 0, max: 20, step: 0.1, label: "Gravity (m/s\xB2)" }
|
|
11009
|
-
}
|
|
11010
|
-
};
|
|
11011
|
-
var pendulum = {
|
|
11012
|
-
id: "mechanics-pendulum",
|
|
11013
|
-
name: "Simple Pendulum",
|
|
11014
|
-
description: "A mass on a string swinging under gravity.",
|
|
11015
|
-
domain: "natural",
|
|
11016
|
-
gravity: { x: 0, y: 9.81 },
|
|
11017
|
-
bodies: [
|
|
11018
|
-
{ id: "pivot", x: 300, y: 50, vx: 0, vy: 0, mass: 1e3, radius: 5, color: "#888", fixed: true },
|
|
11019
|
-
{ id: "bob", x: 400, y: 200, vx: 0, vy: 0, mass: 5, radius: 15, color: "#e94560", fixed: false }
|
|
11020
|
-
],
|
|
11021
|
-
constraints: [{ bodyA: 0, bodyB: 1, length: 180, stiffness: 1 }],
|
|
11022
|
-
parameters: {
|
|
11023
|
-
length: { value: 180, min: 50, max: 300, step: 10, label: "String length (px)" },
|
|
11024
|
-
mass: { value: 5, min: 1, max: 20, step: 0.5, label: "Mass (kg)" },
|
|
11025
|
-
gravity: { value: 9.81, min: 0, max: 20, step: 0.1, label: "Gravity (m/s\xB2)" }
|
|
11026
|
-
}
|
|
11027
|
-
};
|
|
11028
|
-
var springOscillator = {
|
|
11029
|
-
id: "mechanics-spring",
|
|
11030
|
-
name: "Spring Oscillator",
|
|
11031
|
-
description: "A mass bouncing on a spring \u2014 simple harmonic motion.",
|
|
11032
|
-
domain: "natural",
|
|
11033
|
-
gravity: { x: 0, y: 0 },
|
|
11034
|
-
bodies: [
|
|
11035
|
-
{ id: "anchor", x: 300, y: 50, vx: 0, vy: 0, mass: 1e3, radius: 8, color: "#888", fixed: true },
|
|
11036
|
-
{ id: "mass", x: 300, y: 250, vx: 0, vy: 0, mass: 2, radius: 20, color: "#0f3460", fixed: false }
|
|
11037
|
-
],
|
|
11038
|
-
constraints: [{ bodyA: 0, bodyB: 1, length: 150, stiffness: 0.5 }],
|
|
11039
|
-
parameters: {
|
|
11040
|
-
stiffness: { value: 0.5, min: 0.1, max: 2, step: 0.05, label: "Spring stiffness (k)" },
|
|
11041
|
-
mass: { value: 2, min: 0.5, max: 10, step: 0.5, label: "Mass (kg)" },
|
|
11042
|
-
damping: { value: 0, min: 0, max: 0.5, step: 0.01, label: "Damping" }
|
|
11043
|
-
}
|
|
11044
|
-
};
|
|
11045
|
-
|
|
11046
|
-
// components/organisms/game/physics-sim/presets/index.ts
|
|
11047
|
-
var ALL_PRESETS = [
|
|
11048
|
-
projectileMotion,
|
|
11049
|
-
pendulum,
|
|
11050
|
-
springOscillator
|
|
11051
|
-
];
|
|
11052
11063
|
var eventIcons = {
|
|
11053
11064
|
attack: Sword,
|
|
11054
11065
|
defend: Shield,
|
package/dist/context/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ThemeProvider, useTheme } from '../chunk-
|
|
2
|
-
export { BUILT_IN_THEMES, ThemeContext_default as ThemeContext, ThemeProvider, UISlotContext, UISlotProvider, useSlotContent, useSlotHasContent, useTheme, useUISlots } from '../chunk-
|
|
1
|
+
import { ThemeProvider, useTheme } from '../chunk-DKQN5FVU.js';
|
|
2
|
+
export { BUILT_IN_THEMES, ThemeContext_default as ThemeContext, ThemeProvider, UISlotContext, UISlotProvider, useSlotContent, useSlotHasContent, useTheme, useUISlots } from '../chunk-DKQN5FVU.js';
|
|
3
3
|
import '../chunk-3JGAROCW.js';
|
|
4
4
|
import '../chunk-PKBMQBKP.js';
|
|
5
5
|
import { createContext, useCallback, useMemo, useContext } from 'react';
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { OrbitalSchema } from '@almadar/core';
|
|
|
2
2
|
import { E as EventBusContextType, a as EventListener } from '../event-bus-types-CjJduURa.js';
|
|
3
3
|
export { K as KFlowEvent, U as Unsubscribe } from '../event-bus-types-CjJduURa.js';
|
|
4
4
|
export { D as DEFAULT_SLOTS, R as RenderUIConfig, b as SlotAnimation, c as SlotChangeCallback, S as SlotContent, a as UISlot, U as UISlotManager, u as useUISlotManager } from '../useUISlots-BBjNvQtb.js';
|
|
5
|
-
import * as React from 'react';
|
|
5
|
+
import * as React$1 from 'react';
|
|
6
6
|
import React__default, { ReactNode } from 'react';
|
|
7
7
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
8
8
|
import { Entity, getEntity, getByType, getAllEntities, getSingleton, spawnEntity, updateEntity, updateSingleton, removeEntity, clearEntities } from '../stores/index.js';
|
|
@@ -953,7 +953,7 @@ interface I18nContextValue {
|
|
|
953
953
|
* </I18nProvider>
|
|
954
954
|
* ```
|
|
955
955
|
*/
|
|
956
|
-
declare const I18nProvider: React.Provider<I18nContextValue>;
|
|
956
|
+
declare const I18nProvider: React$1.Provider<I18nContextValue>;
|
|
957
957
|
/**
|
|
958
958
|
* Hook to access the current locale and translate function.
|
|
959
959
|
* Safe to call without a provider — returns passthrough t().
|
|
@@ -1029,6 +1029,136 @@ interface AuthContextValue {
|
|
|
1029
1029
|
*/
|
|
1030
1030
|
declare function useAuthContext(): AuthContextValue;
|
|
1031
1031
|
|
|
1032
|
+
interface SwipeGestureOptions {
|
|
1033
|
+
/** Minimum distance in px to trigger a swipe (default: 50) */
|
|
1034
|
+
threshold?: number;
|
|
1035
|
+
/** Minimum velocity in px/ms to qualify (default: 0.3) */
|
|
1036
|
+
velocityThreshold?: number;
|
|
1037
|
+
/** Prevent default touch behavior during swipe (default: false) */
|
|
1038
|
+
preventDefault?: boolean;
|
|
1039
|
+
}
|
|
1040
|
+
interface SwipeGestureResult {
|
|
1041
|
+
onSwipeLeft?: () => void;
|
|
1042
|
+
onSwipeRight?: () => void;
|
|
1043
|
+
onSwipeUp?: () => void;
|
|
1044
|
+
onSwipeDown?: () => void;
|
|
1045
|
+
}
|
|
1046
|
+
interface SwipeHandlers {
|
|
1047
|
+
onPointerDown: (e: React__default.PointerEvent) => void;
|
|
1048
|
+
onPointerMove: (e: React__default.PointerEvent) => void;
|
|
1049
|
+
onPointerUp: (e: React__default.PointerEvent) => void;
|
|
1050
|
+
onPointerCancel: (e: React__default.PointerEvent) => void;
|
|
1051
|
+
/** Current horizontal offset during swipe (for animation) */
|
|
1052
|
+
offsetX: number;
|
|
1053
|
+
/** Whether a swipe gesture is in progress */
|
|
1054
|
+
isSwiping: boolean;
|
|
1055
|
+
}
|
|
1056
|
+
|
|
1057
|
+
declare function useSwipeGesture(callbacks: SwipeGestureResult, options?: SwipeGestureOptions): SwipeHandlers;
|
|
1058
|
+
|
|
1059
|
+
interface LongPressOptions {
|
|
1060
|
+
/** Hold duration in ms before triggering (default: 500) */
|
|
1061
|
+
duration?: number;
|
|
1062
|
+
/** Movement tolerance in px before canceling (default: 10) */
|
|
1063
|
+
moveThreshold?: number;
|
|
1064
|
+
}
|
|
1065
|
+
interface LongPressHandlers {
|
|
1066
|
+
onPointerDown: (e: React__default.PointerEvent) => void;
|
|
1067
|
+
onPointerMove: (e: React__default.PointerEvent) => void;
|
|
1068
|
+
onPointerUp: () => void;
|
|
1069
|
+
onPointerCancel: () => void;
|
|
1070
|
+
/** Whether the long press is currently active (held down, timer running) */
|
|
1071
|
+
isPressed: boolean;
|
|
1072
|
+
}
|
|
1073
|
+
declare function useLongPress(onLongPress: () => void, options?: LongPressOptions): LongPressHandlers;
|
|
1074
|
+
|
|
1075
|
+
interface DragReorderResult<T> {
|
|
1076
|
+
/** The reordered items array */
|
|
1077
|
+
items: T[];
|
|
1078
|
+
/** Index of the item currently being dragged (-1 if not dragging) */
|
|
1079
|
+
dragIndex: number;
|
|
1080
|
+
/** Index of the drop target (-1 if not over any target) */
|
|
1081
|
+
dragOverIndex: number;
|
|
1082
|
+
/** Whether a drag is in progress */
|
|
1083
|
+
isDragging: boolean;
|
|
1084
|
+
/** Props to spread on the drag handle element for a given index */
|
|
1085
|
+
getDragHandleProps: (index: number) => {
|
|
1086
|
+
onPointerDown: (e: React__default.PointerEvent) => void;
|
|
1087
|
+
style: React__default.CSSProperties;
|
|
1088
|
+
'aria-grabbed': boolean;
|
|
1089
|
+
role: string;
|
|
1090
|
+
};
|
|
1091
|
+
/** Props to spread on each list item for a given index */
|
|
1092
|
+
getItemProps: (index: number) => {
|
|
1093
|
+
onPointerMove: (e: React__default.PointerEvent) => void;
|
|
1094
|
+
onPointerUp: () => void;
|
|
1095
|
+
'aria-dropeffect': string;
|
|
1096
|
+
style: React__default.CSSProperties;
|
|
1097
|
+
};
|
|
1098
|
+
}
|
|
1099
|
+
declare function useDragReorder<T>(initialItems: T[], onReorder: (fromIndex: number, toIndex: number, item: T) => void): DragReorderResult<T>;
|
|
1100
|
+
|
|
1101
|
+
interface InfiniteScrollOptions {
|
|
1102
|
+
/** Root margin for IntersectionObserver (default: "200px") */
|
|
1103
|
+
rootMargin?: string;
|
|
1104
|
+
/** Whether more items are available to load */
|
|
1105
|
+
hasMore?: boolean;
|
|
1106
|
+
/** Whether a load is currently in progress */
|
|
1107
|
+
isLoading?: boolean;
|
|
1108
|
+
}
|
|
1109
|
+
interface InfiniteScrollResult {
|
|
1110
|
+
/** Ref to attach to the sentinel element */
|
|
1111
|
+
sentinelRef: React.RefCallback<HTMLElement>;
|
|
1112
|
+
}
|
|
1113
|
+
declare function useInfiniteScroll(onLoadMore: () => void, options?: InfiniteScrollOptions): InfiniteScrollResult;
|
|
1114
|
+
|
|
1115
|
+
interface PullToRefreshOptions {
|
|
1116
|
+
/** Distance in px to pull before triggering refresh (default: 60) */
|
|
1117
|
+
threshold?: number;
|
|
1118
|
+
/** Maximum pull distance in px (default: 120) */
|
|
1119
|
+
maxPull?: number;
|
|
1120
|
+
}
|
|
1121
|
+
interface PullToRefreshResult {
|
|
1122
|
+
/** Current pull distance in px */
|
|
1123
|
+
pullDistance: number;
|
|
1124
|
+
/** Whether the user is actively pulling */
|
|
1125
|
+
isPulling: boolean;
|
|
1126
|
+
/** Whether a refresh was triggered and is in progress */
|
|
1127
|
+
isRefreshing: boolean;
|
|
1128
|
+
/** Props to spread on the scrollable container */
|
|
1129
|
+
containerProps: {
|
|
1130
|
+
onTouchStart: (e: React__default.TouchEvent) => void;
|
|
1131
|
+
onTouchMove: (e: React__default.TouchEvent) => void;
|
|
1132
|
+
onTouchEnd: () => void;
|
|
1133
|
+
style: React__default.CSSProperties;
|
|
1134
|
+
};
|
|
1135
|
+
/** Call this when the refresh operation completes */
|
|
1136
|
+
endRefresh: () => void;
|
|
1137
|
+
}
|
|
1138
|
+
declare function usePullToRefresh(onRefresh: () => void, options?: PullToRefreshOptions): PullToRefreshResult;
|
|
1139
|
+
|
|
1140
|
+
interface PinchZoomResult {
|
|
1141
|
+
/** Current zoom scale (1 = no zoom) */
|
|
1142
|
+
scale: number;
|
|
1143
|
+
/** Whether a pinch gesture is active */
|
|
1144
|
+
isPinching: boolean;
|
|
1145
|
+
/** Props to spread on the zoomable container */
|
|
1146
|
+
gestureProps: {
|
|
1147
|
+
onTouchStart: (e: React__default.TouchEvent) => void;
|
|
1148
|
+
onTouchMove: (e: React__default.TouchEvent) => void;
|
|
1149
|
+
onTouchEnd: () => void;
|
|
1150
|
+
};
|
|
1151
|
+
/** Reset zoom to 1 */
|
|
1152
|
+
resetZoom: () => void;
|
|
1153
|
+
}
|
|
1154
|
+
interface PinchZoomOptions {
|
|
1155
|
+
/** Minimum zoom scale (default: 0.5) */
|
|
1156
|
+
minScale?: number;
|
|
1157
|
+
/** Maximum zoom scale (default: 4) */
|
|
1158
|
+
maxScale?: number;
|
|
1159
|
+
}
|
|
1160
|
+
declare function usePinchZoom(options?: PinchZoomOptions): PinchZoomResult;
|
|
1161
|
+
|
|
1032
1162
|
/**
|
|
1033
1163
|
* GitHub connection status
|
|
1034
1164
|
*/
|
|
@@ -1088,4 +1218,4 @@ declare function useGitHubBranches(owner: string, repo: string, enabled?: boolea
|
|
|
1088
1218
|
branches: string[];
|
|
1089
1219
|
}, Error>;
|
|
1090
1220
|
|
|
1091
|
-
export { type AuthContextValue, type AuthUser, type ChangeSummary, type CompileResult, type CompileStage, ENTITY_EVENTS, Entity, type EntityDataAdapter, EntityDataProvider, type EntityDataRecord, type EntityMutationResult, EventBusContextType, EventListener, type Extension, type ExtensionManifest, type FileSystemFile, type FileSystemStatus, type GitHubRepo, type GitHubStatus, type HistoryTimelineItem, type I18nContextValue, I18nProvider, type OpenFile, type OrbitalEventPayload, type OrbitalEventResponse, type QuerySingletonEntity, type QuerySingletonResult, type QuerySingletonState, type QueryState, type ResolvedEntity, type RevertResult, type SelectedFile, type TranslateFunction, type UseCompileResult, type UseEntityDetailResult, type UseEntityListOptions, type UseEntityListResult, type UseEntityMutationsOptions, type UseExtensionsOptions, type UseExtensionsResult, type UseFileEditorOptions, type UseFileEditorResult, type UseFileSystemResult, type UseOrbitalHistoryOptions, type UseOrbitalHistoryResult, clearEntities, createTranslate, entityDataKeys, getAllEntities, getByType, getEntity, getSingleton, parseQueryBinding, removeEntity, spawnEntity, updateEntity, updateSingleton, useAgentChat, useAuthContext, useCompile, useConnectGitHub, useCreateEntity, useDeepAgentGeneration, useDeleteEntity, useDisconnectGitHub, useEmitEvent, useEntities, useEntitiesByType, useEntity$1 as useEntity, useEntity as useEntityById, useEntityDataAdapter, useEntityDetail, useEntityList, useEntityListSuspense, useEntityMutations, useEntitySuspense, useEventBus, useEventListener, useExtensions, useFileEditor, useFileSystem, useGitHubBranches, useGitHubRepo, useGitHubRepos, useGitHubStatus, useInput, useOrbitalHistory, useOrbitalMutations, usePhysics, usePlayer, usePreview, useQuerySingleton, useResolvedEntity, useSelectedEntity, useSendOrbitalEvent, useSingletonEntity, useTranslate, useUIEvents, useUpdateEntity, useValidation };
|
|
1221
|
+
export { type AuthContextValue, type AuthUser, type ChangeSummary, type CompileResult, type CompileStage, type DragReorderResult, ENTITY_EVENTS, Entity, type EntityDataAdapter, EntityDataProvider, type EntityDataRecord, type EntityMutationResult, EventBusContextType, EventListener, type Extension, type ExtensionManifest, type FileSystemFile, type FileSystemStatus, type GitHubRepo, type GitHubStatus, type HistoryTimelineItem, type I18nContextValue, I18nProvider, type InfiniteScrollOptions, type InfiniteScrollResult, type LongPressHandlers, type LongPressOptions, type OpenFile, type OrbitalEventPayload, type OrbitalEventResponse, type PinchZoomOptions, type PinchZoomResult, type PullToRefreshOptions, type PullToRefreshResult, type QuerySingletonEntity, type QuerySingletonResult, type QuerySingletonState, type QueryState, type ResolvedEntity, type RevertResult, type SelectedFile, type SwipeGestureOptions, type SwipeGestureResult, type SwipeHandlers, type TranslateFunction, type UseCompileResult, type UseEntityDetailResult, type UseEntityListOptions, type UseEntityListResult, type UseEntityMutationsOptions, type UseExtensionsOptions, type UseExtensionsResult, type UseFileEditorOptions, type UseFileEditorResult, type UseFileSystemResult, type UseOrbitalHistoryOptions, type UseOrbitalHistoryResult, clearEntities, createTranslate, entityDataKeys, getAllEntities, getByType, getEntity, getSingleton, parseQueryBinding, removeEntity, spawnEntity, updateEntity, updateSingleton, useAgentChat, useAuthContext, useCompile, useConnectGitHub, useCreateEntity, useDeepAgentGeneration, useDeleteEntity, useDisconnectGitHub, useDragReorder, useEmitEvent, useEntities, useEntitiesByType, useEntity$1 as useEntity, useEntity as useEntityById, useEntityDataAdapter, useEntityDetail, useEntityList, useEntityListSuspense, useEntityMutations, useEntitySuspense, useEventBus, useEventListener, useExtensions, useFileEditor, useFileSystem, useGitHubBranches, useGitHubRepo, useGitHubRepos, useGitHubStatus, useInfiniteScroll, useInput, useLongPress, useOrbitalHistory, useOrbitalMutations, usePhysics, usePinchZoom, usePlayer, usePreview, usePullToRefresh, useQuerySingleton, useResolvedEntity, useSelectedEntity, useSendOrbitalEvent, useSingletonEntity, useSwipeGesture, useTranslate, useUIEvents, useUpdateEntity, useValidation };
|
package/dist/hooks/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { ENTITY_EVENTS, useAgentChat, useAuthContext, useCompile, useConnectGitHub, useCreateEntity, useDeepAgentGeneration, useDeleteEntity, useDisconnectGitHub, useEntities, useEntitiesByType, useEntity as useEntityById, useEntityMutations, useExtensions, useFileEditor, useFileSystem, useGitHubBranches, useGitHubRepo, useGitHubRepos, useGitHubStatus, useInput, useOrbitalHistory, useOrbitalMutations, usePhysics, usePlayer, usePreview, useResolvedEntity, useSelectedEntity, useSendOrbitalEvent, useSingletonEntity, useUIEvents, useUpdateEntity, useValidation } from '../chunk-
|
|
1
|
+
export { ENTITY_EVENTS, useAgentChat, useAuthContext, useCompile, useConnectGitHub, useCreateEntity, useDeepAgentGeneration, useDeleteEntity, useDisconnectGitHub, useEntities, useEntitiesByType, useEntity as useEntityById, useEntityMutations, useExtensions, useFileEditor, useFileSystem, useGitHubBranches, useGitHubRepo, useGitHubRepos, useGitHubStatus, useInput, useOrbitalHistory, useOrbitalMutations, usePhysics, usePinchZoom, usePlayer, usePreview, useResolvedEntity, useSelectedEntity, useSendOrbitalEvent, useSingletonEntity, useUIEvents, useUpdateEntity, useValidation } from '../chunk-2QM732NQ.js';
|
|
2
2
|
import '../chunk-3HJHHULT.js';
|
|
3
|
-
export { EntityDataProvider, I18nProvider, createTranslate, entityDataKeys, parseQueryBinding, useEntity, useEntityDataAdapter, useEntityDetail, useEntityList, useEntityListSuspense, useEntitySuspense, useQuerySingleton, useTranslate } from '../chunk-
|
|
3
|
+
export { EntityDataProvider, I18nProvider, createTranslate, entityDataKeys, parseQueryBinding, useDragReorder, useEntity, useEntityDataAdapter, useEntityDetail, useEntityList, useEntityListSuspense, useEntitySuspense, useInfiniteScroll, useLongPress, usePullToRefresh, useQuerySingleton, useSwipeGesture, useTranslate } from '../chunk-WGJIL4YR.js';
|
|
4
4
|
export { useEmitEvent, useEventBus, useEventListener } from '../chunk-YXZM3WCF.js';
|
|
5
5
|
export { DEFAULT_SLOTS, useUISlotManager } from '../chunk-3JGAROCW.js';
|
|
6
6
|
import '../chunk-TSETXL2E.js';
|
package/dist/providers/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { SuspenseConfigProvider } from '../chunk-
|
|
2
|
-
import { ThemeProvider } from '../chunk-
|
|
3
|
-
import { SelectionProvider, EntityDataProvider } from '../chunk-
|
|
4
|
-
export { SelectionContext, SelectionProvider, useSelection, useSelectionOptional } from '../chunk-
|
|
1
|
+
import { SuspenseConfigProvider } from '../chunk-LEWQP2UP.js';
|
|
2
|
+
import { ThemeProvider } from '../chunk-DKQN5FVU.js';
|
|
3
|
+
import { SelectionProvider, EntityDataProvider } from '../chunk-WGJIL4YR.js';
|
|
4
|
+
export { SelectionContext, SelectionProvider, useSelection, useSelectionOptional } from '../chunk-WGJIL4YR.js';
|
|
5
5
|
import { useEventBus, EventBusProvider } from '../chunk-YXZM3WCF.js';
|
|
6
6
|
export { EventBusContext, EventBusProvider } from '../chunk-YXZM3WCF.js';
|
|
7
7
|
import '../chunk-3JGAROCW.js';
|