@almadar/ui 5.15.0 → 5.16.2
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 +191 -58
- package/dist/avl/index.js +192 -59
- package/dist/components/index.cjs +37 -17
- package/dist/components/index.js +37 -17
- package/dist/providers/EventBusProvider.d.ts +10 -1
- package/dist/providers/OrbitalProvider.d.ts +7 -1
- package/dist/providers/index.cjs +43 -21
- package/dist/providers/index.js +43 -21
- package/dist/runtime/OrbPreview.d.ts +8 -1
- package/dist/runtime/index.cjs +42 -20
- package/dist/runtime/index.js +42 -20
- package/package.json +2 -2
package/dist/runtime/index.js
CHANGED
|
@@ -10086,13 +10086,13 @@ var init_MapView = __esm({
|
|
|
10086
10086
|
shadowSize: [41, 41]
|
|
10087
10087
|
});
|
|
10088
10088
|
L.Marker.prototype.options.icon = defaultIcon;
|
|
10089
|
-
const { useEffect:
|
|
10089
|
+
const { useEffect: useEffect71, useRef: useRef66, useCallback: useCallback114, useState: useState103 } = React85__default;
|
|
10090
10090
|
const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
|
|
10091
10091
|
const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
|
|
10092
10092
|
function MapUpdater({ centerLat, centerLng, zoom }) {
|
|
10093
10093
|
const map = useMap();
|
|
10094
|
-
const prevRef =
|
|
10095
|
-
|
|
10094
|
+
const prevRef = useRef66({ centerLat, centerLng, zoom });
|
|
10095
|
+
useEffect71(() => {
|
|
10096
10096
|
const prev = prevRef.current;
|
|
10097
10097
|
if (prev.centerLat !== centerLat || prev.centerLng !== centerLng || prev.zoom !== zoom) {
|
|
10098
10098
|
map.setView([centerLat, centerLng], zoom);
|
|
@@ -10103,7 +10103,7 @@ var init_MapView = __esm({
|
|
|
10103
10103
|
}
|
|
10104
10104
|
function MapClickHandler({ onMapClick }) {
|
|
10105
10105
|
const map = useMap();
|
|
10106
|
-
|
|
10106
|
+
useEffect71(() => {
|
|
10107
10107
|
if (!onMapClick) return;
|
|
10108
10108
|
const handler = (e) => {
|
|
10109
10109
|
onMapClick(e.latlng.lat, e.latlng.lng);
|
|
@@ -22286,6 +22286,21 @@ var init_DashboardLayout = __esm({
|
|
|
22286
22286
|
};
|
|
22287
22287
|
const [sidebarOpen, setSidebarOpen] = useState(false);
|
|
22288
22288
|
const [userMenuOpen, setUserMenuOpen] = useState(false);
|
|
22289
|
+
const layoutRef = useRef(null);
|
|
22290
|
+
const [isMobile, setIsMobile] = useState(false);
|
|
22291
|
+
useEffect(() => {
|
|
22292
|
+
const el = layoutRef.current;
|
|
22293
|
+
if (!el || typeof ResizeObserver === "undefined") return;
|
|
22294
|
+
const ro = new ResizeObserver((entries) => {
|
|
22295
|
+
const w = entries[0]?.contentRect.width ?? el.clientWidth;
|
|
22296
|
+
setIsMobile(w < 1024);
|
|
22297
|
+
});
|
|
22298
|
+
ro.observe(el);
|
|
22299
|
+
return () => ro.disconnect();
|
|
22300
|
+
}, []);
|
|
22301
|
+
useEffect(() => {
|
|
22302
|
+
if (!isMobile && sidebarOpen) setSidebarOpen(false);
|
|
22303
|
+
}, [isMobile, sidebarOpen]);
|
|
22289
22304
|
const location = useLocation();
|
|
22290
22305
|
const ctxPagePath = useCurrentPagePath();
|
|
22291
22306
|
const activePath = currentPath ?? ctxPagePath ?? location.pathname;
|
|
@@ -22298,15 +22313,15 @@ var init_DashboardLayout = __esm({
|
|
|
22298
22313
|
const showBottomNav = layoutMode === "bottomnav";
|
|
22299
22314
|
const isTopNav = layoutMode === "topnav";
|
|
22300
22315
|
return /* @__PURE__ */ jsxs(
|
|
22301
|
-
|
|
22316
|
+
Box,
|
|
22302
22317
|
{
|
|
22303
|
-
|
|
22304
|
-
className: "@container/dashboard min-h-screen w-full bg-background dark:bg-background items-stretch",
|
|
22318
|
+
ref: layoutRef,
|
|
22319
|
+
className: "@container/dashboard min-h-screen w-full bg-background dark:bg-background flex flex-row items-stretch",
|
|
22305
22320
|
children: [
|
|
22306
|
-
showSidebar && sidebarOpen && /* @__PURE__ */ jsx(
|
|
22321
|
+
showSidebar && isMobile && sidebarOpen && /* @__PURE__ */ jsx(
|
|
22307
22322
|
Box,
|
|
22308
22323
|
{
|
|
22309
|
-
className: "fixed inset-0 bg-foreground/50 dark:bg-foreground/70 z-20
|
|
22324
|
+
className: "fixed inset-0 bg-foreground/50 dark:bg-foreground/70 z-20",
|
|
22310
22325
|
onClick: () => setSidebarOpen(false)
|
|
22311
22326
|
}
|
|
22312
22327
|
),
|
|
@@ -22316,11 +22331,16 @@ var init_DashboardLayout = __esm({
|
|
|
22316
22331
|
as: "aside",
|
|
22317
22332
|
className: cn(
|
|
22318
22333
|
"z-30 w-64 flex-shrink-0 bg-card dark:bg-card border-r border-border dark:border-border",
|
|
22319
|
-
"
|
|
22320
|
-
"transform transition-transform duration-200 ease-in-out",
|
|
22321
|
-
"flex flex-col",
|
|
22322
|
-
sidebarOpen ? "translate-x-0" : "-translate-x-full"
|
|
22334
|
+
"flex flex-col"
|
|
22323
22335
|
),
|
|
22336
|
+
style: isMobile ? {
|
|
22337
|
+
position: "fixed",
|
|
22338
|
+
top: 0,
|
|
22339
|
+
bottom: 0,
|
|
22340
|
+
left: 0,
|
|
22341
|
+
transform: sidebarOpen ? "translateX(0)" : "translateX(-100%)",
|
|
22342
|
+
transition: "transform 200ms ease-in-out"
|
|
22343
|
+
} : { position: "static", transform: "none" },
|
|
22324
22344
|
children: [
|
|
22325
22345
|
/* @__PURE__ */ jsxs(
|
|
22326
22346
|
HStack,
|
|
@@ -22349,11 +22369,11 @@ var init_DashboardLayout = __esm({
|
|
|
22349
22369
|
}
|
|
22350
22370
|
)
|
|
22351
22371
|
] }),
|
|
22352
|
-
/* @__PURE__ */ jsx(
|
|
22372
|
+
isMobile && /* @__PURE__ */ jsx(
|
|
22353
22373
|
Button,
|
|
22354
22374
|
{
|
|
22355
22375
|
variant: "ghost",
|
|
22356
|
-
className: "
|
|
22376
|
+
className: "p-2 rounded-md hover:bg-muted dark:hover:bg-muted text-muted-foreground dark:text-muted-foreground",
|
|
22357
22377
|
onClick: () => setSidebarOpen(false),
|
|
22358
22378
|
children: /* @__PURE__ */ jsx(Icon, { name: "x", className: "h-5 w-5" })
|
|
22359
22379
|
}
|
|
@@ -22394,11 +22414,11 @@ var init_DashboardLayout = __esm({
|
|
|
22394
22414
|
justify: "between",
|
|
22395
22415
|
className: "h-full px-3 @sm/dashboard:px-4 gap-2 @sm/dashboard:gap-4",
|
|
22396
22416
|
children: [
|
|
22397
|
-
showSidebar && /* @__PURE__ */ jsx(
|
|
22417
|
+
showSidebar && isMobile && /* @__PURE__ */ jsx(
|
|
22398
22418
|
Button,
|
|
22399
22419
|
{
|
|
22400
22420
|
variant: "ghost",
|
|
22401
|
-
className: "
|
|
22421
|
+
className: "p-2 rounded-md hover:bg-muted dark:hover:bg-muted text-muted-foreground dark:text-muted-foreground touch-manipulation min-h-[44px] min-w-[44px] flex items-center justify-center",
|
|
22402
22422
|
onClick: () => setSidebarOpen(true),
|
|
22403
22423
|
"aria-label": "Open sidebar",
|
|
22404
22424
|
children: /* @__PURE__ */ jsx(Icon, { name: "menu", className: "h-5 w-5" })
|
|
@@ -49667,7 +49687,8 @@ function OrbPreview({
|
|
|
49667
49687
|
className,
|
|
49668
49688
|
serverUrl,
|
|
49669
49689
|
transport,
|
|
49670
|
-
initialPagePath
|
|
49690
|
+
initialPagePath,
|
|
49691
|
+
isolated = false
|
|
49671
49692
|
}) {
|
|
49672
49693
|
if (serverUrl && transport) {
|
|
49673
49694
|
throw new Error("OrbPreview accepts serverUrl OR transport, not both");
|
|
@@ -49789,7 +49810,7 @@ function OrbPreview({
|
|
|
49789
49810
|
style: { height },
|
|
49790
49811
|
children: [
|
|
49791
49812
|
localFallback && /* @__PURE__ */ jsx(Box, { className: "px-3 py-2 bg-[var(--color-warning)] bg-opacity-10 border-b border-[var(--color-warning)] flex items-center gap-2", children: /* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-[var(--color-warning-foreground)] flex-1", children: "Preview server unreachable \u2014 running locally. Server-side state and persistence are disabled." }) }),
|
|
49792
|
-
/* @__PURE__ */ jsx(OrbitalProvider, { initialData: effectiveMockData, skipTheme: true, verification: true, children: /* @__PURE__ */ jsx(UISlotProvider, { children: /* @__PURE__ */ jsx(
|
|
49813
|
+
/* @__PURE__ */ jsx(OrbitalProvider, { initialData: effectiveMockData, skipTheme: true, verification: true, isolated, children: /* @__PURE__ */ jsx(UISlotProvider, { children: /* @__PURE__ */ jsx(
|
|
49793
49814
|
SchemaRunner,
|
|
49794
49815
|
{
|
|
49795
49816
|
schema: parsedSchema,
|
|
@@ -49862,7 +49883,8 @@ function BrowserPlayground({
|
|
|
49862
49883
|
transport,
|
|
49863
49884
|
initialPagePath,
|
|
49864
49885
|
height,
|
|
49865
|
-
className
|
|
49886
|
+
className,
|
|
49887
|
+
isolated: true
|
|
49866
49888
|
}
|
|
49867
49889
|
);
|
|
49868
49890
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@almadar/ui",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.16.2",
|
|
4
4
|
"description": "React UI components, hooks, and providers for Almadar",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
|
@@ -129,7 +129,7 @@
|
|
|
129
129
|
"typecheck": "tsc --noEmit"
|
|
130
130
|
},
|
|
131
131
|
"dependencies": {
|
|
132
|
-
"@almadar/core": ">=9.
|
|
132
|
+
"@almadar/core": ">=9.10.0",
|
|
133
133
|
"@almadar/evaluator": ">=2.9.2",
|
|
134
134
|
"@almadar/logger": "^1.3.0",
|
|
135
135
|
"@almadar/patterns": ">=2.35.0",
|