@syntrologie/runtime-sdk 2.1.0 → 2.2.0-canary.1
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/CAPABILITIES.md +50 -43
- package/README.md +7 -7
- package/dist/RuntimeProvider.d.ts +1 -1
- package/dist/ShadowRootContext.d.ts +19 -0
- package/dist/SmartCanvasApp.d.ts +3 -3
- package/dist/SmartCanvasElement.d.ts +7 -2
- package/dist/SmartCanvasPortal.d.ts +1 -1
- package/dist/actions/executors/index.d.ts +3 -3
- package/dist/actions/executors/tour.d.ts +1 -1
- package/dist/actions/index.d.ts +4 -3
- package/dist/actions/schema.d.ts +1229 -0
- package/dist/actions/schema.js +67 -0
- package/dist/actions/schema.js.map +7 -0
- package/dist/adaptives/adaptive-chatbot/index.js +4 -4
- package/dist/adaptives/adaptive-chatbot/index.js.map +4 -4
- package/dist/adaptives/adaptive-content/index.js +2 -2
- package/dist/adaptives/adaptive-content/index.js.map +4 -4
- package/dist/adaptives/adaptive-faq/index.js +23 -6
- package/dist/adaptives/adaptive-faq/index.js.map +4 -4
- package/dist/adaptives/adaptive-gamification/index.js.map +1 -1
- package/dist/adaptives/adaptive-nav/index.js +22 -7
- package/dist/adaptives/adaptive-nav/index.js.map +4 -4
- package/dist/adaptives/adaptive-overlays/index.js +13 -13
- package/dist/adaptives/adaptive-overlays/index.js.map +4 -4
- package/dist/api.d.ts +2 -2
- package/dist/apps/examples/gamification-app.example.d.ts +4 -4
- package/dist/apps/index.d.ts +7 -7
- package/dist/blocks/data/index.d.ts +1 -1
- package/dist/blocks/index.d.ts +2 -2
- package/dist/blocks/interactive/index.d.ts +1 -1
- package/dist/blocks/notification/NotificationBlock.d.ts +1 -1
- package/dist/blocks/notification/index.d.ts +1 -1
- package/dist/bootstrap.d.ts +4 -4
- package/dist/chunk-AYTRRBR5.js +251 -0
- package/dist/chunk-AYTRRBR5.js.map +7 -0
- package/dist/chunk-HJKAXD5S.js +7921 -0
- package/dist/chunk-HJKAXD5S.js.map +7 -0
- package/dist/components/ShadowCanvasOverlay.d.ts +2 -2
- package/dist/components/TileCard.d.ts +1 -1
- package/dist/context/ContextManager.d.ts +1 -1
- package/dist/context/index.d.ts +3 -3
- package/dist/decisions/engine.d.ts +1 -1
- package/dist/decisions/index.d.ts +3 -3
- package/dist/decisions/schema.d.ts +24 -24
- package/dist/decisions/strategies/rules.d.ts +1 -1
- package/dist/decisions/strategies/score.d.ts +1 -1
- package/dist/editorLoader.d.ts +4 -4
- package/dist/events/EventAccumulator.d.ts +1 -1
- package/dist/events/EventBus.d.ts +1 -1
- package/dist/events/index.d.ts +7 -6
- package/dist/events/registerConfigPredicates.d.ts +19 -0
- package/dist/experiments/adapters/growthbook.d.ts +1 -1
- package/dist/experiments/index.d.ts +2 -2
- package/dist/experiments/registry.d.ts +1 -1
- package/dist/fetchers/index.d.ts +2 -2
- package/dist/hooks/useShadowCanvasConfig.d.ts +1 -1
- package/dist/hostPatcher/index.d.ts +2 -2
- package/dist/index.d.ts +24 -21
- package/dist/index.js +816 -75
- package/dist/index.js.map +7 -1
- package/dist/metrics/index.d.ts +1 -1
- package/dist/notifications/index.d.ts +6 -6
- package/dist/overlays/runtime/index.d.ts +3 -3
- package/dist/overlays/runtime/overlay/root.d.ts +17 -1
- package/dist/overlays/runtime/overlay/tooltip.d.ts +1 -1
- package/dist/react.js +90 -134
- package/dist/react.js.map +7 -1
- package/dist/render/RenderContext.d.ts +2 -2
- package/dist/render/index.d.ts +2 -2
- package/dist/render/types.d.ts +2 -2
- package/dist/runtime.d.ts +8 -8
- package/dist/smart-canvas.esm.js +127 -124
- package/dist/smart-canvas.esm.js.map +4 -4
- package/dist/smart-canvas.js +17160 -16782
- package/dist/smart-canvas.js.map +4 -4
- package/dist/smart-canvas.min.js +127 -124
- package/dist/smart-canvas.min.js.map +4 -4
- package/dist/state/StateStore.d.ts +1 -1
- package/dist/state/helpers/cooldowns.d.ts +1 -1
- package/dist/state/helpers/dismissals.d.ts +1 -1
- package/dist/state/helpers/frequency.d.ts +1 -1
- package/dist/state/index.d.ts +3 -3
- package/dist/surfaces/index.d.ts +3 -3
- package/dist/surfaces/positioning.d.ts +1 -1
- package/dist/telemetry/adapters/posthog.d.ts +2 -2
- package/dist/telemetry/index.d.ts +3 -3
- package/dist/telemetry/registry.d.ts +1 -1
- package/dist/theme/ThemeProvider.d.ts +1 -1
- package/dist/theme/extractHostTheme.d.ts +1 -1
- package/dist/theme/index.d.ts +4 -4
- package/dist/types-only.d.ts +1 -1
- package/dist/types-only.js +1 -11
- package/dist/types-only.js.map +7 -1
- package/dist/types.d.ts +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/widgets/index.d.ts +1 -1
- package/package.json +24 -17
- package/schema/canvas-config.base.schema.json +351 -0
- package/schema/canvas-config.schema.json +3202 -440
- package/scripts/validate-config.mjs +54 -58
- package/dist/RuntimeProvider.js +0 -113
- package/dist/RuntimeProvider.js.map +0 -1
- package/dist/SmartCanvasApp.js +0 -143
- package/dist/SmartCanvasApp.js.map +0 -1
- package/dist/SmartCanvasElement.js +0 -138
- package/dist/SmartCanvasElement.js.map +0 -1
- package/dist/SmartCanvasPortal.js +0 -17
- package/dist/SmartCanvasPortal.js.map +0 -1
- package/dist/actions/ActionEngine.js +0 -272
- package/dist/actions/ActionEngine.js.map +0 -1
- package/dist/actions/executors/index.js +0 -240
- package/dist/actions/executors/index.js.map +0 -1
- package/dist/actions/executors/tour.js +0 -332
- package/dist/actions/executors/tour.js.map +0 -1
- package/dist/actions/index.js +0 -12
- package/dist/actions/index.js.map +0 -1
- package/dist/actions/types.js +0 -8
- package/dist/actions/types.js.map +0 -1
- package/dist/actions/validation.js +0 -577
- package/dist/actions/validation.js.map +0 -1
- package/dist/antiFlicker.js +0 -39
- package/dist/antiFlicker.js.map +0 -1
- package/dist/api.js +0 -205
- package/dist/api.js.map +0 -1
- package/dist/apps/AppContext.js +0 -91
- package/dist/apps/AppContext.js.map +0 -1
- package/dist/apps/AppLoader.js +0 -293
- package/dist/apps/AppLoader.js.map +0 -1
- package/dist/apps/AppRegistry.js +0 -317
- package/dist/apps/AppRegistry.js.map +0 -1
- package/dist/apps/examples/gamification-app.example.js +0 -329
- package/dist/apps/examples/gamification-app.example.js.map +0 -1
- package/dist/apps/index.js +0 -16
- package/dist/apps/index.js.map +0 -1
- package/dist/apps/types.js +0 -8
- package/dist/apps/types.js.map +0 -1
- package/dist/blocks/data/ComparisonBlock.js +0 -95
- package/dist/blocks/data/ComparisonBlock.js.map +0 -1
- package/dist/blocks/data/StatsBlock.js +0 -102
- package/dist/blocks/data/StatsBlock.js.map +0 -1
- package/dist/blocks/data/index.js +0 -3
- package/dist/blocks/data/index.js.map +0 -1
- package/dist/blocks/index.js +0 -93
- package/dist/blocks/index.js.map +0 -1
- package/dist/blocks/interactive/ChecklistBlock.js +0 -111
- package/dist/blocks/interactive/ChecklistBlock.js.map +0 -1
- package/dist/blocks/interactive/RatingBlock.js +0 -147
- package/dist/blocks/interactive/RatingBlock.js.map +0 -1
- package/dist/blocks/interactive/index.js +0 -3
- package/dist/blocks/interactive/index.js.map +0 -1
- package/dist/blocks/notification/NotificationBlock.js +0 -171
- package/dist/blocks/notification/NotificationBlock.js.map +0 -1
- package/dist/blocks/notification/index.js +0 -2
- package/dist/blocks/notification/index.js.map +0 -1
- package/dist/blocks/theme-tokens.js +0 -25
- package/dist/blocks/theme-tokens.js.map +0 -1
- package/dist/bootstrap.js +0 -448
- package/dist/bootstrap.js.map +0 -1
- package/dist/bundle-entry.js +0 -9
- package/dist/bundle-entry.js.map +0 -1
- package/dist/components/ShadowCanvasOverlay.js +0 -327
- package/dist/components/ShadowCanvasOverlay.js.map +0 -1
- package/dist/components/TileCard.js +0 -103
- package/dist/components/TileCard.js.map +0 -1
- package/dist/components/TileWheel.js +0 -50
- package/dist/components/TileWheel.js.map +0 -1
- package/dist/config-validator.js +0 -173
- package/dist/config-validator.js.map +0 -1
- package/dist/configFetcher.js +0 -131
- package/dist/configFetcher.js.map +0 -1
- package/dist/context/ContextManager.js +0 -269
- package/dist/context/ContextManager.js.map +0 -1
- package/dist/context/index.js +0 -7
- package/dist/context/index.js.map +0 -1
- package/dist/context/schema.js +0 -50
- package/dist/context/schema.js.map +0 -1
- package/dist/context/types.js +0 -8
- package/dist/context/types.js.map +0 -1
- package/dist/controller.js +0 -34
- package/dist/controller.js.map +0 -1
- package/dist/decisions/engine.js +0 -117
- package/dist/decisions/engine.js.map +0 -1
- package/dist/decisions/index.js +0 -10
- package/dist/decisions/index.js.map +0 -1
- package/dist/decisions/schema.js +0 -151
- package/dist/decisions/schema.js.map +0 -1
- package/dist/decisions/strategies/rules.js +0 -166
- package/dist/decisions/strategies/rules.js.map +0 -1
- package/dist/decisions/strategies/score.js +0 -29
- package/dist/decisions/strategies/score.js.map +0 -1
- package/dist/decisions/types.js +0 -2
- package/dist/decisions/types.js.map +0 -1
- package/dist/earlyPatcher.js +0 -20
- package/dist/earlyPatcher.js.map +0 -1
- package/dist/editorLoader.js +0 -254
- package/dist/editorLoader.js.map +0 -1
- package/dist/events/EventAccumulator.js +0 -101
- package/dist/events/EventAccumulator.js.map +0 -1
- package/dist/events/EventBus.js +0 -152
- package/dist/events/EventBus.js.map +0 -1
- package/dist/events/index.js +0 -11
- package/dist/events/index.js.map +0 -1
- package/dist/events/normalizers/canvas.js +0 -116
- package/dist/events/normalizers/canvas.js.map +0 -1
- package/dist/events/normalizers/posthog.js +0 -171
- package/dist/events/normalizers/posthog.js.map +0 -1
- package/dist/events/schema.js +0 -30
- package/dist/events/schema.js.map +0 -1
- package/dist/events/types.js +0 -54
- package/dist/events/types.js.map +0 -1
- package/dist/experiments/adapters/growthbook.js +0 -81
- package/dist/experiments/adapters/growthbook.js.map +0 -1
- package/dist/experiments/index.js +0 -4
- package/dist/experiments/index.js.map +0 -1
- package/dist/experiments/registry.js +0 -30
- package/dist/experiments/registry.js.map +0 -1
- package/dist/experiments/types.js +0 -2
- package/dist/experiments/types.js.map +0 -1
- package/dist/fetchers/cdnFetcher.js +0 -96
- package/dist/fetchers/cdnFetcher.js.map +0 -1
- package/dist/fetchers/experimentsFetcher.js +0 -109
- package/dist/fetchers/experimentsFetcher.js.map +0 -1
- package/dist/fetchers/index.js +0 -5
- package/dist/fetchers/index.js.map +0 -1
- package/dist/fetchers/mergeConfigs.js +0 -38
- package/dist/fetchers/mergeConfigs.js.map +0 -1
- package/dist/fetchers/registry.js +0 -58
- package/dist/fetchers/registry.js.map +0 -1
- package/dist/fetchers/types.js +0 -2
- package/dist/fetchers/types.js.map +0 -1
- package/dist/hooks/useCanvasOverlays.js +0 -128
- package/dist/hooks/useCanvasOverlays.js.map +0 -1
- package/dist/hooks/useHostPatches.js +0 -40
- package/dist/hooks/useHostPatches.js.map +0 -1
- package/dist/hooks/useShadowCanvasConfig.js +0 -63
- package/dist/hooks/useShadowCanvasConfig.js.map +0 -1
- package/dist/hostPatcher/core/patcher.js +0 -181
- package/dist/hostPatcher/core/patcher.js.map +0 -1
- package/dist/hostPatcher/core/sanitizer.js +0 -66
- package/dist/hostPatcher/core/sanitizer.js.map +0 -1
- package/dist/hostPatcher/core/types.js +0 -2
- package/dist/hostPatcher/core/types.js.map +0 -1
- package/dist/hostPatcher/index.js +0 -7
- package/dist/hostPatcher/index.js.map +0 -1
- package/dist/hostPatcher/policy/defaultPolicy.js +0 -23
- package/dist/hostPatcher/policy/defaultPolicy.js.map +0 -1
- package/dist/hostPatcher/utils/anchors.js +0 -105
- package/dist/hostPatcher/utils/anchors.js.map +0 -1
- package/dist/hostPatcher/utils/observer.js +0 -11
- package/dist/hostPatcher/utils/observer.js.map +0 -1
- package/dist/logger.js +0 -81
- package/dist/logger.js.map +0 -1
- package/dist/metrics/index.js +0 -5
- package/dist/metrics/index.js.map +0 -1
- package/dist/metrics/sessionMetrics.js +0 -178
- package/dist/metrics/sessionMetrics.js.map +0 -1
- package/dist/notifications/NotificationToastStack.js +0 -118
- package/dist/notifications/NotificationToastStack.js.map +0 -1
- package/dist/notifications/index.js +0 -6
- package/dist/notifications/index.js.map +0 -1
- package/dist/notifications/matcher.js +0 -66
- package/dist/notifications/matcher.js.map +0 -1
- package/dist/notifications/types.js +0 -13
- package/dist/notifications/types.js.map +0 -1
- package/dist/notifications/useNotifications.js +0 -104
- package/dist/notifications/useNotifications.js.map +0 -1
- package/dist/notifications/useNotifyWatcher.js +0 -62
- package/dist/notifications/useNotifyWatcher.js.map +0 -1
- package/dist/overlays/fetcher.js +0 -15
- package/dist/overlays/fetcher.js.map +0 -1
- package/dist/overlays/recipeRegistry.js +0 -32
- package/dist/overlays/recipeRegistry.js.map +0 -1
- package/dist/overlays/runtime/anchor/resolve.js +0 -87
- package/dist/overlays/runtime/anchor/resolve.js.map +0 -1
- package/dist/overlays/runtime/index.js +0 -8
- package/dist/overlays/runtime/index.js.map +0 -1
- package/dist/overlays/runtime/overlay/highlight.js +0 -160
- package/dist/overlays/runtime/overlay/highlight.js.map +0 -1
- package/dist/overlays/runtime/overlay/modal.js +0 -78
- package/dist/overlays/runtime/overlay/modal.js.map +0 -1
- package/dist/overlays/runtime/overlay/root.js +0 -297
- package/dist/overlays/runtime/overlay/root.js.map +0 -1
- package/dist/overlays/runtime/overlay/runner.js +0 -602
- package/dist/overlays/runtime/overlay/runner.js.map +0 -1
- package/dist/overlays/runtime/overlay/tooltip.js +0 -232
- package/dist/overlays/runtime/overlay/tooltip.js.map +0 -1
- package/dist/overlays/runtime/utils/dom.js +0 -12
- package/dist/overlays/runtime/utils/dom.js.map +0 -1
- package/dist/overlays/schema.js +0 -52
- package/dist/overlays/schema.js.map +0 -1
- package/dist/overlays/types.js +0 -2
- package/dist/overlays/types.js.map +0 -1
- package/dist/render/RenderContext.js +0 -69
- package/dist/render/RenderContext.js.map +0 -1
- package/dist/render/index.js +0 -3
- package/dist/render/index.js.map +0 -1
- package/dist/render/types.js +0 -2
- package/dist/render/types.js.map +0 -1
- package/dist/runtime.js +0 -237
- package/dist/runtime.js.map +0 -1
- package/dist/state/StateStore.js +0 -176
- package/dist/state/StateStore.js.map +0 -1
- package/dist/state/helpers/cooldowns.js +0 -31
- package/dist/state/helpers/cooldowns.js.map +0 -1
- package/dist/state/helpers/dismissals.js +0 -34
- package/dist/state/helpers/dismissals.js.map +0 -1
- package/dist/state/helpers/frequency.js +0 -43
- package/dist/state/helpers/frequency.js.map +0 -1
- package/dist/state/index.js +0 -7
- package/dist/state/index.js.map +0 -1
- package/dist/state/schema.js +0 -25
- package/dist/state/schema.js.map +0 -1
- package/dist/state/types.js +0 -9
- package/dist/state/types.js.map +0 -1
- package/dist/store/example.js +0 -43
- package/dist/store/example.js.map +0 -1
- package/dist/store/mini-effector.js +0 -88
- package/dist/store/mini-effector.js.map +0 -1
- package/dist/surfaces/Surfaces.js +0 -361
- package/dist/surfaces/Surfaces.js.map +0 -1
- package/dist/surfaces/index.js +0 -12
- package/dist/surfaces/index.js.map +0 -1
- package/dist/surfaces/positioning.js +0 -228
- package/dist/surfaces/positioning.js.map +0 -1
- package/dist/surfaces/types.js +0 -23
- package/dist/surfaces/types.js.map +0 -1
- package/dist/telemetry/adapters/noop.js +0 -42
- package/dist/telemetry/adapters/noop.js.map +0 -1
- package/dist/telemetry/adapters/posthog.js +0 -180
- package/dist/telemetry/adapters/posthog.js.map +0 -1
- package/dist/telemetry/index.js +0 -4
- package/dist/telemetry/index.js.map +0 -1
- package/dist/telemetry/registry.js +0 -29
- package/dist/telemetry/registry.js.map +0 -1
- package/dist/telemetry/types.js +0 -2
- package/dist/telemetry/types.js.map +0 -1
- package/dist/theme/ThemeProvider.js +0 -109
- package/dist/theme/ThemeProvider.js.map +0 -1
- package/dist/theme/defaultTheme.js +0 -190
- package/dist/theme/defaultTheme.js.map +0 -1
- package/dist/theme/extractHostTheme.js +0 -259
- package/dist/theme/extractHostTheme.js.map +0 -1
- package/dist/theme/index.js +0 -7
- package/dist/theme/index.js.map +0 -1
- package/dist/theme/types.js +0 -6
- package/dist/theme/types.js.map +0 -1
- package/dist/token.js +0 -44
- package/dist/token.js.map +0 -1
- package/dist/types.js +0 -17
- package/dist/types.js.map +0 -1
- package/dist/version.js +0 -14
- package/dist/version.js.map +0 -1
- package/dist/widgets/WidgetRegistry.js +0 -190
- package/dist/widgets/WidgetRegistry.js.map +0 -1
- package/dist/widgets/index.js +0 -7
- package/dist/widgets/index.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { CooldownStore, DismissalStore, FrequencyStore, ScopedStorage } from './types';
|
|
2
2
|
export interface StateStoreOptions {
|
|
3
3
|
/** Namespace prefix for storage keys */
|
|
4
4
|
namespace?: string;
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Tracks time-based cooldowns to prevent items from showing too frequently.
|
|
5
5
|
*/
|
|
6
|
-
import type {
|
|
6
|
+
import type { CooldownStore, ScopedStorage } from '../types';
|
|
7
7
|
export declare function createCooldownStore(storage: ScopedStorage): CooldownStore;
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Tracks dismissed items in session or user storage.
|
|
5
5
|
*/
|
|
6
|
-
import type {
|
|
6
|
+
import type { DismissalStore, ScopedStorage } from '../types';
|
|
7
7
|
export declare function createDismissalStore(sessionStorage: ScopedStorage, userStorage: ScopedStorage): DismissalStore;
|
|
@@ -4,5 +4,5 @@
|
|
|
4
4
|
* Tracks how many times items have been shown or actions taken,
|
|
5
5
|
* optionally resetting after a time window.
|
|
6
6
|
*/
|
|
7
|
-
import type {
|
|
7
|
+
import type { FrequencyStore, ScopedStorage } from '../types';
|
|
8
8
|
export declare function createFrequencyStore(storage: ScopedStorage): FrequencyStore;
|
package/dist/state/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* State module exports.
|
|
3
3
|
*/
|
|
4
|
-
export * from './types';
|
|
5
|
-
export * from './schema';
|
|
6
|
-
export { StateStore, createStateStore } from './StateStore';
|
|
7
4
|
export type { StateStoreOptions } from './StateStore';
|
|
5
|
+
export { createStateStore, StateStore } from './StateStore';
|
|
6
|
+
export * from './schema';
|
|
7
|
+
export * from './types';
|
package/dist/surfaces/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Managed surface system for rendering UI into named slots.
|
|
5
5
|
*/
|
|
6
|
+
export { ANIMATION_KEYFRAMES, applyStaticSlotStyles, createSurfaceContainer, getSlotZIndex, playEnterAnimation, playExitAnimation, STATIC_SLOT_STYLES, setupAdjacentPositioning, setupInlinePositioning, } from './positioning';
|
|
6
7
|
export { createSurfaces } from './Surfaces';
|
|
7
|
-
export type {
|
|
8
|
-
export {
|
|
9
|
-
export { STATIC_SLOT_STYLES, ANIMATION_KEYFRAMES, applyStaticSlotStyles, setupAdjacentPositioning, setupInlinePositioning, playEnterAnimation, playExitAnimation, createSurfaceContainer, getSlotZIndex, } from './positioning';
|
|
8
|
+
export type { AdjacentSurfaceSlot, AnimationType, CustomContent, HtmlContent, InlineSurfaceSlot, MountConstraints, MountHandle, MountOptions, PositionConfig, ReactContent, RenderableContent, StaticSurfaceSlot, SurfaceChangeCallback, SurfaceSlot, SurfaceState, Surfaces, SurfacesOptions, SurfacesWidgetRegistry, WidgetContent, } from './types';
|
|
9
|
+
export { getSlotAnchorId, getSlotType } from './types';
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Handles positioning for different slot types using CSS for static slots
|
|
5
5
|
* and Floating UI for adjacent slots.
|
|
6
6
|
*/
|
|
7
|
-
import type {
|
|
7
|
+
import type { AnimationType, MountConstraints, PositionConfig, StaticSurfaceSlot, SurfaceSlot } from './types';
|
|
8
8
|
/**
|
|
9
9
|
* CSS styles for static surface slots.
|
|
10
10
|
*/
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* and use the TelemetryClient interface.
|
|
6
6
|
*/
|
|
7
7
|
import type { PostHog, Properties } from 'posthog-js';
|
|
8
|
-
import type {
|
|
8
|
+
import type { CanvasSurface, TelemetryClient } from '../types';
|
|
9
9
|
export interface PostHogAdapterOptions {
|
|
10
10
|
/**
|
|
11
11
|
* PostHog API key.
|
|
@@ -67,7 +67,7 @@ interface CanvasAnalyticsPayload extends Properties {
|
|
|
67
67
|
* Internal adapter that implements TelemetryClient using PostHog.
|
|
68
68
|
*/
|
|
69
69
|
export declare class PostHogAdapter implements TelemetryClient {
|
|
70
|
-
|
|
70
|
+
readonly options: PostHogAdapterOptions;
|
|
71
71
|
private client?;
|
|
72
72
|
private featureFlagsCallback?;
|
|
73
73
|
private captureCallback?;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type { TelemetryClient, CanvasSurface } from './types';
|
|
2
|
-
export { createPostHogClient } from './adapters/posthog';
|
|
3
|
-
export type { PostHogAdapterOptions } from './adapters/posthog';
|
|
4
1
|
export { createNoopClient } from './adapters/noop';
|
|
2
|
+
export type { PostHogAdapterOptions } from './adapters/posthog';
|
|
3
|
+
export { createPostHogClient } from './adapters/posthog';
|
|
4
|
+
export type { CanvasSurface, TelemetryClient } from './types';
|
package/dist/theme/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export
|
|
2
|
-
export {
|
|
3
|
-
export { extractHostTheme, mergeWithExtractedTheme, autoDetectTheme } from './extractHostTheme';
|
|
4
|
-
export { ThemeProvider, useTheme, useThemeToken, useThemeVar } from './ThemeProvider';
|
|
1
|
+
export { darkTheme, getDefaultTheme, lightTheme, themeToCssVariables, withAlpha, } from './defaultTheme';
|
|
2
|
+
export { autoDetectTheme, extractHostTheme, mergeWithExtractedTheme } from './extractHostTheme';
|
|
5
3
|
export type { ThemeProviderProps } from './ThemeProvider';
|
|
4
|
+
export { ThemeProvider, useTheme, useThemeToken, useThemeVar } from './ThemeProvider';
|
|
5
|
+
export type { CanvasThemeTokens, ExtractedTheme, ThemeAppearance, ThemeMode } from './types';
|
package/dist/types-only.d.ts
CHANGED
|
@@ -29,4 +29,4 @@ export interface EditorPanelProps {
|
|
|
29
29
|
/** Platform client for API calls (optional) */
|
|
30
30
|
platformClient?: unknown;
|
|
31
31
|
}
|
|
32
|
-
export type {
|
|
32
|
+
export type { ActionExecutor, ActionHandle, ActionKind, ActionState, ActionStep, ActiveAction, AddClassAction, AdjacentSurfaceSlot, BadgeAction, BadgePosition, BatchActionHandle, ExecutorCleanup, ExecutorContext, ExecutorResult, ExecutorUpdate, HighlightAction, HighlightStyle, InlineSurfaceSlot, InsertHtmlAction, InsertPosition, MountWidgetAction, NavigateAction, PulseAction, RemoveClassAction, ScrollToAction, SetAttrAction, SetStyleAction, SetTextAction, StaticSurfaceSlot, SurfaceSlot, TooltipAction, TooltipContent, TooltipTrigger, ValidationError, ValidationResult, ValidationWarning, WidgetConfig, } from './actions/types';
|
package/dist/types-only.js
CHANGED
|
@@ -1,11 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* Types-only export for app packages.
|
|
3
|
-
*
|
|
4
|
-
* This file re-exports action types without importing any runtime code,
|
|
5
|
-
* allowing app packages to import types without circular dependency issues.
|
|
6
|
-
*
|
|
7
|
-
* Apps should import from "@syntrologie/runtime-sdk/types" instead of
|
|
8
|
-
* the main entry point when they only need type definitions.
|
|
9
|
-
*/
|
|
10
|
-
export {};
|
|
11
|
-
//# sourceMappingURL=types-only.js.map
|
|
1
|
+
//# sourceMappingURL=types-only.js.map
|
package/dist/types-only.js.map
CHANGED
package/dist/types.d.ts
CHANGED
|
@@ -204,7 +204,7 @@ export interface TableContent {
|
|
|
204
204
|
maxHeight?: string;
|
|
205
205
|
}
|
|
206
206
|
export type DataContent = StatsContent | ComparisonContent | ChartContent | TableContent;
|
|
207
|
-
export type { ActivationConfig,
|
|
207
|
+
export type { ActivationConfig, DecisionStrategy, RouteFilter } from './decisions/types';
|
|
208
208
|
/**
|
|
209
209
|
* Full tile configuration.
|
|
210
210
|
*
|
package/dist/version.d.ts
CHANGED
package/dist/widgets/index.d.ts
CHANGED
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Extensible widget registry for mountable components.
|
|
5
5
|
*/
|
|
6
|
+
export type { MountableWidget, MountedWidgetHandle, WidgetCleanup, WidgetRegistration, } from './WidgetRegistry';
|
|
6
7
|
export { WidgetRegistry, widgetRegistry } from './WidgetRegistry';
|
|
7
|
-
export type { MountableWidget, WidgetRegistration, MountedWidgetHandle, WidgetCleanup, } from './WidgetRegistry';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@syntrologie/runtime-sdk",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0-canary.1",
|
|
4
4
|
"description": "Syntrologie Runtime SDK for web experimentation and analytics",
|
|
5
5
|
"license": "Proprietary",
|
|
6
6
|
"private": false,
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
10
10
|
"url": "https://github.com/SyntropyForge/amazing-demos.git",
|
|
11
|
-
"directory": "
|
|
11
|
+
"directory": "packages/runtime-sdk"
|
|
12
12
|
},
|
|
13
13
|
"publishConfig": {
|
|
14
14
|
"access": "public"
|
|
@@ -46,44 +46,51 @@
|
|
|
46
46
|
"scripts": {
|
|
47
47
|
"clean": "rm -rf dist",
|
|
48
48
|
"aggregate-capabilities": "node ./scripts/aggregate-capabilities.mjs",
|
|
49
|
-
"
|
|
50
|
-
"
|
|
49
|
+
"generate-schema": "node ./scripts/generate-unified-schema.mjs",
|
|
50
|
+
"generate-schema:check": "node ./scripts/generate-unified-schema.mjs --check",
|
|
51
|
+
"build": "npm run aggregate-capabilities && npm run build:types && npm run build:lib && npm run generate-schema && npm run build:cdn",
|
|
52
|
+
"build:types": "tsc --project tsconfig.build.json",
|
|
53
|
+
"build:lib": "node ./scripts/build-lib.mjs",
|
|
51
54
|
"build:cdn": "node ./scripts/build-cdn.js",
|
|
52
55
|
"dev:adaptives": "node ./scripts/build-adaptives-only.js --watch",
|
|
53
56
|
"validate-config": "node ./scripts/validate-config.mjs",
|
|
57
|
+
"typecheck": "tsc --noEmit -p tsconfig.build.json",
|
|
54
58
|
"test": "vitest run",
|
|
55
59
|
"prepublishOnly": "npm run clean && npm run build"
|
|
56
60
|
},
|
|
57
61
|
"dependencies": {
|
|
58
62
|
"@floating-ui/dom": "^1.7.5",
|
|
59
63
|
"@growthbook/growthbook": "~1.6.2",
|
|
60
|
-
"@growthbook/growthbook-react": "
|
|
61
|
-
"@
|
|
62
|
-
"@syntrologie/adapt-
|
|
63
|
-
"@syntrologie/adapt-overlays": "2.1.0",
|
|
64
|
+
"@growthbook/growthbook-react": "^1.6.4",
|
|
65
|
+
"@syntrologie/adapt-content": "2.2.0-canary.1",
|
|
66
|
+
"@syntrologie/adapt-overlays": "2.2.0-canary.1",
|
|
64
67
|
"posthog-js": "~1.302.2",
|
|
65
|
-
"zod": "
|
|
68
|
+
"zod": "^3.25.76"
|
|
66
69
|
},
|
|
67
70
|
"peerDependencies": {
|
|
68
71
|
"react": ">=18.0.0",
|
|
69
72
|
"react-dom": ">=18.0.0"
|
|
70
73
|
},
|
|
71
74
|
"devDependencies": {
|
|
75
|
+
"@syntro/design-system": "*",
|
|
72
76
|
"@semantic-release/exec": "~7.1.0",
|
|
73
77
|
"@semantic-release/github": "~12.0.3",
|
|
74
78
|
"@semantic-release/npm": "~13.1.3",
|
|
75
79
|
"@testing-library/dom": "^10.4.1",
|
|
76
80
|
"@testing-library/jest-dom": "^6.9.1",
|
|
77
81
|
"@testing-library/react": "^16.3.2",
|
|
78
|
-
"@types/node": "^
|
|
79
|
-
"@types/react": "^19.
|
|
80
|
-
"@types/react-dom": "^19.
|
|
82
|
+
"@types/node": "^22.19.7",
|
|
83
|
+
"@types/react": "^19.2.0",
|
|
84
|
+
"@types/react-dom": "^19.2.0",
|
|
85
|
+
"ajv": "^8.18.0",
|
|
86
|
+
"ajv-formats": "^3.0.1",
|
|
81
87
|
"esbuild": "^0.27.2",
|
|
82
|
-
"jsdom": "^
|
|
83
|
-
"react": "^19.2.
|
|
84
|
-
"react-dom": "^19.2.
|
|
88
|
+
"jsdom": "^26.1.0",
|
|
89
|
+
"react": "^19.2.0",
|
|
90
|
+
"react-dom": "^19.2.0",
|
|
85
91
|
"semantic-release": "~25.0.3",
|
|
86
|
-
"typescript": "
|
|
87
|
-
"vitest": "^4.0.18"
|
|
92
|
+
"typescript": "^5.9.3",
|
|
93
|
+
"vitest": "^4.0.18",
|
|
94
|
+
"zod-to-json-schema": "^3.25.1"
|
|
88
95
|
}
|
|
89
96
|
}
|
|
@@ -0,0 +1,351 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://syntropyforge.com/schemas/smart-canvas-config.json",
|
|
4
|
+
"title": "Smart Canvas Configuration",
|
|
5
|
+
"description": "Action-based configuration for Smart Canvas. All interventions are unified as ActionStep.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["fetchedAt", "tiles", "actions"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"fetchedAt": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"format": "date-time",
|
|
12
|
+
"description": "When the config was fetched"
|
|
13
|
+
},
|
|
14
|
+
"configVersion": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"description": "Version string for cache invalidation"
|
|
17
|
+
},
|
|
18
|
+
"canvasTitle": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"description": "Display title for the canvas"
|
|
21
|
+
},
|
|
22
|
+
"tiles": {
|
|
23
|
+
"type": "array",
|
|
24
|
+
"description": "Tiles to display in the canvas drawer",
|
|
25
|
+
"items": { "$ref": "#/$defs/tile" }
|
|
26
|
+
},
|
|
27
|
+
"actions": {
|
|
28
|
+
"type": "array",
|
|
29
|
+
"description": "Actions to execute. This is the unified intervention format - every DOM change, tooltip, highlight, or modal is an ActionStep.",
|
|
30
|
+
"items": { "$ref": "#/$defs/actionStep" }
|
|
31
|
+
},
|
|
32
|
+
"theme": {
|
|
33
|
+
"$ref": "#/$defs/themeConfig",
|
|
34
|
+
"description": "Theme configuration"
|
|
35
|
+
},
|
|
36
|
+
"launcher": {
|
|
37
|
+
"$ref": "#/$defs/launcherConfig",
|
|
38
|
+
"description": "Launcher button configuration"
|
|
39
|
+
},
|
|
40
|
+
"routes": {
|
|
41
|
+
"$ref": "#/$defs/routesConfig",
|
|
42
|
+
"description": "Route filtering"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"additionalProperties": false,
|
|
46
|
+
"$defs": {
|
|
47
|
+
"tile": {
|
|
48
|
+
"type": "object",
|
|
49
|
+
"required": ["id", "widget"],
|
|
50
|
+
"properties": {
|
|
51
|
+
"id": { "type": "string" },
|
|
52
|
+
"title": { "type": "string" },
|
|
53
|
+
"priority": { "type": "number" },
|
|
54
|
+
"widget": { "type": "string" },
|
|
55
|
+
"props": { "type": "object" },
|
|
56
|
+
"notifications": {
|
|
57
|
+
"type": "array",
|
|
58
|
+
"description": "Declarative rules mapping EventBus events to toast notifications",
|
|
59
|
+
"items": {
|
|
60
|
+
"type": "object",
|
|
61
|
+
"required": ["on", "title"],
|
|
62
|
+
"properties": {
|
|
63
|
+
"on": { "type": "string", "description": "EventBus event name (exact or regex)" },
|
|
64
|
+
"title": { "type": "string", "description": "Toast title (supports {{props.x}})" },
|
|
65
|
+
"body": { "type": "string", "description": "Toast body (supports {{props.x}})" },
|
|
66
|
+
"icon": { "type": "string", "description": "Icon name or emoji" },
|
|
67
|
+
"ttl": {
|
|
68
|
+
"type": "number",
|
|
69
|
+
"description": "Auto-dismiss ms (default 8000)",
|
|
70
|
+
"default": 8000
|
|
71
|
+
},
|
|
72
|
+
"cooldown": {
|
|
73
|
+
"type": "number",
|
|
74
|
+
"description": "Cooldown ms (default 30000)",
|
|
75
|
+
"default": 30000
|
|
76
|
+
},
|
|
77
|
+
"deepLink": {
|
|
78
|
+
"type": "object",
|
|
79
|
+
"properties": {
|
|
80
|
+
"tileId": { "type": "string" },
|
|
81
|
+
"itemId": { "type": "string", "description": "Supports {{props.x}}" }
|
|
82
|
+
},
|
|
83
|
+
"required": ["tileId"]
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
"additionalProperties": false
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"additionalProperties": false
|
|
91
|
+
},
|
|
92
|
+
"actionStep": {
|
|
93
|
+
"oneOf": []
|
|
94
|
+
},
|
|
95
|
+
"themeConfig": {
|
|
96
|
+
"type": "object",
|
|
97
|
+
"properties": {
|
|
98
|
+
"name": { "type": "string" },
|
|
99
|
+
"mode": { "type": "string", "enum": ["dark", "light"] },
|
|
100
|
+
"position": { "type": "string", "enum": ["left", "right"] },
|
|
101
|
+
"colorPrimary": { "type": "string" },
|
|
102
|
+
"colorBackground": { "type": "string" },
|
|
103
|
+
"colorText": { "type": "string" },
|
|
104
|
+
"borderRadius": { "type": "string" }
|
|
105
|
+
},
|
|
106
|
+
"additionalProperties": false
|
|
107
|
+
},
|
|
108
|
+
"launcherConfig": {
|
|
109
|
+
"type": "object",
|
|
110
|
+
"properties": {
|
|
111
|
+
"enabled": { "type": "boolean" },
|
|
112
|
+
"label": { "type": "string" },
|
|
113
|
+
"position": { "type": "string" }
|
|
114
|
+
},
|
|
115
|
+
"additionalProperties": false
|
|
116
|
+
},
|
|
117
|
+
"routesConfig": {
|
|
118
|
+
"type": "object",
|
|
119
|
+
"properties": {
|
|
120
|
+
"exclude": {
|
|
121
|
+
"type": "array",
|
|
122
|
+
"items": { "type": "string" }
|
|
123
|
+
},
|
|
124
|
+
"include": {
|
|
125
|
+
"type": "array",
|
|
126
|
+
"items": { "type": "string" }
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
"additionalProperties": false
|
|
130
|
+
},
|
|
131
|
+
"activationConfig": {
|
|
132
|
+
"type": "object",
|
|
133
|
+
"description": "Activation configuration for conditional tile rendering",
|
|
134
|
+
"properties": {
|
|
135
|
+
"routes": { "$ref": "#/$defs/routeFilter" },
|
|
136
|
+
"strategy": { "$ref": "#/$defs/decisionStrategy" }
|
|
137
|
+
},
|
|
138
|
+
"additionalProperties": false
|
|
139
|
+
},
|
|
140
|
+
"routeFilter": {
|
|
141
|
+
"type": "object",
|
|
142
|
+
"properties": {
|
|
143
|
+
"include": {
|
|
144
|
+
"type": "array",
|
|
145
|
+
"items": { "type": "string" },
|
|
146
|
+
"description": "Routes where the tile should appear"
|
|
147
|
+
},
|
|
148
|
+
"exclude": {
|
|
149
|
+
"type": "array",
|
|
150
|
+
"items": { "type": "string" },
|
|
151
|
+
"description": "Routes where the tile should NOT appear"
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
"additionalProperties": false
|
|
155
|
+
},
|
|
156
|
+
"decisionStrategy": {
|
|
157
|
+
"oneOf": [
|
|
158
|
+
{ "$ref": "#/$defs/ruleStrategy" },
|
|
159
|
+
{ "$ref": "#/$defs/scoreStrategy" },
|
|
160
|
+
{ "$ref": "#/$defs/modelStrategy" },
|
|
161
|
+
{ "$ref": "#/$defs/externalStrategy" }
|
|
162
|
+
]
|
|
163
|
+
},
|
|
164
|
+
"ruleStrategy": {
|
|
165
|
+
"type": "object",
|
|
166
|
+
"required": ["type", "rules", "default"],
|
|
167
|
+
"properties": {
|
|
168
|
+
"type": { "const": "rules" },
|
|
169
|
+
"rules": {
|
|
170
|
+
"type": "array",
|
|
171
|
+
"items": { "$ref": "#/$defs/rule" }
|
|
172
|
+
},
|
|
173
|
+
"default": {}
|
|
174
|
+
},
|
|
175
|
+
"additionalProperties": false
|
|
176
|
+
},
|
|
177
|
+
"scoreStrategy": {
|
|
178
|
+
"type": "object",
|
|
179
|
+
"required": ["type", "field", "threshold", "above", "below"],
|
|
180
|
+
"properties": {
|
|
181
|
+
"type": { "const": "score" },
|
|
182
|
+
"field": { "type": "string" },
|
|
183
|
+
"threshold": { "type": "number" },
|
|
184
|
+
"above": {},
|
|
185
|
+
"below": {}
|
|
186
|
+
},
|
|
187
|
+
"additionalProperties": false
|
|
188
|
+
},
|
|
189
|
+
"modelStrategy": {
|
|
190
|
+
"type": "object",
|
|
191
|
+
"required": ["type", "modelId", "inputs", "outputMapping", "default"],
|
|
192
|
+
"properties": {
|
|
193
|
+
"type": { "const": "model" },
|
|
194
|
+
"modelId": { "type": "string" },
|
|
195
|
+
"inputs": { "type": "array", "items": { "type": "string" } },
|
|
196
|
+
"outputMapping": { "type": "object" },
|
|
197
|
+
"default": {}
|
|
198
|
+
},
|
|
199
|
+
"additionalProperties": false
|
|
200
|
+
},
|
|
201
|
+
"externalStrategy": {
|
|
202
|
+
"type": "object",
|
|
203
|
+
"required": ["type", "endpoint", "default"],
|
|
204
|
+
"properties": {
|
|
205
|
+
"type": { "const": "external" },
|
|
206
|
+
"endpoint": { "type": "string" },
|
|
207
|
+
"method": { "enum": ["GET", "POST"] },
|
|
208
|
+
"default": {},
|
|
209
|
+
"timeoutMs": { "type": "number" }
|
|
210
|
+
},
|
|
211
|
+
"additionalProperties": false
|
|
212
|
+
},
|
|
213
|
+
"rule": {
|
|
214
|
+
"type": "object",
|
|
215
|
+
"required": ["conditions", "value"],
|
|
216
|
+
"properties": {
|
|
217
|
+
"conditions": {
|
|
218
|
+
"type": "array",
|
|
219
|
+
"items": { "$ref": "#/$defs/condition" }
|
|
220
|
+
},
|
|
221
|
+
"value": {}
|
|
222
|
+
},
|
|
223
|
+
"additionalProperties": false
|
|
224
|
+
},
|
|
225
|
+
"condition": {
|
|
226
|
+
"oneOf": [
|
|
227
|
+
{
|
|
228
|
+
"type": "object",
|
|
229
|
+
"required": ["type", "url"],
|
|
230
|
+
"properties": {
|
|
231
|
+
"type": { "const": "page_url" },
|
|
232
|
+
"url": { "type": "string" }
|
|
233
|
+
},
|
|
234
|
+
"additionalProperties": false
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
"type": "object",
|
|
238
|
+
"required": ["type", "routeId"],
|
|
239
|
+
"properties": {
|
|
240
|
+
"type": { "const": "route" },
|
|
241
|
+
"routeId": { "type": "string" }
|
|
242
|
+
},
|
|
243
|
+
"additionalProperties": false
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
"type": "object",
|
|
247
|
+
"required": ["type", "anchorId", "state"],
|
|
248
|
+
"properties": {
|
|
249
|
+
"type": { "const": "anchor_visible" },
|
|
250
|
+
"anchorId": { "type": "string" },
|
|
251
|
+
"state": { "enum": ["visible", "present", "absent"] }
|
|
252
|
+
},
|
|
253
|
+
"additionalProperties": false
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
"type": "object",
|
|
257
|
+
"required": ["type", "eventName"],
|
|
258
|
+
"properties": {
|
|
259
|
+
"type": { "const": "event_occurred" },
|
|
260
|
+
"eventName": { "type": "string" },
|
|
261
|
+
"withinMs": { "type": "number" }
|
|
262
|
+
},
|
|
263
|
+
"additionalProperties": false
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
"type": "object",
|
|
267
|
+
"required": ["type", "key"],
|
|
268
|
+
"properties": {
|
|
269
|
+
"type": { "const": "state_equals" },
|
|
270
|
+
"key": { "type": "string" },
|
|
271
|
+
"value": {}
|
|
272
|
+
},
|
|
273
|
+
"additionalProperties": false
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
"type": "object",
|
|
277
|
+
"required": ["type"],
|
|
278
|
+
"properties": {
|
|
279
|
+
"type": { "const": "viewport" },
|
|
280
|
+
"minWidth": { "type": "number" },
|
|
281
|
+
"maxWidth": { "type": "number" },
|
|
282
|
+
"minHeight": { "type": "number" },
|
|
283
|
+
"maxHeight": { "type": "number" }
|
|
284
|
+
},
|
|
285
|
+
"additionalProperties": false
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
"type": "object",
|
|
289
|
+
"required": ["type", "key", "operator", "threshold"],
|
|
290
|
+
"properties": {
|
|
291
|
+
"type": { "const": "session_metric" },
|
|
292
|
+
"key": { "type": "string" },
|
|
293
|
+
"operator": { "enum": ["gte", "lte", "eq", "gt", "lt"] },
|
|
294
|
+
"threshold": { "type": "number" }
|
|
295
|
+
},
|
|
296
|
+
"additionalProperties": false
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
"type": "object",
|
|
300
|
+
"required": ["type", "key"],
|
|
301
|
+
"properties": {
|
|
302
|
+
"type": { "const": "dismissed" },
|
|
303
|
+
"key": { "type": "string" },
|
|
304
|
+
"inverted": { "type": "boolean" }
|
|
305
|
+
},
|
|
306
|
+
"additionalProperties": false
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
"type": "object",
|
|
310
|
+
"required": ["type", "key"],
|
|
311
|
+
"properties": {
|
|
312
|
+
"type": { "const": "cooldown_active" },
|
|
313
|
+
"key": { "type": "string" },
|
|
314
|
+
"inverted": { "type": "boolean" }
|
|
315
|
+
},
|
|
316
|
+
"additionalProperties": false
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
"type": "object",
|
|
320
|
+
"required": ["type", "key", "limit"],
|
|
321
|
+
"properties": {
|
|
322
|
+
"type": { "const": "frequency_limit" },
|
|
323
|
+
"key": { "type": "string" },
|
|
324
|
+
"limit": { "type": "number" },
|
|
325
|
+
"inverted": { "type": "boolean" }
|
|
326
|
+
},
|
|
327
|
+
"additionalProperties": false
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
"type": "object",
|
|
331
|
+
"required": ["type", "key", "operator", "count"],
|
|
332
|
+
"properties": {
|
|
333
|
+
"type": { "const": "event_count" },
|
|
334
|
+
"key": {
|
|
335
|
+
"type": "string",
|
|
336
|
+
"description": "Key referencing a callback registered by the adaptive via accumulator.register()"
|
|
337
|
+
},
|
|
338
|
+
"operator": { "enum": ["gte", "lte", "eq", "gt", "lt"] },
|
|
339
|
+
"count": { "type": "integer", "minimum": 0 },
|
|
340
|
+
"withinMs": {
|
|
341
|
+
"type": "number",
|
|
342
|
+
"exclusiveMinimum": 0,
|
|
343
|
+
"description": "Only count events within this time window (ms). Omit = session lifetime."
|
|
344
|
+
}
|
|
345
|
+
},
|
|
346
|
+
"additionalProperties": false
|
|
347
|
+
}
|
|
348
|
+
]
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
}
|