react-on-rails 17.0.0-rc.8 → 17.0.0

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.
@@ -25,7 +25,7 @@ interface Registries {
25
25
  * Base client object type that includes all core ReactOnRails methods except Pro-specific ones.
26
26
  * Derived from ReactOnRailsInternal by omitting Pro-only methods.
27
27
  */
28
- export type BaseClientObjectType = Omit<ReactOnRailsInternal, 'getOrWaitForComponent' | 'getOrWaitForStore' | 'getOrWaitForStoreGenerator' | 'reactOnRailsStoreLoaded' | 'streamServerRenderedReactComponent' | 'serverRenderRSCReactComponent' | 'addAsyncPropsCapabilityToComponentProps' | 'getOrCreateAsyncPropsManager'>;
28
+ export type BaseClientObjectType = Omit<ReactOnRailsInternal, 'getOrWaitForComponent' | 'getOrWaitForStore' | 'getOrWaitForStoreGenerator' | 'reactOnRailsStoreLoaded' | 'isServerStreamingSupported' | 'streamServerRenderedReactComponent' | 'serverRenderRSCReactComponent' | 'addAsyncPropsCapabilityToComponentProps' | 'getOrCreateAsyncPropsManager'>;
29
29
  export declare function createBaseClientObject(registries: Registries, currentObject?: BaseClientObjectType | null): BaseClientObjectType;
30
30
  export {};
31
31
  //# sourceMappingURL=client.d.ts.map
@@ -14,6 +14,7 @@ const PRO_ONLY_METHODS = [
14
14
  'getOrWaitForStore',
15
15
  'getOrWaitForStoreGenerator',
16
16
  'reactOnRailsStoreLoaded',
17
+ 'isServerStreamingSupported',
17
18
  'streamServerRenderedReactComponent',
18
19
  'serverRenderRSCReactComponent',
19
20
  'addAsyncPropsCapabilityToComponentProps',
@@ -53,6 +53,7 @@ export declare function createCoreCapability(registries: Registries): {
53
53
  getOrWaitForStore(): Promise<Store>;
54
54
  getOrWaitForStoreGenerator(): Promise<StoreGenerator>;
55
55
  reactOnRailsStoreLoaded(): Promise<void>;
56
+ isServerStreamingSupported(): boolean;
56
57
  streamServerRenderedReactComponent(...args: any[]): any;
57
58
  serverRenderRSCReactComponent(...args: any[]): any;
58
59
  addAsyncPropsCapabilityToComponentProps(...args: any[]): any;
@@ -184,6 +184,9 @@ export function createCoreCapability(registries) {
184
184
  reactOnRailsStoreLoaded() {
185
185
  throw new Error('reactOnRailsStoreLoaded requires the react-on-rails-pro package.');
186
186
  },
187
+ isServerStreamingSupported() {
188
+ throw new Error('isServerStreamingSupported requires the react-on-rails-pro package.');
189
+ },
187
190
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
188
191
  streamServerRenderedReactComponent(...args) {
189
192
  void args;
@@ -471,6 +471,10 @@ export interface ReactOnRailsInternal extends ReactOnRails {
471
471
  * Used by server rendering by Rails
472
472
  */
473
473
  serverRenderReactComponent(options: RenderParams): null | string | Promise<string>;
474
+ /**
475
+ * Used by Rails to select progressive streaming only when the installed React DOM server supports it.
476
+ */
477
+ isServerStreamingSupported(): boolean;
474
478
  /**
475
479
  * Used by server rendering by Rails
476
480
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-on-rails",
3
- "version": "17.0.0-rc.8",
3
+ "version": "17.0.0",
4
4
  "description": "react-on-rails JavaScript for react_on_rails Ruby gem",
5
5
  "main": "lib/ReactOnRails.full.js",
6
6
  "type": "module",