react-smart-copy 1.17.2 → 1.18.0

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.
Files changed (146) hide show
  1. package/README.md +9 -3
  2. package/dist/capture.cjs +30 -153
  3. package/dist/capture.cjs.map +1 -1
  4. package/dist/capture.d.cts +2 -25
  5. package/dist/capture.d.ts +2 -25
  6. package/dist/capture.js +5 -128
  7. package/dist/capture.js.map +1 -1
  8. package/dist/chunks/clipboard-adapter-Cfz-rzw3.cjs +102 -0
  9. package/dist/chunks/clipboard-adapter-Cfz-rzw3.cjs.map +1 -0
  10. package/dist/chunks/clipboard-adapter-CtH4VELE.d.cts +43 -0
  11. package/dist/chunks/clipboard-adapter-DEXkXxwV.js +97 -0
  12. package/dist/chunks/clipboard-adapter-DEXkXxwV.js.map +1 -0
  13. package/dist/chunks/clipboard-adapter-Ds0irroN.d.ts +43 -0
  14. package/dist/chunks/contrast-C6CVklEI.cjs +842 -0
  15. package/dist/chunks/contrast-C6CVklEI.cjs.map +1 -0
  16. package/dist/chunks/contrast-DpK2JIVu.js +789 -0
  17. package/dist/chunks/contrast-DpK2JIVu.js.map +1 -0
  18. package/dist/chunks/copy-interceptor-C6NABy1l.d.ts +141 -0
  19. package/dist/chunks/copy-interceptor-CZWzGOkL.d.cts +141 -0
  20. package/dist/chunks/core-Cp2HSpaz.js +1035 -0
  21. package/dist/chunks/core-Cp2HSpaz.js.map +1 -0
  22. package/dist/chunks/core-DYf_Lhbe.cjs +1142 -0
  23. package/dist/chunks/core-DYf_Lhbe.cjs.map +1 -0
  24. package/dist/chunks/deadline-C29AlS_Q.js +46 -0
  25. package/dist/chunks/deadline-C29AlS_Q.js.map +1 -0
  26. package/dist/chunks/deadline-DkiB8ZHE.cjs +51 -0
  27. package/dist/chunks/deadline-DkiB8ZHE.cjs.map +1 -0
  28. package/dist/chunks/errors-9h8sdFFX.js +120 -0
  29. package/dist/chunks/errors-9h8sdFFX.js.map +1 -0
  30. package/dist/chunks/errors-BwOF6T_M.cjs +167 -0
  31. package/dist/chunks/errors-BwOF6T_M.cjs.map +1 -0
  32. package/dist/chunks/index-mr7sSAgP.d.ts +426 -0
  33. package/dist/chunks/index-vz0iW5V2.d.cts +426 -0
  34. package/dist/chunks/mime--LB7kdqG.cjs +153 -0
  35. package/dist/chunks/mime--LB7kdqG.cjs.map +1 -0
  36. package/dist/chunks/mime-aa-HA2dm.js +100 -0
  37. package/dist/chunks/mime-aa-HA2dm.js.map +1 -0
  38. package/dist/chunks/paste-adapter--SPL4PRE.d.cts +35 -0
  39. package/dist/chunks/paste-adapter-uahXnTYk.d.ts +35 -0
  40. package/dist/chunks/paste-reader-Bo01IMC_.cjs +289 -0
  41. package/dist/chunks/paste-reader-Bo01IMC_.cjs.map +1 -0
  42. package/dist/chunks/paste-reader-D9i7yMXF.js +224 -0
  43. package/dist/chunks/paste-reader-D9i7yMXF.js.map +1 -0
  44. package/dist/chunks/paste-reader-DcXnRWQr.d.cts +96 -0
  45. package/dist/chunks/paste-reader-DcXnRWQr.d.ts +96 -0
  46. package/dist/chunks/payload-CUymxwim.cjs +100 -0
  47. package/dist/chunks/payload-CUymxwim.cjs.map +1 -0
  48. package/dist/chunks/payload-CcwKJ_bU.d.cts +162 -0
  49. package/dist/chunks/payload-Cl_8hCI5.d.ts +162 -0
  50. package/dist/chunks/payload-DGw-JOo7.js +71 -0
  51. package/dist/chunks/payload-DGw-JOo7.js.map +1 -0
  52. package/dist/chunks/payload-DI5AorDz.js +103 -0
  53. package/dist/chunks/payload-DI5AorDz.js.map +1 -0
  54. package/dist/chunks/payload-J6GjHuh3.cjs +132 -0
  55. package/dist/chunks/payload-J6GjHuh3.cjs.map +1 -0
  56. package/dist/chunks/share-Bop47Znn.js +208 -0
  57. package/dist/chunks/share-Bop47Znn.js.map +1 -0
  58. package/dist/chunks/share-C0esXvRK.d.cts +115 -0
  59. package/dist/chunks/share-ayDz974N.cjs +231 -0
  60. package/dist/chunks/share-ayDz974N.cjs.map +1 -0
  61. package/dist/chunks/share-e7FenIr2.d.ts +115 -0
  62. package/dist/chunks/text-field-Ba8W3v4R.cjs +77 -0
  63. package/dist/chunks/text-field-Ba8W3v4R.cjs.map +1 -0
  64. package/dist/chunks/text-field-C0SGmvvR.d.cts +18 -0
  65. package/dist/chunks/text-field-C0SGmvvR.d.ts +18 -0
  66. package/dist/chunks/text-field-DUvrMMaK.js +66 -0
  67. package/dist/chunks/text-field-DUvrMMaK.js.map +1 -0
  68. package/dist/chunks/url-BcMYVCXQ.js +135 -0
  69. package/dist/chunks/url-BcMYVCXQ.js.map +1 -0
  70. package/dist/chunks/url-D4PGsRm8.cjs +164 -0
  71. package/dist/chunks/url-D4PGsRm8.cjs.map +1 -0
  72. package/dist/chunks/url-DWdElCT3.d.cts +43 -0
  73. package/dist/chunks/url-DWdElCT3.d.ts +43 -0
  74. package/dist/code.cjs +20 -112
  75. package/dist/code.cjs.map +1 -1
  76. package/dist/code.d.cts +4 -28
  77. package/dist/code.d.ts +4 -28
  78. package/dist/code.js +3 -95
  79. package/dist/code.js.map +1 -1
  80. package/dist/color.cjs +21 -893
  81. package/dist/color.cjs.map +1 -1
  82. package/dist/color.d.cts +4 -28
  83. package/dist/color.d.ts +4 -28
  84. package/dist/color.js +4 -876
  85. package/dist/color.js.map +1 -1
  86. package/dist/core.cjs +52 -1659
  87. package/dist/core.d.cts +8 -878
  88. package/dist/core.d.ts +8 -878
  89. package/dist/core.js +7 -1614
  90. package/dist/image.cjs +23 -94
  91. package/dist/image.cjs.map +1 -1
  92. package/dist/image.d.cts +1 -0
  93. package/dist/image.d.ts +1 -0
  94. package/dist/image.js +3 -74
  95. package/dist/image.js.map +1 -1
  96. package/dist/index.cjs +74 -2072
  97. package/dist/index.cjs.map +1 -1
  98. package/dist/index.d.cts +8 -978
  99. package/dist/index.d.ts +8 -978
  100. package/dist/index.js +7 -2005
  101. package/dist/index.js.map +1 -1
  102. package/dist/link.cjs +24 -338
  103. package/dist/link.cjs.map +1 -1
  104. package/dist/link.d.cts +5 -83
  105. package/dist/link.d.ts +5 -83
  106. package/dist/link.js +5 -319
  107. package/dist/link.js.map +1 -1
  108. package/dist/markdown.cjs +8 -97
  109. package/dist/markdown.cjs.map +1 -1
  110. package/dist/markdown.d.cts +3 -16
  111. package/dist/markdown.d.ts +3 -16
  112. package/dist/markdown.js +3 -92
  113. package/dist/markdown.js.map +1 -1
  114. package/dist/rich.cjs +26 -934
  115. package/dist/rich.cjs.map +1 -1
  116. package/dist/rich.d.cts +4 -90
  117. package/dist/rich.d.ts +4 -90
  118. package/dist/rich.js +4 -912
  119. package/dist/rich.js.map +1 -1
  120. package/dist/share.cjs +5 -640
  121. package/dist/share.d.cts +3 -248
  122. package/dist/share.d.ts +3 -248
  123. package/dist/share.js +1 -637
  124. package/dist/structured.cjs +13 -95
  125. package/dist/structured.cjs.map +1 -1
  126. package/dist/structured.d.cts +2 -11
  127. package/dist/structured.d.ts +2 -11
  128. package/dist/structured.js +4 -86
  129. package/dist/structured.js.map +1 -1
  130. package/dist/table.cjs +11 -39
  131. package/dist/table.cjs.map +1 -1
  132. package/dist/table.d.cts +2 -12
  133. package/dist/table.d.ts +2 -12
  134. package/dist/table.js +2 -30
  135. package/dist/table.js.map +1 -1
  136. package/dist/testing.cjs +10 -43
  137. package/dist/testing.cjs.map +1 -1
  138. package/dist/testing.d.cts +6 -181
  139. package/dist/testing.d.ts +6 -181
  140. package/dist/testing.js +3 -36
  141. package/dist/testing.js.map +1 -1
  142. package/package.json +20 -2
  143. package/dist/core.cjs.map +0 -1
  144. package/dist/core.js.map +0 -1
  145. package/dist/share.cjs.map +0 -1
  146. package/dist/share.js.map +0 -1
