@coxwave/tap-kit-types 0.0.44 → 0.0.50

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
@@ -13,12 +13,15 @@ interface ConfigUpdateMessage {
13
13
  hostOrigin?: string;
14
14
  tapUrl?: string;
15
15
  apiUrl?: string;
16
- environment?: "dev" | "prod";
16
+ environment?: "dev" | "prod" | "demo";
17
17
  language?: "ko" | "en" | (string & {});
18
18
  userId?: string;
19
19
  courseId?: string;
20
20
  clipId?: string;
21
21
  clipPlayHead?: number;
22
+ container?: {
23
+ disableSidebar?: boolean;
24
+ };
22
25
  }
23
26
 
24
27
  /**
@@ -30,13 +33,36 @@ type PositionType = {
30
33
  right?: string;
31
34
  bottom?: string;
32
35
  };
36
+ /**
37
+ * Container Mode
38
+ * - floating: Floating positioned container (default)
39
+ * - sidebar: Fixed sidebar positioned at the right edge
40
+ */
41
+ type ContainerMode = "floating" | "sidebar";
42
+ /**
43
+ * Sidebar Configuration
44
+ */
45
+ type SidebarConfig = {
46
+ /** Width of the sidebar (default: "max(15%, 400px)") */
47
+ width?: string;
48
+ /** Minimum viewport width to enable sidebar mode (default: 768) */
49
+ minViewportWidth?: number;
50
+ };
33
51
  /**
34
52
  * Container Styling
35
53
  */
36
54
  type ContainerStyle = {
55
+ /** Container mode (default: "floating") */
56
+ mode?: ContainerMode;
57
+ /** Sidebar configuration (only applicable when mode is "sidebar") */
58
+ sidebarConfig?: SidebarConfig;
59
+ /** Position (only applicable when mode is "floating") */
37
60
  position?: PositionType;
61
+ /** Width (only applicable when mode is "floating") */
38
62
  width?: string;
63
+ /** Height (only applicable when mode is "floating") */
39
64
  height?: string;
65
+ /** Border radius */
40
66
  borderRadius?: string;
41
67
  };
42
68
  /**
@@ -89,7 +115,10 @@ type Course = {
89
115
  type TapKitInitParams = {
90
116
  buttonId: string;
91
117
  course: Course;
92
- container?: ContainerStyle;
118
+ container?: ContainerStyle & {
119
+ /** Disable sidebar mode toggle (sidebar mode will not be available) */
120
+ disableSidebar?: boolean;
121
+ };
93
122
  };
94
123
 
95
124
  /**
@@ -228,4 +257,4 @@ declare global {
228
257
  function cancelIdleCallback(handle: number): void;
229
258
  }
230
259
 
231
- export { type AlarmMessageInstanceType, type AlarmType, type ContainerStyle, type ContainerVisibility, type Course, type CustomStyles, TapKitInitializationError as InitializationError, type PositionType, type SeekTimelineParamsType, type ShortcutKeyPropertiesType, TAPKIT_CONFIG_SYMBOL, TAP_ERROR_MARKER, type TapErrorOptions, type TapKitConfig, type TapKitConfigOptions, TapKitConfigurationError, type TapKitConstructor, TapKitError, TapKitIframeError, type TapKitInitParams, TapKitInitializationError, type TapKitInstance, TapKitLoaderError, TapKitMessageError, type TapKitRuntimeConfig };
260
+ export { type AlarmMessageInstanceType, type AlarmType, type ContainerMode, type ContainerStyle, type ContainerVisibility, type Course, type CustomStyles, TapKitInitializationError as InitializationError, type PositionType, type SeekTimelineParamsType, type ShortcutKeyPropertiesType, type SidebarConfig, TAPKIT_CONFIG_SYMBOL, TAP_ERROR_MARKER, type TapErrorOptions, type TapKitConfig, type TapKitConfigOptions, TapKitConfigurationError, type TapKitConstructor, TapKitError, TapKitIframeError, type TapKitInitParams, TapKitInitializationError, type TapKitInstance, TapKitLoaderError, TapKitMessageError, type TapKitRuntimeConfig };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coxwave/tap-kit-types",
3
- "version": "0.0.44",
3
+ "version": "0.0.50",
4
4
  "type": "module",
5
5
  "description": "Shared TypeScript types for TapKit SDK packages",
6
6
  "main": "dist/index.js",
@@ -19,14 +19,13 @@
19
19
  "author": "",
20
20
  "license": "MIT",
21
21
  "files": [
22
- "dist",
23
- "index.ts"
22
+ "dist"
24
23
  ],
25
24
  "devDependencies": {
26
25
  "tsup": "^8.5.0",
27
- "@coxwave/config-eslint": "1.0.0",
26
+ "@coxwave/config-typescript": "1.0.0",
28
27
  "@coxwave/tap-messages": "0.0.1",
29
- "@coxwave/config-typescript": "1.0.0"
28
+ "@coxwave/config-eslint": "1.0.0"
30
29
  },
31
30
  "scripts": {
32
31
  "build": "tsup",
package/index.ts DELETED
@@ -1,39 +0,0 @@
1
- /**
2
- * @coxwave/tap-kit-types
3
- * Shared TypeScript types for TapKit SDK packages
4
- *
5
- * This package serves as the single source of truth for all TapKit types,
6
- * used by both @coxwave/tap-sdk (npm wrapper) and @coxwave/tap-kit-core (CDN implementation).
7
- */
8
-
9
- // Re-exports from tap-messages
10
- export type { AlarmMessageInstanceType, AlarmType } from "@coxwave/tap-messages";
11
-
12
- // Configuration types
13
- export type { TapKitConfig, TapKitRuntimeConfig, TapKitConfigOptions, TapKitInitParams, Course } from "./src/config.js";
14
-
15
- // Styling types
16
- export type { ContainerStyle, PositionType, CustomStyles } from "./src/styles.js";
17
-
18
- // Event types
19
- export type { SeekTimelineParamsType, ShortcutKeyPropertiesType, ContainerVisibility } from "./src/events.js";
20
-
21
- // Instance types
22
- export type { TapKitInstance, TapKitConstructor, TAPKIT_CONFIG_SYMBOL } from "./src/instance.js";
23
-
24
- // Error types and classes
25
- export type { TapErrorOptions } from "./src/errors.js";
26
-
27
- export {
28
- TAP_ERROR_MARKER,
29
- TapKitError,
30
- TapKitInitializationError,
31
- TapKitMessageError,
32
- TapKitConfigurationError,
33
- TapKitLoaderError,
34
- TapKitIframeError,
35
- InitializationError,
36
- } from "./src/errors.js";
37
-
38
- // Global type definitions (Window, requestIdleCallback)
39
- import "./src/global.d.js";