@octanejs/app-core 0.0.5 → 0.0.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.0.5",
3
+ "version": "0.0.7",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "engines": {
@@ -75,14 +75,14 @@
75
75
  }
76
76
  },
77
77
  "dependencies": {
78
- "@ripple-ts/adapter": "^0.3.86",
78
+ "@ripple-ts/adapter": "^0.3.101",
79
79
  "esbuild": "^0.28.1"
80
80
  },
81
81
  "peerDependencies": {
82
- "octane": "0.1.9"
82
+ "octane": "0.1.11"
83
83
  },
84
84
  "devDependencies": {
85
85
  "@types/node": "^24.3.0",
86
- "octane": "0.1.9"
86
+ "octane": "0.1.11"
87
87
  }
88
88
  }
package/src/codegen.js CHANGED
@@ -108,6 +108,8 @@ export function write_project_generated_file(options, name, source) {
108
108
  * avoids requiring `unsafe-eval` under a nonce-based Content Security Policy.
109
109
  *
110
110
  * octane specifics:
111
+ * - `initializeHydrationEventCapture()` runs before any async route work so
112
+ * interaction boundaries can preserve intent that precedes `hydrateRoot()`.
111
113
  * - `import { hydrateRoot } from 'octane'` (NO `mount`).
112
114
  * - `hydrateRoot(container, body, props)` signature (container FIRST, React-18
113
115
  * shape) — no `{ target, props }` wrapper.
@@ -154,7 +156,9 @@ export function create_client_entry_source(options = {}) {
154
156
  return `// Auto-generated by ${generatedBy}.
155
157
  // This file is written to the active integration's project cache.
156
158
 
157
- import { hydrateRoot, Suspense, ErrorBoundary, createElement } from ${JSON.stringify(runtimeModuleId)};
159
+ import { hydrateRoot, initializeHydrationEventCapture, Suspense, ErrorBoundary, createElement } from ${JSON.stringify(runtimeModuleId)};
160
+
161
+ initializeHydrationEventCapture();
158
162
 
159
163
  // Static import map (production): every module the server may name in
160
164
  // #__octane_data, as bundle-analyzable dynamic imports. Empty in dev.
package/types/config.d.ts CHANGED
@@ -16,6 +16,7 @@ export type {
16
16
  ExperimentalRendererConfigOptions,
17
17
  ExperimentalRendererRegistryEntry,
18
18
  ExperimentalRendererRuleOptions,
19
+ ExperimentalRendererValidationOptions,
19
20
  ExperimentalResolvedRendererBoundary,
20
21
  ExperimentalResolvedRendererConfig,
21
22
  ExperimentalResolvedRendererRegistryEntry,
package/types/index.d.ts CHANGED
@@ -190,6 +190,18 @@ export interface ExperimentalRendererRuleOptions {
190
190
  renderer: string;
191
191
  }
192
192
 
193
+ /** @experimental Static source restrictions enforced for a renderer. */
194
+ export interface ExperimentalRendererValidationOptions {
195
+ /** Host elements that may directly contain authored primitive text. */
196
+ textParents?: readonly string[];
197
+ /** Unbound JavaScript globals that renderer-owned source may not reference. */
198
+ forbiddenGlobals?: readonly string[];
199
+ /** Package IDs whose static imports, subpaths, and CommonJS requires are forbidden. */
200
+ forbiddenImports?: readonly string[];
201
+ /** Allowed static JSX attributes by host name; `*` supplies shared patterns. */
202
+ hostProps?: Readonly<Record<string, readonly string[]>>;
203
+ }
204
+
193
205
  /**
194
206
  * @experimental A string selects the universal compiler target. The object
195
207
  * form carries explicit target metadata for normalized configs and future
@@ -208,6 +220,8 @@ export type ExperimentalRendererRegistryEntry =
208
220
  text?: 'reject' | 'ignore' | 'host';
209
221
  /** Serializable feature flags consumed by compiler and runtime integrations. */
210
222
  capabilities?: readonly string[];
223
+ /** Optional source restrictions enforced when compiling for this renderer. */
224
+ validation?: ExperimentalRendererValidationOptions;
211
225
  };
212
226
 
213
227
  /**
@@ -258,6 +272,7 @@ export interface ExperimentalResolvedRendererRegistryEntry {
258
272
  readonly intrinsics?: string;
259
273
  readonly text: 'reject' | 'ignore' | 'host';
260
274
  readonly capabilities: readonly string[];
275
+ readonly validation?: Readonly<ExperimentalRendererValidationOptions>;
261
276
  }
262
277
 
263
278
  /** @experimental Canonical renderer-owned child-region metadata. */