@almadar/ui 5.76.2 → 5.76.5

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.
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Curated list of the PUBLIC 3D (Three.js) render-ui pattern components.
3
+ *
4
+ * The 3D family is a code-split optional surface (published via the
5
+ * `@almadar/ui/components/{organisms,molecules}/game/three` subpath, never in
6
+ * the main barrel — that would pull @react-three/fiber into every app). This
7
+ * file is the source of truth for WHICH 3D components are render-ui patterns:
8
+ * `pattern-sync` discovers `patterns.ts` files by walking the tree and admits
9
+ * exactly the names listed here, so the 3D scene internals re-exported alongside
10
+ * them (Scene3D, Camera3D, Lighting3D, ModelLoader, Canvas3D, …) do NOT leak in
11
+ * as factory patterns. Move this file anywhere under `components/` and the
12
+ * scanner still finds it.
13
+ *
14
+ * @packageDocumentation
15
+ */
16
+ export { GameCanvas3D } from './molecules/GameCanvas3D';
17
+ export { GameBoard3D } from './organisms/GameBoard3D';
18
+ export { GameCanvas3DBattleTemplate } from './templates/GameCanvas3DBattleTemplate';
19
+ export { GameCanvas3DCastleTemplate } from './templates/GameCanvas3DCastleTemplate';
20
+ export { GameCanvas3DWorldMapTemplate } from './templates/GameCanvas3DWorldMapTemplate';
@@ -1304,14 +1304,17 @@ function lazyFamilyIcon(libKey, importer, pick, fallbackName, family) {
1304
1304
  Wrapped.displayName = `Lazy.${libKey}.${fallbackName}`;
1305
1305
  return Wrapped;
1306
1306
  }
1307
+ function isComponentLike(v) {
1308
+ return v != null && (typeof v === "function" || typeof v === "object");
1309
+ }
1307
1310
  function resolveLucide(name) {
1308
1311
  if (lucideAliases[name]) return lucideAliases[name];
1309
1312
  const pascal = kebabToPascal(name);
1310
1313
  const lucideMap = LucideIcons2__namespace;
1311
1314
  const direct = lucideMap[pascal];
1312
- if (direct && typeof direct === "function") return direct;
1315
+ if (isComponentLike(direct)) return direct;
1313
1316
  const asIs = lucideMap[name];
1314
- if (asIs && typeof asIs === "function") return asIs;
1317
+ if (isComponentLike(asIs)) return asIs;
1315
1318
  return LucideIcons2__namespace.HelpCircle;
1316
1319
  }
1317
1320
  function resolvePhosphor(name, weight, family) {
@@ -1955,12 +1958,13 @@ function resolveIcon(name) {
1955
1958
  }
1956
1959
  function doResolve(name) {
1957
1960
  if (iconAliases[name]) return iconAliases[name];
1961
+ const isComponentLike2 = (v) => v != null && (typeof v === "function" || typeof v === "object");
1958
1962
  const pascalName = kebabToPascal2(name);
1959
1963
  const lucideMap = LucideIcons2__namespace;
1960
1964
  const directLookup = lucideMap[pascalName];
1961
- if (directLookup && typeof directLookup === "object") return directLookup;
1965
+ if (isComponentLike2(directLookup)) return directLookup;
1962
1966
  const asIs = lucideMap[name];
1963
- if (asIs && typeof asIs === "object") return asIs;
1967
+ if (isComponentLike2(asIs)) return asIs;
1964
1968
  return LucideIcons2__namespace.HelpCircle;
1965
1969
  }
1966
1970
  var colorTokenClasses, iconAliases, resolvedCache, sizeClasses, animationClasses; exports.Icon = void 0;
@@ -52823,9 +52827,33 @@ var init_ToastSlot = __esm({
52823
52827
  exports.ToastSlot.displayName = "ToastSlot";
52824
52828
  }
52825
52829
  });
