lucide-vesk 0.2.25 → 0.2.26

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.
@@ -1 +1 @@
1
- {"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../src/Icon.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAExD,KAAK,aAAa,GAAG;IACnB,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;IACrB,WAAW,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACnC,SAAS,CAAC,EAAE,EAAE,OAAO,GAAG,aAAa,CAAC;CACvC,GAAG,IAAI,GAAG,SAAS,CAAC;AA4GrB,wBAAgB,IAAI,CAClB,KAAK,EAAE,WAAW,GAAG;IAAE,QAAQ,EAAE,QAAQ,CAAA;CAAE,EAC3C,SAAS,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,EAChC,MAAM,CAAC,EAAE,aAAa,GACrB,MAAM,GAAG,OAAO,GAAG,IAAI,CA0MzB;AAED,eAAe,IAAI,CAAC"}
1
+ {"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../src/Icon.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAExD,KAAK,aAAa,GAAG;IACnB,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;IACrB,WAAW,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACnC,SAAS,CAAC,EAAE,EAAE,OAAO,GAAG,aAAa,CAAC;CACvC,GAAG,IAAI,GAAG,SAAS,CAAC;AA4GrB,wBAAgB,IAAI,CAClB,KAAK,EAAE,WAAW,GAAG;IAAE,QAAQ,EAAE,QAAQ,CAAA;CAAE,EAC3C,SAAS,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,EAChC,MAAM,CAAC,EAAE,aAAa,GACrB,MAAM,GAAG,OAAO,GAAG,IAAI,CAgLzB;AAED,eAAe,IAAI,CAAC"}
package/dist/Icon.js CHANGED
@@ -196,35 +196,11 @@ export function Icon(props, _registry, walker) {
196
196
  let svg = null;
197
197
  let walkerClaimed = false;
198
198
  if (anyWalker) {
199
- // Case A: walker.root is already the wrapper div or the svg itself.
200
- // The server wrapper (when hydrate) is <!--vsk--><div><svg>...</svg></div>
201
- // In that case walker.root should be the div, and we want to reuse its inner svg.
202
- // Case B: server without wrapper (<!--vsk--><svg>) — nextElement('svg') returns svg directly.
203
- // We try both.
199
+ // Hydrate path: claim the SVG via the walker stream. Do NOT use walker.root,
200
+ // as walker.root is the page root in marker-only hydration and would cause
201
+ // containment bugs (creating/appending into the page root, returning the root).
204
202
  try {
205
- const root = anyWalker.root;
206
- if (root) {
207
- const tag = root.tagName.toLowerCase();
208
- if (tag === "svg") {
209
- svg = root;
210
- walkerClaimed = true;
211
- }
212
- else if (tag === "div") {
213
- // wrapper div case — find inner svg
214
- const inner = root.querySelector(":scope > svg") || root.querySelector("svg");
215
- if (inner && inner.tagName.toLowerCase() === "svg") {
216
- svg = inner;
217
- walkerClaimed = true;
218
- }
219
- else {
220
- // create svg inside wrapper
221
- svg = document.createElementNS("http://www.w3.org/2000/svg", "svg");
222
- root.appendChild(svg);
223
- walkerClaimed = true;
224
- }
225
- }
226
- }
227
- if (!walkerClaimed && typeof anyWalker.nextElement === "function") {
203
+ if (typeof anyWalker.nextElement === "function") {
228
204
  const maybe = anyWalker.nextElement("svg");
229
205
  if (maybe && maybe.tagName.toLowerCase() === "svg") {
230
206
  svg = maybe;
@@ -282,11 +258,7 @@ export function Icon(props, _registry, walker) {
282
258
  else if (ref && typeof ref.current !== "undefined") {
283
259
  ref.current = svg;
284
260
  }
285
- // If walkerClaimed via wrapper div, return the wrapper div so parent doesn't duplicate
286
- const root = anyWalker?.root;
287
- if (root && root.tagName.toLowerCase() === "div" && svg.parentElement === root) {
288
- return root;
289
- }
261
+ // Return the claimed SVG directly. Do not return a wrapper root.
290
262
  return svg;
291
263
  }
292
264
  // Normal client creation — fresh SVG
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lucide-vesk",
3
- "version": "0.2.25",
3
+ "version": "0.2.26",
4
4
  "type": "module",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lucide-vesk",
3
- "version": "0.2.25",
3
+ "version": "0.2.26",
4
4
  "type": "module",
5
5
  "description": "Lucide icons for Vesk — same props as lucide-react, fully typed, covers all icons, never scoped",
6
6
  "main": "./dist/index.js",