@cratis/showrunner.cue.react 0.0.0-stage → 2.10.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 (417) hide show
  1. package/.storybook/main.ts +11 -0
  2. package/.storybook/preview.tsx +21 -0
  3. package/Configuration/CueConfiguration.ts +27 -0
  4. package/Configuration/CueProvider.tsx +64 -0
  5. package/Configuration/CueStageBoundary.tsx +37 -0
  6. package/Configuration/index.ts +6 -0
  7. package/Icons.tsx +36 -0
  8. package/Labels/CueLabels.ts +39 -0
  9. package/Labels/defaultCueLabels.ts +23 -0
  10. package/Labels/index.ts +6 -0
  11. package/Labels/resolveLabels.ts +12 -0
  12. package/Markdown/CueMarkdown.tsx +31 -0
  13. package/Markdown/index.ts +5 -0
  14. package/Markdown/safeUrl.ts +29 -0
  15. package/README.md +54 -2
  16. package/Speech/CueSpeech.ts +27 -0
  17. package/Speech/CueSpeechConfiguration.ts +21 -0
  18. package/Speech/HttpSpeechOptions.ts +37 -0
  19. package/Speech/createHttpSpeech.ts +135 -0
  20. package/Speech/index.ts +7 -0
  21. package/Speech/silentSpeech.ts +15 -0
  22. package/Speech/speechClips.ts +66 -0
  23. package/TourAnchor.tsx +162 -0
  24. package/TourAnchorSpace.ts +15 -0
  25. package/TourCallout.ts +22 -0
  26. package/TourCalloutBubble.tsx +38 -0
  27. package/TourCamera.ts +17 -0
  28. package/TourChapter.ts +24 -0
  29. package/TourChapterList.tsx +65 -0
  30. package/TourGesture.ts +30 -0
  31. package/TourOverlayShell.tsx +102 -0
  32. package/TourPointer.tsx +83 -0
  33. package/TourSection.ts +24 -0
  34. package/TourSelfPacedPanel.tsx +26 -0
  35. package/TourStep.ts +40 -0
  36. package/TourSubtitles.tsx +22 -0
  37. package/TourTimelineBar.tsx +127 -0
  38. package/Tours/index.ts +5 -0
  39. package/Tours/useCueTours.ts +63 -0
  40. package/Tours/useTourNudge.ts +37 -0
  41. package/cursorSvg.ts +12 -0
  42. package/dist/cjs/Configuration/CueConfiguration.d.ts +11 -0
  43. package/dist/cjs/Configuration/CueConfiguration.d.ts.map +1 -0
  44. package/dist/cjs/Configuration/CueProvider.d.ts +19 -0
  45. package/dist/cjs/Configuration/CueProvider.d.ts.map +1 -0
  46. package/dist/cjs/Configuration/CueProvider.js +44 -0
  47. package/dist/cjs/Configuration/CueProvider.js.map +1 -0
  48. package/dist/cjs/Configuration/CueStageBoundary.d.ts +14 -0
  49. package/dist/cjs/Configuration/CueStageBoundary.d.ts.map +1 -0
  50. package/dist/cjs/Configuration/CueStageBoundary.js +45 -0
  51. package/dist/cjs/Configuration/CueStageBoundary.js.map +1 -0
  52. package/dist/cjs/Configuration/index.d.ts +4 -0
  53. package/dist/cjs/Configuration/index.d.ts.map +1 -0
  54. package/dist/cjs/Examples/AppShell.d.ts +5 -0
  55. package/dist/cjs/Examples/AppShell.d.ts.map +1 -0
  56. package/dist/cjs/Examples/LocalizedCue.d.ts +5 -0
  57. package/dist/cjs/Examples/LocalizedCue.d.ts.map +1 -0
  58. package/dist/cjs/Examples/OrderDeskTour.d.ts +2 -0
  59. package/dist/cjs/Examples/OrderDeskTour.d.ts.map +1 -0
  60. package/dist/cjs/Examples/OwnStageGuard.d.ts +5 -0
  61. package/dist/cjs/Examples/OwnStageGuard.d.ts.map +1 -0
  62. package/dist/cjs/Examples/OwnVoice.d.ts +3 -0
  63. package/dist/cjs/Examples/OwnVoice.d.ts.map +1 -0
  64. package/dist/cjs/Icons.d.ts +19 -0
  65. package/dist/cjs/Icons.d.ts.map +1 -0
  66. package/dist/cjs/Icons.js +33 -0
  67. package/dist/cjs/Icons.js.map +1 -0
  68. package/dist/cjs/Labels/CueLabels.d.ts +18 -0
  69. package/dist/cjs/Labels/CueLabels.d.ts.map +1 -0
  70. package/dist/cjs/Labels/defaultCueLabels.d.ts +3 -0
  71. package/dist/cjs/Labels/defaultCueLabels.d.ts.map +1 -0
  72. package/dist/cjs/Labels/defaultCueLabels.js +24 -0
  73. package/dist/cjs/Labels/defaultCueLabels.js.map +1 -0
  74. package/dist/cjs/Labels/index.d.ts +4 -0
  75. package/dist/cjs/Labels/index.d.ts.map +1 -0
  76. package/dist/cjs/Labels/resolveLabels.d.ts +3 -0
  77. package/dist/cjs/Labels/resolveLabels.d.ts.map +1 -0
  78. package/dist/cjs/Labels/resolveLabels.js +17 -0
  79. package/dist/cjs/Labels/resolveLabels.js.map +1 -0
  80. package/dist/cjs/Markdown/CueMarkdown.d.ts +6 -0
  81. package/dist/cjs/Markdown/CueMarkdown.d.ts.map +1 -0
  82. package/dist/cjs/Markdown/CueMarkdown.js +34 -0
  83. package/dist/cjs/Markdown/CueMarkdown.js.map +1 -0
  84. package/dist/cjs/Markdown/index.d.ts +3 -0
  85. package/dist/cjs/Markdown/index.d.ts.map +1 -0
  86. package/dist/cjs/Markdown/safeUrl.d.ts +2 -0
  87. package/dist/cjs/Markdown/safeUrl.d.ts.map +1 -0
  88. package/dist/cjs/Markdown/safeUrl.js +34 -0
  89. package/dist/cjs/Markdown/safeUrl.js.map +1 -0
  90. package/dist/cjs/Speech/CueSpeech.d.ts +10 -0
  91. package/dist/cjs/Speech/CueSpeech.d.ts.map +1 -0
  92. package/dist/cjs/Speech/CueSpeechConfiguration.d.ts +6 -0
  93. package/dist/cjs/Speech/CueSpeechConfiguration.d.ts.map +1 -0
  94. package/dist/cjs/Speech/HttpSpeechOptions.d.ts +10 -0
  95. package/dist/cjs/Speech/HttpSpeechOptions.d.ts.map +1 -0
  96. package/dist/cjs/Speech/createHttpSpeech.d.ts +4 -0
  97. package/dist/cjs/Speech/createHttpSpeech.d.ts.map +1 -0
  98. package/dist/cjs/Speech/createHttpSpeech.js +140 -0
  99. package/dist/cjs/Speech/createHttpSpeech.js.map +1 -0
  100. package/dist/cjs/Speech/index.d.ts +5 -0
  101. package/dist/cjs/Speech/index.d.ts.map +1 -0
  102. package/dist/cjs/Speech/silentSpeech.d.ts +3 -0
  103. package/dist/cjs/Speech/silentSpeech.d.ts.map +1 -0
  104. package/dist/cjs/Speech/silentSpeech.js +16 -0
  105. package/dist/cjs/Speech/silentSpeech.js.map +1 -0
  106. package/dist/cjs/Speech/speechClips.d.ts +7 -0
  107. package/dist/cjs/Speech/speechClips.d.ts.map +1 -0
  108. package/dist/cjs/Speech/speechClips.js +60 -0
  109. package/dist/cjs/Speech/speechClips.js.map +1 -0
  110. package/dist/cjs/TourAnchor.d.ts +14 -0
  111. package/dist/cjs/TourAnchor.d.ts.map +1 -0
  112. package/dist/cjs/TourAnchor.js +150 -0
  113. package/dist/cjs/TourAnchor.js.map +1 -0
  114. package/dist/cjs/TourAnchorSpace.d.ts +2 -0
  115. package/dist/cjs/TourAnchorSpace.d.ts.map +1 -0
  116. package/dist/cjs/TourCallout.d.ts +8 -0
  117. package/dist/cjs/TourCallout.d.ts.map +1 -0
  118. package/dist/cjs/TourCalloutBubble.d.ts +9 -0
  119. package/dist/cjs/TourCalloutBubble.d.ts.map +1 -0
  120. package/dist/cjs/TourCalloutBubble.js +27 -0
  121. package/dist/cjs/TourCalloutBubble.js.map +1 -0
  122. package/dist/cjs/TourCamera.d.ts +6 -0
  123. package/dist/cjs/TourCamera.d.ts.map +1 -0
  124. package/dist/cjs/TourChapter.d.ts +8 -0
  125. package/dist/cjs/TourChapter.d.ts.map +1 -0
  126. package/dist/cjs/TourChapterList.d.ts +10 -0
  127. package/dist/cjs/TourChapterList.d.ts.map +1 -0
  128. package/dist/cjs/TourChapterList.js +68 -0
  129. package/dist/cjs/TourChapterList.js.map +1 -0
  130. package/dist/cjs/TourChapterList.stories.d.ts +21 -0
  131. package/dist/cjs/TourChapterList.stories.d.ts.map +1 -0
  132. package/dist/cjs/TourGesture.d.ts +12 -0
  133. package/dist/cjs/TourGesture.d.ts.map +1 -0
  134. package/dist/cjs/TourOverlayShell.d.ts +13 -0
  135. package/dist/cjs/TourOverlayShell.d.ts.map +1 -0
  136. package/dist/cjs/TourOverlayShell.js +77 -0
  137. package/dist/cjs/TourOverlayShell.js.map +1 -0
  138. package/dist/cjs/TourPointer.d.ts +9 -0
  139. package/dist/cjs/TourPointer.d.ts.map +1 -0
  140. package/dist/cjs/TourPointer.js +74 -0
  141. package/dist/cjs/TourPointer.js.map +1 -0
  142. package/dist/cjs/TourSection.d.ts +8 -0
  143. package/dist/cjs/TourSection.d.ts.map +1 -0
  144. package/dist/cjs/TourSelfPacedPanel.d.ts +6 -0
  145. package/dist/cjs/TourSelfPacedPanel.d.ts.map +1 -0
  146. package/dist/cjs/TourSelfPacedPanel.js +27 -0
  147. package/dist/cjs/TourSelfPacedPanel.js.map +1 -0
  148. package/dist/cjs/TourSelfPacedPanel.stories.d.ts +21 -0
  149. package/dist/cjs/TourSelfPacedPanel.stories.d.ts.map +1 -0
  150. package/dist/cjs/TourStep.d.ts +12 -0
  151. package/dist/cjs/TourStep.d.ts.map +1 -0
  152. package/dist/cjs/TourSubtitles.d.ts +5 -0
  153. package/dist/cjs/TourSubtitles.d.ts.map +1 -0
  154. package/dist/cjs/TourSubtitles.js +24 -0
  155. package/dist/cjs/TourSubtitles.js.map +1 -0
  156. package/dist/cjs/TourTimelineBar.d.ts +10 -0
  157. package/dist/cjs/TourTimelineBar.d.ts.map +1 -0
  158. package/dist/cjs/TourTimelineBar.js +134 -0
  159. package/dist/cjs/TourTimelineBar.js.map +1 -0
  160. package/dist/cjs/TourTimelineBar.stories.d.ts +24 -0
  161. package/dist/cjs/TourTimelineBar.stories.d.ts.map +1 -0
  162. package/dist/cjs/Tours/index.d.ts +3 -0
  163. package/dist/cjs/Tours/index.d.ts.map +1 -0
  164. package/dist/cjs/Tours/useCueTours.d.ts +7 -0
  165. package/dist/cjs/Tours/useCueTours.d.ts.map +1 -0
  166. package/dist/cjs/Tours/useCueTours.js +46 -0
  167. package/dist/cjs/Tours/useCueTours.js.map +1 -0
  168. package/dist/cjs/Tours/useTourNudge.d.ts +6 -0
  169. package/dist/cjs/Tours/useTourNudge.d.ts.map +1 -0
  170. package/dist/cjs/Tours/useTourNudge.js +28 -0
  171. package/dist/cjs/Tours/useTourNudge.js.map +1 -0
  172. package/dist/cjs/cursorSvg.d.ts +2 -0
  173. package/dist/cjs/cursorSvg.d.ts.map +1 -0
  174. package/dist/cjs/cursorSvg.js +15 -0
  175. package/dist/cjs/cursorSvg.js.map +1 -0
  176. package/dist/cjs/index.d.ts +41 -0
  177. package/dist/cjs/index.d.ts.map +1 -0
  178. package/dist/cjs/index.js +72 -0
  179. package/dist/cjs/index.js.map +1 -0
  180. package/dist/cjs/package.json +3 -0
  181. package/dist/cjs/tourClock.d.ts +19 -0
  182. package/dist/cjs/tourClock.d.ts.map +1 -0
  183. package/dist/cjs/tourClock.js +107 -0
  184. package/dist/cjs/tourClock.js.map +1 -0
  185. package/dist/cjs/tourGeometry.d.ts +18 -0
  186. package/dist/cjs/tourGeometry.d.ts.map +1 -0
  187. package/dist/cjs/tourGeometry.js +86 -0
  188. package/dist/cjs/tourGeometry.js.map +1 -0
  189. package/dist/cjs/tourSelfPaced.d.ts +12 -0
  190. package/dist/cjs/tourSelfPaced.d.ts.map +1 -0
  191. package/dist/cjs/tourSelfPaced.js +69 -0
  192. package/dist/cjs/tourSelfPaced.js.map +1 -0
  193. package/dist/cjs/tourTimeline.d.ts +40 -0
  194. package/dist/cjs/tourTimeline.d.ts.map +1 -0
  195. package/dist/cjs/tourTimeline.js +168 -0
  196. package/dist/cjs/tourTimeline.js.map +1 -0
  197. package/dist/cjs/useTourPlayback.d.ts +25 -0
  198. package/dist/cjs/useTourPlayback.d.ts.map +1 -0
  199. package/dist/cjs/useTourPlayback.js +245 -0
  200. package/dist/cjs/useTourPlayback.js.map +1 -0
  201. package/dist/esm/Configuration/CueConfiguration.d.ts +11 -0
  202. package/dist/esm/Configuration/CueConfiguration.d.ts.map +1 -0
  203. package/dist/esm/Configuration/CueConfiguration.js +2 -0
  204. package/dist/esm/Configuration/CueConfiguration.js.map +1 -0
  205. package/dist/esm/Configuration/CueProvider.d.ts +19 -0
  206. package/dist/esm/Configuration/CueProvider.d.ts.map +1 -0
  207. package/dist/esm/Configuration/CueProvider.js +41 -0
  208. package/dist/esm/Configuration/CueProvider.js.map +1 -0
  209. package/dist/esm/Configuration/CueStageBoundary.d.ts +14 -0
  210. package/dist/esm/Configuration/CueStageBoundary.d.ts.map +1 -0
  211. package/dist/esm/Configuration/CueStageBoundary.js +43 -0
  212. package/dist/esm/Configuration/CueStageBoundary.js.map +1 -0
  213. package/dist/esm/Configuration/index.d.ts +4 -0
  214. package/dist/esm/Configuration/index.d.ts.map +1 -0
  215. package/dist/esm/Configuration/index.js +4 -0
  216. package/dist/esm/Configuration/index.js.map +1 -0
  217. package/dist/esm/Examples/AppShell.d.ts +5 -0
  218. package/dist/esm/Examples/AppShell.d.ts.map +1 -0
  219. package/dist/esm/Examples/AppShell.js +10 -0
  220. package/dist/esm/Examples/AppShell.js.map +1 -0
  221. package/dist/esm/Examples/LocalizedCue.d.ts +5 -0
  222. package/dist/esm/Examples/LocalizedCue.d.ts.map +1 -0
  223. package/dist/esm/Examples/LocalizedCue.js +11 -0
  224. package/dist/esm/Examples/LocalizedCue.js.map +1 -0
  225. package/dist/esm/Examples/OrderDeskTour.d.ts +2 -0
  226. package/dist/esm/Examples/OrderDeskTour.d.ts.map +1 -0
  227. package/dist/esm/Examples/OrderDeskTour.js +33 -0
  228. package/dist/esm/Examples/OrderDeskTour.js.map +1 -0
  229. package/dist/esm/Examples/OwnStageGuard.d.ts +5 -0
  230. package/dist/esm/Examples/OwnStageGuard.d.ts.map +1 -0
  231. package/dist/esm/Examples/OwnStageGuard.js +17 -0
  232. package/dist/esm/Examples/OwnStageGuard.js.map +1 -0
  233. package/dist/esm/Examples/OwnVoice.d.ts +3 -0
  234. package/dist/esm/Examples/OwnVoice.d.ts.map +1 -0
  235. package/dist/esm/Examples/OwnVoice.js +35 -0
  236. package/dist/esm/Examples/OwnVoice.js.map +1 -0
  237. package/dist/esm/Icons.d.ts +19 -0
  238. package/dist/esm/Icons.d.ts.map +1 -0
  239. package/dist/esm/Icons.js +31 -0
  240. package/dist/esm/Icons.js.map +1 -0
  241. package/dist/esm/Labels/CueLabels.d.ts +18 -0
  242. package/dist/esm/Labels/CueLabels.d.ts.map +1 -0
  243. package/dist/esm/Labels/CueLabels.js +2 -0
  244. package/dist/esm/Labels/CueLabels.js.map +1 -0
  245. package/dist/esm/Labels/defaultCueLabels.d.ts +3 -0
  246. package/dist/esm/Labels/defaultCueLabels.d.ts.map +1 -0
  247. package/dist/esm/Labels/defaultCueLabels.js +22 -0
  248. package/dist/esm/Labels/defaultCueLabels.js.map +1 -0
  249. package/dist/esm/Labels/index.d.ts +4 -0
  250. package/dist/esm/Labels/index.d.ts.map +1 -0
  251. package/dist/esm/Labels/index.js +4 -0
  252. package/dist/esm/Labels/index.js.map +1 -0
  253. package/dist/esm/Labels/resolveLabels.d.ts +3 -0
  254. package/dist/esm/Labels/resolveLabels.d.ts.map +1 -0
  255. package/dist/esm/Labels/resolveLabels.js +15 -0
  256. package/dist/esm/Labels/resolveLabels.js.map +1 -0
  257. package/dist/esm/Markdown/CueMarkdown.d.ts +6 -0
  258. package/dist/esm/Markdown/CueMarkdown.d.ts.map +1 -0
  259. package/dist/esm/Markdown/CueMarkdown.js +32 -0
  260. package/dist/esm/Markdown/CueMarkdown.js.map +1 -0
  261. package/dist/esm/Markdown/index.d.ts +3 -0
  262. package/dist/esm/Markdown/index.d.ts.map +1 -0
  263. package/dist/esm/Markdown/index.js +3 -0
  264. package/dist/esm/Markdown/index.js.map +1 -0
  265. package/dist/esm/Markdown/safeUrl.d.ts +2 -0
  266. package/dist/esm/Markdown/safeUrl.d.ts.map +1 -0
  267. package/dist/esm/Markdown/safeUrl.js +32 -0
  268. package/dist/esm/Markdown/safeUrl.js.map +1 -0
  269. package/dist/esm/Speech/CueSpeech.d.ts +10 -0
  270. package/dist/esm/Speech/CueSpeech.d.ts.map +1 -0
  271. package/dist/esm/Speech/CueSpeech.js +2 -0
  272. package/dist/esm/Speech/CueSpeech.js.map +1 -0
  273. package/dist/esm/Speech/CueSpeechConfiguration.d.ts +6 -0
  274. package/dist/esm/Speech/CueSpeechConfiguration.d.ts.map +1 -0
  275. package/dist/esm/Speech/CueSpeechConfiguration.js +2 -0
  276. package/dist/esm/Speech/CueSpeechConfiguration.js.map +1 -0
  277. package/dist/esm/Speech/HttpSpeechOptions.d.ts +10 -0
  278. package/dist/esm/Speech/HttpSpeechOptions.d.ts.map +1 -0
  279. package/dist/esm/Speech/HttpSpeechOptions.js +2 -0
  280. package/dist/esm/Speech/HttpSpeechOptions.js.map +1 -0
  281. package/dist/esm/Speech/createHttpSpeech.d.ts +4 -0
  282. package/dist/esm/Speech/createHttpSpeech.d.ts.map +1 -0
  283. package/dist/esm/Speech/createHttpSpeech.js +138 -0
  284. package/dist/esm/Speech/createHttpSpeech.js.map +1 -0
  285. package/dist/esm/Speech/index.d.ts +5 -0
  286. package/dist/esm/Speech/index.d.ts.map +1 -0
  287. package/dist/esm/Speech/index.js +5 -0
  288. package/dist/esm/Speech/index.js.map +1 -0
  289. package/dist/esm/Speech/silentSpeech.d.ts +3 -0
  290. package/dist/esm/Speech/silentSpeech.d.ts.map +1 -0
  291. package/dist/esm/Speech/silentSpeech.js +14 -0
  292. package/dist/esm/Speech/silentSpeech.js.map +1 -0
  293. package/dist/esm/Speech/speechClips.d.ts +7 -0
  294. package/dist/esm/Speech/speechClips.d.ts.map +1 -0
  295. package/dist/esm/Speech/speechClips.js +58 -0
  296. package/dist/esm/Speech/speechClips.js.map +1 -0
  297. package/dist/esm/TourAnchor.d.ts +14 -0
  298. package/dist/esm/TourAnchor.d.ts.map +1 -0
  299. package/dist/esm/TourAnchor.js +148 -0
  300. package/dist/esm/TourAnchor.js.map +1 -0
  301. package/dist/esm/TourAnchorSpace.d.ts +2 -0
  302. package/dist/esm/TourAnchorSpace.d.ts.map +1 -0
  303. package/dist/esm/TourAnchorSpace.js +2 -0
  304. package/dist/esm/TourAnchorSpace.js.map +1 -0
  305. package/dist/esm/TourCallout.d.ts +8 -0
  306. package/dist/esm/TourCallout.d.ts.map +1 -0
  307. package/dist/esm/TourCallout.js +2 -0
  308. package/dist/esm/TourCallout.js.map +1 -0
  309. package/dist/esm/TourCalloutBubble.d.ts +9 -0
  310. package/dist/esm/TourCalloutBubble.d.ts.map +1 -0
  311. package/dist/esm/TourCalloutBubble.js +25 -0
  312. package/dist/esm/TourCalloutBubble.js.map +1 -0
  313. package/dist/esm/TourCamera.d.ts +6 -0
  314. package/dist/esm/TourCamera.d.ts.map +1 -0
  315. package/dist/esm/TourCamera.js +2 -0
  316. package/dist/esm/TourCamera.js.map +1 -0
  317. package/dist/esm/TourChapter.d.ts +8 -0
  318. package/dist/esm/TourChapter.d.ts.map +1 -0
  319. package/dist/esm/TourChapter.js +2 -0
  320. package/dist/esm/TourChapter.js.map +1 -0
  321. package/dist/esm/TourChapterList.d.ts +10 -0
  322. package/dist/esm/TourChapterList.d.ts.map +1 -0
  323. package/dist/esm/TourChapterList.js +66 -0
  324. package/dist/esm/TourChapterList.js.map +1 -0
  325. package/dist/esm/TourChapterList.stories.d.ts +21 -0
  326. package/dist/esm/TourChapterList.stories.d.ts.map +1 -0
  327. package/dist/esm/TourChapterList.stories.js +53 -0
  328. package/dist/esm/TourChapterList.stories.js.map +1 -0
  329. package/dist/esm/TourGesture.d.ts +12 -0
  330. package/dist/esm/TourGesture.d.ts.map +1 -0
  331. package/dist/esm/TourGesture.js +2 -0
  332. package/dist/esm/TourGesture.js.map +1 -0
  333. package/dist/esm/TourOverlayShell.d.ts +13 -0
  334. package/dist/esm/TourOverlayShell.d.ts.map +1 -0
  335. package/dist/esm/TourOverlayShell.js +75 -0
  336. package/dist/esm/TourOverlayShell.js.map +1 -0
  337. package/dist/esm/TourPointer.d.ts +9 -0
  338. package/dist/esm/TourPointer.d.ts.map +1 -0
  339. package/dist/esm/TourPointer.js +72 -0
  340. package/dist/esm/TourPointer.js.map +1 -0
  341. package/dist/esm/TourSection.d.ts +8 -0
  342. package/dist/esm/TourSection.d.ts.map +1 -0
  343. package/dist/esm/TourSection.js +2 -0
  344. package/dist/esm/TourSection.js.map +1 -0
  345. package/dist/esm/TourSelfPacedPanel.d.ts +6 -0
  346. package/dist/esm/TourSelfPacedPanel.d.ts.map +1 -0
  347. package/dist/esm/TourSelfPacedPanel.js +25 -0
  348. package/dist/esm/TourSelfPacedPanel.js.map +1 -0
  349. package/dist/esm/TourSelfPacedPanel.stories.d.ts +21 -0
  350. package/dist/esm/TourSelfPacedPanel.stories.d.ts.map +1 -0
  351. package/dist/esm/TourSelfPacedPanel.stories.js +41 -0
  352. package/dist/esm/TourSelfPacedPanel.stories.js.map +1 -0
  353. package/dist/esm/TourStep.d.ts +12 -0
  354. package/dist/esm/TourStep.d.ts.map +1 -0
  355. package/dist/esm/TourStep.js +2 -0
  356. package/dist/esm/TourStep.js.map +1 -0
  357. package/dist/esm/TourSubtitles.d.ts +5 -0
  358. package/dist/esm/TourSubtitles.d.ts.map +1 -0
  359. package/dist/esm/TourSubtitles.js +22 -0
  360. package/dist/esm/TourSubtitles.js.map +1 -0
  361. package/dist/esm/TourTimelineBar.d.ts +10 -0
  362. package/dist/esm/TourTimelineBar.d.ts.map +1 -0
  363. package/dist/esm/TourTimelineBar.js +132 -0
  364. package/dist/esm/TourTimelineBar.js.map +1 -0
  365. package/dist/esm/TourTimelineBar.stories.d.ts +24 -0
  366. package/dist/esm/TourTimelineBar.stories.d.ts.map +1 -0
  367. package/dist/esm/TourTimelineBar.stories.js +62 -0
  368. package/dist/esm/TourTimelineBar.stories.js.map +1 -0
  369. package/dist/esm/Tours/index.d.ts +3 -0
  370. package/dist/esm/Tours/index.d.ts.map +1 -0
  371. package/dist/esm/Tours/index.js +3 -0
  372. package/dist/esm/Tours/index.js.map +1 -0
  373. package/dist/esm/Tours/useCueTours.d.ts +7 -0
  374. package/dist/esm/Tours/useCueTours.d.ts.map +1 -0
  375. package/dist/esm/Tours/useCueTours.js +44 -0
  376. package/dist/esm/Tours/useCueTours.js.map +1 -0
  377. package/dist/esm/Tours/useTourNudge.d.ts +6 -0
  378. package/dist/esm/Tours/useTourNudge.d.ts.map +1 -0
  379. package/dist/esm/Tours/useTourNudge.js +26 -0
  380. package/dist/esm/Tours/useTourNudge.js.map +1 -0
  381. package/dist/esm/cursorSvg.d.ts +2 -0
  382. package/dist/esm/cursorSvg.d.ts.map +1 -0
  383. package/dist/esm/cursorSvg.js +13 -0
  384. package/dist/esm/cursorSvg.js.map +1 -0
  385. package/dist/esm/index.d.ts +41 -0
  386. package/dist/esm/index.d.ts.map +1 -0
  387. package/dist/esm/index.js +24 -0
  388. package/dist/esm/index.js.map +1 -0
  389. package/dist/esm/package.json +3 -0
  390. package/dist/esm/tourClock.d.ts +19 -0
  391. package/dist/esm/tourClock.d.ts.map +1 -0
  392. package/dist/esm/tourClock.js +103 -0
  393. package/dist/esm/tourClock.js.map +1 -0
  394. package/dist/esm/tourGeometry.d.ts +18 -0
  395. package/dist/esm/tourGeometry.d.ts.map +1 -0
  396. package/dist/esm/tourGeometry.js +80 -0
  397. package/dist/esm/tourGeometry.js.map +1 -0
  398. package/dist/esm/tourSelfPaced.d.ts +12 -0
  399. package/dist/esm/tourSelfPaced.d.ts.map +1 -0
  400. package/dist/esm/tourSelfPaced.js +64 -0
  401. package/dist/esm/tourSelfPaced.js.map +1 -0
  402. package/dist/esm/tourTimeline.d.ts +40 -0
  403. package/dist/esm/tourTimeline.d.ts.map +1 -0
  404. package/dist/esm/tourTimeline.js +154 -0
  405. package/dist/esm/tourTimeline.js.map +1 -0
  406. package/dist/esm/useTourPlayback.d.ts +25 -0
  407. package/dist/esm/useTourPlayback.d.ts.map +1 -0
  408. package/dist/esm/useTourPlayback.js +243 -0
  409. package/dist/esm/useTourPlayback.js.map +1 -0
  410. package/index.ts +68 -0
  411. package/package.json +93 -4
  412. package/styles.css +485 -0
  413. package/tourClock.ts +125 -0
  414. package/tourGeometry.ts +95 -0
  415. package/tourSelfPaced.ts +93 -0
  416. package/tourTimeline.ts +237 -0
  417. package/useTourPlayback.ts +291 -0
