octane 0.1.35 → 0.1.36

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 (40) hide show
  1. package/dist/cjs/error-codes.client.generated.cjs +30 -0
  2. package/dist/cjs/error-codes.server.generated.cjs +5 -0
  3. package/dist/cjs/index.cjs +20 -0
  4. package/dist/cjs/runtime.cjs +452 -113
  5. package/dist/cjs/runtime.server.cjs +386 -147
  6. package/dist/cjs/server/index.cjs +16 -0
  7. package/dist/cjs/shared-value-helpers.cjs +68 -0
  8. package/dist/cjs/version.cjs +1 -1
  9. package/dist/compiler/bundler.js +134 -0
  10. package/dist/compiler/compile-universal.js +33 -6
  11. package/dist/compiler/compile.js +596 -184
  12. package/dist/compiler/native-change-diagnostics.js +4 -3
  13. package/dist/compiler/renderers.js +22 -1
  14. package/dist/compiler/vite.d.ts +2 -0
  15. package/dist/compiler/vite.js +354 -21
  16. package/dist/error-codes.client.generated.d.ts +6 -0
  17. package/dist/error-codes.client.generated.js +30 -0
  18. package/dist/error-codes.server.generated.d.ts +1 -0
  19. package/dist/error-codes.server.generated.js +5 -0
  20. package/dist/index.d.ts +1 -1
  21. package/dist/index.js +20 -0
  22. package/dist/internal/client.d.ts +7 -0
  23. package/dist/internal/client.js +5 -0
  24. package/dist/internal/server.d.ts +5 -0
  25. package/dist/internal/server.js +1 -0
  26. package/dist/jsx-runtime.d.ts +59 -4
  27. package/dist/runtime.d.ts +74 -1
  28. package/dist/runtime.js +436 -100
  29. package/dist/runtime.server.d.ts +56 -2
  30. package/dist/runtime.server.js +373 -136
  31. package/dist/server/index.d.ts +1 -1
  32. package/dist/server/index.js +16 -0
  33. package/dist/shared-value-helpers.d.ts +11 -0
  34. package/dist/shared-value-helpers.js +40 -0
  35. package/dist/static/index.d.ts +9 -2
  36. package/dist/static/index.js +6 -2
  37. package/dist/universal-core.d.ts +20 -0
  38. package/dist/universal-core.js +185 -129
  39. package/dist/version.js +1 -1
  40. package/package.json +11 -1
@@ -164,6 +164,36 @@ function formatClientError(code, ...args) {
164
164
  );
165
165
  case 50:
166
166
  return (0, import_error_message.formatDevErrorMessage)("Unclosed server-rendered Fragment descriptor.", args);
167
+ case 51:
168
+ return (0, import_error_message.formatDevErrorMessage)(
169
+ "Hydration mismatch: the server-rendered node did not match the client render; the mismatched subtree was rebuilt on the client.",
170
+ args
171
+ );
172
+ case 52:
173
+ return (0, import_error_message.formatDevErrorMessage)(
174
+ "Hydration mismatch: root adoption was abandoned after a server/client shape divergence; the root was rebuilt on the client.",
175
+ args
176
+ );
177
+ case 53:
178
+ return (0, import_error_message.formatDevErrorMessage)(
179
+ "Hydration mismatch: the server rendered more root content than the client; the stale remainder was discarded.",
180
+ args
181
+ );
182
+ case 54:
183
+ return (0, import_error_message.formatDevErrorMessage)(
184
+ "Hydration mismatch: the client rendered text where the server rendered none; the client text was built fresh.",
185
+ args
186
+ );
187
+ case 55:
188
+ return (0, import_error_message.formatDevErrorMessage)(
189
+ "Hydration mismatch: the server rendered a different child shape where the client renders a component; the stale range was discarded and the component was built on the client.",
190
+ args
191
+ );
192
+ case 56:
193
+ return (0, import_error_message.formatDevErrorMessage)(
194
+ "Hydration mismatch: the server rendered more list items than the client; the extra server items were discarded.",
195
+ args
196
+ );
167
197
  default:
168
198
  return (0, import_error_message.formatUnknownDevErrorMessage)(code);
169
199
  }
@@ -135,6 +135,11 @@ function formatServerError(code, ...args) {
135
135
  "octane SSR: %s consecutive streaming passes completed no boundary \u2014 a use(thenable) never resolved. If promises are re-created on every render pass (e.g. created in an ancestor render and passed down through props), create them at their use() site or hoist them out of render.",
136
136
  args
137
137
  );
138
+ case 57:
139
+ return (0, import_error_message.formatDevErrorMessage)(
140
+ "prerenderToNodeStream requires a Node.js runtime with process.getBuiltinModule; use prerender() in non-Node environments.",
141
+ args
142
+ );
138
143
  default:
139
144
  return (0, import_error_message.formatUnknownDevErrorMessage)(code);
140
145
  }
