@evotecit/officeimo 0.1.5 → 0.1.9

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.
@@ -12668,7 +12668,7 @@ _modules.set("ccfefc97a47cc288f2c9a2eed33fff323570e35193cedbd876ebb3e8fb78a42e",
12668
12668
  return _exports;
12669
12669
  })();
12670
12670
 
12671
- const _m106 = _modules.get("ac2d9b4299940637c2762e636ef75d8c1339cd95cdd8d53c48b26583e5f1e561") ?? (() => {
12671
+ const _m106 = _modules.get("a0c020124a53cd7be15e3d53388b8393c981c3abc0f8d4aee76a442a2458457f") ?? (() => {
12672
12672
  const { ExportCell } = _m1;
12673
12673
 
12674
12674
  /** Fixed numeric formats affect PDF text, not the frozen numeric value used by other writers. */
@@ -12684,25 +12684,26 @@ function numericProfile(format) {
12684
12684
  return { minimumFractionDigits: (match[3]?.match(/0/g) ?? []).length, maximumFractionDigits: match[3]?.length ?? 0,
12685
12685
  percent: !!match[4], grouping: !!match[2], prefix: literal(match[1]), suffix: literal(match[5]) };
12686
12686
  }
12687
- /** Separate declared literal units before recognizing the captured numeric token. */
12687
+ /** Separate declared literal units before recognizing the captured numeric token. U+2212 MINUS SIGN counts as a
12688
+ * sign like "-": the number is re-rendered with Intl's sign, so it never becomes a literal prefix. */
12688
12689
  function capturedNumber(text, profile) {
12689
12690
  let body = text, signBeforePrefix = false;
12690
12691
  if (profile.prefix && body.startsWith(profile.prefix))
12691
12692
  body = body.slice(profile.prefix.length);
12692
- else if (profile.prefix && /^[+-]/.test(body) && body.slice(1).startsWith(profile.prefix)) {
12693
+ else if (profile.prefix && /^[+\-\u2212]/.test(body) && body.slice(1).startsWith(profile.prefix)) {
12693
12694
  signBeforePrefix = true;
12694
12695
  body = body[0] + body.slice(1 + profile.prefix.length);
12695
12696
  }
12696
12697
  if (profile.suffix && body.endsWith(profile.suffix))
12697
12698
  body = body.slice(0, -profile.suffix.length);
12698
- const match = /^([^0-9+-]*)([+-]?\d[\d., \u00a0\u202f]*?)([^0-9]*)$/.exec(body);
12699
+ const match = /^([^0-9+\-\u2212]*)([+\-\u2212]?\d[\d., \u00a0\u202f]*?)([^0-9]*)$/.exec(body);
12699
12700
  return match ? { prefix: profile.prefix || match[1], number: match[2], suffix: profile.suffix || match[3], signBeforePrefix } : undefined;
12700
12701
  }
12701
12702
  /** Distinguish a captured thousands mark from a decimal, using the raw value. */
12702
12703
  function groupedInteger(numeric, value) {
12703
- if (!/^[+-]?\d{1,3}(?:,\d{3})+$/.test(numeric) && !/^[+-]?\d{1,3}(?:\.\d{3})+$/.test(numeric))
12704
+ if (!/^[+\-\u2212]?\d{1,3}(?:,\d{3})+$/.test(numeric) && !/^[+\-\u2212]?\d{1,3}(?:\.\d{3})+$/.test(numeric))
12704
12705
  return false;
12705
- const grouped = Number(numeric.replace(/[.,]/g, ""));
12706
+ const grouped = Number(numeric.replace(/[.,]/g, "").replace("\u2212", "-"));
12706
12707
  return grouped !== 0 && Math.abs(grouped - value) <= .5;
12707
12708
  }
12708
12709
  /** Choose once for the document; percent text is the strongest captured culture signal. */
@@ -12788,11 +12789,11 @@ function canopyPdfNumbers(sample, columns) {
12788
12789
  });
12789
12790
  }
12790
12791
  const _exports = Object.freeze({ canopyPdfNumbers: canopyPdfNumbers });
12791
- _modules.set("ac2d9b4299940637c2762e636ef75d8c1339cd95cdd8d53c48b26583e5f1e561", _exports);
12792
+ _modules.set("a0c020124a53cd7be15e3d53388b8393c981c3abc0f8d4aee76a442a2458457f", _exports);
12792
12793
  return _exports;
12793
12794
  })();
12794
12795
 
12795
- const _m105 = _modules.get("77da9b842a46b99cb3478438e27f47c1f794ab03bac5e64844fb923f2756df71") ?? (() => {
12796
+ const _m105 = _modules.get("dab3e04542b3619c5c937162b41068f7cb1c3021b4620987c0fb95d4bd98d8e2") ?? (() => {
12796
12797
  const { ExportCell, NotSupportedError, OfficeIMOError } = _m1;
12797
12798
 
12798
12799
  const { inputRows, checkAbort, pause, taskYieldDue } = _m4;
@@ -12897,11 +12898,11 @@ async function withCanopyPdfLayout(source, captured, options, write) {
12897
12898
  }
12898
12899
  }
12899
12900
  const _exports = Object.freeze({ withCanopyPdfLayout: withCanopyPdfLayout });
12900
- _modules.set("77da9b842a46b99cb3478438e27f47c1f794ab03bac5e64844fb923f2756df71", _exports);
12901
+ _modules.set("dab3e04542b3619c5c937162b41068f7cb1c3021b4620987c0fb95d4bd98d8e2", _exports);
12901
12902
  return _exports;
12902
12903
  })();
12903
12904
 
12904
- const _m0 = _modules.get("2e24380844e3dba4335b7d834825b712f857aaffd5b30b161e3533d4ff95cbb4") ?? (() => {
12905
+ const _m0 = _modules.get("1f0435c9bc6e437b986c72df8ed33a7636aea9e87db25a98bdb2a48a43985e5d") ?? (() => {
12905
12906
  const { BlobByteSink, ExportCell } = _m1;
12906
12907
 
12907
12908
  const { notifyProgress } = _m14;
@@ -13040,7 +13041,7 @@ async function exportCanopy(capture, format, options = {}) {
13040
13041
  }
13041
13042
  }
13042
13043
  const _exports = Object.freeze({ createCanopyExport: _m96.createCanopyExport, ExportCell: _m5.ExportCell, PdfFont: _m64.PdfFont, writeCanopyTo: writeCanopyTo, exportCanopy: exportCanopy });
13043
- _modules.set("2e24380844e3dba4335b7d834825b712f857aaffd5b30b161e3533d4ff95cbb4", _exports);
13044
+ _modules.set("1f0435c9bc6e437b986c72df8ed33a7636aea9e87db25a98bdb2a48a43985e5d", _exports);
13044
13045
  return _exports;
13045
13046
  })();
13046
13047
  Object.assign(officeimo, _m0);