octane 0.4.2 → 0.4.3

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 (57) hide show
  1. package/dist/cjs/context-identity.cjs +29 -0
  2. package/dist/cjs/dom-stage.cjs +24 -18
  3. package/dist/cjs/error-codes.server.generated.cjs +5 -0
  4. package/dist/cjs/hydration-markers.cjs +12 -0
  5. package/dist/cjs/index.cjs +2 -0
  6. package/dist/cjs/runtime.cjs +253 -393
  7. package/dist/cjs/runtime.server.cjs +137 -35
  8. package/dist/cjs/server/index.cjs +2 -0
  9. package/dist/cjs/server/streamed-signals.cjs +41 -9
  10. package/dist/cjs/signals/client.cjs +1 -6
  11. package/dist/cjs/signals/engine.cjs +1 -12
  12. package/dist/cjs/version.cjs +1 -1
  13. package/dist/compiler/client-only-server.js +1 -28
  14. package/dist/compiler/compile-renderer-boundaries.js +1 -22
  15. package/dist/compiler/compile-universal.js +1 -22
  16. package/dist/compiler/compile.js +782 -359
  17. package/dist/compiler/dom-binding-fixed-props.js +11 -1
  18. package/dist/compiler/generated-origin.js +46 -0
  19. package/dist/compiler/hydrate-boundaries.js +88 -52
  20. package/dist/compiler/plain-hook-memo.js +5 -1
  21. package/dist/compiler/pure-factories.js +66 -0
  22. package/dist/compiler/register.js +4 -1
  23. package/dist/compiler/slot-hooks.js +113 -186
  24. package/dist/compiler/typescript-lowering.js +763 -0
  25. package/dist/compiler/void-roots.js +239 -0
  26. package/dist/compiler/volar.js +91 -38
  27. package/dist/context-identity.d.ts +14 -0
  28. package/dist/context-identity.js +28 -0
  29. package/dist/dom-stage.js +24 -18
  30. package/dist/error-codes.server.generated.d.ts +1 -0
  31. package/dist/error-codes.server.generated.js +5 -0
  32. package/dist/hydration/idle.js +1 -0
  33. package/dist/hydration/independent-island.js +53 -2
  34. package/dist/hydration/media.js +1 -0
  35. package/dist/hydration/types.d.ts +5 -0
  36. package/dist/hydration/visible.js +1 -0
  37. package/dist/hydration-markers.d.ts +8 -0
  38. package/dist/hydration-markers.js +8 -0
  39. package/dist/index.d.ts +1 -1
  40. package/dist/index.js +2 -0
  41. package/dist/runtime.d.ts +25 -40
  42. package/dist/runtime.js +254 -398
  43. package/dist/runtime.server.d.ts +23 -2
  44. package/dist/runtime.server.js +142 -36
  45. package/dist/server/index.d.ts +1 -1
  46. package/dist/server/index.js +2 -0
  47. package/dist/server/streamed-signals.js +41 -9
  48. package/dist/signals/client.js +3 -8
  49. package/dist/signals/engine.d.ts +0 -2
  50. package/dist/signals/engine.js +1 -13
  51. package/dist/universal-core.js +1 -1
  52. package/dist/version.js +1 -1
  53. package/package.json +1 -1
  54. package/dist/cjs/signals/diagnostic-local-hook.cjs +0 -37
  55. package/dist/compiler/local-void-roots.js +0 -154
  56. package/dist/signals/diagnostic-local-hook.d.ts +0 -8
  57. package/dist/signals/diagnostic-local-hook.js +0 -12