@@ -85,6 +85,7 @@ __export(index_exports, {
85
85
  createScopedValue: () => import_runtime.createScopedValue,
86
86
  delegateCaptureEvents: () => import_runtime.delegateCaptureEvents,
87
87
  delegateEvents: () => import_runtime.delegateEvents,
88
+ descriptorChildren: () => import_runtime.descriptorChildren,
88
89
  devEventListener: () => import_runtime.devEventListener,
89
90
  drainFrag: () => import_runtime.drainFrag,
90
91
  drainPassiveEffects: () => import_runtime.drainPassiveEffects,
@@ -133,7 +134,9 @@ __export(index_exports, {
133
134
  preconnect: () => import_runtime.preconnect,
134
135
  prefetchDNS: () => import_runtime.prefetchDNS,
135
136
  preinit: () => import_runtime.preinit,
137
+ preinitModule: () => import_runtime.preinitModule,
136
138
  preload: () => import_runtime.preload,
139
+ preloadModule: () => import_runtime.preloadModule,
137
140
  provideContext: () => import_runtime.provideContext,
138
141
  puMiss: () => import_runtime.puMiss,
139
142
  puPub: () => import_runtime.puPub,
@@ -143,10 +146,14 @@ __export(index_exports, {
143
146
  puTake3: () => import_runtime.puTake3,
144
147
  puTake4: () => import_runtime.puTake4,
145
148
  queueNativeChangeDiagnostic: () => import_runtime.queueNativeChangeDiagnostic,
149
+ queueOwnRefDetach: () => import_runtime.queueOwnRefDetach,
146
150
  queueRefAttach: () => import_runtime.queueRefAttach,
147
151
  queueRefDetach: () => import_runtime.queueRefDetach,
148
152
  renderBlock: () => import_runtime.renderBlock,
153
+ replaceRef: () => import_runtime.replaceRef,
149
154
  requestFormReset: () => import_runtime.requestFormReset,
155
+ resetFloatResourceState: () => import_runtime.resetFloatResourceState,
156
+ scriptResource: () => import_runtime.scriptResource,
150
157
  seedOrCreate: () => import_runtime.seedOrCreate,
151
158
  setAriaAttribute: () => import_runtime.setAriaAttribute,
152
159
  setAttribute: () => import_runtime.setAttribute,
@@ -178,11 +185,14 @@ __export(index_exports, {
178
185
  sibling: () => import_runtime.sibling,
179
186
  snapshotSpread: () => import_runtime.snapshotSpread,
180
187
  startTransition: () => import_runtime.startTransition,
188
+ styleResource: () => import_runtime.styleResource,
189
+ stylesheetResource: () => import_runtime.stylesheetResource,
181
190
  switchBlock: () => import_runtime.switchBlock,
182
191
  template: () => import_runtime.template,
183
192
  textHole: () => import_runtime.textHole,
184
193
  textSlot: () => import_runtime.textSlot,
185
194
  tryBlock: () => import_runtime.tryBlock,
195
+ unstable_Activity: () => import_runtime.Activity,
186
196
  unstable_ViewTransition: () => import_runtime.ViewTransition,
187
197
  unstable_addTransitionType: () => import_runtime.addTransitionType,
188
198
  use: () => import_runtime.use,
@@ -288,6 +298,7 @@ var import_method_dep = require("./method-dep.cjs");
288
298
  createScopedValue,
289
299
  delegateCaptureEvents,
290
300
  delegateEvents,
301
+ descriptorChildren,
291
302
  devEventListener,
292
303
  drainFrag,
293
304
  drainPassiveEffects,
@@ -336,7 +347,9 @@ var import_method_dep = require("./method-dep.cjs");
336
347
  preconnect,
337
348
  prefetchDNS,
338
349
  preinit,
350
+ preinitModule,
339
351
  preload,
352
+ preloadModule,
340
353
  provideContext,
341
354
  puMiss,
342
355
  puPub,
@@ -346,10 +359,14 @@ var import_method_dep = require("./method-dep.cjs");
346
359
  puTake3,
347
360
  puTake4,
348
361
  queueNativeChangeDiagnostic,
362
+ queueOwnRefDetach,
349
363
  queueRefAttach,
350
364
  queueRefDetach,
351
365
  renderBlock,
366
+ replaceRef,
352
367
  requestFormReset,
368
+ resetFloatResourceState,
369
+ scriptResource,
353
370
  seedOrCreate,
354
371
  setAriaAttribute,
355
372
  setAttribute,
@@ -381,11 +398,14 @@ var import_method_dep = require("./method-dep.cjs");
381
398
  sibling,
382
399
  snapshotSpread,
383
400
  startTransition,
401
+ styleResource,
402
+ stylesheetResource,
384
403
  switchBlock,
385
404
  template,
386
405
  textHole,
387
406
  textSlot,
388
407
  tryBlock,
408
+ unstable_Activity,
389
409
  unstable_ViewTransition,
390
410
  unstable_addTransitionType,
391
411
  use,