@ape-egg/vibe 1.7.1 → 1.7.2

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 CHANGED
@@ -1,5 +1,16 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.7.2] - 2026-02-27
4
+
5
+ ### Fixed
6
+
7
+ - **Component inlining — hyphenated custom elements inside slot content** (`find_matching_close`)
8
+ - `<component-card>`, `<component-grid>`, etc. inside slot content incorrectly matched `<component\b`, incrementing the depth counter without a corresponding close
9
+ - The real `</component>` could never bring the depth back to 0, so `find_matching_close` returned `None` and the outer component was left un-inlined (causing `Cannot GET /components/Layout.html` at runtime)
10
+ - Fixed by replacing `\b` with `(?:\s|>|/>)` — only matches actual `<component` tags followed by whitespace or `>`, not hyphenated variants
11
+
12
+ ---
13
+
3
14
  ## [1.7.1] - 2026-02-27
4
15
 
5
16
  ### Added
@@ -1940,7 +1940,7 @@ checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
1940
1940
 
1941
1941
  [[package]]
1942
1942
  name = "vibe-compiler"
1943
- version = "1.7.1"
1943
+ version = "1.7.2"
1944
1944
  dependencies = [
1945
1945
  "clap",
1946
1946
  "colored",
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "vibe-compiler"
3
- version = "1.7.1"
3
+ version = "1.7.2"
4
4
  edition = "2021"
5
5
  description = "Vibe framework compiler - compiles Vibe source files into optimized output"
6
6
  authors = ["Kim Korte"]
@@ -258,8 +258,8 @@ impl HtmlParser {
258
258
  /// Find the start position of the matching close tag, handling nesting of the same tag.
259
259
  /// `after_open`: byte position immediately after the `>` of the opening tag.
260
260
  fn find_matching_close(content: &str, after_open: usize, tag_name: &str) -> Option<usize> {
261
- // \b ensures <component> matches but not <component-foo>
262
- let open_re = regex::Regex::new(&format!(r"<{}\b", regex::escape(tag_name))).unwrap();
261
+ // (?:\s|>) ensures <component> matches but not <component-foo> (hyphen is not \s or >)
262
+ let open_re = regex::Regex::new(&format!(r"<{}(?:\s|>|/>)", regex::escape(tag_name))).unwrap();
263
263
  let close_re = regex::Regex::new(&format!(r"</{}>", regex::escape(tag_name))).unwrap();
264
264
 
265
265
  let mut depth = 1i32;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ape-egg/vibe",
3
- "version": "1.7.1",
3
+ "version": "1.7.2",
4
4
  "type": "module",
5
5
  "description": "Runtime-first reactivity with optional compiler",
6
6
  "main": "index.js",