astro-wysiwyg 0.1.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/LICENSE +21 -0
- package/README.md +84 -0
- package/dist/astro-transform.d.ts +8 -0
- package/dist/astro-transform.d.ts.map +1 -0
- package/dist/astro-transform.js +240 -0
- package/dist/astro-transform.js.map +1 -0
- package/dist/client.d.ts +6 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +1423 -0
- package/dist/client.js.map +1 -0
- package/dist/editable-tags.d.ts +3 -0
- package/dist/editable-tags.d.ts.map +1 -0
- package/dist/editable-tags.js +8 -0
- package/dist/editable-tags.js.map +1 -0
- package/dist/frontmatter.d.ts +18 -0
- package/dist/frontmatter.d.ts.map +1 -0
- package/dist/frontmatter.js +156 -0
- package/dist/frontmatter.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +252 -0
- package/dist/index.js.map +1 -0
- package/dist/marker.d.ts +14 -0
- package/dist/marker.d.ts.map +1 -0
- package/dist/marker.js +37 -0
- package/dist/marker.js.map +1 -0
- package/dist/persist.d.ts +26 -0
- package/dist/persist.d.ts.map +1 -0
- package/dist/persist.js +315 -0
- package/dist/persist.js.map +1 -0
- package/dist/preferences.d.ts +12 -0
- package/dist/preferences.d.ts.map +1 -0
- package/dist/preferences.js +36 -0
- package/dist/preferences.js.map +1 -0
- package/dist/project-path.d.ts +2 -0
- package/dist/project-path.d.ts.map +1 -0
- package/dist/project-path.js +5 -0
- package/dist/project-path.js.map +1 -0
- package/dist/rehype.d.ts +25 -0
- package/dist/rehype.d.ts.map +1 -0
- package/dist/rehype.js +59 -0
- package/dist/rehype.js.map +1 -0
- package/dist/source-file.d.ts +8 -0
- package/dist/source-file.d.ts.map +1 -0
- package/dist/source-file.js +42 -0
- package/dist/source-file.js.map +1 -0
- package/dist/toolbar-app.d.ts +3 -0
- package/dist/toolbar-app.d.ts.map +1 -0
- package/dist/toolbar-app.js +76 -0
- package/dist/toolbar-app.js.map +1 -0
- package/package.json +82 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Patrik Björklund
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# Astro WYSIWYG
|
|
2
|
+
|
|
3
|
+
Edit Astro pages in the browser and save changes directly to `.astro`, `.md`, and `.mdx` files. `WYSIWYG` means "what you see is what you get": click rendered content, change it in place, and keep working without switching to a source editor.
|
|
4
|
+
|
|
5
|
+
[](https://github.com/pbjorklund/astro-wysiwyg/blob/main/.github/assets/astro-wysiwyg-demo.mp4)
|
|
6
|
+
|
|
7
|
+
## Quick start
|
|
8
|
+
|
|
9
|
+
Add the integration to an existing Astro project:
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
npx astro add astro-wysiwyg
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Start the development server:
|
|
16
|
+
|
|
17
|
+
```sh
|
|
18
|
+
npm run dev
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
1. Open your local Astro site.
|
|
22
|
+
2. Click any outlined text to start editing.
|
|
23
|
+
3. Change the content and formatting in place. Changes save to the source file automatically.
|
|
24
|
+
|
|
25
|
+
Open **Page editor** in Astro's development toolbar to turn editing, autosave, or editable outlines on and off, and to edit supported frontmatter fields.
|
|
26
|
+
|
|
27
|
+
## Manual setup
|
|
28
|
+
|
|
29
|
+
Install the package:
|
|
30
|
+
|
|
31
|
+
```sh
|
|
32
|
+
npm install --save-dev astro-wysiwyg
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Add it to `astro.config.mjs`:
|
|
36
|
+
|
|
37
|
+
```js
|
|
38
|
+
import { defineConfig } from 'astro/config';
|
|
39
|
+
import wysiwyg from 'astro-wysiwyg';
|
|
40
|
+
|
|
41
|
+
export default defineConfig({
|
|
42
|
+
integrations: [wysiwyg()],
|
|
43
|
+
});
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Configuration
|
|
47
|
+
|
|
48
|
+
```js
|
|
49
|
+
wysiwyg({
|
|
50
|
+
saveDelay: 800,
|
|
51
|
+
endpoint: '/_astro-wysiwyg/save',
|
|
52
|
+
});
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
| Option | Default | Description |
|
|
56
|
+
| --- | --- | --- |
|
|
57
|
+
| `saveDelay` | `500` | Delay before autosaving, in milliseconds. |
|
|
58
|
+
| `endpoint` | `/_astro-wysiwyg/save` | Local development endpoint used to save edits. |
|
|
59
|
+
|
|
60
|
+
## Supported content
|
|
61
|
+
|
|
62
|
+
Astro WYSIWYG supports static paragraphs, headings, lists, common text elements, inline Markdown formatting, links, and supported frontmatter values. You can also add, delete, or change supported blocks.
|
|
63
|
+
|
|
64
|
+
Expressions, components, and Markdown constructs that cannot be mapped safely to one source value remain read-only.
|
|
65
|
+
|
|
66
|
+
## Requirements
|
|
67
|
+
|
|
68
|
+
- Astro 5 or 6
|
|
69
|
+
- Node.js 18.17.1 or newer
|
|
70
|
+
- A current desktop version of Chromium, Firefox, or Safari
|
|
71
|
+
|
|
72
|
+
## Safety
|
|
73
|
+
|
|
74
|
+
The editor runs under `astro dev` and is not added to production builds. Source writes are limited to supported files inside `src` and requests from the local site.
|
|
75
|
+
|
|
76
|
+
Keep the development server local. Do not expose the editor through a public tunnel, LAN host, or reverse proxy.
|
|
77
|
+
|
|
78
|
+
## Support
|
|
79
|
+
|
|
80
|
+
Found a bug or have a feature request? [Open an issue](https://github.com/pbjorklund/astro-wysiwyg/issues).
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
Supported by [AmpliFlow](https://www.ampliflow.com/).
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface AstroSourceContext {
|
|
2
|
+
contextMarker?: string;
|
|
3
|
+
contextHref?: string;
|
|
4
|
+
renderedText?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function resolveAstroSourceMarker(root: string, sourceFile: string, sourceLocation: string, context?: AstroSourceContext): Promise<string>;
|
|
7
|
+
export declare function annotateAstroSource(source: string, id: string, root: string): Promise<string | null>;
|
|
8
|
+
//# sourceMappingURL=astro-transform.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"astro-transform.d.ts","sourceRoot":"","sources":["../src/astro-transform.ts"],"names":[],"mappings":"AAgCA,MAAM,WAAW,kBAAkB;IACjC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAOD,wBAAsB,wBAAwB,CAC5C,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,MAAM,EAClB,cAAc,EAAE,MAAM,EACtB,OAAO,GAAE,kBAAuB,GAC/B,OAAO,CAAC,MAAM,CAAC,CAyDjB;AAmGD,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,MAAM,EACd,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAmCxB"}
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
import { readFile, realpath } from 'node:fs/promises';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import { parse } from '@astrojs/compiler';
|
|
4
|
+
import { EDITABLE_BLOCK_TAGS } from "./editable-tags.js";
|
|
5
|
+
import { createMarker, decodeMarker, encodeMarker } from "./marker.js";
|
|
6
|
+
import { isInsideProjectRoot } from "./project-path.js";
|
|
7
|
+
const BLOCK_TAGS = new Set(EDITABLE_BLOCK_TAGS);
|
|
8
|
+
const INLINE_TAGS = new Set([
|
|
9
|
+
'a', 'abbr', 'b', 'bdi', 'bdo', 'br', 'cite', 'code', 'data', 'del', 'dfn', 'em', 'i',
|
|
10
|
+
'ins', 'kbd', 'li', 'mark', 'p', 'q', 's', 'samp', 'small', 'span', 'strong', 'sub', 'sup', 'time', 'u', 'var', 'wbr',
|
|
11
|
+
]);
|
|
12
|
+
export async function resolveAstroSourceMarker(root, sourceFile, sourceLocation, context = {}) {
|
|
13
|
+
const rootPath = await realpath(root);
|
|
14
|
+
const candidate = path.isAbsolute(sourceFile) ? path.resolve(sourceFile) : path.resolve(rootPath, sourceFile);
|
|
15
|
+
if (!isInsideProjectRoot(rootPath, candidate)) {
|
|
16
|
+
throw new Error('The requested file is outside the Astro project root.');
|
|
17
|
+
}
|
|
18
|
+
const file = await realpath(candidate);
|
|
19
|
+
if (!isInsideProjectRoot(rootPath, file)) {
|
|
20
|
+
throw new Error('The requested file is outside the Astro project root.');
|
|
21
|
+
}
|
|
22
|
+
if (path.extname(file).toLowerCase() !== '.astro') {
|
|
23
|
+
throw new Error('Only Astro source locations can be resolved.');
|
|
24
|
+
}
|
|
25
|
+
const source = await readFile(file, 'utf8');
|
|
26
|
+
const offset = locationToOffset(source, sourceLocation);
|
|
27
|
+
const result = await parse(source, { position: true });
|
|
28
|
+
const matches = [];
|
|
29
|
+
let dynamicMatch;
|
|
30
|
+
visit(result.ast, (node) => {
|
|
31
|
+
const tag = node.name?.toLowerCase();
|
|
32
|
+
const start = node.position?.start?.offset;
|
|
33
|
+
const end = node.position?.end?.offset;
|
|
34
|
+
if (!tag || !BLOCK_TAGS.has(tag) || start === undefined || end === undefined)
|
|
35
|
+
return;
|
|
36
|
+
if (offset < start || offset > end || !node.children?.length)
|
|
37
|
+
return;
|
|
38
|
+
if (node.children.every(isStaticInlineNode)) {
|
|
39
|
+
matches.push(node);
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
const field = dataField(node);
|
|
43
|
+
if (field)
|
|
44
|
+
dynamicMatch = { field, tag };
|
|
45
|
+
});
|
|
46
|
+
matches.sort((left, right) => span(left) - span(right));
|
|
47
|
+
const node = matches[0];
|
|
48
|
+
const tag = node?.name?.toLowerCase();
|
|
49
|
+
const start = node?.position?.start?.offset;
|
|
50
|
+
const end = node?.position?.end?.offset;
|
|
51
|
+
if (!node || !tag || start === undefined || end === undefined) {
|
|
52
|
+
if (dynamicMatch && context.renderedText !== undefined) {
|
|
53
|
+
if (context.contextHref) {
|
|
54
|
+
return resolveLinkedFrontmatterMarker(rootPath, dynamicMatch, context.contextHref, context.renderedText);
|
|
55
|
+
}
|
|
56
|
+
if (context.contextMarker) {
|
|
57
|
+
return resolveFrontmatterMarker(rootPath, dynamicMatch, context.contextMarker, context.renderedText);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
throw new Error('This text is not a static editable block.');
|
|
61
|
+
}
|
|
62
|
+
const original = source.slice(start, end);
|
|
63
|
+
return encodeMarker(createMarker(path.relative(rootPath, file).split(path.sep).join('/'), start, end, original, 'astro', tag));
|
|
64
|
+
}
|
|
65
|
+
async function resolveLinkedFrontmatterMarker(root, dynamic, href, renderedText) {
|
|
66
|
+
const pathname = new URL(href, 'http://astro.local').pathname;
|
|
67
|
+
const segments = pathname.split('/').filter(Boolean);
|
|
68
|
+
const slug = segments.at(-1);
|
|
69
|
+
const routeCollection = segments.at(-2);
|
|
70
|
+
if (!slug || !routeCollection)
|
|
71
|
+
throw new Error('The linked content file could not be identified.');
|
|
72
|
+
const collections = new Set([
|
|
73
|
+
routeCollection,
|
|
74
|
+
routeCollection.endsWith('s') ? routeCollection.slice(0, -1) : `${routeCollection}s`,
|
|
75
|
+
]);
|
|
76
|
+
for (const collection of collections) {
|
|
77
|
+
for (const extension of ['.md', '.mdx']) {
|
|
78
|
+
for (const relative of [
|
|
79
|
+
path.join('src', 'content', collection, slug, `index${extension}`),
|
|
80
|
+
path.join('src', 'content', collection, `${slug}${extension}`),
|
|
81
|
+
]) {
|
|
82
|
+
const token = encodeMarker(createMarker(relative, 0, 0, '', 'markdown', 'p'));
|
|
83
|
+
try {
|
|
84
|
+
return await resolveFrontmatterMarker(root, dynamic, token, renderedText);
|
|
85
|
+
}
|
|
86
|
+
catch {
|
|
87
|
+
// Try the next conventional Astro content path.
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
throw new Error('No linked content frontmatter matched this rendered text.');
|
|
93
|
+
}
|
|
94
|
+
async function resolveFrontmatterMarker(root, dynamic, contextToken, renderedText) {
|
|
95
|
+
const context = decodeMarker(contextToken);
|
|
96
|
+
if (context.format !== 'markdown' && context.format !== 'frontmatter') {
|
|
97
|
+
throw new Error('The current content file could not be identified.');
|
|
98
|
+
}
|
|
99
|
+
const candidate = path.resolve(root, context.file);
|
|
100
|
+
if (!isInsideProjectRoot(root, candidate)) {
|
|
101
|
+
throw new Error('The requested file is outside the Astro project root.');
|
|
102
|
+
}
|
|
103
|
+
const file = await realpath(candidate);
|
|
104
|
+
if (!isInsideProjectRoot(root, file)) {
|
|
105
|
+
throw new Error('The requested file is outside the Astro project root.');
|
|
106
|
+
}
|
|
107
|
+
if (!['.md', '.mdx'].includes(path.extname(file).toLowerCase())) {
|
|
108
|
+
throw new Error('The current content file has no editable frontmatter.');
|
|
109
|
+
}
|
|
110
|
+
const source = await readFile(file, 'utf8');
|
|
111
|
+
const frontmatterEnd = source.indexOf('\n---', 3);
|
|
112
|
+
if (!source.startsWith('---') || frontmatterEnd < 0) {
|
|
113
|
+
throw new Error('The current content file has no editable frontmatter.');
|
|
114
|
+
}
|
|
115
|
+
const frontmatter = source.slice(0, frontmatterEnd);
|
|
116
|
+
const fieldPattern = new RegExp(`^(\\s*${dynamic.field}\\s*:\\s*)(.+?)\\s*$`, 'm');
|
|
117
|
+
const match = fieldPattern.exec(frontmatter);
|
|
118
|
+
if (!match)
|
|
119
|
+
throw new Error(`The ${dynamic.field} frontmatter field was not found.`);
|
|
120
|
+
const rawValue = match[2].trim();
|
|
121
|
+
if (parseYamlScalar(rawValue) !== renderedText.trim()) {
|
|
122
|
+
throw new Error(`The rendered ${dynamic.field} does not match the current content file.`);
|
|
123
|
+
}
|
|
124
|
+
const valueStart = match.index + match[1].length + match[2].indexOf(rawValue);
|
|
125
|
+
return encodeMarker(createMarker(context.file, valueStart, valueStart + rawValue.length, rawValue, 'frontmatter', dynamic.tag));
|
|
126
|
+
}
|
|
127
|
+
function dataField(node) {
|
|
128
|
+
if (node.children.length !== 1 || node.children[0].type !== 'expression')
|
|
129
|
+
return undefined;
|
|
130
|
+
const expression = node.children[0].children.map((child) => child.value).join('').trim();
|
|
131
|
+
return /(?:^|\.)(?:data|frontmatter)\.([A-Za-z_$][\w$]*)$/.exec(expression)?.[1];
|
|
132
|
+
}
|
|
133
|
+
function parseYamlScalar(value) {
|
|
134
|
+
if (value.startsWith('"') && value.endsWith('"')) {
|
|
135
|
+
try {
|
|
136
|
+
return JSON.parse(value);
|
|
137
|
+
}
|
|
138
|
+
catch {
|
|
139
|
+
return value.slice(1, -1);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
if (value.startsWith("'") && value.endsWith("'"))
|
|
143
|
+
return value.slice(1, -1).replace(/''/g, "'");
|
|
144
|
+
return value;
|
|
145
|
+
}
|
|
146
|
+
export async function annotateAstroSource(source, id, root) {
|
|
147
|
+
const cleanId = id.split('?', 1)[0];
|
|
148
|
+
const relative = path.relative(root, cleanId);
|
|
149
|
+
if (!relative || relative.startsWith('..') || path.isAbsolute(relative))
|
|
150
|
+
return null;
|
|
151
|
+
const result = await parse(source, { position: true });
|
|
152
|
+
const insertions = [];
|
|
153
|
+
visit(result.ast, (node) => {
|
|
154
|
+
const tag = node.name?.toLowerCase();
|
|
155
|
+
const start = node.position?.start?.offset;
|
|
156
|
+
const end = node.position?.end?.offset;
|
|
157
|
+
if (!tag || !BLOCK_TAGS.has(tag) || start === undefined || end === undefined)
|
|
158
|
+
return;
|
|
159
|
+
if (!node.children?.length || !node.children.every(isStaticInlineNode))
|
|
160
|
+
return;
|
|
161
|
+
const original = source.slice(start, end);
|
|
162
|
+
const openingEnd = findOpeningTagEnd(source, start, end);
|
|
163
|
+
/* c8 ignore next -- positioned static compiler elements always have matching opening and closing tags. */
|
|
164
|
+
if (openingEnd < 0 || !original.toLowerCase().endsWith(`</${tag}>`))
|
|
165
|
+
return;
|
|
166
|
+
const marker = encodeMarker(createMarker(relative.split(path.sep).join('/'), start, end, original, 'astro', tag));
|
|
167
|
+
insertions.push({ offset: openingEnd, value: ` data-astro-wysiwyg="${marker}"` });
|
|
168
|
+
});
|
|
169
|
+
if (insertions.length === 0)
|
|
170
|
+
return null;
|
|
171
|
+
let transformed = source;
|
|
172
|
+
for (const insertion of insertions.sort((a, b) => b.offset - a.offset)) {
|
|
173
|
+
transformed = transformed.slice(0, insertion.offset) + insertion.value + transformed.slice(insertion.offset);
|
|
174
|
+
}
|
|
175
|
+
return transformed;
|
|
176
|
+
}
|
|
177
|
+
function visit(node, callback) {
|
|
178
|
+
callback(node);
|
|
179
|
+
for (const child of node.children ?? [])
|
|
180
|
+
visit(child, callback);
|
|
181
|
+
}
|
|
182
|
+
function isStaticInlineNode(node) {
|
|
183
|
+
if (node.type === 'text' || node.type === 'comment')
|
|
184
|
+
return true;
|
|
185
|
+
if (node.type !== 'element' || !node.name || !INLINE_TAGS.has(node.name.toLowerCase()))
|
|
186
|
+
return false;
|
|
187
|
+
if (!node.attributes.every(isStaticHtmlAttribute))
|
|
188
|
+
return false;
|
|
189
|
+
return node.children.every(isStaticInlineNode);
|
|
190
|
+
}
|
|
191
|
+
function isStaticHtmlAttribute(attribute) {
|
|
192
|
+
return (attribute.kind === 'quoted' || attribute.kind === 'empty')
|
|
193
|
+
&& !attribute.name.includes(':');
|
|
194
|
+
}
|
|
195
|
+
function span(node) {
|
|
196
|
+
return node.position.end.offset - node.position.start.offset;
|
|
197
|
+
}
|
|
198
|
+
function locationToOffset(source, location) {
|
|
199
|
+
const match = /^(\d+):(\d+)$/.exec(location);
|
|
200
|
+
if (!match)
|
|
201
|
+
throw new Error('The Astro source location is invalid.');
|
|
202
|
+
const line = Number(match[1]);
|
|
203
|
+
const column = Number(match[2]);
|
|
204
|
+
if (line < 1 || column < 1)
|
|
205
|
+
throw new Error('The Astro source location is invalid.');
|
|
206
|
+
let offset = 0;
|
|
207
|
+
for (let currentLine = 1; currentLine < line; currentLine += 1) {
|
|
208
|
+
const newline = source.indexOf('\n', offset);
|
|
209
|
+
if (newline < 0)
|
|
210
|
+
throw new Error('The Astro source location is invalid.');
|
|
211
|
+
offset = newline + 1;
|
|
212
|
+
}
|
|
213
|
+
const result = offset + column - 1;
|
|
214
|
+
if (result > source.length)
|
|
215
|
+
throw new Error('The Astro source location is invalid.');
|
|
216
|
+
return result;
|
|
217
|
+
}
|
|
218
|
+
function findOpeningTagEnd(source, start, end) {
|
|
219
|
+
let quote = '';
|
|
220
|
+
let braces = 0;
|
|
221
|
+
for (let index = start + 1; index < end; index += 1) {
|
|
222
|
+
const character = source[index];
|
|
223
|
+
if (quote) {
|
|
224
|
+
if (character === quote && source[index - 1] !== '\\')
|
|
225
|
+
quote = '';
|
|
226
|
+
continue;
|
|
227
|
+
}
|
|
228
|
+
if (character === '"' || character === "'")
|
|
229
|
+
quote = character;
|
|
230
|
+
else if (character === '{')
|
|
231
|
+
braces += 1;
|
|
232
|
+
else if (character === '}')
|
|
233
|
+
braces = Math.max(0, braces - 1);
|
|
234
|
+
else if (character === '>' && braces === 0)
|
|
235
|
+
return index;
|
|
236
|
+
}
|
|
237
|
+
/* c8 ignore next -- Astro's compiler reports positions only for elements with a complete opening tag. */
|
|
238
|
+
return -1;
|
|
239
|
+
}
|
|
240
|
+
//# sourceMappingURL=astro-transform.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"astro-transform.js","sourceRoot":"","sources":["../src/astro-transform.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAExD,MAAM,UAAU,GAAG,IAAI,GAAG,CAAC,mBAAmB,CAAC,CAAC;AAChD,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC;IAC1B,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG;IACrF,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,E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