octane 0.2.4 → 0.2.6

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.
@@ -7272,7 +7272,7 @@ function tsPlugin(options) {
7272
7272
  typeScriptTokenTypes: tokTypes,
7273
7273
  scope: acornScope
7274
7274
  });
7275
- class TypeScriptParser extends EffectParser {
7275
+ class TypeScriptParser2 extends EffectParser {
7276
7276
  constructor(options2, input, startPos) {
7277
7277
  super(options2, input, startPos);
7278
7278
  this.preValue = null;
@@ -11324,7 +11324,7 @@ function tsPlugin(options) {
11324
11324
  super.checkLocalExport(id2);
11325
11325
  }
11326
11326
  }
11327
- return TypeScriptParser;
11327
+ return TypeScriptParser2;
11328
11328
  };
11329
11329
  }
11330
11330
 
@@ -11449,17 +11449,17 @@ function apply_mutations(node, mutations) {
11449
11449
  );
11450
11450
  }
11451
11451
 
11452
- // ../../node_modules/.pnpm/@tsrx+core@0.1.67/node_modules/@tsrx/core/src/utils/patterns.js
11452
+ // ../../node_modules/.pnpm/@tsrx+core@0.1.69/node_modules/@tsrx/core/src/utils/patterns.js
11453
11453
  var regex_not_whitespace = /[^ \t\r\n]/;
11454
11454
  var regex_newline_characters = /\n/g;
11455
11455
  var regex_is_valid_identifier = /^[a-zA-Z_$][a-zA-Z_$0-9]*$/;
11456
11456
 