@@ -0,0 +1,239 @@
1
+ import {
2
+ createLexicalAnalysis,
3
+ forEachRuntimeAstChild,
4
+ isIdentifierReference,
5
+ } from './compile-universal.js';
6
+
7
+ /** Public root factory → compiler-only root that skips returned-value reconciliation. */
8
+ export const VOID_ROOT_HELPERS = {
9
+ createRoot: '__createVoidRoot',
10
+ hydrateRoot: '__hydrateVoidRoot',
11
+ };
12
+
13
+ /** Local names of value imports of `createRoot`/`hydrateRoot` from `octane`. */
14
+ export function findRootFactoryImports(ast) {
15
+ const imports = new Map();
16
+ for (const statement of ast.body || []) {
17
+ if (
18
+ statement.type !== 'ImportDeclaration' ||
19
+ statement.source?.value !== 'octane' ||
20
+ statement.importKind === 'type'
21
+ )
22
+ continue;
23
+ for (const specifier of statement.specifiers || []) {
24
+ if (specifier.type !== 'ImportSpecifier' || specifier.importKind === 'type') continue;
25
+ const imported = specifier.imported?.name ?? specifier.imported?.value;
26
+ if (Object.hasOwn(VOID_ROOT_HELPERS, imported) && specifier.local?.name)
27
+ imports.set(specifier.local.name, imported);
28
+ }
29
+ }
30
+ return imports;
31
+ }
32
+
33
+ const isFunction = (node) =>
34
+ node.type === 'FunctionDeclaration' ||
35
+ node.type === 'FunctionExpression' ||
36
+ node.type === 'ArrowFunctionExpression';
37
+
38
+ const directCall = (member, call) =>
39
+ member?.type === 'MemberExpression' &&
40
+ member.computed !== true &&
41
+ member.optional !== true &&
42
+ member.property?.type === 'Identifier' &&
43
+ call?.type === 'CallExpression' &&
44
+ call.callee === member &&
45
+ call.optional !== true;
46
+
47
+ /**
48
+ * Prove every root whose complete lifetime renders only statically known
49
+ * component bodies. This pass only reads ASTs; callers own the rewrite.
50
+ *
51
+ * A root is one exact `createRoot(...)`/`hydrateRoot(...)` call of the module's
52
+ * own octane import, in one of three shapes:
53
+ * - `const root = factory(...)` in a function body, or at module scope when the
54
+ * declaration is not exported, where every reference is a direct
55
+ * `root.render(...)`/`root.unmount()` call in the declaring scope;
56
+ * - `factory(...).render(...)`, whose root value never reaches a binding; or
57
+ * - a discarded `hydrateRoot(...)` expression statement.
58
+ * Each render target, and hydration's initial target, must be a module-scope
59
+ * binding `component(name)` accepts: a bare identifier with optional props, or
60
+ * a sole JSX element with that tag, which the root unwraps to the same body.
61
+ * `with` makes every lexical proof unsound; unbound direct `eval` can reach
62
+ * every named root.
63
+ *
64
+ * Returns `{ callee, helper, components, elements }` per proven root, where
65
+ * `components` holds the `component(name)` value of each target and `elements`
66
+ * locates each JSX target as `{ call, index }` (its argument position).
67
+ */
68
+ export function proveVoidRoots(ast, { factories, component, skip }) {
69
+ if (factories.size === 0) return [];
70
+ const analysis = createLexicalAnalysis(ast);
71
+ const moduleScoped = (node) =>
72
+ analysis.resolveBinding(analysis.nodeScopes.get(node), node.name)?.scope === analysis.rootScope;
73
+ const exportedDeclarations = new Set();
74
+ for (const statement of ast.body || [])
75
+ if (statement.type === 'ExportNamedDeclaration' && statement.declaration)
76
+ exportedDeclarations.add(statement.declaration);
77
+ const target = (node, jsx) => {
78
+ let name = node;
79
+ if (jsx && node?.type === 'JSXElement') {
80
+ name = node.openingElement?.name;
81
+ // A lowercase tag is intrinsic whatever binding shares its name.
82
+ if (name?.type !== 'JSXIdentifier' || /^[a-z]/.test(name.name)) return undefined;
83
+ } else if (node?.type !== 'Identifier') return undefined;
84
+ const value = component(name.name);
85
+ return value !== undefined && moduleScoped(name) ? value : undefined;
86
+ };
87
+ // A root method call either proves one more render target or leaves the root
88
+ // generic. `unmount()` never changes the component-return contract.
89
+ const classify = (root, member, call) => {
90
+ if (!directCall(member, call)) return false;
91
+ const name = member.property.name;
92
+ const args = call.arguments;
93
+ if (name === 'unmount') return args.length === 0;
94
+ if (name !== 'render' || args.some((argument) => argument.type === 'SpreadElement'))
95
+ return false;
96
+ const value =
97
+ args.length === 1
98
+ ? target(args[0], true)
99
+ : args.length === 2
100
+ ? target(args[0], false)
101
+ : undefined;
102
+ if (value === undefined) return false;
103
+ root.components.push(value);
104
+ if (args[0].type === 'JSXElement') root.elements.push({ call, index: 0 });
105
+ return true;
106
+ };
107
+ const functionScopes = new Set();
108
+ const roots = [];
109
+ const declared = new Map();
110
+ let opaque = false;
111
+ let directEval = false;
112
+ const discover = (node, parent, key, grandparent, skipped) => {
113
+ if (node === null || typeof node !== 'object') return;
114
+ if (skip?.(node)) skipped = true;
115
+ if (!skipped && isFunction(node)) {
116
+ const scope = analysis.nodeScopes.get(node.body)?.functionScope;
117
+ if (scope !== undefined) functionScopes.add(scope);
118
+ }
119
+ if (node.type === 'WithStatement') opaque = true;
120
+ else if (
121
+ node.type === 'Identifier' &&
122
+ node.name === 'eval' &&
123
+ isIdentifierReference(node, parent, key, analysis) &&
124
+ analysis.resolveBinding(analysis.nodeScopes.get(node), 'eval') === null
125
+ )
126
+ directEval = true;
127
+ if (
128
+ !skipped &&
129
+ node.type === 'CallExpression' &&
130
+ node.optional !== true &&
131
+ node.callee?.type === 'Identifier' &&
132
+ factories.has(node.callee.name) &&
133
+ moduleScoped(node.callee)
134
+ )
135
+ discoverRoot(node, parent, key, grandparent);
136
+ forEachRuntimeAstChild(node, (child, childKey) =>
137
+ discover(child, node, childKey, parent, skipped),
138
+ );
139
+ };
140
+ const discoverRoot = (call, parent, key, grandparent) => {
141
+ const factory = factories.get(call.callee.name);
142
+ const root = {
143
+ callee: call.callee,
144
+ helper: VOID_ROOT_HELPERS[factory],
145
+ components: [],
146
+ elements: [],
147
+ valid: true,
148
+ hydrated: factory === 'hydrateRoot',
149
+ };
150
+ if (root.hydrated) {
151
+ // Hydration renders immediately: its initial target satisfies the same
152
+ // proof as every later render. An element form carries options third.
153
+ const args = call.arguments;
154
+ const element = args[1]?.type === 'JSXElement';
155
+ const initial =
156
+ args.length >= 2 &&
157
+ args.length <= (element ? 3 : 4) &&
158
+ !args.some((argument) => argument.type === 'SpreadElement')
159
+ ? target(args[1], element)
160
+ : undefined;
161
+ if (initial === undefined) return;
162
+ root.components.push(initial);
163
+ if (element) root.elements.push({ call, index: 1 });
164
+ }
165
+ if (
166
+ parent?.type === 'VariableDeclarator' &&
167
+ key === 'init' &&
168
+ grandparent?.type === 'VariableDeclaration' &&
169
+ grandparent.kind === 'const' &&
170
+ parent.id?.type === 'Identifier'
171
+ ) {
172
+ const scope = analysis.resolveBinding(
173
+ analysis.nodeScopes.get(parent.id),
174
+ parent.id.name,
175
+ )?.scope;
176
+ if (scope === undefined) return;
177
+ // Namespaces and static blocks own function scopes too, but neither is a
178
+ // closed lifetime; an exported module root is reachable by importers.
179
+ if (
180
+ scope === analysis.rootScope
181
+ ? exportedDeclarations.has(grandparent)
182
+ : !functionScopes.has(scope.functionScope)
183
+ )
184
+ return;
185
+ root.scope = scope;
186
+ let names = declared.get(scope);
187
+ if (names === undefined) declared.set(scope, (names = new Map()));
188
+ names.set(parent.id.name, root);
189
+ roots.push(root);
190
+ } else if (parent?.type === 'MemberExpression' && key === 'object') {
191
+ // Nothing but this one call ever observes the chained root.
192
+ if (classify(root, parent, grandparent)) roots.push(root);
193
+ } else if (parent?.type === 'ExpressionStatement' && root.hydrated) {
194
+ roots.push(root);
195
+ }
196
+ };
197
+ discover(ast, null, null, null, false);
198
+ if (opaque || roots.length === 0) return [];
199
+ // Strict module code cannot let eval create bindings, but eval source can
200
+ // still reach any named root. A chained root has no name to reach.
201
+ if (directEval)
202
+ for (const names of declared.values()) for (const root of names.values()) root.valid = false;
203
+ else if (declared.size > 0) {
204
+ const inspect = (node, parent, key, grandparent) => {
205
+ if (node === null || typeof node !== 'object') return;
206
+ if (
207
+ (node.type === 'Identifier' || node.type === 'JSXIdentifier') &&
208
+ isIdentifierReference(node, parent, key, analysis)
209
+ ) {
210
+ const nodeScope = analysis.nodeScopes.get(node);
211
+ // Runtime traversal may see syntax the lexical analysis has not scoped.
212
+ // An unresolved possible root reference cannot certify a closed lifetime.
213
+ if (nodeScope === undefined) {
214
+ for (const names of declared.values()) {
215
+ const root = names.get(node.name);
216
+ if (root !== undefined) root.valid = false;
217
+ }
218
+ }
219
+ const scope = analysis.resolveBinding(nodeScope, node.name)?.scope;
220
+ const root = declared.get(scope)?.get(node.name);
221
+ if (
222
+ root !== undefined &&
223
+ !(
224
+ node.type === 'Identifier' &&
225
+ key === 'object' &&
226
+ nodeScope === root.scope &&
227
+ classify(root, parent, grandparent)
228
+ )
229
+ )
230
+ root.valid = false;
231
+ }
232
+ forEachRuntimeAstChild(node, (child, childKey) => inspect(child, node, childKey, parent));
233
+ };
234
+ inspect(ast, null, null, null);
235
+ }
236
+ return roots
237
+ .filter((root) => root.valid && (root.hydrated || root.components.length > 0))
238
+ .map(({ callee, helper, components, elements }) => ({ callee, helper, components, elements }));
239
+ }
@@ -11449,7 +11449,7 @@ function apply_mutations(node, mutations) {
11449
11449
  );
