@coxwave/tap-kit-types 2.10.0 → 2.10.2

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/index.d.ts CHANGED
@@ -396,6 +396,7 @@ interface ViewportResizeMessage {
396
396
  * - This message protocol mirrors the structure for serialization
397
397
  * - When updating ContainerConfig, update this structure accordingly
398
398
  */
399
+ type ChatMode = "NORMAL" | "EXAM" | "STUDY";
399
400
  interface ConfigUpdateMessage {
400
401
  type: "config:update";
401
402
  apiKey?: string;
@@ -409,6 +410,8 @@ interface ConfigUpdateMessage {
409
410
  clipId?: string;
410
411
  clipPlayHead?: number;
411
412
  mode?: DisplayMode;
413
+ /** Chat interaction mode (staging feature: per-message override) */
414
+ chatMode?: ChatMode;
412
415
  /**
413
416
  * Allow user to toggle between floating and sidebar layouts
414
417
  * @default true
@@ -2290,6 +2293,7 @@ declare const ConfigUpdateSchema: ObjectSchema<{
2290
2293
  readonly clipId: OptionalSchema<StringSchema<undefined>, undefined>;
2291
2294
  readonly clipPlayHead: OptionalSchema<NumberSchema<undefined>, undefined>;
2292
2295
  readonly mode: OptionalSchema<UnionSchema<[LiteralSchema<"inline", undefined>, LiteralSchema<"floating", undefined>, LiteralSchema<"sidebar", undefined>], undefined>, undefined>;
2296
+ readonly chatMode: OptionalSchema<UnionSchema<[LiteralSchema<"NORMAL", undefined>, LiteralSchema<"EXAM", undefined>, LiteralSchema<"STUDY", undefined>], undefined>, undefined>;
2293
2297
  readonly allowLayoutToggle: OptionalSchema<BooleanSchema<undefined>, undefined>;
2294
2298
  readonly container: OptionalSchema<ObjectSchema<{
2295
2299
  readonly floatingConfig: OptionalSchema<ObjectSchema<{
@@ -2401,6 +2405,7 @@ declare const TapMessageSchema: UnionSchema<[ObjectSchema<{
2401
2405
  readonly clipId: OptionalSchema<StringSchema<undefined>, undefined>;
2402
2406
  readonly clipPlayHead: OptionalSchema<NumberSchema<undefined>, undefined>;
2403
2407
  readonly mode: OptionalSchema<UnionSchema<[LiteralSchema<"inline", undefined>, LiteralSchema<"floating", undefined>, LiteralSchema<"sidebar", undefined>], undefined>, undefined>;
2408
+ readonly chatMode: OptionalSchema<UnionSchema<[LiteralSchema<"NORMAL", undefined>, LiteralSchema<"EXAM", undefined>, LiteralSchema<"STUDY", undefined>], undefined>, undefined>;
2404
2409
  readonly allowLayoutToggle: OptionalSchema<BooleanSchema<undefined>, undefined>;
2405
2410
  readonly container: OptionalSchema<ObjectSchema<{
2406
2411
  readonly floatingConfig: OptionalSchema<ObjectSchema<{
@@ -2500,7 +2505,7 @@ type SyncableConfigKey = Exclude<ConfigUpdateKey, "apiKey" | "hostOrigin" | "tap
2500
2505
  type Course = {
2501
2506
  userId: string;
2502
2507
  courseId: string;
2503
- clipId: string;
2508
+ clipId?: string;
2504
2509
  clipPlayHead?: number;
2505
2510
  };
2506
2511
  /**
@@ -2823,11 +2828,10 @@ interface TapKitInstance {
2823
2828
  hide(): void;
2824
2829
  /**
2825
2830
  * Update course information
2826
- * @param course - Course info (courseId and clipId required, userId and clipPlayHead optional)
2831
+ * @param course - Course info (courseId required, clipId optional)
2827
2832
  */
2828
2833
  setCourse(course: Partial<Course> & {
2829
2834
  courseId: string;
2830
- clipId: string;
2831
2835
  }): void;
2832
2836
  }
2833
2837
  /** TapKit constructor type */
@@ -3463,10 +3467,10 @@ interface TapKitElement extends HTMLElement {
3463
3467
 
3464
3468
  /**
3465
3469
  * Update course information
3466
- * @param course - Partial course information (courseId and clipId required)
3470
+ * @param course - Partial course information (courseId required, clipId optional)
3467
3471
  * @example kit.setCourse({ courseId: 'new', clipId: 'new-1' })
3468
3472
  */
3469
- setCourse(course: Partial<Course> & { courseId: string; clipId: string }): void;
3473
+ setCourse(course: Partial<Course> & { courseId: string }): void;
3470
3474
 
3471
3475
  // ===== Delegate Properties (Read-only) =====
3472
3476
 
@@ -3608,6 +3612,9 @@ interface TapKitAttributes {
3608
3612
  */
3609
3613
  mode?: "inline" | "floating" | "sidebar";
3610
3614
 
3615
+ /** Chat interaction mode (staging feature: per-message override) */
3616
+ "chat-mode"?: "NORMAL" | "EXAM" | "STUDY";
3617
+
3611
3618
  /**
3612
3619
  * Allow user to toggle between floating and sidebar layouts
3613
3620
  * Only applies when mode is "floating" or "sidebar"
@@ -3917,6 +3924,7 @@ declare global {
3917
3924
  language?: "ko" | "en";
3918
3925
  buttonId?: string;
3919
3926
  mode?: "inline" | "floating" | "sidebar";
3927
+ chatMode?: "NORMAL" | "EXAM" | "STUDY";
3920
3928
  debug?: boolean;
3921
3929
  apiUrl?: string;
3922
3930
  tapUrl?: string;
@@ -3942,4 +3950,4 @@ declare global {
3942
3950
  function cancelIdleCallback(handle: number): void;
3943
3951
  }
3944
3952
 
3945
- export { ALARM_DURATION, type AlarmClickMessage, AlarmClickSchema, type AlarmElement, type AlarmElementProps, AlarmElementPropsSchema, AlarmElementSchema, type AlarmFadeInMessage, AlarmFadeInSchema, AlarmMessageInstanceSchema, type AlarmMessageInstanceType, type AlarmPayload, type AlarmType, type CSSStyle, CSSStyleSchema, type ConfigRequestMessage, ConfigRequestSchema, type ConfigUpdateKey, type ConfigUpdateMessage, type ConfigUpdateOptions, type ConfigUpdatePayload, ConfigUpdateSchema, type ContainerConfig, type ContainerLayoutStateChangedMessage, ContainerLayoutStateChangedSchema, type ContainerModeChangeAckMessage, ContainerModeChangeAckSchema, type ContainerModeChangeMessage, ContainerModeChangeSchema, type ContainerVisibility, type Course, type DisplayMode, type EventManager, type FeatureFlagKey, type FeatureFlags, type FeatureFlagsUpdateMessage, type FloatingConfig, type GAEventMessage, GAEventSchema, type HtmlViewCloseMessage, HtmlViewCloseSchema, type HtmlViewConfig, type HtmlViewOpenMessage, HtmlViewOpenSchema, type ITapButtonElement, type ITapContainerElement, type ITapHtmlViewerElement, type ITapKitElement, type ITapMaterialViewerElement, TapKitInitializationError as InitializationError, type LayoutMode, type MaterialViewCloseMessage, MaterialViewCloseSchema, type MaterialViewConfig, type MaterialViewErrorMessage, MaterialViewErrorSchema, type MaterialViewOpenMessage, MaterialViewOpenSchema, MaterialViewerError, type PopUpCloseMessage, PopUpCloseSchema, type PopUpOpenMessage, PopUpOpenSchema, type PositionType, type SeekTimelineParamsType, type ShortcutKeyPropertiesType, type SidebarConfig, type SyncableConfigKey, TAP_BUTTON_CLICK_EVENT, TAP_ERROR_MARKER, type TapButtonAttributes, type TapButtonClickEventDetail, type TapCloseMessage, TapCloseSchema, type TapContainerAttributes, type TapErrorOptions, type TapHtmlViewerAttributes, type TapKitConfig, TapKitConfigurationError, type TapKitConstructor, type TapKitElement, type TapKitElementEventMap, TapKitError, TapKitIframeError, type TapKitInitParams, TapKitInitializationError, type TapKitInstance, TapKitLoaderError, TapKitMessageError, type TapMaterialViewerAttributes, type TapMessage, type TapMessageRecord, TapMessageSchema, type TapMessageType, type TapReadyMessage, TapReadySchema, type TimelineSeekMessage, TimelineSeekSchema, type TutorInfoMessage, TutorInfoSchema, type VideoController, type VideoPlayerAdapter, type VideoPlayerConfig, type ViewportResizeMessage, ViewportResizeSchema, isFeatureEnabled };
3953
+ export { ALARM_DURATION, type AlarmClickMessage, AlarmClickSchema, type AlarmElement, type AlarmElementProps, AlarmElementPropsSchema, AlarmElementSchema, type AlarmFadeInMessage, AlarmFadeInSchema, AlarmMessageInstanceSchema, type AlarmMessageInstanceType, type AlarmPayload, type AlarmType, type CSSStyle, CSSStyleSchema, type ChatMode, type ConfigRequestMessage, ConfigRequestSchema, type ConfigUpdateKey, type ConfigUpdateMessage, type ConfigUpdateOptions, type ConfigUpdatePayload, ConfigUpdateSchema, type ContainerConfig, type ContainerLayoutStateChangedMessage, ContainerLayoutStateChangedSchema, type ContainerModeChangeAckMessage, ContainerModeChangeAckSchema, type ContainerModeChangeMessage, ContainerModeChangeSchema, type ContainerVisibility, type Course, type DisplayMode, type EventManager, type FeatureFlagKey, type FeatureFlags, type FeatureFlagsUpdateMessage, type FloatingConfig, type GAEventMessage, GAEventSchema, type HtmlViewCloseMessage, HtmlViewCloseSchema, type HtmlViewConfig, type HtmlViewOpenMessage, HtmlViewOpenSchema, type ITapButtonElement, type ITapContainerElement, type ITapHtmlViewerElement, type ITapKitElement, type ITapMaterialViewerElement, TapKitInitializationError as InitializationError, type LayoutMode, type MaterialViewCloseMessage, MaterialViewCloseSchema, type MaterialViewConfig, type MaterialViewErrorMessage, MaterialViewErrorSchema, type MaterialViewOpenMessage, MaterialViewOpenSchema, MaterialViewerError, type PopUpCloseMessage, PopUpCloseSchema, type PopUpOpenMessage, PopUpOpenSchema, type PositionType, type SeekTimelineParamsType, type ShortcutKeyPropertiesType, type SidebarConfig, type SyncableConfigKey, TAP_BUTTON_CLICK_EVENT, TAP_ERROR_MARKER, type TapButtonAttributes, type TapButtonClickEventDetail, type TapCloseMessage, TapCloseSchema, type TapContainerAttributes, type TapErrorOptions, type TapHtmlViewerAttributes, type TapKitConfig, TapKitConfigurationError, type TapKitConstructor, type TapKitElement, type TapKitElementEventMap, TapKitError, TapKitIframeError, type TapKitInitParams, TapKitInitializationError, type TapKitInstance, TapKitLoaderError, TapKitMessageError, type TapMaterialViewerAttributes, type TapMessage, type TapMessageRecord, TapMessageSchema, type TapMessageType, type TapReadyMessage, TapReadySchema, type TimelineSeekMessage, TimelineSeekSchema, type TutorInfoMessage, TutorInfoSchema, type VideoController, type VideoPlayerAdapter, type VideoPlayerConfig, type ViewportResizeMessage, ViewportResizeSchema, isFeatureEnabled };
package/dist/index.js CHANGED
@@ -855,6 +855,7 @@ var ConfigUpdateSchema = object({
855
855
  clipId: optional(string()),
856
856
  clipPlayHead: optional(number()),
857
857
  mode: optional(union([literal("inline"), literal("floating"), literal("sidebar")])),
858
+ chatMode: optional(union([literal("NORMAL"), literal("EXAM"), literal("STUDY")])),
858
859
  allowLayoutToggle: optional(boolean()),
859
860
  container: optional(
860
861
  object({