aa-coordination
Rich Harris 7 months ago
parent 70fa1033de
commit 176ec0d67b

@ -1,6 +1,6 @@
/** @import { Effect, TemplateNode } from '#client' */
import { FILENAME, HYDRATION_ERROR } from '../../../../constants.js';
import { block, branch, destroy_effect, template_effect } from '../../reactivity/effects.js';
import { branch, destroy_effect, template_effect } from '../../reactivity/effects.js';
import { hydrate_next, hydrate_node, hydrating, set_hydrate_node } from '../hydration.js';
import { create_fragment_from_html } from '../reconciler.js';
import { assign_nodes } from '../template.js';
@ -9,8 +9,6 @@ import { hash, sanitize_location } from '../../../../utils.js';
import { DEV } from 'esm-env';
import { dev_current_component_function } from '../../context.js';
import { get_first_child, get_next_sibling } from '../operations.js';
import { active_effect, suspended } from '../../runtime.js';
import { add_boundary_callback, find_boundary } from './boundary.js';
/**
* @param {Element} element

@ -10,7 +10,7 @@ import {
} from '../hydration.js';
import { block, branch, pause_effect, resume_effect } from '../../reactivity/effects.js';
import { HYDRATION_START_ELSE, UNINITIALIZED } from '../../../../constants.js';
import { active_effect, suspended } from '../../runtime.js';
import { active_effect } from '../../runtime.js';
import { add_boundary_callback, find_boundary } from './boundary.js';
import { should_defer_append } from '../operations.js';

@ -2,10 +2,11 @@
import { UNINITIALIZED } from '../../../../constants.js';
import { block, branch, pause_effect } from '../../reactivity/effects.js';
import { not_equal, safe_not_equal } from '../../reactivity/equality.js';
import { active_effect, suspended } from '../../runtime.js';
import { active_effect } from '../../runtime.js';
import { is_runes } from '../../context.js';
import { hydrate_next, hydrate_node, hydrating } from '../hydration.js';
import { add_boundary_callback, find_boundary } from './boundary.js';
import { should_defer_append } from '../operations.js';
/**
* @template V
@ -57,14 +58,16 @@ export function key_block(node, get_key, render_fn) {
if (changed(key, (key = get_key()))) {
var target = anchor;
if (suspended) {
var defer = boundary !== null && should_defer_append();
if (defer) {
offscreen_fragment = document.createDocumentFragment();
offscreen_fragment.append((target = document.createComment('')));
}
pending_effect = branch(() => render_fn(target));
if (suspended) {
if (defer) {
add_boundary_callback(boundary, commit);
} else {
commit();

@ -97,8 +97,6 @@ export let active_reaction = null;
export let untracking = false;
export let suspended = false;
/** @param {null | Reaction} reaction */
export function set_active_reaction(reaction) {
active_reaction = reaction;

Loading…
Cancel
Save