@almadar/ui 4.14.0 → 4.14.1

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.
@@ -8486,11 +8486,13 @@ function TraitFrame({
8486
8486
  fallback = null
8487
8487
  }) {
8488
8488
  const content = useTraitContent(traitName);
8489
+ const entitySchema = useEntitySchemaOptional();
8490
+ const orbital = entitySchema?.orbitalsByTrait.get(traitName);
8489
8491
  if (!content) {
8490
8492
  return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: fallback });
8491
8493
  }
8492
8494
  const SlotContentRenderer2 = getSlotContentRenderer();
8493
- return /* @__PURE__ */ jsxRuntime.jsx(
8495
+ const rendered = /* @__PURE__ */ jsxRuntime.jsx(
8494
8496
  SlotContentRenderer2,
8495
8497
  {
8496
8498
  content,
@@ -8498,6 +8500,10 @@ function TraitFrame({
8498
8500
  }
8499
8501
  }
8500
8502
  );
8503
+ if (!orbital) {
8504
+ return rendered;
8505
+ }
8506
+ return /* @__PURE__ */ jsxRuntime.jsx(TraitScopeProvider, { orbital, trait: traitName, children: rendered });
8501
8507
  }
8502
8508
  function getSlotContentRenderer() {
8503
8509
  if (_slotContentRenderer) return _slotContentRenderer;
@@ -8509,6 +8515,8 @@ var _slotContentRenderer;
8509
8515
  var init_TraitFrame = __esm({
8510
8516
  "components/atoms/TraitFrame.tsx"() {
8511
8517
  init_UISlotContext();
8518
+ init_TraitScopeProvider();
8519
+ init_EntitySchemaContext();
8512
8520
  TraitFrame.displayName = "TraitFrame";
8513
8521
  _slotContentRenderer = null;
8514
8522
  }
package/dist/avl/index.js CHANGED
@@ -8440,11 +8440,13 @@ function TraitFrame({
8440
8440
  fallback = null
8441
8441
  }) {
8442
8442
  const content = useTraitContent(traitName);
8443
+ const entitySchema = useEntitySchemaOptional();
8444
+ const orbital = entitySchema?.orbitalsByTrait.get(traitName);
8443
8445
  if (!content) {
8444
8446
  return /* @__PURE__ */ jsx(Fragment, { children: fallback });
8445
8447
  }
8446
8448
  const SlotContentRenderer2 = getSlotContentRenderer();
8447
- return /* @__PURE__ */ jsx(
8449
+ const rendered = /* @__PURE__ */ jsx(
8448
8450
  SlotContentRenderer2,
8449
8451
  {
8450
8452
  content,
@@ -8452,6 +8454,10 @@ function TraitFrame({
8452
8454
  }
8453
8455
  }
8454
8456
  );
8457
+ if (!orbital) {
8458
+ return rendered;
8459
+ }
8460
+ return /* @__PURE__ */ jsx(TraitScopeProvider, { orbital, trait: traitName, children: rendered });
8455
8461
  }
8456
8462
  function getSlotContentRenderer() {
8457
8463
  if (_slotContentRenderer) return _slotContentRenderer;
@@ -8463,6 +8469,8 @@ var _slotContentRenderer;
8463
8469
  var init_TraitFrame = __esm({
8464
8470
  "components/atoms/TraitFrame.tsx"() {
8465
8471
  init_UISlotContext();
8472
+ init_TraitScopeProvider();
8473
+ init_EntitySchemaContext();
8466
8474
  TraitFrame.displayName = "TraitFrame";
8467
8475
  _slotContentRenderer = null;
8468
8476
  }
@@ -38001,11 +38001,13 @@ function TraitFrame({
38001
38001
  fallback = null
38002
38002
  }) {
38003
38003
  const content = useTraitContent(traitName);
38004
+ const entitySchema = useEntitySchemaOptional();
38005
+ const orbital = entitySchema?.orbitalsByTrait.get(traitName);
38004
38006
  if (!content) {
38005
38007
  return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: fallback });
38006
38008
  }
38007
38009
  const SlotContentRenderer2 = getSlotContentRenderer();
38008
- return /* @__PURE__ */ jsxRuntime.jsx(
38010
+ const rendered = /* @__PURE__ */ jsxRuntime.jsx(
38009
38011
  SlotContentRenderer2,
38010
38012
  {
38011
38013
  content,
@@ -38013,6 +38015,10 @@ function TraitFrame({
38013
38015
  }
38014
38016
  }
38015
38017
  );
38018
+ if (!orbital) {
38019
+ return rendered;
38020
+ }
38021
+ return /* @__PURE__ */ jsxRuntime.jsx(providers.TraitScopeProvider, { orbital, trait: traitName, children: rendered });
38016
38022
  }
38017
38023
  function getSlotContentRenderer() {
38018
38024
  if (_slotContentRenderer) return _slotContentRenderer;
@@ -38023,6 +38029,7 @@ function getSlotContentRenderer() {
38023
38029
  var _slotContentRenderer;
38024
38030
  var init_TraitFrame = __esm({
38025
38031
  "components/atoms/TraitFrame.tsx"() {
38032
+ init_EntitySchemaContext();
38026
38033
  TraitFrame.displayName = "TraitFrame";
38027
38034
  _slotContentRenderer = null;
38028
38035
  }
@@ -37956,11 +37956,13 @@ function TraitFrame({
37956
37956
  fallback = null
37957
37957
  }) {
37958
37958
  const content = useTraitContent(traitName);
37959
+ const entitySchema = useEntitySchemaOptional();
37960
+ const orbital = entitySchema?.orbitalsByTrait.get(traitName);
37959
37961
  if (!content) {
37960
37962
  return /* @__PURE__ */ jsx(Fragment, { children: fallback });
37961
37963
  }
37962
37964
  const SlotContentRenderer2 = getSlotContentRenderer();
37963
- return /* @__PURE__ */ jsx(
37965
+ const rendered = /* @__PURE__ */ jsx(
37964
37966
  SlotContentRenderer2,
37965
37967
  {
37966
37968
  content,
@@ -37968,6 +37970,10 @@ function TraitFrame({
37968
37970
  }
37969
37971
  }
37970
37972
  );
37973
+ if (!orbital) {
37974
+ return rendered;
37975
+ }
37976
+ return /* @__PURE__ */ jsx(TraitScopeProvider, { orbital, trait: traitName, children: rendered });
37971
37977
  }
37972
37978
  function getSlotContentRenderer() {
37973
37979
  if (_slotContentRenderer) return _slotContentRenderer;
@@ -37978,6 +37984,7 @@ function getSlotContentRenderer() {
37978
37984
  var _slotContentRenderer;
37979
37985
  var init_TraitFrame = __esm({
37980
37986
  "components/atoms/TraitFrame.tsx"() {
37987
+ init_EntitySchemaContext();
37981
37988
  TraitFrame.displayName = "TraitFrame";
37982
37989
  _slotContentRenderer = null;
37983
37990
  }
@@ -4945,11 +4945,13 @@ function TraitFrame({
4945
4945
  fallback = null
4946
4946
  }) {
4947
4947
  const content = useTraitContent(traitName);
4948
+ const entitySchema = useEntitySchemaOptional();
4949
+ const orbital = entitySchema?.orbitalsByTrait.get(traitName);
4948
4950
  if (!content) {
4949
4951
  return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: fallback });
4950
4952
  }
4951
4953
  const SlotContentRenderer2 = getSlotContentRenderer();
4952
- return /* @__PURE__ */ jsxRuntime.jsx(
4954
+ const rendered = /* @__PURE__ */ jsxRuntime.jsx(
4953
4955
  SlotContentRenderer2,
4954
4956
  {
4955
4957
  content,
@@ -4957,6 +4959,10 @@ function TraitFrame({
4957
4959
  }
4958
4960
  }
4959
4961
  );
4962
+ if (!orbital) {
4963
+ return rendered;
4964
+ }
4965
+ return /* @__PURE__ */ jsxRuntime.jsx(providers.TraitScopeProvider, { orbital, trait: traitName, children: rendered });
4960
4966
  }
4961
4967
  function getSlotContentRenderer() {
4962
4968
  if (_slotContentRenderer) return _slotContentRenderer;
@@ -4967,6 +4973,7 @@ function getSlotContentRenderer() {
4967
4973
  var _slotContentRenderer;
4968
4974
  var init_TraitFrame = __esm({
4969
4975
  "components/atoms/TraitFrame.tsx"() {
4976
+ init_EntitySchemaContext();
4970
4977
  TraitFrame.displayName = "TraitFrame";
4971
4978
  _slotContentRenderer = null;
4972
4979
  }
@@ -38978,7 +38985,7 @@ function OrbitalProvider({
38978
38985
  }
38979
38986
  OrbitalProvider.displayName = "OrbitalProvider";
38980
38987
  var TraitScopeContext = React115.createContext(null);
38981
- function TraitScopeProvider2({
38988
+ function TraitScopeProvider3({
38982
38989
  orbital,
38983
38990
  trait,
38984
38991
  children
@@ -39028,7 +39035,7 @@ exports.OfflineModeProvider = OfflineModeProvider;
39028
39035
  exports.OrbitalProvider = OrbitalProvider;
39029
39036
  exports.SelectionContext = SelectionContext;
39030
39037
  exports.SelectionProvider = SelectionProvider;
39031
- exports.TraitScopeProvider = TraitScopeProvider2;
39038
+ exports.TraitScopeProvider = TraitScopeProvider3;
39032
39039
  exports.VerificationProvider = VerificationProvider;
39033
39040
  exports.useOfflineMode = useOfflineMode;
39034
39041
  exports.useOptionalOfflineMode = useOptionalOfflineMode;
@@ -4900,11 +4900,13 @@ function TraitFrame({
4900
4900
  fallback = null
4901
4901
  }) {
4902
4902
  const content = useTraitContent(traitName);
4903
+ const entitySchema = useEntitySchemaOptional();
4904
+ const orbital = entitySchema?.orbitalsByTrait.get(traitName);
4903
4905
  if (!content) {
4904
4906
  return /* @__PURE__ */ jsx(Fragment, { children: fallback });
4905
4907
  }
4906
4908
  const SlotContentRenderer2 = getSlotContentRenderer();
4907
- return /* @__PURE__ */ jsx(
4909
+ const rendered = /* @__PURE__ */ jsx(
4908
4910
  SlotContentRenderer2,
4909
4911
  {
4910
4912
  content,
@@ -4912,6 +4914,10 @@ function TraitFrame({
4912
4914
  }
4913
4915
  }
4914
4916
  );
4917
+ if (!orbital) {
4918
+ return rendered;
4919
+ }
4920
+ return /* @__PURE__ */ jsx(TraitScopeProvider, { orbital, trait: traitName, children: rendered });
4915
4921
  }
4916
4922
  function getSlotContentRenderer() {
4917
4923
  if (_slotContentRenderer) return _slotContentRenderer;
@@ -4922,6 +4928,7 @@ function getSlotContentRenderer() {
4922
4928
  var _slotContentRenderer;
4923
4929
  var init_TraitFrame = __esm({
4924
4930
  "components/atoms/TraitFrame.tsx"() {
4931
+ init_EntitySchemaContext();
4925
4932
  TraitFrame.displayName = "TraitFrame";
4926
4933
  _slotContentRenderer = null;
4927
4934
  }
@@ -38933,7 +38940,7 @@ function OrbitalProvider({
38933
38940
  }
38934
38941
  OrbitalProvider.displayName = "OrbitalProvider";
38935
38942
  var TraitScopeContext = createContext(null);
38936
- function TraitScopeProvider2({
38943
+ function TraitScopeProvider3({
38937
38944
  orbital,
38938
38945
  trait,
38939
38946
  children
@@ -38977,4 +38984,4 @@ function useOptionalOfflineMode() {
38977
38984
  return useContext(OfflineModeContext);
38978
38985
  }
38979
38986
 
38980
- export { EventBusContext2 as EventBusContext, EventBusProvider, OfflineModeProvider, OrbitalProvider, SelectionContext, SelectionProvider, TraitScopeProvider2 as TraitScopeProvider, VerificationProvider, useOfflineMode, useOptionalOfflineMode, useSelection, useSelectionOptional, useTraitScope2 as useTraitScope };
38987
+ export { EventBusContext2 as EventBusContext, EventBusProvider, OfflineModeProvider, OrbitalProvider, SelectionContext, SelectionProvider, TraitScopeProvider3 as TraitScopeProvider, VerificationProvider, useOfflineMode, useOptionalOfflineMode, useSelection, useSelectionOptional, useTraitScope2 as useTraitScope };
@@ -5589,11 +5589,13 @@ function TraitFrame({
5589
5589
  fallback = null
5590
5590
  }) {
5591
5591
  const content = useTraitContent(traitName);
5592
+ const entitySchema = useEntitySchemaOptional();
5593
+ const orbital = entitySchema?.orbitalsByTrait.get(traitName);
5592
5594
  if (!content) {
5593
5595
  return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: fallback });
5594
5596
  }
5595
5597
  const SlotContentRenderer2 = getSlotContentRenderer();
5596
- return /* @__PURE__ */ jsxRuntime.jsx(
5598
+ const rendered = /* @__PURE__ */ jsxRuntime.jsx(
5597
5599
  SlotContentRenderer2,
5598
5600
  {
5599
5601
  content,
@@ -5601,6 +5603,10 @@ function TraitFrame({
5601
5603
  }
5602
5604
  }
5603
5605
  );
5606
+ if (!orbital) {
5607
+ return rendered;
5608
+ }
5609
+ return /* @__PURE__ */ jsxRuntime.jsx(providers.TraitScopeProvider, { orbital, trait: traitName, children: rendered });
5604
5610
  }
5605
5611
  function getSlotContentRenderer() {
5606
5612
  if (_slotContentRenderer) return _slotContentRenderer;
@@ -5611,6 +5617,7 @@ function getSlotContentRenderer() {
5611
5617
  var _slotContentRenderer;
5612
5618
  var init_TraitFrame = __esm({
5613
5619
  "components/atoms/TraitFrame.tsx"() {
5620
+ init_EntitySchemaContext();
5614
5621
  TraitFrame.displayName = "TraitFrame";
5615
5622
  _slotContentRenderer = null;
5616
5623
  }
@@ -5544,11 +5544,13 @@ function TraitFrame({
5544
5544
  fallback = null
5545
5545
  }) {
5546
5546
  const content = useTraitContent(traitName);
5547
+ const entitySchema = useEntitySchemaOptional();
5548
+ const orbital = entitySchema?.orbitalsByTrait.get(traitName);
5547
5549
  if (!content) {
5548
5550
  return /* @__PURE__ */ jsx(Fragment, { children: fallback });
5549
5551
  }
5550
5552
  const SlotContentRenderer2 = getSlotContentRenderer();
5551
- return /* @__PURE__ */ jsx(
5553
+ const rendered = /* @__PURE__ */ jsx(
5552
5554
  SlotContentRenderer2,
5553
5555
  {
5554
5556
  content,
@@ -5556,6 +5558,10 @@ function TraitFrame({
5556
5558
  }
5557
5559
  }
5558
5560
  );
5561
+ if (!orbital) {
5562
+ return rendered;
5563
+ }
5564
+ return /* @__PURE__ */ jsx(TraitScopeProvider, { orbital, trait: traitName, children: rendered });
5559
5565
  }
5560
5566
  function getSlotContentRenderer() {
5561
5567
  if (_slotContentRenderer) return _slotContentRenderer;
@@ -5566,6 +5572,7 @@ function getSlotContentRenderer() {
5566
5572
  var _slotContentRenderer;
5567
5573
  var init_TraitFrame = __esm({
5568
5574
  "components/atoms/TraitFrame.tsx"() {
5575
+ init_EntitySchemaContext();
5569
5576
  TraitFrame.displayName = "TraitFrame";
5570
5577
  _slotContentRenderer = null;
5571
5578
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@almadar/ui",
3
- "version": "4.14.0",
3
+ "version": "4.14.1",
4
4
  "description": "React UI components, hooks, and providers for Almadar",
5
5
  "type": "module",
6
6
  "main": "./dist/components/index.js",