absolutejs-vscode 0.0.8
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/CHANGELOG.md +22 -0
- package/LICENSE +88 -0
- package/README.md +40 -0
- package/extension.js +283 -0
- package/html-custom-data.json +83 -0
- package/package.json +60 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.0.8
|
|
4
|
+
|
|
5
|
+
- Add document-link support for AbsoluteJS style module imports so Ctrl-click opens the style file directly.
|
|
6
|
+
|
|
7
|
+
## 0.0.7
|
|
8
|
+
|
|
9
|
+
- Adds go-to-definition support for AbsoluteJS style module imports in JS/TS files.
|
|
10
|
+
|
|
11
|
+
## 0.0.3
|
|
12
|
+
|
|
13
|
+
- Adds HTML/HTMX custom-data and hover support for `<absolute-island>` and `<abs-htmx-stream-slot>`
|
|
14
|
+
- Documents `src`, `trigger`, `swap`, and `target` for HTMX streaming
|
|
15
|
+
- Documents the `data-absolute-slot` transport marker
|
|
16
|
+
- Keeps existing `<absolute-island>` support
|
|
17
|
+
|
|
18
|
+
## 0.0.1
|
|
19
|
+
|
|
20
|
+
- Initial release
|
|
21
|
+
- Adds HTML custom-data support for `<absolute-island>`
|
|
22
|
+
- Documents `framework`, `component`, `hydrate`, and `props`
|
package/LICENSE
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# Business Source License 1.1
|
|
2
|
+
|
|
3
|
+
**Licensor:** Alex Kahn
|
|
4
|
+
|
|
5
|
+
**Licensed Work:** absolutejs-vscode (https://github.com/absolutejs/vscode-extension)
|
|
6
|
+
|
|
7
|
+
**Change Date:** May 29, 2030
|
|
8
|
+
|
|
9
|
+
**Change License:** Apache License, Version 2.0
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Terms
|
|
14
|
+
|
|
15
|
+
The Licensor hereby grants you the right to copy, modify, create derivative
|
|
16
|
+
works, redistribute, and make non-production use of the Licensed Work. The
|
|
17
|
+
Licensor may make an Additional Use Grant, permitting limited production use.
|
|
18
|
+
|
|
19
|
+
### Additional Use Grant
|
|
20
|
+
|
|
21
|
+
You may use the Licensed Work in production, provided your use does not include
|
|
22
|
+
any of the following:
|
|
23
|
+
|
|
24
|
+
1. **Offering a Competing Service.** You may not offer the Licensed Work, or
|
|
25
|
+
any derivative or substantial portion of it, to third parties as a hosted or
|
|
26
|
+
managed service that competes with a hosted IDE or development environment that incorporates the Licensed Work as a primary feature (including, but not limited to, services like GitHub Codespaces, Gitpod, StackBlitz, CodeSandbox, or any similar cloud-IDE platform). This includes any
|
|
27
|
+
product whose primary value to its users is the functionality the Licensed
|
|
28
|
+
Work provides.
|
|
29
|
+
|
|
30
|
+
2. **Resale or Redistribution as a Standalone Product.** You may not sell,
|
|
31
|
+
license, or distribute the Licensed Work, or any derivative or fork of it,
|
|
32
|
+
as a standalone commercial product.
|
|
33
|
+
|
|
34
|
+
3. **Removal of Attribution.** Any derivative work, fork, or redistribution of
|
|
35
|
+
the Licensed Work must prominently credit AbsoluteJS and include a link to
|
|
36
|
+
the original project repository (https://github.com/absolutejs/vscode-extension).
|
|
37
|
+
|
|
38
|
+
For clarity, the following uses are expressly permitted:
|
|
39
|
+
|
|
40
|
+
- Using the Licensed Work to build and operate your own applications, websites,
|
|
41
|
+
internal tools, or SaaS products (whether commercial or non-commercial), so
|
|
42
|
+
long as the Licensed Work itself is not the primary product you are selling.
|
|
43
|
+
- Using the Licensed Work as a dependency in commercial software you build and
|
|
44
|
+
sell, as long as the software is not itself a competing managed service of
|
|
45
|
+
the kind described in clause 1.
|
|
46
|
+
- Providing consulting, development, or professional services to clients using
|
|
47
|
+
the Licensed Work.
|
|
48
|
+
- Forking and modifying the Licensed Work for your own internal use, provided
|
|
49
|
+
attribution is maintained.
|
|
50
|
+
|
|
51
|
+
### Change Date and Change License
|
|
52
|
+
|
|
53
|
+
On the Change Date specified above, or on such other date as the Licensor may
|
|
54
|
+
specify by written notice, the Licensed Work will be made available under the
|
|
55
|
+
Change License (Apache License, Version 2.0). Until the Change Date, the terms
|
|
56
|
+
of this Business Source License 1.1 apply.
|
|
57
|
+
|
|
58
|
+
### Trademark
|
|
59
|
+
|
|
60
|
+
This license does not grant you any rights to use the "AbsoluteJS" or
|
|
61
|
+
"@absolutejs" name, logo, or any related trademarks. Forks and derivative works
|
|
62
|
+
must not be named or branded in a manner that suggests endorsement by or
|
|
63
|
+
affiliation with AbsoluteJS or the Licensor.
|
|
64
|
+
|
|
65
|
+
### Notices
|
|
66
|
+
|
|
67
|
+
You must not remove or obscure any licensing, copyright, or other notices
|
|
68
|
+
included in the Licensed Work.
|
|
69
|
+
|
|
70
|
+
### No Warranty
|
|
71
|
+
|
|
72
|
+
THE LICENSED WORK IS PROVIDED "AS IS". THE LICENSOR HEREBY DISCLAIMS ALL
|
|
73
|
+
WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTIES OF
|
|
74
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT. IN NO
|
|
75
|
+
EVENT SHALL THE LICENSOR BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY,
|
|
76
|
+
WHETHER IN AN ACTION OF CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR
|
|
77
|
+
IN CONNECTION WITH THE LICENSED WORK OR THE USE OR OTHER DEALINGS IN THE
|
|
78
|
+
LICENSED WORK.
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## Contact
|
|
83
|
+
|
|
84
|
+
For commercial licensing inquiries or additional permissions, contact:
|
|
85
|
+
|
|
86
|
+
- **Alex Kahn**
|
|
87
|
+
- alexkahndev@gmail.com
|
|
88
|
+
- alexkahndev.github.io
|
package/README.md
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# AbsoluteJS VS Code Extension
|
|
2
|
+
|
|
3
|
+
VS Code extension project for AbsoluteJS. It currently ships HTML and HTMX hover support for island authoring, HTMX-native streaming primitives, and style module import navigation.
|
|
4
|
+
|
|
5
|
+
It adds hover and autocomplete support for:
|
|
6
|
+
|
|
7
|
+
- `<absolute-island>`
|
|
8
|
+
- `<abs-htmx-stream-slot>`
|
|
9
|
+
- `framework`
|
|
10
|
+
- `component`
|
|
11
|
+
- `hydrate`
|
|
12
|
+
- `props`
|
|
13
|
+
- `data-absolute-slot`
|
|
14
|
+
|
|
15
|
+
This project is the dedicated home for AbsoluteJS editor tooling. Today it focuses on plain `.html` files, where TypeScript declarations alone are not enough.
|
|
16
|
+
|
|
17
|
+
## Install
|
|
18
|
+
|
|
19
|
+
Install the packaged `.vsix` file from VS Code:
|
|
20
|
+
|
|
21
|
+
1. Open Extensions
|
|
22
|
+
2. Select `...`
|
|
23
|
+
3. Choose `Install from VSIX...`
|
|
24
|
+
|
|
25
|
+
Or use:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
code --install-extension /home/alexkahn/abs/absolutejs-vscode-extension/absolutejs-vscode-0.0.8.vsix
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## What it adds
|
|
32
|
+
|
|
33
|
+
- Tag docs for `<absolute-island>` and `<abs-htmx-stream-slot>`
|
|
34
|
+
- Attribute docs for island authoring, HTMX streaming authoring, and AbsoluteJS transport markers
|
|
35
|
+
- Enumerated value suggestions for framework and hydrate modes
|
|
36
|
+
- Go-to-definition from AbsoluteJS style module imports such as `*.module.scss`
|
|
37
|
+
|
|
38
|
+
## Why this exists
|
|
39
|
+
|
|
40
|
+
Raw HTML editors do not read framework runtime types or TypeScript DOM declarations for custom element hover the way TSX and SFC tooling does. VS Code HTML custom data is the correct integration point for this experience.
|
package/extension.js
ADDED
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
const vscode = require("vscode");
|
|
2
|
+
const path = require("path");
|
|
3
|
+
|
|
4
|
+
const SCRIPT_LANGUAGES = [
|
|
5
|
+
"javascript",
|
|
6
|
+
"javascriptreact",
|
|
7
|
+
"typescript",
|
|
8
|
+
"typescriptreact"
|
|
9
|
+
];
|
|
10
|
+
|
|
11
|
+
const STYLE_MODULE_PATTERN = /\.module\.(?:scss|sass|less|styl|stylus)$/i;
|
|
12
|
+
|
|
13
|
+
const islandTagDoc = new vscode.MarkdownString(
|
|
14
|
+
[
|
|
15
|
+
"```html",
|
|
16
|
+
"<absolute-island framework=\"react\" component=\"ReactCounter\" hydrate=\"load\" props='{\"initialCount\":0}'></absolute-island>",
|
|
17
|
+
"```",
|
|
18
|
+
"",
|
|
19
|
+
"Platform-native AbsoluteJS island element for HTML and HTMX host pages.",
|
|
20
|
+
"AbsoluteJS lowers this element into SSR island markup and the client bootstrap hydrates it according to the `hydrate` mode."
|
|
21
|
+
].join("\n")
|
|
22
|
+
);
|
|
23
|
+
islandTagDoc.isTrusted = false;
|
|
24
|
+
|
|
25
|
+
const htmxStreamSlotTagDoc = new vscode.MarkdownString(
|
|
26
|
+
[
|
|
27
|
+
"```html",
|
|
28
|
+
"<abs-htmx-stream-slot src=\"/htmx/cards/summary\">",
|
|
29
|
+
" <article class=\"card-fallback\">Loading...</article>",
|
|
30
|
+
"</abs-htmx-stream-slot>",
|
|
31
|
+
"```",
|
|
32
|
+
"",
|
|
33
|
+
"Platform-native AbsoluteJS HTMX streaming primitive.",
|
|
34
|
+
"AbsoluteJS lowers this element into native HTMX markup so the browser performs a normal `hx-get` fragment request."
|
|
35
|
+
].join("\n")
|
|
36
|
+
);
|
|
37
|
+
htmxStreamSlotTagDoc.isTrusted = false;
|
|
38
|
+
|
|
39
|
+
const islandAttributeDocs = new Map([
|
|
40
|
+
[
|
|
41
|
+
"framework",
|
|
42
|
+
"Target framework runtime for this island component. Valid values: `react`, `vue`, `svelte`, `angular`."
|
|
43
|
+
],
|
|
44
|
+
[
|
|
45
|
+
"component",
|
|
46
|
+
"Registry component name to render for this island."
|
|
47
|
+
],
|
|
48
|
+
[
|
|
49
|
+
"hydrate",
|
|
50
|
+
"Client hydration timing. `load` hydrates immediately, `idle` waits for idle time, `visible` waits for intersection, and `none` renders static HTML only."
|
|
51
|
+
],
|
|
52
|
+
[
|
|
53
|
+
"props",
|
|
54
|
+
"JSON-serialized props payload passed to the island component. In HTML, prefer single quotes around the attribute so the JSON can keep its double quotes."
|
|
55
|
+
]
|
|
56
|
+
]);
|
|
57
|
+
|
|
58
|
+
const globalAttributeDocs = new Map([
|
|
59
|
+
[
|
|
60
|
+
"data-absolute-slot",
|
|
61
|
+
"Marks a DOM node as an AbsoluteJS streaming slot placeholder or slot root. AbsoluteJS uses it to find and patch the correct region during out-of-order streaming."
|
|
62
|
+
]
|
|
63
|
+
]);
|
|
64
|
+
|
|
65
|
+
const htmxStreamSlotAttributeDocs = new Map([
|
|
66
|
+
[
|
|
67
|
+
"src",
|
|
68
|
+
"HTMX fragment endpoint to request for this slot. AbsoluteJS lowers the tag to `hx-get`."
|
|
69
|
+
],
|
|
70
|
+
[
|
|
71
|
+
"trigger",
|
|
72
|
+
"Optional HTMX trigger. Defaults to `load`."
|
|
73
|
+
],
|
|
74
|
+
[
|
|
75
|
+
"swap",
|
|
76
|
+
"Optional HTMX swap strategy. Defaults to `outerHTML`."
|
|
77
|
+
],
|
|
78
|
+
[
|
|
79
|
+
"target",
|
|
80
|
+
"Optional HTMX target selector. Defaults to `this`."
|
|
81
|
+
]
|
|
82
|
+
]);
|
|
83
|
+
|
|
84
|
+
function buildHover(text) {
|
|
85
|
+
const markdown = new vscode.MarkdownString(text);
|
|
86
|
+
markdown.isTrusted = false;
|
|
87
|
+
return new vscode.Hover(markdown);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
function getWordAt(document, position) {
|
|
91
|
+
const range = document.getWordRangeAtPosition(position, /[A-Za-z0-9_-]+/);
|
|
92
|
+
return range ? document.getText(range) : "";
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
function isInsideAbsoluteIsland(document, position) {
|
|
96
|
+
const line = document.lineAt(position.line).text;
|
|
97
|
+
const before = line.slice(0, position.character + 1);
|
|
98
|
+
return before.includes("<absolute-island") || before.includes("</absolute-island");
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
function isInsideAbsoluteHTMXStreamSlot(document, position) {
|
|
102
|
+
const line = document.lineAt(position.line).text;
|
|
103
|
+
const before = line.slice(0, position.character + 1);
|
|
104
|
+
return before.includes("<abs-htmx-stream-slot") || before.includes("</abs-htmx-stream-slot");
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
function provideHover(document, position) {
|
|
108
|
+
const word = getWordAt(document, position);
|
|
109
|
+
if (!word) return null;
|
|
110
|
+
|
|
111
|
+
if (word === "absolute-island") {
|
|
112
|
+
return new vscode.Hover(islandTagDoc);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
const globalAttributeDoc = globalAttributeDocs.get(word);
|
|
116
|
+
if (globalAttributeDoc) {
|
|
117
|
+
return buildHover(`**${word}**\n\n${globalAttributeDoc}`);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
if (word === "abs-htmx-stream-slot") {
|
|
121
|
+
return new vscode.Hover(htmxStreamSlotTagDoc);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
if (isInsideAbsoluteIsland(document, position)) {
|
|
125
|
+
const attributeDoc = islandAttributeDocs.get(word);
|
|
126
|
+
if (!attributeDoc) return null;
|
|
127
|
+
|
|
128
|
+
return buildHover(`**${word}**\n\n${attributeDoc}`);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
if (isInsideAbsoluteHTMXStreamSlot(document, position)) {
|
|
133
|
+
const attributeDoc = htmxStreamSlotAttributeDocs.get(word);
|
|
134
|
+
if (!attributeDoc) return null;
|
|
135
|
+
|
|
136
|
+
return buildHover(`**${word}**\n\n${attributeDoc}`);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
return null;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
function getQuotedStringRangeAtPosition(document, position) {
|
|
143
|
+
const line = document.lineAt(position.line).text;
|
|
144
|
+
const quoteRanges = [];
|
|
145
|
+
const quotePattern = /(['"])(?:(?=(\\?))\2.)*?\1/g;
|
|
146
|
+
let match;
|
|
147
|
+
|
|
148
|
+
while ((match = quotePattern.exec(line)) !== null) {
|
|
149
|
+
const raw = match[0];
|
|
150
|
+
const start = match.index;
|
|
151
|
+
const end = start + raw.length;
|
|
152
|
+
if (
|
|
153
|
+
position.character > start &&
|
|
154
|
+
position.character < end - 1
|
|
155
|
+
) {
|
|
156
|
+
quoteRanges.push({
|
|
157
|
+
range: new vscode.Range(
|
|
158
|
+
position.line,
|
|
159
|
+
start + 1,
|
|
160
|
+
position.line,
|
|
161
|
+
end - 1
|
|
162
|
+
),
|
|
163
|
+
text: raw.slice(1, -1)
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
return quoteRanges[0] ?? null;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
function getQuotedStringRanges(document, lineNumber) {
|
|
172
|
+
const line = document.lineAt(lineNumber).text;
|
|
173
|
+
const quoteRanges = [];
|
|
174
|
+
const quotePattern = /(['"])(?:(?=(\\?))\2.)*?\1/g;
|
|
175
|
+
let match;
|
|
176
|
+
|
|
177
|
+
while ((match = quotePattern.exec(line)) !== null) {
|
|
178
|
+
const raw = match[0];
|
|
179
|
+
const start = match.index;
|
|
180
|
+
const end = start + raw.length;
|
|
181
|
+
quoteRanges.push({
|
|
182
|
+
range: new vscode.Range(
|
|
183
|
+
lineNumber,
|
|
184
|
+
start + 1,
|
|
185
|
+
lineNumber,
|
|
186
|
+
end - 1
|
|
187
|
+
),
|
|
188
|
+
text: raw.slice(1, -1)
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
return quoteRanges;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
function isImportLikeLine(document, position, range) {
|
|
196
|
+
const line = document.lineAt(position.line).text;
|
|
197
|
+
const before = line.slice(0, range.start.character);
|
|
198
|
+
|
|
199
|
+
return (
|
|
200
|
+
/\bfrom\s*$/.test(before) ||
|
|
201
|
+
/\bimport\s*\(\s*$/.test(before) ||
|
|
202
|
+
/\bimport\s*$/.test(before) ||
|
|
203
|
+
/\brequire\s*\(\s*$/.test(before)
|
|
204
|
+
);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
function resolveStyleModuleUri(document, quoted) {
|
|
208
|
+
if (!STYLE_MODULE_PATTERN.test(quoted.text)) return null;
|
|
209
|
+
if (!quoted.text.startsWith(".")) return null;
|
|
210
|
+
if (!isImportLikeLine(document, quoted.range.start, quoted.range)) return null;
|
|
211
|
+
|
|
212
|
+
const targetPath = path.resolve(
|
|
213
|
+
path.dirname(document.uri.fsPath),
|
|
214
|
+
quoted.text
|
|
215
|
+
);
|
|
216
|
+
|
|
217
|
+
return vscode.Uri.file(targetPath);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
async function uriExists(uri) {
|
|
221
|
+
try {
|
|
222
|
+
await vscode.workspace.fs.stat(uri);
|
|
223
|
+
|
|
224
|
+
return true;
|
|
225
|
+
} catch {
|
|
226
|
+
return false;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
async function provideStyleModuleDefinition(document, position) {
|
|
231
|
+
const quoted = getQuotedStringRangeAtPosition(document, position);
|
|
232
|
+
if (!quoted) return null;
|
|
233
|
+
|
|
234
|
+
const targetUri = resolveStyleModuleUri(document, quoted);
|
|
235
|
+
if (!targetUri) return null;
|
|
236
|
+
if (!(await uriExists(targetUri))) return null;
|
|
237
|
+
|
|
238
|
+
return new vscode.Location(targetUri, new vscode.Position(0, 0));
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
async function provideStyleModuleDocumentLinks(document) {
|
|
242
|
+
const links = [];
|
|
243
|
+
|
|
244
|
+
for (let lineNumber = 0; lineNumber < document.lineCount; lineNumber += 1) {
|
|
245
|
+
const quotedRanges = getQuotedStringRanges(document, lineNumber);
|
|
246
|
+
|
|
247
|
+
for (const quoted of quotedRanges) {
|
|
248
|
+
const targetUri = resolveStyleModuleUri(document, quoted);
|
|
249
|
+
if (!targetUri) continue;
|
|
250
|
+
if (!(await uriExists(targetUri))) continue;
|
|
251
|
+
|
|
252
|
+
const link = new vscode.DocumentLink(quoted.range, targetUri);
|
|
253
|
+
link.tooltip = "Open style module";
|
|
254
|
+
links.push(link);
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
return links;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
function activate(context) {
|
|
262
|
+
const htmlSelector = [{ language: "html" }];
|
|
263
|
+
const scriptSelector = SCRIPT_LANGUAGES.map((language) => ({ language }));
|
|
264
|
+
|
|
265
|
+
context.subscriptions.push(
|
|
266
|
+
vscode.languages.registerHoverProvider(htmlSelector, {
|
|
267
|
+
provideHover
|
|
268
|
+
}),
|
|
269
|
+
vscode.languages.registerDefinitionProvider(scriptSelector, {
|
|
270
|
+
provideDefinition: provideStyleModuleDefinition
|
|
271
|
+
}),
|
|
272
|
+
vscode.languages.registerDocumentLinkProvider(scriptSelector, {
|
|
273
|
+
provideDocumentLinks: provideStyleModuleDocumentLinks
|
|
274
|
+
})
|
|
275
|
+
);
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
function deactivate() {}
|
|
279
|
+
|
|
280
|
+
module.exports = {
|
|
281
|
+
activate,
|
|
282
|
+
deactivate
|
|
283
|
+
};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 1.1,
|
|
3
|
+
"tags": [
|
|
4
|
+
{
|
|
5
|
+
"name": "absolute-island",
|
|
6
|
+
"description": "Platform-native AbsoluteJS island element for HTML and HTMX host pages. AbsoluteJS server rendering lowers this element into SSR island markup and the client bootstrap hydrates it according to the hydrate mode.",
|
|
7
|
+
"attributes": [
|
|
8
|
+
{
|
|
9
|
+
"name": "framework",
|
|
10
|
+
"description": "Target framework runtime for this island component.",
|
|
11
|
+
"values": [
|
|
12
|
+
{
|
|
13
|
+
"name": "react"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"name": "svelte"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"name": "vue"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"name": "angular"
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"name": "component",
|
|
28
|
+
"description": "Registry component name to render for this island."
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"name": "hydrate",
|
|
32
|
+
"description": "Client hydration timing. load hydrates immediately, idle waits for idle time, visible waits for intersection, and none renders static HTML only.",
|
|
33
|
+
"values": [
|
|
34
|
+
{
|
|
35
|
+
"name": "load"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"name": "idle"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"name": "visible"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"name": "none"
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"name": "props",
|
|
50
|
+
"description": "JSON-serialized props payload passed to the target island component. In HTML, prefer single quotes around the attribute so the JSON can keep its double quotes."
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"name": "abs-htmx-stream-slot",
|
|
56
|
+
"description": "Platform-native AbsoluteJS HTMX streaming primitive. AbsoluteJS lowers this element into native HTMX markup so the browser performs a normal hx-get request for the resolved fragment.",
|
|
57
|
+
"attributes": [
|
|
58
|
+
{
|
|
59
|
+
"name": "src",
|
|
60
|
+
"description": "HTMX fragment endpoint to request for this slot. AbsoluteJS lowers the tag to hx-get=\"...\"."
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"name": "trigger",
|
|
64
|
+
"description": "Optional HTMX trigger. Defaults to load."
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"name": "swap",
|
|
68
|
+
"description": "Optional HTMX swap strategy. Defaults to outerHTML."
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"name": "target",
|
|
72
|
+
"description": "Optional HTMX target selector. Defaults to this."
|
|
73
|
+
}
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
],
|
|
77
|
+
"globalAttributes": [
|
|
78
|
+
{
|
|
79
|
+
"name": "data-absolute-slot",
|
|
80
|
+
"description": "Marks a DOM node as an AbsoluteJS streaming slot placeholder or slot root. AbsoluteJS uses it to find and patch the correct region during out-of-order streaming."
|
|
81
|
+
}
|
|
82
|
+
]
|
|
83
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "absolutejs-vscode",
|
|
3
|
+
"displayName": "AbsoluteJS",
|
|
4
|
+
"description": "VS Code support for AbsoluteJS projects, starting with HTML and HTMX island authoring.",
|
|
5
|
+
"version": "0.0.8",
|
|
6
|
+
"license": "BSL-1.1",
|
|
7
|
+
"publisher": "AbsoluteJS",
|
|
8
|
+
"main": "./extension.js",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "https://github.com/absolutejs/vscode-extension.git"
|
|
12
|
+
},
|
|
13
|
+
"homepage": "https://github.com/absolutejs/absolutejs",
|
|
14
|
+
"bugs": {
|
|
15
|
+
"url": "https://github.com/absolutejs/vscode-extension/issues"
|
|
16
|
+
},
|
|
17
|
+
"engines": {
|
|
18
|
+
"vscode": "^1.90.0"
|
|
19
|
+
},
|
|
20
|
+
"activationEvents": [
|
|
21
|
+
"onLanguage:html",
|
|
22
|
+
"onLanguage:javascript",
|
|
23
|
+
"onLanguage:javascriptreact",
|
|
24
|
+
"onLanguage:typescript",
|
|
25
|
+
"onLanguage:typescriptreact"
|
|
26
|
+
],
|
|
27
|
+
"categories": [
|
|
28
|
+
"Programming Languages",
|
|
29
|
+
"Other"
|
|
30
|
+
],
|
|
31
|
+
"keywords": [
|
|
32
|
+
"absolutejs",
|
|
33
|
+
"html",
|
|
34
|
+
"htmx",
|
|
35
|
+
"islands",
|
|
36
|
+
"custom-data",
|
|
37
|
+
"absolute-island",
|
|
38
|
+
"framework",
|
|
39
|
+
"editor"
|
|
40
|
+
],
|
|
41
|
+
"files": [
|
|
42
|
+
"extension.js",
|
|
43
|
+
"html-custom-data.json",
|
|
44
|
+
"README.md",
|
|
45
|
+
"CHANGELOG.md",
|
|
46
|
+
"LICENSE",
|
|
47
|
+
"package.json"
|
|
48
|
+
],
|
|
49
|
+
"contributes": {
|
|
50
|
+
"html.customData": [
|
|
51
|
+
"./html-custom-data.json"
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
"scripts": {
|
|
55
|
+
"config": "absolute config"
|
|
56
|
+
},
|
|
57
|
+
"devDependencies": {
|
|
58
|
+
"@absolutejs/absolute": "^0.19.0-beta.1051"
|
|
59
|
+
}
|
|
60
|
+
}
|