Fix code quality violations and enhance ROUTE-EXISTS-01 rule
Implement JQHTML function cache ID system and fix bundle compilation Implement underscore prefix for system tables Fix JS syntax linter to support decorators and grant exception to Task system SPA: Update planning docs and wishlists with remaining features SPA: Document Navigation API abandonment and future enhancements Implement SPA browser integration with History API (Phase 1) Convert contacts view page to SPA action Convert clients pages to SPA actions and document conversion procedure SPA: Merge GET parameters and update documentation Implement SPA route URL generation in JavaScript and PHP Implement SPA bootstrap controller architecture Add SPA routing manual page (rsx:man spa) Add SPA routing documentation to CLAUDE.md Phase 4 Complete: Client-side SPA routing implementation Update get_routes() consumers for unified route structure Complete SPA Phase 3: PHP-side route type detection and is_spa flag Restore unified routes structure and Manifest_Query class Refactor route indexing and add SPA infrastructure Phase 3 Complete: SPA route registration in manifest Implement SPA Phase 2: Extract router code and test decorators Rename Jqhtml_Component to Component and complete SPA foundation setup 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2
node_modules/@jqhtml/vscode-extension/.version
generated
vendored
2
node_modules/@jqhtml/vscode-extension/.version
generated
vendored
@@ -1 +1 @@
|
||||
2.2.186
|
||||
2.2.216
|
||||
|
||||
62
node_modules/@jqhtml/vscode-extension/README.md
generated
vendored
62
node_modules/@jqhtml/vscode-extension/README.md
generated
vendored
@@ -10,9 +10,7 @@ Full syntax highlighting for all JQHTML constructs:
|
||||
|
||||
- **Component Definitions**: `<Define:ComponentName>`
|
||||
- **Template Expressions**: `<%= expression %>`
|
||||
- **Control Flow**: Both colon and brace styles
|
||||
- `<% if (condition): %> ... <% endif; %>`
|
||||
- `<% if (condition) { %> ... <% } %>`
|
||||
- **Control Flow**: `<% if (condition) { %> ... <% } %>`
|
||||
- **Slots**: `<#slotname>` with let:prop support
|
||||
- **Data Bindings**: `:property="value"`
|
||||
- **Event Handlers**: `@click="handler"`
|
||||
@@ -25,7 +23,7 @@ Full syntax highlighting for all JQHTML constructs:
|
||||
- **Auto-closing pairs**: Automatically close tags, brackets, and quotes
|
||||
- **Bracket matching**: Highlight matching brackets and tags
|
||||
- **Code folding**: Fold component definitions
|
||||
- **Smart indentation**: Handles both colon and brace control flow styles
|
||||
- **Smart indentation**: Handles control flow
|
||||
- **Comment toggling**: Use standard VS Code shortcuts to toggle comments
|
||||
|
||||
### Code Snippets
|
||||
@@ -36,11 +34,9 @@ Quick snippets for common patterns:
|
||||
|--------|-------------|
|
||||
| `define` | Component definition |
|
||||
| `definecomp` | Component with structure |
|
||||
| `if:` | If statement (colon style) |
|
||||
| `ifelse:` | If-else (colon style) |
|
||||
| `if{` | If statement (brace style) |
|
||||
| `for:` | For loop (colon style) |
|
||||
| `for{` | For loop (brace style) |
|
||||
| `if` | If statement |
|
||||
| `ifelse` | If-else |
|
||||
| `for` | For loop |
|
||||
| `exp` | Expression `<%= %>` |
|
||||
| `$id` | Scoped ID attribute |
|
||||
| `:prop` | Property binding |
|
||||
@@ -87,13 +83,13 @@ All JQHTML syntax is highlighted with semantic colors:
|
||||
<Define:UserCard>
|
||||
<div class="user-card" $id="card">
|
||||
<h2><%= this.data.name %></h2>
|
||||
|
||||
<% if (this.data.isAdmin): %>
|
||||
|
||||
<% if (this.data.isAdmin) { %>
|
||||
<span class="admin">Admin</span>
|
||||
<% endif; %>
|
||||
|
||||
<% } %>
|
||||
|
||||
<button @click="handleClick">Click Me</button>
|
||||
|
||||
|
||||
<% for (const skill of this.data.skills) { %>
|
||||
<div class="skill"><%= skill %></div>
|
||||
<% } %>
|
||||
@@ -117,7 +113,7 @@ Component definitions can be folded at the `<Define:>` level:
|
||||
|
||||
### Formatting Support
|
||||
|
||||
The extension respects VS Code's formatting settings and supports both colon and brace control flow styles without enforcing either.
|
||||
The extension respects VS Code's formatting settings.
|
||||
|
||||
## Configuration
|
||||
|
||||
@@ -156,7 +152,7 @@ The extension uses standard TextMate scopes and works with all VS Code themes. F
|
||||
|
||||
### Bracket Matching Errors with Split Control Flow
|
||||
|
||||
When using brace-style control flow split across multiple `<% %>` blocks, VS Code may show bracket matching errors:
|
||||
When using control flow split across multiple `<% %>` blocks, VS Code may show bracket matching errors:
|
||||
|
||||
```jqhtml
|
||||
<% if (condition) { %>
|
||||
@@ -168,30 +164,18 @@ When using brace-style control flow split across multiple `<% %>` blocks, VS Cod
|
||||
|
||||
**Why this happens:** VS Code's bracket matcher can't track bracket state across separate template blocks. It sees a closing `}` without a matching opening `{` in the same block.
|
||||
|
||||
**Solutions:**
|
||||
**Solution:** The extension automatically disables bracket colorization for `.jqhtml` files:
|
||||
|
||||
1. **Use colon syntax** (recommended for complex control flow):
|
||||
```jqhtml
|
||||
<% if (condition): %>
|
||||
<div>Content</div>
|
||||
<% else: %>
|
||||
<div>Other content</div>
|
||||
<% endif; %>
|
||||
```
|
||||
```json
|
||||
{
|
||||
"[jqhtml]": {
|
||||
"editor.bracketPairColorization.enabled": false,
|
||||
"editor.guides.bracketPairs": false
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
2. **Disable bracket colorization** (already set by default):
|
||||
```json
|
||||
{
|
||||
"[jqhtml]": {
|
||||
"editor.bracketPairColorization.enabled": false,
|
||||
"editor.guides.bracketPairs": false
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
3. **Ignore the visual errors** - they don't affect functionality, just appearance.
|
||||
|
||||
The extension automatically disables bracket colorization for `.jqhtml` files to minimize these false positives.
|
||||
These visual errors don't affect functionality.
|
||||
|
||||
### Other Known Issues
|
||||
|
||||
@@ -233,7 +217,7 @@ MIT License - See LICENSE file in the JQHTML repository
|
||||
### 2.0.0
|
||||
- Initial release
|
||||
- Full JQHTML v2 syntax support
|
||||
- Colon and brace control flow styles
|
||||
- Brace-style control flow
|
||||
- Slot syntax with let:prop
|
||||
- Data binding and event handlers
|
||||
- Component highlighting
|
||||
|
||||
Binary file not shown.
4
node_modules/@jqhtml/vscode-extension/language-configuration.json
generated
vendored
4
node_modules/@jqhtml/vscode-extension/language-configuration.json
generated
vendored
@@ -32,7 +32,7 @@
|
||||
},
|
||||
"wordPattern": "(-?\\d*\\.\\d\\w*)|([^\\`\\~\\!\\@\\#\\%\\^\\&\\*\\(\\)\\-\\=\\+\\[\\{\\]\\}\\\\\\|\\;\\:\\'\\\"\\,\\.\\<\\>\\/\\?\\s]+)",
|
||||
"indentationRules": {
|
||||
"increaseIndentPattern": "^\\s*(<(?!\\/)(?!.*\\/[>\\s]).*>|<%(\\s)*(if|for|while|foreach)\\s*\\(.*\\)\\s*(:)?|\\{(?!.*\\}.*)|\\[(?!.*\\].*))\\s*$",
|
||||
"decreaseIndentPattern": "^\\s*(</.*>|<%\\s*(endif|endfor|endwhile|endforeach)\\s*;?\\s*%>|\\}|\\])"
|
||||
"increaseIndentPattern": "^\\s*(<(?!\\/)(?!.*\\/[>\\s]).*>|<%(\\s)*(if|for|while|foreach)\\s*\\(.*\\)\\s*\\{|\\{(?!.*\\}.*)|\\[(?!.*\\].*))\\s*$",
|
||||
"decreaseIndentPattern": "^\\s*(</.*>|<%\\s*\\}\\s*%>|\\}|\\])"
|
||||
}
|
||||
}
|
||||
103
node_modules/@jqhtml/vscode-extension/out/formatter.js
generated
vendored
103
node_modules/@jqhtml/vscode-extension/out/formatter.js
generated
vendored
@@ -42,20 +42,6 @@ class JqhtmlFormattingEditProvider {
|
||||
// This formatter uses string manipulation and indexOf for reliability
|
||||
// Regex should only be used in the syntax highlighter, not here
|
||||
// Based on the RS3 formatter (reformat_html.php) logic
|
||||
// Patterns that increase indent on the NEXT line
|
||||
this.indentIncrease = [': %>', ': ?>', '{ %>', '{ ?>'];
|
||||
// Patterns that decrease indent
|
||||
this.indentDecrease = [
|
||||
'<% end; %>',
|
||||
'<% endif; %>',
|
||||
'<% endfor; %>',
|
||||
'<% endforeach; %>',
|
||||
'<% endfunction; %>',
|
||||
'<% } %>',
|
||||
'<% }); %>',
|
||||
'<% } else',
|
||||
'<% else'
|
||||
];
|
||||
// Known self-closing HTML tags
|
||||
this.selfClosingTags = [
|
||||
'area', 'base', 'br', 'embed', 'hr', 'iframe',
|
||||
@@ -73,7 +59,24 @@ class JqhtmlFormattingEditProvider {
|
||||
const safeCode = [];
|
||||
let working = text;
|
||||
let reading = text;
|
||||
// Step 1: Escape HTML comments
|
||||
// Step 1: Escape JQHTML comments (<%-- --%>)
|
||||
working = '';
|
||||
while (reading.indexOf('<%--') !== -1) {
|
||||
const pos = reading.indexOf('<%--');
|
||||
working += reading.substring(0, pos);
|
||||
reading = reading.substring(pos);
|
||||
const closePos = reading.indexOf('--%>');
|
||||
if (closePos === -1) {
|
||||
// Parse error, return original
|
||||
return text;
|
||||
}
|
||||
safeCode.push(reading.substring(0, closePos + 4));
|
||||
reading = reading.substring(closePos + 4);
|
||||
working += '@@__SAFE__(' + (safeCode.length - 1) + ')';
|
||||
}
|
||||
working += reading;
|
||||
reading = working;
|
||||
// Step 2: Escape HTML comments (<!-- -->)
|
||||
working = '';
|
||||
while (reading.indexOf('<!--') !== -1) {
|
||||
const pos = reading.indexOf('<!--');
|
||||
@@ -90,7 +93,7 @@ class JqhtmlFormattingEditProvider {
|
||||
}
|
||||
working += reading;
|
||||
reading = working;
|
||||
// Step 2: Escape multiline <% %> blocks
|
||||
// Step 3: Escape multiline <% %> blocks
|
||||
working = '';
|
||||
while (reading.indexOf('<%') !== -1) {
|
||||
const pos = reading.indexOf('<%');
|
||||
@@ -114,48 +117,62 @@ class JqhtmlFormattingEditProvider {
|
||||
working += '@@__SAFE__(' + (safeCode.length - 1) + ')';
|
||||
}
|
||||
working += reading;
|
||||
// Step 3: Split into lines with indent levels
|
||||
// Step 4: Split into lines with indent levels
|
||||
const lines = [];
|
||||
const splitLines = working.split('\n');
|
||||
for (const line of splitLines) {
|
||||
lines.push([0, line.trim()]);
|
||||
}
|
||||
// Step 4: Handle JS/control flow indents (if:, endif;, etc)
|
||||
// Step 5: Handle JS/control flow indents by counting braces
|
||||
let jsIndent = 0;
|
||||
for (let i = 0; i < lines.length; i++) {
|
||||
const trimmedLine = lines[i][1];
|
||||
let plus = 0;
|
||||
let minus = 0;
|
||||
// Check for indent increase patterns
|
||||
for (const pattern of this.indentIncrease) {
|
||||
if (trimmedLine.indexOf(pattern) !== -1) {
|
||||
plus++;
|
||||
}
|
||||
}
|
||||
// Check for indent decrease patterns
|
||||
for (const pattern of this.indentDecrease) {
|
||||
if (trimmedLine.indexOf(pattern) !== -1) {
|
||||
minus++;
|
||||
// Count opening and closing braces within <% %> blocks
|
||||
let openBraces = 0;
|
||||
let closeBraces = 0;
|
||||
// Find all <% %> blocks in the line
|
||||
let searchPos = 0;
|
||||
while (true) {
|
||||
const startPos = trimmedLine.indexOf('<%', searchPos);
|
||||
if (startPos === -1)
|
||||
break;
|
||||
const endPos = trimmedLine.indexOf('%>', startPos);
|
||||
if (endPos === -1)
|
||||
break;
|
||||
// Extract the code block content
|
||||
const codeBlock = trimmedLine.substring(startPos + 2, endPos);
|
||||
// Count braces in this code block
|
||||
for (let j = 0; j < codeBlock.length; j++) {
|
||||
if (codeBlock[j] === '{')
|
||||
openBraces++;
|
||||
if (codeBlock[j] === '}')
|
||||
closeBraces++;
|
||||
}
|
||||
searchPos = endPos + 2;
|
||||
}
|
||||
const netChange = openBraces - closeBraces;
|
||||
// Apply indent changes
|
||||
if (plus > minus) {
|
||||
if (netChange > 0) {
|
||||
// Opening braces - indent applies to next line
|
||||
lines[i][0] = jsIndent;
|
||||
jsIndent += netChange;
|
||||
}
|
||||
else if (netChange < 0) {
|
||||
// Closing braces - dedent this line
|
||||
jsIndent += netChange;
|
||||
lines[i][0] = jsIndent;
|
||||
jsIndent += plus;
|
||||
jsIndent -= minus;
|
||||
}
|
||||
else {
|
||||
jsIndent += plus;
|
||||
jsIndent -= minus;
|
||||
// No change
|
||||
lines[i][0] = jsIndent;
|
||||
}
|
||||
// Special handling for else statements
|
||||
if (trimmedLine.startsWith('<% else') ||
|
||||
trimmedLine.startsWith('<% } else')) {
|
||||
// Special handling for else statements - dedent by 1
|
||||
if (trimmedLine.indexOf('<% else') !== -1 ||
|
||||
trimmedLine.indexOf('<% } else') !== -1) {
|
||||
lines[i][0]--;
|
||||
}
|
||||
}
|
||||
// Step 5: Escape remaining single-line code blocks
|
||||
// Step 6: Escape remaining single-line code blocks
|
||||
for (let i = 0; i < lines.length; i++) {
|
||||
reading = lines[i][1];
|
||||
working = '';
|
||||
@@ -177,7 +194,7 @@ class JqhtmlFormattingEditProvider {
|
||||
working += reading;
|
||||
lines[i][1] = working;
|
||||
}
|
||||
// Step 6: Handle HTML tag indents
|
||||
// Step 7: Handle HTML tag indents
|
||||
let htmlIndent = 0;
|
||||
let openSelfClosingTag = null; // Track if we're inside a multiline self-closing tag
|
||||
for (let i = 0; i < lines.length; i++) {
|
||||
@@ -246,7 +263,7 @@ class JqhtmlFormattingEditProvider {
|
||||
lines[i][0]++;
|
||||
}
|
||||
}
|
||||
// Step 7: Build result with proper indentation
|
||||
// Step 8: Build result with proper indentation
|
||||
let result = '';
|
||||
for (const [indent, line] of lines) {
|
||||
const finalIndent = Math.max(0, indent);
|
||||
@@ -257,7 +274,7 @@ class JqhtmlFormattingEditProvider {
|
||||
result += '\n';
|
||||
}
|
||||
}
|
||||
// Step 8: Restore safe blocks
|
||||
// Step 9: Restore safe blocks
|
||||
for (let attempt = 0; attempt < 10; attempt++) {
|
||||
let hasChanges = false;
|
||||
for (let i = 0; i < safeCode.length; i++) {
|
||||
@@ -271,7 +288,7 @@ class JqhtmlFormattingEditProvider {
|
||||
break;
|
||||
}
|
||||
}
|
||||
// Step 9: Add blank lines around Define tag contents
|
||||
// Step 10: Add blank lines around Define tag contents
|
||||
result = this.addDefineTagSpacing(result);
|
||||
return result.trim();
|
||||
}
|
||||
|
||||
2
node_modules/@jqhtml/vscode-extension/out/formatter.js.map
generated
vendored
2
node_modules/@jqhtml/vscode-extension/out/formatter.js.map
generated
vendored
File diff suppressed because one or more lines are too long
2
node_modules/@jqhtml/vscode-extension/package.json
generated
vendored
2
node_modules/@jqhtml/vscode-extension/package.json
generated
vendored
@@ -2,7 +2,7 @@
|
||||
"name": "@jqhtml/vscode-extension",
|
||||
"displayName": "JQHTML",
|
||||
"description": "Syntax highlighting and language support for JQHTML template files",
|
||||
"version": "2.2.186",
|
||||
"version": "2.2.216",
|
||||
"publisher": "jqhtml",
|
||||
"license": "MIT",
|
||||
"publishConfig": {
|
||||
|
||||
18
node_modules/@jqhtml/vscode-extension/syntaxes/jqhtml.tmLanguage.json
generated
vendored
18
node_modules/@jqhtml/vscode-extension/syntaxes/jqhtml.tmLanguage.json
generated
vendored
@@ -229,20 +229,6 @@
|
||||
{ "include": "source.js" }
|
||||
]
|
||||
},
|
||||
"control-flow": {
|
||||
"comment": "Control flow keywords that support both colon and brace syntax",
|
||||
"patterns": [
|
||||
{
|
||||
"match": "\\b(if|else|elseif|endif|for|endfor|while|endwhile|foreach|endforeach)\\b",
|
||||
"name": "keyword.control.flow.jqhtml"
|
||||
},
|
||||
{
|
||||
"comment": "Colon at end of control flow statement (Python-style)",
|
||||
"match": "(:)\\s*$",
|
||||
"name": "punctuation.separator.key-value.jqhtml"
|
||||
}
|
||||
]
|
||||
},
|
||||
"html-tag": {
|
||||
"patterns": [
|
||||
{ "include": "#slot-tag" },
|
||||
@@ -260,7 +246,7 @@
|
||||
"captures": {
|
||||
"1": { "name": "punctuation.definition.tag.begin.jqhtml" },
|
||||
"2": { "name": "keyword.control.slot.jqhtml" },
|
||||
"3": { "name": "entity.name.tag.slot.jqhtml" },
|
||||
"3": { "name": "keyword.control.slot.jqhtml" },
|
||||
"4": {
|
||||
"patterns": [
|
||||
{ "include": "#tag-attributes" }
|
||||
@@ -276,7 +262,7 @@
|
||||
"captures": {
|
||||
"1": { "name": "punctuation.definition.tag.begin.jqhtml" },
|
||||
"2": { "name": "keyword.control.slot.jqhtml" },
|
||||
"3": { "name": "entity.name.tag.slot.jqhtml" },
|
||||
"3": { "name": "keyword.control.slot.jqhtml" },
|
||||
"4": { "name": "punctuation.definition.tag.end.jqhtml" }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user