@octanejs/app-core 0.1.5 → 0.1.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@octanejs/app-core",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "engines": {
@@ -79,10 +79,10 @@
79
79
  "esbuild": "^0.28.1"
80
80
  },
81
81
  "peerDependencies": {
82
- "octane": "^0.12.0"
82
+ "octane": "^0.13.2"
83
83
  },
84
84
  "devDependencies": {
85
85
  "@types/node": "^24.13.3",
86
- "octane": "0.12.0"
86
+ "octane": "0.13.2"
87
87
  }
88
88
  }
@@ -0,0 +1,15 @@
1
+ // @ts-check
2
+ export { hydrateRoot, initializeHydrationEventCapture, Suspense, ErrorBoundary } from 'octane';
3
+ import { createElementFromConfig } from 'octane/internal/client';
4
+
5
+ /**
6
+ * The generated entry resolves fallback exports to functions and supplies only
7
+ * `{ error, reset }` or `{}`. Their descriptors cannot select host form actions
8
+ * or Fragment refs; each fallback's own output installs the capabilities it uses.
9
+ * @template P
10
+ * @param {import('octane').ComponentBody<P>} component
11
+ * @param {P} props
12
+ */
13
+ export function createElement(component, props) {
14
+ return createElementFromConfig(undefined, component, props);
15
+ }
package/src/codegen.js CHANGED
@@ -1,6 +1,7 @@
1
1
  // @ts-check
2
2
  import fs from 'node:fs';
3
3
  import path from 'node:path';
4
+ import { fileURLToPath } from 'node:url';
4
5
 
5
6
  export { generateServerEntry, generateServerManifestEntry } from './server/server-entry.js';
6
7
 
@@ -329,7 +330,8 @@ async function bootstrapDocumentLifecycle() {
329
330
  * octane specifics:
330
331
  * - `initializeHydrationEventCapture()` runs before any async route work so
331
332
  * interaction boundaries can preserve intent that precedes `hydrateRoot()`.
332
- * - `import { hydrateRoot } from 'octane'` (NO `mount`).
333
+ * - The default entry runtime uses hydrateRoot and classified component
334
+ * descriptors for pending/catch fallbacks (NO `mount`).
333
335
  * - `hydrateRoot(container, body, props)` signature (container FIRST, React-18
334
336
  * shape) — no `{ target, props }` wrapper.
335
337
  * - The layout `children` is a props-first ComponentBody whose closure calls
@@ -361,7 +363,8 @@ async function bootstrapDocumentLifecycle() {
361
363
  * @returns {string}
362
364
  */
363
365
  export function create_client_entry_source(options = {}) {
364
- const runtimeModuleId = options.runtimeModuleId ?? 'octane';
366
+ const runtimeModuleId =
367
+ options.runtimeModuleId ?? fileURLToPath(new URL('./client-entry-runtime.js', import.meta.url));
365
368
  return (
366
369
  client_entry_prelude(
367
370
  options,