From f073e22c4dda783c7d093a6ac46abaa664923d54 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Thu, 22 Feb 2024 17:54:13 -0500 Subject: [PATCH] remove more stuff --- .../src/internal/client/dom/blocks/each.js | 42 ++----------------- 1 file changed, 3 insertions(+), 39 deletions(-) diff --git a/packages/svelte/src/internal/client/dom/blocks/each.js b/packages/svelte/src/internal/client/dom/blocks/each.js index aa1ff03954..c3266b91c7 100644 --- a/packages/svelte/src/internal/client/dom/blocks/each.js +++ b/packages/svelte/src/internal/client/dom/blocks/each.js @@ -6,7 +6,6 @@ import { EACH_ITEM_REACTIVE, EACH_KEYED } from '../../../../constants.js'; -import { noop } from '../../../common.js'; import { current_hydration_fragment, get_hydration_fragment, @@ -14,16 +13,9 @@ import { hydrating, set_current_hydration_fragment } from '../../hydration.js'; -import { clear_text_content, empty, map_get, map_set } from '../../operations.js'; +import { empty, map_get, map_set } from '../../operations.js'; import { insert, remove } from '../../reconciler.js'; -import { - current_block, - current_effect, - destroy_signal, - execute_effect, - push_destroy_fn, - set_signal_value -} from '../../runtime.js'; +import { current_block, destroy_signal, set_signal_value } from '../../runtime.js'; import { destroy_effect, pause_effect, @@ -33,40 +25,12 @@ import { import { source, mutable_source } from '../../reactivity/sources.js'; import { trigger_transitions } from '../../transitions.js'; import { is_array } from '../../utils.js'; -import { BRANCH_EFFECT, EACH_BLOCK, EACH_ITEM_BLOCK } from '../../constants.js'; -import { unstate } from '../../proxy.js'; +import { BRANCH_EFFECT, EACH_ITEM_BLOCK } from '../../constants.js'; const NEW_BLOCK = -1; const MOVED_BLOCK = 99999999; const LIS_BLOCK = -2; -/** - * @param {number} flags - * @param {Element | Comment} anchor - * @returns {import('../../types.js').EachBlock} - */ -export function create_each_block(flags, anchor) { - return { - // anchor - a: anchor, - // dom - d: null, - // flags - f: flags, - // items - v: [], - // effect - e: null, - p: /** @type {import('../../types.js').Block} */ (current_block), - // transition - r: null, - // transitions - s: [], - // type - t: EACH_BLOCK - }; -} - /** * @param {any | import('../../types.js').Signal} item * @param {number | import('../../types.js').Signal} index