@sqaitech/visualizer 0.5.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.
Files changed (152) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +9 -0
  3. package/dist/es/assets/sqai-logo.mjs +2 -0
  4. package/dist/es/component/blackboard/index.css +33 -0
  5. package/dist/es/component/blackboard/index.mjs +278 -0
  6. package/dist/es/component/config-selector/index.mjs +104 -0
  7. package/dist/es/component/context-preview/index.mjs +38 -0
  8. package/dist/es/component/env-config/index.mjs +112 -0
  9. package/dist/es/component/env-config-reminder/index.css +22 -0
  10. package/dist/es/component/env-config-reminder/index.mjs +28 -0
  11. package/dist/es/component/form-field/index.mjs +163 -0
  12. package/dist/es/component/history-selector/index.css +135 -0
  13. package/dist/es/component/history-selector/index.mjs +170 -0
  14. package/dist/es/component/index.mjs +1 -0
  15. package/dist/es/component/logo/index.css +13 -0
  16. package/dist/es/component/logo/index.mjs +21 -0
  17. package/dist/es/component/misc/index.mjs +94 -0
  18. package/dist/es/component/nav-actions/index.mjs +32 -0
  19. package/dist/es/component/nav-actions/style.css +35 -0
  20. package/dist/es/component/player/index.css +185 -0
  21. package/dist/es/component/player/index.mjs +856 -0
  22. package/dist/es/component/playground/index.css +431 -0
  23. package/dist/es/component/playground/index.mjs +8 -0
  24. package/dist/es/component/playground/playground-demo-ui-context.json +290 -0
  25. package/dist/es/component/playground-result/index.css +34 -0
  26. package/dist/es/component/playground-result/index.mjs +62 -0
  27. package/dist/es/component/prompt-input/index.css +391 -0
  28. package/dist/es/component/prompt-input/index.mjs +730 -0
  29. package/dist/es/component/service-mode-control/index.mjs +105 -0
  30. package/dist/es/component/shiny-text/index.css +75 -0
  31. package/dist/es/component/shiny-text/index.mjs +15 -0
  32. package/dist/es/component/universal-playground/index.css +341 -0
  33. package/dist/es/component/universal-playground/index.mjs +302 -0
  34. package/dist/es/component/universal-playground/providers/context-provider.mjs +52 -0
  35. package/dist/es/component/universal-playground/providers/indexeddb-storage-provider.mjs +207 -0
  36. package/dist/es/component/universal-playground/providers/storage-provider.mjs +210 -0
  37. package/dist/es/hooks/usePlaygroundExecution.mjs +180 -0
  38. package/dist/es/hooks/usePlaygroundState.mjs +203 -0
  39. package/dist/es/hooks/useSafeOverrideAIConfig.mjs +24 -0
  40. package/dist/es/hooks/useServerValid.mjs +30 -0
  41. package/dist/es/icons/avatar.mjs +28 -0
  42. package/dist/es/icons/close.mjs +19 -0
  43. package/dist/es/icons/global-perspective.mjs +16 -0
  44. package/dist/es/icons/history.mjs +30 -0
  45. package/dist/es/icons/magnifying-glass.mjs +39 -0
  46. package/dist/es/icons/player-setting.mjs +26 -0
  47. package/dist/es/icons/setting.mjs +20 -0
  48. package/dist/es/icons/show-marker.mjs +16 -0
  49. package/dist/es/index.mjs +25 -0
  50. package/dist/es/static/image/sqai-logo.png +0 -0
  51. package/dist/es/store/history.mjs +89 -0
  52. package/dist/es/store/store.mjs +186 -0
  53. package/dist/es/types.mjs +70 -0
  54. package/dist/es/utils/color.mjs +35 -0
  55. package/dist/es/utils/constants.mjs +99 -0
  56. package/dist/es/utils/index.mjs +10 -0
  57. package/dist/es/utils/pixi-loader.mjs +16 -0
  58. package/dist/es/utils/playground-utils.mjs +67 -0
  59. package/dist/es/utils/replay-scripts.mjs +312 -0
  60. package/dist/lib/assets/sqai-logo.js +24 -0
  61. package/dist/lib/component/blackboard/index.css +33 -0
  62. package/dist/lib/component/blackboard/index.js +321 -0
  63. package/dist/lib/component/config-selector/index.js +148 -0
  64. package/dist/lib/component/context-preview/index.js +83 -0
  65. package/dist/lib/component/env-config/index.js +146 -0
  66. package/dist/lib/component/env-config-reminder/index.css +22 -0
  67. package/dist/lib/component/env-config-reminder/index.js +62 -0
  68. package/dist/lib/component/form-field/index.js +209 -0
  69. package/dist/lib/component/history-selector/index.css +135 -0
  70. package/dist/lib/component/history-selector/index.js +216 -0
  71. package/dist/lib/component/index.js +60 -0
  72. package/dist/lib/component/logo/index.css +13 -0
  73. package/dist/lib/component/logo/index.js +68 -0
  74. package/dist/lib/component/misc/index.js +150 -0
  75. package/dist/lib/component/nav-actions/index.js +66 -0
  76. package/dist/lib/component/nav-actions/style.css +35 -0
  77. package/dist/lib/component/player/index.css +185 -0
  78. package/dist/lib/component/player/index.js +902 -0
  79. package/dist/lib/component/playground/index.css +431 -0
  80. package/dist/lib/component/playground/index.js +113 -0
  81. package/dist/lib/component/playground/playground-demo-ui-context.json +290 -0
  82. package/dist/lib/component/playground-result/index.css +34 -0
  83. package/dist/lib/component/playground-result/index.js +106 -0
  84. package/dist/lib/component/prompt-input/index.css +391 -0
  85. package/dist/lib/component/prompt-input/index.js +774 -0
  86. package/dist/lib/component/service-mode-control/index.js +139 -0
  87. package/dist/lib/component/shiny-text/index.css +75 -0
  88. package/dist/lib/component/shiny-text/index.js +49 -0
  89. package/dist/lib/component/universal-playground/index.css +341 -0
  90. package/dist/lib/component/universal-playground/index.js +350 -0
  91. package/dist/lib/component/universal-playground/providers/context-provider.js +95 -0
  92. package/dist/lib/component/universal-playground/providers/indexeddb-storage-provider.js +247 -0
  93. package/dist/lib/component/universal-playground/providers/storage-provider.js +268 -0
  94. package/dist/lib/hooks/usePlaygroundExecution.js +214 -0
  95. package/dist/lib/hooks/usePlaygroundState.js +237 -0
  96. package/dist/lib/hooks/useSafeOverrideAIConfig.js +61 -0
  97. package/dist/lib/hooks/useServerValid.js +64 -0
  98. package/dist/lib/icons/avatar.js +62 -0
  99. package/dist/lib/icons/close.js +53 -0
  100. package/dist/lib/icons/global-perspective.js +50 -0
  101. package/dist/lib/icons/history.js +64 -0
  102. package/dist/lib/icons/magnifying-glass.js +73 -0
  103. package/dist/lib/icons/player-setting.js +60 -0
  104. package/dist/lib/icons/setting.js +54 -0
  105. package/dist/lib/icons/show-marker.js +50 -0
  106. package/dist/lib/index.js +187 -0
  107. package/dist/lib/static/image/sqai-logo.png +0 -0
  108. package/dist/lib/store/history.js +96 -0
  109. package/dist/lib/store/store.js +196 -0
  110. package/dist/lib/types.js +116 -0
  111. package/dist/lib/utils/color.js +75 -0
  112. package/dist/lib/utils/constants.js +154 -0
  113. package/dist/lib/utils/index.js +63 -0
  114. package/dist/lib/utils/pixi-loader.js +56 -0
  115. package/dist/lib/utils/playground-utils.js +110 -0
  116. package/dist/lib/utils/replay-scripts.js +355 -0
  117. package/dist/types/component/blackboard/index.d.ts +15 -0
  118. package/dist/types/component/config-selector/index.d.ts +9 -0
  119. package/dist/types/component/context-preview/index.d.ts +9 -0
  120. package/dist/types/component/env-config/index.d.ts +6 -0
  121. package/dist/types/component/env-config-reminder/index.d.ts +6 -0
  122. package/dist/types/component/form-field/index.d.ts +17 -0
  123. package/dist/types/component/history-selector/index.d.ts +10 -0
  124. package/dist/types/component/index.d.ts +1 -0
  125. package/dist/types/component/logo/index.d.ts +5 -0
  126. package/dist/types/component/misc/index.d.ts +6 -0
  127. package/dist/types/component/nav-actions/index.d.ts +10 -0
  128. package/dist/types/component/player/index.d.ts +13 -0
  129. package/dist/types/component/playground/index.d.ts +7 -0
  130. package/dist/types/component/playground-result/index.d.ts +20 -0
  131. package/dist/types/component/prompt-input/index.d.ts +22 -0
  132. package/dist/types/component/service-mode-control/index.d.ts +6 -0
  133. package/dist/types/component/shiny-text/index.d.ts +12 -0
  134. package/dist/types/component/universal-playground/index.d.ts +4 -0
  135. package/dist/types/component/universal-playground/providers/context-provider.d.ts +37 -0
  136. package/dist/types/component/universal-playground/providers/indexeddb-storage-provider.d.ts +71 -0
  137. package/dist/types/component/universal-playground/providers/storage-provider.d.ts +58 -0
  138. package/dist/types/hooks/usePlaygroundExecution.d.ts +10 -0
  139. package/dist/types/hooks/usePlaygroundState.d.ts +26 -0
  140. package/dist/types/hooks/useSafeOverrideAIConfig.d.ts +16 -0
  141. package/dist/types/hooks/useServerValid.d.ts +1 -0
  142. package/dist/types/index.d.ts +27 -0
  143. package/dist/types/store/history.d.ts +16 -0
  144. package/dist/types/store/store.d.ts +36 -0
  145. package/dist/types/types.d.ts +161 -0
  146. package/dist/types/utils/color.d.ts +4 -0
  147. package/dist/types/utils/constants.d.ts +74 -0
  148. package/dist/types/utils/index.d.ts +4 -0
  149. package/dist/types/utils/pixi-loader.d.ts +5 -0
  150. package/dist/types/utils/playground-utils.d.ts +6 -0
  151. package/dist/types/utils/replay-scripts.d.ts +34 -0
  152. package/package.json +85 -0
