@rs-x/react-components 2.0.0-next.5 → 2.0.0-next.7

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/index.js CHANGED
@@ -17773,7 +17773,7 @@ function validatePlaygroundScriptWithRsxCompiler(userScript) {
17773
17773
  return (async () => {
17774
17774
  const [{ getRsxDiagnosticsForFile }, tsModule] = await Promise.all([
17775
17775
  import("@rs-x/compiler"),
17776
- import("./typescript-WDTYXJSA.js")
17776
+ import("./typescript-K4VG3SEY.js")
17777
17777
  ]);
17778
17778
  const ts = tsModule.default;
17779
17779
  const wrapped = wrapUserScript(userScript);
@@ -18336,7 +18336,7 @@ function installRsxCompletionProvider(monaco, model) {
18336
18336
  const [
18337
18337
  { getRsxCompletionsAtPosition, detectExpressionSitesInSourceFile },
18338
18338
  tsModule
18339
- ] = await Promise.all([import("@rs-x/compiler"), import("./typescript-WDTYXJSA.js")]);
18339
+ ] = await Promise.all([import("@rs-x/compiler"), import("./typescript-K4VG3SEY.js")]);
18340
18340
  const ts = tsModule.default;
18341
18341
  const userScript = model.getValue();
18342
18342
  const userOffset = model.getOffsetAt(position);
@@ -1813,7 +1813,7 @@ var require_buffer_from = __commonJS({
1813
1813
 
1814
1814
  // ../node_modules/source-map-support/source-map-support.js
1815
1815
  var require_source_map_support = __commonJS({
1816
- "../node_modules/source-map-support/source-map-support.js"(exports) {
1816
+ "../node_modules/source-map-support/source-map-support.js"(exports, module) {
1817
1817
  "use strict";
1818
1818
  var SourceMapConsumer = require_source_map().SourceMapConsumer;
1819
1819
  var path = __require("path");
@@ -1826,6 +1826,9 @@ var require_source_map_support = __commonJS({
1826
1826
  } catch (err) {
1827
1827
  }
1828
1828
  var bufferFrom = require_buffer_from();
1829
+ function dynamicRequire(mod, request) {
1830
+ return mod.require(request);
1831
+ }
1829
1832
  var errorFormatterInstalled = false;
1830
1833
  var uncaughtShimInstalled = false;
1831
1834
  var emptyCacheBetweenOperations = false;
@@ -1845,6 +1848,23 @@ var require_source_map_support = __commonJS({
1845
1848
  function hasGlobalProcessEventEmitter() {
1846
1849
  return typeof process === "object" && process !== null && typeof process.on === "function";
1847
1850
  }
1851
+ function globalProcessVersion() {
1852
+ if (typeof process === "object" && process !== null) {
1853
+ return process.version;
1854
+ } else {
1855
+ return "";
1856
+ }
1857
+ }
1858
+ function globalProcessStderr() {
1859
+ if (typeof process === "object" && process !== null) {
1860
+ return process.stderr;
1861
+ }
1862
+ }
1863
+ function globalProcessExit(code) {
1864
+ if (typeof process === "object" && process !== null && typeof process.exit === "function") {
1865
+ return process.exit(code);
1866
+ }
1867
+ }
1848
1868
  function handlerExec(list) {
1849
1869
  return function(arg) {
1850
1870
  for (var i = 0; i < list.length; i++) {
@@ -2069,15 +2089,20 @@ var require_source_map_support = __commonJS({
2069
2089
  object.toString = CallSiteToString;
2070
2090
  return object;
2071
2091
  }
2072
- function wrapCallSite(frame) {
2092
+ function wrapCallSite(frame, state) {
2093
+ if (state === void 0) {
2094
+ state = { nextPosition: null, curPosition: null };
2095
+ }
2073
2096
  if (frame.isNative()) {
2097
+ state.curPosition = null;
2074
2098
  return frame;
2075
2099
  }
2076
2100
  var source = frame.getFileName() || frame.getScriptNameOrSourceURL();
2077
2101
  if (source) {
2078
2102
  var line = frame.getLineNumber();
2079
2103
  var column = frame.getColumnNumber() - 1;
2080
- var headerLength = 62;
2104
+ var noHeader = /^v(10\.1[6-9]|10\.[2-9][0-9]|10\.[0-9]{3,}|1[2-9]\d*|[2-9]\d|\d{3,}|11\.11)/;
2105
+ var headerLength = noHeader.test(globalProcessVersion()) ? 0 : 62;
2081
2106
  if (line === 1 && column > headerLength && !isInBrowser() && !frame.isEval()) {
2082
2107
  column -= headerLength;
2083
2108
  }
@@ -2086,10 +2111,14 @@ var require_source_map_support = __commonJS({
2086
2111
  line,
2087
2112
  column
2088
2113
  });
2114
+ state.curPosition = position;
2089
2115
  frame = cloneCallSite(frame);
2090
2116
  var originalFunctionName = frame.getFunctionName;
2091
2117
  frame.getFunctionName = function() {
2092
- return position.name || originalFunctionName();
2118
+ if (state.nextPosition == null) {
2119
+ return originalFunctionName();
2120
+ }
2121
+ return state.nextPosition.name || originalFunctionName();
2093
2122
  };
2094
2123
  frame.getFileName = function() {
2095
2124
  return position.source;
@@ -2124,9 +2153,14 @@ var require_source_map_support = __commonJS({
2124
2153
  var name = error.name || "Error";
2125
2154
  var message = error.message || "";
2126
2155
  var errorString = name + ": " + message;
2127
- return errorString + stack.map(function(frame) {
2128
- return "\n at " + wrapCallSite(frame);
2129
- }).join("");
2156
+ var state = { nextPosition: null, curPosition: null };
2157
+ var processedStack = [];
2158
+ for (var i = stack.length - 1; i >= 0; i--) {
2159
+ processedStack.push("\n at " + wrapCallSite(stack[i], state));
2160
+ state.nextPosition = state.curPosition;
2161
+ }
2162
+ state.curPosition = state.nextPosition = null;
2163
+ return errorString + processedStack.reverse().join("");
2130
2164
  }
2131
2165
  function getErrorSource(error) {
2132
2166
  var match = /\n at [^(]+ \((.*):(\d+):(\d+)\)/.exec(error.stack);
@@ -2153,15 +2187,16 @@ var require_source_map_support = __commonJS({
2153
2187
  }
2154
2188
  function printErrorAndExit(error) {
2155
2189
  var source = getErrorSource(error);
2156
- if (process.stderr._handle && process.stderr._handle.setBlocking) {
2157
- process.stderr._handle.setBlocking(true);
2190
+ var stderr = globalProcessStderr();
2191
+ if (stderr && stderr._handle && stderr._handle.setBlocking) {
2192
+ stderr._handle.setBlocking(true);
2158
2193
  }
2159
2194
  if (source) {
2160
2195
  console.error();
2161
2196
  console.error(source);
2162
2197
  }
2163
2198
  console.error(error.stack);
2164
- process.exit(1);
2199
+ globalProcessExit(1);
2165
2200
  }
2166
2201
  function shimEmitUncaughtException() {
2167
2202
  var origEmit = process.emit;
@@ -2203,11 +2238,7 @@ var require_source_map_support = __commonJS({
2203
2238
  retrieveMapHandlers.unshift(options.retrieveSourceMap);
2204
2239
  }
2205
2240
  if (options.hookRequire && !isInBrowser()) {
2206
- var Module;
2207
- try {
2208
- Module = __require("module");
2209
- } catch (err) {
2210
- }
2241
+ var Module = dynamicRequire(module, "module");
2211
2242
  var $compile = Module.prototype._compile;
2212
2243
  if (!$compile.__sourceMapSupport) {
2213
2244
  Module.prototype._compile = function(content, filename) {
@@ -2227,6 +2258,13 @@ var require_source_map_support = __commonJS({
2227
2258
  }
2228
2259
  if (!uncaughtShimInstalled) {
2229
2260
  var installHandler = "handleUncaughtExceptions" in options ? options.handleUncaughtExceptions : true;
2261
+ try {
2262
+ var worker_threads = dynamicRequire(module, "worker_threads");
2263
+ if (worker_threads.isMainThread === false) {
2264
+ installHandler = false;
2265
+ }
2266
+ } catch (e) {
2267
+ }
2230
2268
  if (installHandler && hasGlobalProcessEventEmitter()) {
2231
2269
  uncaughtShimInstalled = true;
2232
2270
  shimEmitUncaughtException();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rs-x/react-components",
3
- "version": "2.0.0-next.5",
3
+ "version": "2.0.0-next.7",
4
4
  "description": "React extension for the RS-X framework with hooks to bind RS-X expressions to React components",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -34,10 +34,10 @@
34
34
  },
35
35
  "dependencies": {
36
36
  "monaco-editor": "^0.55.1",
37
- "@rs-x/compiler": "2.0.0-next.5",
38
- "@rs-x/core": "2.0.0-next.5",
39
- "@rs-x/expression-parser": "2.0.0-next.5",
40
- "@rs-x/state-manager": "2.0.0-next.5"
37
+ "@rs-x/compiler": "2.0.0-next.7",
38
+ "@rs-x/core": "2.0.0-next.7",
39
+ "@rs-x/expression-parser": "2.0.0-next.7",
40
+ "@rs-x/state-manager": "2.0.0-next.7"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@testing-library/react": "^16.3.2",