11457
- // ../../node_modules/.pnpm/@tsrx+core@0.1.67/node_modules/@tsrx/core/src/utils/sanitize_template_string.js
11457
+ // ../../node_modules/.pnpm/@tsrx+core@0.1.69/node_modules/@tsrx/core/src/utils/sanitize_template_string.js
11458
11458
  function sanitize_template_string(str) {
11459
11459
  return (str ?? "").replace(/(`|\${|\\)/g, "\\$1");
11460
11460
  }
11461
11461
 
11462
- // ../../node_modules/.pnpm/@tsrx+core@0.1.67/node_modules/@tsrx/core/src/utils/builders.js
11462
+ // ../../node_modules/.pnpm/@tsrx+core@0.1.69/node_modules/@tsrx/core/src/utils/builders.js
11463
11463
  function set_location(node, loc_info, is_deep_copy = false) {
11464
11464
  if (loc_info) {
11465
11465
  node.start = loc_info.start;
@@ -12016,7 +12016,7 @@ function switch_case(test = null, consequent = []) {
12016
12016
  }
12017
12017
  var void0 = unary("void", literal2(0));
12018
12018
 
12019
- // ../../node_modules/.pnpm/@tsrx+core@0.1.67/node_modules/@tsrx/core/src/utils/ast.js
12019
+ // ../../node_modules/.pnpm/@tsrx+core@0.1.69/node_modules/@tsrx/core/src/utils/ast.js
12020
12020
  function is_ast_node(value) {
12021
12021
  return !!value && typeof value === "object" && "type" in value;
12022
12022
  }
@@ -12180,7 +12180,7 @@ function extract_identifiers(pattern) {
12180
12180
  return unwrap_pattern(pattern, []).filter((node) => node.type === "Identifier");
12181
12181
  }
12182
12182
 
12183
- // ../../node_modules/.pnpm/@tsrx+core@0.1.67/node_modules/@tsrx/core/src/parse/index.js
12183
+ // ../../node_modules/.pnpm/@tsrx+core@0.1.69/node_modules/@tsrx/core/src/parse/index.js
12184
12184
  var BINDING_TYPES = {
12185
12185
  BIND_NONE: 0,
12186
12186
  // Not a binding
@@ -13129,13 +13129,13 @@ var sha256 = /* @__PURE__ */ createHasher(
13129
13129
  /* @__PURE__ */ oidNist(1)
13130
13130
  );
13131
13131
 
13132
- // ../../node_modules/.pnpm/@tsrx+core@0.1.67/node_modules/@tsrx/core/src/utils/hashing.js
13132
+ // ../../node_modules/.pnpm/@tsrx+core@0.1.69/node_modules/@tsrx/core/src/utils/hashing.js
13133
13133
  var regex_return_characters = /\r/g;
13134
13134
  function strong_hash(str) {
13135
13135
  return bytesToHex(sha256(utf8ToBytes(str.replace(regex_return_characters, "")))).slice(0, 8);
13136
13136
  }
13137
13137
 
13138
- // ../../node_modules/.pnpm/@tsrx+core@0.1.67/node_modules/@tsrx/core/src/parse/style.js
13138
+ // ../../node_modules/.pnpm/@tsrx+core@0.1.69/node_modules/@tsrx/core/src/parse/style.js
13139
13139
  var REGEX_MATCHER = /^[~^$*|]?=/;
13140
13140
  var REGEX_ATTRIBUTE_FLAGS = /^[a-zA-Z]+/;
13141
13141
  var REGEX_COMMENT_CLOSE = /\*\//;
@@ -13702,7 +13702,7 @@ function read_identifier(parser) {
13702
13702
  return identifier;
13703
13703
  }
13704
13704
 
13705
- // ../../node_modules/.pnpm/@tsrx+core@0.1.67/node_modules/@tsrx/core/src/errors.js
13705
+ // ../../node_modules/.pnpm/@tsrx+core@0.1.69/node_modules/@tsrx/core/src/errors.js
13706
13706
  function error(message, filename, node, errors, comments, code) {
13707
13707
  if (errors && comments && is_error_suppressed(node, comments)) {
13708
13708
  return;
@@ -13752,7 +13752,7 @@ function is_error_suppressed(node, comments) {
13752
13752
  return false;
13753
13753
  }
13754
13754
 
13755
- // ../../node_modules/.pnpm/@tsrx+core@0.1.67/node_modules/@tsrx/core/src/diagnostics.js
13755
+ // ../../node_modules/.pnpm/@tsrx+core@0.1.69/node_modules/@tsrx/core/src/diagnostics.js
13756
13756
  var DIAGNOSTIC_CODES = {
13757
13757
  JSX_EXPRESSION_VALUE: "tsrx-jsx-expression-value",
13758
13758
  UNCLOSED_TAG: "tsrx-unclosed-tag",
@@ -13785,7 +13785,7 @@ var DIAGNOSTIC_CODES = {
13785
13785
  CSS_GLOBAL_PLACEMENT: "tsrx-css-global-placement"
13786
13786
  };
13787
13787
 
13788
- // ../../node_modules/.pnpm/@tsrx+core@0.1.67/node_modules/@tsrx/core/src/analyze/validation.js
13788
+ // ../../node_modules/.pnpm/@tsrx+core@0.1.69/node_modules/@tsrx/core/src/analyze/validation.js
13789
13789
  var TSRX_RETURN_STATEMENT_ERROR = "Return statements are not allowed inside TSRX templates. Move the return before the TSRX return value, or use conditional rendering instead.";
13790
13790
  var TSRX_FORGOTTEN_STATEMENT_CONTAINER_ERROR = "This TSRX template output is unused. Return it, assign it to a value that is rendered, or make it part of the rendered output of a function '@{...}' body.";
13791
13791
  var TSRX_UNSUPPORTED_LAZY_ASSIGNMENT_POSITION_ERROR = "Lazy destructuring assignments require a directly lazy target as a standalone statement inside a program, block, TSRX code block, or switch case.";
@@ -13866,7 +13866,7 @@ function validate_style(message, code, node, filename, errors, comments) {
13866
13866
  error(message, filename, node, errors, comments, code);
13867
13867
  }
13868
13868
 
13869
- // ../../node_modules/.pnpm/@tsrx+core@0.1.67/node_modules/@tsrx/core/src/plugin.js
13869
+ // ../../node_modules/.pnpm/@tsrx+core@0.1.69/node_modules/@tsrx/core/src/plugin.js
13870
13870
  var CharCode = Object.freeze({
13871
13871
  tab: 9,
13872
13872
  lineFeed: 10,
@@ -16138,7 +16138,7 @@ function TSRXPlugin(config) {
16138
16138
  * @param {AST.TSTypeParameterDeclaration} node
16139
16139
  */
16140
16140
  reportReservedArrowTypeParam(node) {
16141
- if (this.#collect && node.params.length === 1 && node.extra?.trailingComma === void 0) {
16141
+ if (this.#collect && node.params.length === 1 && node.extra?.trailingComma === void 0 && !node.params[0].constraint && !node.params[0].default) {
16142
16142
  error(
16143
16143
  "This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `<T,>() => ...`.",
16144
16144
  this.#filename,
@@ -18309,13 +18309,13 @@ function TSRXPlugin(config) {
18309
18309
  };
18310
18310
  }
18311
18311
 
18312
- // ../../node_modules/.pnpm/@tsrx+core@0.1.67/node_modules/@tsrx/core/src/parse/parse-module.js
18312
+ // ../../node_modules/.pnpm/@tsrx+core@0.1.69/node_modules/@tsrx/core/src/parse/parse-module.js
18313
18313
  var parse4 = createParser(TSRXPlugin());
18314
18314
  function parse_module(source, filename, options) {
18315
18315
  return parse4(source, filename, options);
18316
18316
  }
18317
18317
 
18318
- // ../../node_modules/.pnpm/@tsrx+core@0.1.67/node_modules/@tsrx/core/src/utils/is-reference.js
18318
+ // ../../node_modules/.pnpm/@tsrx+core@0.1.69/node_modules/@tsrx/core/src/utils/is-reference.js
18319
18319
  function is_reference(node, parent) {
18320
18320
  if (node.type === "MemberExpression") {
18321
18321
  return !node.computed && is_reference(node.object, node);
@@ -18352,7 +18352,7 @@ function is_reference(node, parent) {
18352
18352
  }
18353
18353
  }
18354
18354
 
18355
- // ../../node_modules/.pnpm/@tsrx+core@0.1.67/node_modules/@tsrx/core/src/utils/dom.js
18355
+ // ../../node_modules/.pnpm/@tsrx+core@0.1.69/node_modules/@tsrx/core/src/utils/dom.js
18356
18356
  var RESERVED_WORDS = [
18357
18357
  "arguments",
18358
18358
  "await",
@@ -18455,12 +18455,12 @@ var DOM_PROPERTIES = [
18455
18455
  "disableRemotePlayback"
18456
18456
  ];
18457
18457
 
18458
- // ../../node_modules/.pnpm/@tsrx+core@0.1.67/node_modules/@tsrx/core/src/identifier-utils.js
18458
+ // ../../node_modules/.pnpm/@tsrx+core@0.1.69/node_modules/@tsrx/core/src/identifier-utils.js
18459
18459
  var IDENTIFIER_OBFUSCATION_PREFIX = "_$_";
18460
18460
  var SERVER_IDENTIFIER = IDENTIFIER_OBFUSCATION_PREFIX + "server_$_";
18461
18461
  var CSS_HASH_IDENTIFIER = IDENTIFIER_OBFUSCATION_PREFIX + "hash";
18462
18462
 
18463
- // ../../node_modules/.pnpm/@tsrx+core@0.1.67/node_modules/@tsrx/core/src/scope.js
18463
+ // ../../node_modules/.pnpm/@tsrx+core@0.1.69/node_modules/@tsrx/core/src/scope.js
18464
18464
  function create_scopes(ast, root, parent, error_options) {
18465
18465
  const scopes = /* @__PURE__ */ new Map();
18466
18466
  const scope = new Scope3(root, parent, false, error_options);
@@ -18841,7 +18841,7 @@ var ScopeRoot = class {
18841
18841
  }
18842
18842
  };
18843
18843
 
18844
- // ../../node_modules/.pnpm/@tsrx+core@0.1.67/node_modules/@tsrx/core/src/constants.js
18844
+ // ../../node_modules/.pnpm/@tsrx+core@0.1.69/node_modules/@tsrx/core/src/constants.js
18845
18845
  var TEMPLATE_USE_IMPORT_NODE = 1 << 1;
18846
18846
  var IS_CONTROLLED = 1 << 2;
18847
18847
  var IS_INDEXED = 1 << 3;
@@ -18853,7 +18853,7 @@ var HYDRATION_END = "]";
18853
18853
  var BLOCK_OPEN = `<!--${HYDRATION_START}-->`;
18854
18854
  var BLOCK_CLOSE = `<!--${HYDRATION_END}-->`;
18855
18855
 
18856
- // ../../node_modules/.pnpm/@tsrx+core@0.1.67/node_modules/@tsrx/core/src/comment-utils.js
18856
+ // ../../node_modules/.pnpm/@tsrx+core@0.1.69/node_modules/@tsrx/core/src/comment-utils.js
18857
18857
  function is_ts_pragma(comment) {
18858
18858
  if (comment.type !== "Line") return false;
18859
18859
  const pragmas = ["@ts-ignore", "@ts-expect-error", "@ts-nocheck", "@ts-check"];
@@ -18909,7 +18909,7 @@ function format_comment(comment) {
18909
18909
  }
18910
18910
  }
18911
18911
 
18912
- // ../../node_modules/.pnpm/@tsrx+core@0.1.67/node_modules/@tsrx/core/src/transform/jsx/ast-builders.js
18912
+ // ../../node_modules/.pnpm/@tsrx+core@0.1.69/node_modules/@tsrx/core/src/transform/jsx/ast-builders.js
18913
18913
  function set_loc(node, source_node) {
18914
18914
  node.metadata ??= { path: [] };
18915
18915
  if (has_location(source_node)) {
@@ -19112,7 +19112,7 @@ function clone_ast_node(node, with_locations = true) {
19112
19112
  return clone;
19113
19113
  }
19114
19114
 
19115
- // ../../node_modules/.pnpm/@tsrx+core@0.1.67/node_modules/@tsrx/core/src/transform/style-ref.js
19115
+ // ../../node_modules/.pnpm/@tsrx+core@0.1.69/node_modules/@tsrx/core/src/transform/style-ref.js
19116
19116
  var regex_backslash_and_following_character = /\\(.)/g;
19117
19117
  function create_style_class_map(component, css, options = {}) {
19118
19118
  return build_style_class_map(
@@ -19327,7 +19327,7 @@ function get_standalone_class_selector(complex_selector) {
19327
19327
  return selector.type === "ClassSelector" ? selector : null;
19328
19328
  }
19329
19329
 
19330
- // ../../node_modules/.pnpm/@tsrx+core@0.1.67/node_modules/@tsrx/core/src/analyze/style-analyze.js
19330
+ // ../../node_modules/.pnpm/@tsrx+core@0.1.69/node_modules/@tsrx/core/src/analyze/style-analyze.js
19331
19331
  function nearest_scope(path, scopes) {
19332
19332
  for (let i2 = path.length - 1; i2 >= 0; i2 -= 1) {
19333
19333
  const scope = scopes.get(path[i2]);
@@ -19614,7 +19614,7 @@ function analyze_styles(ast, scopes, state) {
19614
19614
  return styles;
19615
19615
  }
19616
19616
 
19617
- // ../../node_modules/.pnpm/@tsrx+core@0.1.67/node_modules/@tsrx/core/src/analyze/index.js
19617
+ // ../../node_modules/.pnpm/@tsrx+core@0.1.69/node_modules/@tsrx/core/src/analyze/index.js
19618
19618
  function find_first_lazy_pattern(node) {
19619
19619
  if ((node.type === "ObjectPattern" || node.type === "ArrayPattern") && node.lazy) {
19620
19620
  return node;
@@ -19752,7 +19752,7 @@ function analyze_tsrx(ast, filename, options = {}) {
19752
19752
  return { ast, errors, comments, scope, scopes, styles };
19753
19753
  }
19754
19754
 
19755
- // ../../node_modules/.pnpm/@tsrx+core@0.1.67/node_modules/@tsrx/core/src/transform/imports.js
19755
+ // ../../node_modules/.pnpm/@tsrx+core@0.1.69/node_modules/@tsrx/core/src/transform/imports.js
19756
19756
  function with_deferred_imports(visitors3) {
19757
19757
  const print_import_declaration = visitors3.ImportDeclaration;
19758
19758
  const print_import_expression = visitors3.ImportExpression;
@@ -20229,7 +20229,7 @@ function print(node, visitors3, opts = {}) {
20229
20229
  };
20230
20230
  }
20231
20231
 
20232
- // ../../node_modules/.pnpm/@tsrx+core@0.1.67/node_modules/@tsrx/core/src/analyze/css-analyze.js
20232
+ // ../../node_modules/.pnpm/@tsrx+core@0.1.69/node_modules/@tsrx/core/src/analyze/css-analyze.js
20233
20233
  function is_global_block_selector(simple_selector) {
20234
20234
  return simple_selector.type === "PseudoClassSelector" && simple_selector.name === "global" && simple_selector.args === null;
20235
20235
  }
@@ -22420,7 +22420,7 @@ var tsx_default = (options) => ({
22420
22420
  }
22421
22421
  });
22422
22422
 
22423
- // ../../node_modules/.pnpm/@tsrx+core@0.1.67/node_modules/@tsrx/core/src/transform/jsx/helpers.js
22423
+ // ../../node_modules/.pnpm/@tsrx+core@0.1.69/node_modules/@tsrx/core/src/transform/jsx/helpers.js
22424
22424
  function in_jsx_child_context(path) {
22425
22425
  const parent = path[path.length - 1];
22426
22426
  return !!parent && (parent.type === "JSXElement" || parent.type === "JSXFragment");
@@ -22608,7 +22608,10 @@ var TOOLING_LOCATION_WRAPPED_NODE_TYPES = /* @__PURE__ */ new Set([
22608
22608
  "ExportNamedDeclaration",
22609
22609
  "ExportDefaultDeclaration",
22610
22610
  "ExportAllDeclaration",
22611
- "TSPropertySignature"
22611
+ "TSPropertySignature",
22612
+ // Whole defaults own diagnostics that can extend beyond the last mapped
22613
+ // token of a type assertion, such as `items = EMPTY_ARRAY as string[]`.
22614
+ "AssignmentPattern"
22612
22615
  ]);
22613
22616
  var LOCATION_WRAPPED_NODE_TYPES = /* @__PURE__ */ new Set([
22614
22617
  // JS nodes with boundary positions esrap still cannot map. Keyword
@@ -23649,7 +23652,7 @@ var MagicString = class _MagicString {
23649
23652
  }
23650
23653
  };
23651
23654
 
23652
- // ../../node_modules/.pnpm/@tsrx+core@0.1.67/node_modules/@tsrx/core/src/transform/stylesheet.js
23655
+ // ../../node_modules/.pnpm/@tsrx+core@0.1.69/node_modules/@tsrx/core/src/transform/stylesheet.js
23653
23656
  var regex_css_browser_prefix = /^-((webkit)|(moz)|(o)|(ms))-/;
23654
23657
  var regex_css_name_boundary = /^[\s,;}]$/;
23655
23658
  var is_keyframes_node = (node) => remove_css_prefix(node.name) === "keyframes";
@@ -24004,7 +24007,7 @@ function render_css_result(stylesheets, minify = false) {
24004
24007
  };
24005
24008
  }
24006
24009
 
24007
- // ../../node_modules/.pnpm/@tsrx+core@0.1.67/node_modules/@tsrx/core/src/transform/lazy.js
24010
+ // ../../node_modules/.pnpm/@tsrx+core@0.1.69/node_modules/@tsrx/core/src/transform/lazy.js
24008
24011
  function generate_lazy_id(context) {
24009
24012
  return `__lazy${context.lazy_next_id++}`;
24010
24013
  }
@@ -24878,7 +24881,7 @@ function replace_lazy_params(params) {
24878
24881
  });
24879
24882
  }
24880
24883
 
24881
- // ../../node_modules/.pnpm/@tsrx+core@0.1.67/node_modules/@tsrx/core/src/transform/await.js
24884
+ // ../../node_modules/.pnpm/@tsrx+core@0.1.69/node_modules/@tsrx/core/src/transform/await.js
24882
24885
  function find_first_top_level_await_in_tsrx_function_body(body_nodes) {
24883
24886
  for (const node of body_nodes) {
24884
24887
  const found = find_first_top_level_await(node, false);
@@ -24913,7 +24916,7 @@ function find_first_top_level_await(node, inside_nested_function) {
24913
24916
  return null;
24914
24917
  }
24915
24918
 
24916
- // ../../node_modules/.pnpm/@tsrx+core@0.1.67/node_modules/@tsrx/core/src/transform/scoping.js
24919
+ // ../../node_modules/.pnpm/@tsrx+core@0.1.69/node_modules/@tsrx/core/src/transform/scoping.js
24917
24920
  function prepare_stylesheet_for_render(stylesheet, mode = "scope") {
24918
24921
  const render_mode = mode === true ? "class-map" : mode === false ? "scope" : mode;
24919
24922
  const is_class_map = render_mode === "class-map";
@@ -25043,7 +25046,7 @@ function add_scope_classes(element, hashes, applied, class_attr_name = "class")
25043
25046
  };
25044
25047
  }
25045
25048
 
25046
- // ../../node_modules/.pnpm/@tsrx+core@0.1.67/node_modules/@tsrx/core/src/analyze/prune.js
25049
+ // ../../node_modules/.pnpm/@tsrx+core@0.1.69/node_modules/@tsrx/core/src/analyze/prune.js
25047
25050
  var regex_backslash_and_following_character2 = /\\(.)/g;
25048
25051
  var FORWARD = 0;
25049
25052
  var BACKWARD = 1;
@@ -25767,7 +25770,7 @@ function prune_css(css, element, styleClasses, topScopedClasses, regionHash = cs
25767
25770
  walk(css, null, visitors3);
25768
25771
  }
25769
25772
 
25770
- // ../../node_modules/.pnpm/@tsrx+core@0.1.67/node_modules/@tsrx/core/src/transform/jsx/style-scopes.js
25773
+ // ../../node_modules/.pnpm/@tsrx+core@0.1.69/node_modules/@tsrx/core/src/transform/jsx/style-scopes.js
25771
25774
  function prepare_style_scopes(program, ctx) {
25772
25775
  const state = {
25773
25776
  ctx,
@@ -26237,7 +26240,7 @@ function type_only_style(block2) {
26237
26240
  };
26238
26241
  }
26239
26242
 
26240
- // ../../node_modules/.pnpm/@tsrx+core@0.1.67/node_modules/@tsrx/core/src/transform/jsx-interleave.js
26243
+ // ../../node_modules/.pnpm/@tsrx+core@0.1.69/node_modules/@tsrx/core/src/transform/jsx-interleave.js
26241
26244
  function is_interleaved_body(body_nodes, is_jsx_child2) {
26242
26245
  let seen_jsx = false;
26243
26246
  for (const child of body_nodes) {
@@ -26264,7 +26267,7 @@ function capture_jsx_child(jsx, capture_index, anchor_id) {
26264
26267
  return { declaration: declaration2, reference };
26265
26268
  }
26266
26269
 
26267
- // ../../node_modules/.pnpm/@tsrx+core@0.1.67/node_modules/@tsrx/core/src/transform/jsx-hoist.js
26270
+ // ../../node_modules/.pnpm/@tsrx+core@0.1.69/node_modules/@tsrx/core/src/transform/jsx-hoist.js
26268
26271
  function is_static_literal(node) {
26269
26272
  return node.value === null || typeof node.value === "string" || typeof node.value === "number" || typeof node.value === "boolean" || typeof node.value === "bigint";
26270
26273
  }
@@ -26330,7 +26333,7 @@ function is_hoist_safe_jsx_node(node) {
26330
26333
  return node.openingElement.attributes.every(is_hoist_safe_jsx_attribute) && node.children.every(is_hoist_safe_jsx_child);
26331
26334
  }
26332
26335
 
26333
- // ../../node_modules/.pnpm/@tsrx+core@0.1.67/node_modules/@tsrx/core/src/transform/jsx/server-module.js
26336
+ // ../../node_modules/.pnpm/@tsrx+core@0.1.69/node_modules/@tsrx/core/src/transform/jsx/server-module.js
26334
26337
  var HOISTED_IMPORT_PREFIX = "__tsrx_server_import$";
26335
26338
  var WALK_SKIP_KEYS = /* @__PURE__ */ new Set([
26336
26339
  "loc",
@@ -26594,7 +26597,7 @@ function lower_server_module_for_types(ast, server_module) {
26594
26597
  ) };
26595
26598
  }
26596
26599
 
26597
- // ../../node_modules/.pnpm/@tsrx+core@0.1.67/node_modules/@tsrx/core/src/transform/jsx/index.js
26600
+ // ../../node_modules/.pnpm/@tsrx+core@0.1.69/node_modules/@tsrx/core/src/transform/jsx/index.js
26598
26601
  var TEMPLATE_FRAGMENT_ERROR = "JSX fragment syntax is not needed in TSRX templates. TSRX renders in immediate mode, so everything is already a fragment. Use `<>...</>` only in expression position.";
26599
26602
  var TSRX_FOR_RETURN_ERROR = "Return statements are not allowed inside TSRX template for...of loops. Filter the iterable before rendering or use an @empty fallback for empty lists.";
26600
26603
  var TSRX_FOR_BREAK_ERROR = "Break statements are not allowed inside TSRX template for...of loops.";
@@ -30235,7 +30238,7 @@ function build_return_expression(render_nodes, in_jsx_child = false, type_only =
30235
30238
  );
30236
30239
  }
30237
30240
 
30238
- // ../../node_modules/.pnpm/@tsrx+core@0.1.67/node_modules/@tsrx/core/src/source-map-utils.js
30241
+ // ../../node_modules/.pnpm/@tsrx+core@0.1.69/node_modules/@tsrx/core/src/source-map-utils.js
30239
30242
  var mapping_data = {
30240
30243
  verification: true,
30241
30244
  completion: true,
@@ -30423,7 +30426,7 @@ function get_mapping_from_node(node, src_to_gen_map, gen_line_offsets, filtered_
30423
30426
  return mapping;
30424
30427
  }
30425
30428
 
30426
- // ../../node_modules/.pnpm/@tsrx+core@0.1.67/node_modules/@tsrx/core/src/transform/segments.js
30429
+ // ../../node_modules/.pnpm/@tsrx+core@0.1.69/node_modules/@tsrx/core/src/transform/segments.js
30427
30430
  var LAZY_PARAM_IDENTIFIER_REGEX = /^__lazy\d+$/;
30428
30431
  var RETURN_KEYWORD = "return";
30429
30432
  var EXPORT_KEYWORD = "export";
@@ -32496,6 +32499,146 @@ function dedupe_mappings(mappings) {
32496
32499
  return mappings;
32497
32500
  }
32498
32501
 
32502
+ // src/compiler/parser-output.js
32503
+ function isolateOutputOptions(options, captureErrors = false) {
32504
+ if (!captureErrors && !Array.isArray(options?.errors) && !Array.isArray(options?.comments)) {
32505
+ return options;
32506
+ }
32507
+ const original = options ?? {};
32508
+ const descriptors = Object.getOwnPropertyDescriptors(original);
32509
+ if (captureErrors || Array.isArray(options?.errors)) {
32510
+ descriptors.errors = { value: [], enumerable: true, writable: true, configurable: true };
32511
+ }
32512
+ if (Array.isArray(options?.comments)) {
32513
+ descriptors.comments = { value: [], enumerable: true, writable: true, configurable: true };
32514
+ }
32515
+ return Object.create(Object.getPrototypeOf(original), descriptors);
32516
+ }
32517
+ function publishOutput(options, selected) {
32518
+ if (selected === options) return;
32519
+ if (Array.isArray(options?.errors)) {
32520
+ for (const error2 of selected?.errors ?? []) options.errors.push(error2);
32521
+ }
32522
+ if (Array.isArray(options?.comments)) {
32523
+ for (const comment of selected?.comments ?? []) options.comments.push(comment);
32524
+ }
32525
+ }
32526
+
32527
+ // src/compiler/parser.browser.js
32528
+ var TypeScriptParser = acorn_exports.Parser.extend(
32529
+ tsPlugin({ jsx: true }),
32530
+ (Base) => class extends Base {
32531
+ tsParseDeclaration(node, value, next) {
32532
+ if (value === "module") throw new SyntaxError("TSRX module requires the TSRX parser");
32533
+ const declaration2 = super.tsParseDeclaration(node, value, next);
32534
+ if (value === "namespace") {
32535
+ for (let current2 = declaration2; current2?.type === "TSModuleDeclaration"; current2 = current2.body) {
32536
+ current2.kind = "namespace";
32537
+ current2.metadata = { path: [], module_keyword: "namespace" };
32538
+ }
32539
+ }
32540
+ return declaration2;
32541
+ }
32542
+ finishNode(node, type) {
32543
+ const finished = super.finishNode(node, type);
32544
+ if (type === "TSModuleDeclaration" && finished.global) {
32545
+ finished.kind = "global";
32546
+ delete finished.global;
32547
+ }
32548
+ return finished;
32549
+ }
32550
+ tsParseInterfaceBody() {
32551
+ const previous = this.inType;
32552
+ let members;
32553
+ this.inType = true;
32554
+ try {
32555
+ this.expect(acorn_exports.tokTypes.braceL);
32556
+ members = this.tsParseList("TypeMembers", this.tsParseTypeMember.bind(this));
32557
+ } finally {
32558
+ this.inType = previous;
32559
+ }
32560
+ this.expect(acorn_exports.tokTypes.braceR);
32561
+ return members;
32562
+ }
32563
+ }
32564
+ );
32565
+ function supportsTypeScriptRetry(program) {
32566
+ let genericSyntax = false;
32567
+ let tsrxSyntax = false;
32568
+ function visit(node, jsxType = false) {
32569
+ if (!node || typeof node !== "object") return;
32570
+ if (Array.isArray(node)) {
32571
+ for (const child of node) visit(child, jsxType);
32572
+ return;
32573
+ }
32574
+ if (node.type === "TSCallSignatureDeclaration" && node.typeParameters) genericSyntax = true;
32575
+ if (jsxType && node.type === "TSQualifiedName") genericSyntax = true;
32576
+ if (node.type === "JSXElement" && !node.openingElement.selfClosing && ["style", "script"].includes(node.openingElement.name.name))
32577
+ tsrxSyntax = true;
32578
+ if (node.type === "JSXText" && node.value.includes("@")) tsrxSyntax = true;
32579
+ for (const [key2, child] of Object.entries(node)) {
32580
+ if (key2 === "loc" || key2 === "metadata" || key2.endsWith("Comments")) continue;
32581
+ visit(
32582
+ child,
32583
+ jsxType || node.type === "JSXOpeningElement" && (key2 === "typeParameters" || key2 === "typeArguments")
32584
+ );
32585
+ }
32586
+ }
32587
+ visit(program);
32588
+ return genericSyntax && !tsrxSyntax;
32589
+ }
32590
+ function parseTypeScript(source, options) {
32591
+ const comments = [];
32592
+ const { onComment, add_comments } = get_comment_handlers(source, comments);
32593
+ const keywordTokens = options?.keywordTokens ? [] : null;
32594
+ const program = TypeScriptParser.parse(source, {
32595
+ sourceType: "module",
32596
+ ecmaVersion: "latest",
32597
+ locations: true,
32598
+ preserveParens: !!options?.preserveParens,
32599
+ onComment,
32600
+ onToken: keywordTokens === null ? void 0 : (token) => {
32601
+ const keyword = token.type.keyword === "function" ? "function" : token.type.label === "name" && token.value === "async" ? "async" : null;
32602
+ if (keyword !== null)
32603
+ keywordTokens.push({
32604
+ value: keyword,
32605
+ start: token.start,
32606
+ end: token.end,
32607
+ loc: token.loc
32608
+ });
32609
+ }
32610
+ });
32611
+ if (!supportsTypeScriptRetry(program))
32612
+ throw new SyntaxError("Unsupported TSRX compatibility retry");
32613
+ add_comments(program);
32614
+ if (keywordTokens !== null) program.tsrx_keyword_tokens = keywordTokens;
32615
+ if (options?.comments) options.comments.push(...comments);
32616
+ return program;
32617
+ }
32618
+ function parseModule(source, filename, options) {
32619
+ const primary = isolateOutputOptions(options);
32620
+ let program;
32621
+ try {
32622
+ program = parse_module(source, filename, primary);
32623
+ } catch (error2) {
32624
+ if (!(error2 instanceof SyntaxError)) {
32625
+ publishOutput(options, primary);
32626
+ throw error2;
32627
+ }
32628
+ const alternative = isolateOutputOptions(options, true);
32629
+ try {
32630
+ program = parseTypeScript(source, alternative);
32631
+ } catch (alternativeError) {
32632
+ publishOutput(options, primary);
32633
+ throw alternativeError instanceof SyntaxError ? error2 : alternativeError;
32634
+ }
32635
+ publishOutput(options, alternative);
32636
+ return program;
32637
+ }
32638
+ publishOutput(options, primary);
32639
+ return program;
32640
+ }
32641
+
32499
32642
  // src/compiler/volar.js
32500
32643
  import { buildFatSegments, decodeSourceMappings } from "./fat-segments.js";
32501
32644
  import { analyzeNativeChangeDiagnostics } from "./native-change-diagnostics.js";
@@ -32597,7 +32740,7 @@ function markNativeTemplateBodies(root) {
32597
32740
  function compileToVolarMappings(source, filename, options) {
32598
32741
  const errors = [];
32599
32742
  const comments = [];
32600
- const ast = parse_module(source, filename, {
32743
+ const ast = parseModule(source, filename, {
32601
32744
  collect: true,
32602
32745
  loose: !!options?.loose,
32603
32746
  preserveParens: true,
@@ -32764,7 +32907,7 @@ function collectDirectiveOrigins(ast, source) {
32764
32907
  function compileTypesInspection(source, filename, options) {
32765
32908
  const errors = [];
32766
32909
  const comments = [];
32767
- const ast = parse_module(source, filename, {
32910
+ const ast = parseModule(source, filename, {
32768
32911
  collect: true,
32769
32912
  loose: true,
32770
32913
  preserveParens: true,
@@ -51,6 +51,9 @@ export declare const HYDRATION_TEXT_SEP = " ";
51
51
  * re-suspending. Shared so server emit and client read stay byte-identical.
52
52
  */
53
53
  export declare const SUSPENSE_SCRIPT_ATTR = "data-octane-suspense";
54
+ export declare const SUSPENSE_RESOLVED_COMMENT = "oct-suspense:";
55
+ export declare const SUSPENSE_RESOLVED_SEED_ATTR = "data-octane-suspense-seeds";
56
+ export declare const SUSPENSE_RESOLVED_NATIVE_ATTR = "data-octane-suspense-signals";
54
57
  /**
55
58
  * Legacy undefined-sentinel key retained for consumers of `octane/constants`.
56
59
  * New seed payloads use the collision-free escaped-string protocol below.
package/dist/constants.js CHANGED
@@ -9,6 +9,9 @@ const FOR_BLOCK_OPEN_ITEMS = `<!--${HYDRATION_FOR_ITEMS}-->`;
9
9
  const EMPTY_COMMENT = "<!---->";
10
10
  const HYDRATION_TEXT_SEP = " ";
11
11
  const SUSPENSE_SCRIPT_ATTR = "data-octane-suspense";
12
+ const SUSPENSE_RESOLVED_COMMENT = "oct-suspense:";
13
+ const SUSPENSE_RESOLVED_SEED_ATTR = "data-octane-suspense-seeds";
14
+ const SUSPENSE_RESOLVED_NATIVE_ATTR = "data-octane-suspense-signals";
12
15
  const UNDEFINED_SENTINEL_KEY = "__octane_new_undefined__";
13
16
  const SUSPENSE_SEED_WIRE_PREFIX = "\0octane:ssr-seed:";
14
17
  const REJECTION_SENTINEL_KEY = "__octane_new_rejection__";
@@ -83,6 +86,9 @@ export {
83
86
  STREAM_SEED_ATTR,
84
87
  STREAM_SEED_COMMENT,
85
88
  STREAM_SEGMENT_ATTR,
89
+ SUSPENSE_RESOLVED_COMMENT,
90
+ SUSPENSE_RESOLVED_NATIVE_ATTR,
91
+ SUSPENSE_RESOLVED_SEED_ATTR,
86
92
  SUSPENSE_SCRIPT_ATTR,
87
93
  SUSPENSE_SEED_WIRE_PREFIX,
88
94
  SVG_ONLY_TAGS,
@@ -40,6 +40,7 @@ type ClientErrorArguments = {
40
40
  61: [];
41
41
  62: [];
42
42
  63: [];
43
+ 64: [];
43
44
  };
44
45
  export declare function formatClientError<Code extends keyof ClientErrorArguments>(code: Code, ...args: ClientErrorArguments[Code]): string;
45
46
  export {};
@@ -190,6 +190,8 @@ function formatClientError(code, ...args) {
190
190
  "Target container is not a DOM element. Pass an Element, Document, or DocumentFragment. If document.body is null after document hydration, update the existing document root or render a document shell containing <body>.",
191
191
  args
192
192
  );
193
+ case 64:
194
+ return formatDevErrorMessage("Multiple errors were thrown during act.", args);
193
195
  default:
194
196
  return formatUnknownDevErrorMessage(code);
195
197
  }
@@ -15,6 +15,7 @@ const KNOWN_CAMELCASE_PROPERTIES = /* @__PURE__ */ new Set([
15
15
  "disablePictureInPicture",
16
16
  "disableRemotePlayback",
17
17
  "encType",
18
+ "enterKeyHint",
18
19
  "fetchPriority",
19
20
  "formAction",
20
21
  "formEncType",
@@ -30,6 +31,7 @@ const KNOWN_CAMELCASE_PROPERTIES = /* @__PURE__ */ new Set([
30
31
  "itemScope",
31
32
  "itemType",
32
33
  "maxLength",
34
+ "minLength",
33
35
  "noModule",
34
36
  "noValidate",
35
37
  "playsInline",
package/dist/index.d.ts CHANGED
@@ -5,7 +5,7 @@ export { initializeHydrationEventCapture } from './hydration/event-capture.js';
5
5
  export { attachBehaviorRoot } from './behavior-root.js';
6
6
  export type * from './behavior-root.js';
7
7
  export { createSubSlot, subSlot, type SubSlot, type SlotlessSubSlot, type SubSlotOptions, } from './sub-slot.js';
8
- export { createRoot, hydrateRoot, flushSync, act, type Root, type RootContainer, type RootOptions, useState, useLinkedState, type LinkedStatePrevious, type LinkedStateOptions, useReducer, useEffect, useLayoutEffect, useInsertionEffect, useMemo, useCallback, useRef, useId, useImperativeHandle, useEffectEvent, useSyncExternalStore, useDeferredValue, useTransition, useActionState, useActionState as useFormState, useFormStatus, useOptimistic, useDebugValue, type FormStatus, startTransition, requestFormReset, memo, lazy, preload, preinit, preloadModule, preinitModule, preconnect, prefetchDNS, createContext, use, useContext, type Context, type ForeignHostContext, Suspense, ErrorBoundary, Hydrate, Activity, Activity as unstable_Activity, ViewTransition, addTransitionType, ViewTransition as unstable_ViewTransition, addTransitionType as unstable_addTransitionType, ViewTransitionPseudoElement, type ViewTransitionProps, type ViewTransitionInstance, Fragment, createPortal, type PortalDescriptor, createElement, cloneElement, isValidElement, isChildrenBlock, descriptorChildren, Children, type ElementDescriptor, type ComponentBody, type OctaneNode, TsrxErrorBoundary, __useStateWithGetter, __useLinkedStateWithGetter, __useReducerWithGetter, __createVoidRoot, bindRendererRegionOwner, EXTERNAL_HYDRATION_PROMISE, HYDRATION_RANGE_BOUNDARY, createHostContextRequest, __vtSeen, template, clone, drainFrag, bag0, bag1, bag2, bag3, bag4, bag5, bag6, bag7, bag8, bag9, bag10, bag11, bag12, bag13, bag14, bag15, bag16, bagOf, evt0, evt0u, evt1, evt1u, evt2, evt2u, evtN, evtNu, setEventHandler, devEventListener, devHtmlNesting, htext, htextSwap, child, sibling, setText, setScriptText, setHTML, setDangerouslySetInnerHTML, setDangerouslySetInnerHTMLSources, markDangerouslySetInnerHTMLChildren, setAttribute, setStringData, setBooleanAttribute, setAriaAttribute, setClassName, setClassAttr, normalizeClass, setStyle, setStyleProperty, setSpread, snapshotSpread, setHostPropSources, queueNativeChangeDiagnostic, queueFormAuthoringDiagnostic, markNativeChangeDiagnosticStatic, setFormAction, setValue, setFormControlSources, setChecked, setCheckedCheckable, setSelectValue, setDefaultValue, setDefaultValueUncontrolled, setDefaultChecked, setAutoFocus, attachRef, queueRefAttach, queueRefDetach, replaceRef, queueOwnRefDetach, injectStyle, headBlock, stylesheetResource, styleResource, scriptResource, namespaceHead, namespaceHeadElement, delegateEvents, delegateCaptureEvents, fastForBlock, fastKeyedForBlock, fastMapSlot, forBlock, keyedForBlock, mapSlot, ifBlock, errorBlock, tryBlock, switchBlock, activityBlock, componentSlot, componentSlotVoid, componentSlotLite, compilerCacheArray, compilerCacheImmutableArrayFilter, compilerCacheMappedArray, compilerCacheContext, compilerOwnsContextProvider, markSingleRoot, markWarm, markSingleRoot as __s, markChildrenBlock, createScopedValue, createScopedElement, childSlot, positionalChildren, textSlot, textHole, childTextHole, hostComponent, renderBlock, portal, hookSlots, withSlot, manualHook, invokeManualHook, useBatch, seedOrCreate, warmMemo, warmChild, puMiss, puTake0, puTake1, puTake2, puTake3, puTake4, puPub, provideContext, mountFragmentRef, FragmentInstance, hmr, HMR, hasPendingWork, type Scope, type Block, drainPassiveEffects, setIsOctaneActEnvironment, resetFloatResourceState, setTransitionFallbackTimeout, getTransitionFallbackTimeout, } from './runtime.js';
8
+ export { createRoot, hydrateRoot, flushSync, act, isInActScope, type Root, type RootContainer, type RootOptions, useState, useLinkedState, type LinkedStatePrevious, type LinkedStateOptions, useReducer, useEffect, useLayoutEffect, useInsertionEffect, useMemo, useCallback, useRef, useId, useImperativeHandle, useEffectEvent, useSyncExternalStore, useDeferredValue, useTransition, useActionState, useActionState as useFormState, useFormStatus, useOptimistic, useDebugValue, type FormStatus, startTransition, requestFormReset, memo, lazy, preload, preinit, preloadModule, preinitModule, preconnect, prefetchDNS, createContext, use, useContext, type Context, type ForeignHostContext, Suspense, ErrorBoundary, Hydrate, Activity, Activity as unstable_Activity, ViewTransition, addTransitionType, ViewTransition as unstable_ViewTransition, addTransitionType as unstable_addTransitionType, ViewTransitionPseudoElement, type ViewTransitionProps, type ViewTransitionInstance, Fragment, createPortal, type PortalDescriptor, createElement, cloneElement, isValidElement, isChildrenBlock, descriptorChildren, Children, type ElementDescriptor, type ComponentBody, type OctaneNode, TsrxErrorBoundary, __useStateWithGetter, __useLinkedStateWithGetter, __useReducerWithGetter, __createVoidRoot, bindRendererRegionOwner, EXTERNAL_HYDRATION_PROMISE, HYDRATION_RANGE_BOUNDARY, createHostContextRequest, __vtSeen, template, clone, drainFrag, bag0, bag1, bag2, bag3, bag4, bag5, bag6, bag7, bag8, bag9, bag10, bag11, bag12, bag13, bag14, bag15, bag16, bagOf, evt0, evt0u, evt1, evt1u, evt2, evt2u, evtN, evtNu, setEventHandler, devEventListener, devHtmlNesting, htext, htextSwap, child, sibling, setText, setScriptText, setHTML, setDangerouslySetInnerHTML, setDangerouslySetInnerHTMLSources, markDangerouslySetInnerHTMLChildren, setAttribute, setStringData, setBooleanAttribute, setAriaAttribute, setClassName, setClassAttr, normalizeClass, setStyle, setStyleProperty, setSpread, snapshotSpread, setHostPropSources, queueNativeChangeDiagnostic, queueFormAuthoringDiagnostic, markNativeChangeDiagnosticStatic, setFormAction, setValue, setFormControlSources, setChecked, setCheckedCheckable, setSelectValue, setDefaultValue, setDefaultValueUncontrolled, setDefaultChecked, setAutoFocus, attachRef, queueRefAttach, queueRefDetach, replaceRef, queueOwnRefDetach, injectStyle, headBlock, stylesheetResource, styleResource, scriptResource, namespaceHead, namespaceHeadElement, delegateEvents, delegateCaptureEvents, fastForBlock, fastKeyedForBlock, fastMapSlot, forBlock, keyedForBlock, mapSlot, ifBlock, errorBlock, tryBlock, switchBlock, activityBlock, componentSlot, componentSlotVoid, componentSlotLite, compilerCacheArray, compilerCacheImmutableArrayFilter, compilerCacheMappedArray, compilerCacheContext, compilerOwnsContextProvider, markSingleRoot, markWarm, markSingleRoot as __s, markChildrenBlock, createScopedValue, createScopedElement, childSlot, positionalChildren, textSlot, textHole, childTextHole, hostComponent, renderBlock, portal, hookSlots, withSlot, manualHook, invokeManualHook, useBatch, seedOrCreate, warmMemo, warmChild, puMiss, puTake0, puTake1, puTake2, puTake3, puTake4, puPub, provideContext, mountFragmentRef, FragmentInstance, hmr, HMR, hasPendingWork, type Scope, type Block, drainPassiveEffects, setIsOctaneActEnvironment, resetFloatResourceState, setTransitionFallbackTimeout, getTransitionFallbackTimeout, } from './runtime.js';
9
9
  export type { HydrateOptions, HydrateProps, HydrateWhen, HydrationInteractionEvent, HydrationInteractionEvents, HydrationPrefetchContext, HydrationPrefetchFunction, HydrationPrefetchStrategy, HydrationPrefetchWaitReason, HydrationStrategy, HydrationWhen, } from './hydration/types.js';
10
10
  export { __serverRpc } from './server-rpc-client.js';
11
11
  export { __methodDep } from './method-dep.js';
package/dist/index.js CHANGED
@@ -11,6 +11,7 @@ import {
11
11
  hydrateRoot,
12
12
  flushSync,
13
13
  act,
14
+ isInActScope,
14
15
  useState,
15
16
  useLinkedState,
16
17
  useReducer,
@@ -318,6 +319,7 @@ export {
318
319
  injectStyle,
319
320
  invokeManualHook,
320
321
  isChildrenBlock,
322
+ isInActScope,
321
323
  isValidElement,
322
324
  keyedForBlock,
323
325
  lazy,