package/TourSection.ts ADDED
@@ -0,0 +1,24 @@
1
+ // Copyright (c) Cratis. All rights reserved.
2
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+
4
+ import type { TourChapter } from './TourChapter.js';
5
+ import type { TourStep } from './TourStep.js';
6
+
7
+ /**
8
+ * A named part of the tour's curriculum, grouping chapters that belong to one theme — the basics first, then
9
+ * deeper dives. Sections give the chapter list its headings and let a tour grow new material without the
10
+ * basics getting longer.
11
+ *
12
+ * Generic over the step type so a tour whose steps carry surface-specific extras keeps its script fully
13
+ * typed; the player itself only reads the {@link TourStep} base.
14
+ */
15
+ export interface TourSection<TStep extends TourStep = TourStep> {
16
+ /** A stable identifier, used as the React key and for locating the section. */
17
+ id: string;
18
+
19
+ /** The heading shown above the section's chapters in the chapter list. */
20
+ title: string;
21
+
22
+ /** The chapters the section plays through, in order. */
23
+ chapters: TourChapter<TStep>[];
24
+ }
@@ -0,0 +1,26 @@
1
+ // Copyright (c) Cratis. All rights reserved.
2
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+
4
+ import { CueMarkdown } from './Markdown/CueMarkdown.js';
5
+
6
+ export interface TourSelfPacedPanelProps {
7
+ /** The title of the chapter being read. */
8
+ title: string;
9
+
10
+ /** The chapter's markdown walkthrough. */
11
+ markdown: string;
12
+ }
13
+
14
+ /**
15
+ * The self-paced reading panel: the current chapter's written walkthrough, docked beside the chapter list so
16
+ * reading and navigating sit next to each other. It renders the tour's own authored markdown — screenshots
17
+ * and animations included — and scrolls on its own, since a written chapter is longer than its narration.
18
+ */
19
+ export const TourSelfPacedPanel = ({ title, markdown }: TourSelfPacedPanelProps) => (
20
+ <aside className='cue-self-paced'>
21
+ <h2 className='cue-self-paced__title'>{title}</h2>
22
+ <div className='cue-self-paced__content'>
23
+ <CueMarkdown source={markdown} />
24
+ </div>
25
+ </aside>
26
+ );
package/TourStep.ts ADDED
@@ -0,0 +1,40 @@
1
+ // Copyright (c) Cratis. All rights reserved.
2
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+
4
+ import type { TourCallout } from './TourCallout.js';
5
+ import type { TourCamera } from './TourCamera.js';
6
+ import type { TourGesture } from './TourGesture.js';
7
+
8
+ /**
9
+ * One beat of a tour: a line of narration, how much of the tour's stage is showing while it is said, and
10
+ * where the camera and pointer are looking.
11
+ *
12
+ * The player only ever reads these properties. A tour whose steps carry surface-specific extras — such as an
13
+ * editor panel to show — extends this interface and hands the extended step type to the script's
14
+ * {@link TourSection}s; the player carries the extras through untouched.
15
+ */
16
+ export interface TourStep {
17
+ /** What the voice-over says, and what the subtitles show. */
18
+ narration: string;
19
+
20
+ /**
21
+ * How much of the tour's stage is built by this point. Steps are cumulative — a step never takes
22
+ * anything away, it only adds what the narration has reached.
23
+ */
24
+ stage: number;
25
+
26
+ /** Where to move the camera, or omitted to leave it where the previous step left it. */
27
+ camera?: TourCamera;
28
+
29
+ /** Where to move the pointer, or omitted to leave it where the previous step left it. */
30
+ gesture?: TourGesture;
31
+
32
+ /** A label to pin to the board for the length of the step. */
33
+ callout?: TourCallout;
34
+
35
+ /**
36
+ * How long the step lasts. Omitted for narrated steps, which are timed from the narration itself so the
37
+ * script does not have to keep two numbers in sync every time a line is reworded.
38
+ */
39
+ durationMs?: number;
40
+ }
@@ -0,0 +1,22 @@
1
+ // Copyright (c) Cratis. All rights reserved.
2
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+
4
+
5
+ export interface TourSubtitlesProps {
6
+ /** The line being narrated right now. */
7
+ narration: string;
8
+ }
9
+
10
+ /**
11
+ * Shows what the voice-over is saying, so the tour works with the sound off, on a muted tab, or for anyone
12
+ * who would rather read it.
13
+ */
14
+ export const TourSubtitles = ({ narration }: TourSubtitlesProps) => {
15
+ if (narration.length === 0) return null;
16
+
17
+ return (
18
+ <div className='cue-subtitles' role='status' aria-live='polite'>
19
+ <p className='cue-subtitles__line'>{narration}</p>
20
+ </div>
21
+ );
22
+ };
@@ -0,0 +1,127 @@
1
+ // Copyright (c) Cratis. All rights reserved.
2
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+
4
+ import React from 'react';
5
+ import { useCueConfiguration } from './Configuration/CueProvider.js';
6
+ import { CueIcon } from './Icons.js';
7
+ import type { TourPlayback } from './useTourPlayback.js';
8
+ import { formatTourTime } from './tourTimeline.js';
9
+
10
+ export interface TourTimelineBarProps {
11
+ /** The tour's playback state and controls. */
12
+ playback: TourPlayback;
13
+
14
+ /** Stops the tour and hands the surface back. Omitted, no stop button is shown. */
15
+ onStop?: () => void;
16
+
17
+ /**
18
+ * Whether the tour is being read self-paced. The media playback controls — play, scrubbing, narration
19
+ * and subtitles — dim, while chapter skipping stays live as the way to move through the tour.
20
+ */
21
+ isSelfPaced?: boolean;
22
+
23
+ /** Switches between narrated playback and self-paced reading. Omitted, no switch is shown. */
24
+ onToggleSelfPaced?: () => void;
25
+ }
26
+
27
+ /**
28
+ * The tour's transport: play and pause, where it has got to, chapter skipping, and the two switches for how
29
+ * the narration is delivered. When the voice-over has failed, the audio switch carries a quiet warning and
30
+ * pressing it retries — the tour itself never stops for a lost voice. A tour that also has written chapters
31
+ * carries one more switch, into self-paced reading — the transport then stops being a media player: only
32
+ * chapter skipping and the reading switch stay live.
33
+ */
34
+ export const TourTimelineBar = ({ playback, onStop, isSelfPaced = false, onToggleSelfPaced }: TourTimelineBarProps) => {
35
+ const { labels: tourStrings, unlockAudio: unlockAudioPlayback } = useCueConfiguration();
36
+ const progress = playback.timeline.durationMs > 0
37
+ ? (playback.timeMs / playback.timeline.durationMs) * 100
38
+ : 0;
39
+
40
+ const handleScrub = (event: React.ChangeEvent<HTMLInputElement>) =>
41
+ playback.seekTo(Number(event.target.value));
42
+
43
+ // Browsers only allow programmatic audio on media activated by a real user gesture, and narration keeps
44
+ // starting long after any click — so the gestures that lead to narration unlock playback on the way.
45
+ const handlePlayClick = () => {
46
+ unlockAudioPlayback();
47
+ playback.togglePlay();
48
+ };
49
+
50
+ const handleAudioClick = () => {
51
+ unlockAudioPlayback();
52
+ playback.toggleAudio();
53
+ };
54
+
55
+ const audioTitle = playback.hasNarrationFailed
56
+ ? tourStrings.narrationFailed
57
+ : !playback.isSpeechAvailable
58
+ ? tourStrings.narrationUnavailable
59
+ : playback.isAudioEnabled ? tourStrings.muteNarration : tourStrings.unmuteNarration;
60
+
61
+ return (
62
+ <div className={`cue-transport${isSelfPaced ? ' cue-transport--self-paced' : ''}`}>
63
+ <button type='button' className='cue-transport__button' title={tourStrings.previousChapter} onClick={playback.goToPreviousChapter}>
64
+ <CueIcon name='previous' />
65
+ </button>
66
+ <button
67
+ type='button'
68
+ className='cue-transport__button cue-transport__button--primary'
69
+ title={playback.isPlaying ? tourStrings.pause : tourStrings.play}
70
+ disabled={isSelfPaced}
71
+ onClick={handlePlayClick}>
72
+ <CueIcon name={playback.isPlaying ? 'pause' : 'play'} />
73
+ </button>
74
+ <button type='button' className='cue-transport__button' title={tourStrings.nextChapter} onClick={playback.goToNextChapter}>
75
+ <CueIcon name='next' />
76
+ </button>
77
+
78
+ <span className='cue-transport__time'>{formatTourTime(playback.timeMs)}</span>
79
+ <div className='cue-transport__track'>
80
+ <div className='cue-transport__elapsed' style={{ width: `${progress}%` }} />
81
+ <input
82
+ type='range'
83
+ className='cue-transport__scrubber'
84
+ aria-label={tourStrings.progress}
85
+ min={0}
86
+ max={playback.timeline.durationMs}
87
+ step={100}
88
+ value={playback.timeMs}
89
+ disabled={isSelfPaced}
90
+ onChange={handleScrub}
91
+ />
92
+ </div>
93
+ <span className='cue-transport__time'>{formatTourTime(playback.timeline.durationMs)}</span>
94
+
95
+ <button
96
+ type='button'
97
+ className={`cue-transport__button${playback.isAudioEnabled && playback.isSpeechAvailable ? '' : ' cue-transport__button--off'}${playback.hasNarrationFailed ? ' cue-transport__button--warning' : ''}`}
98
+ title={audioTitle}
99
+ disabled={!playback.isSpeechAvailable || isSelfPaced}
100
+ onClick={handleAudioClick}>
101
+ <CueIcon name={playback.isAudioEnabled && playback.isSpeechAvailable ? 'volumeOn' : 'volumeOff'} />
102
+ </button>
103
+ <button
104
+ type='button'
105
+ className={`cue-transport__button${playback.areSubtitlesEnabled ? '' : ' cue-transport__button--off'}`}
106
+ title={playback.areSubtitlesEnabled ? tourStrings.hideSubtitles : tourStrings.showSubtitles}
107
+ disabled={isSelfPaced}
108
+ onClick={playback.toggleSubtitles}>
109
+ <CueIcon name='subtitles' />
110
+ </button>
111
+ {onToggleSelfPaced && (
112
+ <button
113
+ type='button'
114
+ className={`cue-transport__button${isSelfPaced ? ' cue-transport__button--active' : ''}`}
115
+ title={isSelfPaced ? tourStrings.resumeNarrated : tourStrings.readSelfPaced}
116
+ onClick={onToggleSelfPaced}>
117
+ <CueIcon name='book' />
118
+ </button>
119
+ )}
120
+ {onStop && (
121
+ <button type='button' className='cue-transport__button' title={tourStrings.close} onClick={onStop}>
122
+ <CueIcon name='close' />
123
+ </button>
124
+ )}
125
+ </div>
126
+ );
127
+ };
package/Tours/index.ts ADDED
@@ -0,0 +1,5 @@
1
+ // Copyright (c) Cratis. All rights reserved.
2
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+
4
+ export * from './useCueTours.js';
5
+ export * from './useTourNudge.js';
@@ -0,0 +1,63 @@
1
+ // Copyright (c) Cratis. All rights reserved.
2
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+
4
+ import { StartTour, StartedTour, ByMe } from '@cratis/showrunner.cue';
5
+ import { useCallback, useMemo, useState } from 'react';
6
+
7
+ /**
8
+ * What {@link useCueTours} gives a component.
9
+ */
10
+ export interface CueTours {
11
+ /**
12
+ * Whether what the signed-in person has started has arrived. Until it has, {@link hasStarted} knows nothing, so a
13
+ * surface that points at a tour should wait: pointing and then taking the pointer away again is worse than a
14
+ * beat of nothing.
15
+ */
16
+ isLoaded: boolean;
17
+
18
+ /**
19
+ * Gets whether the person has started a tour, on this device or any other.
20
+ * @param tour The name of the tour.
21
+ * @returns True when they have; false when they have not, or when it has not arrived yet.
22
+ */
23
+ hasStarted(tour: string): boolean;
24
+
25
+ /**
26
+ * Records that the person started a tour. It counts at once on this device and is recorded for every other; starting
27
+ * a tour again changes nothing.
28
+ * @param tour The name of the tour.
29
+ * @returns Resolves when it has been recorded.
30
+ */
31
+ recordStart(tour: string): Promise<void>;
32
+ }
33
+
34
+ /**
35
+ * Knows which guided tours the signed-in person has started, and records the next one. Must be used inside Arc's
36
+ * context, like every generated query.
37
+ * @returns The {@link CueTours}.
38
+ */
39
+ export const useCueTours = (): CueTours => {
40
+ const [result] = ByMe.use();
41
+ const [recorded, setRecorded] = useState<ReadonlySet<string>>(() => new Set());
42
+
43
+ const started = useMemo(
44
+ () => new Set([...(result.data ?? []).map((tour: StartedTour) => tour.id), ...recorded]),
45
+ [result.data, recorded]);
46
+
47
+ const hasStarted = useCallback((tour: string) => started.has(tour), [started]);
48
+
49
+ const recordStart = useCallback(async (tour: string) => {
50
+ if (started.has(tour)) {
51
+ return;
52
+ }
53
+
54
+ // The answer is held here the moment the tour starts: what the query returns follows the event log and may not
55
+ // have caught up yet.
56
+ setRecorded(current => new Set(current).add(tour));
57
+ const command = new StartTour();
58
+ command.tour = tour;
59
+ await command.execute();
60
+ }, [started]);
61
+
62
+ return { isLoaded: result.isReady, hasStarted, recordStart };
63
+ };
@@ -0,0 +1,37 @@
1
+ // Copyright (c) Cratis. All rights reserved.
2
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+
4
+ import { useCueTours } from './useCueTours.js';
5
+
6
+ /**
7
+ * What a tour's button gets back from {@link useTourNudge}: whether to point at the tour, and what to do when it starts.
8
+ */
9
+ export interface TourNudge {
10
+ /** Whether the start-here pointer should be shown right now. */
11
+ isNudgeShown: boolean;
12
+
13
+ /**
14
+ * Records that the person started the tour. The pointer goes away at once on this device and is recorded for every
15
+ * other; call it when the tour starts.
16
+ */
17
+ recordStart(): void;
18
+ }
19
+
20
+ /**
21
+ * Drives one surface's start-here pointer from what the signed-in person has already done: it points at a tour they have
22
+ * never started, and stops once they have, on every device. Must be used inside Arc's context.
23
+ * @param tour The name of the tour the surface offers.
24
+ * @param isSuppressed Whether the surface's own signals say the pointer must not show, such as the person having already
25
+ * done the work the tour teaches. Defaults to false.
26
+ * @returns The {@link TourNudge} for the surface's button.
27
+ * @remarks
28
+ * What the person started has to arrive before the pointer is shown: pointing and then taking the pointer away again is
29
+ * worse than a beat of nothing.
30
+ */
31
+ export const useTourNudge = (tour: string, isSuppressed = false): TourNudge => {
32
+ const { isLoaded, hasStarted, recordStart } = useCueTours();
33
+ return {
34
+ isNudgeShown: !isSuppressed && isLoaded && !hasStarted(tour),
35
+ recordStart: () => { void recordStart(tour); }
36
+ };
37
+ };
package/cursorSvg.ts ADDED
@@ -0,0 +1,12 @@
1
+ // Copyright (c) Cratis. All rights reserved.
2
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+
4
+ /** The pointer the tour moves around: a plain arrow, white with a dark outline so it shows on any surface. */
5
+ export const cursorSvg = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 24" width="20" height="24">
6
+ <path
7
+ d="M 1.5 1 L 1.5 17.2 L 5.4 13.5 L 8.2 19.9 L 11.1 18.6 L 8.4 12.4 L 13.8 12.4 Z"
8
+ fill="#ffffff"
9
+ stroke="#000000"
10
+ stroke-width="1.4"
11
+ stroke-linejoin="round" />
12
+ </svg>`;
@@ -0,0 +1,11 @@
1
+ import type { ComponentType, ReactNode } from 'react';
2
+ import type { CueLabels } from '../Labels/CueLabels.js';
3
+ import type { CueSpeechConfiguration } from '../Speech/CueSpeechConfiguration.js';
4
+ export interface CueConfiguration {
5
+ speech?: CueSpeechConfiguration;
6
+ labels?: Partial<CueLabels>;
7
+ stageBoundary?: ComponentType<{
8
+ children: ReactNode;
9
+ }>;
10
+ }
11
+ //# sourceMappingURL=CueConfiguration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CueConfiguration.d.ts","sourceRoot":"","sources":["../../../Configuration/CueConfiguration.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAKlF,MAAM,WAAW,gBAAgB;IAK7B,MAAM,CAAC,EAAE,sBAAsB,CAAC;IAGhC,MAAM,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;IAO5B,aAAa,CAAC,EAAE,aAAa,CAAC;QAAE,QAAQ,EAAE,SAAS,CAAA;KAAE,CAAC,CAAC;CAC1D"}
@@ -0,0 +1,19 @@
1
+ import React, { type ReactNode } from 'react';
2
+ import { type CueLabels } from '../Labels/CueLabels.js';
3
+ import type { CueConfiguration } from './CueConfiguration.js';
4
+ import type { ComponentType } from 'react';
5
+ import type { CueSpeech } from '../Speech/CueSpeech.js';
6
+ export interface ResolvedCueConfiguration {
7
+ useSpeech: () => CueSpeech;
8
+ unlockAudio: () => void;
9
+ labels: CueLabels;
10
+ stageBoundary: ComponentType<{
11
+ children: ReactNode;
12
+ }>;
13
+ }
14
+ export interface CueProviderProps extends CueConfiguration {
15
+ children: ReactNode;
16
+ }
17
+ export declare const CueProvider: ({ speech, labels, stageBoundary, children }: CueProviderProps) => React.JSX.Element;
18
+ export declare const useCueConfiguration: () => ResolvedCueConfiguration;
19
+ //# sourceMappingURL=CueProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CueProvider.d.ts","sourceRoot":"","sources":["../../../Configuration/CueProvider.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,EAAE,KAAK,SAAS,EAAsC,MAAM,OAAO,CAAC;AAClF,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAGxD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAIxD,MAAM,WAAW,wBAAwB;IAErC,SAAS,EAAE,MAAM,SAAS,CAAC;IAE3B,WAAW,EAAE,MAAM,IAAI,CAAC;IAExB,MAAM,EAAE,SAAS,CAAC;IAElB,aAAa,EAAE,aAAa,CAAC;QAAE,QAAQ,EAAE,SAAS,CAAA;KAAE,CAAC,CAAC;CACzD;AAiBD,MAAM,WAAW,gBAAiB,SAAQ,gBAAgB;IAEtD,QAAQ,EAAE,SAAS,CAAC;CACvB;AAMD,eAAO,MAAM,WAAW,GAAI,6CAA6C,gBAAgB,sBASxF,CAAC;AAMF,eAAO,MAAM,mBAAmB,QAAO,wBAA+D,CAAC"}
@@ -0,0 +1,44 @@
1
+ 'use strict';
2
+
3
+ var jsxRuntime = require('react/jsx-runtime');
4
+ var react = require('react');
5
+ var resolveLabels = require('../Labels/resolveLabels.js');
6
+ var CueStageBoundary = require('./CueStageBoundary.js');
7
+ var silentSpeech = require('../Speech/silentSpeech.js');
8
+
9
+ // A tour with no voice-over plays silently: there is no service, so nothing is ever said.
10
+ const useSilentSpeech = ()=>silentSpeech.silentSpeech;
11
+ const defaults = {
12
+ useSpeech: useSilentSpeech,
13
+ unlockAudio: ()=>undefined,
14
+ labels: resolveLabels.resolveLabels(),
15
+ stageBoundary: CueStageBoundary.CueStageBoundary
16
+ };
17
+ const CueConfigurationContext = /*#__PURE__*/ react.createContext(defaults);
18
+ /**
19
+ * Tells the tours below it how to speak, what to call their buttons and how to guard their stage. Put it once near the
20
+ * root of the application; without it a tour plays silently, in English.
21
+ */ const CueProvider = ({ speech, labels, stageBoundary, children })=>{
22
+ const value = react.useMemo(()=>({
23
+ useSpeech: speech?.useSpeech ?? useSilentSpeech,
24
+ unlockAudio: ()=>speech?.unlock?.(),
25
+ labels: resolveLabels.resolveLabels(labels),
26
+ stageBoundary: stageBoundary ?? CueStageBoundary.CueStageBoundary
27
+ }), [
28
+ speech,
29
+ labels,
30
+ stageBoundary
31
+ ]);
32
+ return /*#__PURE__*/ jsxRuntime.jsx(CueConfigurationContext.Provider, {
33
+ value: value,
34
+ children: children
35
+ });
36
+ };
37
+ /**
38
+ * Gets the configuration of the nearest {@link CueProvider}, or the defaults when there is none.
39
+ * @returns The {@link ResolvedCueConfiguration}.
40
+ */ const useCueConfiguration = ()=>react.useContext(CueConfigurationContext);
41
+
42
+ exports.CueProvider = CueProvider;
43
+ exports.useCueConfiguration = useCueConfiguration;
44
+ //# sourceMappingURL=CueProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CueProvider.js","sources":["../../../Configuration/CueProvider.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport React, { type ReactNode, createContext, useContext, useMemo } from 'react';\nimport { type CueLabels } from '../Labels/CueLabels.js';\nimport { resolveLabels } from '../Labels/resolveLabels.js';\nimport { CueStageBoundary } from './CueStageBoundary.js';\nimport type { CueConfiguration } from './CueConfiguration.js';\nimport type { ComponentType } from 'react';\nimport type { CueSpeech } from '../Speech/CueSpeech.js';\nimport { silentSpeech } from '../Speech/silentSpeech.js';\n\n/** The configuration as the tour reads it: everything is there. */\nexport interface ResolvedCueConfiguration {\n /** The hook that gives a tour its voice; a silent one when the tours play without a voice-over. */\n useSpeech: () => CueSpeech;\n /** Unlocks audio playback from a viewer's gesture; does nothing when there is no voice-over. */\n unlockAudio: () => void;\n /** Every text of the tour's chrome. */\n labels: CueLabels;\n /** What guards the stage of a tour. */\n stageBoundary: ComponentType<{ children: ReactNode }>;\n}\n\n// A tour with no voice-over plays silently: there is no service, so nothing is ever said.\nconst useSilentSpeech = (): CueSpeech => silentSpeech;\n\nconst defaults: ResolvedCueConfiguration = {\n useSpeech: useSilentSpeech,\n unlockAudio: () => undefined,\n labels: resolveLabels(),\n stageBoundary: CueStageBoundary\n};\n\nconst CueConfigurationContext = createContext<ResolvedCueConfiguration>(defaults);\n\n/**\n * Props for {@link CueProvider}.\n */\nexport interface CueProviderProps extends CueConfiguration {\n /** What the configuration applies to: the tours. */\n children: ReactNode;\n}\n\n/**\n * Tells the tours below it how to speak, what to call their buttons and how to guard their stage. Put it once near the\n * root of the application; without it a tour plays silently, in English.\n */\nexport const CueProvider = ({ speech, labels, stageBoundary, children }: CueProviderProps) => {\n const value = useMemo<ResolvedCueConfiguration>(() => ({\n useSpeech: speech?.useSpeech ?? useSilentSpeech,\n unlockAudio: () => speech?.unlock?.(),\n labels: resolveLabels(labels),\n stageBoundary: stageBoundary ?? CueStageBoundary\n }), [speech, labels, stageBoundary]);\n\n return <CueConfigurationContext.Provider value={value}>{children}</CueConfigurationContext.Provider>;\n};\n\n/**\n * Gets the configuration of the nearest {@link CueProvider}, or the defaults when there is none.\n * @returns The {@link ResolvedCueConfiguration}.\n */\nexport const useCueConfiguration = (): ResolvedCueConfiguration => useContext(CueConfigurationContext);\n"],"names":["useSilentSpeech","silentSpeech","defaults","useSpeech","unlockAudio","undefined","labels","resolveLabels","stageBoundary","CueStageBoundary","CueConfigurationContext","createContext","CueProvider","speech","children","value","useMemo","unlock","_jsx","Provider","useCueConfiguration","useContext"],"mappings":";;;;;;;;AAwBA;AACA,MAAMA,kBAAkB,IAAiBC,yBAAAA;AAEzC,MAAMC,QAAAA,GAAqC;IACvCC,SAAAA,EAAWH,eAAAA;AACXI,IAAAA,WAAAA,EAAa,IAAMC,SAAAA;IACnBC,MAAAA,EAAQC,2BAAAA,EAAAA;IACRC,aAAAA,EAAeC;AACnB,CAAA;AAEA,MAAMC,wCAA0BC,mBAAAA,CAAwCT,QAAAA,CAAAA;AAUxE;;;AAGC,IACM,MAAMU,WAAAA,GAAc,CAAC,EAAEC,MAAM,EAAEP,MAAM,EAAEE,aAAa,EAAEM,QAAQ,EAAoB,GAAA;IACrF,MAAMC,KAAAA,GAAQC,aAAAA,CAAkC,KAAO;AACnDb,YAAAA,SAAAA,EAAWU,QAAQV,SAAAA,IAAaH,eAAAA;AAChCI,YAAAA,WAAAA,EAAa,IAAMS,MAAAA,EAAQI,MAAAA,IAAAA;AAC3BX,YAAAA,MAAAA,EAAQC,2BAAAA,CAAcD,MAAAA,CAAAA;AACtBE,YAAAA,aAAAA,EAAeA,aAAAA,IAAiBC;AACpC,SAAA,CAAA,EAAI;AAACI,QAAAA,MAAAA;AAAQP,QAAAA,MAAAA;AAAQE,QAAAA;AAAc,KAAA,CAAA;IAEnC,qBAAOU,cAAA,CAACR,wBAAwBS,QAAQ,EAAA;QAACJ,KAAAA,EAAOA,KAAAA;AAAQD,QAAAA,QAAAA,EAAAA;;AAC5D;AAEA;;;AAGC,IACM,MAAMM,mBAAAA,GAAsB,IAAgCC,iBAAWX,uBAAAA;;;"}
@@ -0,0 +1,14 @@
1
+ import React, { Component, type ErrorInfo, type ReactNode } from 'react';
2
+ interface CueStageBoundaryState {
3
+ failed: boolean;
4
+ }
5
+ export declare class CueStageBoundary extends Component<{
6
+ children: ReactNode;
7
+ }, CueStageBoundaryState> {
8
+ state: CueStageBoundaryState;
9
+ static getDerivedStateFromError(): CueStageBoundaryState;
10
+ componentDidCatch(error: Error, info: ErrorInfo): void;
11
+ render(): string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | React.JSX.Element | null | undefined;
12
+ }
13
+ export {};
14
+ //# sourceMappingURL=CueStageBoundary.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CueStageBoundary.d.ts","sourceRoot":"","sources":["../../../Configuration/CueStageBoundary.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAEzE,UAAU,qBAAqB;IAC3B,MAAM,EAAE,OAAO,CAAC;CACnB;AAMD,qBAAa,gBAAiB,SAAQ,SAAS,CAAC;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,EAAE,qBAAqB,CAAC;IAC3F,KAAK,EAAE,qBAAqB,CAAqB;IAEjD,MAAM,CAAC,wBAAwB,IAAI,qBAAqB;IAIxD,iBAAiB,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS;IAI/C,MAAM;CAYT"}
@@ -0,0 +1,45 @@
1
+ 'use strict';
2
+
3
+ var jsxRuntime = require('react/jsx-runtime');
4
+ var react = require('react');
5
+
6
+ /**
7
+ * The guard of a tour's stage when the application brings none: a panel that says the tour could not be drawn, with a way
8
+ * to try again.
9
+ */ class CueStageBoundary extends react.Component {
10
+ state = {
11
+ failed: false
12
+ };
13
+ static getDerivedStateFromError() {
14
+ return {
15
+ failed: true
16
+ };
17
+ }
18
+ componentDidCatch(error, info) {
19
+ console.error('The guided tour could not be drawn.', error, info.componentStack);
20
+ }
21
+ render() {
22
+ if (!this.state.failed) {
23
+ return this.props.children;
24
+ }
25
+ return /*#__PURE__*/ jsxRuntime.jsxs("div", {
26
+ className: "cue-stage-failed",
27
+ role: "alert",
28
+ children: [
29
+ /*#__PURE__*/ jsxRuntime.jsx("p", {
30
+ children: "The guided tour could not be drawn."
31
+ }),
32
+ /*#__PURE__*/ jsxRuntime.jsx("button", {
33
+ type: "button",
34
+ onClick: ()=>this.setState({
35
+ failed: false
36
+ }),
37
+ children: "Try again"
38
+ })
39
+ ]
40
+ });
41
+ }
42
+ }
43
+
44
+ exports.CueStageBoundary = CueStageBoundary;
45
+ //# sourceMappingURL=CueStageBoundary.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CueStageBoundary.js","sources":["../../../Configuration/CueStageBoundary.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport React, { Component, type ErrorInfo, type ReactNode } from 'react';\n\ninterface CueStageBoundaryState {\n failed: boolean;\n}\n\n/**\n * The guard of a tour's stage when the application brings none: a panel that says the tour could not be drawn, with a way\n * to try again.\n */\nexport class CueStageBoundary extends Component<{ children: ReactNode }, CueStageBoundaryState> {\n state: CueStageBoundaryState = { failed: false };\n\n static getDerivedStateFromError(): CueStageBoundaryState {\n return { failed: true };\n }\n\n componentDidCatch(error: Error, info: ErrorInfo) {\n console.error('The guided tour could not be drawn.', error, info.componentStack);\n }\n\n render() {\n if (!this.state.failed) {\n return this.props.children;\n }\n\n return (\n <div className='cue-stage-failed' role='alert'>\n <p>The guided tour could not be drawn.</p>\n <button type='button' onClick={() => this.setState({ failed: false })}>Try again</button>\n </div>\n );\n }\n}\n"],"names":["CueStageBoundary","Component","state","failed","getDerivedStateFromError","componentDidCatch","error","info","console","componentStack","render","props","children","_jsxs","div","className","role","_jsx","p","button","type","onClick","setState"],"mappings":";;;;;AASA;;;IAIO,MAAMA,gBAAAA,SAAyBC,eAAAA,CAAAA;IAClCC,KAAAA,GAA+B;QAAEC,MAAAA,EAAQ;KAAM;AAE/C,IAAA,OAAOC,wBAAAA,GAAkD;QACrD,OAAO;YAAED,MAAAA,EAAQ;AAAK,SAAA;AAC1B,IAAA;IAEAE,iBAAAA,CAAkBC,KAAY,EAAEC,IAAe,EAAE;AAC7CC,QAAAA,OAAAA,CAAQF,KAAK,CAAC,qCAAA,EAAuCA,KAAAA,EAAOC,KAAKE,cAAc,CAAA;AACnF,IAAA;IAEAC,MAAAA,GAAS;AACL,QAAA,IAAI,CAAC,IAAI,CAACR,KAAK,CAACC,MAAM,EAAE;AACpB,YAAA,OAAO,IAAI,CAACQ,KAAK,CAACC,QAAQ;AAC9B,QAAA;AAEA,QAAA,qBACIC,eAAA,CAACC,KAAAA,EAAAA;YAAIC,SAAAA,EAAU,kBAAA;YAAmBC,IAAAA,EAAK,OAAA;;8BACnCC,cAAA,CAACC,GAAAA,EAAAA;AAAE,oBAAA,QAAA,EAAA;;8BACHD,cAAA,CAACE,QAAAA,EAAAA;oBAAOC,IAAAA,EAAK,QAAA;AAASC,oBAAAA,OAAAA,EAAS,IAAM,IAAI,CAACC,QAAQ,CAAC;4BAAEnB,MAAAA,EAAQ;AAAM,yBAAA,CAAA;AAAI,oBAAA,QAAA,EAAA;;;;AAGnF,IAAA;AACJ;;"}
@@ -0,0 +1,4 @@
1
+ export * from './CueConfiguration.js';
2
+ export * from './CueProvider.js';
3
+ export * from './CueStageBoundary.js';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../Configuration/index.ts"],"names":[],"mappings":"AAGA,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { ReactNode } from 'react';
2
+ export declare const AppShell: ({ children }: {
3
+ children: ReactNode;
4
+ }) => import("react").JSX.Element;
5
+ //# sourceMappingURL=AppShell.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AppShell.d.ts","sourceRoot":"","sources":["../../../Examples/AppShell.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAQlC,eAAO,MAAM,QAAQ,GAAI,cAAc;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,gCAQ7D,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { ReactNode } from 'react';
2
+ export declare const LocalizedCue: ({ children }: {
3
+ children: ReactNode;
4
+ }) => import("react").JSX.Element;
5
+ //# sourceMappingURL=LocalizedCue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LocalizedCue.d.ts","sourceRoot":"","sources":["../../../Examples/LocalizedCue.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,eAAO,MAAM,YAAY,GAAI,cAAc;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,gCAYjE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const OrderDeskTour: () => import("react").JSX.Element;
2
+ //# sourceMappingURL=OrderDeskTour.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OrderDeskTour.d.ts","sourceRoot":"","sources":["../../../Examples/OrderDeskTour.tsx"],"names":[],"mappings":"AA4BA,eAAO,MAAM,aAAa,mCAqBzB,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { ReactNode } from 'react';
2
+ export declare const GuardedCue: ({ children }: {
3
+ children: ReactNode;
4
+ }) => import("react").JSX.Element;
5
+ //# sourceMappingURL=OwnStageGuard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OwnStageGuard.d.ts","sourceRoot":"","sources":["../../../Examples/OwnStageGuard.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,SAAS,EAAE,MAAM,OAAO,CAAC;AAkB7C,eAAO,MAAM,UAAU,GAAI,cAAc;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,gCAE/D,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { CueSpeechConfiguration } from '@cratis/showrunner.cue.react';
2
+ export declare const browserVoice: CueSpeechConfiguration;
3
+ //# sourceMappingURL=OwnVoice.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OwnVoice.d.ts","sourceRoot":"","sources":["../../../Examples/OwnVoice.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAa,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAwCjF,eAAO,MAAM,YAAY,EAAE,sBAAuD,CAAC"}
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ declare const paths: {
3
+ readonly previous: "M6 6h2v12H6zm3.5 6l8.5 6V6z";
4
+ readonly next: "M6 18l8.5-6L6 6v12zM16 6v12h2V6h-2z";
5
+ readonly play: "M8 5v14l11-7z";
6
+ readonly pause: "M6 19h4V5H6v14zm8-14v14h4V5h-4z";
7
+ readonly volumeOn: "M3 9v6h4l5 5V4L7 9H3zm13.5 3A4.5 4.5 0 0 0 14 7.97v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77z";
8
+ readonly volumeOff: "M16.5 12A4.5 4.5 0 0 0 14 7.97v2.21l2.45 2.45c.03-.2.05-.41.05-.63zm2.5 0c0 .94-.2 1.82-.54 2.64l1.51 1.51A8.796 8.796 0 0 0 21 12c0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71zM4.27 3L3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25c-.67.52-1.42.93-2.25 1.18v2.06a8.99 8.99 0 0 0 3.69-1.81L19.73 21 21 19.73l-9-9L4.27 3zM12 4L9.91 6.09 12 8.18V4z";
9
+ readonly subtitles: "M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM4 12h4v2H4v-2zm10 6H4v-2h10v2zm6 0h-4v-2h4v2zm0-4H10v-2h10v2z";
10
+ readonly book: "M21 5c-1.11-.35-2.33-.5-3.5-.5-1.95 0-4.05.4-5.5 1.5-1.45-1.1-3.55-1.5-5.5-1.5S2.45 4.9 1 6v14.65c0 .25.25.5.5.5.1 0 .15-.05.25-.05C3.1 20.45 5.05 20 6.5 20c1.95 0 4.05.4 5.5 1.5 1.35-.85 3.8-1.5 5.5-1.5 1.65 0 3.35.3 4.75 1.05.1.05.15.05.25.05.25 0 .5-.25.5-.5V6c-.6-.45-1.25-.75-2-1zm0 13.5c-1.1-.35-2.3-.5-3.5-.5-1.7 0-4.15.65-5.5 1.5V8c1.35-.85 3.8-1.5 5.5-1.5 1.2 0 2.4.15 3.5.5v11.5z";
11
+ readonly close: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z";
12
+ };
13
+ export type CueIconName = keyof typeof paths;
14
+ export interface CueIconProps {
15
+ name: CueIconName;
16
+ }
17
+ export declare const CueIcon: ({ name }: CueIconProps) => React.JSX.Element;
18
+ export {};
19
+ //# sourceMappingURL=Icons.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Icons.d.ts","sourceRoot":"","sources":["../../Icons.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,QAAA,MAAM,KAAK;;;;;;;;;;CAUD,CAAC;AAGX,MAAM,MAAM,WAAW,GAAG,MAAM,OAAO,KAAK,CAAC;AAK7C,MAAM,WAAW,YAAY;IAEzB,IAAI,EAAE,WAAW,CAAC;CACrB;AAKD,eAAO,MAAM,OAAO,GAAI,UAAU,YAAY,sBAI7C,CAAC"}