prettier-plugin-astro 1.0.0-beta.1 → 1.0.0
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.
- package/dist/index.js +375 -59
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { parse as parse$1 } from '@astrojs/compiler-rs';
|
|
2
|
+
import parseSrcset from '@prettier/parse-srcset';
|
|
2
3
|
import { doc } from 'prettier';
|
|
3
4
|
import { printers as printers$1 } from 'prettier/plugins/estree';
|
|
4
5
|
import { SassFormatter } from 'sass-formatter';
|
|
@@ -53,6 +54,15 @@ function tagNameOf(node) {
|
|
|
53
54
|
const name = node.openingElement?.name;
|
|
54
55
|
return name?.type === 'JSXIdentifier' ? name.name : null;
|
|
55
56
|
}
|
|
57
|
+
function jsxNameOf(name) {
|
|
58
|
+
if (name.type === 'JSXIdentifier')
|
|
59
|
+
return name.name;
|
|
60
|
+
if (name.type !== 'JSXMemberExpression')
|
|
61
|
+
return null;
|
|
62
|
+
const object = jsxNameOf(name.object);
|
|
63
|
+
const property = jsxNameOf(name.property);
|
|
64
|
+
return object !== null && property !== null ? `${object}.${property}` : null;
|
|
65
|
+
}
|
|
56
66
|
const isComponentName = (name) => name === null || /^[A-Z]/.test(name) || name.includes('.');
|
|
57
67
|
function attributesOf(node) {
|
|
58
68
|
const opening = node.openingElement;
|
|
@@ -242,19 +252,20 @@ function isInlineDisplay(display) {
|
|
|
242
252
|
return inlineLevel.has(display);
|
|
243
253
|
}
|
|
244
254
|
|
|
255
|
+
const { group: group$3, ifBreak, indent: indent$3, join: join$1, line: line$2, softline: softline$3 } = doc.builders;
|
|
245
256
|
function manualDedent(input) {
|
|
246
257
|
let minTabSize = Infinity;
|
|
247
258
|
let result = input;
|
|
248
259
|
result = result.replace(/\r\n/g, '\n');
|
|
249
260
|
let char = '';
|
|
250
|
-
for (const
|
|
251
|
-
if (!
|
|
261
|
+
for (const row of result.split('\n')) {
|
|
262
|
+
if (!row)
|
|
252
263
|
continue;
|
|
253
|
-
if (
|
|
264
|
+
if (row[0] && /^\S/.test(row[0])) {
|
|
254
265
|
minTabSize = 0;
|
|
255
266
|
break;
|
|
256
267
|
}
|
|
257
|
-
const match = /^(\s+)\S+/.exec(
|
|
268
|
+
const match = /^(\s+)\S+/.exec(row);
|
|
258
269
|
if (match) {
|
|
259
270
|
if (match[1] && !char)
|
|
260
271
|
char = match[1][0];
|
|
@@ -271,11 +282,39 @@ function manualDedent(input) {
|
|
|
271
282
|
result,
|
|
272
283
|
};
|
|
273
284
|
}
|
|
285
|
+
function printSrcset(value) {
|
|
286
|
+
const candidates = parseSrcset(decodeQuoteEntities(value));
|
|
287
|
+
const descriptorUnits = { width: 'w', height: 'h', density: 'x' };
|
|
288
|
+
const descriptorTypes = Object.keys(descriptorUnits).filter((type) => candidates.some((candidate) => candidate[type]));
|
|
289
|
+
if (descriptorTypes.length > 1)
|
|
290
|
+
throw new Error('Mixed descriptor in srcset is not supported');
|
|
291
|
+
const descriptorType = descriptorTypes[0];
|
|
292
|
+
const unit = descriptorType ? descriptorUnits[descriptorType] : '';
|
|
293
|
+
const urls = candidates.map((candidate) => candidate.source.value);
|
|
294
|
+
const widestUrl = Math.max(...urls.map((url) => url.length));
|
|
295
|
+
const descriptors = candidates.map((candidate) => descriptorType && candidate[descriptorType] ? String(candidate[descriptorType].value) : '');
|
|
296
|
+
const descriptorLeftLengths = descriptors.map((descriptor) => {
|
|
297
|
+
const decimal = descriptor.indexOf('.');
|
|
298
|
+
return decimal === -1 ? descriptor.length : decimal;
|
|
299
|
+
});
|
|
300
|
+
const widestDescriptorLeft = Math.max(...descriptorLeftLengths);
|
|
301
|
+
const printed = urls.map((url, index) => {
|
|
302
|
+
const parts = [url.replaceAll('"', '"')];
|
|
303
|
+
const descriptor = descriptors[index];
|
|
304
|
+
if (descriptor) {
|
|
305
|
+
const padding = widestUrl - url.length + 1 + widestDescriptorLeft - descriptorLeftLengths[index];
|
|
306
|
+
parts.push(ifBreak(' '.repeat(padding), ' '), descriptor + unit);
|
|
307
|
+
}
|
|
308
|
+
return parts;
|
|
309
|
+
});
|
|
310
|
+
return group$3([indent$3([softline$3, join$1([',', line$2], printed)]), softline$3]);
|
|
311
|
+
}
|
|
312
|
+
const decodeQuoteEntities = (text) => text.replaceAll(''', "'").replaceAll('"', '"');
|
|
274
313
|
function printClassNames(value) {
|
|
275
314
|
const lines = value.trim().split(/[\r\n]+/);
|
|
276
|
-
const formattedLines = lines.map((
|
|
277
|
-
const spaces = /^\s+/.exec(
|
|
278
|
-
return (spaces ? spaces[0] : '') +
|
|
315
|
+
const formattedLines = lines.map((row) => {
|
|
316
|
+
const spaces = /^\s+/.exec(row);
|
|
317
|
+
return (spaces ? spaces[0] : '') + row.trim().split(/\s+/).join(' ');
|
|
279
318
|
});
|
|
280
319
|
return formattedLines.join('\n');
|
|
281
320
|
}
|
|
@@ -284,11 +323,14 @@ const leadingWhitespace$1 = /^[\t\n\f\r ]+/;
|
|
|
284
323
|
const trailingWhitespace$1 = /[\t\n\f\r ]+$/;
|
|
285
324
|
const hasNewline = (run) => /[\n\r]/.test(run);
|
|
286
325
|
const isText = (node) => node?.type === 'JSXText';
|
|
326
|
+
const isComment = (node) => node?.type === 'AstroComment';
|
|
287
327
|
const rawTextOf = (node) => node.raw ?? '';
|
|
288
328
|
const isWhitespaceOnly = (node) => isText(node) && rawTextOf(node).trim().length === 0;
|
|
289
329
|
function opensRawSubtree(node) {
|
|
290
330
|
if (node.type !== 'JSXElement')
|
|
291
331
|
return false;
|
|
332
|
+
if (node.astroPreserveWhitespace)
|
|
333
|
+
return true;
|
|
292
334
|
if (hasAttribute(node, 'is:raw'))
|
|
293
335
|
return true;
|
|
294
336
|
const tag = tagNameOf(node);
|
|
@@ -301,9 +343,62 @@ function displayOf(node) {
|
|
|
301
343
|
const tag = tagNameOf(node);
|
|
302
344
|
if (tag === null || isComponentName(tag) || tag.includes('-'))
|
|
303
345
|
return 'inline';
|
|
346
|
+
if (node.astroSvg)
|
|
347
|
+
return tag === 'svg' ? 'inline-block' : node.astroSvgText ? 'inline' : 'block';
|
|
304
348
|
return displayOfTag(tag);
|
|
305
349
|
}
|
|
350
|
+
const isBlockBox = (node) => node !== null && node.type !== 'JSXText' && !isInlineDisplay(displayOf(node));
|
|
351
|
+
const swallowsEdgeWhitespace = (node) => {
|
|
352
|
+
const display = displayOf(node);
|
|
353
|
+
return display === 'inline-block' || !isInlineDisplay(display);
|
|
354
|
+
};
|
|
355
|
+
const breaksOwnChildren = new Set(['html', 'head', 'ul', 'ol', 'select']);
|
|
356
|
+
const breaksOwnContent = new Set(['body', 'script', 'style']);
|
|
357
|
+
function breaksChildren(node) {
|
|
358
|
+
const tag = node.type === 'JSXElement' ? tagNameOf(node) : null;
|
|
359
|
+
if (tag === null || isComponentName(tag))
|
|
360
|
+
return false;
|
|
361
|
+
if (breaksOwnChildren.has(tag))
|
|
362
|
+
return true;
|
|
363
|
+
const display = displayOfTag(tag);
|
|
364
|
+
return display.startsWith('table') && display !== 'table-cell';
|
|
365
|
+
}
|
|
366
|
+
const hasElementChild = (node) => childrenOf(node)?.some((child) => child.type === 'JSXElement') ?? false;
|
|
367
|
+
const runBefore = (node) => node && isText(node) ? (trailingWhitespace$1.exec(rawTextOf(node))?.[0] ?? '') : '';
|
|
368
|
+
const runAfter = (node) => node && isText(node) ? (leadingWhitespace$1.exec(rawTextOf(node))?.[0] ?? '') : '';
|
|
369
|
+
function sitsOnItsOwnLine(container, child) {
|
|
370
|
+
if (child === null || isText(child))
|
|
371
|
+
return false;
|
|
372
|
+
const children = childrenOf(container);
|
|
373
|
+
const index = children?.indexOf(child) ?? -1;
|
|
374
|
+
if (index === -1)
|
|
375
|
+
return false;
|
|
376
|
+
return hasNewline(runBefore(children[index - 1])) && hasNewline(runAfter(children[index + 1]));
|
|
377
|
+
}
|
|
378
|
+
const hasChildOnItsOwnLine = (node) => childrenOf(node)?.some((child) => sitsOnItsOwnLine(node, child)) ?? false;
|
|
379
|
+
function forcesBreak(node) {
|
|
380
|
+
if (breaksChildren(node))
|
|
381
|
+
return true;
|
|
382
|
+
const children = childrenOf(node);
|
|
383
|
+
if (children === null)
|
|
384
|
+
return false;
|
|
385
|
+
const tag = node.type === 'JSXElement' ? tagNameOf(node) : null;
|
|
386
|
+
if (tag !== null && breaksOwnContent.has(tag))
|
|
387
|
+
return true;
|
|
388
|
+
return children.some(hasElementChild) || hasChildOnItsOwnLine(node);
|
|
389
|
+
}
|
|
306
390
|
const isBlankRun = (run) => /[\n\r][^\S\n\r]*[\n\r]/.test(run);
|
|
391
|
+
const isEmptySlot = (node) => node.type === 'JSXElement' && tagNameOf(node) === 'slot' && (childrenOf(node)?.length ?? 0) === 0;
|
|
392
|
+
function canRenderEmpty(container) {
|
|
393
|
+
const tag = container.type === 'JSXElement' ? tagNameOf(container) : null;
|
|
394
|
+
if (tag === null || isComponentName(tag))
|
|
395
|
+
return false;
|
|
396
|
+
const children = childrenOf(container);
|
|
397
|
+
if (children === null)
|
|
398
|
+
return false;
|
|
399
|
+
const content = children.filter((child) => !isWhitespaceOnly(child) && !isComment(child));
|
|
400
|
+
return (children.some((child) => isComment(child) || isEmptySlot(child)) && content.every(isEmptySlot));
|
|
401
|
+
}
|
|
307
402
|
function sidesFor(boundary) {
|
|
308
403
|
if (boundary.edge)
|
|
309
404
|
return [null];
|
|
@@ -352,16 +447,26 @@ function separatorFor(run, boundary, settings) {
|
|
|
352
447
|
return run === '' ? 'none' : 'space';
|
|
353
448
|
const free = isFree(internal) || (sides !== null && mayAlterRenderedWhitespace(internal));
|
|
354
449
|
if (boundary.edge) {
|
|
450
|
+
if (settings.sensitivity !== 'ignore' && canRenderEmpty(boundary.container)) {
|
|
451
|
+
return run === '' ? 'none' : 'space';
|
|
452
|
+
}
|
|
355
453
|
if (free)
|
|
356
454
|
return 'soft';
|
|
357
455
|
return run === '' ? 'none' : 'space';
|
|
358
456
|
}
|
|
359
457
|
if (isBlankRun(run))
|
|
360
458
|
return 'blank';
|
|
361
|
-
if (
|
|
459
|
+
if (settings.sensitivity === 'ignore')
|
|
460
|
+
return 'break';
|
|
461
|
+
if (hasNewline(run) &&
|
|
462
|
+
(sitsOnItsOwnLine(boundary.container, boundary.prev) ||
|
|
463
|
+
sitsOnItsOwnLine(boundary.container, boundary.next))) {
|
|
464
|
+
return 'break';
|
|
465
|
+
}
|
|
466
|
+
if (run !== '' && (isComment(boundary.prev) || isComment(boundary.next)))
|
|
362
467
|
return 'break';
|
|
363
468
|
if (free)
|
|
364
|
-
return 'soft';
|
|
469
|
+
return isBlockBox(boundary.prev) || isBlockBox(boundary.next) ? 'break' : 'soft';
|
|
365
470
|
return run === '' ? 'none' : 'space';
|
|
366
471
|
}
|
|
367
472
|
function normalizeWhitespace(template, options) {
|
|
@@ -455,6 +560,8 @@ function decide(run, boundary) {
|
|
|
455
560
|
const { mode } = boundary.context;
|
|
456
561
|
if (isSlotFallback(boundary))
|
|
457
562
|
return 'space';
|
|
563
|
+
if (boundary.context.sensitivity !== 'ignore' && canRenderEmpty(boundary.container))
|
|
564
|
+
return 'keep';
|
|
458
565
|
if (isFree(boundary))
|
|
459
566
|
return 'drop';
|
|
460
567
|
if (mayAlterRenderedWhitespace(boundary))
|
|
@@ -475,11 +582,11 @@ function isFree(boundary) {
|
|
|
475
582
|
const tag = container.type === 'JSXElement' ? tagNameOf(container) : null;
|
|
476
583
|
if (loneChild && tag !== null && isComponentName(tag))
|
|
477
584
|
return true;
|
|
585
|
+
if (context.sensitivity !== 'strict' && breaksChildren(container))
|
|
586
|
+
return true;
|
|
478
587
|
if (mode === 'html') {
|
|
479
588
|
if (loneChild)
|
|
480
589
|
return true;
|
|
481
|
-
if (tag === 'head')
|
|
482
|
-
return true;
|
|
483
590
|
}
|
|
484
591
|
return false;
|
|
485
592
|
}
|
|
@@ -489,7 +596,7 @@ function mayAlterRenderedWhitespace(boundary) {
|
|
|
489
596
|
return true;
|
|
490
597
|
if (sensitivity === 'strict')
|
|
491
598
|
return false;
|
|
492
|
-
return boundary.sides.
|
|
599
|
+
return boundary.sides.some((side) => side === null ? swallowsEdgeWhitespace(boundary.container) : isBlockBox(side));
|
|
493
600
|
}
|
|
494
601
|
function isSlotFallback(boundary) {
|
|
495
602
|
return (boundary.container.type === 'JSXElement' &&
|
|
@@ -505,6 +612,7 @@ function parse(source, options) {
|
|
|
505
612
|
stripParentheses(ast);
|
|
506
613
|
repairSpans(ast);
|
|
507
614
|
markAttributes(ast, source);
|
|
615
|
+
markSvgNamespace(ast);
|
|
508
616
|
applyPrettierIgnore(ast);
|
|
509
617
|
const body = ast.body;
|
|
510
618
|
const template = templateFragment(ast, body);
|
|
@@ -572,28 +680,43 @@ function repairSpans(root) {
|
|
|
572
680
|
}
|
|
573
681
|
function markAttributes(root, source) {
|
|
574
682
|
walk(root, (node) => {
|
|
575
|
-
if (node.type !== '
|
|
576
|
-
return;
|
|
577
|
-
const value = node.value;
|
|
578
|
-
if (!value)
|
|
683
|
+
if (node.type !== 'JSXElement')
|
|
579
684
|
return;
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
if (
|
|
584
|
-
|
|
585
|
-
|
|
685
|
+
const tag = tagNameOf(node);
|
|
686
|
+
const htmlElement = tag !== null && !isComponentName(tag);
|
|
687
|
+
for (const attribute of attributesOf(node)) {
|
|
688
|
+
if (attribute.type !== 'JSXAttribute')
|
|
689
|
+
continue;
|
|
690
|
+
const name = String(attribute.name.name).toLowerCase();
|
|
691
|
+
if (htmlElement && name === 'style')
|
|
692
|
+
attribute.astroStyleAttribute = true;
|
|
693
|
+
if ((tag === 'img' || tag === 'source') && name === 'srcset') {
|
|
694
|
+
attribute.astroSrcsetAttribute = true;
|
|
586
695
|
}
|
|
587
|
-
|
|
696
|
+
markAttribute(attribute, source);
|
|
588
697
|
}
|
|
589
|
-
if (value.type !== 'JSXExpressionContainer')
|
|
590
|
-
return;
|
|
591
|
-
if (source[node.start] === '{')
|
|
592
|
-
node.astroShorthand = true;
|
|
593
|
-
if (source[value.start] === '`')
|
|
594
|
-
node.astroBacktick = true;
|
|
595
698
|
});
|
|
596
699
|
}
|
|
700
|
+
function markAttribute(node, source) {
|
|
701
|
+
const value = node.value;
|
|
702
|
+
if (!value)
|
|
703
|
+
return;
|
|
704
|
+
if (value.type === 'Literal' && typeof value.value === 'string') {
|
|
705
|
+
const name = node.name.name;
|
|
706
|
+
const text = name === 'class' ? printClassNames(value.value) : value.value;
|
|
707
|
+
if (value.raw === null || text !== value.value) {
|
|
708
|
+
value.value = text;
|
|
709
|
+
value.raw = `"${text.replaceAll('"', '"')}"`;
|
|
710
|
+
}
|
|
711
|
+
return;
|
|
712
|
+
}
|
|
713
|
+
if (value.type !== 'JSXExpressionContainer')
|
|
714
|
+
return;
|
|
715
|
+
if (source[node.start] === '{')
|
|
716
|
+
node.astroShorthand = true;
|
|
717
|
+
if (source[value.start] === '`')
|
|
718
|
+
node.astroBacktick = true;
|
|
719
|
+
}
|
|
597
720
|
function applyPrettierIgnore(root) {
|
|
598
721
|
walk(root, (node) => {
|
|
599
722
|
const children = node.type === 'AstroRoot' ? node.body : childrenOf(node);
|
|
@@ -610,6 +733,28 @@ function applyPrettierIgnore(root) {
|
|
|
610
733
|
}
|
|
611
734
|
});
|
|
612
735
|
}
|
|
736
|
+
const svgTextElements = new Set(['text', 'textPath', 'tspan']);
|
|
737
|
+
function markSvgNamespace(root) {
|
|
738
|
+
const mark = (node, inText = false, inheritedPreserve = false) => {
|
|
739
|
+
node.astroSvg = true;
|
|
740
|
+
const textContent = inText || svgTextElements.has(tagNameOf(node) ?? '');
|
|
741
|
+
const whitespace = attributeStringValue(node, 'xml:space');
|
|
742
|
+
const preserve = whitespace === 'preserve' || (inheritedPreserve && whitespace !== 'default');
|
|
743
|
+
if (textContent)
|
|
744
|
+
node.astroSvgText = true;
|
|
745
|
+
if (textContent && preserve)
|
|
746
|
+
node.astroPreserveWhitespace = true;
|
|
747
|
+
for (const child of childrenOf(node) ?? []) {
|
|
748
|
+
if (child.type !== 'JSXElement' || tagNameOf(child) === 'foreignObject')
|
|
749
|
+
continue;
|
|
750
|
+
mark(child, textContent, preserve);
|
|
751
|
+
}
|
|
752
|
+
};
|
|
753
|
+
walk(root, (node) => {
|
|
754
|
+
if (node.type === 'JSXElement' && tagNameOf(node) === 'svg')
|
|
755
|
+
mark(node);
|
|
756
|
+
});
|
|
757
|
+
}
|
|
613
758
|
function templateFragment(root, body) {
|
|
614
759
|
const start = body[0]?.start ?? root.end;
|
|
615
760
|
const end = body.at(-1)?.end ?? root.end;
|
|
@@ -717,32 +862,38 @@ function printableComments(root) {
|
|
|
717
862
|
|
|
718
863
|
const estree = printers$1.estree;
|
|
719
864
|
|
|
720
|
-
const { fill, group: group$
|
|
865
|
+
const { fill, group: group$2, hardline: hardline$2, indent: indent$2, line: line$1, softline: softline$2 } = doc.builders;
|
|
721
866
|
const leadingWhitespace = /^[\t\n\f\r ]+/;
|
|
722
867
|
const trailingWhitespace = /[\t\n\f\r ]+$/;
|
|
723
868
|
const whitespaceRun = /[\t\n\f\r ]+/;
|
|
869
|
+
const lends = 'lends-closing-bracket';
|
|
870
|
+
const withholdsClosingBracket = (node) => node.type === 'JSXElement' &&
|
|
871
|
+
!node.astroIgnored &&
|
|
872
|
+
Boolean(node.closingElement) &&
|
|
873
|
+
Boolean(node.astroChildren) &&
|
|
874
|
+
!opensRawSubtree(node);
|
|
724
875
|
function docFor(separator) {
|
|
725
876
|
switch (separator) {
|
|
726
877
|
case 'none':
|
|
727
878
|
return null;
|
|
728
879
|
case 'soft':
|
|
729
|
-
return softline;
|
|
880
|
+
return softline$2;
|
|
730
881
|
case 'space':
|
|
731
|
-
return line;
|
|
882
|
+
return line$1;
|
|
732
883
|
case 'break':
|
|
733
884
|
return hardline$2;
|
|
734
885
|
case 'blank':
|
|
735
886
|
return [hardline$2, hardline$2];
|
|
736
887
|
}
|
|
737
888
|
}
|
|
738
|
-
function collect(children
|
|
889
|
+
function collect(children) {
|
|
739
890
|
const items = [];
|
|
740
891
|
const runs = [];
|
|
741
892
|
let pending = '';
|
|
742
893
|
for (const [index, child] of children.entries()) {
|
|
743
894
|
if (child.type !== 'JSXText') {
|
|
744
895
|
runs.push(pending);
|
|
745
|
-
items.push({ node: child, words: null, doc:
|
|
896
|
+
items.push({ node: child, index, words: null, doc: '' });
|
|
746
897
|
pending = '';
|
|
747
898
|
continue;
|
|
748
899
|
}
|
|
@@ -756,6 +907,7 @@ function collect(children, docs) {
|
|
|
756
907
|
runs.push(pending + lead);
|
|
757
908
|
items.push({
|
|
758
909
|
node: child,
|
|
910
|
+
index,
|
|
759
911
|
words: raw.slice(lead.length, raw.length - trail.length).split(whitespaceRun),
|
|
760
912
|
doc: '',
|
|
761
913
|
});
|
|
@@ -764,13 +916,11 @@ function collect(children, docs) {
|
|
|
764
916
|
runs.push(pending);
|
|
765
917
|
return { items, runs };
|
|
766
918
|
}
|
|
767
|
-
function printChildren(path, options, print) {
|
|
919
|
+
function printChildren(path, options, print, childrenOptions = {}) {
|
|
920
|
+
const { mode, suffix } = childrenOptions;
|
|
768
921
|
const container = path.node;
|
|
769
|
-
const
|
|
770
|
-
|
|
771
|
-
docs.push(child.node.type === 'JSXText' ? '' : print());
|
|
772
|
-
}, 'astroChildren');
|
|
773
|
-
const { items, runs } = collect(container.astroChildren, docs);
|
|
922
|
+
const children = container.astroChildren;
|
|
923
|
+
const { items, runs } = collect(children);
|
|
774
924
|
if (items.length === 0)
|
|
775
925
|
return runs[0] === '' ? '' : ' ';
|
|
776
926
|
const isRoot = container.astroRoot === true;
|
|
@@ -786,6 +936,28 @@ function printChildren(path, options, print) {
|
|
|
786
936
|
loneChild: false,
|
|
787
937
|
edge,
|
|
788
938
|
}, settings));
|
|
939
|
+
const lenders = new Set();
|
|
940
|
+
const lending = new Set();
|
|
941
|
+
for (let position = 1; position < items.length; position++) {
|
|
942
|
+
if (separatorAt(position, false) !== null)
|
|
943
|
+
continue;
|
|
944
|
+
if (!withholdsClosingBracket(items[position - 1].node))
|
|
945
|
+
continue;
|
|
946
|
+
lenders.add(position);
|
|
947
|
+
lending.add(items[position - 1].index);
|
|
948
|
+
}
|
|
949
|
+
if (mode === 'fill-lending')
|
|
950
|
+
lending.add(items.at(-1).index);
|
|
951
|
+
const printed = new Map();
|
|
952
|
+
path.each((child, index) => {
|
|
953
|
+
if (child.node.type === 'JSXText')
|
|
954
|
+
return;
|
|
955
|
+
printed.set(index, print(undefined, lending.has(index) ? lends : undefined));
|
|
956
|
+
}, 'astroChildren');
|
|
957
|
+
for (const item of items) {
|
|
958
|
+
if (item.words === null)
|
|
959
|
+
item.doc = printed.get(item.index) ?? '';
|
|
960
|
+
}
|
|
789
961
|
const parts = [''];
|
|
790
962
|
const append = (content) => parts.push([parts.pop(), content]);
|
|
791
963
|
const separate = (separator) => {
|
|
@@ -793,26 +965,41 @@ function printChildren(path, options, print) {
|
|
|
793
965
|
parts.push(separator, '');
|
|
794
966
|
};
|
|
795
967
|
for (const [position, item] of items.entries()) {
|
|
796
|
-
if (position > 0)
|
|
797
|
-
|
|
968
|
+
if (position > 0) {
|
|
969
|
+
if (lenders.has(position)) {
|
|
970
|
+
parts.push(softline$2, '');
|
|
971
|
+
append('>');
|
|
972
|
+
}
|
|
973
|
+
else
|
|
974
|
+
separate(separatorAt(position, false));
|
|
975
|
+
}
|
|
798
976
|
if (item.words === null) {
|
|
799
977
|
append(item.doc);
|
|
800
978
|
continue;
|
|
801
979
|
}
|
|
802
980
|
for (const [wordPosition, word] of item.words.entries()) {
|
|
803
981
|
if (wordPosition > 0)
|
|
804
|
-
separate(line);
|
|
982
|
+
separate(line$1);
|
|
805
983
|
append(word);
|
|
806
984
|
}
|
|
807
985
|
}
|
|
986
|
+
if (suffix)
|
|
987
|
+
append(suffix);
|
|
808
988
|
const body = fill(parts);
|
|
809
|
-
if (isRoot)
|
|
989
|
+
if (isRoot || mode === 'fill' || mode === 'fill-lending')
|
|
810
990
|
return body;
|
|
811
|
-
|
|
991
|
+
const content = [
|
|
992
|
+
indent$2([separatorAt(0, true) ?? '', body]),
|
|
993
|
+
separatorAt(items.length, true) ?? '',
|
|
994
|
+
];
|
|
995
|
+
if (mode === 'loose')
|
|
996
|
+
return content;
|
|
997
|
+
return group$2(content, { shouldBreak: forcesBreak(container) });
|
|
812
998
|
}
|
|
813
999
|
|
|
814
|
-
const { group, hardline: hardline$1, indent, join } = doc.builders;
|
|
815
|
-
const { replaceEndOfLine: replaceEndOfLine$1 } = doc.utils;
|
|
1000
|
+
const { group: group$1, hardline: hardline$1, indent: indent$1, join, softline: softline$1 } = doc.builders;
|
|
1001
|
+
const { mapDoc, replaceEndOfLine: replaceEndOfLine$1 } = doc.utils;
|
|
1002
|
+
const escapeQuotes = (value) => mapDoc(value, (part) => (typeof part === 'string' ? part.replaceAll('"', '"') : part));
|
|
816
1003
|
const styleParsers = {
|
|
817
1004
|
css: 'css',
|
|
818
1005
|
scss: 'scss',
|
|
@@ -856,6 +1043,14 @@ function inferScriptParser(node) {
|
|
|
856
1043
|
return 'babel-ts';
|
|
857
1044
|
return inferParserByTypeAttribute(attributeStringValue(node, 'type'));
|
|
858
1045
|
}
|
|
1046
|
+
function styleAttributeValue(node) {
|
|
1047
|
+
if (!node.astroStyleAttribute)
|
|
1048
|
+
return null;
|
|
1049
|
+
const value = node.value;
|
|
1050
|
+
if (value?.type !== 'Literal' || typeof value.value !== 'string')
|
|
1051
|
+
return null;
|
|
1052
|
+
return value.value.trim() === '' ? null : value.value;
|
|
1053
|
+
}
|
|
859
1054
|
function contentOf(node, options) {
|
|
860
1055
|
const start = node.openingElement.end;
|
|
861
1056
|
const end = node.closingElement?.start ?? node.end;
|
|
@@ -864,11 +1059,16 @@ function contentOf(node, options) {
|
|
|
864
1059
|
function wrapContent(print, content, isEmpty) {
|
|
865
1060
|
return [
|
|
866
1061
|
print('openingElement'),
|
|
867
|
-
indent([hardline$1, content]),
|
|
1062
|
+
indent$1([hardline$1, content]),
|
|
868
1063
|
isEmpty ? '' : hardline$1,
|
|
869
1064
|
print('closingElement'),
|
|
870
1065
|
];
|
|
871
1066
|
}
|
|
1067
|
+
async function renderEmbeddedDoc(content, options) {
|
|
1068
|
+
const { formatted } = await doc.printer.printDocToString(content, options);
|
|
1069
|
+
const indentation = options.useTabs ? '\t' : ' '.repeat(options.tabWidth);
|
|
1070
|
+
return replaceEndOfLine$1(formatted.trimEnd().replace(/\r?\n/g, (line) => line + indentation));
|
|
1071
|
+
}
|
|
872
1072
|
function embedSass(source, options) {
|
|
873
1073
|
const sassOptions = {
|
|
874
1074
|
tabSize: options.tabWidth,
|
|
@@ -897,6 +1097,20 @@ function embed(path, options) {
|
|
|
897
1097
|
'---',
|
|
898
1098
|
];
|
|
899
1099
|
}
|
|
1100
|
+
if (node.type === 'JSXAttribute' && options.astroCompressHTML !== 'jsx') {
|
|
1101
|
+
const style = styleAttributeValue(node);
|
|
1102
|
+
if (style !== null) {
|
|
1103
|
+
return async (textToDoc) => {
|
|
1104
|
+
const declarations = await textToDoc(decodeQuoteEntities(style), {
|
|
1105
|
+
...options,
|
|
1106
|
+
parser: 'css',
|
|
1107
|
+
__isHTMLStyleAttribute: true,
|
|
1108
|
+
});
|
|
1109
|
+
const value = escapeQuotes(declarations);
|
|
1110
|
+
return ['style="', group$1([indent$1([softline$1, value]), softline$1]), '"'];
|
|
1111
|
+
};
|
|
1112
|
+
}
|
|
1113
|
+
}
|
|
900
1114
|
if (node.type !== 'JSXElement')
|
|
901
1115
|
return estree.embed(path, options);
|
|
902
1116
|
const tag = tagNameOf(node);
|
|
@@ -920,7 +1134,10 @@ function embed(path, options) {
|
|
|
920
1134
|
const parser = styleParsers[lang];
|
|
921
1135
|
if (!parser)
|
|
922
1136
|
return printVerbatim(source);
|
|
923
|
-
return async (textToDoc, print) =>
|
|
1137
|
+
return async (textToDoc, print) => {
|
|
1138
|
+
const content = await surfacingErrors(textToDoc, source, { ...options, parser });
|
|
1139
|
+
return wrapContent(print, options.astroCompressHTML === 'jsx' ? content : await renderEmbeddedDoc(content, options), false);
|
|
1140
|
+
};
|
|
924
1141
|
}
|
|
925
1142
|
if (opensRawSubtree(node)) {
|
|
926
1143
|
return (_textToDoc, print) => [
|
|
@@ -932,10 +1149,10 @@ function embed(path, options) {
|
|
|
932
1149
|
return estree.embed(path, options);
|
|
933
1150
|
}
|
|
934
1151
|
function printVerbatim(source) {
|
|
935
|
-
return (_textToDoc, print) => group([print('openingElement'), replaceEndOfLine$1(source), print('closingElement')]);
|
|
1152
|
+
return (_textToDoc, print) => group$1([print('openingElement'), replaceEndOfLine$1(source), print('closingElement')]);
|
|
936
1153
|
}
|
|
937
1154
|
|
|
938
|
-
const { hardline } = doc.builders;
|
|
1155
|
+
const { group, hardline, indent, line, softline } = doc.builders;
|
|
939
1156
|
const { replaceEndOfLine } = doc.utils;
|
|
940
1157
|
function printDoctype(value) {
|
|
941
1158
|
const trimmed = value.trim();
|
|
@@ -988,6 +1205,18 @@ function printAttribute(path, options, print) {
|
|
|
988
1205
|
return ['{', print(['value', 'expression']), '}'];
|
|
989
1206
|
if (node.astroBacktick)
|
|
990
1207
|
return [name, '=', print(['value', 'expression'])];
|
|
1208
|
+
if (options.astroCompressHTML !== 'jsx' &&
|
|
1209
|
+
node.astroSrcsetAttribute &&
|
|
1210
|
+
value?.type === 'Literal' &&
|
|
1211
|
+
typeof value.value === 'string' &&
|
|
1212
|
+
value.value.trim() !== '') {
|
|
1213
|
+
try {
|
|
1214
|
+
return ['srcset="', printSrcset(value.value), '"'];
|
|
1215
|
+
}
|
|
1216
|
+
catch {
|
|
1217
|
+
return ['srcset="', value.value.replaceAll('"', '"'), '"'];
|
|
1218
|
+
}
|
|
1219
|
+
}
|
|
991
1220
|
const expression = value?.type === 'JSXExpressionContainer' ? value.expression : null;
|
|
992
1221
|
if (options.astroAllowShorthand &&
|
|
993
1222
|
expression?.type === 'Identifier' &&
|
|
@@ -996,15 +1225,82 @@ function printAttribute(path, options, print) {
|
|
|
996
1225
|
}
|
|
997
1226
|
return null;
|
|
998
1227
|
}
|
|
1228
|
+
function printBreakableOpeningTag(path, options, print) {
|
|
1229
|
+
const node = path.node;
|
|
1230
|
+
const attributes = node.attributes;
|
|
1231
|
+
if (attributes.length !== 1)
|
|
1232
|
+
return null;
|
|
1233
|
+
const value = attributes[0].value;
|
|
1234
|
+
if (value?.type !== 'Literal' || typeof value.value !== 'string')
|
|
1235
|
+
return null;
|
|
1236
|
+
if (value.value.includes('\n'))
|
|
1237
|
+
return null;
|
|
1238
|
+
const end = node.selfClosing
|
|
1239
|
+
? options.bracketSameLine
|
|
1240
|
+
? [' />']
|
|
1241
|
+
: [line, '/>']
|
|
1242
|
+
: options.bracketSameLine
|
|
1243
|
+
? ['>']
|
|
1244
|
+
: [softline, '>'];
|
|
1245
|
+
return group(['<', print('name'), indent([line, print(['attributes', 0])]), ...end]);
|
|
1246
|
+
}
|
|
1247
|
+
function printWithDanglingBrackets(path, print, lending) {
|
|
1248
|
+
const node = path.node;
|
|
1249
|
+
const children = node.astroChildren;
|
|
1250
|
+
if (!children?.length || !node.closingElement)
|
|
1251
|
+
return null;
|
|
1252
|
+
if (swallowsEdgeWhitespace(node))
|
|
1253
|
+
return null;
|
|
1254
|
+
if (startsWithSpace(children[0]) || endsWithSpace(children.at(-1)))
|
|
1255
|
+
return null;
|
|
1256
|
+
const opening = print('openingElement');
|
|
1257
|
+
if (opening.type !== 'group' || !Array.isArray(opening.contents))
|
|
1258
|
+
return null;
|
|
1259
|
+
const contents = opening.contents.filter((part) => part !== '');
|
|
1260
|
+
if (contents.at(-1) !== '>')
|
|
1261
|
+
return null;
|
|
1262
|
+
const withoutBracket = contents.slice(0, -1);
|
|
1263
|
+
if (withoutBracket.at(-1)?.type === 'line')
|
|
1264
|
+
withoutBracket.pop();
|
|
1265
|
+
const tag = jsxNameOf(node.closingElement.name);
|
|
1266
|
+
if (tag === null)
|
|
1267
|
+
return null;
|
|
1268
|
+
const head = { ...opening, contents: withoutBracket };
|
|
1269
|
+
const shouldBreak = forcesBreak(node);
|
|
1270
|
+
if (isSelfClosing(children.at(-1)) && !children.at(-1).astroIgnored) {
|
|
1271
|
+
const lentBody = print(['children', 0], { mode: 'fill-lending' });
|
|
1272
|
+
return group([head, indent([softline, '>', lentBody]), line, '/>', '</', tag, lending ? '' : '>'], { shouldBreak });
|
|
1273
|
+
}
|
|
1274
|
+
const body = print(['children', 0], { mode: 'fill', suffix: ['</', tag] });
|
|
1275
|
+
return group([head, indent([softline, '>', body]), lending ? '' : [softline, '>']], {
|
|
1276
|
+
shouldBreak,
|
|
1277
|
+
});
|
|
1278
|
+
}
|
|
1279
|
+
const isSelfClosing = (node) => node.type === 'JSXElement' && !node.closingElement;
|
|
1280
|
+
function withoutSelfClosingMarker(printed) {
|
|
1281
|
+
if (Array.isArray(printed)) {
|
|
1282
|
+
return printed.at(-1) === ' />' ? printed.slice(0, -1) : printed;
|
|
1283
|
+
}
|
|
1284
|
+
const tag = printed;
|
|
1285
|
+
if (tag.type !== 'group' || !Array.isArray(tag.contents))
|
|
1286
|
+
return printed;
|
|
1287
|
+
if (tag.contents.at(-1) === ' />')
|
|
1288
|
+
return { ...tag, contents: tag.contents.slice(0, -1) };
|
|
1289
|
+
if (tag.contents.at(-1) !== '/>')
|
|
1290
|
+
return printed;
|
|
1291
|
+
return { ...tag, contents: tag.contents.slice(0, -2) };
|
|
1292
|
+
}
|
|
1293
|
+
const startsWithSpace = (child) => child.type === 'JSXText' && /^[\t\n\f\r ]/.test(String(child.raw ?? ''));
|
|
1294
|
+
const endsWithSpace = (child) => child.type === 'JSXText' && /[\t\n\f\r ]$/.test(String(child.raw ?? ''));
|
|
999
1295
|
function unwrapFragmentIndent(printed) {
|
|
1000
|
-
const
|
|
1001
|
-
if (
|
|
1296
|
+
const fragment = printed;
|
|
1297
|
+
if (fragment.type !== 'group')
|
|
1002
1298
|
return printed;
|
|
1003
|
-
if (
|
|
1004
|
-
const states =
|
|
1005
|
-
return { ...
|
|
1299
|
+
if (fragment.expandedStates) {
|
|
1300
|
+
const states = fragment.expandedStates.map(unwrapFragmentIndent);
|
|
1301
|
+
return { ...fragment, contents: states[0], expandedStates: states };
|
|
1006
1302
|
}
|
|
1007
|
-
const parts =
|
|
1303
|
+
const parts = fragment.contents;
|
|
1008
1304
|
if (!Array.isArray(parts) || parts.length !== 4)
|
|
1009
1305
|
return printed;
|
|
1010
1306
|
const indented = parts[1];
|
|
@@ -1023,8 +1319,9 @@ const printer = {
|
|
|
1023
1319
|
},
|
|
1024
1320
|
print(path, options, print, args) {
|
|
1025
1321
|
const node = path.node;
|
|
1026
|
-
if (node[ownChildren])
|
|
1027
|
-
return path.callParent(() => printChildren(path, options, print));
|
|
1322
|
+
if (node[ownChildren]) {
|
|
1323
|
+
return path.callParent(() => printChildren(path, options, print, args ?? {}));
|
|
1324
|
+
}
|
|
1028
1325
|
if (node[synthetic])
|
|
1029
1326
|
return '';
|
|
1030
1327
|
if (node.astroIgnored) {
|
|
@@ -1037,6 +1334,25 @@ const printer = {
|
|
|
1037
1334
|
if (attribute)
|
|
1038
1335
|
return attribute;
|
|
1039
1336
|
}
|
|
1337
|
+
if (node.type === 'JSXOpeningElement' && options.astroCompressHTML !== 'jsx') {
|
|
1338
|
+
const opening = printBreakableOpeningTag(path, options, print);
|
|
1339
|
+
if (opening)
|
|
1340
|
+
return opening;
|
|
1341
|
+
}
|
|
1342
|
+
if (node.type === 'JSXElement' && args === lends && isSelfClosing(node)) {
|
|
1343
|
+
return withoutSelfClosingMarker(print('openingElement'));
|
|
1344
|
+
}
|
|
1345
|
+
if (node.type === 'JSXElement' && node.astroChildren && !opensRawSubtree(node)) {
|
|
1346
|
+
const dangling = printWithDanglingBrackets(path, print, args === lends);
|
|
1347
|
+
if (dangling)
|
|
1348
|
+
return dangling;
|
|
1349
|
+
const tag = jsxNameOf(node.closingElement.name);
|
|
1350
|
+
return group([
|
|
1351
|
+
print('openingElement'),
|
|
1352
|
+
print(['children', 0], { mode: 'loose' }),
|
|
1353
|
+
args === lends && tag !== null ? ['</', tag] : print('closingElement'),
|
|
1354
|
+
], { shouldBreak: forcesBreak(node) });
|
|
1355
|
+
}
|
|
1040
1356
|
if (node.type === 'JSXElement' &&
|
|
1041
1357
|
node.closingElement &&
|
|
1042
1358
|
node.children.length > 0 &&
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/options.ts","../src/ast.ts","../src/elements.ts","../src/printer/utils.ts","../src/whitespace.ts","../src/parser.ts","../src/estree.ts","../src/printer/children.ts","../src/printer/embed.ts","../src/printer/index.ts","../src/index.ts"],"sourcesContent":["import type { SupportOption } from 'prettier';\n\nexport type CompressHTML = 'jsx' | 'html' | 'none';\n\ninterface PluginOptions {\n\tastroAllowShorthand: boolean;\n\tastroSkipFrontmatter: boolean;\n\tastroCompressHTML: CompressHTML;\n}\n\ndeclare module 'prettier' {\n\t// eslint-disable-next-line @typescript-eslint/no-empty-object-type\n\tinterface RequiredOptions extends PluginOptions {}\n}\n\n// https://prettier.io/docs/en/plugins.html#options\nexport const options: Record<keyof PluginOptions, SupportOption> = {\n\tastroAllowShorthand: {\n\t\tcategory: 'Astro',\n\t\ttype: 'boolean',\n\t\tdefault: false,\n\t\tdescription: 'Enable/disable attribute shorthand if attribute name and expression are the same',\n\t},\n\tastroSkipFrontmatter: {\n\t\tcategory: 'Astro',\n\t\ttype: 'boolean',\n\t\tdefault: false,\n\t\tdescription: 'Skips the formatting of the frontmatter.',\n\t},\n\tastroCompressHTML: {\n\t\tcategory: 'Astro',\n\t\ttype: 'choice',\n\t\tdefault: 'jsx',\n\t\tdescription:\n\t\t\t\"Mirror of Astro's compressHTML config. Tells the formatter which whitespace the compiler will collapse.\",\n\t\tchoices: [\n\t\t\t{\n\t\t\t\tvalue: 'jsx',\n\t\t\t\tdescription:\n\t\t\t\t\t\"Astro's default since 7.0.0. Whitespace runs containing a newline are dropped; same-line spaces are content.\",\n\t\t\t},\n\t\t\t{\n\t\t\t\tvalue: 'html',\n\t\t\t\tdescription: 'Browser HTML whitespace rules. Equivalent to compressHTML: true.',\n\t\t\t},\n\t\t\t{ value: 'none', description: 'No collapsing. Equivalent to compressHTML: false.' },\n\t\t\t// Prettier's SupportOption types omit `redirect`, which its own option normaliser honours.\n\t\t\t{ value: true, redirect: 'html' } as unknown as { value: boolean; description: string },\n\t\t\t{ value: false, redirect: 'none' } as unknown as { value: boolean; description: string },\n\t\t],\n\t},\n};\n","export const synthetic: unique symbol = Symbol.for('prettier-plugin-astro.synthetic');\nexport const ownChildren: unique symbol = Symbol.for('prettier-plugin-astro.ownChildren');\n\nexport interface AstroNode {\n\ttype: string;\n\tstart: number;\n\tend: number;\n\t[synthetic]?: boolean;\n\t[ownChildren]?: boolean;\n\t[key: string]: unknown;\n}\n\nexport interface JsComment {\n\ttype: 'Line' | 'Block';\n\tvalue: string;\n\tstart: number;\n\tend: number;\n}\n\nexport const astroVisitorKeys: Record<string, string[]> = {\n\tAstroRoot: ['frontmatter', 'template'],\n\tAstroFrontmatter: ['program'],\n\tAstroScript: ['program'],\n\tAstroDoctype: [],\n\tAstroComment: [],\n};\n\nexport const isNode = (value: unknown): value is AstroNode =>\n\ttypeof value === 'object' && value !== null && typeof (value as AstroNode).type === 'string';\n\nexport function tagNameOf(node: AstroNode): string | null {\n\tif (node.type !== 'JSXElement') return null;\n\tconst name = (node.openingElement as AstroNode | undefined)?.name as AstroNode | undefined;\n\treturn name?.type === 'JSXIdentifier' ? (name.name as string) : null;\n}\n\nexport const isComponentName = (name: string | null): boolean =>\n\tname === null || /^[A-Z]/.test(name) || name.includes('.');\n\nexport function attributesOf(node: AstroNode): AstroNode[] {\n\tconst opening = node.openingElement as AstroNode | undefined;\n\treturn (opening?.attributes as AstroNode[] | undefined) ?? [];\n}\n\nexport function attributeNamed(node: AstroNode, name: string): AstroNode | undefined {\n\treturn attributesOf(node).find(\n\t\t(attribute) => attribute.type === 'JSXAttribute' && (attribute.name as AstroNode).name === name,\n\t);\n}\n\nexport function attributeStringValue(node: AstroNode, name: string): string | null {\n\tconst value = attributeNamed(node, name)?.value as AstroNode | undefined;\n\treturn value?.type === 'Literal' && typeof value.value === 'string' ? value.value : null;\n}\n\nexport const hasAttribute = (node: AstroNode, name: string): boolean =>\n\tattributeNamed(node, name) !== undefined;\n\nexport const hasSetDirective = (node: AstroNode): boolean =>\n\thasAttribute(node, 'set:html') || hasAttribute(node, 'set:text');\n\nexport function childrenOf(node: AstroNode): AstroNode[] | null {\n\tif (node.type === 'JSXElement' || node.type === 'JSXFragment') {\n\t\treturn (node.astroChildren as AstroNode[] | undefined) ?? (node.children as AstroNode[]);\n\t}\n\treturn null;\n}\n\n/** Prettier's JSX printer prints a lone template-literal child verbatim: the only seam for our own children doc. */\nexport function takeOverChildren(node: AstroNode): void {\n\tconst children = node.children as AstroNode[];\n\tif (children.length === 0) return;\n\tnode.astroChildren = children;\n\tnode.children = [\n\t\t{\n\t\t\ttype: 'JSXExpressionContainer',\n\t\t\tstart: node.start,\n\t\t\tend: node.end,\n\t\t\t[ownChildren]: true,\n\t\t\texpression: {\n\t\t\t\ttype: 'TemplateLiteral',\n\t\t\t\tstart: node.start,\n\t\t\t\tend: node.end,\n\t\t\t\tquasis: [],\n\t\t\t\texpressions: [],\n\t\t\t},\n\t\t},\n\t];\n}\n\nexport function walk(node: unknown, visit: (node: AstroNode) => void): void {\n\tif (Array.isArray(node)) {\n\t\tfor (const item of node) walk(item, visit);\n\t\treturn;\n\t}\n\tif (!isNode(node)) return;\n\tvisit(node);\n\tfor (const key of Object.keys(node)) {\n\t\tif (key !== 'type') walk(node[key], visit);\n\t}\n}\n","/** Mirrors `astro_codegen/src/printer/whitespace.rs` — the compiler never collapses these. */\nexport const rawTextElements = new Set([\n\t'pre',\n\t'listing',\n\t'iframe',\n\t'noembed',\n\t'noframes',\n\t'math',\n\t'plaintext',\n\t'script',\n\t'style',\n\t'textarea',\n\t'title',\n\t'xmp',\n]);\n\n// https://github.com/prettier/prettier/blob/main/vendors/html-void-elements.json\nexport const voidElements = new Set([\n\t'area',\n\t'base',\n\t'basefont',\n\t'bgsound',\n\t'br',\n\t'col',\n\t'command',\n\t'embed',\n\t'frame',\n\t'hr',\n\t'image',\n\t'img',\n\t'input',\n\t'isindex',\n\t'keygen',\n\t'link',\n\t'menuitem',\n\t'meta',\n\t'nextid',\n\t'param',\n\t'source',\n\t'track',\n\t'wbr',\n]);\n\n/** Extracted verbatim from `prettier/plugins/html.js` so the two printers cannot drift apart. */\nconst cssDisplay: Record<string, string> = {\n\tarea: 'none',\n\tbase: 'none',\n\tbasefont: 'none',\n\tdatalist: 'none',\n\thead: 'none',\n\tlink: 'none',\n\tmeta: 'none',\n\tnoembed: 'none',\n\tnoframes: 'none',\n\tparam: 'block',\n\trp: 'none',\n\tscript: 'block',\n\tstyle: 'none',\n\ttemplate: 'inline',\n\ttitle: 'none',\n\thtml: 'block',\n\tbody: 'block',\n\taddress: 'block',\n\tblockquote: 'block',\n\tcenter: 'block',\n\tdialog: 'block',\n\tdiv: 'block',\n\tfigure: 'block',\n\tfigcaption: 'block',\n\tfooter: 'block',\n\tform: 'block',\n\theader: 'block',\n\thr: 'block',\n\tlegend: 'block',\n\tlisting: 'block',\n\tmain: 'block',\n\tp: 'block',\n\tplaintext: 'block',\n\tpre: 'block',\n\tsearch: 'block',\n\txmp: 'block',\n\tslot: 'contents',\n\truby: 'ruby',\n\trt: 'ruby-text',\n\tarticle: 'block',\n\taside: 'block',\n\th1: 'block',\n\th2: 'block',\n\th3: 'block',\n\th4: 'block',\n\th5: 'block',\n\th6: 'block',\n\thgroup: 'block',\n\tnav: 'block',\n\tsection: 'block',\n\tdir: 'block',\n\tdd: 'block',\n\tdl: 'block',\n\tdt: 'block',\n\tmenu: 'block',\n\tol: 'block',\n\tul: 'block',\n\tli: 'list-item',\n\ttable: 'table',\n\tcaption: 'table-caption',\n\tcolgroup: 'table-column-group',\n\tcol: 'table-column',\n\tthead: 'table-header-group',\n\ttbody: 'table-row-group',\n\ttfoot: 'table-footer-group',\n\ttr: 'table-row',\n\ttd: 'table-cell',\n\tth: 'table-cell',\n\tinput: 'inline-block',\n\tbutton: 'inline-block',\n\tfieldset: 'block',\n\tdetails: 'block',\n\tsummary: 'block',\n\tmarquee: 'inline-block',\n\tsource: 'block',\n\ttrack: 'block',\n\tmeter: 'inline-block',\n\tprogress: 'inline-block',\n\tobject: 'inline-block',\n\tvideo: 'inline-block',\n\taudio: 'inline-block',\n\tselect: 'inline-block',\n\toption: 'block',\n\toptgroup: 'block',\n};\n\nconst inlineLevel = new Set(['inline', 'inline-block', 'ruby', 'ruby-text', 'contents']);\n\nexport function displayOfTag(tag: string): string {\n\treturn cssDisplay[tag] ?? 'inline';\n}\n\nexport function isInlineDisplay(display: string): boolean {\n\treturn inlineLevel.has(display);\n}\n","/** dedent string & return tabSize (the last part is what we need) */\nexport function manualDedent(input: string): {\n\ttabSize: number;\n\tchar: string;\n\tresult: string;\n} {\n\tlet minTabSize = Infinity;\n\tlet result = input;\n\t// 1. normalize\n\tresult = result.replace(/\\r\\n/g, '\\n');\n\n\t// 2. count tabSize\n\tlet char = '';\n\tfor (const line of result.split('\\n')) {\n\t\tif (!line) continue;\n\t\t// if any line begins with a non-whitespace char, minTabSize is 0\n\t\tif (line[0] && /^\\S/.test(line[0])) {\n\t\t\tminTabSize = 0;\n\t\t\tbreak;\n\t\t}\n\t\tconst match = /^(\\s+)\\S+/.exec(line); // \\S ensures we don’t count lines of pure whitespace\n\t\tif (match) {\n\t\t\tif (match[1] && !char) char = match[1][0];\n\t\t\tif (match[1].length < minTabSize) minTabSize = match[1].length;\n\t\t}\n\t}\n\n\t// 3. reformat string\n\tif (minTabSize > 0 && Number.isFinite(minTabSize)) {\n\t\tresult = result.replace(new RegExp(`^${new Array(minTabSize + 1).join(char)}`, 'gm'), '');\n\t}\n\n\treturn {\n\t\ttabSize: minTabSize === Infinity ? 0 : minTabSize,\n\t\tchar,\n\t\tresult,\n\t};\n}\n\nexport function printClassNames(value: string): string {\n\tconst lines = value.trim().split(/[\\r\\n]+/);\n\tconst formattedLines = lines.map((line) => {\n\t\tconst spaces = /^\\s+/.exec(line);\n\t\treturn (spaces ? spaces[0] : '') + line.trim().split(/\\s+/).join(' ');\n\t});\n\treturn formattedLines.join('\\n');\n}\n","import {\n\ttype AstroNode,\n\tchildrenOf,\n\thasAttribute,\n\thasSetDirective,\n\tisComponentName,\n\ttagNameOf,\n} from './ast';\nimport { displayOfTag, isInlineDisplay, rawTextElements } from './elements';\nimport type { CompressHTML } from './options';\n\ntype Sensitivity = 'css' | 'strict' | 'ignore';\n\nexport interface Settings {\n\tmode: CompressHTML;\n\tsensitivity: Sensitivity;\n}\n\ninterface Context extends Settings {\n\tisRoot: boolean;\n\tinRaw: boolean;\n}\n\ntype Decision = 'keep' | 'drop' | 'space';\n\nconst leadingWhitespace = /^[\\t\\n\\f\\r ]+/;\nconst trailingWhitespace = /[\\t\\n\\f\\r ]+$/;\nconst hasNewline = (run: string) => /[\\n\\r]/.test(run);\n\nconst isText = (node: AstroNode | null) => node?.type === 'JSXText';\nconst rawTextOf = (node: AstroNode) => (node.raw as string | undefined) ?? '';\nconst isWhitespaceOnly = (node: AstroNode) => isText(node) && rawTextOf(node).trim().length === 0;\n\nexport function opensRawSubtree(node: AstroNode): boolean {\n\tif (node.type !== 'JSXElement') return false;\n\tif (hasAttribute(node, 'is:raw')) return true;\n\tconst tag = tagNameOf(node);\n\treturn tag !== null && !isComponentName(tag) && rawTextElements.has(tag);\n}\n\n/** A `<style>` the compiler lifts out of the template, taking the whitespace beside it. */\nconst isExtractedStyle = (node: AstroNode | null) =>\n\tnode !== null && tagNameOf(node) === 'style' && !hasAttribute(node, 'is:inline');\n\nfunction displayOf(node: AstroNode): string {\n\tif (node.type !== 'JSXElement') return 'inline';\n\tconst tag = tagNameOf(node);\n\tif (tag === null || isComponentName(tag) || tag.includes('-')) return 'inline';\n\treturn displayOfTag(tag);\n}\n\nexport type Separator = 'none' | 'soft' | 'space' | 'break' | 'blank';\n\nexport interface PrinterBoundary {\n\tcontainer: AstroNode;\n\tprev: AstroNode | null;\n\tnext: AstroNode | null;\n\tisRoot: boolean;\n\tloneChild: boolean;\n\tedge: boolean;\n}\n\nconst isBlankRun = (run: string) => /[\\n\\r][^\\S\\n\\r]*[\\n\\r]/.test(run);\n\n/** A text neighbour never decides significance; at a container edge only the container does. */\nfunction sidesFor(boundary: PrinterBoundary): (AstroNode | null)[] | null {\n\tif (boundary.edge) return [null];\n\tconst sides: (AstroNode | null)[] = [];\n\tif (boundary.prev === null) sides.push(null);\n\telse if (boundary.prev.type !== 'JSXText') sides.push(boundary.prev);\n\tif (boundary.next === null) sides.push(null);\n\telse if (boundary.next.type !== 'JSXText') sides.push(boundary.next);\n\treturn sides.length > 0 ? sides : null;\n}\n\n/** `<slot>` and custom elements get a slot iff they have content, so their blank content is content. */\nexport function blankContentIsFree(\n\tcontainer: AstroNode,\n\tisRoot: boolean,\n\tsettings: Settings,\n): boolean {\n\tconst tag = container.type === 'JSXElement' ? tagNameOf(container) : null;\n\tif (tag === 'slot') return false;\n\tif (tag !== null && !isComponentName(tag) && tag.includes('-')) return false;\n\n\tconst boundary: Boundary = {\n\t\tcontainer,\n\t\tcontext: { ...settings, isRoot, inRaw: false },\n\t\tprev: null,\n\t\tnext: null,\n\t\tsides: [null],\n\t\tatStart: true,\n\t\tatEnd: true,\n\t\tloneChild: true,\n\t};\n\treturn isFree(boundary) || mayAlterRenderedWhitespace(boundary);\n}\n\nexport function separatorFor(\n\trun: string,\n\tboundary: PrinterBoundary,\n\tsettings: Settings,\n): Separator {\n\tconst sides = sidesFor(boundary);\n\tconst internal: Boundary = {\n\t\tcontainer: boundary.container,\n\t\tcontext: { ...settings, isRoot: boundary.isRoot, inRaw: false },\n\t\tprev: boundary.prev,\n\t\tnext: boundary.next,\n\t\tsides: sides ?? [],\n\t\tatStart: boundary.prev === null,\n\t\tatEnd: boundary.next === null,\n\t\tloneChild: boundary.loneChild,\n\t};\n\n\tif (isSlotFallback(internal)) return run === '' ? 'none' : 'space';\n\tconst free = isFree(internal) || (sides !== null && mayAlterRenderedWhitespace(internal));\n\tif (boundary.edge) {\n\t\tif (free) return 'soft';\n\t\treturn run === '' ? 'none' : 'space';\n\t}\n\tif (isBlankRun(run)) return 'blank';\n\tif (hasNewline(run)) return 'break';\n\tif (free) return 'soft';\n\treturn run === '' ? 'none' : 'space';\n}\n\nexport function normalizeWhitespace(template: AstroNode, options: Settings): void {\n\tvisit(template, { ...options, isRoot: true, inRaw: false });\n}\n\nfunction visit(container: AstroNode, context: Context): void {\n\tconst children = childrenOf(container);\n\tif (children === null) return;\n\n\tif (!context.inRaw) collapseRuns(container, children, context);\n\n\tfor (const child of children) {\n\t\tvisit(child, {\n\t\t\t...context,\n\t\t\tisRoot: false,\n\t\t\tinRaw: context.inRaw || opensRawSubtree(child),\n\t\t});\n\t}\n}\n\nfunction collapseRuns(container: AstroNode, children: AstroNode[], context: Context): void {\n\tconst dropped = new Set<AstroNode>();\n\n\tfor (const [index, child] of children.entries()) {\n\t\tif (!isText(child)) continue;\n\t\tconst prev = children[index - 1] ?? null;\n\t\tconst next = children[index + 1] ?? null;\n\n\t\tif (isWhitespaceOnly(child)) {\n\t\t\tconst decision = decide(rawTextOf(child), {\n\t\t\t\tcontainer,\n\t\t\t\tcontext,\n\t\t\t\tprev,\n\t\t\t\tnext,\n\t\t\t\tsides: [prev, next],\n\t\t\t\tatStart: prev === null,\n\t\t\t\tatEnd: next === null,\n\t\t\t\tloneChild: children.length === 1,\n\t\t\t});\n\t\t\tconst text = resolve(rawTextOf(child), decision);\n\t\t\tif (text === '') dropped.add(child);\n\t\t\telse setText(child, text);\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst raw = rawTextOf(child);\n\t\tconst lead = leadingWhitespace.exec(raw)?.[0] ?? '';\n\t\tconst trail = trailingWhitespace.exec(raw)?.[0] ?? '';\n\t\tconst body = raw.slice(lead.length, raw.length - trail.length);\n\n\t\tconst leadDecision = decide(lead, {\n\t\t\tcontainer,\n\t\t\tcontext,\n\t\t\tprev,\n\t\t\tnext: child,\n\t\t\tsides: [prev],\n\t\t\tatStart: prev === null,\n\t\t\tatEnd: false,\n\t\t\tloneChild: false,\n\t\t});\n\t\tconst trailDecision = decide(trail, {\n\t\t\tcontainer,\n\t\t\tcontext,\n\t\t\tprev: child,\n\t\t\tnext,\n\t\t\tsides: [next],\n\t\t\tatStart: false,\n\t\t\tatEnd: next === null,\n\t\t\tloneChild: false,\n\t\t});\n\n\t\tsetText(child, resolve(lead, leadDecision) + body + resolve(trail, trailDecision));\n\t}\n\n\tif (dropped.size > 0) {\n\t\tconst kept = children.filter((child) => !dropped.has(child));\n\t\tchildren.length = 0;\n\t\tchildren.push(...kept);\n\t}\n}\n\n// Dropping a newline run would also drop the blank lines prettier reproduces from it.\nfunction resolve(run: string, decision: Decision): string {\n\tif (decision === 'drop') return hasNewline(run) ? run : '';\n\tif (decision === 'space') return ' ';\n\treturn run;\n}\n\nfunction setText(node: AstroNode, text: string): void {\n\tnode.raw = text;\n\tnode.value = text;\n}\n\ninterface Boundary {\n\tcontainer: AstroNode;\n\tcontext: Context;\n\tprev: AstroNode | null;\n\tnext: AstroNode | null;\n\t/** The neighbours whose CSS display decides significance; `null` stands for the container. */\n\tsides: (AstroNode | null)[];\n\tatStart: boolean;\n\tatEnd: boolean;\n\tloneChild: boolean;\n}\n\nfunction decide(run: string, boundary: Boundary): Decision {\n\tif (run === '') return 'keep';\n\tconst { mode } = boundary.context;\n\n\tif (isSlotFallback(boundary)) return 'space';\n\tif (isFree(boundary)) return 'drop';\n\tif (mayAlterRenderedWhitespace(boundary)) return 'drop';\n\n\tif (mode === 'jsx') return hasNewline(run) ? 'keep' : 'space';\n\n\t// Prettier's JSX printer trims container-edge runs, which under `html`/`none` are rendered.\n\treturn boundary.atStart || boundary.atEnd ? 'space' : 'keep';\n}\n\nfunction isFree(boundary: Boundary): boolean {\n\tconst { container, context, atStart, atEnd, loneChild } = boundary;\n\tconst { mode } = context;\n\n\tif (context.isRoot && (atStart || atEnd)) return true;\n\tif (container.type === 'JSXElement' && hasSetDirective(container)) return true;\n\tif (isExtractedStyle(boundary.prev) || isExtractedStyle(boundary.next)) return true;\n\n\tconst tag = container.type === 'JSXElement' ? tagNameOf(container) : null;\n\tif (loneChild && tag !== null && isComponentName(tag)) return true;\n\n\tif (mode === 'html') {\n\t\tif (loneChild) return true;\n\t\tif (tag === 'head') return true;\n\t}\n\n\treturn false;\n}\n\n/** Whether the user authorised changing rendered whitespace here, not whether it is sound. */\nfunction mayAlterRenderedWhitespace(boundary: Boundary): boolean {\n\tconst { sensitivity } = boundary.context;\n\tif (sensitivity === 'ignore') return true;\n\tif (sensitivity === 'strict') return false;\n\treturn boundary.sides.every((side) => !isInlineDisplay(displayOf(side ?? boundary.container)));\n}\n\n/** Any content at all, whitespace included, gives a `<slot>` a fallback body; nothing gives none. */\nfunction isSlotFallback(boundary: Boundary): boolean {\n\treturn (\n\t\tboundary.container.type === 'JSXElement' &&\n\t\ttagNameOf(boundary.container) === 'slot' &&\n\t\tboundary.loneChild\n\t);\n}\n","import { parse as parseAstro } from '@astrojs/compiler-rs';\nimport type { ParserOptions } from 'prettier';\nimport {\n\ttype AstroNode,\n\tchildrenOf,\n\thasSetDirective,\n\tisComponentName,\n\tisNode,\n\ttype JsComment,\n\tsynthetic,\n\ttagNameOf,\n\ttakeOverChildren,\n\twalk,\n} from './ast';\nimport { rawTextElements, voidElements } from './elements';\nimport { printClassNames } from './printer/utils';\nimport {\n\tblankContentIsFree,\n\tnormalizeWhitespace,\n\topensRawSubtree,\n\ttype Settings,\n} from './whitespace';\n\ninterface Diagnostic {\n\tseverity: string;\n\ttext: string;\n\tlabels: { line: number; column: number }[];\n}\n\nexport function parse(source: string, options: ParserOptions): AstroNode {\n\tconst { ast, diagnostics } = parseAstro(source) as unknown as {\n\t\tast: AstroNode;\n\t\tdiagnostics: Diagnostic[];\n\t};\n\n\tconst failure = diagnostics.find((diagnostic) => diagnostic.severity === 'error');\n\tif (failure) throw syntaxError(failure);\n\n\tstripParentheses(ast);\n\trepairSpans(ast);\n\tmarkAttributes(ast, source);\n\tapplyPrettierIgnore(ast);\n\n\tconst body = ast.body as AstroNode[];\n\tconst template = templateFragment(ast, body);\n\tconst settings = {\n\t\tmode: options.astroCompressHTML,\n\t\tsensitivity: options.htmlWhitespaceSensitivity,\n\t};\n\t// Prettier always breaks between two adjacent non-text children, which only `jsx` can absorb.\n\tif (settings.mode === 'jsx') normalizeWhitespace(template.node as AstroNode, settings);\n\telse resolveBlankContainers(template.node as AstroNode, settings);\n\tnormalizeTagPairs(body, source);\n\tif (settings.mode !== 'jsx') claimChildren(template.node as AstroNode);\n\n\tast.template = template;\n\tdelete ast.body;\n\tast.comments = printableComments(ast);\n\treturn ast;\n}\n\nfunction syntaxError(diagnostic: Diagnostic): Error {\n\tconst label = diagnostic.labels[0];\n\tconst line = label?.line ?? 1;\n\tconst column = (label?.column ?? 0) + 1;\n\tconst error = new SyntaxError(`${diagnostic.text} (${line}:${column})`);\n\t(error as Error & { loc: unknown }).loc = { start: { line, column } };\n\treturn error;\n}\n\n// oxc emits explicit nodes; prettier re-derives parens itself and the two compound on every pass.\nfunction stripParentheses(root: AstroNode): void {\n\twalk(root, (node) => {\n\t\tfor (const key of Object.keys(node)) {\n\t\t\tconst value = node[key];\n\t\t\tif (Array.isArray(value)) {\n\t\t\t\tfor (const [index, item] of value.entries()) {\n\t\t\t\t\tvalue[index] = unwrapParens(item);\n\t\t\t\t}\n\t\t\t} else if (isNode(value)) {\n\t\t\t\tnode[key] = unwrapParens(value);\n\t\t\t}\n\t\t}\n\t});\n}\n\nfunction unwrapParens(node: unknown): unknown {\n\tlet current = node;\n\twhile (isNode(current)) {\n\t\tif (current.type === 'ParenthesizedExpression') current = current.expression;\n\t\telse if (current.type === 'TSParenthesizedType') current = current.typeAnnotation;\n\t\telse break;\n\t}\n\treturn current;\n}\n\n// `AstroScript` spans the whole `<script>` element, overlapping the tags prettier sorts it against.\nfunction repairSpans(root: AstroNode): void {\n\twalk(root, (node) => {\n\t\tif (node.type !== 'JSXElement') return;\n\t\tconst script = (node.children as AstroNode[]).find((child) => child.type === 'AstroScript');\n\t\tif (!script) return;\n\t\tscript.start = (node.openingElement as AstroNode).end;\n\t\tscript.end = (node.closingElement as AstroNode | null)?.start ?? node.end;\n\t});\n}\n\nfunction markAttributes(root: AstroNode, source: string): void {\n\twalk(root, (node) => {\n\t\tif (node.type !== 'JSXAttribute') return;\n\t\tconst value = node.value as AstroNode | null;\n\t\tif (!value) return;\n\n\t\tif (value.type === 'Literal' && typeof value.value === 'string') {\n\t\t\tconst name = (node.name as AstroNode).name;\n\t\t\tconst text = name === 'class' ? printClassNames(value.value) : value.value;\n\t\t\tif (value.raw === null || text !== value.value) {\n\t\t\t\tvalue.value = text;\n\t\t\t\tvalue.raw = `\"${text.replaceAll('\"', '"')}\"`;\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tif (value.type !== 'JSXExpressionContainer') return;\n\n\t\tif (source[node.start] === '{') node.astroShorthand = true;\n\t\tif (source[value.start] === '`') node.astroBacktick = true;\n\t});\n}\n\nfunction applyPrettierIgnore(root: AstroNode): void {\n\twalk(root, (node) => {\n\t\tconst children = node.type === 'AstroRoot' ? (node.body as AstroNode[]) : childrenOf(node);\n\t\tif (children === null) return;\n\t\tfor (const [index, child] of children.entries()) {\n\t\t\tif (child.type !== 'AstroComment') continue;\n\t\t\tif (String(child.value).trim() !== 'prettier-ignore') continue;\n\t\t\tconst target = children.slice(index + 1).find((sibling) => sibling.type !== 'JSXText');\n\t\t\tif (target) target.astroIgnored = true;\n\t\t}\n\t});\n}\n\nfunction templateFragment(root: AstroNode, body: AstroNode[]): AstroNode {\n\tconst start = body[0]?.start ?? root.end;\n\tconst end = body.at(-1)?.end ?? root.end;\n\treturn {\n\t\ttype: 'JsExpressionRoot',\n\t\tstart,\n\t\tend,\n\t\tnode: {\n\t\t\ttype: 'JSXFragment',\n\t\t\tstart,\n\t\t\tend,\n\t\t\tastroRoot: true,\n\t\t\topeningFragment: { type: 'JSXOpeningFragment', start, end: start, [synthetic]: true },\n\t\t\tchildren: body,\n\t\t\tclosingFragment: { type: 'JSXClosingFragment', start: end, end, [synthetic]: true },\n\t\t},\n\t};\n}\n\nfunction pairUp(node: AstroNode, tag: string): void {\n\t(node.openingElement as AstroNode).selfClosing = false;\n\tnode.closingElement = {\n\t\ttype: 'JSXClosingElement',\n\t\tstart: node.end,\n\t\tend: node.end,\n\t\tname: { type: 'JSXIdentifier', name: tag, start: node.end, end: node.end },\n\t};\n}\n\n// Requiring the newline keeps the lone space `resolveBlankContainers` leaves behind, which is content.\nfunction printsNothing(child: AstroNode): boolean {\n\tconst raw = String(child.raw ?? '');\n\treturn child.type === 'JSXText' && raw.trim() === '' && /[\\n\\r]/.test(raw);\n}\n\nfunction normalizeTagPairs(body: AstroNode[], source: string): void {\n\twalk(body, (node) => {\n\t\tif (node.type !== 'JSXElement') return;\n\t\tconst tag = tagNameOf(node);\n\t\tif (tag === null) return;\n\t\tconst children = node.children as AstroNode[];\n\t\tconst closing = node.closingElement as AstroNode | null;\n\t\tconst component = isComponentName(tag);\n\n\t\tif (rawTextElements.has(tag) && !component) {\n\t\t\tif (!closing) pairUp(node, tag);\n\t\t\telse if (source.slice((node.openingElement as AstroNode).end, closing.start).trim() === '') {\n\t\t\t\tchildren.length = 0;\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tconst selfClosable =\n\t\t\tcomponent || voidElements.has(tag) || tag === 'slot' || hasSetDirective(node);\n\n\t\tif (children.every(printsNothing) && selfClosable && closing) {\n\t\t\t(node.openingElement as AstroNode).selfClosing = true;\n\t\t\tnode.closingElement = null;\n\t\t}\n\t});\n}\n\n// Decided here rather than in the children printer so tag pairing sees the final child count.\nfunction resolveBlankContainers(template: AstroNode, settings: Settings): void {\n\twalk(template, (node) => {\n\t\tif (node.type !== 'JSXElement' && node.type !== 'JSXFragment') return;\n\t\tif (node.type === 'JSXElement' && opensRawSubtree(node)) return;\n\t\tconst children = node.children as AstroNode[];\n\t\tif (children.length === 0) return;\n\t\tconst blank = children.every(\n\t\t\t(child) => child.type === 'JSXText' && String(child.raw ?? '').trim() === '',\n\t\t);\n\t\tif (!blank) return;\n\n\t\tconst free = blankContentIsFree(node, node.astroRoot === true, settings);\n\t\tchildren.length = 0;\n\t\tif (!free) {\n\t\t\tchildren.push({ type: 'JSXText', start: node.start, end: node.start, raw: ' ', value: ' ' });\n\t\t}\n\t});\n}\n\nfunction claimChildren(template: AstroNode): void {\n\twalk(template, (node) => {\n\t\tif (node.type !== 'JSXElement' && node.type !== 'JSXFragment') return;\n\t\tif (node.type === 'JSXElement' && opensRawSubtree(node)) return;\n\t\ttakeOverChildren(node);\n\t});\n}\n\n// Prettier throws on any comment it never printed, so drop the ones inside reprinted-from-source regions.\nfunction printableComments(root: AstroNode): JsComment[] {\n\tconst comments = (root.comments as JsComment[] | undefined) ?? [];\n\tif (comments.length === 0) return comments;\n\n\tconst frontmatter = root.frontmatter as AstroNode;\n\tconst skipped: [number, number][] = [];\n\tif (frontmatter.end > 0) skipped.push([frontmatter.start, frontmatter.end]);\n\n\twalk(root, (node) => {\n\t\tif (node.astroIgnored) {\n\t\t\tskipped.push([node.start, node.end]);\n\t\t\treturn;\n\t\t}\n\t\tif (!opensRawSubtree(node)) return;\n\t\tconst closing = node.closingElement as AstroNode | null;\n\t\tskipped.push([(node.openingElement as AstroNode).end, closing?.start ?? node.end]);\n\t});\n\n\treturn comments.filter(\n\t\t(comment) => !skipped.some(([start, end]) => comment.start >= start && comment.end <= end),\n\t);\n}\n","import type { Printer } from 'prettier';\nimport { printers } from 'prettier/plugins/estree';\n\nexport const estree = (printers as Record<string, Printer>).estree as Printer & {\n\tprint: (path: unknown, options: unknown, print: unknown, args?: unknown) => unknown;\n\tembed: (path: unknown, options: unknown) => unknown;\n\tgetVisitorKeys: (node: unknown, nonTraversableKeys: Set<string>) => string[];\n};\n","import type { AstPath, Doc, ParserOptions } from 'prettier';\nimport { doc } from 'prettier';\nimport type { AstroNode } from '../ast';\nimport { type Separator, separatorFor } from '../whitespace';\n\nconst { fill, group, hardline, indent, line, softline } = doc.builders;\n\nconst leadingWhitespace = /^[\\t\\n\\f\\r ]+/;\nconst trailingWhitespace = /[\\t\\n\\f\\r ]+$/;\nconst whitespaceRun = /[\\t\\n\\f\\r ]+/;\n\ntype PrintFn = (selector?: string | number | (string | number)[]) => Doc;\ntype ChildIterator = (callback: (child: AstPath<AstroNode>) => void, key: string) => void;\n\ninterface Item {\n\tnode: AstroNode;\n\twords: string[] | null;\n\tdoc: Doc;\n}\n\nfunction docFor(separator: Separator): Doc | null {\n\tswitch (separator) {\n\t\tcase 'none':\n\t\t\treturn null;\n\t\tcase 'soft':\n\t\t\treturn softline;\n\t\tcase 'space':\n\t\t\treturn line;\n\t\tcase 'break':\n\t\t\treturn hardline;\n\t\tcase 'blank':\n\t\t\treturn [hardline, hardline];\n\t}\n}\n\n/** Runs alternate with items: `runs[i]` is the whitespace before `items[i]`, `runs[n]` the trailing. */\nfunction collect(children: AstroNode[], docs: Doc[]): { items: Item[]; runs: string[] } {\n\tconst items: Item[] = [];\n\tconst runs: string[] = [];\n\tlet pending = '';\n\n\tfor (const [index, child] of children.entries()) {\n\t\tif (child.type !== 'JSXText') {\n\t\t\truns.push(pending);\n\t\t\titems.push({ node: child, words: null, doc: docs[index] });\n\t\t\tpending = '';\n\t\t\tcontinue;\n\t\t}\n\t\tconst raw = String(child.raw ?? '');\n\t\tif (raw.trim() === '') {\n\t\t\tpending += raw;\n\t\t\tcontinue;\n\t\t}\n\t\tconst lead = leadingWhitespace.exec(raw)?.[0] ?? '';\n\t\tconst trail = trailingWhitespace.exec(raw)?.[0] ?? '';\n\t\truns.push(pending + lead);\n\t\titems.push({\n\t\t\tnode: child,\n\t\t\twords: raw.slice(lead.length, raw.length - trail.length).split(whitespaceRun),\n\t\t\tdoc: '',\n\t\t});\n\t\tpending = trail;\n\t}\n\n\truns.push(pending);\n\treturn { items, runs };\n}\n\nexport function printChildren(\n\tpath: AstPath<AstroNode>,\n\toptions: ParserOptions,\n\tprint: PrintFn,\n): Doc {\n\tconst container = path.node;\n\tconst docs: Doc[] = [];\n\t(path as AstPath<AstroNode> & { each: ChildIterator }).each((child) => {\n\t\tdocs.push(child.node.type === 'JSXText' ? '' : print());\n\t}, 'astroChildren');\n\n\tconst { items, runs } = collect(container.astroChildren as AstroNode[], docs);\n\t// `resolveBlankContainers` already decided whether whitespace-only content survives.\n\tif (items.length === 0) return runs[0] === '' ? '' : ' ';\n\n\tconst isRoot = container.astroRoot === true;\n\tconst settings = {\n\t\tmode: options.astroCompressHTML,\n\t\tsensitivity: options.htmlWhitespaceSensitivity,\n\t};\n\tconst separatorAt = (index: number, edge: boolean) =>\n\t\tdocFor(\n\t\t\tseparatorFor(\n\t\t\t\truns[index],\n\t\t\t\t{\n\t\t\t\t\tcontainer,\n\t\t\t\t\tprev: items[index - 1]?.node ?? null,\n\t\t\t\t\tnext: items[index]?.node ?? null,\n\t\t\t\t\tisRoot,\n\t\t\t\t\tloneChild: false,\n\t\t\t\t\tedge,\n\t\t\t\t},\n\t\t\t\tsettings,\n\t\t\t),\n\t\t);\n\n\tconst parts: Doc[] = [''];\n\tconst append = (content: Doc) => parts.push([parts.pop()!, content]);\n\tconst separate = (separator: Doc | null) => {\n\t\tif (separator !== null) parts.push(separator, '');\n\t};\n\n\tfor (const [position, item] of items.entries()) {\n\t\tif (position > 0) separate(separatorAt(position, false));\n\t\tif (item.words === null) {\n\t\t\tappend(item.doc);\n\t\t\tcontinue;\n\t\t}\n\t\tfor (const [wordPosition, word] of item.words.entries()) {\n\t\t\tif (wordPosition > 0) separate(line);\n\t\t\tappend(word);\n\t\t}\n\t}\n\n\tconst body = fill(parts);\n\tif (isRoot) return body;\n\treturn group([indent([separatorAt(0, true) ?? '', body]), separatorAt(items.length, true) ?? '']);\n}\n","import type { AstPath, BuiltInParserName, Doc, Options, ParserOptions } from 'prettier';\nimport { doc } from 'prettier';\nimport { SassFormatter, type SassFormatterConfig } from 'sass-formatter';\nimport { type AstroNode, attributeStringValue, attributesOf, tagNameOf } from '../ast';\nimport { estree } from '../estree';\nimport { opensRawSubtree } from '../whitespace';\nimport { manualDedent } from './utils';\n\nconst { group, hardline, indent, join } = doc.builders;\nconst { replaceEndOfLine } = doc.utils;\n\ntype TextToDoc = (text: string, options: Options) => Promise<Doc>;\ntype PrintFn = (selector?: string | number | (string | number)[]) => Doc;\n\nconst styleParsers: Record<string, BuiltInParserName> = {\n\tcss: 'css',\n\tscss: 'scss',\n\tless: 'less',\n};\n\n// Prettier swallows every error thrown inside `embed` unless this is set, leaving a useless message.\nasync function surfacingErrors(textToDoc: TextToDoc, text: string, options: Options) {\n\ttry {\n\t\treturn await textToDoc(text, options);\n\t} catch (error) {\n\t\tprocess.env.PRETTIER_DEBUG = 'true';\n\t\tthrow error;\n\t}\n}\n\n// Adapted from: https://github.com/prettier/prettier/blob/main/src/language-html/utils/index.js\nfunction inferParserByTypeAttribute(type: string | null): BuiltInParserName {\n\tswitch (type) {\n\t\tcase null:\n\t\tcase 'module':\n\t\tcase 'text/javascript':\n\t\tcase 'text/babel':\n\t\tcase 'application/javascript':\n\t\t\treturn 'babel';\n\t\tcase 'application/x-typescript':\n\t\t\treturn 'babel-ts';\n\t\tcase 'text/markdown':\n\t\t\treturn 'markdown';\n\t\tcase 'text/html':\n\t\t\treturn 'html';\n\t\tcase 'text/x-handlebars-template':\n\t\t\treturn 'glimmer';\n\t\tdefault:\n\t\t\tif (type.endsWith('json') || type.endsWith('importmap') || type === 'speculationrules') {\n\t\t\t\treturn 'json';\n\t\t\t}\n\t\t\treturn 'babel-ts';\n\t}\n}\n\nfunction inferScriptParser(node: AstroNode): BuiltInParserName {\n\t// Astro only processes scripts carrying no attribute other than `src`, and those are TypeScript.\n\tconst processed = attributesOf(node).every(\n\t\t(attribute) =>\n\t\t\tattribute.type === 'JSXAttribute' && (attribute.name as AstroNode).name === 'src',\n\t);\n\tif (processed) return 'babel-ts';\n\treturn inferParserByTypeAttribute(attributeStringValue(node, 'type'));\n}\n\nfunction contentOf(node: AstroNode, options: ParserOptions): string {\n\tconst start = (node.openingElement as AstroNode).end;\n\tconst end = (node.closingElement as AstroNode | null)?.start ?? node.end;\n\treturn options.originalText.slice(start, end);\n}\n\nfunction wrapContent(print: PrintFn, content: Doc, isEmpty: boolean): Doc {\n\treturn [\n\t\tprint('openingElement'),\n\t\tindent([isEmpty ? '' : hardline, content]),\n\t\tisEmpty ? '' : hardline,\n\t\tprint('closingElement'),\n\t];\n}\n\nfunction embedSass(source: string, options: ParserOptions): Doc {\n\tconst sassOptions: Partial<SassFormatterConfig> = {\n\t\ttabSize: options.tabWidth,\n\t\tinsertSpaces: !options.useTabs,\n\t\tlineEnding: options.endOfLine.toUpperCase() === 'CRLF' ? 'CRLF' : 'LF',\n\t};\n\tconst { result } = manualDedent(source);\n\treturn join(hardline, SassFormatter.Format(result, sassOptions).trim().split('\\n'));\n}\n\nexport function embed(path: AstPath<AstroNode>, options: ParserOptions) {\n\tconst node = path.node;\n\tif (node.astroIgnored) return undefined;\n\n\tif (node.type === 'AstroFrontmatter') {\n\t\tif (node.end === 0 || options.astroSkipFrontmatter) return undefined;\n\t\t// `Program.start` skips leading comments and `node.start` includes preceding whitespace.\n\t\tconst fence = options.originalText.indexOf('---', node.start);\n\t\tconst source = options.originalText.slice(fence + 3, node.end - 3);\n\t\tif (!source.trim()) return undefined;\n\t\treturn async (textToDoc: TextToDoc) => [\n\t\t\t'---',\n\t\t\thardline,\n\t\t\tawait surfacingErrors(textToDoc, source, { ...options, parser: 'babel-ts' }),\n\t\t\thardline,\n\t\t\t'---',\n\t\t];\n\t}\n\n\tif (node.type !== 'JSXElement') return estree.embed(path, options);\n\tconst tag = tagNameOf(node);\n\tif (tag === null || !node.closingElement) return estree.embed(path, options);\n\n\tconst source = contentOf(node, options);\n\tconst isEmpty = source.trim() === '';\n\n\tif (tag === 'script') {\n\t\tif (isEmpty) return estree.embed(path, options);\n\t\tconst parser = inferScriptParser(node);\n\t\treturn async (textToDoc: TextToDoc, print: PrintFn) =>\n\t\t\twrapContent(print, await surfacingErrors(textToDoc, source, { ...options, parser }), false);\n\t}\n\n\tif (tag === 'style') {\n\t\tif (isEmpty) return estree.embed(path, options);\n\t\tconst lang = attributeStringValue(node, 'lang')?.toLowerCase() ?? 'css';\n\t\tif (lang === 'sass') {\n\t\t\treturn (_textToDoc: TextToDoc, print: PrintFn) =>\n\t\t\t\twrapContent(print, embedSass(source, options), false);\n\t\t}\n\t\tconst parser = styleParsers[lang];\n\t\tif (!parser) return printVerbatim(source);\n\t\treturn async (textToDoc: TextToDoc, print: PrintFn) =>\n\t\t\twrapContent(print, await surfacingErrors(textToDoc, source, { ...options, parser }), false);\n\t}\n\n\tif (opensRawSubtree(node)) {\n\t\treturn (_textToDoc: TextToDoc, print: PrintFn) => [\n\t\t\tprint('openingElement'),\n\t\t\treplaceEndOfLine(source),\n\t\t\tprint('closingElement'),\n\t\t];\n\t}\n\n\treturn estree.embed(path, options);\n}\n\nfunction printVerbatim(source: string) {\n\treturn (_textToDoc: TextToDoc, print: PrintFn) =>\n\t\tgroup([print('openingElement'), replaceEndOfLine(source), print('closingElement')]);\n}\n","import type { AstPath, Doc, ParserOptions } from 'prettier';\nimport { doc } from 'prettier';\nimport { type AstroNode, astroVisitorKeys, ownChildren, synthetic } from '../ast';\nimport { estree } from '../estree';\nimport { opensRawSubtree } from '../whitespace';\nimport { printChildren } from './children';\nimport { embed } from './embed';\n\nconst { hardline } = doc.builders;\nconst { replaceEndOfLine } = doc.utils;\n\ntype PrintFn = (selector?: string | number | (string | number)[]) => Doc;\n\nfunction printDoctype(value: string): string {\n\tconst trimmed = value.trim();\n\tconst space = trimmed.search(/\\s/);\n\tconst name = space === -1 ? trimmed : trimmed.slice(0, space);\n\tconst rest = space === -1 ? '' : trimmed.slice(space);\n\treturn `<!doctype ${name.toLowerCase()}${rest}>`;\n}\n\nfunction printAstroNode(path: AstPath<AstroNode>, options: ParserOptions, print: PrintFn): Doc {\n\tconst node = path.node;\n\tswitch (node.type) {\n\t\tcase 'AstroRoot': {\n\t\t\tconst template = node.template as AstroNode;\n\t\t\tconst hasTemplate = ((template.node as AstroNode).children as AstroNode[]).length > 0;\n\t\t\tconst parts: Doc[] = [];\n\t\t\tif ((node.frontmatter as AstroNode).end > 0) {\n\t\t\t\tparts.push(print('frontmatter'));\n\t\t\t\tif (hasTemplate) parts.push(hardline, hardline);\n\t\t\t}\n\t\t\tif (hasTemplate) parts.push(print('template'));\n\t\t\treturn [parts, hardline];\n\t\t}\n\t\tcase 'AstroFrontmatter': {\n\t\t\tconst body = (node.program as AstroNode).body as unknown[];\n\t\t\tif (options.astroSkipFrontmatter) {\n\t\t\t\tconst fence = options.originalText.indexOf('---', node.start);\n\t\t\t\treturn replaceEndOfLine(options.originalText.slice(fence, node.end));\n\t\t\t}\n\t\t\treturn body.length > 0\n\t\t\t\t? ['---', hardline, print('program'), '---']\n\t\t\t\t: ['---', hardline, '---'];\n\t\t}\n\t\tcase 'AstroScript':\n\t\t\treturn ((node.program as AstroNode).body as unknown[]).length > 0 ? print('program') : '';\n\t\tcase 'AstroDoctype':\n\t\t\treturn printDoctype(node.value as string);\n\t\tcase 'AstroComment':\n\t\t\treturn `<!--${node.value as string}-->`;\n\t\tdefault:\n\t\t\treturn '';\n\t}\n}\n\nfunction printAttribute(\n\tpath: AstPath<AstroNode>,\n\toptions: ParserOptions,\n\tprint: PrintFn,\n): Doc | null {\n\tconst node = path.node;\n\tconst name = (node.name as AstroNode).name as string;\n\tconst value = node.value as AstroNode | null;\n\n\tif (node.astroShorthand) return ['{', print(['value', 'expression']), '}'];\n\n\tif (node.astroBacktick) return [name, '=', print(['value', 'expression'])];\n\n\tconst expression =\n\t\tvalue?.type === 'JSXExpressionContainer' ? (value.expression as AstroNode) : null;\n\tif (\n\t\toptions.astroAllowShorthand &&\n\t\texpression?.type === 'Identifier' &&\n\t\texpression.name === name\n\t) {\n\t\treturn ['{', print(['value', 'expression']), '}'];\n\t}\n\n\treturn null;\n}\n\n// No doc builder can cancel an indent nested inside a doc, so the root fragment's must be cut out.\nfunction unwrapFragmentIndent(printed: Doc): Doc {\n\tconst group = printed as { type?: string; contents?: Doc; expandedStates?: Doc[] };\n\tif (group.type !== 'group') return printed;\n\tif (group.expandedStates) {\n\t\tconst states = group.expandedStates.map(unwrapFragmentIndent);\n\t\treturn { ...group, contents: states[0], expandedStates: states } as Doc;\n\t}\n\tconst parts = group.contents as Doc[];\n\tif (!Array.isArray(parts) || parts.length !== 4) return printed;\n\tconst indented = parts[1] as { type?: string; contents?: Doc[] };\n\tif (indented.type !== 'indent' || !indented.contents) return printed;\n\treturn indented.contents[1];\n}\n\nexport const printer = {\n\t...estree,\n\tembed,\n\tgetVisitorKeys(node: AstroNode, nonTraversableKeys: Set<string>): string[] {\n\t\tconst keys = astroVisitorKeys[node.type] ?? estree.getVisitorKeys(node, nonTraversableKeys);\n\t\treturn node.astroChildren\n\t\t\t? keys.map((key) => (key === 'children' ? 'astroChildren' : key))\n\t\t\t: keys;\n\t},\n\tprint(path: AstPath<AstroNode>, options: ParserOptions, print: PrintFn, args?: unknown): Doc {\n\t\tconst node = path.node;\n\t\tif (node[ownChildren]) return path.callParent(() => printChildren(path, options, print));\n\t\tif (node[synthetic]) return '';\n\t\tif (node.astroIgnored) {\n\t\t\treturn replaceEndOfLine(options.originalText.slice(node.start, node.end));\n\t\t}\n\t\tif (astroVisitorKeys[node.type]) return printAstroNode(path, options, print);\n\t\tif (node.type === 'JSXAttribute') {\n\t\t\tconst attribute = printAttribute(path, options, print);\n\t\t\tif (attribute) return attribute;\n\t\t}\n\t\t// Reached when `embeddedLanguageFormatting` is off; reflowing raw content would corrupt it.\n\t\tif (\n\t\t\tnode.type === 'JSXElement' &&\n\t\t\tnode.closingElement &&\n\t\t\t(node.children as AstroNode[]).length > 0 &&\n\t\t\topensRawSubtree(node)\n\t\t) {\n\t\t\tconst start = (node.openingElement as AstroNode).end;\n\t\t\tconst end = (node.closingElement as AstroNode).start;\n\t\t\treturn [\n\t\t\t\tprint('openingElement'),\n\t\t\t\treplaceEndOfLine(options.originalText.slice(start, end)),\n\t\t\t\tprint('closingElement'),\n\t\t\t];\n\t\t}\n\t\tconst printed = estree.print(path, options, print, args) as Doc;\n\t\tif ((node.openingFragment as AstroNode | undefined)?.[synthetic]) {\n\t\t\treturn unwrapFragmentIndent(printed);\n\t\t}\n\t\treturn printed;\n\t},\n};\n","import type { Parser, Printer, SupportLanguage } from 'prettier';\nimport type { AstroNode } from './ast';\nimport { options } from './options';\nimport { parse } from './parser';\nimport { printer } from './printer';\n\n// https://prettier.io/docs/en/plugins.html#languages\nexport const languages: Partial<SupportLanguage>[] = [\n\t{\n\t\tname: 'astro',\n\t\tparsers: ['astro'],\n\t\textensions: ['.astro'],\n\t\tvscodeLanguageIds: ['astro'],\n\t},\n];\n\n// https://prettier.io/docs/en/plugins.html#parsers\nexport const parsers: Record<string, Parser> = {\n\tastro: {\n\t\tparse,\n\t\tastFormat: 'astro',\n\t\tlocStart: (node: AstroNode) => node.start,\n\t\tlocEnd: (node: AstroNode) => node.end,\n\t},\n};\n\n// https://prettier.io/docs/en/plugins.html#printers\nexport const printers: Record<string, Printer> = {\n\t// Prettier types `print`'s callback as taking an `AstPath`, but it passes one taking a selector.\n\tastro: printer as unknown as Printer,\n};\n\nconst defaultOptions = {\n\ttabWidth: 2,\n};\n\nexport { defaultOptions, options };\n"],"names":["leadingWhitespace","trailingWhitespace","parseAstro","printers","group","hardline","indent","replaceEndOfLine"],"mappings":";;;;;AAgBO,MAAM,OAAO,GAA+C;AAClE,IAAA,mBAAmB,EAAE;AACpB,QAAA,QAAQ,EAAE,OAAO;AACjB,QAAA,IAAI,EAAE,SAAS;AACf,QAAA,OAAO,EAAE,KAAK;AACd,QAAA,WAAW,EAAE,kFAAkF;AAC/F,KAAA;AACD,IAAA,oBAAoB,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AE,OAAO;QAClB,QAAQ,EAAE,CAAC,IAAe,KAAK,IAAI,CAAC,KAAK;QACzC,MAAM,EAAE,CAAC,IAAe,KAAK,IAAI,CAAC,GAAG;AACrC,KAAA;;AAIK,MAAM,QAAQ,GAA4B;AAEhD,IAAA,KAAK,EAAE,OAA6B;;AAGrC,MAAM,cAAc,GAAG;AACtB,IAAA,QAAQ,EAAE,CAAC;;;;;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/options.ts","../src/ast.ts","../src/elements.ts","../src/printer/utils.ts","../src/whitespace.ts","../src/parser.ts","../src/estree.ts","../src/printer/children.ts","../src/printer/embed.ts","../src/printer/index.ts","../src/index.ts"],"sourcesContent":["import type { SupportOption } from 'prettier';\n\nexport type CompressHTML = 'jsx' | 'html' | 'none';\n\ninterface PluginOptions {\n\tastroAllowShorthand: boolean;\n\tastroSkipFrontmatter: boolean;\n\tastroCompressHTML: CompressHTML;\n}\n\ndeclare module 'prettier' {\n\t// eslint-disable-next-line @typescript-eslint/no-empty-object-type\n\tinterface RequiredOptions extends PluginOptions {}\n}\n\n// https://prettier.io/docs/en/plugins.html#options\nexport const options: Record<keyof PluginOptions, SupportOption> = {\n\tastroAllowShorthand: {\n\t\tcategory: 'Astro',\n\t\ttype: 'boolean',\n\t\tdefault: false,\n\t\tdescription: 'Enable/disable attribute shorthand if attribute name and expression are the same',\n\t},\n\tastroSkipFrontmatter: {\n\t\tcategory: 'Astro',\n\t\ttype: 'boolean',\n\t\tdefault: false,\n\t\tdescription: 'Skips the formatting of the frontmatter.',\n\t},\n\tastroCompressHTML: {\n\t\tcategory: 'Astro',\n\t\ttype: 'choice',\n\t\tdefault: 'jsx',\n\t\tdescription:\n\t\t\t\"Mirror of Astro's compressHTML config. Tells the formatter which whitespace the compiler will collapse.\",\n\t\tchoices: [\n\t\t\t{\n\t\t\t\tvalue: 'jsx',\n\t\t\t\tdescription:\n\t\t\t\t\t\"Astro's default since 7.0.0. Whitespace runs containing a newline are dropped; same-line spaces are content.\",\n\t\t\t},\n\t\t\t{\n\t\t\t\tvalue: 'html',\n\t\t\t\tdescription: 'Browser HTML whitespace rules. Equivalent to compressHTML: true.',\n\t\t\t},\n\t\t\t{ value: 'none', description: 'No collapsing. Equivalent to compressHTML: false.' },\n\t\t\t// Prettier's SupportOption types omit `redirect`, which its own option normaliser honours.\n\t\t\t{ value: true, redirect: 'html' } as unknown as { value: boolean; description: string },\n\t\t\t{ value: false, redirect: 'none' } as unknown as { value: boolean; description: string },\n\t\t],\n\t},\n};\n","export const synthetic: unique symbol = Symbol.for('prettier-plugin-astro.synthetic');\nexport const ownChildren: unique symbol = Symbol.for('prettier-plugin-astro.ownChildren');\n\nexport interface AstroNode {\n\ttype: string;\n\tstart: number;\n\tend: number;\n\t[synthetic]?: boolean;\n\t[ownChildren]?: boolean;\n\t[key: string]: unknown;\n}\n\nexport interface JsComment {\n\ttype: 'Line' | 'Block';\n\tvalue: string;\n\tstart: number;\n\tend: number;\n}\n\nexport const astroVisitorKeys: Record<string, string[]> = {\n\tAstroRoot: ['frontmatter', 'template'],\n\tAstroFrontmatter: ['program'],\n\tAstroScript: ['program'],\n\tAstroDoctype: [],\n\tAstroComment: [],\n};\n\nexport const isNode = (value: unknown): value is AstroNode =>\n\ttypeof value === 'object' && value !== null && typeof (value as AstroNode).type === 'string';\n\nexport function tagNameOf(node: AstroNode): string | null {\n\tif (node.type !== 'JSXElement') return null;\n\tconst name = (node.openingElement as AstroNode | undefined)?.name as AstroNode | undefined;\n\treturn name?.type === 'JSXIdentifier' ? (name.name as string) : null;\n}\n\n/** A dotted name like `Astro.self` has no single identifier, so it is rebuilt from its parts. */\nexport function jsxNameOf(name: AstroNode): string | null {\n\tif (name.type === 'JSXIdentifier') return name.name as string;\n\tif (name.type !== 'JSXMemberExpression') return null;\n\tconst object = jsxNameOf(name.object as AstroNode);\n\tconst property = jsxNameOf(name.property as AstroNode);\n\treturn object !== null && property !== null ? `${object}.${property}` : null;\n}\n\nexport const isComponentName = (name: string | null): boolean =>\n\tname === null || /^[A-Z]/.test(name) || name.includes('.');\n\nexport function attributesOf(node: AstroNode): AstroNode[] {\n\tconst opening = node.openingElement as AstroNode | undefined;\n\treturn (opening?.attributes as AstroNode[] | undefined) ?? [];\n}\n\nexport function attributeNamed(node: AstroNode, name: string): AstroNode | undefined {\n\treturn attributesOf(node).find(\n\t\t(attribute) => attribute.type === 'JSXAttribute' && (attribute.name as AstroNode).name === name,\n\t);\n}\n\nexport function attributeStringValue(node: AstroNode, name: string): string | null {\n\tconst value = attributeNamed(node, name)?.value as AstroNode | undefined;\n\treturn value?.type === 'Literal' && typeof value.value === 'string' ? value.value : null;\n}\n\nexport const hasAttribute = (node: AstroNode, name: string): boolean =>\n\tattributeNamed(node, name) !== undefined;\n\nexport const hasSetDirective = (node: AstroNode): boolean =>\n\thasAttribute(node, 'set:html') || hasAttribute(node, 'set:text');\n\nexport function childrenOf(node: AstroNode): AstroNode[] | null {\n\tif (node.type === 'JSXElement' || node.type === 'JSXFragment') {\n\t\treturn (node.astroChildren as AstroNode[] | undefined) ?? (node.children as AstroNode[]);\n\t}\n\treturn null;\n}\n\n/** Prettier's JSX printer prints a lone template-literal child verbatim: the only seam for our own children doc. */\nexport function takeOverChildren(node: AstroNode): void {\n\tconst children = node.children as AstroNode[];\n\tif (children.length === 0) return;\n\tnode.astroChildren = children;\n\tnode.children = [\n\t\t{\n\t\t\ttype: 'JSXExpressionContainer',\n\t\t\tstart: node.start,\n\t\t\tend: node.end,\n\t\t\t[ownChildren]: true,\n\t\t\texpression: {\n\t\t\t\ttype: 'TemplateLiteral',\n\t\t\t\tstart: node.start,\n\t\t\t\tend: node.end,\n\t\t\t\tquasis: [],\n\t\t\t\texpressions: [],\n\t\t\t},\n\t\t},\n\t];\n}\n\nexport function walk(node: unknown, visit: (node: AstroNode) => void): void {\n\tif (Array.isArray(node)) {\n\t\tfor (const item of node) walk(item, visit);\n\t\treturn;\n\t}\n\tif (!isNode(node)) return;\n\tvisit(node);\n\tfor (const key of Object.keys(node)) {\n\t\tif (key !== 'type') walk(node[key], visit);\n\t}\n}\n","/** Mirrors `astro_codegen/src/printer/whitespace.rs` — the compiler never collapses these. */\nexport const rawTextElements = new Set([\n\t'pre',\n\t'listing',\n\t'iframe',\n\t'noembed',\n\t'noframes',\n\t'math',\n\t'plaintext',\n\t'script',\n\t'style',\n\t'textarea',\n\t'title',\n\t'xmp',\n]);\n\n// https://github.com/prettier/prettier/blob/main/vendors/html-void-elements.json\nexport const voidElements = new Set([\n\t'area',\n\t'base',\n\t'basefont',\n\t'bgsound',\n\t'br',\n\t'col',\n\t'command',\n\t'embed',\n\t'frame',\n\t'hr',\n\t'image',\n\t'img',\n\t'input',\n\t'isindex',\n\t'keygen',\n\t'link',\n\t'menuitem',\n\t'meta',\n\t'nextid',\n\t'param',\n\t'source',\n\t'track',\n\t'wbr',\n]);\n\n/** Extracted verbatim from `prettier/plugins/html.js` so the two printers cannot drift apart. */\nconst cssDisplay: Record<string, string> = {\n\tarea: 'none',\n\tbase: 'none',\n\tbasefont: 'none',\n\tdatalist: 'none',\n\thead: 'none',\n\tlink: 'none',\n\tmeta: 'none',\n\tnoembed: 'none',\n\tnoframes: 'none',\n\tparam: 'block',\n\trp: 'none',\n\tscript: 'block',\n\tstyle: 'none',\n\ttemplate: 'inline',\n\ttitle: 'none',\n\thtml: 'block',\n\tbody: 'block',\n\taddress: 'block',\n\tblockquote: 'block',\n\tcenter: 'block',\n\tdialog: 'block',\n\tdiv: 'block',\n\tfigure: 'block',\n\tfigcaption: 'block',\n\tfooter: 'block',\n\tform: 'block',\n\theader: 'block',\n\thr: 'block',\n\tlegend: 'block',\n\tlisting: 'block',\n\tmain: 'block',\n\tp: 'block',\n\tplaintext: 'block',\n\tpre: 'block',\n\tsearch: 'block',\n\txmp: 'block',\n\tslot: 'contents',\n\truby: 'ruby',\n\trt: 'ruby-text',\n\tarticle: 'block',\n\taside: 'block',\n\th1: 'block',\n\th2: 'block',\n\th3: 'block',\n\th4: 'block',\n\th5: 'block',\n\th6: 'block',\n\thgroup: 'block',\n\tnav: 'block',\n\tsection: 'block',\n\tdir: 'block',\n\tdd: 'block',\n\tdl: 'block',\n\tdt: 'block',\n\tmenu: 'block',\n\tol: 'block',\n\tul: 'block',\n\tli: 'list-item',\n\ttable: 'table',\n\tcaption: 'table-caption',\n\tcolgroup: 'table-column-group',\n\tcol: 'table-column',\n\tthead: 'table-header-group',\n\ttbody: 'table-row-group',\n\ttfoot: 'table-footer-group',\n\ttr: 'table-row',\n\ttd: 'table-cell',\n\tth: 'table-cell',\n\tinput: 'inline-block',\n\tbutton: 'inline-block',\n\tfieldset: 'block',\n\tdetails: 'block',\n\tsummary: 'block',\n\tmarquee: 'inline-block',\n\tsource: 'block',\n\ttrack: 'block',\n\tmeter: 'inline-block',\n\tprogress: 'inline-block',\n\tobject: 'inline-block',\n\tvideo: 'inline-block',\n\taudio: 'inline-block',\n\tselect: 'inline-block',\n\toption: 'block',\n\toptgroup: 'block',\n};\n\nconst inlineLevel = new Set(['inline', 'inline-block', 'ruby', 'ruby-text', 'contents']);\n\nexport function displayOfTag(tag: string): string {\n\treturn cssDisplay[tag] ?? 'inline';\n}\n\nexport function isInlineDisplay(display: string): boolean {\n\treturn inlineLevel.has(display);\n}\n","import parseSrcset from '@prettier/parse-srcset';\nimport type { Doc } from 'prettier';\nimport { doc } from 'prettier';\n\nconst { group, ifBreak, indent, join, line, softline } = doc.builders;\n\n/** dedent string & return tabSize (the last part is what we need) */\nexport function manualDedent(input: string): {\n\ttabSize: number;\n\tchar: string;\n\tresult: string;\n} {\n\tlet minTabSize = Infinity;\n\tlet result = input;\n\t// 1. normalize\n\tresult = result.replace(/\\r\\n/g, '\\n');\n\n\t// 2. count tabSize\n\tlet char = '';\n\tfor (const row of result.split('\\n')) {\n\t\tif (!row) continue;\n\t\t// if any line begins with a non-whitespace char, minTabSize is 0\n\t\tif (row[0] && /^\\S/.test(row[0])) {\n\t\t\tminTabSize = 0;\n\t\t\tbreak;\n\t\t}\n\t\tconst match = /^(\\s+)\\S+/.exec(row); // \\S ensures we don’t count lines of pure whitespace\n\t\tif (match) {\n\t\t\tif (match[1] && !char) char = match[1][0];\n\t\t\tif (match[1].length < minTabSize) minTabSize = match[1].length;\n\t\t}\n\t}\n\n\t// 3. reformat string\n\tif (minTabSize > 0 && Number.isFinite(minTabSize)) {\n\t\tresult = result.replace(new RegExp(`^${new Array(minTabSize + 1).join(char)}`, 'gm'), '');\n\t}\n\n\treturn {\n\t\ttabSize: minTabSize === Infinity ? 0 : minTabSize,\n\t\tchar,\n\t\tresult,\n\t};\n}\n\nexport function printSrcset(value: string): Doc {\n\tconst candidates = parseSrcset(decodeQuoteEntities(value));\n\tconst descriptorUnits = { width: 'w', height: 'h', density: 'x' } as const;\n\tconst descriptorTypes = (Object.keys(descriptorUnits) as (keyof typeof descriptorUnits)[]).filter(\n\t\t(type) => candidates.some((candidate) => candidate[type]),\n\t);\n\tif (descriptorTypes.length > 1) throw new Error('Mixed descriptor in srcset is not supported');\n\n\tconst descriptorType = descriptorTypes[0];\n\tconst unit = descriptorType ? descriptorUnits[descriptorType] : '';\n\tconst urls = candidates.map((candidate) => candidate.source.value);\n\tconst widestUrl = Math.max(...urls.map((url) => url.length));\n\tconst descriptors = candidates.map((candidate) =>\n\t\tdescriptorType && candidate[descriptorType] ? String(candidate[descriptorType].value) : '',\n\t);\n\tconst descriptorLeftLengths = descriptors.map((descriptor) => {\n\t\tconst decimal = descriptor.indexOf('.');\n\t\treturn decimal === -1 ? descriptor.length : decimal;\n\t});\n\tconst widestDescriptorLeft = Math.max(...descriptorLeftLengths);\n\tconst printed = urls.map((url, index) => {\n\t\tconst parts: Doc[] = [url.replaceAll('\"', '"')];\n\t\tconst descriptor = descriptors[index];\n\t\tif (descriptor) {\n\t\t\tconst padding =\n\t\t\t\twidestUrl - url.length + 1 + widestDescriptorLeft - descriptorLeftLengths[index];\n\t\t\tparts.push(ifBreak(' '.repeat(padding), ' '), descriptor + unit);\n\t\t}\n\t\treturn parts;\n\t});\n\treturn group([indent([softline, join([',', line], printed)]), softline]);\n}\n\nexport const decodeQuoteEntities = (text: string): string =>\n\ttext.replaceAll(''', \"'\").replaceAll('"', '\"');\n\nexport function printClassNames(value: string): string {\n\tconst lines = value.trim().split(/[\\r\\n]+/);\n\tconst formattedLines = lines.map((row) => {\n\t\tconst spaces = /^\\s+/.exec(row);\n\t\treturn (spaces ? spaces[0] : '') + row.trim().split(/\\s+/).join(' ');\n\t});\n\treturn formattedLines.join('\\n');\n}\n","import {\n\ttype AstroNode,\n\tchildrenOf,\n\thasAttribute,\n\thasSetDirective,\n\tisComponentName,\n\ttagNameOf,\n} from './ast';\nimport { displayOfTag, isInlineDisplay, rawTextElements } from './elements';\nimport type { CompressHTML } from './options';\n\ntype Sensitivity = 'css' | 'strict' | 'ignore';\n\nexport interface Settings {\n\tmode: CompressHTML;\n\tsensitivity: Sensitivity;\n}\n\ninterface Context extends Settings {\n\tisRoot: boolean;\n\tinRaw: boolean;\n}\n\ntype Decision = 'keep' | 'drop' | 'space';\n\nconst leadingWhitespace = /^[\\t\\n\\f\\r ]+/;\nconst trailingWhitespace = /[\\t\\n\\f\\r ]+$/;\nconst hasNewline = (run: string) => /[\\n\\r]/.test(run);\n\nconst isText = (node: AstroNode | null) => node?.type === 'JSXText';\nconst isComment = (node: AstroNode | null) => node?.type === 'AstroComment';\nconst rawTextOf = (node: AstroNode) => (node.raw as string | undefined) ?? '';\nconst isWhitespaceOnly = (node: AstroNode) => isText(node) && rawTextOf(node).trim().length === 0;\n\nexport function opensRawSubtree(node: AstroNode): boolean {\n\tif (node.type !== 'JSXElement') return false;\n\tif (node.astroPreserveWhitespace) return true;\n\tif (hasAttribute(node, 'is:raw')) return true;\n\tconst tag = tagNameOf(node);\n\treturn tag !== null && !isComponentName(tag) && rawTextElements.has(tag);\n}\n\n/** A `<style>` the compiler lifts out of the template, taking the whitespace beside it. */\nconst isExtractedStyle = (node: AstroNode | null) =>\n\tnode !== null && tagNameOf(node) === 'style' && !hasAttribute(node, 'is:inline');\n\nfunction displayOf(node: AstroNode): string {\n\tif (node.type !== 'JSXElement') return 'inline';\n\tconst tag = tagNameOf(node);\n\tif (tag === null || isComponentName(tag) || tag.includes('-')) return 'inline';\n\tif (node.astroSvg) return tag === 'svg' ? 'inline-block' : node.astroSvgText ? 'inline' : 'block';\n\treturn displayOfTag(tag);\n}\n\nconst isBlockBox = (node: AstroNode | null): boolean =>\n\tnode !== null && node.type !== 'JSXText' && !isInlineDisplay(displayOf(node));\n\n// An inline-block sits inline but lays its content out separately, so its own edges never render whitespace.\nexport const swallowsEdgeWhitespace = (node: AstroNode): boolean => {\n\tconst display = displayOf(node);\n\treturn display === 'inline-block' || !isInlineDisplay(display);\n};\n\n// Prettier always breaks these elements between children or around their entire content, respectively.\nconst breaksOwnChildren = new Set(['html', 'head', 'ul', 'ol', 'select']);\nconst breaksOwnContent = new Set(['body', 'script', 'style']);\n\n/** Mirrors prettier's HTML printer: these lay their children out one per line however they were written. */\nexport function breaksChildren(node: AstroNode): boolean {\n\tconst tag = node.type === 'JSXElement' ? tagNameOf(node) : null;\n\tif (tag === null || isComponentName(tag)) return false;\n\tif (breaksOwnChildren.has(tag)) return true;\n\tconst display = displayOfTag(tag);\n\treturn display.startsWith('table') && display !== 'table-cell';\n}\n\nconst hasElementChild = (node: AstroNode): boolean =>\n\tchildrenOf(node)?.some((child) => child.type === 'JSXElement') ?? false;\n\nconst runBefore = (node: AstroNode | undefined) =>\n\tnode && isText(node) ? (trailingWhitespace.exec(rawTextOf(node))?.[0] ?? '') : '';\n\nconst runAfter = (node: AstroNode | undefined) =>\n\tnode && isText(node) ? (leadingWhitespace.exec(rawTextOf(node))?.[0] ?? '') : '';\n\n// An element the author gave a line of its own keeps it, however narrow it is. Text always reflows.\nexport function sitsOnItsOwnLine(container: AstroNode, child: AstroNode | null): boolean {\n\tif (child === null || isText(child)) return false;\n\tconst children = childrenOf(container);\n\tconst index = children?.indexOf(child) ?? -1;\n\tif (index === -1) return false;\n\treturn hasNewline(runBefore(children![index - 1])) && hasNewline(runAfter(children![index + 1]));\n}\n\nconst hasChildOnItsOwnLine = (node: AstroNode): boolean =>\n\tchildrenOf(node)?.some((child) => sitsOnItsOwnLine(node, child)) ?? false;\n\nexport function forcesBreak(node: AstroNode): boolean {\n\tif (breaksChildren(node)) return true;\n\tconst children = childrenOf(node);\n\tif (children === null) return false;\n\tconst tag = node.type === 'JSXElement' ? tagNameOf(node) : null;\n\tif (tag !== null && breaksOwnContent.has(tag)) return true;\n\treturn children.some(hasElementChild) || hasChildOnItsOwnLine(node);\n}\n\nexport type Separator = 'none' | 'soft' | 'space' | 'break' | 'blank';\n\nexport interface PrinterBoundary {\n\tcontainer: AstroNode;\n\tprev: AstroNode | null;\n\tnext: AstroNode | null;\n\tisRoot: boolean;\n\tloneChild: boolean;\n\tedge: boolean;\n}\n\nconst isBlankRun = (run: string) => /[\\n\\r][^\\S\\n\\r]*[\\n\\r]/.test(run);\n\nconst isEmptySlot = (node: AstroNode): boolean =>\n\tnode.type === 'JSXElement' && tagNameOf(node) === 'slot' && (childrenOf(node)?.length ?? 0) === 0;\n\n/** A slot with no fallback renders nothing, so its container renders empty when given no content. */\nfunction canRenderEmpty(container: AstroNode): boolean {\n\tconst tag = container.type === 'JSXElement' ? tagNameOf(container) : null;\n\tif (tag === null || isComponentName(tag)) return false;\n\tconst children = childrenOf(container);\n\tif (children === null) return false;\n\tconst content = children.filter((child) => !isWhitespaceOnly(child) && !isComment(child));\n\treturn (\n\t\tchildren.some((child) => isComment(child) || isEmptySlot(child)) && content.every(isEmptySlot)\n\t);\n}\n\n/** A text neighbour never decides significance; at a container edge only the container does. */\nfunction sidesFor(boundary: PrinterBoundary): (AstroNode | null)[] | null {\n\tif (boundary.edge) return [null];\n\tconst sides: (AstroNode | null)[] = [];\n\tif (boundary.prev === null) sides.push(null);\n\telse if (boundary.prev.type !== 'JSXText') sides.push(boundary.prev);\n\tif (boundary.next === null) sides.push(null);\n\telse if (boundary.next.type !== 'JSXText') sides.push(boundary.next);\n\treturn sides.length > 0 ? sides : null;\n}\n\n/** `<slot>` and custom elements get a slot iff they have content, so their blank content is content. */\nexport function blankContentIsFree(\n\tcontainer: AstroNode,\n\tisRoot: boolean,\n\tsettings: Settings,\n): boolean {\n\tconst tag = container.type === 'JSXElement' ? tagNameOf(container) : null;\n\tif (tag === 'slot') return false;\n\tif (tag !== null && !isComponentName(tag) && tag.includes('-')) return false;\n\n\tconst boundary: Boundary = {\n\t\tcontainer,\n\t\tcontext: { ...settings, isRoot, inRaw: false },\n\t\tprev: null,\n\t\tnext: null,\n\t\tsides: [null],\n\t\tatStart: true,\n\t\tatEnd: true,\n\t\tloneChild: true,\n\t};\n\treturn isFree(boundary) || mayAlterRenderedWhitespace(boundary);\n}\n\nexport function separatorFor(\n\trun: string,\n\tboundary: PrinterBoundary,\n\tsettings: Settings,\n): Separator {\n\tconst sides = sidesFor(boundary);\n\tconst internal: Boundary = {\n\t\tcontainer: boundary.container,\n\t\tcontext: { ...settings, isRoot: boundary.isRoot, inRaw: false },\n\t\tprev: boundary.prev,\n\t\tnext: boundary.next,\n\t\tsides: sides ?? [],\n\t\tatStart: boundary.prev === null,\n\t\tatEnd: boundary.next === null,\n\t\tloneChild: boundary.loneChild,\n\t};\n\n\tif (isSlotFallback(internal)) return run === '' ? 'none' : 'space';\n\tconst free = isFree(internal) || (sides !== null && mayAlterRenderedWhitespace(internal));\n\tif (boundary.edge) {\n\t\t// Adding or dropping whitespace here flips whether a `:empty` rule matches the emptied container.\n\t\tif (settings.sensitivity !== 'ignore' && canRenderEmpty(boundary.container)) {\n\t\t\treturn run === '' ? 'none' : 'space';\n\t\t}\n\t\tif (free) return 'soft';\n\t\treturn run === '' ? 'none' : 'space';\n\t}\n\tif (isBlankRun(run)) return 'blank';\n\tif (settings.sensitivity === 'ignore') return 'break';\n\t// Between inline neighbours a newline and a space render alike, so it is free to reflow.\n\tif (\n\t\thasNewline(run) &&\n\t\t(sitsOnItsOwnLine(boundary.container, boundary.prev) ||\n\t\t\tsitsOnItsOwnLine(boundary.container, boundary.next))\n\t) {\n\t\treturn 'break';\n\t}\n\t// Whitespace beside a comment is spent on a line break, so the comment reads as its own remark.\n\tif (run !== '' && (isComment(boundary.prev) || isComment(boundary.next))) return 'break';\n\t// A block box swallows the whitespace beside it, so prettier's HTML printer spends it on a line of its own.\n\tif (free) return isBlockBox(boundary.prev) || isBlockBox(boundary.next) ? 'break' : 'soft';\n\treturn run === '' ? 'none' : 'space';\n}\n\nexport function normalizeWhitespace(template: AstroNode, options: Settings): void {\n\tvisit(template, { ...options, isRoot: true, inRaw: false });\n}\n\nfunction visit(container: AstroNode, context: Context): void {\n\tconst children = childrenOf(container);\n\tif (children === null) return;\n\n\tif (!context.inRaw) collapseRuns(container, children, context);\n\n\tfor (const child of children) {\n\t\tvisit(child, {\n\t\t\t...context,\n\t\t\tisRoot: false,\n\t\t\tinRaw: context.inRaw || opensRawSubtree(child),\n\t\t});\n\t}\n}\n\nfunction collapseRuns(container: AstroNode, children: AstroNode[], context: Context): void {\n\tconst dropped = new Set<AstroNode>();\n\n\tfor (const [index, child] of children.entries()) {\n\t\tif (!isText(child)) continue;\n\t\tconst prev = children[index - 1] ?? null;\n\t\tconst next = children[index + 1] ?? null;\n\n\t\tif (isWhitespaceOnly(child)) {\n\t\t\tconst decision = decide(rawTextOf(child), {\n\t\t\t\tcontainer,\n\t\t\t\tcontext,\n\t\t\t\tprev,\n\t\t\t\tnext,\n\t\t\t\tsides: [prev, next],\n\t\t\t\tatStart: prev === null,\n\t\t\t\tatEnd: next === null,\n\t\t\t\tloneChild: children.length === 1,\n\t\t\t});\n\t\t\tconst text = resolve(rawTextOf(child), decision);\n\t\t\tif (text === '') dropped.add(child);\n\t\t\telse setText(child, text);\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst raw = rawTextOf(child);\n\t\tconst lead = leadingWhitespace.exec(raw)?.[0] ?? '';\n\t\tconst trail = trailingWhitespace.exec(raw)?.[0] ?? '';\n\t\tconst body = raw.slice(lead.length, raw.length - trail.length);\n\n\t\tconst leadDecision = decide(lead, {\n\t\t\tcontainer,\n\t\t\tcontext,\n\t\t\tprev,\n\t\t\tnext: child,\n\t\t\tsides: [prev],\n\t\t\tatStart: prev === null,\n\t\t\tatEnd: false,\n\t\t\tloneChild: false,\n\t\t});\n\t\tconst trailDecision = decide(trail, {\n\t\t\tcontainer,\n\t\t\tcontext,\n\t\t\tprev: child,\n\t\t\tnext,\n\t\t\tsides: [next],\n\t\t\tatStart: false,\n\t\t\tatEnd: next === null,\n\t\t\tloneChild: false,\n\t\t});\n\n\t\tsetText(child, resolve(lead, leadDecision) + body + resolve(trail, trailDecision));\n\t}\n\n\tif (dropped.size > 0) {\n\t\tconst kept = children.filter((child) => !dropped.has(child));\n\t\tchildren.length = 0;\n\t\tchildren.push(...kept);\n\t}\n}\n\n// Dropping a newline run would also drop the blank lines prettier reproduces from it.\nfunction resolve(run: string, decision: Decision): string {\n\tif (decision === 'drop') return hasNewline(run) ? run : '';\n\tif (decision === 'space') return ' ';\n\treturn run;\n}\n\nfunction setText(node: AstroNode, text: string): void {\n\tnode.raw = text;\n\tnode.value = text;\n}\n\ninterface Boundary {\n\tcontainer: AstroNode;\n\tcontext: Context;\n\tprev: AstroNode | null;\n\tnext: AstroNode | null;\n\t/** The neighbours whose CSS display decides significance; `null` stands for the container. */\n\tsides: (AstroNode | null)[];\n\tatStart: boolean;\n\tatEnd: boolean;\n\tloneChild: boolean;\n}\n\nfunction decide(run: string, boundary: Boundary): Decision {\n\tif (run === '') return 'keep';\n\tconst { mode } = boundary.context;\n\n\tif (isSlotFallback(boundary)) return 'space';\n\t// Dropping whitespace here would let a `:empty` rule start matching the emptied container.\n\tif (boundary.context.sensitivity !== 'ignore' && canRenderEmpty(boundary.container))\n\t\treturn 'keep';\n\tif (isFree(boundary)) return 'drop';\n\tif (mayAlterRenderedWhitespace(boundary)) return 'drop';\n\n\tif (mode === 'jsx') return hasNewline(run) ? 'keep' : 'space';\n\n\t// Prettier's JSX printer trims container-edge runs, which under `html`/`none` are rendered.\n\treturn boundary.atStart || boundary.atEnd ? 'space' : 'keep';\n}\n\nfunction isFree(boundary: Boundary): boolean {\n\tconst { container, context, atStart, atEnd, loneChild } = boundary;\n\tconst { mode } = context;\n\n\tif (context.isRoot && (atStart || atEnd)) return true;\n\tif (container.type === 'JSXElement' && hasSetDirective(container)) return true;\n\tif (isExtractedStyle(boundary.prev) || isExtractedStyle(boundary.next)) return true;\n\n\tconst tag = container.type === 'JSXElement' ? tagNameOf(container) : null;\n\tif (loneChild && tag !== null && isComponentName(tag)) return true;\n\t// These lay children out themselves, but under `strict` the author still owns every run.\n\tif (context.sensitivity !== 'strict' && breaksChildren(container)) return true;\n\n\tif (mode === 'html') {\n\t\tif (loneChild) return true;\n\t}\n\n\treturn false;\n}\n\n/** Whether the user authorised changing rendered whitespace here, not whether it is sound. */\nfunction mayAlterRenderedWhitespace(boundary: Boundary): boolean {\n\tconst { sensitivity } = boundary.context;\n\tif (sensitivity === 'ignore') return true;\n\tif (sensitivity === 'strict') return false;\n\t// One block box is enough: it swallows the whitespace on its side whatever the other neighbour is.\n\treturn boundary.sides.some((side) =>\n\t\tside === null ? swallowsEdgeWhitespace(boundary.container) : isBlockBox(side),\n\t);\n}\n\n/** Any content at all, whitespace included, gives a `<slot>` a fallback body; nothing gives none. */\nfunction isSlotFallback(boundary: Boundary): boolean {\n\treturn (\n\t\tboundary.container.type === 'JSXElement' &&\n\t\ttagNameOf(boundary.container) === 'slot' &&\n\t\tboundary.loneChild\n\t);\n}\n","import { parse as parseAstro } from '@astrojs/compiler-rs';\nimport type { ParserOptions } from 'prettier';\nimport {\n\ttype AstroNode,\n\tattributeStringValue,\n\tattributesOf,\n\tchildrenOf,\n\thasSetDirective,\n\tisComponentName,\n\tisNode,\n\ttype JsComment,\n\tsynthetic,\n\ttagNameOf,\n\ttakeOverChildren,\n\twalk,\n} from './ast';\nimport { rawTextElements, voidElements } from './elements';\nimport { printClassNames } from './printer/utils';\nimport {\n\tblankContentIsFree,\n\tnormalizeWhitespace,\n\topensRawSubtree,\n\ttype Settings,\n} from './whitespace';\n\ninterface Diagnostic {\n\tseverity: string;\n\ttext: string;\n\tlabels: { line: number; column: number }[];\n}\n\nexport function parse(source: string, options: ParserOptions): AstroNode {\n\tconst { ast, diagnostics } = parseAstro(source) as unknown as {\n\t\tast: AstroNode;\n\t\tdiagnostics: Diagnostic[];\n\t};\n\n\tconst failure = diagnostics.find((diagnostic) => diagnostic.severity === 'error');\n\tif (failure) throw syntaxError(failure);\n\n\tstripParentheses(ast);\n\trepairSpans(ast);\n\tmarkAttributes(ast, source);\n\tmarkSvgNamespace(ast);\n\tapplyPrettierIgnore(ast);\n\n\tconst body = ast.body as AstroNode[];\n\tconst template = templateFragment(ast, body);\n\tconst settings = {\n\t\tmode: options.astroCompressHTML,\n\t\tsensitivity: options.htmlWhitespaceSensitivity,\n\t};\n\t// Prettier always breaks between two adjacent non-text children, which only `jsx` can absorb.\n\tif (settings.mode === 'jsx') normalizeWhitespace(template.node as AstroNode, settings);\n\telse resolveBlankContainers(template.node as AstroNode, settings);\n\tnormalizeTagPairs(body, source);\n\tif (settings.mode !== 'jsx') claimChildren(template.node as AstroNode);\n\n\tast.template = template;\n\tdelete ast.body;\n\tast.comments = printableComments(ast);\n\treturn ast;\n}\n\nfunction syntaxError(diagnostic: Diagnostic): Error {\n\tconst label = diagnostic.labels[0];\n\tconst line = label?.line ?? 1;\n\tconst column = (label?.column ?? 0) + 1;\n\tconst error = new SyntaxError(`${diagnostic.text} (${line}:${column})`);\n\t(error as Error & { loc: unknown }).loc = { start: { line, column } };\n\treturn error;\n}\n\n// oxc emits explicit nodes; prettier re-derives parens itself and the two compound on every pass.\nfunction stripParentheses(root: AstroNode): void {\n\twalk(root, (node) => {\n\t\tfor (const key of Object.keys(node)) {\n\t\t\tconst value = node[key];\n\t\t\tif (Array.isArray(value)) {\n\t\t\t\tfor (const [index, item] of value.entries()) {\n\t\t\t\t\tvalue[index] = unwrapParens(item);\n\t\t\t\t}\n\t\t\t} else if (isNode(value)) {\n\t\t\t\tnode[key] = unwrapParens(value);\n\t\t\t}\n\t\t}\n\t});\n}\n\nfunction unwrapParens(node: unknown): unknown {\n\tlet current = node;\n\twhile (isNode(current)) {\n\t\tif (current.type === 'ParenthesizedExpression') current = current.expression;\n\t\telse if (current.type === 'TSParenthesizedType') current = current.typeAnnotation;\n\t\telse break;\n\t}\n\treturn current;\n}\n\n// `AstroScript` spans the whole `<script>` element, overlapping the tags prettier sorts it against.\nfunction repairSpans(root: AstroNode): void {\n\twalk(root, (node) => {\n\t\tif (node.type !== 'JSXElement') return;\n\t\tconst script = (node.children as AstroNode[]).find((child) => child.type === 'AstroScript');\n\t\tif (!script) return;\n\t\tscript.start = (node.openingElement as AstroNode).end;\n\t\tscript.end = (node.closingElement as AstroNode | null)?.start ?? node.end;\n\t});\n}\n\nfunction markAttributes(root: AstroNode, source: string): void {\n\twalk(root, (node) => {\n\t\tif (node.type !== 'JSXElement') return;\n\t\tconst tag = tagNameOf(node);\n\t\tconst htmlElement = tag !== null && !isComponentName(tag);\n\t\tfor (const attribute of attributesOf(node)) {\n\t\t\tif (attribute.type !== 'JSXAttribute') continue;\n\t\t\tconst name = String((attribute.name as AstroNode).name).toLowerCase();\n\t\t\tif (htmlElement && name === 'style') attribute.astroStyleAttribute = true;\n\t\t\tif ((tag === 'img' || tag === 'source') && name === 'srcset') {\n\t\t\t\tattribute.astroSrcsetAttribute = true;\n\t\t\t}\n\t\t\tmarkAttribute(attribute, source);\n\t\t}\n\t});\n}\n\nfunction markAttribute(node: AstroNode, source: string): void {\n\tconst value = node.value as AstroNode | null;\n\tif (!value) return;\n\n\tif (value.type === 'Literal' && typeof value.value === 'string') {\n\t\tconst name = (node.name as AstroNode).name;\n\t\tconst text = name === 'class' ? printClassNames(value.value) : value.value;\n\t\tif (value.raw === null || text !== value.value) {\n\t\t\tvalue.value = text;\n\t\t\tvalue.raw = `\"${text.replaceAll('\"', '"')}\"`;\n\t\t}\n\t\treturn;\n\t}\n\tif (value.type !== 'JSXExpressionContainer') return;\n\n\tif (source[node.start] === '{') node.astroShorthand = true;\n\tif (source[value.start] === '`') node.astroBacktick = true;\n}\n\nfunction applyPrettierIgnore(root: AstroNode): void {\n\twalk(root, (node) => {\n\t\tconst children = node.type === 'AstroRoot' ? (node.body as AstroNode[]) : childrenOf(node);\n\t\tif (children === null) return;\n\t\tfor (const [index, child] of children.entries()) {\n\t\t\tif (child.type !== 'AstroComment') continue;\n\t\t\tif (String(child.value).trim() !== 'prettier-ignore') continue;\n\t\t\tconst target = children.slice(index + 1).find((sibling) => sibling.type !== 'JSXText');\n\t\t\tif (target) target.astroIgnored = true;\n\t\t}\n\t});\n}\n\nconst svgTextElements = new Set(['text', 'textPath', 'tspan']);\n\nfunction markSvgNamespace(root: AstroNode): void {\n\tconst mark = (node: AstroNode, inText = false, inheritedPreserve = false) => {\n\t\tnode.astroSvg = true;\n\t\tconst textContent = inText || svgTextElements.has(tagNameOf(node) ?? '');\n\t\tconst whitespace = attributeStringValue(node, 'xml:space');\n\t\tconst preserve = whitespace === 'preserve' || (inheritedPreserve && whitespace !== 'default');\n\t\tif (textContent) node.astroSvgText = true;\n\t\tif (textContent && preserve) node.astroPreserveWhitespace = true;\n\t\tfor (const child of childrenOf(node) ?? []) {\n\t\t\tif (child.type !== 'JSXElement' || tagNameOf(child) === 'foreignObject') continue;\n\t\t\tmark(child, textContent, preserve);\n\t\t}\n\t};\n\twalk(root, (node) => {\n\t\tif (node.type === 'JSXElement' && tagNameOf(node) === 'svg') mark(node);\n\t});\n}\n\nfunction templateFragment(root: AstroNode, body: AstroNode[]): AstroNode {\n\tconst start = body[0]?.start ?? root.end;\n\tconst end = body.at(-1)?.end ?? root.end;\n\treturn {\n\t\ttype: 'JsExpressionRoot',\n\t\tstart,\n\t\tend,\n\t\tnode: {\n\t\t\ttype: 'JSXFragment',\n\t\t\tstart,\n\t\t\tend,\n\t\t\tastroRoot: true,\n\t\t\topeningFragment: { type: 'JSXOpeningFragment', start, end: start, [synthetic]: true },\n\t\t\tchildren: body,\n\t\t\tclosingFragment: { type: 'JSXClosingFragment', start: end, end, [synthetic]: true },\n\t\t},\n\t};\n}\n\nfunction pairUp(node: AstroNode, tag: string): void {\n\t(node.openingElement as AstroNode).selfClosing = false;\n\tnode.closingElement = {\n\t\ttype: 'JSXClosingElement',\n\t\tstart: node.end,\n\t\tend: node.end,\n\t\tname: { type: 'JSXIdentifier', name: tag, start: node.end, end: node.end },\n\t};\n}\n\n// Requiring the newline keeps the lone space `resolveBlankContainers` leaves behind, which is content.\nfunction printsNothing(child: AstroNode): boolean {\n\tconst raw = String(child.raw ?? '');\n\treturn child.type === 'JSXText' && raw.trim() === '' && /[\\n\\r]/.test(raw);\n}\n\nfunction normalizeTagPairs(body: AstroNode[], source: string): void {\n\twalk(body, (node) => {\n\t\tif (node.type !== 'JSXElement') return;\n\t\tconst tag = tagNameOf(node);\n\t\tif (tag === null) return;\n\t\tconst children = node.children as AstroNode[];\n\t\tconst closing = node.closingElement as AstroNode | null;\n\t\tconst component = isComponentName(tag);\n\n\t\tif (rawTextElements.has(tag) && !component) {\n\t\t\tif (!closing) pairUp(node, tag);\n\t\t\telse if (source.slice((node.openingElement as AstroNode).end, closing.start).trim() === '') {\n\t\t\t\tchildren.length = 0;\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tconst selfClosable =\n\t\t\tcomponent || voidElements.has(tag) || tag === 'slot' || hasSetDirective(node);\n\n\t\tif (children.every(printsNothing) && selfClosable && closing) {\n\t\t\t(node.openingElement as AstroNode).selfClosing = true;\n\t\t\tnode.closingElement = null;\n\t\t}\n\t});\n}\n\n// Decided here rather than in the children printer so tag pairing sees the final child count.\nfunction resolveBlankContainers(template: AstroNode, settings: Settings): void {\n\twalk(template, (node) => {\n\t\tif (node.type !== 'JSXElement' && node.type !== 'JSXFragment') return;\n\t\tif (node.type === 'JSXElement' && opensRawSubtree(node)) return;\n\t\tconst children = node.children as AstroNode[];\n\t\tif (children.length === 0) return;\n\t\tconst blank = children.every(\n\t\t\t(child) => child.type === 'JSXText' && String(child.raw ?? '').trim() === '',\n\t\t);\n\t\tif (!blank) return;\n\n\t\tconst free = blankContentIsFree(node, node.astroRoot === true, settings);\n\t\tchildren.length = 0;\n\t\tif (!free) {\n\t\t\tchildren.push({ type: 'JSXText', start: node.start, end: node.start, raw: ' ', value: ' ' });\n\t\t}\n\t});\n}\n\nfunction claimChildren(template: AstroNode): void {\n\twalk(template, (node) => {\n\t\tif (node.type !== 'JSXElement' && node.type !== 'JSXFragment') return;\n\t\tif (node.type === 'JSXElement' && opensRawSubtree(node)) return;\n\t\ttakeOverChildren(node);\n\t});\n}\n\n// Prettier throws on any comment it never printed, so drop the ones inside reprinted-from-source regions.\nfunction printableComments(root: AstroNode): JsComment[] {\n\tconst comments = (root.comments as JsComment[] | undefined) ?? [];\n\tif (comments.length === 0) return comments;\n\n\tconst frontmatter = root.frontmatter as AstroNode;\n\tconst skipped: [number, number][] = [];\n\tif (frontmatter.end > 0) skipped.push([frontmatter.start, frontmatter.end]);\n\n\twalk(root, (node) => {\n\t\tif (node.astroIgnored) {\n\t\t\tskipped.push([node.start, node.end]);\n\t\t\treturn;\n\t\t}\n\t\tif (!opensRawSubtree(node)) return;\n\t\tconst closing = node.closingElement as AstroNode | null;\n\t\tskipped.push([(node.openingElement as AstroNode).end, closing?.start ?? node.end]);\n\t});\n\n\treturn comments.filter(\n\t\t(comment) => !skipped.some(([start, end]) => comment.start >= start && comment.end <= end),\n\t);\n}\n","import type { Printer } from 'prettier';\nimport { printers } from 'prettier/plugins/estree';\n\nexport const estree = (printers as Record<string, Printer>).estree as Printer & {\n\tprint: (path: unknown, options: unknown, print: unknown, args?: unknown) => unknown;\n\tembed: (path: unknown, options: unknown) => unknown;\n\tgetVisitorKeys: (node: unknown, nonTraversableKeys: Set<string>) => string[];\n};\n","import type { AstPath, Doc, ParserOptions } from 'prettier';\nimport { doc } from 'prettier';\nimport type { AstroNode } from '../ast';\nimport { forcesBreak, opensRawSubtree, type Separator, separatorFor } from '../whitespace';\n\nconst { fill, group, hardline, indent, line, softline } = doc.builders;\n\nconst leadingWhitespace = /^[\\t\\n\\f\\r ]+/;\nconst trailingWhitespace = /[\\t\\n\\f\\r ]+$/;\nconst whitespaceRun = /[\\t\\n\\f\\r ]+/;\n\ntype PrintFn = (selector?: string | number | (string | number)[], args?: unknown) => Doc;\ntype ChildIterator = (\n\tcallback: (child: AstPath<AstroNode>, index: number) => void,\n\tkey: string,\n) => void;\n\ninterface Item {\n\tnode: AstroNode;\n\tindex: number;\n\twords: string[] | null;\n\tdoc: Doc;\n}\n\n/** Passed to a child so it withholds its closing `>` for the next sibling to carry onto its line. */\nexport const lends = 'lends-closing-bracket';\n\n/** Any child this printer does not lay out itself prints a `>` of its own, which the borrower would double. */\nconst withholdsClosingBracket = (node: AstroNode): boolean =>\n\tnode.type === 'JSXElement' &&\n\t!node.astroIgnored &&\n\tBoolean(node.closingElement) &&\n\tBoolean(node.astroChildren) &&\n\t!opensRawSubtree(node);\n\nfunction docFor(separator: Separator): Doc | null {\n\tswitch (separator) {\n\t\tcase 'none':\n\t\t\treturn null;\n\t\tcase 'soft':\n\t\t\treturn softline;\n\t\tcase 'space':\n\t\t\treturn line;\n\t\tcase 'break':\n\t\t\treturn hardline;\n\t\tcase 'blank':\n\t\t\treturn [hardline, hardline];\n\t}\n}\n\n/** Runs alternate with items: `runs[i]` is the whitespace before `items[i]`, `runs[n]` the trailing. */\nfunction collect(children: AstroNode[]): { items: Item[]; runs: string[] } {\n\tconst items: Item[] = [];\n\tconst runs: string[] = [];\n\tlet pending = '';\n\n\tfor (const [index, child] of children.entries()) {\n\t\tif (child.type !== 'JSXText') {\n\t\t\truns.push(pending);\n\t\t\titems.push({ node: child, index, words: null, doc: '' });\n\t\t\tpending = '';\n\t\t\tcontinue;\n\t\t}\n\t\tconst raw = String(child.raw ?? '');\n\t\tif (raw.trim() === '') {\n\t\t\tpending += raw;\n\t\t\tcontinue;\n\t\t}\n\t\tconst lead = leadingWhitespace.exec(raw)?.[0] ?? '';\n\t\tconst trail = trailingWhitespace.exec(raw)?.[0] ?? '';\n\t\truns.push(pending + lead);\n\t\titems.push({\n\t\t\tnode: child,\n\t\t\tindex,\n\t\t\twords: raw.slice(lead.length, raw.length - trail.length).split(whitespaceRun),\n\t\t\tdoc: '',\n\t\t});\n\t\tpending = trail;\n\t}\n\n\truns.push(pending);\n\treturn { items, runs };\n}\n\nexport type ChildrenMode = 'fill' | 'fill-lending' | 'loose';\n\nexport interface ChildrenOptions {\n\tmode?: ChildrenMode;\n\tsuffix?: Doc;\n}\n\nexport function printChildren(\n\tpath: AstPath<AstroNode>,\n\toptions: ParserOptions,\n\tprint: PrintFn,\n\tchildrenOptions: ChildrenOptions = {},\n): Doc {\n\tconst { mode, suffix } = childrenOptions;\n\tconst container = path.node;\n\tconst children = container.astroChildren as AstroNode[];\n\tconst { items, runs } = collect(children);\n\t// `resolveBlankContainers` already decided whether whitespace-only content survives.\n\tif (items.length === 0) return runs[0] === '' ? '' : ' ';\n\n\tconst isRoot = container.astroRoot === true;\n\tconst settings = {\n\t\tmode: options.astroCompressHTML,\n\t\tsensitivity: options.htmlWhitespaceSensitivity,\n\t};\n\tconst separatorAt = (index: number, edge: boolean) =>\n\t\tdocFor(\n\t\t\tseparatorFor(\n\t\t\t\truns[index],\n\t\t\t\t{\n\t\t\t\t\tcontainer,\n\t\t\t\t\tprev: items[index - 1]?.node ?? null,\n\t\t\t\t\tnext: items[index]?.node ?? null,\n\t\t\t\t\tisRoot,\n\t\t\t\t\tloneChild: false,\n\t\t\t\t\tedge,\n\t\t\t\t},\n\t\t\t\tsettings,\n\t\t\t),\n\t\t);\n\n\t// A gap with no whitespace to spend can still break, by carrying the previous tag's `>` down with it.\n\tconst lenders = new Set<number>();\n\tconst lending = new Set<number>();\n\tfor (let position = 1; position < items.length; position++) {\n\t\tif (separatorAt(position, false) !== null) continue;\n\t\tif (!withholdsClosingBracket(items[position - 1].node)) continue;\n\t\tlenders.add(position);\n\t\tlending.add(items[position - 1].index);\n\t}\n\n\tif (mode === 'fill-lending') lending.add(items.at(-1)!.index);\n\tconst printed = new Map<number, Doc>();\n\t(path as AstPath<AstroNode> & { each: ChildIterator }).each((child, index) => {\n\t\tif (child.node.type === 'JSXText') return;\n\t\tprinted.set(index, print(undefined, lending.has(index) ? lends : undefined));\n\t}, 'astroChildren');\n\tfor (const item of items) {\n\t\tif (item.words === null) item.doc = printed.get(item.index) ?? '';\n\t}\n\n\tconst parts: Doc[] = [''];\n\tconst append = (content: Doc) => parts.push([parts.pop()!, content]);\n\tconst separate = (separator: Doc | null) => {\n\t\tif (separator !== null) parts.push(separator, '');\n\t};\n\n\tfor (const [position, item] of items.entries()) {\n\t\tif (position > 0) {\n\t\t\tif (lenders.has(position)) {\n\t\t\t\tparts.push(softline, '');\n\t\t\t\tappend('>');\n\t\t\t} else separate(separatorAt(position, false));\n\t\t}\n\t\tif (item.words === null) {\n\t\t\tappend(item.doc);\n\t\t\tcontinue;\n\t\t}\n\t\tfor (const [wordPosition, word] of item.words.entries()) {\n\t\t\tif (wordPosition > 0) separate(line);\n\t\t\tappend(word);\n\t\t}\n\t}\n\tif (suffix) append(suffix);\n\n\tconst body = fill(parts);\n\tif (isRoot || mode === 'fill' || mode === 'fill-lending') return body;\n\n\tconst content: Doc = [\n\t\tindent([separatorAt(0, true) ?? '', body]),\n\t\tseparatorAt(items.length, true) ?? '',\n\t];\n\t// The element groups this itself, so a wrapping opening tag takes its children with it.\n\tif (mode === 'loose') return content;\n\treturn group(content, { shouldBreak: forcesBreak(container) });\n}\n","import type { AstPath, BuiltInParserName, Doc, Options, ParserOptions } from 'prettier';\nimport { doc } from 'prettier';\nimport { SassFormatter, type SassFormatterConfig } from 'sass-formatter';\nimport { type AstroNode, attributeStringValue, attributesOf, tagNameOf } from '../ast';\nimport { estree } from '../estree';\nimport { opensRawSubtree } from '../whitespace';\nimport { decodeQuoteEntities, manualDedent } from './utils';\n\nconst { group, hardline, indent, join, softline } = doc.builders;\nconst { mapDoc, replaceEndOfLine } = doc.utils;\n\n/** The value is printed inside a double-quoted attribute, which a quote from the CSS printer would end. */\nconst escapeQuotes = (value: Doc): Doc =>\n\tmapDoc(value, (part) => (typeof part === 'string' ? part.replaceAll('\"', '"') : part));\n\ntype TextToDoc = (text: string, options: Options) => Promise<Doc>;\ntype PrintFn = (selector?: string | number | (string | number)[]) => Doc;\n\nconst styleParsers: Record<string, BuiltInParserName> = {\n\tcss: 'css',\n\tscss: 'scss',\n\tless: 'less',\n};\n\n// Prettier swallows every error thrown inside `embed` unless this is set, leaving a useless message.\nasync function surfacingErrors(textToDoc: TextToDoc, text: string, options: Options) {\n\ttry {\n\t\treturn await textToDoc(text, options);\n\t} catch (error) {\n\t\tprocess.env.PRETTIER_DEBUG = 'true';\n\t\tthrow error;\n\t}\n}\n\n// Adapted from: https://github.com/prettier/prettier/blob/main/src/language-html/utils/index.js\nfunction inferParserByTypeAttribute(type: string | null): BuiltInParserName {\n\tswitch (type) {\n\t\tcase null:\n\t\tcase 'module':\n\t\tcase 'text/javascript':\n\t\tcase 'text/babel':\n\t\tcase 'application/javascript':\n\t\t\treturn 'babel';\n\t\tcase 'application/x-typescript':\n\t\t\treturn 'babel-ts';\n\t\tcase 'text/markdown':\n\t\t\treturn 'markdown';\n\t\tcase 'text/html':\n\t\t\treturn 'html';\n\t\tcase 'text/x-handlebars-template':\n\t\t\treturn 'glimmer';\n\t\tdefault:\n\t\t\tif (type.endsWith('json') || type.endsWith('importmap') || type === 'speculationrules') {\n\t\t\t\treturn 'json';\n\t\t\t}\n\t\t\treturn 'babel-ts';\n\t}\n}\n\nfunction inferScriptParser(node: AstroNode): BuiltInParserName {\n\t// Astro only processes scripts carrying no attribute other than `src`, and those are TypeScript.\n\tconst processed = attributesOf(node).every(\n\t\t(attribute) =>\n\t\t\tattribute.type === 'JSXAttribute' && (attribute.name as AstroNode).name === 'src',\n\t);\n\tif (processed) return 'babel-ts';\n\treturn inferParserByTypeAttribute(attributeStringValue(node, 'type'));\n}\n\nfunction styleAttributeValue(node: AstroNode): string | null {\n\tif (!node.astroStyleAttribute) return null;\n\tconst value = node.value as AstroNode | null;\n\tif (value?.type !== 'Literal' || typeof value.value !== 'string') return null;\n\treturn value.value.trim() === '' ? null : value.value;\n}\n\nfunction contentOf(node: AstroNode, options: ParserOptions): string {\n\tconst start = (node.openingElement as AstroNode).end;\n\tconst end = (node.closingElement as AstroNode | null)?.start ?? node.end;\n\treturn options.originalText.slice(start, end);\n}\n\nfunction wrapContent(print: PrintFn, content: Doc, isEmpty: boolean): Doc {\n\treturn [\n\t\tprint('openingElement'),\n\t\tindent([isEmpty ? '' : hardline, content]),\n\t\tisEmpty ? '' : hardline,\n\t\tprint('closingElement'),\n\t];\n}\n\nasync function renderEmbeddedDoc(content: Doc, options: ParserOptions): Promise<Doc> {\n\tconst { formatted } = await doc.printer.printDocToString(content, options);\n\tconst indentation = options.useTabs ? '\\t' : ' '.repeat(options.tabWidth);\n\treturn replaceEndOfLine(formatted.trimEnd().replace(/\\r?\\n/g, (line) => line + indentation));\n}\n\nfunction embedSass(source: string, options: ParserOptions): Doc {\n\tconst sassOptions: Partial<SassFormatterConfig> = {\n\t\ttabSize: options.tabWidth,\n\t\tinsertSpaces: !options.useTabs,\n\t\tlineEnding: options.endOfLine.toUpperCase() === 'CRLF' ? 'CRLF' : 'LF',\n\t};\n\tconst { result } = manualDedent(source);\n\treturn join(hardline, SassFormatter.Format(result, sassOptions).trim().split('\\n'));\n}\n\nexport function embed(path: AstPath<AstroNode>, options: ParserOptions) {\n\tconst node = path.node;\n\tif (node.astroIgnored) return undefined;\n\n\tif (node.type === 'AstroFrontmatter') {\n\t\tif (node.end === 0 || options.astroSkipFrontmatter) return undefined;\n\t\t// `Program.start` skips leading comments and `node.start` includes preceding whitespace.\n\t\tconst fence = options.originalText.indexOf('---', node.start);\n\t\tconst source = options.originalText.slice(fence + 3, node.end - 3);\n\t\tif (!source.trim()) return undefined;\n\t\treturn async (textToDoc: TextToDoc) => [\n\t\t\t'---',\n\t\t\thardline,\n\t\t\tawait surfacingErrors(textToDoc, source, { ...options, parser: 'babel-ts' }),\n\t\t\thardline,\n\t\t\t'---',\n\t\t];\n\t}\n\n\tif (node.type === 'JSXAttribute' && options.astroCompressHTML !== 'jsx') {\n\t\tconst style = styleAttributeValue(node);\n\t\tif (style !== null) {\n\t\t\treturn async (textToDoc: TextToDoc) => {\n\t\t\t\t// The flag makes prettier's CSS printer emit a declaration list rather than a stylesheet.\n\t\t\t\tconst declarations = await textToDoc(decodeQuoteEntities(style), {\n\t\t\t\t\t...options,\n\t\t\t\t\tparser: 'css',\n\t\t\t\t\t__isHTMLStyleAttribute: true,\n\t\t\t\t} as Options);\n\t\t\t\tconst value = escapeQuotes(declarations);\n\t\t\t\treturn ['style=\"', group([indent([softline, value]), softline]), '\"'];\n\t\t\t};\n\t\t}\n\t}\n\n\tif (node.type !== 'JSXElement') return estree.embed(path, options);\n\tconst tag = tagNameOf(node);\n\tif (tag === null || !node.closingElement) return estree.embed(path, options);\n\n\tconst source = contentOf(node, options);\n\tconst isEmpty = source.trim() === '';\n\n\tif (tag === 'script') {\n\t\tif (isEmpty) return estree.embed(path, options);\n\t\tconst parser = inferScriptParser(node);\n\t\treturn async (textToDoc: TextToDoc, print: PrintFn) =>\n\t\t\twrapContent(print, await surfacingErrors(textToDoc, source, { ...options, parser }), false);\n\t}\n\n\tif (tag === 'style') {\n\t\tif (isEmpty) return estree.embed(path, options);\n\t\tconst lang = attributeStringValue(node, 'lang')?.toLowerCase() ?? 'css';\n\t\tif (lang === 'sass') {\n\t\t\treturn (_textToDoc: TextToDoc, print: PrintFn) =>\n\t\t\t\twrapContent(print, embedSass(source, options), false);\n\t\t}\n\t\tconst parser = styleParsers[lang];\n\t\tif (!parser) return printVerbatim(source);\n\t\treturn async (textToDoc: TextToDoc, print: PrintFn) => {\n\t\t\tconst content = await surfacingErrors(textToDoc, source, { ...options, parser });\n\t\t\treturn wrapContent(\n\t\t\t\tprint,\n\t\t\t\toptions.astroCompressHTML === 'jsx' ? content : await renderEmbeddedDoc(content, options),\n\t\t\t\tfalse,\n\t\t\t);\n\t\t};\n\t}\n\n\tif (opensRawSubtree(node)) {\n\t\treturn (_textToDoc: TextToDoc, print: PrintFn) => [\n\t\t\tprint('openingElement'),\n\t\t\treplaceEndOfLine(source),\n\t\t\tprint('closingElement'),\n\t\t];\n\t}\n\n\treturn estree.embed(path, options);\n}\n\nfunction printVerbatim(source: string) {\n\treturn (_textToDoc: TextToDoc, print: PrintFn) =>\n\t\tgroup([print('openingElement'), replaceEndOfLine(source), print('closingElement')]);\n}\n","import type { AstPath, Doc, ParserOptions } from 'prettier';\nimport { doc } from 'prettier';\nimport { type AstroNode, astroVisitorKeys, jsxNameOf, ownChildren, synthetic } from '../ast';\nimport { estree } from '../estree';\nimport { forcesBreak, opensRawSubtree, swallowsEdgeWhitespace } from '../whitespace';\nimport { type ChildrenOptions, lends, printChildren } from './children';\nimport { embed } from './embed';\nimport { printSrcset } from './utils';\n\nconst { group, hardline, indent, line, softline } = doc.builders;\nconst { replaceEndOfLine } = doc.utils;\n\ntype PrintFn = (selector?: string | number | (string | number)[], args?: unknown) => Doc;\n\nfunction printDoctype(value: string): string {\n\tconst trimmed = value.trim();\n\tconst space = trimmed.search(/\\s/);\n\tconst name = space === -1 ? trimmed : trimmed.slice(0, space);\n\tconst rest = space === -1 ? '' : trimmed.slice(space);\n\treturn `<!doctype ${name.toLowerCase()}${rest}>`;\n}\n\nfunction printAstroNode(path: AstPath<AstroNode>, options: ParserOptions, print: PrintFn): Doc {\n\tconst node = path.node;\n\tswitch (node.type) {\n\t\tcase 'AstroRoot': {\n\t\t\tconst template = node.template as AstroNode;\n\t\t\tconst hasTemplate = ((template.node as AstroNode).children as AstroNode[]).length > 0;\n\t\t\tconst parts: Doc[] = [];\n\t\t\tif ((node.frontmatter as AstroNode).end > 0) {\n\t\t\t\tparts.push(print('frontmatter'));\n\t\t\t\tif (hasTemplate) parts.push(hardline, hardline);\n\t\t\t}\n\t\t\tif (hasTemplate) parts.push(print('template'));\n\t\t\treturn [parts, hardline];\n\t\t}\n\t\tcase 'AstroFrontmatter': {\n\t\t\tconst body = (node.program as AstroNode).body as unknown[];\n\t\t\tif (options.astroSkipFrontmatter) {\n\t\t\t\tconst fence = options.originalText.indexOf('---', node.start);\n\t\t\t\treturn replaceEndOfLine(options.originalText.slice(fence, node.end));\n\t\t\t}\n\t\t\treturn body.length > 0\n\t\t\t\t? ['---', hardline, print('program'), '---']\n\t\t\t\t: ['---', hardline, '---'];\n\t\t}\n\t\tcase 'AstroScript':\n\t\t\treturn ((node.program as AstroNode).body as unknown[]).length > 0 ? print('program') : '';\n\t\tcase 'AstroDoctype':\n\t\t\treturn printDoctype(node.value as string);\n\t\tcase 'AstroComment':\n\t\t\treturn `<!--${node.value as string}-->`;\n\t\tdefault:\n\t\t\treturn '';\n\t}\n}\n\nfunction printAttribute(\n\tpath: AstPath<AstroNode>,\n\toptions: ParserOptions,\n\tprint: PrintFn,\n): Doc | null {\n\tconst node = path.node;\n\tconst name = (node.name as AstroNode).name as string;\n\tconst value = node.value as AstroNode | null;\n\n\tif (node.astroShorthand) return ['{', print(['value', 'expression']), '}'];\n\n\tif (node.astroBacktick) return [name, '=', print(['value', 'expression'])];\n\n\tif (\n\t\toptions.astroCompressHTML !== 'jsx' &&\n\t\tnode.astroSrcsetAttribute &&\n\t\tvalue?.type === 'Literal' &&\n\t\ttypeof value.value === 'string' &&\n\t\tvalue.value.trim() !== ''\n\t) {\n\t\ttry {\n\t\t\treturn ['srcset=\"', printSrcset(value.value), '\"'];\n\t\t} catch {\n\t\t\treturn ['srcset=\"', value.value.replaceAll('\"', '"'), '\"'];\n\t\t}\n\t}\n\n\tconst expression =\n\t\tvalue?.type === 'JSXExpressionContainer' ? (value.expression as AstroNode) : null;\n\tif (\n\t\toptions.astroAllowShorthand &&\n\t\texpression?.type === 'Identifier' &&\n\t\texpression.name === name\n\t) {\n\t\treturn ['{', print(['value', 'expression']), '}'];\n\t}\n\n\treturn null;\n}\n\n// Prettier hugs a lone string attribute with a plain space, leaving its tag no line to wrap at.\nfunction printBreakableOpeningTag(\n\tpath: AstPath<AstroNode>,\n\toptions: ParserOptions,\n\tprint: PrintFn,\n): Doc | null {\n\tconst node = path.node;\n\tconst attributes = node.attributes as AstroNode[];\n\tif (attributes.length !== 1) return null;\n\tconst value = attributes[0].value as AstroNode | null;\n\tif (value?.type !== 'Literal' || typeof value.value !== 'string') return null;\n\tif (value.value.includes('\\n')) return null;\n\n\tconst end: Doc[] = node.selfClosing\n\t\t? options.bracketSameLine\n\t\t\t? [' />']\n\t\t\t: [line, '/>']\n\t\t: options.bracketSameLine\n\t\t\t? ['>']\n\t\t\t: [softline, '>'];\n\treturn group(['<', print('name'), indent([line, print(['attributes', 0])]), ...end]);\n}\n\n// Breaking an inline element beside its content renders as an added space; moving the brackets does not.\nfunction printWithDanglingBrackets(\n\tpath: AstPath<AstroNode>,\n\tprint: PrintFn,\n\tlending: boolean,\n): Doc | null {\n\tconst node = path.node;\n\tconst children = node.astroChildren as AstroNode[] | undefined;\n\tif (!children?.length || !node.closingElement) return null;\n\tif (swallowsEdgeWhitespace(node)) return null;\n\tif (startsWithSpace(children[0]) || endsWithSpace(children.at(-1)!)) return null;\n\n\tconst opening = print('openingElement') as { type?: string; contents?: Doc[] };\n\tif (opening.type !== 'group' || !Array.isArray(opening.contents)) return null;\n\tconst contents = opening.contents.filter((part) => part !== '');\n\tif (contents.at(-1) !== '>') return null;\n\t// The dropped `>` is preceded by the tag's own line, which would print blank once we add ours.\n\tconst withoutBracket = contents.slice(0, -1);\n\tif ((withoutBracket.at(-1) as { type?: string } | undefined)?.type === 'line')\n\t\twithoutBracket.pop();\n\n\tconst tag = jsxNameOf((node.closingElement as AstroNode).name as AstroNode);\n\tif (tag === null) return null;\n\tconst head = { ...opening, contents: withoutBracket } as Doc;\n\tconst shouldBreak = forcesBreak(node);\n\n\t// A self-closing last child lends its own `/>` instead, keeping our closing tag whole.\n\tif (isSelfClosing(children.at(-1)!) && !children.at(-1)!.astroIgnored) {\n\t\tconst lentBody = print(['children', 0], { mode: 'fill-lending' });\n\t\treturn group(\n\t\t\t[head, indent([softline, '>', lentBody]), line, '/>', '</', tag, lending ? '' : '>'],\n\t\t\t{ shouldBreak },\n\t\t);\n\t}\n\tconst body = print(['children', 0], { mode: 'fill', suffix: ['</', tag] });\n\treturn group([head, indent([softline, '>', body]), lending ? '' : [softline, '>']], {\n\t\tshouldBreak,\n\t});\n}\n\nconst isSelfClosing = (node: AstroNode): boolean =>\n\tnode.type === 'JSXElement' && !node.closingElement;\n\n// The lender drops the space or line before its `/>` too: the borrower supplies its own.\nfunction withoutSelfClosingMarker(printed: Doc): Doc {\n\tif (Array.isArray(printed)) {\n\t\treturn printed.at(-1) === ' />' ? printed.slice(0, -1) : printed;\n\t}\n\tconst tag = printed as { type?: string; contents?: Doc[] };\n\tif (tag.type !== 'group' || !Array.isArray(tag.contents)) return printed;\n\tif (tag.contents.at(-1) === ' />') return { ...tag, contents: tag.contents.slice(0, -1) } as Doc;\n\tif (tag.contents.at(-1) !== '/>') return printed;\n\treturn { ...tag, contents: tag.contents.slice(0, -2) } as Doc;\n}\n\nconst startsWithSpace = (child: AstroNode): boolean =>\n\tchild.type === 'JSXText' && /^[\\t\\n\\f\\r ]/.test(String(child.raw ?? ''));\n\nconst endsWithSpace = (child: AstroNode): boolean =>\n\tchild.type === 'JSXText' && /[\\t\\n\\f\\r ]$/.test(String(child.raw ?? ''));\n\n// No doc builder can cancel an indent nested inside a doc, so the root fragment's must be cut out.\nfunction unwrapFragmentIndent(printed: Doc): Doc {\n\tconst fragment = printed as { type?: string; contents?: Doc; expandedStates?: Doc[] };\n\tif (fragment.type !== 'group') return printed;\n\tif (fragment.expandedStates) {\n\t\tconst states = fragment.expandedStates.map(unwrapFragmentIndent);\n\t\treturn { ...fragment, contents: states[0], expandedStates: states } as Doc;\n\t}\n\tconst parts = fragment.contents as Doc[];\n\tif (!Array.isArray(parts) || parts.length !== 4) return printed;\n\tconst indented = parts[1] as { type?: string; contents?: Doc[] };\n\tif (indented.type !== 'indent' || !indented.contents) return printed;\n\treturn indented.contents[1];\n}\n\nexport const printer = {\n\t...estree,\n\tembed,\n\tgetVisitorKeys(node: AstroNode, nonTraversableKeys: Set<string>): string[] {\n\t\tconst keys = astroVisitorKeys[node.type] ?? estree.getVisitorKeys(node, nonTraversableKeys);\n\t\treturn node.astroChildren\n\t\t\t? keys.map((key) => (key === 'children' ? 'astroChildren' : key))\n\t\t\t: keys;\n\t},\n\tprint(path: AstPath<AstroNode>, options: ParserOptions, print: PrintFn, args?: unknown): Doc {\n\t\tconst node = path.node;\n\t\tif (node[ownChildren]) {\n\t\t\treturn path.callParent(() =>\n\t\t\t\tprintChildren(path, options, print, (args as ChildrenOptions | undefined) ?? {}),\n\t\t\t);\n\t\t}\n\t\tif (node[synthetic]) return '';\n\t\tif (node.astroIgnored) {\n\t\t\treturn replaceEndOfLine(options.originalText.slice(node.start, node.end));\n\t\t}\n\t\tif (astroVisitorKeys[node.type]) return printAstroNode(path, options, print);\n\t\tif (node.type === 'JSXAttribute') {\n\t\t\tconst attribute = printAttribute(path, options, print);\n\t\t\tif (attribute) return attribute;\n\t\t}\n\t\tif (node.type === 'JSXOpeningElement' && options.astroCompressHTML !== 'jsx') {\n\t\t\tconst opening = printBreakableOpeningTag(path, options, print);\n\t\t\tif (opening) return opening;\n\t\t}\n\t\tif (node.type === 'JSXElement' && args === lends && isSelfClosing(node)) {\n\t\t\treturn withoutSelfClosingMarker(print('openingElement'));\n\t\t}\n\t\tif (node.type === 'JSXElement' && node.astroChildren && !opensRawSubtree(node)) {\n\t\t\tconst dangling = printWithDanglingBrackets(path, print, args === lends);\n\t\t\tif (dangling) return dangling;\n\t\t\tconst tag = jsxNameOf((node.closingElement as AstroNode).name as AstroNode);\n\t\t\treturn group(\n\t\t\t\t[\n\t\t\t\t\tprint('openingElement'),\n\t\t\t\t\tprint(['children', 0], { mode: 'loose' }),\n\t\t\t\t\targs === lends && tag !== null ? ['</', tag] : print('closingElement'),\n\t\t\t\t],\n\t\t\t\t{ shouldBreak: forcesBreak(node) },\n\t\t\t);\n\t\t}\n\t\t// Reached when `embeddedLanguageFormatting` is off; reflowing raw content would corrupt it.\n\t\tif (\n\t\t\tnode.type === 'JSXElement' &&\n\t\t\tnode.closingElement &&\n\t\t\t(node.children as AstroNode[]).length > 0 &&\n\t\t\topensRawSubtree(node)\n\t\t) {\n\t\t\tconst start = (node.openingElement as AstroNode).end;\n\t\t\tconst end = (node.closingElement as AstroNode).start;\n\t\t\treturn [\n\t\t\t\tprint('openingElement'),\n\t\t\t\treplaceEndOfLine(options.originalText.slice(start, end)),\n\t\t\t\tprint('closingElement'),\n\t\t\t];\n\t\t}\n\t\tconst printed = estree.print(path, options, print, args) as Doc;\n\t\tif ((node.openingFragment as AstroNode | undefined)?.[synthetic]) {\n\t\t\treturn unwrapFragmentIndent(printed);\n\t\t}\n\t\treturn printed;\n\t},\n};\n","import type { Parser, Printer, SupportLanguage } from 'prettier';\nimport type { AstroNode } from './ast';\nimport { options } from './options';\nimport { parse } from './parser';\nimport { printer } from './printer';\n\n// https://prettier.io/docs/en/plugins.html#languages\nexport const languages: Partial<SupportLanguage>[] = [\n\t{\n\t\tname: 'astro',\n\t\tparsers: ['astro'],\n\t\textensions: ['.astro'],\n\t\tvscodeLanguageIds: ['astro'],\n\t},\n];\n\n// https://prettier.io/docs/en/plugins.html#parsers\nexport const parsers: Record<string, Parser> = {\n\tastro: {\n\t\tparse,\n\t\tastFormat: 'astro',\n\t\tlocStart: (node: AstroNode) => node.start,\n\t\tlocEnd: (node: AstroNode) => node.end,\n\t},\n};\n\n// https://prettier.io/docs/en/plugins.html#printers\nexport const printers: Record<string, Printer> = {\n\t// Prettier types `print`'s callback as taking an `AstPath`, but it passes one taking a selector.\n\tastro: printer as unknown as Printer,\n};\n\nconst defaultOptions = {\n\ttabWidth: 2,\n};\n\nexport { defaultOptions, options };\n"],"names":["group","indent","join","line","softline","leadingWhitespace","trailingWhitespace","parseAstro","printers","hardline","replaceEndOfLine"],"mappings":";;;;;;AAgBO,MAAM,OAAO,GAA+C;AAClE,IAAA,mBAAmB,EAAE;AACpB,QAAA,QAAQ,EAAE,OAAO;AACjB,QAAA,IAAI,EAAE,SAAS;AACf,QAAA,OAAO,EAAE,KAAK;AACd,QAAA,WAAW,EAAE,kFAAkF;AAC/F,KAAA;AACD,IAAA,oBAAoB,EAAE;AACrB,QAAA,QAAQ,EAAE,OAAO;AACjB,QAAA,IAAI,EAAE,SAAS;AACf,QAAA,OAAO,EAAE,KAAK;AACd,QAAA,WAAW,EAAE,0CAA0C;AACvD,KAAA;AACD,IAAA,iBAAiB,EAAE;AAClB,QAAA,QAAQ,EAAE,OAAO;AACjB,QAAA,IAAI,EAAE,QAAQ;AACd,QAAA,OAAO,EAAE,KAAK;AACd,QAAA,WAAW,EACV,yGAAyG;AAC1G,QAAA,OAAO,EAAE;AACR,YAAA;AACC,gBAAA,KAAK,EAAE,KAAK;AACZ,gBAAA,WAAW,EACV,8GAA8G;AAC/G,aAAA;AACD,YAAA;AACC,gBAAA,KAAK,EAAE,MAAM;AACb,gBAAA,WAAW,EAAE,kEAAkE;AAC/E,aAAA;AACD,YAAA,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,mDAAmD,EAAE;AAEnF,YAAA,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAwD;AACvF,YAAA,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAwD;AACxF,SAAA;AACD,KAAA;;;AClDK,MAAM,SAAS,GAAkB,MAAM,CAAC,GAAG,CAAC,iCAAiC,CAAC;AAC9E,MAAM,WAAW,GAAkB,MAAM,CAAC,GAAG,CAAC,mCAAmC,CAAC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BACN,KAAK,CAAC,gBAAgB,CAAC;gBACvB,gBAAgB,CAAC,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;gBACxD,KAAK,CAAC,gBAAgB,CAAC;aACvB;QACF;AACA,QAAA,MAAM,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,CAAQ;QAC/D,IAAK,IAAI,CAAC,eAAyC,GAAG,SAAS,CAAC,EAAE;AACjE,YAAA,OAAO,oBAAoB,CAAC,OAAO,CAAC;QACrC;AACA,QAAA,OAAO,OAAO;IACf,CAAC;CACD;;AC/PM,MAAM,SAAS,GAA+B;AACpD,IAAA;AACC,QAAA,IAAI,EAAE,OAAO;QACb,OAAO,EAAE,CAAC,OAAO,CAAC;QAClB,UAAU,EAAE,CAAC,QAAQ,CAAC;QACtB,iBAAiB,EAAE,CAAC,OAAO,CAAC;AAC5B,KAAA;;AAIK,MAAM,OAAO,GAA2B;AAC9C,IAAA,KAAK,EAAE;QACN,KAAK;AACL,QAAA,SAAS,EAAE,OAAO;QAClB,QAAQ,EAAE,CAAC,IAAe,KAAK,IAAI,CAAC,KAAK;QACzC,MAAM,EAAE,CAAC,IAAe,KAAK,IAAI,CAAC,GAAG;AACrC,KAAA;;AAIK,MAAM,QAAQ,GAA4B;AAEhD,IAAA,KAAK,EAAE,OAA6B;;AAGrC,MAAM,cAAc,GAAG;AACtB,IAAA,QAAQ,EAAE,CAAC;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "prettier-plugin-astro",
|
|
3
|
-
"version": "1.0.0
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "A Prettier Plugin for formatting Astro files",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"prettier-plugin",
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@astrojs/compiler-rs": "^0.4.0",
|
|
27
|
+
"@prettier/parse-srcset": "^3.1.0",
|
|
27
28
|
"sass-formatter": "^0.8.0"
|
|
28
29
|
},
|
|
29
30
|
"devDependencies": {
|