@syntrologie/runtime-sdk 2.14.0 → 2.15.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/README.md +1 -0
- package/dist/SmartCanvasElementLit.d.ts +166 -0
- package/dist/actions/schema.js +4 -3
- package/dist/actions/types.d.ts +8 -2
- package/dist/anchor/AnchorResolver.d.ts +1 -0
- package/dist/api-lit.d.ts +84 -0
- package/dist/apps/builtinRuntimeModules-lit.d.ts +20 -0
- package/dist/bootstrap-types.d.ts +10 -0
- package/dist/chunk-2IQ2PTLJ.js +871 -0
- package/dist/chunk-2IQ2PTLJ.js.map +7 -0
- package/dist/{chunk-YLLWLUQX.js → chunk-4HXPGXUC.js} +1 -16
- package/dist/{chunk-YLLWLUQX.js.map → chunk-4HXPGXUC.js.map} +1 -1
- package/dist/{chunk-JCDCANR7.js → chunk-CVMZW3II.js} +951 -1040
- package/dist/chunk-CVMZW3II.js.map +7 -0
- package/dist/{chunk-IR6UOR63.js → chunk-GX7BBYX6.js} +2 -2
- package/dist/chunk-JMHRHAEL.js +18 -0
- package/dist/chunk-JMHRHAEL.js.map +7 -0
- package/dist/{chunk-77TNZ66J.js → chunk-XVRDKBYF.js} +3 -3
- package/dist/components/SyntroCanvasOverlay.d.ts +100 -0
- package/dist/components/SyntroDrawer.d.ts +110 -0
- package/dist/components/SyntroLauncher.d.ts +105 -0
- package/dist/components/SyntroTileCard.d.ts +74 -0
- package/dist/components/SyntroTileWheel.d.ts +51 -0
- package/dist/config/schema.js +3 -2
- package/dist/controllers/DecisionController.d.ts +48 -0
- package/dist/controllers/NotificationsController.d.ts +59 -0
- package/dist/controllers/RuntimeController.d.ts +52 -0
- package/dist/controllers/RuntimeEventsController.d.ts +42 -0
- package/dist/controllers/ThemeController.d.ts +110 -0
- package/dist/controllers/index.d.ts +13 -0
- package/dist/decisions/schema.js +2 -1
- package/dist/decisions/types.d.ts +4 -0
- package/dist/editorLoader.d.ts +5 -0
- package/dist/index-lit.d.ts +40 -0
- package/dist/index.js +1264 -19
- package/dist/index.js.map +4 -4
- package/dist/interop/LitInReact.d.ts +27 -0
- package/dist/interop/ReactInLit.d.ts +42 -0
- package/dist/interop/index.d.ts +7 -0
- package/dist/metrics/sessionMetrics.d.ts +4 -0
- package/dist/notifications/SyntroToastStack.d.ts +43 -0
- package/dist/react-compat.d.ts +114 -0
- package/dist/react.js +6 -4
- package/dist/react.js.map +1 -1
- package/dist/smart-canvas.esm.js +856 -240
- package/dist/smart-canvas.esm.js.map +4 -4
- package/dist/smart-canvas.js +31411 -40000
- package/dist/smart-canvas.js.map +4 -4
- package/dist/smart-canvas.min.js +855 -240
- package/dist/smart-canvas.min.js.map +4 -4
- package/dist/theme/index.js +30 -0
- package/dist/theme/index.js.map +7 -0
- package/dist/version.d.ts +1 -1
- package/package.json +10 -1
- package/dist/chunk-JCDCANR7.js.map +0 -7
- /package/dist/{chunk-IR6UOR63.js.map → chunk-GX7BBYX6.js.map} +0 -0
- /package/dist/{chunk-77TNZ66J.js.map → chunk-XVRDKBYF.js.map} +0 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* RuntimeEventsController
|
|
3
|
+
*
|
|
4
|
+
* A Lit ReactiveController that replaces the `useRuntimeEvents()` React hook
|
|
5
|
+
* from RuntimeProvider.tsx. Subscribes to the runtime event bus when the host
|
|
6
|
+
* element connects to the DOM and unsubscribes when it disconnects.
|
|
7
|
+
*
|
|
8
|
+
* Usage:
|
|
9
|
+
* ```ts
|
|
10
|
+
* class MyElement extends LitElement {
|
|
11
|
+
* private _events = new RuntimeEventsController(
|
|
12
|
+
* this,
|
|
13
|
+
* runtime,
|
|
14
|
+
* { names: ['ui.click'] },
|
|
15
|
+
* (event) => { ... }
|
|
16
|
+
* );
|
|
17
|
+
* }
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
import type { ReactiveController, ReactiveControllerHost } from 'lit';
|
|
21
|
+
import type { EventFilter, NormalizedEvent } from '../events/types.js';
|
|
22
|
+
import type { SmartCanvasRuntime } from '../runtime.js';
|
|
23
|
+
export type { EventFilter };
|
|
24
|
+
export declare class RuntimeEventsController implements ReactiveController {
|
|
25
|
+
private _host;
|
|
26
|
+
private _runtime;
|
|
27
|
+
private _filter;
|
|
28
|
+
private _callback;
|
|
29
|
+
private _unsubscribe;
|
|
30
|
+
constructor(host: ReactiveControllerHost, runtime: SmartCanvasRuntime | null | undefined, filter: EventFilter | undefined, callback: (event: NormalizedEvent) => void);
|
|
31
|
+
hostConnected(): void;
|
|
32
|
+
hostDisconnected(): void;
|
|
33
|
+
/**
|
|
34
|
+
* Update the event filter. Resubscribes immediately if the host is connected.
|
|
35
|
+
*/
|
|
36
|
+
setFilter(filter: EventFilter | undefined): void;
|
|
37
|
+
/**
|
|
38
|
+
* Update the event callback. Resubscribes immediately if the host is connected.
|
|
39
|
+
*/
|
|
40
|
+
setCallback(callback: (event: NormalizedEvent) => void): void;
|
|
41
|
+
private _subscribe;
|
|
42
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ThemeController — Lit ReactiveController replacing ThemeProvider + useTheme.
|
|
3
|
+
*
|
|
4
|
+
* Merges theme config with defaults, flattens to CSS variables,
|
|
5
|
+
* and injects them into the host's shadow root.
|
|
6
|
+
*/
|
|
7
|
+
import type { ReactiveController, ReactiveControllerHost } from 'lit';
|
|
8
|
+
import type { CanvasThemeConfig } from '../theme/types.js';
|
|
9
|
+
export interface ThemeState {
|
|
10
|
+
config: Required<CanvasThemeConfig>;
|
|
11
|
+
mode: 'light' | 'dark';
|
|
12
|
+
cssVariables: Record<string, string>;
|
|
13
|
+
}
|
|
14
|
+
export declare class ThemeController implements ReactiveController {
|
|
15
|
+
#private;
|
|
16
|
+
get config(): Required<{
|
|
17
|
+
content?: {
|
|
18
|
+
background?: string | undefined;
|
|
19
|
+
border?: string | undefined;
|
|
20
|
+
backgroundHover?: string | undefined;
|
|
21
|
+
borderRadius?: string | undefined;
|
|
22
|
+
textColor?: string | undefined;
|
|
23
|
+
bodyPadding?: string | undefined;
|
|
24
|
+
textSecondaryColor?: string | undefined;
|
|
25
|
+
itemDivider?: string | undefined;
|
|
26
|
+
itemGap?: string | undefined;
|
|
27
|
+
itemPadding?: string | undefined;
|
|
28
|
+
itemFontSize?: string | undefined;
|
|
29
|
+
bodyFontSize?: string | undefined;
|
|
30
|
+
categoryPadding?: string | undefined;
|
|
31
|
+
categoryGap?: string | undefined;
|
|
32
|
+
categoryFontSize?: string | undefined;
|
|
33
|
+
searchBackground?: string | undefined;
|
|
34
|
+
searchColor?: string | undefined;
|
|
35
|
+
chevronColor?: string | undefined;
|
|
36
|
+
} | undefined;
|
|
37
|
+
overlay?: {
|
|
38
|
+
background?: string | undefined;
|
|
39
|
+
border?: string | undefined;
|
|
40
|
+
borderRadius?: string | undefined;
|
|
41
|
+
titleColor?: string | undefined;
|
|
42
|
+
textColor?: string | undefined;
|
|
43
|
+
arrowColor?: string | undefined;
|
|
44
|
+
arrowSize?: string | undefined;
|
|
45
|
+
scrimOpacity?: string | undefined;
|
|
46
|
+
highlightRing?: string | undefined;
|
|
47
|
+
} | undefined;
|
|
48
|
+
borderRadius?: string | undefined;
|
|
49
|
+
mode?: "dark" | "light" | undefined;
|
|
50
|
+
fontFamily?: string | undefined;
|
|
51
|
+
colorPrimary?: string | undefined;
|
|
52
|
+
colorPrimaryHover?: string | undefined;
|
|
53
|
+
canvas?: {
|
|
54
|
+
position?: "right" | "left" | undefined;
|
|
55
|
+
layout?: "push" | "overlay" | undefined;
|
|
56
|
+
background?: string | undefined;
|
|
57
|
+
blur?: string | undefined;
|
|
58
|
+
border?: string | undefined;
|
|
59
|
+
width?: string | undefined;
|
|
60
|
+
transitionDuration?: string | undefined;
|
|
61
|
+
transitionEasing?: string | undefined;
|
|
62
|
+
transitionFade?: string | undefined;
|
|
63
|
+
} | undefined;
|
|
64
|
+
launcher?: {
|
|
65
|
+
size?: string | undefined;
|
|
66
|
+
icon?: string | undefined;
|
|
67
|
+
background?: string | undefined;
|
|
68
|
+
backgroundHover?: string | undefined;
|
|
69
|
+
color?: string | undefined;
|
|
70
|
+
shadow?: string | undefined;
|
|
71
|
+
borderRadius?: string | undefined;
|
|
72
|
+
} | undefined;
|
|
73
|
+
tile?: {
|
|
74
|
+
background?: string | undefined;
|
|
75
|
+
border?: string | undefined;
|
|
76
|
+
backgroundHover?: string | undefined;
|
|
77
|
+
shadow?: string | undefined;
|
|
78
|
+
borderRadius?: string | undefined;
|
|
79
|
+
titleColor?: string | undefined;
|
|
80
|
+
textColor?: string | undefined;
|
|
81
|
+
iconBackground?: string | undefined;
|
|
82
|
+
iconShadow?: string | undefined;
|
|
83
|
+
headerPadding?: string | undefined;
|
|
84
|
+
bodyPadding?: string | undefined;
|
|
85
|
+
gap?: string | undefined;
|
|
86
|
+
} | undefined;
|
|
87
|
+
notification?: {
|
|
88
|
+
background?: string | undefined;
|
|
89
|
+
border?: string | undefined;
|
|
90
|
+
borderRadius?: string | undefined;
|
|
91
|
+
textColor?: string | undefined;
|
|
92
|
+
iconBackground?: string | undefined;
|
|
93
|
+
textSecondaryColor?: string | undefined;
|
|
94
|
+
successColor?: string | undefined;
|
|
95
|
+
warningColor?: string | undefined;
|
|
96
|
+
errorColor?: string | undefined;
|
|
97
|
+
progressGradient?: string | undefined;
|
|
98
|
+
} | undefined;
|
|
99
|
+
}>;
|
|
100
|
+
get mode(): "dark" | "light";
|
|
101
|
+
get cssVariables(): Record<string, string>;
|
|
102
|
+
constructor(host: ReactiveControllerHost & HTMLElement, themeConfig?: CanvasThemeConfig, workspaceTheme?: CanvasThemeConfig);
|
|
103
|
+
hostConnected(): void;
|
|
104
|
+
hostDisconnected(): void;
|
|
105
|
+
hostUpdated(): void;
|
|
106
|
+
/**
|
|
107
|
+
* Update theme config and re-compute + re-inject CSS variables.
|
|
108
|
+
*/
|
|
109
|
+
setThemeConfig(themeConfig: CanvasThemeConfig, workspaceTheme?: CanvasThemeConfig): void;
|
|
110
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lit ReactiveControllers — replacements for React hooks.
|
|
3
|
+
*
|
|
4
|
+
* These controllers provide the same reactive state management as the
|
|
5
|
+
* React hooks in RuntimeProvider.tsx and notification hooks, but work
|
|
6
|
+
* with any LitElement host via the ReactiveController protocol.
|
|
7
|
+
*/
|
|
8
|
+
export { DecisionController } from './DecisionController.js';
|
|
9
|
+
export { NotificationsController } from './NotificationsController.js';
|
|
10
|
+
export { RuntimeController } from './RuntimeController.js';
|
|
11
|
+
export { RuntimeEventsController } from './RuntimeEventsController.js';
|
|
12
|
+
export type { ThemeState } from './ThemeController.js';
|
|
13
|
+
export { ThemeController } from './ThemeController.js';
|
package/dist/decisions/schema.js
CHANGED
|
@@ -275,6 +275,10 @@ export interface EvaluationContext {
|
|
|
275
275
|
/** Get an arbitrary state value by key (checks session then user store). */
|
|
276
276
|
getValue?(key: string): unknown;
|
|
277
277
|
};
|
|
278
|
+
/** Direct session metrics access (independent of state store) */
|
|
279
|
+
sessionMetrics?: {
|
|
280
|
+
get(key: string): number;
|
|
281
|
+
};
|
|
278
282
|
/** Access to event bus (for event_occurred checks) */
|
|
279
283
|
events?: {
|
|
280
284
|
hasRecentEvent(eventName: string, withinMs: number): boolean;
|
package/dist/editorLoader.d.ts
CHANGED
|
@@ -9,6 +9,11 @@ export interface EditorConf {
|
|
|
9
9
|
audit_session_id?: string;
|
|
10
10
|
[key: string]: unknown;
|
|
11
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* Clear persisted editor params from sessionStorage. Call when the audit/editor
|
|
14
|
+
* session intentionally ends so the next page load does not rehydrate stale state.
|
|
15
|
+
*/
|
|
16
|
+
export declare function clearPersistedEditorParams(): void;
|
|
12
17
|
/**
|
|
13
18
|
* Reset the editor params cache, forcing re-evaluation on next access.
|
|
14
19
|
* Called by the Chrome extension after restoring URL params via replaceState,
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import './components/SyntroCanvasOverlay';
|
|
2
|
+
import './components/SyntroDrawer';
|
|
3
|
+
import './components/SyntroLauncher';
|
|
4
|
+
import './components/SyntroTileCard';
|
|
5
|
+
import './components/SyntroTileWheel';
|
|
6
|
+
import './notifications/SyntroToastStack';
|
|
7
|
+
export declare const RUNTIME_SDK_BUILD: string;
|
|
8
|
+
export * from './actions';
|
|
9
|
+
export * from './anchor';
|
|
10
|
+
export * from './api-lit';
|
|
11
|
+
export { AppRegistry } from './apps/AppRegistry';
|
|
12
|
+
export type { SyntroInitOptions, SyntroInitResult } from './bootstrap';
|
|
13
|
+
export { Syntro } from './bootstrap';
|
|
14
|
+
export * from './config-validator';
|
|
15
|
+
export * from './configFetcher';
|
|
16
|
+
export * from './context';
|
|
17
|
+
export * from './controller';
|
|
18
|
+
export * from './controllers';
|
|
19
|
+
export * from './decisions';
|
|
20
|
+
export * from './events';
|
|
21
|
+
export * from './experiments';
|
|
22
|
+
export * from './metrics';
|
|
23
|
+
export type { NavigationDiagnostics, NavigationListener } from './navigation/NavigationMonitor';
|
|
24
|
+
export { NavigationMonitor } from './navigation/NavigationMonitor';
|
|
25
|
+
export type { ActiveNotification } from './notifications/types';
|
|
26
|
+
export { DEFAULT_COOLDOWN, MAX_VISIBLE_TOASTS } from './notifications/types';
|
|
27
|
+
export * from './overlays/fetcher';
|
|
28
|
+
export * from './overlays/schema';
|
|
29
|
+
export * from './overlays/types';
|
|
30
|
+
export type { RuntimeMode, SmartCanvasRuntime, SmartCanvasRuntimeOptions } from './runtime';
|
|
31
|
+
export { createSmartCanvasRuntime, RUNTIME_VERSION } from './runtime';
|
|
32
|
+
export * from './SmartCanvasElementLit';
|
|
33
|
+
export * from './state';
|
|
34
|
+
export * from './surfaces';
|
|
35
|
+
export * from './telemetry';
|
|
36
|
+
export type { SyntroTokenPayload } from './token';
|
|
37
|
+
export { decodeToken, encodeToken } from './token';
|
|
38
|
+
export * from './types';
|
|
39
|
+
export * from './version';
|
|
40
|
+
export * from './widgets';
|