@plitzi/plitzi-sdk 0.39.10 → 0.39.12

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/CHANGELOG.md CHANGED
@@ -1,5 +1,43 @@
1
1
  # @plitzi/plitzi-sdk
2
2
 
3
+ ## 0.39.12
4
+
5
+ ### Patch Changes
6
+
7
+ - 2f5b44d: Released with every `@plitzi` package at this version. What changed in each, and what to do when you upgrade, is in
8
+ `@plitzi/cli`'s `CHANGELOG.md`: one copy of the notes, not one per package.
9
+ - Updated dependencies [2f5b44d]
10
+ - @plitzi/sdk-auth@0.39.12
11
+ - @plitzi/sdk-dev-tools@0.39.12
12
+ - @plitzi/sdk-elements@0.39.12
13
+ - @plitzi/sdk-event-bridge@0.39.12
14
+ - @plitzi/sdk-interactions@0.39.12
15
+ - @plitzi/sdk-navigation@0.39.12
16
+ - @plitzi/sdk-plugins@0.39.12
17
+ - @plitzi/sdk-schema@0.39.12
18
+ - @plitzi/sdk-shared@0.39.12
19
+ - @plitzi/sdk-style@0.39.12
20
+ - @plitzi/sdk-variables@0.39.12
21
+
22
+ ## 0.39.11
23
+
24
+ ### Patch Changes
25
+
26
+ - d0b5be6: Released with every `@plitzi` package at this version. What changed in each, and what to do when you upgrade, is in
27
+ `@plitzi/cli`'s `CHANGELOG.md`: one copy of the notes, not one per package.
28
+ - Updated dependencies [d0b5be6]
29
+ - @plitzi/sdk-auth@0.39.11
30
+ - @plitzi/sdk-dev-tools@0.39.11
31
+ - @plitzi/sdk-elements@0.39.11
32
+ - @plitzi/sdk-event-bridge@0.39.11
33
+ - @plitzi/sdk-interactions@0.39.11
34
+ - @plitzi/sdk-navigation@0.39.11
35
+ - @plitzi/sdk-plugins@0.39.11
36
+ - @plitzi/sdk-schema@0.39.11
37
+ - @plitzi/sdk-shared@0.39.11
38
+ - @plitzi/sdk-style@0.39.11
39
+ - @plitzi/sdk-variables@0.39.11
40
+
3
41
  ## 0.39.10
4
42
 
5
43
  ### Patch Changes
package/dist/App.d.ts CHANGED
@@ -1,5 +1,8 @@
1
1
  import { EventBridgeContextValue } from '@plitzi/sdk-event-bridge';
2
2
  import { BadgeLinks, AnalyticsConfig, ColorScheme, Theme, Environment, OfflineDataRaw, RenderMode, Server, RuntimeStateInstance } from '@plitzi/sdk-shared';
3
+ import { VisitorFacts } from '@plitzi/sdk-shared/audiences';
4
+ import { ExperimentAssignments } from '@plitzi/sdk-shared/experiments';
5
+ import { RolloutBuckets } from '@plitzi/sdk-shared/flags';
3
6
  import { ThemeScope } from '@plitzi/sdk-shared/theme/react';
4
7
  import { ReactNode } from 'react';
