@lwrjs/types 0.11.0-alpha.0 → 0.11.0-alpha.2

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/build/config.d.ts CHANGED
@@ -36,6 +36,7 @@ export interface NormalizedLwrAppBootstrapConfig {
36
36
  services: string[];
37
37
  configAsSrc: boolean;
38
38
  ssr: boolean;
39
+ mixedMode: boolean;
39
40
  module: string | undefined;
40
41
  preloadModules: string[];
41
42
  }
@@ -46,10 +47,10 @@ export interface LwrLockerConfig {
46
47
  clientOnly?: boolean;
47
48
  }
48
49
  export interface RouteHandlersConfig {
49
- [id: string]: ServiceConfig;
50
+ [id: string]: string | null;
50
51
  }
51
52
  export interface NormalizedRouteHandlersConfig {
52
- [id: string]: ServiceEntry;
53
+ [id: string]: string | null;
53
54
  }
54
55
  export interface LocalizedViewRequest extends ViewRequest {
55
56
  locale?: string;
@@ -107,6 +108,10 @@ export interface LwrGlobalConfig {
107
108
  locker?: LwrLockerConfig;
108
109
  uriTransformers?: ServiceConfig[];
109
110
  }
111
+ type RequiredPick<T, K extends keyof T> = {
112
+ [P in K]-?: T[P];
113
+ };
114
+ export type OnStartConfig = RequiredPick<LwrGlobalConfig, 'routes' | 'basePath'>;
110
115
  export interface BuildOptions {
111
116
  target?: string;
112
117
  input?: string;
@@ -164,7 +169,7 @@ export interface Services {
164
169
  uriTransformers: ResolvedServiceEntry<UriTransformPlugin>[];
165
170
  }
166
171
  export interface RouteHandlers {
167
- [id: string]: [RouteHandlerFunction, any?];
172
+ [id: string]: RouteHandlerFunction;
168
173
  }
169
174
  interface AssetConfigCommon {
170
175
  urlPath?: string;
@@ -258,7 +263,7 @@ export interface HooksPlugin {
258
263
  */
259
264
  initInstrumentation?: () => void;
260
265
  /**
261
- * Load routes on application start up.
266
+ * Set a subset of LWR Configuration at runtime. Works in mrt
262
267
  *
263
268
  * @remarks
264
269
  * These hooks are invoked ONLY at runtime.
@@ -267,7 +272,10 @@ export interface HooksPlugin {
267
272
  *
268
273
  * For the `createHandler` runtime, these hooks are invoked during server context initialization.
269
274
  */
270
- onStart?: (routes: LwrRoute[]) => void;
275
+ onStart?: (config: OnStartConfig) => void;
276
+ }
277
+ export interface Locale {
278
+ id: string;
271
279
  }
272
280
  export {};
273
281
  //# sourceMappingURL=config.d.ts.map
package/build/index.d.ts CHANGED
@@ -139,7 +139,7 @@ export interface LinkedModuleDefinition extends ModuleDefinition {
139
139
  linkedModuleRecord: ModuleRecord;
140
140
  linkedConfig: LinkedModuleDefinitionConfig;
141
141
  runtimeEnvironment: RuntimeEnvironment;
142
- runtimeParams?: RuntimeParams;
142
+ runtimeParams: RuntimeParams;
143
143
  }
144
144
  export interface CodeSource {
145
145
  code: string;
package/build/views.d.ts CHANGED
@@ -44,6 +44,9 @@ export interface CustomElementReference {
44
44
  export interface RenderedViewMetadata {
45
45
  customElements: CustomElementReference[];
46
46
  assetReferences: AssetReference[];
47
+ ssrProps?: {
48
+ [prop: string]: Json;
49
+ };
47
50
  }
48
51
  export interface RenderedAssetReference {
49
52
  url: string;
@@ -156,6 +159,7 @@ export interface ViewInfo {
156
159
  id: string;
157
160
  url: string;
158
161
  configAsSrc: boolean;
162
+ mixedMode: boolean;
159
163
  }
160
164
  export interface RenderOptions {
161
165
  skipMetadataCollection?: boolean;
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "build": "tsc -b"
9
9
  },
10
10
  "type": "module",
11
- "version": "0.11.0-alpha.0",
11
+ "version": "0.11.0-alpha.2",
12
12
  "homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
13
13
  "repository": {
14
14
  "type": "git",
@@ -29,5 +29,5 @@
29
29
  "engines": {
30
30
  "node": ">=16.0.0"
31
31
  },
32
- "gitHead": "6917abefe32752eeed0f9ba98505ca2b76f1df9d"
32
+ "gitHead": "ce7d80468d289a0d24682735513166f163f29f61"
33
33
  }