@almadar/ui 2.11.7 → 2.11.9
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-4NAQLJ2M.js → chunk-7FVLOH5L.js} +3 -3
- package/dist/{chunk-YLKXEXBP.js → chunk-DKQN5FVU.js} +24 -24
- package/dist/{chunk-3FENGM4Y.js → chunk-GTIAVPI5.js} +1 -1
- package/dist/{chunk-RUL35VPK.js → chunk-WGJIL4YR.js} +502 -502
- package/dist/{chunk-5K3GTPBX.js → chunk-XWAVGJKL.js} +4 -4
- package/dist/components/index.js +10 -10
- package/dist/context/index.js +2 -2
- package/dist/hooks/index.d.ts +61 -61
- package/dist/hooks/index.js +2 -2
- package/dist/providers/index.js +5 -5
- package/dist/runtime/index.js +175 -8
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { useTheme, useUISlots } from './chunk-
|
|
2
|
-
import { useTranslate, useInfiniteScroll, useQuerySingleton, useLongPress, useSwipeGesture, useDragReorder, usePullToRefresh } from './chunk-RUL35VPK.js';
|
|
3
|
-
import { useEventBus } from './chunk-YXZM3WCF.js';
|
|
1
|
+
import { useTheme, useUISlots } from './chunk-DKQN5FVU.js';
|
|
4
2
|
import { cn, debugGroup, debug, debugGroupEnd, updateAssetStatus, bindCanvasCapture, getNestedValue, isDebugEnabled } from './chunk-WCTZ7WZX.js';
|
|
3
|
+
import { useTranslate, useInfiniteScroll, useQuerySingleton, useLongPress, useSwipeGesture, useDragReorder, usePullToRefresh } from './chunk-WGJIL4YR.js';
|
|
4
|
+
import { useEventBus } from './chunk-YXZM3WCF.js';
|
|
5
5
|
import { isPortalSlot } from './chunk-K2D5D3WK.js';
|
|
6
6
|
import { __publicField } from './chunk-PKBMQBKP.js';
|
|
7
7
|
import * as LucideIcons from 'lucide-react';
|
|
@@ -1,30 +1,7 @@
|
|
|
1
1
|
import { useUISlotManager } from './chunk-3JGAROCW.js';
|
|
2
|
-
import { createContext, useMemo,
|
|
2
|
+
import { createContext, useMemo, useState, useEffect, useCallback, useContext } 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
|
-
}
|
|
28
5
|
var BUILT_IN_THEMES = [
|
|
29
6
|
{
|
|
30
7
|
name: "wireframe",
|
|
@@ -275,5 +252,28 @@ function useTheme() {
|
|
|
275
252
|
return context;
|
|
276
253
|
}
|
|
277
254
|
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 };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { subscribe, getSnapshot, clearEntities, removeEntity, updateSingleton, updateEntity, spawnEntity, getSingleton, getAllEntities, getByType, getEntity } from './chunk-N7MVUW4R.js';
|
|
2
2
|
import { apiClient } from './chunk-3HJHHULT.js';
|
|
3
|
-
import { SelectionContext, entityDataKeys, useEntityList } from './chunk-
|
|
3
|
+
import { SelectionContext, entityDataKeys, useEntityList } from './chunk-WGJIL4YR.js';
|
|
4
4
|
import { useEventBus } from './chunk-YXZM3WCF.js';
|
|
5
5
|
import { useCallback, useState, useEffect, useMemo, useContext, useSyncExternalStore, useRef } from 'react';
|
|
6
6
|
import { useQueryClient, useMutation, useQuery } from '@tanstack/react-query';
|