@almadar/ui 6.51.2 → 6.52.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/{Canvas3DHost-CLC_jXh_.d.ts → Canvas3DHost-CWO0tswb.d.ts} +1 -1
- package/dist/{FileTree-RKQqRhIM.d.ts → FileTree-DUi7e7Z8.d.ts} +5 -5
- package/dist/{GameAudioProvider-BgWLggIy.d.ts → GameAudioProvider-_hPzjqp-.d.ts} +1 -1
- package/dist/{NavStackContext-B-XLULCO.d.ts → NavStackContext-04NLdXsY.d.ts} +8 -0
- package/dist/Typography-7FRZOS2H.js +5 -0
- package/dist/{UISlotContext-DNM8iXna.d.ts → UISlotContext-CS487Uoc.d.ts} +1 -1
- package/dist/{UISlotRenderer-7UYHFW4S.js → UISlotRenderer-CR7SCAMR.js} +8 -8
- package/dist/avl/index.cjs +3401 -1590
- package/dist/avl/index.d.ts +4 -4
- package/dist/avl/index.js +26 -23
- package/dist/{chunk-6CFYRP4S.js → chunk-2QB2PXOO.js} +1 -3
- package/dist/{chunk-R4V7IZQP.js → chunk-5GCI6C7J.js} +2 -2
- package/dist/{chunk-BUEIZY54.js → chunk-BHZG4PDZ.js} +420 -422
- package/dist/{chunk-MWPX2O4M.js → chunk-CLSLVFSP.js} +3 -16
- package/dist/{chunk-GIPZSCND.js → chunk-EERAGPBW.js} +3078 -1832
- package/dist/{chunk-OLZ3EEML.js → chunk-G4GMXYMY.js} +109 -15
- package/dist/{chunk-HQDKHLFG.js → chunk-IN3BVW2Z.js} +15 -1
- package/dist/{chunk-FGHRVJCI.js → chunk-MSBMVG3B.js} +12 -2
- package/dist/{chunk-YKHNK5JH.js → chunk-NCNP2RKZ.js} +11 -4
- package/dist/{chunk-T7IH5ABO.js → chunk-QWDKMVLX.js} +69 -17
- package/dist/{chunk-NTO555KF.js → chunk-TWHYH25Q.js} +136 -15
- package/dist/{chunk-GHXWGQTX.js → chunk-V5AGW2JN.js} +1 -1
- package/dist/{chunk-L55SAFKL.js → chunk-WB2A6V3I.js} +31 -1
- package/dist/{chunk-JXUYEO7U.js → chunk-XUSSAWKL.js} +7 -1
- package/dist/{cn-CO-0rolG.d.ts → cn-ClXGlIOY.d.ts} +2 -2
- package/dist/components/index.cjs +4933 -3165
- package/dist/components/index.d.ts +499 -416
- package/dist/components/index.js +11 -11
- package/dist/context/index.cjs +12 -4
- package/dist/context/index.d.ts +3 -3
- package/dist/context/index.js +2 -2
- package/dist/hooks/index.cjs +73 -6
- package/dist/hooks/index.d.ts +32 -7
- package/dist/hooks/index.js +6 -6
- package/dist/lib/drawable/three/index.cjs +33 -2
- package/dist/lib/drawable/three/index.d.ts +5 -5
- package/dist/lib/drawable/three/index.js +7 -7
- package/dist/lib/index.cjs +69 -2
- package/dist/lib/index.d.ts +29 -6
- package/dist/lib/index.js +5 -5
- package/dist/locales/index.cjs +93 -3
- package/dist/locales/index.js +63 -3
- package/dist/{paintDispatch-CMgOyVjS.d.ts → paintDispatch-DHo3WhaU.d.ts} +4 -4
- package/dist/providers/index.cjs +3392 -1607
- package/dist/providers/index.d.ts +6 -6
- package/dist/providers/index.js +55 -16
- package/dist/runtime/index.cjs +3417 -1611
- package/dist/runtime/index.d.ts +2 -2
- package/dist/runtime/index.js +10 -10
- package/dist/ssr/index.cjs +306 -141
- package/dist/ssr/index.d.cts +32 -44
- package/dist/ssr/index.d.ts +32 -44
- package/dist/ssr/index.js +249 -84
- package/dist/{themeTokens-CN9WCXQc.d.ts → themeTokens-Ccu7EmGY.d.ts} +4 -2
- package/dist/{useUISlots-CwUWM1ra.d.ts → useUISlots-1dk2TR4j.d.ts} +1 -9
- package/dist/{verificationRegistry-DBHfOR9y.d.ts → verificationRegistry-BYD3cVhS.d.ts} +1 -1
- package/locales/ar.json +31 -1
- package/locales/en.json +31 -1
- package/locales/sl.json +31 -1
- package/package.json +12 -9
- package/tailwind-preset.cjs +24 -1
- package/themes/_base.css +86 -0
- package/themes/_contract.md +1 -0
- package/themes/almadar-website.css +2 -0
- package/themes/almadar.css +2 -0
- package/themes/aqua.css +5 -3
- package/themes/arabesque.css +9 -7
- package/themes/art-deco.css +5 -3
- package/themes/art-nouveau.css +4 -0
- package/themes/atelier.css +10 -8
- package/themes/bauhaus.css +2 -0
- package/themes/bloomberg-dense.css +13 -11
- package/themes/blueprint.css +2 -0
- package/themes/clay.css +2 -0
- package/themes/comic.css +12 -10
- package/themes/constructivist.css +2 -0
- package/themes/corporate.css +4 -2
- package/themes/cyberpunk.css +2 -0
- package/themes/frutiger-aero.css +2 -0
- package/themes/game-adventure.css +1 -0
- package/themes/game-rpg.css +1 -0
- package/themes/game-sci-fi.css +1 -0
- package/themes/game-ui-pack.css +1 -0
- package/themes/gazette.css +10 -8
- package/themes/glass.css +17 -15
- package/themes/gothic.css +2 -0
- package/themes/ink-wash.css +2 -0
- package/themes/kawaii.css +2 -0
- package/themes/kiosk.css +17 -15
- package/themes/linear-clean.css +12 -10
- package/themes/luxury.css +2 -0
- package/themes/mac-classic.css +2 -0
- package/themes/material.css +2 -0
- package/themes/memphis.css +2 -0
- package/themes/mid-century.css +2 -0
- package/themes/minimalist.css +2 -0
- package/themes/mudcloth.css +2 -0
- package/themes/neon.css +2 -0
- package/themes/neumorphic.css +2 -0
- package/themes/newsprint.css +2 -0
- package/themes/notion-editorial.css +12 -10
- package/themes/pixel.css +2 -0
- package/themes/prism.css +20 -18
- package/themes/retro.css +2 -0
- package/themes/risograph.css +2 -0
- package/themes/scandi.css +2 -0
- package/themes/sketch.css +2 -0
- package/themes/solarpunk.css +2 -0
- package/themes/steampunk.css +2 -0
- package/themes/swiss.css +2 -0
- package/themes/terminal.css +8 -6
- package/themes/trait-wars.css +2 -0
- package/themes/ukiyo-e.css +2 -0
- package/themes/vaporwave.css +2 -0
- package/themes/victorian.css +2 -0
- package/themes/wabi-sabi.css +2 -0
- package/themes/win95.css +2 -0
- package/themes/wireframe.css +2 -0
- package/themes/zine.css +2 -0
- package/dist/Typography-2Z3JKWHN.js +0 -5
- package/dist/{avl-3d-context-MAt_NuU9.d.ts → avl-3d-context-DLteNEwu.d.ts} +3 -3
|
@@ -5,16 +5,16 @@ import { U as UIThemeDefinition } from '../ArbitraryClassCompiler-DvzdeHxc.js';
|
|
|
5
5
|
export { A as ARBITRARY_CLASS_STYLE_ID, a as ArbitraryClassCompiler, b as ArbitraryClassCompilerProvider, c as ArbitraryClassCompilerProviderProps, d as CurrentPagePathContext, e as CurrentPagePathProvider, f as CurrentPagePathProviderProps, g as DesignThemeProvider, O as OrbitalThemeProvider, h as OrbitalThemeProviderProps, r as resetArbitraryClassStyles, u as useArbitraryClassStyles, m as useCurrentPagePath, n as useDesignTheme } from '../ArbitraryClassCompiler-DvzdeHxc.js';
|
|
6
6
|
import { b as UserData } from '../UserContext-D566nfWA.js';
|
|
7
7
|
export { U as UserContext, a as UserContextValue, c as UserProvider, d as UserProviderProps, u as useHasPermission, e as useHasRole, f as useUser, g as useUserForEvaluation } from '../UserContext-D566nfWA.js';
|
|
8
|
-
import { E as EventBusContextType } from '../NavStackContext-
|
|
9
|
-
export { N as NavPageDecl, a as NavStackApi, b as NavStackProvider, c as NavStackProviderProps, d as NavStackRouterBridge, e as NavStackRouterBridgeProps, i as isInertNavStack, u as useNavStack } from '../NavStackContext-
|
|
8
|
+
import { E as EventBusContextType } from '../NavStackContext-04NLdXsY.js';
|
|
9
|
+
export { N as NavPageDecl, a as NavStackApi, b as NavStackProvider, c as NavStackProviderProps, d as NavStackRouterBridge, e as NavStackRouterBridgeProps, i as isInertNavStack, u as useNavStack } from '../NavStackContext-04NLdXsY.js';
|
|
10
10
|
export { n as EntityBindingContext, E as EntityBindingSource, a as EntitySchemaContextValue, b as EntitySchemaProvider, c as EntitySchemaProviderProps, d as ServerBridgeContextValue, e as ServerBridgeProvider, o as ServerBridgeProviderProps, S as ServerBridgeTransport, T as TraitContext, f as TraitContextValue, g as TraitInstance, h as TraitProvider, i as TraitProviderProps, p as useEntityBindingSnapshot, u as useEntitySchema, j as useEntitySchemaOptional, k as useServerBridge, l as useTrait, m as useTraitContext } from '../EntityBindingContext-BbxrwSb9.js';
|
|
11
11
|
import { i as UseOfflineExecutorResult, U as UseOfflineExecutorOptions } from '../offline-executor-C0TWucBj.js';
|
|
12
12
|
export { N as NavigationContextValue, c as NavigationProvider, d as NavigationProviderProps, e as NavigationState, k as extractRouteParams, l as findPageByName, m as findPageByPath, n as getAllPages, o as getDefaultPage, p as pathMatches, u as useActivePage, q as useInitPayload, r as useNavigateTo, s as useNavigation, t as useNavigationId, v as useNavigationState } from '../offline-executor-C0TWucBj.js';
|
|
13
|
-
import '../verificationRegistry-
|
|
14
|
-
export { G as GameAudioContext, a as GameAudioContextValue, b as GameAudioProvider, c as GameAudioProviderProps, u as useGameAudioContext, d as useGameAudioContextOptional } from '../GameAudioProvider-
|
|
15
|
-
export { A as Avl3DConfig, a as Avl3DContext, b as Avl3DModelOverrides, u as useAvl3DConfig, c as useAvl3DPalette } from '../avl-3d-context-
|
|
13
|
+
import '../verificationRegistry-BYD3cVhS.js';
|
|
14
|
+
export { G as GameAudioContext, a as GameAudioContextValue, b as GameAudioProvider, c as GameAudioProviderProps, u as useGameAudioContext, d as useGameAudioContextOptional } from '../GameAudioProvider-_hPzjqp-.js';
|
|
15
|
+
export { A as Avl3DConfig, a as Avl3DContext, b as Avl3DModelOverrides, u as useAvl3DConfig, c as useAvl3DPalette } from '../avl-3d-context-DLteNEwu.js';
|
|
16
16
|
export { AccessTokenProvider } from '@almadar/runtime';
|
|
17
|
-
import '../paintDispatch-
|
|
17
|
+
import '../paintDispatch-DHo3WhaU.js';
|
|
18
18
|
import 'lucide-react';
|
|
19
19
|
import 'three';
|
|
20
20
|
|
package/dist/providers/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { arbitraryClassesOf } from '../chunk-ERXIHZW3.js';
|
|
2
|
-
import { useGameAudio, SuspenseConfigProvider } from '../chunk-
|
|
3
|
-
import { Box } from '../chunk-
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-
|
|
2
|
+
import { useGameAudio, SuspenseConfigProvider } from '../chunk-EERAGPBW.js';
|
|
3
|
+
import { Box } from '../chunk-BHZG4PDZ.js';
|
|
4
|
+
import '../chunk-CLSLVFSP.js';
|
|
5
|
+
import '../chunk-TWHYH25Q.js';
|
|
6
6
|
import '../chunk-XJTHMW4G.js';
|
|
7
7
|
import { setGlobalEventBus, useEventBus } from '../chunk-6EV3OEBQ.js';
|
|
8
|
-
import { resolveThemeForRuntime, themeTokensToCssVars } from '../chunk-
|
|
9
|
-
import '../chunk-
|
|
8
|
+
import { resolveThemeForRuntime, themeTokensToCssVars } from '../chunk-MSBMVG3B.js';
|
|
9
|
+
import '../chunk-G4GMXYMY.js';
|
|
10
10
|
import { registerCheck, recordTransition, bindEventBus, bindTraitStateGetter } from '../chunk-O7OLVVBR.js';
|
|
11
|
-
import '../chunk-
|
|
12
|
-
import '../chunk-
|
|
13
|
-
import '../chunk-
|
|
11
|
+
import '../chunk-IN3BVW2Z.js';
|
|
12
|
+
import '../chunk-V5AGW2JN.js';
|
|
13
|
+
import '../chunk-WB2A6V3I.js';
|
|
14
14
|
import { useOfflineExecutor } from '../chunk-PQKU62LK.js';
|
|
15
15
|
import '../chunk-YHY5K2Y7.js';
|
|
16
16
|
import '../chunk-QPXIAUJD.js';
|
|
@@ -1146,8 +1146,32 @@ function GameAudioProvider({
|
|
|
1146
1146
|
return /* @__PURE__ */ jsx(GameAudioContext.Provider, { value, children });
|
|
1147
1147
|
}
|
|
1148
1148
|
GameAudioProvider.displayName = "GameAudioProvider";
|
|
1149
|
-
function pageEntryLabel(page) {
|
|
1150
|
-
return page.label ?? page.name;
|
|
1149
|
+
function pageEntryLabel(page, navLabels) {
|
|
1150
|
+
return page.label ?? navLabels?.[page.path] ?? page.name;
|
|
1151
|
+
}
|
|
1152
|
+
function navLabelsFromItems(pages, items) {
|
|
1153
|
+
const labels = {};
|
|
1154
|
+
const visit = (list) => {
|
|
1155
|
+
for (const item of list) {
|
|
1156
|
+
const page = matchNavPage(pages, item.href);
|
|
1157
|
+
if (page && item.label) labels[page.path] = item.label;
|
|
1158
|
+
if (item.children) visit(item.children);
|
|
1159
|
+
}
|
|
1160
|
+
};
|
|
1161
|
+
visit(items);
|
|
1162
|
+
return labels;
|
|
1163
|
+
}
|
|
1164
|
+
function resolveEntryLabels(entries, pages, navLabels) {
|
|
1165
|
+
let changed = false;
|
|
1166
|
+
const resolved = entries.map((entry) => {
|
|
1167
|
+
const page = matchNavPage(pages, entry.href);
|
|
1168
|
+
if (!page || entry.label !== pageEntryLabel(page)) return entry;
|
|
1169
|
+
const label = pageEntryLabel(page, navLabels);
|
|
1170
|
+
if (label === entry.label) return entry;
|
|
1171
|
+
changed = true;
|
|
1172
|
+
return { ...entry, label };
|
|
1173
|
+
});
|
|
1174
|
+
return changed ? resolved : entries;
|
|
1151
1175
|
}
|
|
1152
1176
|
function normalizePath(p) {
|
|
1153
1177
|
let normalized = p.trim();
|
|
@@ -1220,7 +1244,8 @@ var INERT_API = {
|
|
|
1220
1244
|
beginNavigate: () => void 0,
|
|
1221
1245
|
back: () => void 0,
|
|
1222
1246
|
goTo: () => void 0,
|
|
1223
|
-
setCurrentLabel: () => void 0
|
|
1247
|
+
setCurrentLabel: () => void 0,
|
|
1248
|
+
registerNavItems: () => void 0
|
|
1224
1249
|
};
|
|
1225
1250
|
var NavStackContext = createContext(INERT_API);
|
|
1226
1251
|
function isInertNavStack(api) {
|
|
@@ -1250,6 +1275,14 @@ function persistStored(storageKey, state) {
|
|
|
1250
1275
|
} catch {
|
|
1251
1276
|
}
|
|
1252
1277
|
}
|
|
1278
|
+
function sameNavItems(a, b) {
|
|
1279
|
+
if (a === b) return true;
|
|
1280
|
+
if (a.length !== b.length) return false;
|
|
1281
|
+
return a.every((item, i) => {
|
|
1282
|
+
const other = b[i];
|
|
1283
|
+
return item.href === other.href && item.label === other.label && sameNavItems(item.children ?? [], other.children ?? []);
|
|
1284
|
+
});
|
|
1285
|
+
}
|
|
1253
1286
|
var NavStackProvider = ({
|
|
1254
1287
|
pages,
|
|
1255
1288
|
currentPath,
|
|
@@ -1258,6 +1291,7 @@ var NavStackProvider = ({
|
|
|
1258
1291
|
children
|
|
1259
1292
|
}) => {
|
|
1260
1293
|
const [state, setState] = useState(() => loadStored(storageKey));
|
|
1294
|
+
const [navItems, setNavItems] = useState([]);
|
|
1261
1295
|
const pendingCrumbRef = useRef(null);
|
|
1262
1296
|
const stateRef = useRef(state);
|
|
1263
1297
|
stateRef.current = state;
|
|
@@ -1293,9 +1327,13 @@ var NavStackProvider = ({
|
|
|
1293
1327
|
},
|
|
1294
1328
|
[pages, currentPath, storageKey]
|
|
1295
1329
|
);
|
|
1330
|
+
const registerNavItems = useCallback((items) => {
|
|
1331
|
+
setNavItems((prev) => sameNavItems(prev, items) ? prev : items);
|
|
1332
|
+
}, []);
|
|
1333
|
+
const navLabels = useMemo(() => navLabelsFromItems(pages, navItems), [pages, navItems]);
|
|
1296
1334
|
const entries = useMemo(
|
|
1297
|
-
() => entriesFor(state, pages, currentPath),
|
|
1298
|
-
[state, pages, currentPath]
|
|
1335
|
+
() => resolveEntryLabels(entriesFor(state, pages, currentPath), pages, navLabels),
|
|
1336
|
+
[state, pages, currentPath, navLabels]
|
|
1299
1337
|
);
|
|
1300
1338
|
const api = useMemo(
|
|
1301
1339
|
() => ({
|
|
@@ -1304,9 +1342,10 @@ var NavStackProvider = ({
|
|
|
1304
1342
|
beginNavigate,
|
|
1305
1343
|
back,
|
|
1306
1344
|
goTo,
|
|
1307
|
-
setCurrentLabel
|
|
1345
|
+
setCurrentLabel,
|
|
1346
|
+
registerNavItems
|
|
1308
1347
|
}),
|
|
1309
|
-
[entries, state, pages, currentPath, beginNavigate, back, goTo, setCurrentLabel]
|
|
1348
|
+
[entries, state, pages, currentPath, beginNavigate, back, goTo, setCurrentLabel, registerNavItems]
|
|
1310
1349
|
);
|
|
1311
1350
|
return /* @__PURE__ */ jsx(NavStackContext.Provider, { value: api, children });
|
|
1312
1351
|
};
|