@parcel/codeframe 2.0.0-nightly.1014 → 2.0.0-nightly.1015

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/lib/codeframe.js CHANGED
@@ -2730,8 +2730,7 @@ Contributrors: Benjamin Pannell <contact@sierrasoftworks.com>
2730
2730
  Website: https://www.gnu.org/software/bash/
2731
2731
  Category: common
2732
2732
  */ /** @type LanguageFn */ function $ae8ec9c4d05495a7$var$bash(hljs) {
2733
- const VAR = {
2734
- };
2733
+ const VAR = {};
2735
2734
  const BRACED_VAR = {
2736
2735
  begin: /\$\{/,
2737
2736
  end: /\}/,
@@ -8845,8 +8844,7 @@ Category: scientific
8845
8844
  end: end,
8846
8845
  excludeEnd: true,
8847
8846
  contains: [].concat(PARSE_PARAMS)
8848
- }, inherits || {
8849
- });
8847
+ }, inherits || {});
8850
8848
  mode.contains.push(FUNCTION_DEF);
8851
8849
  mode.contains.push(hljs.C_NUMBER_MODE);
8852
8850
  mode.contains.push(hljs.C_BLOCK_COMMENT_MODE);
@@ -9325,8 +9323,7 @@ parcelRequire.register("26V94", function(module, exports) {
9325
9323
  Author: Guillaume Laforge <glaforge@gmail.com>
9326
9324
  Description: Groovy programming language implementation inspired from Vsevolod's Java mode
9327
9325
  Website: https://groovy-lang.org
9328
- */ function $1898782c81cbfbc8$var$variants(variants, obj = {
9329
- }) {
9326
+ */ function $1898782c81cbfbc8$var$variants(variants, obj = {}) {
9330
9327
  obj.variants = variants;
9331
9328
  return obj;
9332
9329
  }
@@ -31209,8 +31206,7 @@ const setLazyProperty = (object, property, get)=>{
31209
31206
  const makeDynamicStyles = (wrap, targetSpace, identity, isBackground)=>{
31210
31207
  if (colorConvert === undefined) colorConvert = (parcelRequire("6M7Wg"));
31211
31208
  const offset = isBackground ? 10 : 0;
31212
- const styles = {
31213
- };
31209
+ const styles = {};
31214
31210
  for (const [sourceSpace, suite] of Object.entries(colorConvert)){
31215
31211
  const name = sourceSpace === 'ansi16' ? 'ansi' : sourceSpace;
31216
31212
  if (sourceSpace === targetSpace) styles[name] = wrap(identity, offset);
@@ -31442,8 +31438,7 @@ parcelRequire.register("6M7Wg", function(module, exports) {
31442
31438
  var $aXZ8b = parcelRequire("aXZ8b");
31443
31439
 
31444
31440
  var $lNr8l = parcelRequire("lNr8l");
31445
- const $4eed62433cdf0ee1$var$convert = {
31446
- };
31441
+ const $4eed62433cdf0ee1$var$convert = {};
31447
31442
  const $4eed62433cdf0ee1$var$models = Object.keys($aXZ8b);
31448
31443
  function $4eed62433cdf0ee1$var$wrapRaw(fn) {
31449
31444
  const wrappedFn = function(...args) {
@@ -31473,8 +31468,7 @@ function $4eed62433cdf0ee1$var$wrapRounded(fn) {
31473
31468
  return wrappedFn;
31474
31469
  }
31475
31470
  $4eed62433cdf0ee1$var$models.forEach((fromModel)=>{
31476
- $4eed62433cdf0ee1$var$convert[fromModel] = {
31477
- };
31471
+ $4eed62433cdf0ee1$var$convert[fromModel] = {};
31478
31472
  Object.defineProperty($4eed62433cdf0ee1$var$convert[fromModel], 'channels', {
31479
31473
  value: $aXZ8b[fromModel].channels
31480
31474
  });
@@ -31498,8 +31492,7 @@ var $ezIUD = parcelRequire("ezIUD");
31498
31492
  // NOTE: conversions should only return primitive values (i.e. arrays, or
31499
31493
  // values that give correct `typeof` results).
31500
31494
  // do not use box values types (i.e. Number(), String(), etc.)
31501
- const $7fbed568611944d2$var$reverseKeywords = {
31502
- };
31495
+ const $7fbed568611944d2$var$reverseKeywords = {};
31503
31496
  for (const key of Object.keys($ezIUD))$7fbed568611944d2$var$reverseKeywords[$ezIUD[key]] = key;
31504
31497
  const $7fbed568611944d2$var$convert = {
31505
31498
  rgb: {
@@ -33109,8 +33102,7 @@ var $aXZ8b = parcelRequire("aXZ8b");
33109
33102
 
33110
33103
  conversions that are not possible simply are not included.
33111
33104
  */ function $fde338bae77161dc$var$buildGraph() {
33112
- const graph = {
33113
- };
33105
+ const graph = {};
33114
33106
  // https://jsperf.com/object-keys-vs-for-in-with-closure/3
33115
33107
  const models = Object.keys($aXZ8b);
33116
33108
  for(let len = models.length, i = 0; i < len; i++)graph[models[i]] = {
@@ -33165,8 +33157,7 @@ function $fde338bae77161dc$var$wrapConversion(toModel, graph) {
33165
33157
  }
33166
33158
  module.exports = function(fromModel) {
33167
33159
  const graph = $fde338bae77161dc$var$deriveBFS(fromModel);
33168
- const conversion = {
33169
- };
33160
+ const conversion = {};
33170
33161
  const models = Object.keys(graph);
33171
33162
  for(let len = models.length, i = 0; i < len; i++){
33172
33163
  const toModel = models[i];
@@ -33229,8 +33220,7 @@ class $03b62e45aee69014$var$Response {
33229
33220
  * @param {CompiledMode} mode
33230
33221
  */ constructor(mode){
33231
33222
  // eslint-disable-next-line no-undefined
33232
- if (mode.data === undefined) mode.data = {
33233
- };
33223
+ if (mode.data === undefined) mode.data = {};
33234
33224
  this.data = mode.data;
33235
33225
  }
33236
33226
  ignoreMatch() {
@@ -33252,7 +33242,7 @@ class $03b62e45aee69014$var$Response {
33252
33242
  * @returns {T} a single new object
33253
33243
  */ function $03b62e45aee69014$var$inherit(original, ...objects) {
33254
33244
  /** @type Record<string,any> */ const result = Object.create(null);
33255
- for(const key in original)result[key] = original[key];
33245
+ for(const key1 in original)result[key1] = original[key1];
33256
33246
  objects.forEach(function(obj) {
33257
33247
  for(const key in obj)result[key] = obj[key];
33258
33248
  });
@@ -33653,8 +33643,7 @@ const $03b62e45aee69014$var$BINARY_NUMBER_RE = '\\b(0b[01]+)'; // 0b...
33653
33643
  const $03b62e45aee69014$var$RE_STARTERS_RE = '!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~';
33654
33644
  /**
33655
33645
  * @param { Partial<Mode> & {binary?: string | RegExp} } opts
33656
- */ const $03b62e45aee69014$var$SHEBANG = (opts = {
33657
- })=>{
33646
+ */ const $03b62e45aee69014$var$SHEBANG = (opts = {})=>{
33658
33647
  const beginShebang = /^#![ ]*\//;
33659
33648
  if (opts.binary) opts.begin = $03b62e45aee69014$var$concat(beginShebang, /.*\b/, opts.binary, /\b.*/);
33660
33649
  return $03b62e45aee69014$var$inherit({
@@ -33700,8 +33689,7 @@ const $03b62e45aee69014$var$PHRASAL_WORDS_MODE = {
33700
33689
  * @param {string | RegExp} end
33701
33690
  * @param {Mode | {}} [modeOptions]
33702
33691
  * @returns {Partial<Mode>}
33703
- */ const $03b62e45aee69014$var$COMMENT = function(begin, end, modeOptions = {
33704
- }) {
33692
+ */ const $03b62e45aee69014$var$COMMENT = function(begin, end, modeOptions = {}) {
33705
33693
  const mode = $03b62e45aee69014$var$inherit({
33706
33694
  className: 'comment',
33707
33695
  begin: begin,
@@ -33870,8 +33858,7 @@ const $03b62e45aee69014$var$COMMON_KEYWORDS = [
33870
33858
  (`illegal`, `begin`, end, etc).
33871
33859
  */ class MultiRegex {
33872
33860
  constructor(){
33873
- this.matchIndexes = {
33874
- };
33861
+ this.matchIndexes = {};
33875
33862
  // @ts-ignore
33876
33863
  this.regexes = [];
33877
33864
  this.matchAt = 1;
@@ -34146,8 +34133,7 @@ const $03b62e45aee69014$var$COMMON_KEYWORDS = [
34146
34133
  // self is not valid at the top-level
34147
34134
  if (language.contains && language.contains.includes('self')) throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");
34148
34135
  // we need a null object, which inherit will guarantee
34149
- language.classNameAliases = $03b62e45aee69014$var$inherit(language.classNameAliases || {
34150
- });
34136
+ language.classNameAliases = $03b62e45aee69014$var$inherit(language.classNameAliases || {});
34151
34137
  return compileMode(language);
34152
34138
  }
34153
34139
  /**
@@ -34202,12 +34188,12 @@ const $03b62e45aee69014$var$COMMON_KEYWORDS = [
34202
34188
  * @param {string | Record<string,string>} rawKeywords
34203
34189
  * @param {boolean} caseInsensitive
34204
34190
  */ function $03b62e45aee69014$var$compileKeywords(rawKeywords, caseInsensitive) {
34205
- /** @type KeywordDict */ const compiledKeywords = {
34206
- };
34191
+ /** @type KeywordDict */ const compiledKeywords = {};
34207
34192
  if (typeof rawKeywords === 'string') splitAndCompile('keyword', rawKeywords);
34208
34193
  else Object.keys(rawKeywords).forEach(function(className) {
34209
34194
  splitAndCompile(className, rawKeywords[className]);
34210
34195
  });
34196
+ return compiledKeywords;
34211
34197
  // ---
34212
34198
  /**
34213
34199
  * Compiles an individual list of keywords
@@ -34228,7 +34214,6 @@ const $03b62e45aee69014$var$COMMON_KEYWORDS = [
34228
34214
  ];
34229
34215
  });
34230
34216
  }
34231
- return compiledKeywords;
34232
34217
  }
34233
34218
  /**
34234
34219
  * Returns the proper score for a given keyword
@@ -34299,8 +34284,7 @@ function $03b62e45aee69014$var$BuildVuePlugin(hljs) {
34299
34284
  // this avoids needing to use a whole Vue compilation pipeline just
34300
34285
  // to build Highlight.js
34301
34286
  render (createElement) {
34302
- return createElement("pre", {
34303
- }, [
34287
+ return createElement("pre", {}, [
34304
34288
  createElement("code", {
34305
34289
  class: this.className,
34306
34290
  domProps: {
@@ -34599,8 +34583,7 @@ const $03b62e45aee69014$var$NO_MATCH = Symbol("nomatch");
34599
34583
  list.forEach((item)=>emitter.openNode(item)
34600
34584
  );
34601
34585
  }
34602
- /** @type {{type?: MatchType, index?: number, rule?: Mode}}} */ let lastMatch = {
34603
- };
34586
+ /** @type {{type?: MatchType, index?: number, rule?: Mode}}} */ let lastMatch = {};
34604
34587
  /**
34605
34588
  * Process an individual match
34606
34589
  *
@@ -34674,8 +34657,7 @@ const $03b62e45aee69014$var$NO_MATCH = Symbol("nomatch");
34674
34657
  const md = $03b62e45aee69014$var$compileLanguage(language);
34675
34658
  let result1 = '';
34676
34659
  /** @type {CompiledMode} */ let top = continuation || md;
34677
- /** @type Record<string,CompiledMode> */ const continuations = {
34678
- }; // keep continuations for sub-languages
34660
+ /** @type Record<string,CompiledMode> */ const continuations = {}; // keep continuations for sub-languages
34679
34661
  const emitter = new options.__emitter(options);
34680
34662
  processContinuations();
34681
34663
  let modeBuffer = '';
@@ -35028,8 +35010,7 @@ const $03b62e45aee69014$var$NO_MATCH = Symbol("nomatch");
35028
35010
  return hljs;
35029
35011
  };
35030
35012
  // export an "instance" of the highlighter
35031
- var $03b62e45aee69014$var$highlight = $03b62e45aee69014$var$HLJS({
35032
- });
35013
+ var $03b62e45aee69014$var$highlight = $03b62e45aee69014$var$HLJS({});
35033
35014
  $03b62e45aee69014$exports = $03b62e45aee69014$var$highlight;
35034
35015
 
35035
35016
 
@@ -35131,13 +35112,13 @@ $4aa8a9bf31969fd6$var$fault.create = $4aa8a9bf31969fd6$var$create;
35131
35112
  // Create a new `EConstructor`, with the formatted `format` as a first argument.
35132
35113
  function $4aa8a9bf31969fd6$var$create(EConstructor) {
35133
35114
  FormattedError.displayName = EConstructor.displayName || EConstructor.name;
35115
+ return FormattedError;
35134
35116
  function FormattedError(format) {
35135
35117
  if (format) {
35136
35118
  format = $359a0e9dac52e4a7$exports.apply(null, arguments);
35137
35119
  }
35138
35120
  return new EConstructor(format);
35139
35121
  }
35140
- return FormattedError;
35141
35122
  }
35142
35123
 
35143
35124
 
@@ -35157,10 +35138,8 @@ $380d7edc2604b455$var$Emitter.prototype.toHTML = $380d7edc2604b455$var$toHtmlNoo
35157
35138
  var $380d7edc2604b455$var$defaultPrefix = 'hljs-';
35158
35139
  // Highlighting `value` in the language `name`.
35159
35140
  function $380d7edc2604b455$var$highlight(name, value, options) {
35160
- var before = $03b62e45aee69014$exports.configure({
35161
- });
35162
- var settings = options || {
35163
- };
35141
+ var before = $03b62e45aee69014$exports.configure({});
35142
+ var settings = options || {};
35164
35143
  var prefix = settings.prefix;
35165
35144
  var result;
35166
35145
  if (typeof name !== 'string') throw $4aa8a9bf31969fd6$exports('Expected `string` for name, got `%s`', name);
@@ -35172,8 +35151,7 @@ function $380d7edc2604b455$var$highlight(name, value, options) {
35172
35151
  classPrefix: prefix
35173
35152
  });
35174
35153
  result = $03b62e45aee69014$exports.highlight(name, value, true);
35175
- $03b62e45aee69014$exports.configure(before || {
35176
- });
35154
+ $03b62e45aee69014$exports.configure(before || {});
35177
35155
  /* istanbul ignore if - Highlight.js seems to use this (currently) for broken
35178
35156
  * grammars, so let’s keep it in there just to be sure. */ if (result.errorRaised) throw result.errorRaised;
35179
35157
  return {
@@ -35183,8 +35161,7 @@ function $380d7edc2604b455$var$highlight(name, value, options) {
35183
35161
  };
35184
35162
  }
35185
35163
  function $380d7edc2604b455$var$highlightAuto(value, options) {
35186
- var settings = options || {
35187
- };
35164
+ var settings = options || {};
35188
35165
  var subset = settings.subset || $03b62e45aee69014$exports.listLanguages();
35189
35166
  var prefix = settings.prefix;
35190
35167
  var length = subset.length;
@@ -35232,8 +35209,7 @@ function $380d7edc2604b455$var$registerAlias(name, alias) {
35232
35209
  var map = name;
35233
35210
  var key;
35234
35211
  if (alias) {
35235
- map = {
35236
- };
35212
+ map = {};
35237
35213
  map[name] = alias;
35238
35214
  }
35239
35215
  for(key in map)$03b62e45aee69014$exports.registerAliases(map[key], {
@@ -35306,15 +35282,13 @@ function $380d7edc2604b455$var$close() {
35306
35282
  function $380d7edc2604b455$var$toHtmlNoop() {
35307
35283
  return '';
35308
35284
  }
35309
- function $380d7edc2604b455$var$noop() {
35310
- }
35285
+ function $380d7edc2604b455$var$noop() {}
35311
35286
 
35312
35287
 
35313
35288
  var $809574c62832013e$var$high = $380d7edc2604b455$exports.highlight;
35314
35289
  var $809574c62832013e$var$auto = $380d7edc2604b455$exports.highlightAuto;
35315
35290
  // Inherit.
35316
- function $809574c62832013e$var$Lowlight() {
35317
- }
35291
+ function $809574c62832013e$var$Lowlight() {}
35318
35292
  $809574c62832013e$var$Lowlight.prototype = $380d7edc2604b455$exports;
35319
35293
  var $809574c62832013e$var$emphasize = new $809574c62832013e$var$Lowlight();
35320
35294
  // Expose.
@@ -35386,10 +35360,8 @@ function $809574c62832013e$var$highlightAuto(value, options) {
35386
35360
  }
35387
35361
  // Visit one `node`.
35388
35362
  function $809574c62832013e$var$visit(sheet, node) {
35389
- var name = (node.properties || {
35390
- }).className;
35391
- var scoped = {
35392
- };
35363
+ var name = (node.properties || {}).className;
35364
+ var scoped = {};
35393
35365
  var key;
35394
35366
  var parts;
35395
35367
  var color;
@@ -35810,8 +35782,7 @@ var $5e2cf9f740fe0527$exports = {};
35810
35782
  'use strict';
35811
35783
  var $5f04f11630a6945d$exports = {};
35812
35784
  'use strict';
35813
- $5f04f11630a6945d$exports = ({ onlyFirst: onlyFirst = false } = {
35814
- })=>{
35785
+ $5f04f11630a6945d$exports = ({ onlyFirst: onlyFirst = false } = {})=>{
35815
35786
  const pattern = [
35816
35787
  '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)',
35817
35788
  '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))'
@@ -35981,12 +35952,10 @@ const $796233c1fee0ccb8$var$DEFAULT_TERMINAL_WIDTH = 80;
35981
35952
  const $796233c1fee0ccb8$var$highlightSyntax = (txt, lang)=>{
35982
35953
  if (lang) try {
35983
35954
  return (/*@__PURE__*/$parcel$interopDefault($9786466eb6148e3d$exports)).highlight(lang, txt).value;
35984
- } catch (e) {
35985
- }
35955
+ } catch (e) {}
35986
35956
  return (/*@__PURE__*/$parcel$interopDefault($9786466eb6148e3d$exports)).highlightAuto(txt).value;
35987
35957
  };
35988
- function $796233c1fee0ccb8$export$2e2bcd8739ae039(code, highlights, inputOpts = {
35989
- }) {
35958
+ function $796233c1fee0ccb8$export$2e2bcd8739ae039(code, highlights, inputOpts = {}) {
35990
35959
  if (highlights.length < 1) return '';
35991
35960
  var _maxLines;
35992
35961
  let opts = {