52826
-
52827
- // components/core/organisms/component-registry.generated.ts
52828
- var COMPONENT_REGISTRY;
52830
+ function lazyThree(name, loader) {
52831
+ const Lazy = React80__namespace.default.lazy(
52832
+ () => loader().then((m) => {
52833
+ const Resolved = m[name];
52834
+ if (!Resolved) {
52835
+ throw new Error(
52836
+ `[@almadar/ui] 3D component "${name}" was not found in the three subpath bundle.`
52837
+ );
52838
+ }
52839
+ return { default: Resolved };
52840
+ })
52841
+ );
52842
+ function ThreeWrapper(props) {
52843
+ return React80__namespace.default.createElement(
52844
+ ThreeBoundary,
52845
+ { name },
52846
+ React80__namespace.default.createElement(
52847
+ React80__namespace.default.Suspense,
52848
+ { fallback: null },
52849
+ React80__namespace.default.createElement(Lazy, props)
52850
+ )
52851
+ );
52852
+ }
52853
+ ThreeWrapper.displayName = `Lazy(${name})`;
52854
+ return ThreeWrapper;
52855
+ }
52856
+ var ThreeBoundary, GameBoard3D, GameCanvas3D, GameCanvas3DBattleTemplate, GameCanvas3DCastleTemplate, GameCanvas3DWorldMapTemplate, COMPONENT_REGISTRY;
52829
52857
  var init_component_registry_generated = __esm({
52830
52858
  "components/core/organisms/component-registry.generated.ts"() {
52831
52859
  init_AboutPageTemplate();
@@ -52936,9 +52964,11 @@ var init_component_registry_generated = __esm({
52936
52964
  init_Form();
52937
52965
  init_FormField();
52938
52966
  init_FormSectionHeader();
52967
+ init_GameAudioProvider();
52939
52968
  init_GameAudioToggle();
52940
52969
  init_GameCard();
52941
52970
  init_GameHud();
52971
+ init_GameIcon();
52942
52972
  init_GameMenu();
52943
52973
  init_GameShell();
52944
52974
  init_GameTemplate();
@@ -53123,6 +53153,33 @@ var init_component_registry_generated = __esm({
53123
53153
  init_WizardProgress();
53124
53154
  init_WorldMapBoard();
53125
53155
  init_WorldMapTemplate();
53156
+ ThreeBoundary = class extends React80__namespace.default.Component {
53157
+ constructor() {
53158
+ super(...arguments);
53159
+ __publicField(this, "state", { failed: false });
53160
+ }
53161
+ static getDerivedStateFromError() {
53162
+ return { failed: true };
53163
+ }
53164
+ render() {
53165
+ if (this.state.failed) {
53166
+ return React80__namespace.default.createElement(
53167
+ "div",
53168
+ {
53169
+ "data-testid": "three-unavailable",
53170
+ style: { padding: 16, fontSize: 13, lineHeight: 1.5, opacity: 0.7 }
53171
+ },
53172
+ `3D pattern "${this.props.name}" requires three.js. Install the optional peers three + @react-three/fiber + @react-three/drei (matching the host React major) to render it.`
53173
+ );
53174
+ }
53175
+ return this.props.children;
53176
+ }
53177
+ };
53178
+ GameBoard3D = lazyThree("GameBoard3D", () => import('@almadar/ui/components/molecules/game/three'));
53179
+ GameCanvas3D = lazyThree("GameCanvas3D", () => import('@almadar/ui/components/molecules/game/three'));
53180
+ GameCanvas3DBattleTemplate = lazyThree("GameCanvas3DBattleTemplate", () => import('@almadar/ui/components/molecules/game/three'));
53181
+ GameCanvas3DCastleTemplate = lazyThree("GameCanvas3DCastleTemplate", () => import('@almadar/ui/components/molecules/game/three'));
53182
+ GameCanvas3DWorldMapTemplate = lazyThree("GameCanvas3DWorldMapTemplate", () => import('@almadar/ui/components/molecules/game/three'));
53126
53183
  COMPONENT_REGISTRY = {
53127
53184
  "AboutPageTemplate": exports.AboutPageTemplate,
53128
53185
  "Accordion": exports.Accordion,
@@ -53238,9 +53295,16 @@ var init_component_registry_generated = __esm({
53238
53295
  "Form": exports.Form,
53239
53296
  "FormField": exports.FormField,
53240
53297
  "FormSectionHeader": exports.FormSectionHeader,
53298
+ "GameAudioProvider": GameAudioProvider,
53241
53299
  "GameAudioToggle": GameAudioToggle,
53300
+ "GameBoard3D": GameBoard3D,
53301
+ "GameCanvas3D": GameCanvas3D,
53302
+ "GameCanvas3DBattleTemplate": GameCanvas3DBattleTemplate,
53303
+ "GameCanvas3DCastleTemplate": GameCanvas3DCastleTemplate,
53304
+ "GameCanvas3DWorldMapTemplate": GameCanvas3DWorldMapTemplate,
53242
53305
  "GameCard": GameCard,
53243
53306
  "GameHud": GameHud,
53307
+ "GameIcon": GameIcon,
53244
53308
  "GameMenu": GameMenu,
53245
53309
  "GameShell": exports.GameShell,
53246
53310
  "GameTemplate": exports.GameTemplate,
@@ -1258,14 +1258,17 @@ function lazyFamilyIcon(libKey, importer, pick, fallbackName, family) {
1258
1258
  Wrapped.displayName = `Lazy.${libKey}.${fallbackName}`;
1259
1259
  return Wrapped;
1260
1260
  }
1261
+ function isComponentLike(v) {
1262
+ return v != null && (typeof v === "function" || typeof v === "object");
1263
+ }
1261
1264
  function resolveLucide(name) {
1262
1265
  if (lucideAliases[name]) return lucideAliases[name];
1263
1266
  const pascal = kebabToPascal(name);
1264
1267
  const lucideMap = LucideIcons2;
1265
1268
  const direct = lucideMap[pascal];
1266
- if (direct && typeof direct === "function") return direct;
1269
+ if (isComponentLike(direct)) return direct;
1267
1270
  const asIs = lucideMap[name];
1268
- if (asIs && typeof asIs === "function") return asIs;
1271
+ if (isComponentLike(asIs)) return asIs;
1269
1272
  return LucideIcons2.HelpCircle;
1270
1273
  }
1271
1274
  function resolvePhosphor(name, weight, family) {
@@ -1909,12 +1912,13 @@ function resolveIcon(name) {
1909
1912
  }
1910
1913
  function doResolve(name) {
1911
1914
  if (iconAliases[name]) return iconAliases[name];
1915
+ const isComponentLike2 = (v) => v != null && (typeof v === "function" || typeof v === "object");
1912
1916
  const pascalName = kebabToPascal2(name);
1913
1917
  const lucideMap = LucideIcons2;
1914
1918
  const directLookup = lucideMap[pascalName];
1915
- if (directLookup && typeof directLookup === "object") return directLookup;
1919
+ if (isComponentLike2(directLookup)) return directLookup;
1916
1920
  const asIs = lucideMap[name];
1917
- if (asIs && typeof asIs === "object") return asIs;
1921
+ if (isComponentLike2(asIs)) return asIs;
1918
1922
  return LucideIcons2.HelpCircle;
1919
1923
  }
1920
1924
  var colorTokenClasses, iconAliases, resolvedCache, sizeClasses, animationClasses, Icon;
@@ -52777,9 +52781,33 @@ var init_ToastSlot = __esm({
52777
52781
  ToastSlot.displayName = "ToastSlot";
52778
52782
  }
52779
52783
  });
52780
-
52781
- // components/core/organisms/component-registry.generated.ts
52782
- var COMPONENT_REGISTRY;
52784
+ function lazyThree(name, loader) {
52785
+ const Lazy = React80__default.lazy(
52786
+ () => loader().then((m) => {
52787
+ const Resolved = m[name];
52788
+ if (!Resolved) {
52789
+ throw new Error(
52790
+ `[@almadar/ui] 3D component "${name}" was not found in the three subpath bundle.`
52791
+ );
52792
+ }
52793
+ return { default: Resolved };
52794
+ })
52795
+ );
52796
+ function ThreeWrapper(props) {
52797
+ return React80__default.createElement(
52798
+ ThreeBoundary,
52799
+ { name },
52800
+ React80__default.createElement(
52801
+ React80__default.Suspense,
52802
+ { fallback: null },
52803
+ React80__default.createElement(Lazy, props)
52804
+ )
52805
+ );
52806
+ }
52807
+ ThreeWrapper.displayName = `Lazy(${name})`;
52808
+ return ThreeWrapper;
52809
+ }
52810
+ var ThreeBoundary, GameBoard3D, GameCanvas3D, GameCanvas3DBattleTemplate, GameCanvas3DCastleTemplate, GameCanvas3DWorldMapTemplate, COMPONENT_REGISTRY;
52783
52811
  var init_component_registry_generated = __esm({
52784
52812
  "components/core/organisms/component-registry.generated.ts"() {
52785
52813
  init_AboutPageTemplate();
@@ -52890,9 +52918,11 @@ var init_component_registry_generated = __esm({
52890
52918
  init_Form();
52891
52919
  init_FormField();
52892
52920
  init_FormSectionHeader();
52921
+ init_GameAudioProvider();
52893
52922
  init_GameAudioToggle();
52894
52923
  init_GameCard();
52895
52924
  init_GameHud();
52925
+ init_GameIcon();
52896
52926
  init_GameMenu();
52897
52927
  init_GameShell();
52898
52928
  init_GameTemplate();
@@ -53077,6 +53107,33 @@ var init_component_registry_generated = __esm({
53077
53107
  init_WizardProgress();
53078
53108
  init_WorldMapBoard();
53079
53109
  init_WorldMapTemplate();
53110
+ ThreeBoundary = class extends React80__default.Component {
53111
+ constructor() {
53112
+ super(...arguments);
53113
+ __publicField(this, "state", { failed: false });
53114
+ }
53115
+ static getDerivedStateFromError() {
53116
+ return { failed: true };
53117
+ }
53118
+ render() {
53119
+ if (this.state.failed) {
53120
+ return React80__default.createElement(
53121
+ "div",
53122
+ {
53123
+ "data-testid": "three-unavailable",
53124
+ style: { padding: 16, fontSize: 13, lineHeight: 1.5, opacity: 0.7 }
53125
+ },
53126
+ `3D pattern "${this.props.name}" requires three.js. Install the optional peers three + @react-three/fiber + @react-three/drei (matching the host React major) to render it.`
53127
+ );
53128
+ }
53129
+ return this.props.children;
53130
+ }
53131
+ };
53132
+ GameBoard3D = lazyThree("GameBoard3D", () => import('@almadar/ui/components/molecules/game/three'));
53133
+ GameCanvas3D = lazyThree("GameCanvas3D", () => import('@almadar/ui/components/molecules/game/three'));
53134
+ GameCanvas3DBattleTemplate = lazyThree("GameCanvas3DBattleTemplate", () => import('@almadar/ui/components/molecules/game/three'));
53135
+ GameCanvas3DCastleTemplate = lazyThree("GameCanvas3DCastleTemplate", () => import('@almadar/ui/components/molecules/game/three'));
53136
+ GameCanvas3DWorldMapTemplate = lazyThree("GameCanvas3DWorldMapTemplate", () => import('@almadar/ui/components/molecules/game/three'));
53080
53137
  COMPONENT_REGISTRY = {
53081
53138
  "AboutPageTemplate": AboutPageTemplate,
53082
53139
  "Accordion": Accordion,
@@ -53192,9 +53249,16 @@ var init_component_registry_generated = __esm({
53192
53249
  "Form": Form,
53193
53250
  "FormField": FormField,
53194
53251
  "FormSectionHeader": FormSectionHeader,
53252
+ "GameAudioProvider": GameAudioProvider,
53195
53253
  "GameAudioToggle": GameAudioToggle,
53254
+ "GameBoard3D": GameBoard3D,
53255
+ "GameCanvas3D": GameCanvas3D,
53256
+ "GameCanvas3DBattleTemplate": GameCanvas3DBattleTemplate,
53257
+ "GameCanvas3DCastleTemplate": GameCanvas3DCastleTemplate,
53258
+ "GameCanvas3DWorldMapTemplate": GameCanvas3DWorldMapTemplate,
53196
53259
  "GameCard": GameCard,
53197
53260
  "GameHud": GameHud,
53261
+ "GameIcon": GameIcon,
53198
53262
  "GameMenu": GameMenu,
53199
53263
  "GameShell": GameShell,
53200
53264
  "GameTemplate": GameTemplate,
@@ -3165,14 +3165,17 @@ var lucideAliases = {
3165
3165
  "sort-asc": LucideIcons2__namespace.ArrowUpNarrowWide,
3166
3166
  "sort-desc": LucideIcons2__namespace.ArrowDownNarrowWide
3167
3167
  };
3168
+ function isComponentLike(v) {
3169
+ return v != null && (typeof v === "function" || typeof v === "object");
3170
+ }
3168
3171
  function resolveLucide(name) {
3169
3172
  if (lucideAliases[name]) return lucideAliases[name];
3170
3173
  const pascal = kebabToPascal(name);
3171
3174
  const lucideMap = LucideIcons2__namespace;
3172
3175
  const direct = lucideMap[pascal];
3173
- if (direct && typeof direct === "function") return direct;
3176
+ if (isComponentLike(direct)) return direct;
3174
3177
  const asIs = lucideMap[name];
3175
- if (asIs && typeof asIs === "function") return asIs;
3178
+ if (isComponentLike(asIs)) return asIs;
3176
3179
  return LucideIcons2__namespace.HelpCircle;
3177
3180
  }
3178
3181
  var phosphorAliases = {
@@ -3806,12 +3809,13 @@ function resolveIcon(name) {
3806
3809
  }
3807
3810
  function doResolve(name) {
3808
3811
  if (iconAliases[name]) return iconAliases[name];
3812
+ const isComponentLike2 = (v) => v != null && (typeof v === "function" || typeof v === "object");
3809
3813
  const pascalName = kebabToPascal2(name);
3810
3814
  const lucideMap = LucideIcons2__namespace;
3811
3815
  const directLookup = lucideMap[pascalName];
3812
- if (directLookup && typeof directLookup === "object") return directLookup;
3816
+ if (isComponentLike2(directLookup)) return directLookup;
3813
3817
  const asIs = lucideMap[name];
3814
- if (asIs && typeof asIs === "object") return asIs;
3818
+ if (isComponentLike2(asIs)) return asIs;
3815
3819
  return LucideIcons2__namespace.HelpCircle;
3816
3820
  }
3817
3821
  var sizeClasses = {
@@ -3141,14 +3141,17 @@ var lucideAliases = {
3141
3141
  "sort-asc": LucideIcons2.ArrowUpNarrowWide,
3142
3142
  "sort-desc": LucideIcons2.ArrowDownNarrowWide
3143
3143
  };
3144
+ function isComponentLike(v) {
3145
+ return v != null && (typeof v === "function" || typeof v === "object");
3146
+ }
3144
3147
  function resolveLucide(name) {
3145
3148
  if (lucideAliases[name]) return lucideAliases[name];
3146
3149
  const pascal = kebabToPascal(name);
3147
3150
  const lucideMap = LucideIcons2;
3148
3151
  const direct = lucideMap[pascal];
3149
- if (direct && typeof direct === "function") return direct;
3152
+ if (isComponentLike(direct)) return direct;
3150
3153
  const asIs = lucideMap[name];
3151
- if (asIs && typeof asIs === "function") return asIs;
3154
+ if (isComponentLike(asIs)) return asIs;
3152
3155
  return LucideIcons2.HelpCircle;
3153
3156
  }
3154
3157
  var phosphorAliases = {
@@ -3782,12 +3785,13 @@ function resolveIcon(name) {
3782
3785
  }
3783
3786
  function doResolve(name) {
3784
3787
  if (iconAliases[name]) return iconAliases[name];
3788
+ const isComponentLike2 = (v) => v != null && (typeof v === "function" || typeof v === "object");
3785
3789
  const pascalName = kebabToPascal2(name);
3786
3790
  const lucideMap = LucideIcons2;
3787
3791
  const directLookup = lucideMap[pascalName];
3788
- if (directLookup && typeof directLookup === "object") return directLookup;
3792
+ if (isComponentLike2(directLookup)) return directLookup;
3789
3793
  const asIs = lucideMap[name];
3790
- if (asIs && typeof asIs === "object") return asIs;
3794
+ if (isComponentLike2(asIs)) return asIs;
3791
3795
  return LucideIcons2.HelpCircle;
3792
3796
  }
3793
3797
  var sizeClasses = {