5
8
  export type AppProps = {
@@ -72,6 +75,18 @@ export type AppProps = {
72
75
  * the cookie the dev tools write — so the page hydrates drawn the way the server drew it.
73
76
  */
74
77
  forcedFlags?: Record<string, boolean>;
78
+ /** The variants the rendering server drew — see `PlitziSdkProps`. */
79
+ serverExperiments?: ExperimentAssignments;
80
+ /** The visitor's places in the gradual rollouts the rendering server answered — see `PlitziSdkProps`. */
81
+ serverRollout?: RolloutBuckets;
82
+ /** What the space's audiences read of the visitor, as the rendering server read it — see `PlitziSdkProps`. */
83
+ serverVisitor?: VisitorFacts;
84
+ /** The instant the rendering server drew the page at — see `PlitziSdkProps`. */
85
+ renderedAt?: number;
86
+ /** The variants a tester forced — see `PlitziSdkProps`. */
87
+ forcedExperiments?: ExperimentAssignments;
88
+ /** The experiments the rendering server drew for this visitor — see `PlitziSdkProps`. */
89
+ drawnExperiments?: string[];
75
90
  /** The rendering server previews a run of agents — see `PlitziSdkProps`. */
76
91
  runStatus?: boolean;
77
92
  /** The state bridge alone, for a test runner — see `PlitziSdkProps`. */
@@ -79,5 +94,5 @@ export type AppProps = {
79
94
  onInitStateManager?: (instance: RuntimeStateInstance) => void;
80
95
  onInitEventBridge?: (instance: EventBridgeContextValue) => void;
81
96
  };
82
- declare const App: ({ className: classNameProp, children, webKey, server, renderMode: renderModeProp, routing, debugMode: debugModeProp, themeScope: themeScopeProp, theme, scheme, state, forcedFlags, ...sdkProps }: AppProps) => import('react').JSX.Element;
97
+ declare const App: ({ className: classNameProp, children, webKey, server, renderMode: renderModeProp, routing, debugMode: debugModeProp, themeScope: themeScopeProp, theme, scheme, state, forcedFlags, forcedExperiments, ...sdkProps }: AppProps) => import('react').JSX.Element;
83
98
  export default App;
package/dist/index.d.ts CHANGED
@@ -15,7 +15,10 @@ import { default as useNotify, Notify } from './modules/Space/useNotify';
15
15
  import { DeferredPlugin, PluginComponent } from './modules/Sdk/deferredPlugins';
16
16
  import { EventBridgeContextValue } from '@plitzi/sdk-event-bridge';
17
17
  import { BadgeLinks, ActionRunSummary, AnalyticsConfig, Element, Schema, Style, ComponentPluginFC, ComponentPlugin, InteractionCallback, InteractionCallbackParamValues, Environment, HostActions, OfflineDataRaw, RenderMode, Server, RuntimeStateInstance, Theme, ColorScheme, RealtimeMessage } from '@plitzi/sdk-shared';
18
+ import { VisitorFacts } from '@plitzi/sdk-shared/audiences';
18
19
  import { PluginDeclaration, NotificationOptions } from '@plitzi/sdk-shared/authoring';
20
+ import { ExperimentAssignments } from '@plitzi/sdk-shared/experiments';
21
+ import { RolloutBuckets } from '@plitzi/sdk-shared/flags';
19
22
  import { RealtimeMember } from '@plitzi/sdk-shared/realtime';
20
23
  import { ThemeScope } from '@plitzi/sdk-shared/theme/react';
21
24
  import { ReactNode } from 'react';
@@ -112,6 +115,36 @@ export type PlitziSdkProps = {
112
115
  * the cookie the dev tools write — so the page hydrates drawn the way the server drew it.
113
116
  */
114
117
  forcedFlags?: Record<string, boolean>;
118
+ /**
119
+ * Set by the server that rendered this page: the variant it drew each of the space's A/B tests with, by experiment —
120
+ * the page hydrates with them, and draws only what the server did not (`{{ experiments.<name> }}`).
121
+ */
122
+ serverExperiments?: ExperimentAssignments;
123
+ /**
124
+ * Set by the server that rendered this page: where the visitor stands in the space's gradual rollouts (a place 0–99
125
+ * per flag), so the page hydrates with the flags it was drawn with.
126
+ */
127
+ serverRollout?: RolloutBuckets;
128
+ /**
129
+ * Set by the server that rendered this page: what the space's audiences read of the visitor — returning, language,
130
+ * device — as the request said them, so the page hydrates the variant it was drawn with.
131
+ */
132
+ serverVisitor?: VisitorFacts;
133
+ /**
134
+ * Set by the server that rendered this page, for a space that shows things by the time (`timeWindow`): the instant it
135
+ * drew the page at, in ms — the page hydrates at it, then follows its own clock.
136
+ */
137
+ renderedAt?: number;
138
+ /**
139
+ * Set by the server that rendered this page for somebody allowed to debug it: the A/B variants a tester forced (the
140
+ * dev tools' Experiments tab, `?ab=heroTest:b`), shown over the visitor's own and never kept as theirs.
141
+ */
142
+ forcedExperiments?: ExperimentAssignments;
143
+ /**
144
+ * Set by the server that rendered this page: the experiments it drew for this visitor just now — reported to the
145
+ * space's analytics once, as one visitor of the variant drawn.
146
+ */
147
+ drawnExperiments?: string[];
115
148
  isHydrating?: boolean;
116
149
  previewMode?: boolean;
117
150
  /** Set by the server that metered this render: the account behind this space is over its quota, so the page says
@@ -1,5 +1,8 @@
1
1
  import { EventBridgeContextValue } from '@plitzi/sdk-event-bridge';
2
2
  import { BadgeLinks, HostActions, AnalyticsConfig, Environment, Server, RenderMode, RuntimeStateInstance, OfflineDataRaw } from '@plitzi/sdk-shared';
3
+ import { VisitorFacts } from '@plitzi/sdk-shared/audiences';
4
+ import { ExperimentAssignments } from '@plitzi/sdk-shared/experiments';
5
+ import { RolloutBuckets } from '@plitzi/sdk-shared/flags';
3
6
  export type AppMainProps = {
4
7
  revision?: number;
5
8
  webKey?: string;
@@ -32,6 +35,18 @@ export type AppMainProps = {
32
35
  serverFlags?: Record<string, boolean>;
33
36
  /** The flags a tester forced, already settled against whether this page may debug. */
34
37
  forcedFlags?: Record<string, boolean>;
38
+ /** The variants the rendering server drew — see `PlitziSdkProps`. */
39
+ serverExperiments?: ExperimentAssignments;
40
+ /** The visitor's places in the gradual rollouts the rendering server answered — see `PlitziSdkProps`. */
41
+ serverRollout?: RolloutBuckets;
42
+ /** What the space's audiences read of the visitor, as the rendering server read it — see `PlitziSdkProps`. */
43
+ serverVisitor?: VisitorFacts;
44
+ /** The instant the rendering server drew the page at — see `PlitziSdkProps`. */
45
+ renderedAt?: number;
46
+ /** The variants a tester forced, already settled against whether this page may debug. */
47
+ forcedExperiments?: ExperimentAssignments;
48
+ /** The experiments the rendering server drew for this visitor — see `PlitziSdkProps`. */
49
+ drawnExperiments?: string[];
35
50
  /** The rendering server previews a run of agents: the dev tools' Run tab asks it for the run. */
36
51
  runStatus?: boolean;
37
52
  /** The state bridge alone, for a test runner — see `PlitziSdkProps`. */
@@ -43,5 +58,5 @@ export type AppMainProps = {
43
58
  onInitStateManager?: (instance: RuntimeStateInstance) => void;
44
59
  onInitEventBridge?: (instance: EventBridgeContextValue) => void;
45
60
  };
46
- declare const AppMain: ({ revision, webKey, webId, environment, currentPageId, server, isHydrating, offlineMode, offlineData, offlineDataType, instanceId, renderMode, sdkStylePath, sdkDevToolsStylePath, sdkIconsStylePath, previewMode, debugMode, overQuota, quotaNear, badge, runStatus, inspector, analytics, onInitEventBridge, hostData, hostActions, flags, serverFlags, forcedFlags, onInitStateManager, ...sdkProps }: AppMainProps) => import('react').JSX.Element;
61
+ declare const AppMain: ({ revision, webKey, webId, environment, currentPageId, server, isHydrating, offlineMode, offlineData, offlineDataType, instanceId, renderMode, sdkStylePath, sdkDevToolsStylePath, sdkIconsStylePath, previewMode, debugMode, overQuota, quotaNear, badge, runStatus, inspector, analytics, onInitEventBridge, hostData, hostActions, flags, serverFlags, forcedFlags, serverExperiments, forcedExperiments, drawnExperiments, serverRollout, serverVisitor, renderedAt, onInitStateManager, ...sdkProps }: AppMainProps) => import('react').JSX.Element;
47
62
  export default AppMain;