@almadar/ui 4.0.0 → 4.0.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.
- package/dist/avl/index.cjs +29 -1
- package/dist/avl/index.js +29 -1
- package/dist/runtime/index.cjs +29 -1
- package/dist/runtime/index.js +29 -1
- package/package.json +1 -1
package/dist/avl/index.cjs
CHANGED
|
@@ -51952,11 +51952,13 @@ function SlotBridge() {
|
|
|
51952
51952
|
return null;
|
|
51953
51953
|
}
|
|
51954
51954
|
function applyServerEffects(effects, uiSlots, onNavigate) {
|
|
51955
|
+
const perSlotRenders = /* @__PURE__ */ new Map();
|
|
51955
51956
|
for (const eff of effects) {
|
|
51956
51957
|
if (eff.type === "render-ui" && eff.slot && eff.pattern) {
|
|
51957
51958
|
const patternRecord = eff.pattern;
|
|
51958
51959
|
const { type: patternType, children, ...inlineProps } = patternRecord;
|
|
51959
51960
|
const normalizedChildren = Array.isArray(children) ? children.map((c) => normalizeChild(c)) : children;
|
|
51961
|
+
const sourceTrait = eff.traitName ?? "server";
|
|
51960
51962
|
uiSlots.render({
|
|
51961
51963
|
target: eff.slot,
|
|
51962
51964
|
pattern: patternType,
|
|
@@ -51964,12 +51966,38 @@ function applyServerEffects(effects, uiSlots, onNavigate) {
|
|
|
51964
51966
|
...inlineProps,
|
|
51965
51967
|
...normalizedChildren !== void 0 ? { children: normalizedChildren } : {}
|
|
51966
51968
|
},
|
|
51967
|
-
sourceTrait
|
|
51969
|
+
sourceTrait
|
|
51968
51970
|
});
|
|
51971
|
+
const bucket = perSlotRenders.get(eff.slot) ?? [];
|
|
51972
|
+
bucket.push({
|
|
51973
|
+
sourceTrait,
|
|
51974
|
+
pattern: {
|
|
51975
|
+
type: patternType,
|
|
51976
|
+
...inlineProps,
|
|
51977
|
+
...normalizedChildren !== void 0 ? { children: normalizedChildren } : {}
|
|
51978
|
+
}
|
|
51979
|
+
});
|
|
51980
|
+
perSlotRenders.set(eff.slot, bucket);
|
|
51969
51981
|
} else if (eff.type === "navigate" && eff.route && onNavigate) {
|
|
51970
51982
|
onNavigate(eff.route, eff.params);
|
|
51971
51983
|
}
|
|
51972
51984
|
}
|
|
51985
|
+
for (const [slot, bucket] of perSlotRenders) {
|
|
51986
|
+
const distinctSources = new Set(bucket.map((b) => b.sourceTrait));
|
|
51987
|
+
if (distinctSources.size <= 1) continue;
|
|
51988
|
+
uiSlots.render({
|
|
51989
|
+
target: slot,
|
|
51990
|
+
pattern: "stack",
|
|
51991
|
+
props: {
|
|
51992
|
+
direction: "vertical",
|
|
51993
|
+
gap: "lg",
|
|
51994
|
+
children: bucket.map((b) => b.pattern)
|
|
51995
|
+
},
|
|
51996
|
+
// Use a synthetic wrapper source trait; individual traits' frames
|
|
51997
|
+
// already live in the per-trait index from the per-effect loop.
|
|
51998
|
+
sourceTrait: "__multi_source_stack__"
|
|
51999
|
+
});
|
|
52000
|
+
}
|
|
51973
52001
|
}
|
|
51974
52002
|
function TraitInitializer({ traits: traits2, orbitalNames, onNavigate, onLocalFallback, persistence }) {
|
|
51975
52003
|
const slotsActions = useSlotsActions();
|
package/dist/avl/index.js
CHANGED
|
@@ -51906,11 +51906,13 @@ function SlotBridge() {
|
|
|
51906
51906
|
return null;
|
|
51907
51907
|
}
|
|
51908
51908
|
function applyServerEffects(effects, uiSlots, onNavigate) {
|
|
51909
|
+
const perSlotRenders = /* @__PURE__ */ new Map();
|
|
51909
51910
|
for (const eff of effects) {
|
|
51910
51911
|
if (eff.type === "render-ui" && eff.slot && eff.pattern) {
|
|
51911
51912
|
const patternRecord = eff.pattern;
|
|
51912
51913
|
const { type: patternType, children, ...inlineProps } = patternRecord;
|
|
51913
51914
|
const normalizedChildren = Array.isArray(children) ? children.map((c) => normalizeChild(c)) : children;
|
|
51915
|
+
const sourceTrait = eff.traitName ?? "server";
|
|
51914
51916
|
uiSlots.render({
|
|
51915
51917
|
target: eff.slot,
|
|
51916
51918
|
pattern: patternType,
|
|
@@ -51918,12 +51920,38 @@ function applyServerEffects(effects, uiSlots, onNavigate) {
|
|
|
51918
51920
|
...inlineProps,
|
|
51919
51921
|
...normalizedChildren !== void 0 ? { children: normalizedChildren } : {}
|
|
51920
51922
|
},
|
|
51921
|
-
sourceTrait
|
|
51923
|
+
sourceTrait
|
|
51922
51924
|
});
|
|
51925
|
+
const bucket = perSlotRenders.get(eff.slot) ?? [];
|
|
51926
|
+
bucket.push({
|
|
51927
|
+
sourceTrait,
|
|
51928
|
+
pattern: {
|
|
51929
|
+
type: patternType,
|
|
51930
|
+
...inlineProps,
|
|
51931
|
+
...normalizedChildren !== void 0 ? { children: normalizedChildren } : {}
|
|
51932
|
+
}
|
|
51933
|
+
});
|
|
51934
|
+
perSlotRenders.set(eff.slot, bucket);
|
|
51923
51935
|
} else if (eff.type === "navigate" && eff.route && onNavigate) {
|
|
51924
51936
|
onNavigate(eff.route, eff.params);
|
|
51925
51937
|
}
|
|
51926
51938
|
}
|
|
51939
|
+
for (const [slot, bucket] of perSlotRenders) {
|
|
51940
|
+
const distinctSources = new Set(bucket.map((b) => b.sourceTrait));
|
|
51941
|
+
if (distinctSources.size <= 1) continue;
|
|
51942
|
+
uiSlots.render({
|
|
51943
|
+
target: slot,
|
|
51944
|
+
pattern: "stack",
|
|
51945
|
+
props: {
|
|
51946
|
+
direction: "vertical",
|
|
51947
|
+
gap: "lg",
|
|
51948
|
+
children: bucket.map((b) => b.pattern)
|
|
51949
|
+
},
|
|
51950
|
+
// Use a synthetic wrapper source trait; individual traits' frames
|
|
51951
|
+
// already live in the per-trait index from the per-effect loop.
|
|
51952
|
+
sourceTrait: "__multi_source_stack__"
|
|
51953
|
+
});
|
|
51954
|
+
}
|
|
51927
51955
|
}
|
|
51928
51956
|
function TraitInitializer({ traits: traits2, orbitalNames, onNavigate, onLocalFallback, persistence }) {
|
|
51929
51957
|
const slotsActions = useSlotsActions();
|
package/dist/runtime/index.cjs
CHANGED
|
@@ -38870,11 +38870,13 @@ function SlotBridge() {
|
|
|
38870
38870
|
return null;
|
|
38871
38871
|
}
|
|
38872
38872
|
function applyServerEffects(effects, uiSlots, onNavigate) {
|
|
38873
|
+
const perSlotRenders = /* @__PURE__ */ new Map();
|
|
38873
38874
|
for (const eff of effects) {
|
|
38874
38875
|
if (eff.type === "render-ui" && eff.slot && eff.pattern) {
|
|
38875
38876
|
const patternRecord = eff.pattern;
|
|
38876
38877
|
const { type: patternType, children, ...inlineProps } = patternRecord;
|
|
38877
38878
|
const normalizedChildren = Array.isArray(children) ? children.map((c) => normalizeChild(c)) : children;
|
|
38879
|
+
const sourceTrait = eff.traitName ?? "server";
|
|
38878
38880
|
uiSlots.render({
|
|
38879
38881
|
target: eff.slot,
|
|
38880
38882
|
pattern: patternType,
|
|
@@ -38882,12 +38884,38 @@ function applyServerEffects(effects, uiSlots, onNavigate) {
|
|
|
38882
38884
|
...inlineProps,
|
|
38883
38885
|
...normalizedChildren !== void 0 ? { children: normalizedChildren } : {}
|
|
38884
38886
|
},
|
|
38885
|
-
sourceTrait
|
|
38887
|
+
sourceTrait
|
|
38886
38888
|
});
|
|
38889
|
+
const bucket = perSlotRenders.get(eff.slot) ?? [];
|
|
38890
|
+
bucket.push({
|
|
38891
|
+
sourceTrait,
|
|
38892
|
+
pattern: {
|
|
38893
|
+
type: patternType,
|
|
38894
|
+
...inlineProps,
|
|
38895
|
+
...normalizedChildren !== void 0 ? { children: normalizedChildren } : {}
|
|
38896
|
+
}
|
|
38897
|
+
});
|
|
38898
|
+
perSlotRenders.set(eff.slot, bucket);
|
|
38887
38899
|
} else if (eff.type === "navigate" && eff.route && onNavigate) {
|
|
38888
38900
|
onNavigate(eff.route, eff.params);
|
|
38889
38901
|
}
|
|
38890
38902
|
}
|
|
38903
|
+
for (const [slot, bucket] of perSlotRenders) {
|
|
38904
|
+
const distinctSources = new Set(bucket.map((b) => b.sourceTrait));
|
|
38905
|
+
if (distinctSources.size <= 1) continue;
|
|
38906
|
+
uiSlots.render({
|
|
38907
|
+
target: slot,
|
|
38908
|
+
pattern: "stack",
|
|
38909
|
+
props: {
|
|
38910
|
+
direction: "vertical",
|
|
38911
|
+
gap: "lg",
|
|
38912
|
+
children: bucket.map((b) => b.pattern)
|
|
38913
|
+
},
|
|
38914
|
+
// Use a synthetic wrapper source trait; individual traits' frames
|
|
38915
|
+
// already live in the per-trait index from the per-effect loop.
|
|
38916
|
+
sourceTrait: "__multi_source_stack__"
|
|
38917
|
+
});
|
|
38918
|
+
}
|
|
38891
38919
|
}
|
|
38892
38920
|
function TraitInitializer({ traits: traits2, orbitalNames, onNavigate, onLocalFallback, persistence }) {
|
|
38893
38921
|
const slotsActions = useSlotsActions();
|
package/dist/runtime/index.js
CHANGED
|
@@ -38825,11 +38825,13 @@ function SlotBridge() {
|
|
|
38825
38825
|
return null;
|
|
38826
38826
|
}
|
|
38827
38827
|
function applyServerEffects(effects, uiSlots, onNavigate) {
|
|
38828
|
+
const perSlotRenders = /* @__PURE__ */ new Map();
|
|
38828
38829
|
for (const eff of effects) {
|
|
38829
38830
|
if (eff.type === "render-ui" && eff.slot && eff.pattern) {
|
|
38830
38831
|
const patternRecord = eff.pattern;
|
|
38831
38832
|
const { type: patternType, children, ...inlineProps } = patternRecord;
|
|
38832
38833
|
const normalizedChildren = Array.isArray(children) ? children.map((c) => normalizeChild(c)) : children;
|
|
38834
|
+
const sourceTrait = eff.traitName ?? "server";
|
|
38833
38835
|
uiSlots.render({
|
|
38834
38836
|
target: eff.slot,
|
|
38835
38837
|
pattern: patternType,
|
|
@@ -38837,12 +38839,38 @@ function applyServerEffects(effects, uiSlots, onNavigate) {
|
|
|
38837
38839
|
...inlineProps,
|
|
38838
38840
|
...normalizedChildren !== void 0 ? { children: normalizedChildren } : {}
|
|
38839
38841
|
},
|
|
38840
|
-
sourceTrait
|
|
38842
|
+
sourceTrait
|
|
38841
38843
|
});
|
|
38844
|
+
const bucket = perSlotRenders.get(eff.slot) ?? [];
|
|
38845
|
+
bucket.push({
|
|
38846
|
+
sourceTrait,
|
|
38847
|
+
pattern: {
|
|
38848
|
+
type: patternType,
|
|
38849
|
+
...inlineProps,
|
|
38850
|
+
...normalizedChildren !== void 0 ? { children: normalizedChildren } : {}
|
|
38851
|
+
}
|
|
38852
|
+
});
|
|
38853
|
+
perSlotRenders.set(eff.slot, bucket);
|
|
38842
38854
|
} else if (eff.type === "navigate" && eff.route && onNavigate) {
|
|
38843
38855
|
onNavigate(eff.route, eff.params);
|
|
38844
38856
|
}
|
|
38845
38857
|
}
|
|
38858
|
+
for (const [slot, bucket] of perSlotRenders) {
|
|
38859
|
+
const distinctSources = new Set(bucket.map((b) => b.sourceTrait));
|
|
38860
|
+
if (distinctSources.size <= 1) continue;
|
|
38861
|
+
uiSlots.render({
|
|
38862
|
+
target: slot,
|
|
38863
|
+
pattern: "stack",
|
|
38864
|
+
props: {
|
|
38865
|
+
direction: "vertical",
|
|
38866
|
+
gap: "lg",
|
|
38867
|
+
children: bucket.map((b) => b.pattern)
|
|
38868
|
+
},
|
|
38869
|
+
// Use a synthetic wrapper source trait; individual traits' frames
|
|
38870
|
+
// already live in the per-trait index from the per-effect loop.
|
|
38871
|
+
sourceTrait: "__multi_source_stack__"
|
|
38872
|
+
});
|
|
38873
|
+
}
|
|
38846
38874
|
}
|
|
38847
38875
|
function TraitInitializer({ traits: traits2, orbitalNames, onNavigate, onLocalFallback, persistence }) {
|
|
38848
38876
|
const slotsActions = useSlotsActions();
|