@almadar/ui 2.1.11 → 2.4.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.
@@ -11,6 +11,8 @@ var DEFAULT_SLOTS = {
11
11
  toast: null,
12
12
  "hud-top": null,
13
13
  "hud-bottom": null,
14
+ "hud-left": null,
15
+ "hud-right": null,
14
16
  floating: null
15
17
  };
16
18
  var idCounter = 0;
@@ -1,5 +1,5 @@
1
1
  import { apiClient } from './chunk-3HJHHULT.js';
2
- import { SelectionContext, entityDataKeys, useEntityList } from './chunk-JLEMVREZ.js';
2
+ import { SelectionContext, entityDataKeys, useEntityList } from './chunk-GOZKH7QW.js';
3
3
  import { useEventBus } from './chunk-YXZM3WCF.js';
4
4
  import { subscribe, getSnapshot, clearEntities, removeEntity, updateSingleton, updateEntity, spawnEntity, getSingleton, getAllEntities, getByType, getEntity } from './chunk-N7MVUW4R.js';
5
5
  import { useCallback, useState, useEffect, useMemo, useContext, useSyncExternalStore } from 'react';
@@ -899,8 +899,8 @@ function useUIEvents(dispatch, validEvents, eventBusInstance) {
899
899
  const validEventsKey = validEvents ? validEvents.slice().sort().join(",") : "";
900
900
  const stableValidEvents = useMemo(
901
901
  () => validEvents,
902
- // eslint-disable-next-line react-hooks/exhaustive-deps
903
902
  [validEventsKey]
903
+ // intentional — validEventsKey is the stable dep, not validEvents array ref
904
904
  );
905
905
  useEffect(() => {
906
906
  const unsubscribes = [];
@@ -1,4 +1,4 @@
1
- import { useUISlotManager } from './chunk-7NEWMNNU.js';
1
+ import { useUISlotManager } from './chunk-3JGAROCW.js';
2
2
  import { createContext, useMemo, useState, useEffect, useCallback, useContext } from 'react';
3
3
  import { jsx } from 'react/jsx-runtime';
4
4
 
@@ -1,12 +1,15 @@
1
1
  import { useEventBus } from './chunk-YXZM3WCF.js';
2
+ import { en_default } from './chunk-TSETXL2E.js';
2
3
  import React2, { createContext, useContext, useState, useMemo, useCallback, useEffect } from 'react';
3
4
  import { jsx } from 'react/jsx-runtime';
4
5
 
6
+ var { $meta: _meta, ...coreMessages } = en_default;
7
+ var coreLocale = coreMessages;
5
8
  var I18nContext = createContext({
6
9
  locale: "en",
7
10
  direction: "ltr",
8
- t: (key) => key
9
- // passthrough fallback
11
+ t: (key) => coreLocale[key] ?? key
12
+ // core locale fallback
10
13
  });
11
14
  I18nContext.displayName = "I18nContext";
12
15
  var I18nProvider = I18nContext.Provider;
@@ -15,7 +18,7 @@ function useTranslate() {
15
18
  }
16
19
  function createTranslate(messages) {
17
20
  return (key, params) => {
18
- let msg = messages[key] ?? key;
21
+ let msg = messages[key] ?? coreLocale[key] ?? key;
19
22
  if (params) {
20
23
  for (const [k, v] of Object.entries(params)) {
21
24
  msg = msg.split(`{{${k}}}`).join(String(v));