mapshaper 0.7.75 → 0.7.76

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/mapshaper.js CHANGED
@@ -87911,7 +87911,7 @@ ${css.join('\n')}
87911
87911
  return name == 'rectangle' || name == 'rectangles' || name == 'filter' && opts.cleanup;
87912
87912
  }
87913
87913
 
87914
- var version = "0.7.75";
87914
+ var version = "0.7.76";
87915
87915
 
87916
87916
  // Parse command line args into commands and run them
87917
87917
  // Function takes an optional Node-style callback. A Promise is returned if no callback is given.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mapshaper",
3
- "version": "0.7.75",
3
+ "version": "0.7.76",
4
4
  "description": "A tool for editing geospatial data for mapping and GIS.",
5
5
  "keywords": [
6
6
  "shapefile",
@@ -9921,7 +9921,7 @@
9921
9921
  }
9922
9922
  line.show();
9923
9923
  input.node().focus();
9924
- });
9924
+ }, {typed: true});
9925
9925
  }
9926
9926
  toHistory(str);
9927
9927
  }
@@ -10029,8 +10029,14 @@
10029
10029
 
10030
10030
  }
10031
10031
 
10032
+ // runOpts.session see createCommandSession()
10033
+ // runOpts.typed the commands were typed into the console. Commands that
10034
+ // the GUI runs for a panel or tool are run as if with -quiet,
10035
+ // so their messages don't fill the console (errors still
10036
+ // reach the caller).
10032
10037
  function runMapshaperCommands(str, done, runOpts) {
10033
10038
  var session = runOpts && runOpts.session || null;
10039
+ var quiet = !(runOpts && runOpts.typed);
10034
10040
  var commands;
10035
10041
  if (activeSession && activeSession != session) {
10036
10042
  activeSession.finish().then(function() {
@@ -10049,7 +10055,7 @@
10049
10055
  return done(e, {});
10050
10056
  }
10051
10057
  if (commands.length === 0) return done();
10052
- applyParsedCommands(commands, str, session, function(err, flags) {
10058
+ applyParsedCommands(commands, str, session, quiet, function(err, flags) {
10053
10059
  if (flags) {
10054
10060
  model.updated(flags); // info commands do not return flags
10055
10061
  }
@@ -10075,7 +10081,7 @@
10075
10081
  });
10076
10082
  }
10077
10083
 
10078
- function applyParsedCommands(commands, commandString, session, done) {
10084
+ function applyParsedCommands(commands, commandString, session, quiet, done) {
10079
10085
  var active = model.getActiveLayer(),
10080
10086
  prevArcs = active?.dataset.arcs,
10081
10087
  prevTable = active?.layer.data,
@@ -10094,7 +10100,9 @@
10094
10100
  // so they can snapshot the pre-command state of the active layer.
10095
10101
  gui.dispatchEvent('command_start', {commands: commands});
10096
10102
  try {
10097
- internal.runParsedCommands(commands, job, onCommandsDone);
10103
+ // -quiet is a setting, read and removed by runParsedCommands()
10104
+ internal.runParsedCommands(quiet ? [{name: 'quiet', options: {}}].concat(commands) : commands,
10105
+ job, onCommandsDone);
10098
10106
  } catch(e) {
10099
10107
  if (undoTransaction) {
10100
10108
  clearActiveUndoTransaction(undoTransaction);
@@ -10296,13 +10304,16 @@
10296
10304
  // can differ -- warnings shouldn't read as red "something went wrong",
10297
10305
  // they're just heads-ups about how the input was interpreted.
10298
10306
  function consoleWarn() {
10299
- var msg = GUI.formatMessageArgs(arguments);
10300
- toLog(msg, 'console-warn');
10307
+ if (internal.getStashedVar('QUIET')) return;
10308
+ toLog(GUI.formatMessageArgs(arguments), 'console-warn');
10301
10309
  }
10302
10310
 
10311
+ // Like the CLI, -quiet (which the GUI's own commands run with, see
10312
+ // runMapshaperCommands()) silences messages and warnings, not errors
10303
10313
  function consoleMessage() {
10304
10314
  var structured = getStructuredConsoleMessage(arguments);
10305
10315
  var msg;
10316
+ if (internal.getStashedVar('QUIET')) return;
10306
10317
  if (internal.loggingEnabled()) {
10307
10318
  if (structured) {
10308
10319
  toLogNode(renderStructuredConsoleMessage(structured), 'console-message');
package/www/mapshaper.js CHANGED
@@ -87911,7 +87911,7 @@ ${css.join('\n')}
87911
87911
  return name == 'rectangle' || name == 'rectangles' || name == 'filter' && opts.cleanup;
87912
87912
  }
87913
87913
 
87914
- var version = "0.7.75";
87914
+ var version = "0.7.76";
87915
87915
 
87916
87916
  // Parse command line args into commands and run them
87917
87917
  // Function takes an optional Node-style callback. A Promise is returned if no callback is given.
package/www/page.css CHANGED
@@ -3315,6 +3315,7 @@ body.pan.panning .map-layers:not(.drawing) {
3315
3315
  }
3316
3316
 
3317
3317
  .label-editing-status,
3318
+ .label-style-selection-row,
3318
3319
  .label-style-panel .label-style-row.label-style-selection-row > span {
3319
3320
  font-size: 12px;
3320
3321
  color: #555;