revert rename

aaa
Rich Harris 8 months ago
parent 4782a892b5
commit 65385c277f

@ -13,7 +13,7 @@ import {
set_dev_current_component_function
} from '../../runtime.js';
import { hydrate_next, hydrate_node, hydrating } from '../hydration.js';
import { queue_post_micro_task } from '../task.js';
import { queue_micro_task } from '../task.js';
import { UNINITIALIZED } from '../../../../constants.js';
const PENDING = 0;
@ -148,7 +148,7 @@ export function await_block(node, get_input, pending_fn, then_fn, catch_fn) {
} else {
// Wait a microtask before checking if we should show the pending state as
// the promise might have resolved by the next microtask.
queue_post_micro_task(() => {
queue_micro_task(() => {
if (!resolved) update(PENDING, true);
});
}

@ -27,7 +27,7 @@ import {
set_hydrate_node
} from '../hydration.js';
import { get_next_sibling } from '../operations.js';
import { queue_boundary_micro_task, queue_post_micro_task } from '../task.js';
import { queue_boundary_micro_task, queue_micro_task } from '../task.js';
import * as e from '../../../shared/errors.js';
const ASYNC_INCREMENT = Symbol();
@ -254,7 +254,7 @@ export function capture() {
set_component_context(previous_component_context);
// prevent the active effect from outstaying its welcome
queue_post_micro_task(exit);
queue_micro_task(exit);
};
}

@ -34,7 +34,7 @@ import {
import { source, mutable_source, internal_set } from '../../reactivity/sources.js';
import { array_from, is_array } from '../../../shared/utils.js';
import { INERT } from '../../constants.js';
import { queue_post_micro_task } from '../task.js';
import { queue_micro_task } from '../task.js';
import { active_effect, active_reaction, get } from '../../runtime.js';
import { DEV } from 'esm-env';
import { derived_safe_equal } from '../../reactivity/deriveds.js';
@ -470,7 +470,7 @@ function reconcile(array, state, anchor, render_fn, flags, is_inert, get_key, ge
}
if (is_animated) {
queue_post_micro_task(() => {
queue_micro_task(() => {
if (to_animate === undefined) return;
for (item of to_animate) {
item.a?.apply();

@ -1,5 +1,5 @@
import { DEV } from 'esm-env';
import { queue_post_micro_task } from './task.js';
import { queue_micro_task } from './task.js';
import { register_style } from '../dev/css.js';
/**
@ -7,8 +7,8 @@ import { register_style } from '../dev/css.js';
* @param {{ hash: string, code: string }} css
*/
export function append_styles(anchor, css) {
// Use `queue_post_micro_task` to ensure `anchor` is in the DOM, otherwise getRootNode() will yield wrong results
queue_post_micro_task(() => {
// Use `queue_micro_task` to ensure `anchor` is in the DOM, otherwise getRootNode() will yield wrong results
queue_micro_task(() => {
var root = anchor.getRootNode();
var target = /** @type {ShadowRoot} */ (root).host

@ -3,7 +3,7 @@ import { render_effect, teardown } from '../../../reactivity/effects.js';
import { listen_to_event_and_reset_event } from './shared.js';
import * as e from '../../../errors.js';
import { is } from '../../../proxy.js';
import { queue_post_micro_task } from '../../task.js';
import { queue_micro_task } from '../../task.js';
import { hydrating } from '../../hydration.js';
import { is_runes, untrack } from '../../../runtime.js';
@ -158,14 +158,14 @@ export function bind_group(inputs, group_index, input, get, set = get) {
if (!pending.has(binding_group)) {
pending.add(binding_group);
queue_post_micro_task(() => {
queue_micro_task(() => {
// necessary to maintain binding group order in all insertion scenarios
binding_group.sort((a, b) => (a.compareDocumentPosition(b) === 4 ? -1 : 1));
pending.delete(binding_group);
});
}
queue_post_micro_task(() => {
queue_micro_task(() => {
if (hydration_mismatch) {
var value;

@ -1,7 +1,7 @@
import { STATE_SYMBOL } from '../../../constants.js';
import { effect, render_effect } from '../../../reactivity/effects.js';
import { untrack } from '../../../runtime.js';
import { queue_post_micro_task } from '../../task.js';
import { queue_micro_task } from '../../task.js';
/**
* @param {any} bound_value
@ -49,7 +49,7 @@ export function bind_this(element_or_component = {}, update, get_value, get_part
return () => {
// We cannot use effects in the teardown phase, we we use a microtask instead.
queue_post_micro_task(() => {
queue_micro_task(() => {
if (parts && is_bound_this(get_value(...parts), element_or_component)) {
update(null, ...parts);
}

@ -2,7 +2,7 @@
import { teardown } from '../../reactivity/effects.js';
import { define_property, is_array } from '../../../shared/utils.js';
import { hydrating } from '../hydration.js';
import { queue_post_micro_task } from '../task.js';
import { queue_micro_task } from '../task.js';
import { FILENAME } from '../../../../constants.js';
import * as w from '../../warnings.js';
import {
@ -77,7 +77,7 @@ export function create_event(event_name, dom, handler, options = {}) {
event_name.startsWith('touch') ||
event_name === 'wheel'
) {
queue_post_micro_task(() => {
queue_micro_task(() => {
dom.addEventListener(event_name, target_handler, options);
});
} else {

@ -1,6 +1,6 @@
import { hydrating } from '../hydration.js';
import { clear_text_content, get_first_child } from '../operations.js';
import { queue_post_micro_task } from '../task.js';
import { queue_micro_task } from '../task.js';
/**
* @param {HTMLElement} dom
@ -12,7 +12,7 @@ export function autofocus(dom, value) {
const body = document.body;
dom.autofocus = true;
queue_post_micro_task(() => {
queue_micro_task(() => {
if (document.activeElement === body) {
dom.focus();
}

@ -13,7 +13,7 @@ import { should_intro } from '../../render.js';
import { current_each_item } from '../blocks/each.js';
import { TRANSITION_GLOBAL, TRANSITION_IN, TRANSITION_OUT } from '../../../../constants.js';
import { BLOCK_EFFECT, EFFECT_RAN, EFFECT_TRANSPARENT } from '../../constants.js';
import { queue_post_micro_task } from '../task.js';
import { queue_micro_task } from '../task.js';
/**
* @param {Element} element
@ -326,7 +326,7 @@ function animate(element, options, counterpart, t2, on_finish) {
var a;
var aborted = false;
queue_post_micro_task(() => {
queue_micro_task(() => {
if (aborted) return;
var o = options({ direction: is_intro ? 'in' : 'out' });
a = animate(element, o, counterpart, t2, on_finish);

@ -59,7 +59,7 @@ export function queue_boundary_micro_task(fn) {
/**
* @param {() => void} fn
*/
export function queue_post_micro_task(fn) {
export function queue_micro_task(fn) {
if (!is_micro_task_queued) {
is_micro_task_queued = true;
queueMicrotask(flush_all_micro_tasks);

@ -145,7 +145,7 @@ export function async_derived(fn) {
async_deps.add(value);
// TODO we want to clear this after we've updated effects.
// `queue_post_micro_task` appears to run too early.
// `queue_micro_task` appears to run too early.
// for now, as a POC, use setTimeout
setTimeout(() => {
async_deps.delete(value);

@ -1,6 +1,6 @@
import { flushSync } from 'svelte';
import { raf as svelte_raf } from 'svelte/internal/client';
import { queue_post_micro_task } from '../src/internal/client/dom/task.js';
import { queue_micro_task } from '../src/internal/client/dom/task.js';
export const raf = {
animations: new Set(),
@ -132,7 +132,7 @@ class Animation {
/** @param {() => {}} fn */
set onfinish(fn) {
if (this.#duration === 0) {
queue_post_micro_task(fn);
queue_micro_task(fn);
} else {
this.#onfinish = () => {
fn();

Loading…
Cancel
Save