mirror of
https://github.com/withastro/astro.git
synced 2025-02-17 22:44:24 -05:00
[ci] format
This commit is contained in:
parent
2013e70bce
commit
c7edb22b4b
6 changed files with 9 additions and 9 deletions
|
@ -306,8 +306,8 @@ test.describe('Dev Toolbar', () => {
|
|||
await expect(customAppNotification).toHaveAttribute('data-level', 'warning');
|
||||
|
||||
await expect(customAppNotification).toBeVisible();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
test('can quit apps by clicking outside the window', async ({ page, astro }) => {
|
||||
await page.goto(astro.resolveUrl('/'));
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import { finder } from '@medv/finder';
|
||||
import type { DevToolbarApp, DevToolbarMetadata } from '../../../../../@types/astro.js';
|
||||
import { settings } from '../../settings.js';
|
||||
import type { DevToolbarHighlight } from '../../ui-library/highlight.js';
|
||||
import {
|
||||
attachTooltipToHighlight,
|
||||
|
@ -10,7 +11,6 @@ import {
|
|||
import { closeOnOutsideClick, createWindowElement } from '../utils/window.js';
|
||||
import { a11y } from './a11y.js';
|
||||
import { perf } from './perf.js';
|
||||
import { settings } from '../../settings.js';
|
||||
|
||||
const icon =
|
||||
'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 1 20 16"><path fill="#fff" d="M.6 2A1.1 1.1 0 0 1 1.7.9h16.6a1.1 1.1 0 1 1 0 2.2H1.6A1.1 1.1 0 0 1 .8 2Zm1.1 7.1h6a1.1 1.1 0 0 0 0-2.2h-6a1.1 1.1 0 0 0 0 2.2ZM9.3 13H1.8a1.1 1.1 0 1 0 0 2.2h7.5a1.1 1.1 0 1 0 0-2.2Zm11.3 1.9a1.1 1.1 0 0 1-1.5 0l-1.7-1.7a4.1 4.1 0 1 1 1.6-1.6l1.6 1.7a1.1 1.1 0 0 1 0 1.6Zm-5.3-3.4a1.9 1.9 0 1 0 0-3.8 1.9 1.9 0 0 0 0 3.8Z"/></svg>';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { getIconElement, isDefinedIcon, type Icon } from './icons.js';
|
||||
import { settings } from '../settings.js';
|
||||
import { type Icon, getIconElement, isDefinedIcon } from './icons.js';
|
||||
|
||||
const styles = ['purple', 'gray', 'red', 'green', 'yellow', 'blue'] as const;
|
||||
|
||||
|
|
|
@ -309,7 +309,7 @@ async function updateDOM(
|
|||
const shouldCopyProps = (el: HTMLElement): boolean => {
|
||||
const persistProps = el.dataset.astroTransitionPersistProps;
|
||||
return persistProps == null || persistProps === 'false';
|
||||
}
|
||||
};
|
||||
|
||||
const defaultSwap = (beforeSwapEvent: TransitionBeforeSwapEvent) => {
|
||||
// swap attributes of the html element
|
||||
|
@ -375,7 +375,7 @@ async function updateDOM(
|
|||
// from the old page so that state is preserved.
|
||||
newEl.replaceWith(el);
|
||||
// For islands, copy over the props to allow them to re-render
|
||||
if(newEl.localName === 'astro-island' && shouldCopyProps(el as HTMLElement)) {
|
||||
if (newEl.localName === 'astro-island' && shouldCopyProps(el as HTMLElement)) {
|
||||
el.setAttribute('ssr', '');
|
||||
el.setAttribute('props', newEl.getAttribute('props')!);
|
||||
}
|
||||
|
|
|
@ -57,7 +57,7 @@ function getChildren(childString, experimentalReactChildren) {
|
|||
let rootMap = new WeakMap();
|
||||
const getOrCreateRoot = (element, creator) => {
|
||||
let root = rootMap.get(element);
|
||||
if(!root) {
|
||||
if (!root) {
|
||||
root = creator();
|
||||
rootMap.set(element, root);
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import type { Root } from 'hast';
|
||||
import type { Plugin } from 'unified';
|
||||
import { createShikiHighlighter, type ShikiHighlighter } from './shiki.js';
|
||||
import type { ShikiConfig } from './types.js';
|
||||
import { highlightCodeBlocks } from './highlight.js';
|
||||
import { type ShikiHighlighter, createShikiHighlighter } from './shiki.js';
|
||||
import type { ShikiConfig } from './types.js';
|
||||
|
||||
export const rehypeShiki: Plugin<[ShikiConfig?], Root> = (config) => {
|
||||
let highlighterAsync: Promise<ShikiHighlighter> | undefined;
|
||||
|
|
Loading…
Add table
Reference in a new issue