11450
11450
  }
11451
11451
 
11452
- // ../../node_modules/.pnpm/@tsrx+core@0.2.0/node_modules/@tsrx/core/src/utils/builders.js
11452
+ // ../../node_modules/.pnpm/@tsrx+core@0.2.0_patch_hash=bece1facf9a602609930622648fbbe9314bde79391f1e539dda6bb9f2df24300/node_modules/@tsrx/core/src/utils/builders.js
11453
11453
  var builders_exports = {};
11454
11454
  __export(builders_exports, {
11455
11455
  array: () => array,
@@ -11559,17 +11559,17 @@ __export(builders_exports, {
11559
11559
  void0: () => void0
11560
11560
  });
11561
11561
 
11562
- // ../../node_modules/.pnpm/@tsrx+core@0.2.0/node_modules/@tsrx/core/src/utils/patterns.js
11562
+ // ../../node_modules/.pnpm/@tsrx+core@0.2.0_patch_hash=bece1facf9a602609930622648fbbe9314bde79391f1e539dda6bb9f2df24300/node_modules/@tsrx/core/src/utils/patterns.js
11563
11563
  var regex_not_whitespace = /[^ \t\r\n]/;
11564
11564
  var regex_newline_characters = /\n/g;
11565
11565
  var regex_is_valid_identifier = /^[a-zA-Z_$][a-zA-Z_$0-9]*$/;
11566
11566
 
11567
- // ../../node_modules/.pnpm/@tsrx+core@0.2.0/node_modules/@tsrx/core/src/utils/sanitize_template_string.js
11567
+ // ../../node_modules/.pnpm/@tsrx+core@0.2.0_patch_hash=bece1facf9a602609930622648fbbe9314bde79391f1e539dda6bb9f2df24300/node_modules/@tsrx/core/src/utils/sanitize_template_string.js
11568
11568
  function sanitize_template_string(str) {
11569
11569
  return (str ?? "").replace(/(`|\${|\\)/g, "\\$1");
11570
11570
  }
11571
11571
 
11572
- // ../../node_modules/.pnpm/@tsrx+core@0.2.0/node_modules/@tsrx/core/src/utils/builders.js
11572
+ // ../../node_modules/.pnpm/@tsrx+core@0.2.0_patch_hash=bece1facf9a602609930622648fbbe9314bde79391f1e539dda6bb9f2df24300/node_modules/@tsrx/core/src/utils/builders.js
11573
11573
  function set_location(node, loc_info, is_deep_copy = false) {
11574
11574
  if (loc_info) {
11575
11575
  node.start = loc_info.start;
@@ -12378,7 +12378,7 @@ var continue_statement = {
12378
12378
  metadata: { path: [] }
12379
12379
  };
12380
12380
 
12381
- // ../../node_modules/.pnpm/@tsrx+core@0.2.0/node_modules/@tsrx/core/src/utils/ast.js
12381
+ // ../../node_modules/.pnpm/@tsrx+core@0.2.0_patch_hash=bece1facf9a602609930622648fbbe9314bde79391f1e539dda6bb9f2df24300/node_modules/@tsrx/core/src/utils/ast.js
12382
12382
  function is_ast_node(value) {
12383
12383
  return !!value && typeof value === "object" && "type" in value;
12384
12384
  }
@@ -12522,7 +12522,7 @@ function extract_identifiers(pattern) {
12522
12522
  return unwrap_pattern(pattern, []).filter((node) => node.type === "Identifier");
12523
12523
  }
12524
12524
 
12525
- // ../../node_modules/.pnpm/@tsrx+core@0.2.0/node_modules/@tsrx/core/src/parse/index.js
12525
+ // ../../node_modules/.pnpm/@tsrx+core@0.2.0_patch_hash=bece1facf9a602609930622648fbbe9314bde79391f1e539dda6bb9f2df24300/node_modules/@tsrx/core/src/parse/index.js
12526
12526
  var BINDING_TYPES = {
12527
12527
  BIND_NONE: 0,
12528
12528
  // Not a binding
@@ -13471,13 +13471,13 @@ var sha256 = /* @__PURE__ */ createHasher(
13471
13471
  /* @__PURE__ */ oidNist(1)
13472
13472
  );
13473
13473
 
13474
- // ../../node_modules/.pnpm/@tsrx+core@0.2.0/node_modules/@tsrx/core/src/utils/hashing.js
13474
+ // ../../node_modules/.pnpm/@tsrx+core@0.2.0_patch_hash=bece1facf9a602609930622648fbbe9314bde79391f1e539dda6bb9f2df24300/node_modules/@tsrx/core/src/utils/hashing.js
13475
13475
  var regex_return_characters = /\r/g;
13476
13476
  function strong_hash(str) {
13477
13477
  return bytesToHex(sha256(utf8ToBytes(str.replace(regex_return_characters, "")))).slice(0, 8);
13478
13478
  }
13479
13479
 
13480
- // ../../node_modules/.pnpm/@tsrx+core@0.2.0/node_modules/@tsrx/core/src/parse/style.js
13480
+ // ../../node_modules/.pnpm/@tsrx+core@0.2.0_patch_hash=bece1facf9a602609930622648fbbe9314bde79391f1e539dda6bb9f2df24300/node_modules/@tsrx/core/src/parse/style.js
13481
13481
  var REGEX_MATCHER = /^[~^$*|]?=/;
13482
13482
  var REGEX_ATTRIBUTE_FLAGS = /^[a-zA-Z]+/;
13483
13483
  var REGEX_COMMENT_CLOSE = /\*\//;
@@ -14044,7 +14044,7 @@ function read_identifier(parser) {
14044
14044
  return identifier;
14045
14045
  }
14046
14046
 
14047
- // ../../node_modules/.pnpm/@tsrx+core@0.2.0/node_modules/@tsrx/core/src/errors.js
14047
+ // ../../node_modules/.pnpm/@tsrx+core@0.2.0_patch_hash=bece1facf9a602609930622648fbbe9314bde79391f1e539dda6bb9f2df24300/node_modules/@tsrx/core/src/errors.js
14048
14048
  function error(message, filename, node, errors, comments, code) {
14049
14049
  if (errors && comments && is_error_suppressed(node, comments)) {
14050
14050
  return;
@@ -14094,7 +14094,7 @@ function is_error_suppressed(node, comments) {
14094
14094
  return false;
14095
14095
  }
14096
14096
 
14097
- // ../../node_modules/.pnpm/@tsrx+core@0.2.0/node_modules/@tsrx/core/src/diagnostics.js
14097
+ // ../../node_modules/.pnpm/@tsrx+core@0.2.0_patch_hash=bece1facf9a602609930622648fbbe9314bde79391f1e539dda6bb9f2df24300/node_modules/@tsrx/core/src/diagnostics.js
14098
14098
  var DIAGNOSTIC_CODES = {
14099
14099
  /** A recognized `import.meta.env.platform.*` flag is used without a selected platform. */
14100
14100
  PLATFORM_REQUIRED: "tsrx-platform-required",
@@ -14128,7 +14128,7 @@ var DIAGNOSTIC_CODES = {
14128
14128
  CSS_GLOBAL_PLACEMENT: "tsrx-css-global-placement"
14129
14129
  };
14130
14130
 
14131
- // ../../node_modules/.pnpm/@tsrx+core@0.2.0/node_modules/@tsrx/core/src/analyze/validation.js
14131
+ // ../../node_modules/.pnpm/@tsrx+core@0.2.0_patch_hash=bece1facf9a602609930622648fbbe9314bde79391f1e539dda6bb9f2df24300/node_modules/@tsrx/core/src/analyze/validation.js
14132
14132
  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.";
14133
14133
  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.";
14134
14134
  var TSRX_STYLE_APPLY_VALUE_ERROR = "The 'apply' attribute of a <style> block requires an expression value: apply={theme} or apply={[a, b]}.";
@@ -14198,7 +14198,7 @@ function validate_style(message, code, node, filename, errors, comments) {
14198
14198
  error(message, filename, node, errors, comments, code);
14199
14199
  }
14200
14200
 
14201
- // ../../node_modules/.pnpm/@tsrx+core@0.2.0/node_modules/@tsrx/core/src/plugin.js
14201
+ // ../../node_modules/.pnpm/@tsrx+core@0.2.0_patch_hash=bece1facf9a602609930622648fbbe9314bde79391f1e539dda6bb9f2df24300/node_modules/@tsrx/core/src/plugin.js
14202
14202
  var CharCode = Object.freeze({
14203
14203
  tab: 9,
14204
14204
  lineFeed: 10,
@@ -18453,13 +18453,13 @@ function TSRXPlugin(config) {
18453
18453
  };
18454
18454
  }
18455
18455
 
18456
- // ../../node_modules/.pnpm/@tsrx+core@0.2.0/node_modules/@tsrx/core/src/parse/parse-module.js
18456
+ // ../../node_modules/.pnpm/@tsrx+core@0.2.0_patch_hash=bece1facf9a602609930622648fbbe9314bde79391f1e539dda6bb9f2df24300/node_modules/@tsrx/core/src/parse/parse-module.js
18457
18457
  var parse4 = createParser(TSRXPlugin());
18458
18458
  function parse_module(source, filename, options) {
18459
18459
  return parse4(source, filename, options);
18460
18460
  }
18461
18461
 
18462
- // ../../node_modules/.pnpm/@tsrx+core@0.2.0/node_modules/@tsrx/core/src/utils/is-reference.js
18462
+ // ../../node_modules/.pnpm/@tsrx+core@0.2.0_patch_hash=bece1facf9a602609930622648fbbe9314bde79391f1e539dda6bb9f2df24300/node_modules/@tsrx/core/src/utils/is-reference.js
18463
18463
  function is_reference(node, parent) {
18464
18464
  if (node.type === "MemberExpression") {
18465
18465
  return !node.computed && is_reference(node.object, node);
@@ -18496,7 +18496,7 @@ function is_reference(node, parent) {
18496
18496
  }
18497
18497
  }
18498
18498
 
18499
- // ../../node_modules/.pnpm/@tsrx+core@0.2.0/node_modules/@tsrx/core/src/utils/dom.js
18499
+ // ../../node_modules/.pnpm/@tsrx+core@0.2.0_patch_hash=bece1facf9a602609930622648fbbe9314bde79391f1e539dda6bb9f2df24300/node_modules/@tsrx/core/src/utils/dom.js
18500
18500
  var RESERVED_WORDS = [
18501
18501
  "arguments",
18502
18502
  "await",
@@ -18599,12 +18599,12 @@ var DOM_PROPERTIES = [
18599
18599
  "disableRemotePlayback"
18600
18600
  ];
18601
18601
 
18602
- // ../../node_modules/.pnpm/@tsrx+core@0.2.0/node_modules/@tsrx/core/src/identifier-utils.js
18602
+ // ../../node_modules/.pnpm/@tsrx+core@0.2.0_patch_hash=bece1facf9a602609930622648fbbe9314bde79391f1e539dda6bb9f2df24300/node_modules/@tsrx/core/src/identifier-utils.js
18603
18603
  var IDENTIFIER_OBFUSCATION_PREFIX = "_$_";
18604
18604
  var SERVER_IDENTIFIER = IDENTIFIER_OBFUSCATION_PREFIX + "server_$_";
18605
18605
  var CSS_HASH_IDENTIFIER = IDENTIFIER_OBFUSCATION_PREFIX + "hash";
18606
18606
 
18607
- // ../../node_modules/.pnpm/@tsrx+core@0.2.0/node_modules/@tsrx/core/src/scope.js
18607
+ // ../../node_modules/.pnpm/@tsrx+core@0.2.0_patch_hash=bece1facf9a602609930622648fbbe9314bde79391f1e539dda6bb9f2df24300/node_modules/@tsrx/core/src/scope.js
18608
18608
  function create_scopes(ast, root, parent, error_options) {
18609
18609
  const scopes = /* @__PURE__ */ new Map();
18610
18610
  const scope = new Scope3(root, parent, false, error_options);
@@ -18985,7 +18985,7 @@ var ScopeRoot = class {
18985
18985
  }
18986
18986
  };
18987
18987
 
18988
- // ../../node_modules/.pnpm/@tsrx+core@0.2.0/node_modules/@tsrx/core/src/constants.js
18988
+ // ../../node_modules/.pnpm/@tsrx+core@0.2.0_patch_hash=bece1facf9a602609930622648fbbe9314bde79391f1e539dda6bb9f2df24300/node_modules/@tsrx/core/src/constants.js
18989
18989
  var TEMPLATE_USE_IMPORT_NODE = 1 << 1;
18990
18990
  var IS_CONTROLLED = 1 << 2;
18991
18991
  var IS_INDEXED = 1 << 3;
@@ -18997,7 +18997,7 @@ var HYDRATION_END = "]";
18997
18997
  var BLOCK_OPEN = `<!--${HYDRATION_START}-->`;
18998
18998
  var BLOCK_CLOSE = `<!--${HYDRATION_END}-->`;
18999
18999
 
19000
- // ../../node_modules/.pnpm/@tsrx+core@0.2.0/node_modules/@tsrx/core/src/comment-utils.js
19000
+ // ../../node_modules/.pnpm/@tsrx+core@0.2.0_patch_hash=bece1facf9a602609930622648fbbe9314bde79391f1e539dda6bb9f2df24300/node_modules/@tsrx/core/src/comment-utils.js
19001
19001
  function is_ts_pragma(comment) {
19002
19002
  if (comment.type !== "Line") return false;
19003
19003
  const pragmas = ["@ts-ignore", "@ts-expect-error", "@ts-nocheck", "@ts-check"];
@@ -19053,7 +19053,7 @@ function format_comment(comment) {
19053
19053
  }
19054
19054
  }
19055
19055
 
19056
- // ../../node_modules/.pnpm/@tsrx+core@0.2.0/node_modules/@tsrx/core/src/transform/jsx/ast-builders.js
19056
+ // ../../node_modules/.pnpm/@tsrx+core@0.2.0_patch_hash=bece1facf9a602609930622648fbbe9314bde79391f1e539dda6bb9f2df24300/node_modules/@tsrx/core/src/transform/jsx/ast-builders.js
19057
19057
  function set_loc(node, source_node) {
19058
19058
  node.metadata ??= { path: [] };
19059
19059
  if (has_location(source_node)) {
@@ -19256,7 +19256,7 @@ function clone_ast_node(node, with_locations = true) {
19256
19256
  return clone;
19257
19257
  }
19258
19258
 
19259
- // ../../node_modules/.pnpm/@tsrx+core@0.2.0/node_modules/@tsrx/core/src/transform/style-ref.js
19259
+ // ../../node_modules/.pnpm/@tsrx+core@0.2.0_patch_hash=bece1facf9a602609930622648fbbe9314bde79391f1e539dda6bb9f2df24300/node_modules/@tsrx/core/src/transform/style-ref.js
19260
19260
  var regex_backslash_and_following_character = /\\(.)/g;
19261
19261
  function create_style_class_map(component, css, options = {}) {
19262
19262
  return build_style_class_map(
@@ -19471,7 +19471,7 @@ function get_standalone_class_selector(complex_selector) {
19471
19471
  return selector.type === "ClassSelector" ? selector : null;
19472
19472
  }
19473
19473
 
19474
- // ../../node_modules/.pnpm/@tsrx+core@0.2.0/node_modules/@tsrx/core/src/analyze/style-analyze.js
19474
+ // ../../node_modules/.pnpm/@tsrx+core@0.2.0_patch_hash=bece1facf9a602609930622648fbbe9314bde79391f1e539dda6bb9f2df24300/node_modules/@tsrx/core/src/analyze/style-analyze.js
19475
19475
  function nearest_scope(path, scopes) {
19476
19476
  for (let i2 = path.length - 1; i2 >= 0; i2 -= 1) {
19477
19477
  const scope = scopes.get(path[i2]);
@@ -19758,7 +19758,7 @@ function analyze_styles(ast, scopes, state) {
19758
19758
  return styles;
19759
19759
  }
19760
19760
 
19761
- // ../../node_modules/.pnpm/@tsrx+core@0.2.0/node_modules/@tsrx/core/src/analyze/index.js
19761
+ // ../../node_modules/.pnpm/@tsrx+core@0.2.0_patch_hash=bece1facf9a602609930622648fbbe9314bde79391f1e539dda6bb9f2df24300/node_modules/@tsrx/core/src/analyze/index.js
19762
19762
  function is_free_floating_template(node, path) {
19763
19763
  let child = node;
19764
19764
  for (let i2 = path.length - 1; i2 >= 0; i2 -= 1) {
@@ -21011,14 +21011,14 @@ var MagicString = class _MagicString {
21011
21011
  }
21012
21012
  };
21013
21013
 
21014
- // ../../node_modules/.pnpm/@tsrx+core@0.2.0/node_modules/@tsrx/core/src/transform/platform.js
21014
+ // ../../node_modules/.pnpm/@tsrx+core@0.2.0_patch_hash=bece1facf9a602609930622648fbbe9314bde79391f1e539dda6bb9f2df24300/node_modules/@tsrx/core/src/transform/platform.js
21015
21015
  var PLATFORMS = (
21016
21016
  /** @type {const} */
21017
21017
  ["web", "ios", "android"]
21018
21018
  );
21019
21019
  var platform_set = new Set(PLATFORMS);
21020
21020
 
21021
- // ../../node_modules/.pnpm/@tsrx+core@0.2.0/node_modules/@tsrx/core/src/transform/imports.js
21021
+ // ../../node_modules/.pnpm/@tsrx+core@0.2.0_patch_hash=bece1facf9a602609930622648fbbe9314bde79391f1e539dda6bb9f2df24300/node_modules/@tsrx/core/src/transform/imports.js
21022
21022
  function with_deferred_imports(visitors3) {
21023
21023
  const print_import_declaration = visitors3.ImportDeclaration;
21024
21024
  const print_import_expression = visitors3.ImportExpression;
@@ -21327,7 +21327,7 @@ function print(node, visitors3, opts = {}) {
21327
21327
  };
21328
21328
  }
21329
21329
 
21330
- // ../../node_modules/.pnpm/@tsrx+core@0.2.0/node_modules/@tsrx/core/src/analyze/css-analyze.js
21330
+ // ../../node_modules/.pnpm/@tsrx+core@0.2.0_patch_hash=bece1facf9a602609930622648fbbe9314bde79391f1e539dda6bb9f2df24300/node_modules/@tsrx/core/src/analyze/css-analyze.js
21331
21331
  function is_global_block_selector(simple_selector) {
21332
21332
  return simple_selector.type === "PseudoClassSelector" && simple_selector.name === "global" && simple_selector.args === null;
21333
21333
  }
@@ -23518,7 +23518,7 @@ var tsx_default = (options) => ({
23518
23518
  }
23519
23519
  });
23520
23520
 
23521
- // ../../node_modules/.pnpm/@tsrx+core@0.2.0/node_modules/@tsrx/core/src/transform/jsx/helpers.js
23521
+ // ../../node_modules/.pnpm/@tsrx+core@0.2.0_patch_hash=bece1facf9a602609930622648fbbe9314bde79391f1e539dda6bb9f2df24300/node_modules/@tsrx/core/src/transform/jsx/helpers.js
23522
23522
  function in_jsx_child_context(path) {
23523
23523
  const parent = path[path.length - 1];
23524
23524
  return !!parent && (parent.type === "JSXElement" || parent.type === "JSXFragment");
@@ -23652,6 +23652,22 @@ function tsx_with_ts_locations(boundary_tokens = false, comments = void 0) {
23652
23652
  context.visit(node.typeParameters);
23653
23653
  }
23654
23654
  },
23655
+ // esrap's TSParameterProperty printer drops `override`, so
23656
+ // `constructor(override readonly n: number)` typechecks as TS4115
23657
+ // ("must have an 'override' modifier") under `noImplicitOverride`.
23658
+ // TypeScript's modifier order is accessibility, override, readonly.
23659
+ TSParameterProperty: (node, context) => {
23660
+ if (node.accessibility) {
23661
+ context.write(node.accessibility + " ");
23662
+ }
23663
+ if (node.override) {
23664
+ context.write("override ");
23665
+ }
23666
+ if (node.readonly) {
23667
+ context.write("readonly ");
23668
+ }
23669
+ context.visit(node.parameter);
23670
+ },
23655
23671
  TSModuleDeclaration: (node, context) => {
23656
23672
  if (node.declare) context.write("declare ");
23657
23673
  if (node.kind === "global") {
@@ -23759,7 +23775,7 @@ function is_template_try_node(node) {
23759
23775
  return node?.type === "JSXTryExpression" || node?.type === "TryStatement" && node?.statementType === "TryStatement";
23760
23776
  }
23761
23777
 
23762
- // ../../node_modules/.pnpm/@tsrx+core@0.2.0/node_modules/@tsrx/core/src/transform/stylesheet.js
23778
+ // ../../node_modules/.pnpm/@tsrx+core@0.2.0_patch_hash=bece1facf9a602609930622648fbbe9314bde79391f1e539dda6bb9f2df24300/node_modules/@tsrx/core/src/transform/stylesheet.js
23763
23779
  var regex_css_browser_prefix = /^-((webkit)|(moz)|(o)|(ms))-/;
23764
23780
  var regex_css_name_boundary = /^[\s,;}]$/;
23765
23781
  var is_keyframes_node = (node) => remove_css_prefix(node.name) === "keyframes";
@@ -24114,7 +24130,7 @@ function render_css_result(stylesheets, minify = false) {
24114
24130
  };
24115
24131
  }
24116
24132
 
24117
- // ../../node_modules/.pnpm/@tsrx+core@0.2.0/node_modules/@tsrx/core/src/transform/await.js
24133
+ // ../../node_modules/.pnpm/@tsrx+core@0.2.0_patch_hash=bece1facf9a602609930622648fbbe9314bde79391f1e539dda6bb9f2df24300/node_modules/@tsrx/core/src/transform/await.js
24118
24134
  function find_first_top_level_await_in_tsrx_function_body(body_nodes) {
24119
24135
  for (const node of body_nodes) {
24120
24136
  const found = find_first_top_level_await(node, false);
@@ -24149,7 +24165,7 @@ function find_first_top_level_await(node, inside_nested_function) {
24149
24165
  return null;
24150
24166
  }
24151
24167
 
24152
- // ../../node_modules/.pnpm/@tsrx+core@0.2.0/node_modules/@tsrx/core/src/transform/scoping.js
24168
+ // ../../node_modules/.pnpm/@tsrx+core@0.2.0_patch_hash=bece1facf9a602609930622648fbbe9314bde79391f1e539dda6bb9f2df24300/node_modules/@tsrx/core/src/transform/scoping.js
24153
24169
  function prepare_stylesheet_for_render(stylesheet, mode = "scope") {
24154
24170
  const render_mode = mode === true ? "class-map" : mode === false ? "scope" : mode;
24155
24171
  const is_class_map = render_mode === "class-map";
@@ -24279,7 +24295,7 @@ function add_scope_classes(element, hashes, applied, class_attr_name = "class")
24279
24295
  };
24280
24296
  }
24281
24297
 
24282
- // ../../node_modules/.pnpm/@tsrx+core@0.2.0/node_modules/@tsrx/core/src/analyze/prune.js
24298
+ // ../../node_modules/.pnpm/@tsrx+core@0.2.0_patch_hash=bece1facf9a602609930622648fbbe9314bde79391f1e539dda6bb9f2df24300/node_modules/@tsrx/core/src/analyze/prune.js
24283
24299
  var regex_backslash_and_following_character2 = /\\(.)/g;
24284
24300
  var FORWARD = 0;
24285
24301
  var BACKWARD = 1;
@@ -25003,7 +25019,7 @@ function prune_css(css, element, styleClasses, topScopedClasses, regionHash = cs
25003
25019
  walk(css, null, visitors3);
25004
25020
  }
25005
25021
 
25006
- // ../../node_modules/.pnpm/@tsrx+core@0.2.0/node_modules/@tsrx/core/src/transform/jsx/style-scopes.js
25022
+ // ../../node_modules/.pnpm/@tsrx+core@0.2.0_patch_hash=bece1facf9a602609930622648fbbe9314bde79391f1e539dda6bb9f2df24300/node_modules/@tsrx/core/src/transform/jsx/style-scopes.js
25007
25023
  function prepare_style_scopes(program, ctx) {
25008
25024
  const state = {
25009
25025
  ctx,
@@ -25473,7 +25489,7 @@ function type_only_style(block2) {
25473
25489
  };
25474
25490
  }
25475
25491
 
25476
- // ../../node_modules/.pnpm/@tsrx+core@0.2.0/node_modules/@tsrx/core/src/transform/jsx-interleave.js
25492
+ // ../../node_modules/.pnpm/@tsrx+core@0.2.0_patch_hash=bece1facf9a602609930622648fbbe9314bde79391f1e539dda6bb9f2df24300/node_modules/@tsrx/core/src/transform/jsx-interleave.js
25477
25493
  function is_interleaved_body(body_nodes, is_jsx_child2) {
25478
25494
  let seen_jsx = false;
25479
25495
  for (const child of body_nodes) {
@@ -25500,7 +25516,7 @@ function capture_jsx_child(jsx, capture_index, anchor_id) {
25500
25516
  return { declaration: declaration2, reference };
25501
25517
  }
25502
25518
 
25503
- // ../../node_modules/.pnpm/@tsrx+core@0.2.0/node_modules/@tsrx/core/src/transform/jsx-hoist.js
25519
+ // ../../node_modules/.pnpm/@tsrx+core@0.2.0_patch_hash=bece1facf9a602609930622648fbbe9314bde79391f1e539dda6bb9f2df24300/node_modules/@tsrx/core/src/transform/jsx-hoist.js
25504
25520
  function is_static_literal(node) {
25505
25521
  return node.value === null || typeof node.value === "string" || typeof node.value === "number" || typeof node.value === "boolean" || typeof node.value === "bigint";
25506
25522
  }
@@ -25566,7 +25582,7 @@ function is_hoist_safe_jsx_node(node) {
25566
25582
  return node.openingElement.attributes.every(is_hoist_safe_jsx_attribute) && node.children.every(is_hoist_safe_jsx_child);
25567
25583
  }
25568
25584
 
25569
- // ../../node_modules/.pnpm/@tsrx+core@0.2.0/node_modules/@tsrx/core/src/transform/jsx/server-module.js
25585
+ // ../../node_modules/.pnpm/@tsrx+core@0.2.0_patch_hash=bece1facf9a602609930622648fbbe9314bde79391f1e539dda6bb9f2df24300/node_modules/@tsrx/core/src/transform/jsx/server-module.js
25570
25586
  var HOISTED_IMPORT_PREFIX = "__tsrx_server_import$";
25571
25587
  var WALK_SKIP_KEYS = /* @__PURE__ */ new Set([
25572
25588
  "loc",
@@ -25830,7 +25846,7 @@ function lower_server_module_for_types(ast, server_module) {
25830
25846
  ) };
25831
25847
  }
25832
25848
 
25833
- // ../../node_modules/.pnpm/@tsrx+core@0.2.0/node_modules/@tsrx/core/src/transform/jsx/index.js
25849
+ // ../../node_modules/.pnpm/@tsrx+core@0.2.0_patch_hash=bece1facf9a602609930622648fbbe9314bde79391f1e539dda6bb9f2df24300/node_modules/@tsrx/core/src/transform/jsx/index.js
25834
25850
  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.";
25835
25851
  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.";
25836
25852
  var TSRX_FOR_BREAK_ERROR = "Break statements are not allowed inside TSRX template for...of loops.";
@@ -29459,7 +29475,7 @@ function build_return_expression(render_nodes, in_jsx_child = false, type_only =
29459
29475
  );
29460
29476
  }
29461
29477
 
29462
- // ../../node_modules/.pnpm/@tsrx+core@0.2.0/node_modules/@tsrx/core/src/source-map-utils.js
29478
+ // ../../node_modules/.pnpm/@tsrx+core@0.2.0_patch_hash=bece1facf9a602609930622648fbbe9314bde79391f1e539dda6bb9f2df24300/node_modules/@tsrx/core/src/source-map-utils.js
29463
29479
  var mapping_data = {
29464
29480
  verification: true,
29465
29481
  completion: true,
@@ -29647,7 +29663,7 @@ function get_mapping_from_node(node, src_to_gen_map, gen_line_offsets, filtered_
29647
29663
  return mapping;
29648
29664
  }
29649
29665
 
29650
- // ../../node_modules/.pnpm/@tsrx+core@0.2.0/node_modules/@tsrx/core/src/transform/segments.js
29666
+ // ../../node_modules/.pnpm/@tsrx+core@0.2.0_patch_hash=bece1facf9a602609930622648fbbe9314bde79391f1e539dda6bb9f2df24300/node_modules/@tsrx/core/src/transform/segments.js
29651
29667
  var RETURN_KEYWORD = "return";
29652
29668
  var EXPORT_KEYWORD = "export";
29653
29669
  var BLOCK_DECLARATION_TYPES = /* @__PURE__ */ new Set([
@@ -31403,6 +31419,43 @@ function convert_source_map_to_mappings(ast, ast_from_source, source, generated_
31403
31419
  visit(node.typeArguments);
31404
31420
  }
31405
31421
  return;
31422
+ } else if (node.type === "TSParameterProperty") {
31423
+ const parameter = (
31424
+ /** @type {AST.Pattern} */
31425
+ /** @type {unknown} */
31426
+ node.parameter
31427
+ );
31428
+ visit(parameter);
31429
+ if (parameter.type === "Identifier" && parameter.typeAnnotation) {
31430
+ visit(parameter.typeAnnotation);
31431
+ }
31432
+ return;
31433
+ } else if (
31434
+ /** @type {string} */
31435
+ node.type === "TSDeclareMethod"
31436
+ ) {
31437
+ const method2 = (
31438
+ /** @type {AST.TSDeclareFunction} */
31439
+ /** @type {unknown} */
31440
+ node
31441
+ );
31442
+ if (method2.typeParameters) {
31443
+ visit(method2.typeParameters);
31444
+ }
31445
+ for (const param of method2.params) {
31446
+ visit(param);
31447
+ const annotation = (
31448
+ /** @type {Exclude<AST.Parameter, AST.TSParameterProperty>} */
31449
+ param.typeAnnotation
31450
+ );
31451
+ if (annotation) {
31452
+ visit(annotation);
31453
+ }
31454
+ }
31455
+ if (method2.returnType) {
31456
+ visit(method2.returnType);
31457
+ }
31458
+ return;
31406
31459
  } else if (node.type === "TSTypePredicate") {
31407
31460
  if (node.parameterName) {
31408
31461
  visit(node.parameterName);
@@ -1,2 +1,16 @@
1
1
  export declare function registerContext(context: Function): void;
2
2
  export declare function isContext(value: unknown): boolean;
3
+ /**
4
+ * Development-only diagnostics for the React context members Octane removed.
5
+ * Every call site sits behind the production-build guard, so production
6
+ * bundles retain neither the call nor this function.
7
+ *
8
+ * - `Consumer` (never supported): warns once per context and returns
9
+ * `undefined`, so feature probes (`Ctx.Consumer || fallback`) behave as in
10
+ * production.
11
+ * - `Provider` (removed in favor of `<Ctx value>`): throws. The compiler rejects
12
+ * `<Ctx.Provider>` only when the context is created in the same module; an
13
+ * imported context would otherwise fail later with an opaque
14
+ * "element type is invalid" (client) or "comp is not a function" (server).
15
+ */
16
+ export declare function defineRemovedContextMembers(context: Function): void;