@react-pug/typescript-plugin-react-pug 0.1.1 → 0.1.3

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/dist/plugin.js CHANGED
@@ -25039,7 +25039,7 @@ function emitBlockWithCodeSupport(nodes, emitter, pugText) {
25039
25039
  if (jsxNodes.length === 0) {
25040
25040
  emitter.emitSynthetic("null");
25041
25041
  } else if (jsxNodes.length === 1) {
25042
- emitNode(jsxNodes[0], emitter, pugText);
25042
+ emitNodeAsExpression(jsxNodes[0], emitter, pugText);
25043
25043
  } else {
25044
25044
  emitter.emitSynthetic("<>");
25045
25045
  for (const node of jsxNodes) {
@@ -25720,17 +25720,17 @@ ${target.closingIndent}}`,
25720
25720
  }
25721
25721
  function applyImportCleanups(doc, cleanups) {
25722
25722
  if (cleanups.length === 0) return doc.shadowText;
25723
- const chars = doc.shadowText.split("");
25723
+ const chars2 = doc.shadowText.split("");
25724
25724
  for (const cleanup of cleanups) {
25725
25725
  const shadowStart = originalToShadow(doc, cleanup.originalStart);
25726
25726
  if (shadowStart == null) continue;
25727
25727
  const shadowEnd = shadowStart + (cleanup.originalEnd - cleanup.originalStart);
25728
25728
  for (let i = shadowStart; i < shadowEnd; i += 1) {
25729
- chars[i] = "";
25729
+ chars2[i] = "";
25730
25730
  }
25731
- chars[shadowStart] = cleanup.replacementText;
25731
+ chars2[shadowStart] = cleanup.replacementText;
25732
25732
  }
25733
- return chars.join("");
25733
+ return chars2.join("");
25734
25734
  }
25735
25735
  function padToLength2(text, targetLength) {
25736
25736
  if (text.length > targetLength) return null;
@@ -26009,6 +26009,19 @@ function buildShadowDocument(originalText, uri, version = 1, tagName = "pug", co
26009
26009
  return document;
26010
26010
  }
26011
26011
 
26012
+ // ../../node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs
26013
+ var comma = ",".charCodeAt(0);
26014
+ var semicolon = ";".charCodeAt(0);
26015
+ var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
26016
+ var intToChar = new Uint8Array(64);
26017
+ var charToInt = new Uint8Array(128);
26018
+ for (let i = 0; i < chars.length; i++) {
26019
+ const c = chars.charCodeAt(i);
26020
+ intToChar[i] = c;
26021
+ charToInt[c] = i;
26022
+ }
26023
+ var bufLength = 1024 * 16;
26024
+
26012
26025
  // src/index.ts
26013
26026
  var EXTRA_REACT_ATTRIBUTES_MARKER = "/* [pug-react] startupjs/cssxjs extra react attributes */";
26014
26027
  var STARTUPJS_OR_CSSXJS_RE2 = /['"](?:startupjs|cssxjs)['"]/;