package/dist/code.cjs CHANGED
@@ -1,37 +1,7 @@
1
+
1
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- //#region src/core/errors.ts
3
- function createCopyError(type, message, cause) {
4
- return cause === void 0 ? {
5
- type,
6
- message
7
- } : {
8
- type,
9
- message,
10
- cause
11
- };
12
- }
13
- /**
14
- * Branded (not `instanceof`) so failures stay recognisable even when the core
15
- * is bundled twice, e.g. `react-smart-copy` and `react-smart-copy/core` together.
16
- */
17
- const COPY_FAILURE_BRAND = Symbol.for("react-smart-copy.CopyFailure");
18
- /** Error thrown by adapters to carry a fully classified {@link CopyError}. */
19
- var CopyFailure = class extends Error {
20
- constructor(copyError) {
21
- super(copyError.message);
22
- this[COPY_FAILURE_BRAND] = true;
23
- this.name = "CopyFailure";
24
- this.copyError = copyError;
25
- }
26
- };
27
- function isCopyFailure(value) {
28
- return typeof value === "object" && value !== null && value[COPY_FAILURE_BRAND] === true;
29
- }
30
- /** Shorthand for throwing a classified failure. */
31
- function copyFailure(type, message, cause) {
32
- return new CopyFailure(createCopyError(type, message, cause));
33
- }
34
- //#endregion
3
+ const require_errors = require("./chunks/errors-BwOF6T_M.cjs");
4
+ const require_text_field = require("./chunks/text-field-Ba8W3v4R.cjs");
35
5
  //#region src/code/inspect.ts
