@xuda.io/runtime-bundle 1.0.1418 → 1.0.1419
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.
|
@@ -31868,13 +31868,15 @@ func.runtime.ui.copy_runtime_state = function ($source, $target) {
|
|
|
31868
31868
|
const xu_data_keys = Object.keys(source_data.xuData);
|
|
31869
31869
|
for (let index = 0; index < xu_data_keys.length; index++) {
|
|
31870
31870
|
const key = xu_data_keys[index];
|
|
31871
|
-
|
|
31871
|
+
const val = source_data.xuData[key];
|
|
31872
|
+
try { target_data.xuData[key] = structuredClone(val); } catch (_) { target_data.xuData[key] = val; }
|
|
31872
31873
|
}
|
|
31873
31874
|
|
|
31874
31875
|
const xu_attribute_keys = Object.keys(source_data.xuAttributes);
|
|
31875
31876
|
for (let index = 0; index < xu_attribute_keys.length; index++) {
|
|
31876
31877
|
const key = xu_attribute_keys[index];
|
|
31877
|
-
|
|
31878
|
+
const val = source_data.xuAttributes[key];
|
|
31879
|
+
try { target_data.xuAttributes[key] = structuredClone(val); } catch (_) { target_data.xuAttributes[key] = val; }
|
|
31878
31880
|
}
|
|
31879
31881
|
return $target;
|
|
31880
31882
|
};
|
|
@@ -36668,15 +36670,22 @@ func.runtime.render.handle_legacy_xu_render = async function (options) {
|
|
|
36668
36670
|
parent_nodeP: options.parent_nodeP,
|
|
36669
36671
|
$root_container: options.$root_container,
|
|
36670
36672
|
});
|
|
36671
|
-
// Snapshot xuData
|
|
36673
|
+
// Snapshot xuData while meta store still holds the entry
|
|
36672
36674
|
const snapshot_xuData = func.runtime.ui.get_data(cloned_div).xuData;
|
|
36673
36675
|
const snapshot_xuAttributes = options.nodeP.attributes || {};
|
|
36674
36676
|
const xu_ui_id = func.runtime.ui.get_attr(options.$elm, 'xu-ui-id');
|
|
36675
36677
|
|
|
36676
|
-
// Remove original element
|
|
36677
|
-
func.runtime.ui.remove(
|
|
36678
|
+
// Remove original element from DOM WITHOUT deleting _meta_store.
|
|
36679
|
+
// Using func.runtime.ui.remove() would call delete_meta(xu_ui_id),
|
|
36680
|
+
// wiping the meta entry before create_xu_render_placeholder can write it.
|
|
36681
|
+
// The XURENDER placeholder reuses the same xu-ui-id, so the meta entry
|
|
36682
|
+
// will be overwritten below — no orphaned data.
|
|
36683
|
+
const _elm_node = func.runtime.ui.get_first_node(options.$elm);
|
|
36684
|
+
if (_elm_node?.remove) {
|
|
36685
|
+
_elm_node.remove();
|
|
36686
|
+
}
|
|
36678
36687
|
|
|
36679
|
-
//
|
|
36688
|
+
// Create XURENDER placeholder (overwrites meta store entry for this xu-ui-id)
|
|
36680
36689
|
func.runtime.render.create_xu_render_placeholder(xu_ui_id, options.$container, {
|
|
36681
36690
|
hidden: true,
|
|
36682
36691
|
xuData: snapshot_xuData,
|