@pwfabric/embed 1.2.0 → 2.1.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.
- package/LICENSE +2 -2
- package/dist/embed.js +87 -26
- package/dist/index.d.ts +7 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/package.json +9 -9
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { RenderableSurface, CapabilityProvider, EntityFacade, SurfaceConnectionsValue, DataServiceConfig, SurfaceDataCache, ImageAdapter, BlockComponentRegistry, SurfaceEvent, BlockComponentProps, EntityDefinition } from '@pwfabric/runtime';
|
|
2
|
+
import { RenderableSurface, CapabilityProvider, EntityFacade, SurfaceConnectionsValue, DataServiceConfig, SurfaceDataCache, LinkHref, ImageAdapter, BlockComponentRegistry, SurfaceEvent, BlockComponentProps, EntityDefinition } from '@pwfabric/runtime';
|
|
3
3
|
import { DynamicBlockDescriptor, DynamicStarterDescriptor, BreakpointName, SurfaceRenderGrant } from '@pwfabric/contracts';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -55,6 +55,8 @@ interface RenderCoreOptions {
|
|
|
55
55
|
readonly loadingStrategy?: 'gate' | 'immediate';
|
|
56
56
|
/** See DataBoundSurfaceRendererProps — yesterday's rows while today's load. */
|
|
57
57
|
readonly dataCache?: SurfaceDataCache;
|
|
58
|
+
/** How the host writes an in-app link whose page was an expression; see the runtime's render/links.ts. */
|
|
59
|
+
readonly linkHref?: LinkHref;
|
|
58
60
|
/** `live` (default) or `inert` (no auto-refresh, no dispatched actions). */
|
|
59
61
|
readonly interactionMode?: 'live' | 'inert';
|
|
60
62
|
/** Base path for links/routing. */
|
|
@@ -204,6 +206,8 @@ interface RenderFatOptions {
|
|
|
204
206
|
readonly dataServiceConfig?: DataServiceConfig;
|
|
205
207
|
readonly loadingStrategy?: 'gate' | 'immediate';
|
|
206
208
|
readonly dataCache?: SurfaceDataCache;
|
|
209
|
+
/** How the host writes an in-app link whose page was an expression; see the runtime's render/links.ts. */
|
|
210
|
+
readonly linkHref?: LinkHref;
|
|
207
211
|
/** Inline appearance ref; overrides `surface.appearance` when given. */
|
|
208
212
|
readonly appearance?: RenderableSurface['appearance'];
|
|
209
213
|
/**
|
|
@@ -464,6 +468,8 @@ interface EmbedOptions {
|
|
|
464
468
|
readonly dataServiceConfig?: DataServiceConfig;
|
|
465
469
|
readonly loadingStrategy?: 'gate' | 'immediate';
|
|
466
470
|
readonly dataCache?: SurfaceDataCache;
|
|
471
|
+
/** How the host writes an in-app link whose page was an expression; see the runtime's render/links.ts. */
|
|
472
|
+
readonly linkHref?: LinkHref;
|
|
467
473
|
readonly theme?: 'light' | 'dark';
|
|
468
474
|
readonly viewport?: BreakpointName;
|
|
469
475
|
readonly basePath?: string;
|
package/dist/index.js
CHANGED
|
@@ -36,6 +36,7 @@ function buildRendererProps(opts) {
|
|
|
36
36
|
if (opts.dataServiceConfig !== void 0) props.dataServiceConfig = opts.dataServiceConfig;
|
|
37
37
|
if (opts.loadingStrategy !== void 0) props.loadingStrategy = opts.loadingStrategy;
|
|
38
38
|
if (opts.dataCache !== void 0) props.dataCache = opts.dataCache;
|
|
39
|
+
if (opts.linkHref !== void 0) props.linkHref = opts.linkHref;
|
|
39
40
|
if (opts.interactionMode !== void 0) props.interactionMode = opts.interactionMode;
|
|
40
41
|
if (opts.basePath !== void 0) props.basePath = opts.basePath;
|
|
41
42
|
if (opts.imageAdapter !== void 0) props.imageAdapter = opts.imageAdapter;
|
|
@@ -213,6 +214,7 @@ function fatCoreOptions(opts) {
|
|
|
213
214
|
...opts.dataServiceConfig ? { dataServiceConfig: opts.dataServiceConfig } : {},
|
|
214
215
|
...opts.loadingStrategy !== void 0 ? { loadingStrategy: opts.loadingStrategy } : {},
|
|
215
216
|
...opts.dataCache !== void 0 ? { dataCache: opts.dataCache } : {},
|
|
217
|
+
...opts.linkHref !== void 0 ? { linkHref: opts.linkHref } : {},
|
|
216
218
|
...opts.theme !== void 0 ? { theme: opts.theme } : {},
|
|
217
219
|
...opts.viewport !== void 0 ? { viewport: opts.viewport } : {},
|
|
218
220
|
...opts.interactionMode !== void 0 ? { interactionMode: opts.interactionMode } : {},
|
|
@@ -1961,6 +1963,7 @@ function passthrough(options) {
|
|
|
1961
1963
|
...o.components !== void 0 ? { components: o.components } : {},
|
|
1962
1964
|
...o.loadingStrategy !== void 0 ? { loadingStrategy: o.loadingStrategy } : {},
|
|
1963
1965
|
...o.dataCache !== void 0 ? { dataCache: o.dataCache } : {},
|
|
1966
|
+
...o.linkHref !== void 0 ? { linkHref: o.linkHref } : {},
|
|
1964
1967
|
...o.placeholderMissingBlocks !== void 0 ? { placeholderMissingBlocks: o.placeholderMissingBlocks } : {}
|
|
1965
1968
|
};
|
|
1966
1969
|
}
|