36
6
  /** Every finding kind, in a stable order. */
37
7
  const CODE_FINDING_KINDS = Object.freeze([
@@ -212,7 +182,7 @@ function classify(codePoint, before, after) {
212
182
  const ALL = /* @__PURE__ */ new Set(CODE_FINDING_KINDS);
213
183
  function kindSet(kinds, name) {
214
184
  if (kinds === void 0) return ALL;
215
- if (!Array.isArray(kinds) || !kinds.every((kind) => ALL.has(kind))) throw copyFailure("invalid-payload", `\`${name}\` must be a list of: ${CODE_FINDING_KINDS.join(", ")}.`);
185
+ if (!Array.isArray(kinds) || !kinds.every((kind) => ALL.has(kind))) throw require_errors.copyFailure("invalid-payload", `\`${name}\` must be a list of: ${CODE_FINDING_KINDS.join(", ")}.`);
216
186
  return new Set(kinds);
217
187
  }
218
188
  /** Every suspicious character in `text`, in order of position. Stops once `limit` are found. */
@@ -305,7 +275,7 @@ function toFindings(text, raw) {
305
275
  function positiveLimit(value, fallback, name) {
306
276
  if (value === void 0) return fallback;
307
277
  if (value === Infinity || Number.isInteger(value) && value > 0) return value;
308
- throw copyFailure("invalid-payload", `\`${name}\` must be a positive integer or Infinity (received ${String(value)}).`);
278
+ throw require_errors.copyFailure("invalid-payload", `\`${name}\` must be a positive integer or Infinity (received ${String(value)}).`);
309
279
  }
310
280
  /**
311
281
  * Finds characters that make code read differently from how it runs, or that a
@@ -502,7 +472,7 @@ const AUTO = [
502
472
  ];
503
473
  /** A user pattern without `g` / `y`, so `exec` is stateless. */
504
474
  function stateless(pattern, name) {
505
- if (!(pattern instanceof RegExp)) throw copyFailure("invalid-payload", `\`prompt.${name}\` must be a RegExp.`);
475
+ if (!(pattern instanceof RegExp)) throw require_errors.copyFailure("invalid-payload", `\`prompt.${name}\` must be a RegExp.`);
506
476
  return new RegExp(pattern.source, pattern.flags.replace(/[gy]/g, ""));
507
477
  }
508
478
  function resolvePrompt(prompt, fallback) {
@@ -510,10 +480,10 @@ function resolvePrompt(prompt, fallback) {
510
480
  if (value === false) return null;
511
481
  if (value === "auto") return "auto";
512
482
  if (typeof value === "string") {
513
- if (!Object.prototype.hasOwnProperty.call(PROMPTS, value)) throw copyFailure("invalid-payload", `\`prompt\` must be 'auto', false, a PromptPattern or one of: ${PROMPT_STYLES.join(", ")}.`);
483
+ if (!Object.prototype.hasOwnProperty.call(PROMPTS, value)) throw require_errors.copyFailure("invalid-payload", `\`prompt\` must be 'auto', false, a PromptPattern or one of: ${PROMPT_STYLES.join(", ")}.`);
514
484
  return PROMPTS[value];
515
485
  }
516
- if (typeof value !== "object" || value === null) throw copyFailure("invalid-payload", `\`prompt\` must be 'auto', false, a PromptPattern or one of: ${PROMPT_STYLES.join(", ")}.`);
486
+ if (typeof value !== "object" || value === null) throw require_errors.copyFailure("invalid-payload", `\`prompt\` must be 'auto', false, a PromptPattern or one of: ${PROMPT_STYLES.join(", ")}.`);
517
487
  return {
518
488
  command: stateless(value.command, "command"),
519
489
  continuation: value.continuation === void 0 ? null : stateless(value.continuation, "continuation"),
@@ -664,7 +634,7 @@ function dedentLines(lines) {
664
634
  const oneOf = (value, allowed, fallback, name) => {
665
635
  if (value === void 0) return fallback;
666
636
  if (allowed.includes(value)) return value;
667
- throw copyFailure("invalid-payload", `\`${name}\` must be one of: ${allowed.map((option) => JSON.stringify(option)).join(", ")}.`);
637
+ throw require_errors.copyFailure("invalid-payload", `\`${name}\` must be one of: ${allowed.map((option) => JSON.stringify(option)).join(", ")}.`);
668
638
  };
669
639
  const flag = (value, fallback, name) => oneOf(value, [true, false], fallback, name);
670
640
  function resolveText(options, defaults) {
@@ -825,7 +795,7 @@ const NO_SELECT = /(?:^|;)\s*(?:-webkit-)?user-select\s*:\s*none/i;
825
795
  const SAFE_COLOR = /^(?:#[\da-f]{3,8}|[a-z]{3,20}|(?:rgba?|hsla?|hwb|lab|lch|oklab|oklch)\([\d\s.,%/+-]{1,80}\)|color\([a-z\d-]{1,24}[\d\s.,%/+-]{1,80}\))$/i;
826
796
  const TRANSPARENT = /^(?:transparent|rgba\(\s*0,\s*0,\s*0,\s*0\s*\))$/i;
827
797
  function assertElement(value, name) {
828
- if (typeof value !== "object" || value === null || value.nodeType !== 1) throw copyFailure("invalid-payload", `\`${name}\` must be a string or an Element.`);
798
+ if (typeof value !== "object" || value === null || value.nodeType !== 1) throw require_errors.copyFailure("invalid-payload", `\`${name}\` must be a string or an Element.`);
829
799
  }
830
800
  function lookOf(style) {
831
801
  const weight = style.fontWeight;
@@ -847,7 +817,7 @@ function extract(root, options) {
847
817
  if (ignore !== void 0) try {
848
818
  root.matches(ignore);
849
819
  } catch (cause) {
850
- throw copyFailure("invalid-payload", `\`ignore\` is not a valid CSS selector: ${ignore}`, cause);
820
+ throw require_errors.copyFailure("invalid-payload", `\`ignore\` is not a valid CSS selector: ${ignore}`, cause);
851
821
  }
852
822
  const view = root.ownerDocument.defaultView;
853
823
  const computed = (element) => view === null ? null : view.getComputedStyle(element);
@@ -976,9 +946,9 @@ function codePayload(source, options = {}) {
976
946
  clean: false
977
947
  });
978
948
  const withHtml = options.html ?? true;
979
- if (typeof withHtml !== "boolean") throw copyFailure("invalid-payload", "`html` must be a boolean.");
949
+ if (typeof withHtml !== "boolean") throw require_errors.copyFailure("invalid-payload", "`html` must be a boolean.");
980
950
  const { language } = options;
981
- if (language !== void 0 && (typeof language !== "string" || !LANGUAGE.test(language))) throw copyFailure("invalid-payload", "`language` may only hold letters, digits and _ + # . - (at most 64).");
951
+ if (language !== void 0 && (typeof language !== "string" || !LANGUAGE.test(language))) throw require_errors.copyFailure("invalid-payload", "`language` may only hold letters, digits and _ + # . - (at most 64).");
982
952
  let lines;
983
953
  let blockStyle = "";
984
954
  if (typeof source === "string") lines = toLines([{
@@ -1007,68 +977,6 @@ function codePayload(source, options = {}) {
1007
977
  };
1008
978
  }
1009
979
  //#endregion
1010
- //#region src/core/text-field.ts
1011
- const TEXT_INPUTS = /* @__PURE__ */ new Set([
1012
- "text",
1013
- "search",
1014
- "url",
1015
- "tel",
1016
- "password"
1017
- ]);
1018
- function asTextField(target) {
1019
- if (typeof target !== "object" || target === null) return null;
1020
- const element = target;
1021
- if (element.nodeName === "TEXTAREA") return target;
1022
- if (element.nodeName === "INPUT" && typeof element.type === "string" && TEXT_INPUTS.has(element.type)) return target;
1023
- return null;
1024
- }
1025
- /**
1026
- * Inserts text at the cursor of a `<textarea>` or text `<input>`, replacing the
1027
- * selection, as typing or pasting would: the browser's undo (Ctrl/⌘+Z) still
1028
- * works, `input` events fire (so React and other frameworks see the change),
1029
- * and `maxlength` is respected. Returns `false` for disabled or read-only fields.
1030
- */
1031
- function insertText(field, text) {
1032
- if (field.disabled || field.readOnly) return false;
1033
- const value = field.nodeName === "INPUT" ? text.replace(/[ \t]*(?:\r\n|\r|\n)+[ \t]*/g, " ") : text;
1034
- const doc = field.ownerDocument;
1035
- field.focus();
1036
- const start = field.selectionStart;
1037
- const end = field.selectionEnd;
1038
- try {
1039
- if (start !== null && end !== null) field.setSelectionRange(start, end);
1040
- if (doc.activeElement === field && doc.execCommand("insertText", false, value)) return true;
1041
- } catch {}
1042
- const from = start ?? field.value.length;
1043
- const to = end ?? from;
1044
- let insert = value;
1045
- if (field.maxLength >= 0) {
1046
- const room = Math.max(0, field.maxLength - (field.value.length - (to - from)));
1047
- insert = insert.slice(0, room);
1048
- if (/[\ud800-\udbff]$/.test(insert)) insert = insert.slice(0, -1);
1049
- }
1050
- if (start === null) setNativeValue(field, field.value + insert);
1051
- else field.setRangeText(insert, from, to, "end");
1052
- const view = doc.defaultView;
1053
- const event = view !== null && typeof view.InputEvent === "function" ? new view.InputEvent("input", {
1054
- bubbles: true,
1055
- inputType: "insertFromPaste",
1056
- data: insert
1057
- }) : new Event("input", { bubbles: true });
1058
- field.dispatchEvent(event);
1059
- return true;
1060
- }
1061
- /**
1062
- * Sets a field's value through the prototype's setter. React tracks the value
1063
- * set on the element itself; going around it lets React see the change and
1064
- * call `onChange` for the `input` event that follows.
1065
- */
1066
- function setNativeValue(field, next) {
1067
- const setter = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(field), "value")?.set;
1068
- if (setter) setter.call(field, next);
1069
- else field.value = next;
1070
- }
1071
- //#endregion
1072
980
  //#region src/code/paste.ts
1073
981
  const DEFAULT_CODE_MAX_LENGTH = 2e6;
1074
982
  const INDENT = /^[ \t]*$/;
@@ -1098,16 +1006,16 @@ function pasteToCode(source, options = {}) {
1098
1006
  });
1099
1007
  const maxLength = positiveLimit(options.maxLength, DEFAULT_CODE_MAX_LENGTH, "maxLength");
1100
1008
  const indent = options.indent ?? "";
1101
- if (typeof indent !== "string" || !INDENT.test(indent)) throw copyFailure("invalid-payload", "`indent` may only hold spaces and tabs.");
1009
+ if (typeof indent !== "string" || !INDENT.test(indent)) throw require_errors.copyFailure("invalid-payload", "`indent` may only hold spaces and tabs.");
1102
1010
  let text = source.text ?? "";
1103
1011
  let from = "text";
1104
1012
  if (text === "" && typeof source.html === "string" && source.html.trim() !== "" && typeof DOMParser !== "undefined") {
1105
- if (source.html.length > maxLength) throw copyFailure("too-large", `The pasted HTML is longer than maxLength (${String(maxLength)}).`);
1013
+ if (source.html.length > maxLength) throw require_errors.copyFailure("too-large", `The pasted HTML is longer than maxLength (${String(maxLength)}).`);
1106
1014
  const body = new DOMParser().parseFromString(source.html, "text/html").body;
1107
1015
  text = extract(body, { styles: false }).runs.map((run) => run.text).join("");
1108
1016
  from = "html";
1109
1017
  }
1110
- if (text.length > maxLength) throw copyFailure("too-large", `The pasted text is longer than maxLength (${String(maxLength)}).`);
1018
+ if (text.length > maxLength) throw require_errors.copyFailure("too-large", `The pasted text is longer than maxLength (${String(maxLength)}).`);
1111
1019
  if (text.trim() === "") return null;
1112
1020
  const { lines, fixed } = transform(toLines([{
1113
1021
  text,
@@ -1140,7 +1048,7 @@ function pasteToCode(source, options = {}) {
1140
1048
  */
1141
1049
  function pasteAsCode(event, options = {}) {
1142
1050
  if (event.defaultPrevented || event.clipboardData === null) return false;
1143
- const field = asTextField(event.currentTarget) ?? asTextField(event.target);
1051
+ const field = require_text_field.asTextField(event.currentTarget) ?? require_text_field.asTextField(event.target);
1144
1052
  if (field === null || field.disabled || field.readOnly) return false;
1145
1053
  const { indentToCursor, onPaste, ...rest } = options;
1146
1054
  let indent = "";
@@ -1158,13 +1066,13 @@ function pasteAsCode(event, options = {}) {
1158
1066
  indent
1159
1067
  });
1160
1068
  } catch (error) {
1161
- if (isCopyFailure(error)) return false;
1069
+ if (require_errors.isCopyFailure(error)) return false;
1162
1070
  throw error;
1163
1071
  }
1164
1072
  if (result === null) return false;
1165
1073
  event.preventDefault();
1166
1074
  if (onPaste?.(result) === false) return true;
1167
- insertText(field, result.code);
1075
+ require_text_field.insertText(field, result.code);
1168
1076
  return true;
1169
1077
  }
1170
1078
  //#endregion
@@ -1175,7 +1083,7 @@ exports.PROMPT_STYLES = PROMPT_STYLES;
1175
1083
  exports.cleanCode = cleanCode;
1176
1084
  exports.codeFromElement = codeFromElement;
1177
1085
  exports.codePayload = codePayload;
1178
- exports.insertText = insertText;
1086
+ exports.insertText = require_text_field.insertText;
1179
1087
  exports.inspectCode = inspectCode;
1180
1088
  exports.normalizeCode = normalizeCode;
1181
1089
  exports.pasteAsCode = pasteAsCode;