@almadar/ui 2.0.3 → 2.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { useTheme, useUISlots } from './chunk-BTXQJGFB.js';
1
+ import { useTheme, useUISlots } from './chunk-QU4JHKVC.js';
2
2
  import { cn, debugGroup, debug, debugGroupEnd, getNestedValue, isDebugEnabled } from './chunk-KKCVDUK7.js';
3
3
  import { useTranslate, useQuerySingleton, useEntityList } from './chunk-PE2H3NAW.js';
4
4
  import { useEventBus } from './chunk-YXZM3WCF.js';
@@ -1,7 +1,30 @@
1
1
  import { useUISlotManager } from './chunk-7NEWMNNU.js';
2
- import { createContext, useMemo, useState, useEffect, useCallback, useContext } from 'react';
2
+ import { createContext, useMemo, useContext, useState, useEffect, useCallback } from 'react';
3
3
  import { jsx } from 'react/jsx-runtime';
4
4
 
5
+ var UISlotContext = createContext(null);
6
+ function UISlotProvider({ children }) {
7
+ const slotManager = useUISlotManager();
8
+ const contextValue = useMemo(() => slotManager, [slotManager]);
9
+ return /* @__PURE__ */ jsx(UISlotContext.Provider, { value: contextValue, children });
10
+ }
11
+ function useUISlots() {
12
+ const context = useContext(UISlotContext);
13
+ if (!context) {
14
+ throw new Error(
15
+ "useUISlots must be used within a UISlotProvider. Make sure your component tree is wrapped with <UISlotProvider>."
16
+ );
17
+ }
18
+ return context;
19
+ }
20
+ function useSlotContent(slot) {
21
+ const { getContent } = useUISlots();
22
+ return getContent(slot);
23
+ }
24
+ function useSlotHasContent(slot) {
25
+ const { hasContent } = useUISlots();
26
+ return hasContent(slot);
27
+ }
5
28
  var BUILT_IN_THEMES = [
6
29
  {
7
30
  name: "wireframe",
@@ -252,28 +275,5 @@ function useTheme() {
252
275
  return context;
253
276
  }
254
277
  var ThemeContext_default = ThemeContext;
255
- var UISlotContext = createContext(null);
256
- function UISlotProvider({ children }) {
257
- const slotManager = useUISlotManager();
258
- const contextValue = useMemo(() => slotManager, [slotManager]);
259
- return /* @__PURE__ */ jsx(UISlotContext.Provider, { value: contextValue, children });
260
- }
261
- function useUISlots() {
262
- const context = useContext(UISlotContext);
263
- if (!context) {
264
- throw new Error(
265
- "useUISlots must be used within a UISlotProvider. Make sure your component tree is wrapped with <UISlotProvider>."
266
- );
267
- }
268
- return context;
269
- }
270
- function useSlotContent(slot) {
271
- const { getContent } = useUISlots();
272
- return getContent(slot);
273
- }
274
- function useSlotHasContent(slot) {
275
- const { hasContent } = useUISlots();
276
- return hasContent(slot);
277
- }
278
278
 
279
279
  export { BUILT_IN_THEMES, ThemeContext_default, ThemeProvider, UISlotContext, UISlotProvider, useSlotContent, useSlotHasContent, useTheme, useUISlots };
@@ -2,9 +2,9 @@ import { DEFAULT_CONFIG, renderStateMachineToDomData, parseContentSegments } fro
2
2
  import { useAuthContext } from '../chunk-BKC4XU44.js';
3
3
  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-BKC4XU44.js';
4
4
  import '../chunk-XSEDIUM6.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, Stack, Drawer, Toast, Tabs, Input, ThemeToggle, HealthBar, ScoreDisplay, StateIndicator, Container, EntityDisplayEvents } from '../chunk-X3IKFHFT.js';
6
- export { Accordion, Card2 as ActionCard, Alert, Avatar, Badge, Box, Breadcrumb, Button, ButtonGroup, Card, CardBody, CardContent, CardFooter, CardGrid, CardHeader, CardTitle, Center, Checkbox, CodeBlock, ConditionalWrapper, Container, ControlButton, DataTable, DetailPanel, Divider, Drawer, EmptyState, EntityDisplayEvents, ErrorBoundary, ErrorState, FilterGroup, Flex, FloatingActionButton, Form, FormField, FormSectionHeader, Grid, HStack, Heading, HealthBar, Icon, Input, InputGroup, Label, LawReferenceTooltip, LoadingState, MarkdownContent, MasterDetail, Menu, Modal, Overlay, PageHeader, Pagination, Popover, ProgressBar, QuizBlock, Radio, RelationSelect, RepeatableFormSection, ScaledDiagram, ScoreDisplay, SearchInput, Select, SidePanel, SimpleGrid, Skeleton, SlotContentRenderer, Spacer, Spinner, Sprite, Stack, StatCard, StateIndicator, Switch, Tabs, Text, TextHighlight, Textarea, ThemeSelector, ThemeToggle, Toast, Tooltip, Typography, UISlotComponent, UISlotRenderer, VStack, ViolationAlert, WizardNavigation, WizardProgress, drawSprite } from '../chunk-X3IKFHFT.js';
7
- import '../chunk-BTXQJGFB.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, Stack, Drawer, Toast, Tabs, Input, ThemeToggle, HealthBar, ScoreDisplay, StateIndicator, Container, EntityDisplayEvents } from '../chunk-JZ55M7DV.js';
6
+ export { Accordion, Card2 as ActionCard, Alert, Avatar, Badge, Box, Breadcrumb, Button, ButtonGroup, Card, CardBody, CardContent, CardFooter, CardGrid, CardHeader, CardTitle, Center, Checkbox, CodeBlock, ConditionalWrapper, Container, ControlButton, DataTable, DetailPanel, Divider, Drawer, EmptyState, EntityDisplayEvents, ErrorBoundary, ErrorState, FilterGroup, Flex, FloatingActionButton, Form, FormField, FormSectionHeader, Grid, HStack, Heading, HealthBar, Icon, Input, InputGroup, Label, LawReferenceTooltip, LoadingState, MarkdownContent, MasterDetail, Menu, Modal, Overlay, PageHeader, Pagination, Popover, ProgressBar, QuizBlock, Radio, RelationSelect, RepeatableFormSection, ScaledDiagram, ScoreDisplay, SearchInput, Select, SidePanel, SimpleGrid, Skeleton, SlotContentRenderer, Spacer, Spinner, Sprite, Stack, StatCard, StateIndicator, Switch, Tabs, Text, TextHighlight, Textarea, ThemeSelector, ThemeToggle, Toast, Tooltip, Typography, UISlotComponent, UISlotRenderer, VStack, ViolationAlert, WizardNavigation, WizardProgress, drawSprite } from '../chunk-JZ55M7DV.js';
7
+ import '../chunk-QU4JHKVC.js';
8
8
  import { cn, getNestedValue } from '../chunk-KKCVDUK7.js';
9
9
  export { cn } from '../chunk-KKCVDUK7.js';
10
10
  import { useTranslate } from '../chunk-PE2H3NAW.js';
@@ -1,5 +1,5 @@
1
- import { ThemeProvider, useTheme } from '../chunk-BTXQJGFB.js';
2
- export { BUILT_IN_THEMES, ThemeContext_default as ThemeContext, ThemeProvider, UISlotContext, UISlotProvider, useSlotContent, useSlotHasContent, useTheme, useUISlots } from '../chunk-BTXQJGFB.js';
1
+ import { ThemeProvider, useTheme } from '../chunk-QU4JHKVC.js';
2
+ export { BUILT_IN_THEMES, ThemeContext_default as ThemeContext, ThemeProvider, UISlotContext, UISlotProvider, useSlotContent, useSlotHasContent, useTheme, useUISlots } from '../chunk-QU4JHKVC.js';
3
3
  import '../chunk-7NEWMNNU.js';
4
4
  import '../chunk-PKBMQBKP.js';
5
5
  import { createContext, useCallback, useMemo, useContext } from 'react';
@@ -1,5 +1,5 @@
1
- import { SuspenseConfigProvider } from '../chunk-X3IKFHFT.js';
2
- import { ThemeProvider } from '../chunk-BTXQJGFB.js';
1
+ import { SuspenseConfigProvider } from '../chunk-JZ55M7DV.js';
2
+ import { ThemeProvider } from '../chunk-QU4JHKVC.js';
3
3
  import { recordTransition, registerCheck, bindEventBus, bindTraitStateGetter } from '../chunk-45CTDYBT.js';
4
4
  import '../chunk-KKCVDUK7.js';
5
5
  import { SelectionProvider, EntityDataProvider } from '../chunk-PE2H3NAW.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@almadar/ui",
3
- "version": "2.0.3",
3
+ "version": "2.0.4",
4
4
  "description": "React UI components, hooks, and providers for Almadar",
5
5
  "type": "module",
6
6
  "main": "./dist/components/index.js",
@@ -139,7 +139,7 @@
139
139
  ],
140
140
  "homepage": "https://github.com/almadar-io/almadar#readme",
141
141
  "scripts": {
142
- "build": "tsup && tsc --declaration --emitDeclarationOnly --outDir dist --skipLibCheck || true",
142
+ "build": "tsup && tsc --declaration --emitDeclarationOnly --outDir dist --skipLibCheck",
143
143
  "build:watch": "tsup --watch",
144
144
  "storybook": "storybook dev -p 6006",
145
145
  "build-storybook": "storybook build -o storybook-static",