@@ -0,0 +1,185 @@
1
+ .player-container {
2
+ box-sizing: border-box;
3
+ background: #f2f4f7;
4
+ border: 1px solid #f2f4f7;
5
+ border-radius: 8px;
6
+ flex-direction: column;
7
+ width: 100%;
8
+ max-width: 100%;
9
+ height: 100%;
10
+ min-height: 300px;
11
+ max-height: 100%;
12
+ margin: 0 auto;
13
+ padding: 12px;
14
+ line-height: 100%;
15
+ display: flex;
16
+ position: relative;
17
+ overflow: visible;
18
+ }
19
+
20
+ .player-container[data-fit-mode="height"] {
21
+ background: #fff;
22
+ }
23
+
24
+ .player-container[data-fit-mode="height"] .canvas-container {
25
+ background-color: #f2f4f7;
26
+ }
27
+
28
+ .player-container .canvas-container {
29
+ width: 100%;
30
+ min-height: 200px;
31
+ aspect-ratio: var(--canvas-aspect-ratio, 16 / 9);
32
+ background-color: #fff;
33
+ border-top-left-radius: 4px;
34
+ border-top-right-radius: 4px;
35
+ flex: none;
36
+ justify-content: center;
37
+ align-items: center;
38
+ display: flex;
39
+ position: relative;
40
+ overflow: hidden;
41
+ }
42
+
43
+ .player-container .canvas-container canvas {
44
+ box-sizing: border-box;
45
+ object-fit: contain;
46
+ border: none;
47
+ width: 100%;
48
+ max-width: 100%;
49
+ height: auto;
50
+ max-height: 100%;
51
+ margin: 0 auto;
52
+ display: block;
53
+ }
54
+
55
+ .player-container .canvas-container[data-fit-mode="height"] {
56
+ aspect-ratio: unset;
57
+ flex: auto;
58
+ height: auto;
59
+ min-height: 0;
60
+ }
61
+
62
+ .player-container .canvas-container[data-fit-mode="height"] canvas {
63
+ width: auto;
64
+ max-width: 100%;
65
+ height: 100%;
66
+ max-height: 100%;
67
+ }
68
+
69
+ .player-container .canvas-container[data-fit-mode="width"] {
70
+ aspect-ratio: var(--canvas-aspect-ratio, 16 / 9);
71
+ }
72
+
73
+ .player-container .canvas-container[data-fit-mode="width"] canvas {
74
+ width: 100%;
75
+ height: auto;
76
+ }
77
+
78
+ .player-container .player-timeline-wrapper {
79
+ flex: none;
80
+ width: 100%;
81
+ height: 4px;
82
+ margin-bottom: 2px;
83
+ position: relative;
84
+ }
85
+
86
+ .player-container .player-timeline {
87
+ background: #666;
88
+ flex-shrink: 0;
89
+ width: 100%;
90
+ height: 4px;
91
+ position: relative;
92
+ }
93
+
94
+ .player-container .player-timeline .player-timeline-progress {
95
+ background: #2b83ff;
96
+ height: 4px;
97
+ transition-timing-function: linear;
98
+ position: absolute;
99
+ top: 0;
100
+ left: 0;
101
+ }
102
+
103
+ .player-container .player-tools-wrapper {
104
+ box-sizing: border-box;
105
+ flex: none;
106
+ width: 100%;
107
+ height: 72px;
108
+ padding: 15px 16px;
109
+ position: relative;
110
+ }
111
+
112
+ .player-container .player-tools {
113
+ color: #000;
114
+ box-sizing: border-box;
115
+ flex-direction: row;
116
+ flex-shrink: 0;
117
+ justify-content: space-between;
118
+ width: 100%;
119
+ max-width: 100%;
120
+ height: 42px;
121
+ font-size: 14px;
122
+ display: flex;
123
+ overflow: hidden;
124
+ }
125
+
126
+ .player-container .player-tools .ant-spin {
127
+ color: #333;
128
+ }
129
+
130
+ .player-container .player-tools .player-control {
131
+ flex-direction: row;
132
+ flex-grow: 1;
133
+ align-items: center;
134
+ display: flex;
135
+ overflow: hidden;
136
+ }
137
+
138
+ .player-container .player-tools .status-icon {
139
+ border-radius: 8px;
140
+ flex-shrink: 0;
141
+ justify-content: center;
142
+ align-items: center;
143
+ width: 32px;
144
+ height: 32px;
145
+ margin-left: 10px;
146
+ transition: all .2s;
147
+ display: flex;
148
+ }
149
+
150
+ .player-container .player-tools .status-icon:hover {
151
+ cursor: pointer;
152
+ background: #f0f0f0;
153
+ }
154
+
155
+ .player-container .player-tools .status-text {
156
+ flex-direction: column;
157
+ flex-grow: 1;
158
+ flex-shrink: 1;
159
+ justify-content: space-between;
160
+ width: 0;
161
+ min-width: 0;
162
+ height: 100%;
163
+ display: flex;
164
+ position: relative;
165
+ overflow: hidden;
166
+ }
167
+
168
+ .player-container .player-tools .title {
169
+ font-weight: 600;
170
+ }
171
+
172
+ .player-container .player-tools .title, .player-container .player-tools .subtitle {
173
+ text-overflow: ellipsis;
174
+ white-space: nowrap;
175
+ width: 100%;
176
+ overflow: hidden;
177
+ }
178
+
179
+ .player-container .player-tools .player-tools-item {
180
+ flex-direction: column;
181
+ justify-content: center;
182
+ height: 100%;
183
+ display: flex;
184
+ }
185
+