@thewhateverapp/tile-sdk 0.13.31 → 0.13.33
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/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +1 -0
- package/dist/spec/host/OverlayHost.d.ts +68 -0
- package/dist/spec/host/OverlayHost.d.ts.map +1 -0
- package/dist/spec/host/OverlayHost.js +143 -0
- package/dist/spec/host/index.d.ts +7 -0
- package/dist/spec/host/index.d.ts.map +1 -0
- package/dist/spec/host/index.js +6 -0
- package/dist/spec/index.d.ts +29 -0
- package/dist/spec/index.d.ts.map +1 -0
- package/dist/spec/index.js +81 -0
- package/dist/spec/registry/ComponentRegistry.d.ts +208 -0
- package/dist/spec/registry/ComponentRegistry.d.ts.map +1 -0
- package/dist/spec/registry/ComponentRegistry.js +227 -0
- package/dist/spec/registry/composites/BottomSheet.d.ts +33 -0
- package/dist/spec/registry/composites/BottomSheet.d.ts.map +1 -0
- package/dist/spec/registry/composites/BottomSheet.js +98 -0
- package/dist/spec/registry/composites/CountdownCTA.d.ts +35 -0
- package/dist/spec/registry/composites/CountdownCTA.d.ts.map +1 -0
- package/dist/spec/registry/composites/CountdownCTA.js +91 -0
- package/dist/spec/registry/composites/Poll.d.ts +39 -0
- package/dist/spec/registry/composites/Poll.d.ts.map +1 -0
- package/dist/spec/registry/composites/Poll.js +76 -0
- package/dist/spec/registry/composites/Prediction.d.ts +37 -0
- package/dist/spec/registry/composites/Prediction.d.ts.map +1 -0
- package/dist/spec/registry/composites/Prediction.js +116 -0
- package/dist/spec/registry/composites/index.d.ts +33 -0
- package/dist/spec/registry/composites/index.d.ts.map +1 -0
- package/dist/spec/registry/composites/index.js +36 -0
- package/dist/spec/registry/index.d.ts +15 -0
- package/dist/spec/registry/index.d.ts.map +1 -0
- package/dist/spec/registry/index.js +24 -0
- package/dist/spec/registry/primitives/Button.d.ts +30 -0
- package/dist/spec/registry/primitives/Button.d.ts.map +1 -0
- package/dist/spec/registry/primitives/Button.js +62 -0
- package/dist/spec/registry/primitives/Divider.d.ts +22 -0
- package/dist/spec/registry/primitives/Divider.d.ts.map +1 -0
- package/dist/spec/registry/primitives/Divider.js +56 -0
- package/dist/spec/registry/primitives/Image.d.ts +27 -0
- package/dist/spec/registry/primitives/Image.d.ts.map +1 -0
- package/dist/spec/registry/primitives/Image.js +36 -0
- package/dist/spec/registry/primitives/ProgressBar.d.ts +28 -0
- package/dist/spec/registry/primitives/ProgressBar.d.ts.map +1 -0
- package/dist/spec/registry/primitives/ProgressBar.js +50 -0
- package/dist/spec/registry/primitives/Row.d.ts +26 -0
- package/dist/spec/registry/primitives/Row.d.ts.map +1 -0
- package/dist/spec/registry/primitives/Row.js +50 -0
- package/dist/spec/registry/primitives/Spacer.d.ts +18 -0
- package/dist/spec/registry/primitives/Spacer.d.ts.map +1 -0
- package/dist/spec/registry/primitives/Spacer.js +25 -0
- package/dist/spec/registry/primitives/Stack.d.ts +22 -0
- package/dist/spec/registry/primitives/Stack.d.ts.map +1 -0
- package/dist/spec/registry/primitives/Stack.js +41 -0
- package/dist/spec/registry/primitives/Text.d.ts +26 -0
- package/dist/spec/registry/primitives/Text.d.ts.map +1 -0
- package/dist/spec/registry/primitives/Text.js +33 -0
- package/dist/spec/registry/primitives/index.d.ts +45 -0
- package/dist/spec/registry/primitives/index.d.ts.map +1 -0
- package/dist/spec/registry/primitives/index.js +55 -0
- package/dist/spec/renderer/BindingResolver.d.ts +35 -0
- package/dist/spec/renderer/BindingResolver.d.ts.map +1 -0
- package/dist/spec/renderer/BindingResolver.js +131 -0
- package/dist/spec/renderer/CaptionTrack.d.ts +22 -0
- package/dist/spec/renderer/CaptionTrack.d.ts.map +1 -0
- package/dist/spec/renderer/CaptionTrack.js +83 -0
- package/dist/spec/renderer/LayoutRenderer.d.ts +24 -0
- package/dist/spec/renderer/LayoutRenderer.d.ts.map +1 -0
- package/dist/spec/renderer/LayoutRenderer.js +66 -0
- package/dist/spec/renderer/OverlayCue.d.ts +20 -0
- package/dist/spec/renderer/OverlayCue.d.ts.map +1 -0
- package/dist/spec/renderer/OverlayCue.js +161 -0
- package/dist/spec/renderer/index.d.ts +10 -0
- package/dist/spec/renderer/index.d.ts.map +1 -0
- package/dist/spec/renderer/index.js +13 -0
- package/dist/spec/runtime/ActionRouter.d.ts +33 -0
- package/dist/spec/runtime/ActionRouter.d.ts.map +1 -0
- package/dist/spec/runtime/ActionRouter.js +84 -0
- package/dist/spec/runtime/OverlayRuntime.d.ts +84 -0
- package/dist/spec/runtime/OverlayRuntime.d.ts.map +1 -0
- package/dist/spec/runtime/OverlayRuntime.js +216 -0
- package/dist/spec/runtime/StateManager.d.ts +31 -0
- package/dist/spec/runtime/StateManager.d.ts.map +1 -0
- package/dist/spec/runtime/StateManager.js +60 -0
- package/dist/spec/runtime/TimeSync.d.ts +47 -0
- package/dist/spec/runtime/TimeSync.d.ts.map +1 -0
- package/dist/spec/runtime/TimeSync.js +140 -0
- package/dist/spec/runtime/index.d.ts +10 -0
- package/dist/spec/runtime/index.d.ts.map +1 -0
- package/dist/spec/runtime/index.js +13 -0
- package/dist/spec/schema.d.ts +889 -0
- package/dist/spec/schema.d.ts.map +1 -0
- package/dist/spec/schema.js +284 -0
- package/dist/spec/theme/ThemeProvider.d.ts +151 -0
- package/dist/spec/theme/ThemeProvider.d.ts.map +1 -0
- package/dist/spec/theme/ThemeProvider.js +227 -0
- package/dist/spec/theme/index.d.ts +7 -0
- package/dist/spec/theme/index.d.ts.map +1 -0
- package/dist/spec/theme/index.js +12 -0
- package/dist/spec/types.d.ts +322 -0
- package/dist/spec/types.d.ts.map +1 -0
- package/dist/spec/types.js +36 -0
- package/package.json +8 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC3D,YAAY,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAItC,cAAc,WAAW,CAAC"}
|
package/dist/react/index.js
CHANGED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OverlayHost
|
|
3
|
+
*
|
|
4
|
+
* Host-side provider for the overlay spec system.
|
|
5
|
+
* Manages data, events, and integration with the tile bridge.
|
|
6
|
+
*/
|
|
7
|
+
import { type ReactNode } from 'react';
|
|
8
|
+
import type { SpecEvent, SpecCommand, OverlaySpec } from '../types';
|
|
9
|
+
import type { VideoTimeSource } from '../runtime/TimeSync';
|
|
10
|
+
export interface OverlayHostContextValue {
|
|
11
|
+
/** Update host data */
|
|
12
|
+
updateData: (key: string, value: unknown) => void;
|
|
13
|
+
/** Update multiple data values */
|
|
14
|
+
updateDataBatch: (updates: Record<string, unknown>) => void;
|
|
15
|
+
/** Send a command to the overlay */
|
|
16
|
+
sendCommand: (command: SpecCommand) => void;
|
|
17
|
+
/** Current data snapshot */
|
|
18
|
+
data: Record<string, unknown>;
|
|
19
|
+
/** User context */
|
|
20
|
+
ctx: Record<string, unknown>;
|
|
21
|
+
}
|
|
22
|
+
export interface OverlayHostProps {
|
|
23
|
+
/** The overlay spec to render */
|
|
24
|
+
spec: OverlaySpec;
|
|
25
|
+
/** Initial host data */
|
|
26
|
+
initialData?: Record<string, unknown>;
|
|
27
|
+
/** User context (userId, roles, etc.) */
|
|
28
|
+
ctx?: Record<string, unknown>;
|
|
29
|
+
/** Video time source for sync */
|
|
30
|
+
timeSource?: VideoTimeSource | null;
|
|
31
|
+
/** Event callback when spec emits events */
|
|
32
|
+
onEvent?: (event: SpecEvent) => void;
|
|
33
|
+
/** Navigate to page callback */
|
|
34
|
+
onNavigateToPage?: () => void;
|
|
35
|
+
/** Open tile callback */
|
|
36
|
+
onOpenTile?: (tileId: string) => void;
|
|
37
|
+
/** Show captions */
|
|
38
|
+
showCaptions?: boolean;
|
|
39
|
+
/** Children (typically the video player) */
|
|
40
|
+
children?: ReactNode;
|
|
41
|
+
}
|
|
42
|
+
export declare function OverlayHost({ spec, initialData, ctx, timeSource, onEvent, onNavigateToPage, onOpenTile, showCaptions, children, }: OverlayHostProps): JSX.Element;
|
|
43
|
+
/**
|
|
44
|
+
* Hook to access the overlay host context.
|
|
45
|
+
*/
|
|
46
|
+
export declare function useOverlayHost(): OverlayHostContextValue;
|
|
47
|
+
/**
|
|
48
|
+
* Hook to update host data.
|
|
49
|
+
*/
|
|
50
|
+
export declare function useHostDataUpdater(): (key: string, value: unknown) => void;
|
|
51
|
+
/**
|
|
52
|
+
* Hook to get current host data.
|
|
53
|
+
*/
|
|
54
|
+
export declare function useHostData<T = unknown>(key: string): T | undefined;
|
|
55
|
+
export interface SubscriptionConfig {
|
|
56
|
+
/** Channel to subscribe to */
|
|
57
|
+
channel: string;
|
|
58
|
+
/** Data key to update */
|
|
59
|
+
dataKey: string;
|
|
60
|
+
/** Transform function */
|
|
61
|
+
transform?: (message: unknown) => unknown;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Hook to subscribe to realtime updates and sync to host data.
|
|
65
|
+
*/
|
|
66
|
+
export declare function useSubscriptionAdapter(subscriptions: SubscriptionConfig[], subscribe: (channel: string, callback: (data: unknown) => void) => () => void): void;
|
|
67
|
+
export default OverlayHost;
|
|
68
|
+
//# sourceMappingURL=OverlayHost.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OverlayHost.d.ts","sourceRoot":"","sources":["../../../src/spec/host/OverlayHost.tsx"],"names":[],"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AC,EAAE,OAAO,CAAC;IAEvB,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAMD,wBAAgB,WAAW,CAAC,EAC1B,IAAI,EACJ,WAAgB,EAChB,GAAQ,EACR,UAAiB,EACjB,OAAO,EACP,gBAAgB,EAChB,UAAU,EACV,YAAmB,EACnB,QAAQ,GACT,EAAE,gBAAgB,GAAG,GAAG,CAAC,OAAO,CA0EhC;AAMD;;GAEG;AACH,wBAAgB,cAAc,IAAI,uBAAuB,CAMxD;AAED;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,CAG1E;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,CAAC,GAAG,OAAO,EAAE,GAAG,EAAE,MAAM,GAAG,CAAC,GAAG,SAAS,CAGnE;AAMD,MAAM,WAAW,kBAAkB;IACjC,8BAA8B;IAC9B,OAAO,EAAE,MAAM,CAAC;IAEhB,yBAAyB;IACzB,OAAO,EAAE,MAAM,CAAC;IAEhB,yBAAyB;IACzB,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC;CAC3C;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CACpC,aAAa,EAAE,kBAAkB,EAAE,EACnC,SAAS,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,KAAK,MAAM,IAAI,GAC5E,IAAI,CAkBN;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OverlayHost
|
|
3
|
+
*
|
|
4
|
+
* Host-side provider for the overlay spec system.
|
|
5
|
+
* Manages data, events, and integration with the tile bridge.
|
|
6
|
+
*/
|
|
7
|
+
import React, { createContext, useContext, useState, useCallback, useMemo, useEffect, } from 'react';
|
|
8
|
+
import { OverlayRuntime } from '../runtime/OverlayRuntime';
|
|
9
|
+
import { OverlayCueContainer } from '../renderer/OverlayCue';
|
|
10
|
+
import { CaptionTrackRenderer } from '../renderer/CaptionTrack';
|
|
11
|
+
import { ThemeProvider, defaultTheme, darkTheme, lightTheme, neonTheme, warmTheme, coolTheme, } from '../theme';
|
|
12
|
+
// Theme preset mapping
|
|
13
|
+
const themePresets = {
|
|
14
|
+
default: defaultTheme,
|
|
15
|
+
dark: darkTheme,
|
|
16
|
+
light: lightTheme,
|
|
17
|
+
neon: neonTheme,
|
|
18
|
+
warm: warmTheme,
|
|
19
|
+
cool: coolTheme,
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Convert spec theme to full overlay theme
|
|
23
|
+
*/
|
|
24
|
+
function resolveSpecTheme(specTheme) {
|
|
25
|
+
if (!specTheme)
|
|
26
|
+
return undefined;
|
|
27
|
+
const baseTheme = specTheme.preset ? themePresets[specTheme.preset] : defaultTheme;
|
|
28
|
+
return {
|
|
29
|
+
...baseTheme,
|
|
30
|
+
colors: {
|
|
31
|
+
...baseTheme.colors,
|
|
32
|
+
primary: specTheme.colors?.primary ?? baseTheme.colors.primary,
|
|
33
|
+
secondary: specTheme.colors?.secondary ?? baseTheme.colors.secondary,
|
|
34
|
+
background: specTheme.colors?.background ?? baseTheme.colors.background,
|
|
35
|
+
foreground: specTheme.colors?.foreground ?? baseTheme.colors.foreground,
|
|
36
|
+
success: specTheme.colors?.success ?? baseTheme.colors.success,
|
|
37
|
+
warning: specTheme.colors?.warning ?? baseTheme.colors.warning,
|
|
38
|
+
error: specTheme.colors?.error ?? baseTheme.colors.error,
|
|
39
|
+
},
|
|
40
|
+
typography: {
|
|
41
|
+
...baseTheme.typography,
|
|
42
|
+
fontFamily: specTheme.typography?.fontFamily ?? baseTheme.typography.fontFamily,
|
|
43
|
+
},
|
|
44
|
+
components: {
|
|
45
|
+
...baseTheme.components,
|
|
46
|
+
caption: {
|
|
47
|
+
...baseTheme.components?.caption,
|
|
48
|
+
...specTheme.components?.caption,
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
const OverlayHostContext = createContext(null);
|
|
54
|
+
// =============================================================================
|
|
55
|
+
// Provider Component
|
|
56
|
+
// =============================================================================
|
|
57
|
+
export function OverlayHost({ spec, initialData = {}, ctx = {}, timeSource = null, onEvent, onNavigateToPage, onOpenTile, showCaptions = true, children, }) {
|
|
58
|
+
// Host data state
|
|
59
|
+
const [data, setData] = useState(initialData);
|
|
60
|
+
// Update single data value
|
|
61
|
+
const updateData = useCallback((key, value) => {
|
|
62
|
+
setData((prev) => ({ ...prev, [key]: value }));
|
|
63
|
+
}, []);
|
|
64
|
+
// Update multiple data values
|
|
65
|
+
const updateDataBatch = useCallback((updates) => {
|
|
66
|
+
setData((prev) => ({ ...prev, ...updates }));
|
|
67
|
+
}, []);
|
|
68
|
+
// Send command to overlay (for future use)
|
|
69
|
+
const sendCommand = useCallback((command) => {
|
|
70
|
+
console.log('OverlayHost command:', command);
|
|
71
|
+
// Commands can be used to control the overlay from the host
|
|
72
|
+
}, []);
|
|
73
|
+
// Event handler - forward to parent and handle internally
|
|
74
|
+
const handleEvent = useCallback((event) => {
|
|
75
|
+
// Forward to parent callback
|
|
76
|
+
onEvent?.(event);
|
|
77
|
+
// Could also handle events internally here
|
|
78
|
+
// e.g., for tracking, analytics, etc.
|
|
79
|
+
}, [onEvent]);
|
|
80
|
+
const hostValue = useMemo(() => ({
|
|
81
|
+
updateData,
|
|
82
|
+
updateDataBatch,
|
|
83
|
+
sendCommand,
|
|
84
|
+
data,
|
|
85
|
+
ctx,
|
|
86
|
+
}), [updateData, updateDataBatch, sendCommand, data, ctx]);
|
|
87
|
+
// Resolve theme from spec
|
|
88
|
+
const resolvedTheme = useMemo(() => resolveSpecTheme(spec.theme), [spec.theme]);
|
|
89
|
+
return (React.createElement(ThemeProvider, { theme: resolvedTheme },
|
|
90
|
+
React.createElement(OverlayHostContext.Provider, { value: hostValue },
|
|
91
|
+
React.createElement(OverlayRuntime, { spec: spec, timeSource: timeSource, data: data, ctx: ctx, onEvent: handleEvent, onNavigateToPage: onNavigateToPage, onOpenTile: onOpenTile },
|
|
92
|
+
React.createElement("div", { className: "overlay-host relative" },
|
|
93
|
+
children,
|
|
94
|
+
React.createElement(OverlayCueContainer, null),
|
|
95
|
+
showCaptions && spec.tracks?.captions && (React.createElement(CaptionTrackRenderer, { track: spec.tracks.captions })))))));
|
|
96
|
+
}
|
|
97
|
+
// =============================================================================
|
|
98
|
+
// Hooks
|
|
99
|
+
// =============================================================================
|
|
100
|
+
/**
|
|
101
|
+
* Hook to access the overlay host context.
|
|
102
|
+
*/
|
|
103
|
+
export function useOverlayHost() {
|
|
104
|
+
const context = useContext(OverlayHostContext);
|
|
105
|
+
if (!context) {
|
|
106
|
+
throw new Error('useOverlayHost must be used within an OverlayHost provider');
|
|
107
|
+
}
|
|
108
|
+
return context;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Hook to update host data.
|
|
112
|
+
*/
|
|
113
|
+
export function useHostDataUpdater() {
|
|
114
|
+
const { updateData } = useOverlayHost();
|
|
115
|
+
return updateData;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Hook to get current host data.
|
|
119
|
+
*/
|
|
120
|
+
export function useHostData(key) {
|
|
121
|
+
const { data } = useOverlayHost();
|
|
122
|
+
return data[key];
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Hook to subscribe to realtime updates and sync to host data.
|
|
126
|
+
*/
|
|
127
|
+
export function useSubscriptionAdapter(subscriptions, subscribe) {
|
|
128
|
+
const { updateData } = useOverlayHost();
|
|
129
|
+
useEffect(() => {
|
|
130
|
+
const unsubscribes = [];
|
|
131
|
+
for (const sub of subscriptions) {
|
|
132
|
+
const unsub = subscribe(sub.channel, (message) => {
|
|
133
|
+
const value = sub.transform ? sub.transform(message) : message;
|
|
134
|
+
updateData(sub.dataKey, value);
|
|
135
|
+
});
|
|
136
|
+
unsubscribes.push(unsub);
|
|
137
|
+
}
|
|
138
|
+
return () => {
|
|
139
|
+
unsubscribes.forEach((unsub) => unsub());
|
|
140
|
+
};
|
|
141
|
+
}, [subscriptions, subscribe, updateData]);
|
|
142
|
+
}
|
|
143
|
+
export default OverlayHost;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Host Module Index
|
|
3
|
+
*
|
|
4
|
+
* Exports all host-side components and utilities.
|
|
5
|
+
*/
|
|
6
|
+
export { OverlayHost, useOverlayHost, useHostDataUpdater, useHostData, useSubscriptionAdapter, type OverlayHostProps, type OverlayHostContextValue, type SubscriptionConfig, } from './OverlayHost';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/spec/host/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,WAAW,EACX,cAAc,EACd,kBAAkB,EAClB,WAAW,EACX,sBAAsB,EACtB,KAAK,gBAAgB,EACrB,KAAK,uBAAuB,EAC5B,KAAK,kBAAkB,GACxB,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Overlay Spec Module
|
|
3
|
+
*
|
|
4
|
+
* A declarative, time-synced UI protocol for hybrid video tiles.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```tsx
|
|
8
|
+
* import { OverlayRuntime, OverlayHost, validateSpec } from '@thewhateverapp/tile-sdk/spec';
|
|
9
|
+
*
|
|
10
|
+
* function HybridTile({ spec }: { spec: OverlaySpec }) {
|
|
11
|
+
* return (
|
|
12
|
+
* <OverlayHost onEvent={handleEvent}>
|
|
13
|
+
* <VideoPlayer src={videoUrl}>
|
|
14
|
+
* <OverlayRuntime spec={spec} />
|
|
15
|
+
* </VideoPlayer>
|
|
16
|
+
* </OverlayHost>
|
|
17
|
+
* );
|
|
18
|
+
* }
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
export type { OverlaySpec, SpecMeta, SyncConfig, TimeTransform, StateConfig, TracksConfig, CaptionTrack, CaptionSegment, CaptionStyle, OverlayCue, TimeWindow, Placement, TilePlacement, FullPlacement, DismissPolicy, DismissTrigger, LayoutNode, PropValue, Binding, Action, ActionType, Condition, BindingCondition, ComparisonCondition, LogicalCondition, SubscriptionDeclaration, SpecContext, SpecState, SpecEvent, SpecCommand, Size, Weight, Color, Variant, Align, Justify, ValidationProfile, SpecTheme, } from './types';
|
|
22
|
+
export { isBinding, isAction, TILE_PROFILE, FULL_PROFILE } from './types';
|
|
23
|
+
export { OverlaySpecSchema, BindingSchema, ActionSchema, PropValueSchema, ConditionSchema, LayoutNodeSchema, PlacementSchema, OverlayCueSchema, CaptionTrackSchema, validateSpec, parseSpec, validateAgainstProfile, } from './schema';
|
|
24
|
+
export { ComponentRegistry, globalRegistry, registerComponent, getComponent, hasComponent, getAllComponentIds, type RegistryComponentProps, type ComponentWithAction, sizeClasses, colorClasses, weightClasses, alignClasses, justifyClasses, paddingClasses, gapClasses, Text, Button, Stack, Row, Image, ProgressBar, Spacer, Divider, registerPrimitives, PRIMITIVE_TYPES, type PrimitiveType, type PrimitivePropsMap, type TextProps, type ButtonProps, type StackProps, type RowProps, type ImageProps, type ProgressBarProps, type SpacerProps, type DividerProps, Poll, Prediction, CountdownCTA, BottomSheet, registerComposites, COMPOSITE_TYPES, type CompositeType, type CompositePropsMap, type PollProps, type PollOption, type PredictionProps, type PredictionOption, type PredictionStatus, type CountdownCTAProps, type BottomSheetProps, registerAllComponents, } from './registry';
|
|
25
|
+
export { OverlayRuntime, useOverlayRuntime, useRuntimeTime, useRuntimeState, useRuntimeData, useRuntimeAction, type OverlayRuntimeProps, type OverlayRuntimeContextValue, createStateManager, useSpecState, useSpecStateValue, useSpecStateSetter, type StateManager, type StateSnapshot, createActionRouter, isActionValue, type ActionRouter, type ActionContext, useTimeSync, useWallClockTime, createVideoTimeSource, isTimeInWindow, type TimeState, type VideoTimeSource, } from './runtime';
|
|
26
|
+
export { LayoutRenderer, LayoutTree, type LayoutRendererProps, resolveBindingPath, resolveBinding, resolveProps, resolvePropValue, createBindingContext, type BindingContext, CaptionTrackRenderer, useActiveCaption, type CaptionTrackProps, OverlayCueRenderer, OverlayCueContainer, type OverlayCueRendererProps, } from './renderer';
|
|
27
|
+
export { OverlayHost, useOverlayHost, useHostDataUpdater, useHostData, useSubscriptionAdapter, type OverlayHostProps, type OverlayHostContextValue, type SubscriptionConfig, } from './host';
|
|
28
|
+
export { ThemeProvider, useTheme, useThemeColors, useThemeColor, generateThemeCSS, defaultTheme, darkTheme, lightTheme, neonTheme, warmTheme, coolTheme, type OverlayTheme, type ThemeColors, type ThemeTypography, type ThemeSpacing, type ThemeRadius, type ThemeComponents, type ThemeProviderProps, } from './theme';
|
|
29
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/spec/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAMH,YAAY,EAEV,WAAW,EACX,QAAQ,EAGR,UAAU,EACV,aAAa,EAGb,WAAW,EAGX,YAAY,EACZ,YAAY,EACZ,cAAc,EACd,YAAY,EAGZ,UAAU,EACV,UAAU,EACV,SAAS,EACT,aAAa,EACb,aAAa,EACb,aAAa,EACb,cAAc,EAGd,UAAU,EACV,SAAS,EACT,OAAO,EACP,MAAM,EACN,UAAU,EAGV,SAAS,EACT,gBAAgB,EAChB,mBAAmB,EACnB,gBAAgB,EAGhB,uBAAuB,EAGvB,WAAW,EACX,SAAS,EACT,SAAS,EACT,WAAW,EAGX,IAAI,EACJ,MAAM,EACN,KAAK,EACL,OAAO,EACP,KAAK,EACL,OAAO,EAGP,iBAAiB,EAGjB,SAAS,GACV,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,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,EAClB,KAAK,YAAY,EACjB,KAAK,aAAa,EAGlB,kBAAkB,EAClB,aAAa,EACb,KAAK,YAAY,EACjB,KAAK,aAAa,EAGlB,WAAW,EACX,gBAAgB,EAChB,qBAAqB,EACrB,cAAc,EACd,KAAK,SAAS,EACd,KAAK,eAAe,GACrB,MAAM,WAAW,CAAC;AAMnB,OAAO,EAEL,cAAc,EACd,UAAU,EACV,KAAK,mBAAmB,EAGxB,kBAAkB,EAClB,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,oBAAoB,EACpB,KAAK,cAAc,EAGnB,oBAAoB,EACpB,gBAAgB,EAChB,KAAK,iBAAiB,EAGtB,kBAAkB,EAClB,mBAAmB,EACnB,KAAK,uBAAuB,GAC7B,MAAM,YAAY,CAAC;AAMpB,OAAO,EACL,WAAW,EACX,cAAc,EACd,kBAAkB,EAClB,WAAW,EACX,sBAAsB,EACtB,KAAK,gBAAgB,EACrB,KAAK,uBAAuB,EAC5B,KAAK,kBAAkB,GACxB,MAAM,QAAQ,CAAC;AAMhB,OAAO,EAEL,aAAa,EACb,QAAQ,EACR,cAAc,EACd,aAAa,EACb,gBAAgB,EAGhB,YAAY,EACZ,SAAS,EACT,UAAU,EACV,SAAS,EACT,SAAS,EACT,SAAS,EAGT,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,kBAAkB,GACxB,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Overlay Spec Module
|
|
3
|
+
*
|
|
4
|
+
* A declarative, time-synced UI protocol for hybrid video tiles.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```tsx
|
|
8
|
+
* import { OverlayRuntime, OverlayHost, validateSpec } from '@thewhateverapp/tile-sdk/spec';
|
|
9
|
+
*
|
|
10
|
+
* function HybridTile({ spec }: { spec: OverlaySpec }) {
|
|
11
|
+
* return (
|
|
12
|
+
* <OverlayHost onEvent={handleEvent}>
|
|
13
|
+
* <VideoPlayer src={videoUrl}>
|
|
14
|
+
* <OverlayRuntime spec={spec} />
|
|
15
|
+
* </VideoPlayer>
|
|
16
|
+
* </OverlayHost>
|
|
17
|
+
* );
|
|
18
|
+
* }
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
export { isBinding, isAction, TILE_PROFILE, FULL_PROFILE } from './types';
|
|
22
|
+
// =============================================================================
|
|
23
|
+
// Schema & Validation
|
|
24
|
+
// =============================================================================
|
|
25
|
+
export {
|
|
26
|
+
// Main schema
|
|
27
|
+
OverlaySpecSchema,
|
|
28
|
+
// Sub-schemas
|
|
29
|
+
BindingSchema, ActionSchema, PropValueSchema, ConditionSchema, LayoutNodeSchema, PlacementSchema, OverlayCueSchema, CaptionTrackSchema,
|
|
30
|
+
// Validation functions
|
|
31
|
+
validateSpec, parseSpec, validateAgainstProfile, } from './schema';
|
|
32
|
+
// =============================================================================
|
|
33
|
+
// Component Registry
|
|
34
|
+
// =============================================================================
|
|
35
|
+
export {
|
|
36
|
+
// Registry core
|
|
37
|
+
ComponentRegistry, globalRegistry, registerComponent, getComponent, hasComponent, getAllComponentIds,
|
|
38
|
+
// Design tokens
|
|
39
|
+
sizeClasses, colorClasses, weightClasses, alignClasses, justifyClasses, paddingClasses, gapClasses,
|
|
40
|
+
// Primitives
|
|
41
|
+
Text, Button, Stack, Row, Image, ProgressBar, Spacer, Divider, registerPrimitives, PRIMITIVE_TYPES,
|
|
42
|
+
// Composites
|
|
43
|
+
Poll, Prediction, CountdownCTA, BottomSheet, registerComposites, COMPOSITE_TYPES,
|
|
44
|
+
// All components
|
|
45
|
+
registerAllComponents, } from './registry';
|
|
46
|
+
// =============================================================================
|
|
47
|
+
// Runtime
|
|
48
|
+
// =============================================================================
|
|
49
|
+
export {
|
|
50
|
+
// Main provider
|
|
51
|
+
OverlayRuntime, useOverlayRuntime, useRuntimeTime, useRuntimeState, useRuntimeData, useRuntimeAction,
|
|
52
|
+
// State management
|
|
53
|
+
createStateManager, useSpecState, useSpecStateValue, useSpecStateSetter,
|
|
54
|
+
// Action routing
|
|
55
|
+
createActionRouter, isActionValue,
|
|
56
|
+
// Time sync
|
|
57
|
+
useTimeSync, useWallClockTime, createVideoTimeSource, isTimeInWindow, } from './runtime';
|
|
58
|
+
// =============================================================================
|
|
59
|
+
// Renderer
|
|
60
|
+
// =============================================================================
|
|
61
|
+
export {
|
|
62
|
+
// Layout rendering
|
|
63
|
+
LayoutRenderer, LayoutTree,
|
|
64
|
+
// Binding resolution
|
|
65
|
+
resolveBindingPath, resolveBinding, resolveProps, resolvePropValue, createBindingContext,
|
|
66
|
+
// Caption rendering
|
|
67
|
+
CaptionTrackRenderer, useActiveCaption,
|
|
68
|
+
// Overlay cue rendering
|
|
69
|
+
OverlayCueRenderer, OverlayCueContainer, } from './renderer';
|
|
70
|
+
// =============================================================================
|
|
71
|
+
// Host
|
|
72
|
+
// =============================================================================
|
|
73
|
+
export { OverlayHost, useOverlayHost, useHostDataUpdater, useHostData, useSubscriptionAdapter, } from './host';
|
|
74
|
+
// =============================================================================
|
|
75
|
+
// Theme
|
|
76
|
+
// =============================================================================
|
|
77
|
+
export {
|
|
78
|
+
// Provider
|
|
79
|
+
ThemeProvider, useTheme, useThemeColors, useThemeColor, generateThemeCSS,
|
|
80
|
+
// Preset themes
|
|
81
|
+
defaultTheme, darkTheme, lightTheme, neonTheme, warmTheme, coolTheme, } from './theme';
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Component Registry
|
|
3
|
+
*
|
|
4
|
+
* Maps component type IDs (e.g., "ui.text", "ui.button") to React components.
|
|
5
|
+
* The spec uses string IDs; the registry resolves them to actual components.
|
|
6
|
+
*/
|
|
7
|
+
import type { ComponentType, ReactNode } from 'react';
|
|
8
|
+
/**
|
|
9
|
+
* Props passed to all registered components
|
|
10
|
+
*/
|
|
11
|
+
export interface RegistryComponentProps {
|
|
12
|
+
/** Resolved props from spec */
|
|
13
|
+
[key: string]: unknown;
|
|
14
|
+
/** Children nodes (already rendered) */
|
|
15
|
+
children?: ReactNode;
|
|
16
|
+
/** Action handler */
|
|
17
|
+
onAction?: (action: {
|
|
18
|
+
$action: string;
|
|
19
|
+
payload?: Record<string, unknown>;
|
|
20
|
+
}) => void;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Component with action support type helper
|
|
24
|
+
*/
|
|
25
|
+
export type ComponentWithAction<P = Record<string, unknown>> = ComponentType<P & {
|
|
26
|
+
onAction?: RegistryComponentProps['onAction'];
|
|
27
|
+
}>;
|
|
28
|
+
/**
|
|
29
|
+
* Component definition in the registry
|
|
30
|
+
*/
|
|
31
|
+
export interface ComponentDefinition {
|
|
32
|
+
/** The React component */
|
|
33
|
+
component: ComponentType<RegistryComponentProps>;
|
|
34
|
+
/** Default props */
|
|
35
|
+
defaults?: Record<string, unknown>;
|
|
36
|
+
/** Prop validation/transformation */
|
|
37
|
+
transformProps?: (props: Record<string, unknown>) => Record<string, unknown>;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Register a component with the registry.
|
|
41
|
+
* Components should extend RegistryComponentProps but can have additional required props.
|
|
42
|
+
*/
|
|
43
|
+
export declare function registerComponent<P extends RegistryComponentProps = RegistryComponentProps>(type: string, component: ComponentType<any>, options?: {
|
|
44
|
+
defaults?: Record<string, unknown>;
|
|
45
|
+
transformProps?: (props: Record<string, unknown>) => Record<string, unknown>;
|
|
46
|
+
}): void;
|
|
47
|
+
/**
|
|
48
|
+
* Get a component from the registry
|
|
49
|
+
*/
|
|
50
|
+
export declare function getComponent(type: string): ComponentDefinition | undefined;
|
|
51
|
+
/**
|
|
52
|
+
* Check if a component type is registered
|
|
53
|
+
*/
|
|
54
|
+
export declare function hasComponent(type: string): boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Get all registered component types
|
|
57
|
+
*/
|
|
58
|
+
export declare function getRegisteredTypes(): string[];
|
|
59
|
+
/** Alias for getRegisteredTypes */
|
|
60
|
+
export declare const getAllComponentIds: typeof getRegisteredTypes;
|
|
61
|
+
/**
|
|
62
|
+
* Clear the registry (useful for testing)
|
|
63
|
+
*/
|
|
64
|
+
export declare function clearRegistry(): void;
|
|
65
|
+
export declare class ComponentRegistry {
|
|
66
|
+
private components;
|
|
67
|
+
/**
|
|
68
|
+
* Register a component
|
|
69
|
+
*/
|
|
70
|
+
register(type: string, component: ComponentType<RegistryComponentProps>, options?: {
|
|
71
|
+
defaults?: Record<string, unknown>;
|
|
72
|
+
transformProps?: (props: Record<string, unknown>) => Record<string, unknown>;
|
|
73
|
+
}): this;
|
|
74
|
+
/**
|
|
75
|
+
* Get a component definition
|
|
76
|
+
*/
|
|
77
|
+
get(type: string): ComponentDefinition | undefined;
|
|
78
|
+
/**
|
|
79
|
+
* Check if type is registered
|
|
80
|
+
*/
|
|
81
|
+
has(type: string): boolean;
|
|
82
|
+
/**
|
|
83
|
+
* Get all registered types
|
|
84
|
+
*/
|
|
85
|
+
types(): string[];
|
|
86
|
+
/**
|
|
87
|
+
* Merge another registry into this one
|
|
88
|
+
*/
|
|
89
|
+
merge(other: ComponentRegistry): this;
|
|
90
|
+
/**
|
|
91
|
+
* Create a child registry that inherits from this one
|
|
92
|
+
*/
|
|
93
|
+
extend(): ComponentRegistry;
|
|
94
|
+
}
|
|
95
|
+
export declare const defaultRegistry: ComponentRegistry;
|
|
96
|
+
/** Alias for defaultRegistry (for compatibility) */
|
|
97
|
+
export declare const globalRegistry: ComponentRegistry;
|
|
98
|
+
/**
|
|
99
|
+
* Fallback component for unknown types.
|
|
100
|
+
* This is defined in the React component files that use it.
|
|
101
|
+
*/
|
|
102
|
+
export declare function createUnknownComponentMessage(type: string): string;
|
|
103
|
+
/**
|
|
104
|
+
* Size token to Tailwind class mapping
|
|
105
|
+
*/
|
|
106
|
+
export declare const sizeClasses: {
|
|
107
|
+
readonly xs: "text-xs";
|
|
108
|
+
readonly sm: "text-sm";
|
|
109
|
+
readonly md: "text-base";
|
|
110
|
+
readonly lg: "text-lg";
|
|
111
|
+
readonly xl: "text-xl";
|
|
112
|
+
readonly '2xl': "text-2xl";
|
|
113
|
+
};
|
|
114
|
+
/**
|
|
115
|
+
* Weight token to Tailwind class mapping
|
|
116
|
+
*/
|
|
117
|
+
export declare const weightClasses: {
|
|
118
|
+
readonly normal: "font-normal";
|
|
119
|
+
readonly medium: "font-medium";
|
|
120
|
+
readonly semibold: "font-semibold";
|
|
121
|
+
readonly bold: "font-bold";
|
|
122
|
+
};
|
|
123
|
+
/**
|
|
124
|
+
* Color token to Tailwind class mapping
|
|
125
|
+
*/
|
|
126
|
+
export declare const colorClasses: {
|
|
127
|
+
readonly primary: "text-purple-500";
|
|
128
|
+
readonly secondary: "text-gray-500";
|
|
129
|
+
readonly success: "text-green-500";
|
|
130
|
+
readonly warning: "text-yellow-500";
|
|
131
|
+
readonly error: "text-red-500";
|
|
132
|
+
readonly muted: "text-gray-400";
|
|
133
|
+
readonly white: "text-white";
|
|
134
|
+
readonly black: "text-black";
|
|
135
|
+
};
|
|
136
|
+
/**
|
|
137
|
+
* Background color token to Tailwind class mapping
|
|
138
|
+
*/
|
|
139
|
+
export declare const bgColorClasses: {
|
|
140
|
+
readonly primary: "bg-purple-500";
|
|
141
|
+
readonly secondary: "bg-gray-500";
|
|
142
|
+
readonly success: "bg-green-500";
|
|
143
|
+
readonly warning: "bg-yellow-500";
|
|
144
|
+
readonly error: "bg-red-500";
|
|
145
|
+
readonly muted: "bg-gray-400";
|
|
146
|
+
readonly white: "bg-white";
|
|
147
|
+
readonly black: "bg-black";
|
|
148
|
+
};
|
|
149
|
+
/**
|
|
150
|
+
* Variant token to button style mapping
|
|
151
|
+
*/
|
|
152
|
+
export declare const variantStyles: {
|
|
153
|
+
readonly solid: {
|
|
154
|
+
readonly base: "bg-purple-500 text-white hover:bg-purple-600";
|
|
155
|
+
readonly disabled: "bg-gray-300 text-gray-500";
|
|
156
|
+
};
|
|
157
|
+
readonly outline: {
|
|
158
|
+
readonly base: "border-2 border-purple-500 text-purple-500 hover:bg-purple-50";
|
|
159
|
+
readonly disabled: "border-gray-300 text-gray-400";
|
|
160
|
+
};
|
|
161
|
+
readonly ghost: {
|
|
162
|
+
readonly base: "text-purple-500 hover:bg-purple-50";
|
|
163
|
+
readonly disabled: "text-gray-400";
|
|
164
|
+
};
|
|
165
|
+
readonly link: {
|
|
166
|
+
readonly base: "text-purple-500 underline hover:text-purple-600";
|
|
167
|
+
readonly disabled: "text-gray-400";
|
|
168
|
+
};
|
|
169
|
+
};
|
|
170
|
+
/**
|
|
171
|
+
* Gap token to Tailwind class mapping
|
|
172
|
+
*/
|
|
173
|
+
export declare const gapClasses: {
|
|
174
|
+
readonly xs: "gap-1";
|
|
175
|
+
readonly sm: "gap-2";
|
|
176
|
+
readonly md: "gap-4";
|
|
177
|
+
readonly lg: "gap-6";
|
|
178
|
+
readonly xl: "gap-8";
|
|
179
|
+
};
|
|
180
|
+
/**
|
|
181
|
+
* Padding token to Tailwind class mapping
|
|
182
|
+
*/
|
|
183
|
+
export declare const paddingClasses: {
|
|
184
|
+
readonly xs: "p-1";
|
|
185
|
+
readonly sm: "p-2";
|
|
186
|
+
readonly md: "p-4";
|
|
187
|
+
readonly lg: "p-6";
|
|
188
|
+
readonly xl: "p-8";
|
|
189
|
+
};
|
|
190
|
+
/**
|
|
191
|
+
* Align token to Tailwind class mapping
|
|
192
|
+
*/
|
|
193
|
+
export declare const alignClasses: {
|
|
194
|
+
readonly left: "items-start";
|
|
195
|
+
readonly center: "items-center";
|
|
196
|
+
readonly right: "items-end";
|
|
197
|
+
};
|
|
198
|
+
/**
|
|
199
|
+
* Justify token to Tailwind class mapping
|
|
200
|
+
*/
|
|
201
|
+
export declare const justifyClasses: {
|
|
202
|
+
readonly start: "justify-start";
|
|
203
|
+
readonly center: "justify-center";
|
|
204
|
+
readonly end: "justify-end";
|
|
205
|
+
readonly between: "justify-between";
|
|
206
|
+
readonly around: "justify-around";
|
|
207
|
+
};
|
|
208
|
+
//# sourceMappingURL=ComponentRegistry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ComponentRegistry.d.ts","sourceRoot":"","sources":["../../../src/spec/registry/ComponentRegistry.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAOtD;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,+BAA+B;IAC/B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IAEvB,wCAAwC;IACxC,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB,qBAAqB;IACrB,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,KAAK,IAAI,CAAC;CACrF;AAED;;GAEG;AACH,MAAM,MAAM,mBAAmB,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,aAAa,CAC1E,CAAC,GAAG;IAAE,QAAQ,CAAC,EAAE,sBAAsB,CAAC,UAAU,CAAC,CAAA;CAAE,CACtD,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,0BAA0B;IAC1B,SAAS,EAAE,aAAa,CAAC,sBAAsB,CAAC,CAAC;IAEjD,oBAAoB;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEnC,qCAAqC;IACrC,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC9E;AAaD;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,sBAAsB,GA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