@steppy/player 0.0.0-stage → 0.4.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 (56) hide show
  1. package/LICENSE +202 -0
  2. package/NOTICE +9 -0
  3. package/README.md +190 -2
  4. package/THIRD_PARTY_LICENSES.txt +158 -0
  5. package/dist/steppy-cursor-legacy.js +2 -0
  6. package/dist/steppy-cursor-legacy.js.map +1 -0
  7. package/dist/steppy-player.js +5419 -0
  8. package/dist/steppy-player.js.map +1 -0
  9. package/dist/steppy-tour.js +2164 -0
  10. package/dist/steppy-tour.js.map +1 -0
  11. package/dist/steppy-video.js +472 -0
  12. package/dist/steppy-video.js.map +1 -0
  13. package/dist/types/cursor/animator.d.ts +135 -0
  14. package/dist/types/cursor/types.d.ts +61 -0
  15. package/dist/types/i18n/ui-strings.d.ts +48 -0
  16. package/dist/types/index.d.ts +10 -0
  17. package/dist/types/interaction/positioning.d.ts +22 -0
  18. package/dist/types/manifest/content.d.ts +24 -0
  19. package/dist/types/manifest/index.d.ts +3 -0
  20. package/dist/types/manifest/parse.d.ts +23 -0
  21. package/dist/types/manifest/schema.d.ts +2895 -0
  22. package/dist/types/steppy-guide.d.ts +195 -0
  23. package/dist/types/templates/base-styles.d.ts +15 -0
  24. package/dist/types/templates/controls.d.ts +17 -0
  25. package/dist/types/templates/index.d.ts +23 -0
  26. package/dist/types/templates/inline.d.ts +10 -0
  27. package/dist/types/templates/overlay.d.ts +10 -0
  28. package/dist/types/templates/sidebar.d.ts +19 -0
  29. package/dist/types/templates/types.d.ts +76 -0
  30. package/dist/types/tour/api.d.ts +54 -0
  31. package/dist/types/tour/contract.d.ts +54 -0
  32. package/dist/types/tour/dom.d.ts +43 -0
  33. package/dist/types/tour/engine.d.ts +157 -0
  34. package/dist/types/tour/events.d.ts +42 -0
  35. package/dist/types/tour/host.d.ts +153 -0
  36. package/dist/types/tour/index.d.ts +15 -0
  37. package/dist/types/tour/layer.d.ts +16 -0
  38. package/dist/types/tour/loader.d.ts +70 -0
  39. package/dist/types/tour/resolver.d.ts +30 -0
  40. package/dist/types/tour/routes.d.ts +40 -0
  41. package/dist/types/tour/signature.d.ts +16 -0
  42. package/dist/types/tour/storage.d.ts +28 -0
  43. package/dist/types/tour/strings.d.ts +42 -0
  44. package/dist/types/tour/styles.d.ts +13 -0
  45. package/dist/types/tour/templates.d.ts +47 -0
  46. package/dist/types/tour/tracker.d.ts +45 -0
  47. package/dist/types/tour/triggers.d.ts +52 -0
  48. package/dist/types/tour/validate.d.ts +82 -0
  49. package/dist/types/ui/markdown.d.ts +58 -0
  50. package/dist/types/ui/names.d.ts +18 -0
  51. package/dist/types/ui/placement.d.ts +59 -0
  52. package/dist/types/ui/strings.d.ts +31 -0
  53. package/dist/types/ui/tokens.d.ts +57 -0
  54. package/package.json +70 -4
  55. package/schema/README.md +19 -0
  56. package/schema/guide.schema.json +427 -0
@@ -0,0 +1,24 @@
1
+ import type { CaptureContent, GuideManifest, ManifestStep } from './schema.js';
2
+ /**
3
+ * Resolve a step's guide text for one (locale, layout).
4
+ *
5
+ * Two levels, no partials: a `Capture` either carries a full `content`
6
+ * override — the desktop/mobile twin-branch case, where the same logical step
7
+ * is authored once per layout — or it inherits the step-level value.
8
+ *
9
+ * The caller must pass the layout key it also read the *frame* from. Content
10
+ * and frame coming from the same `Capture` is the invariant that keeps a
11
+ * viewer from ever seeing one layout's instructions above another layout's
12
+ * screenshot; see `captureLayoutKey`.
13
+ */
14
+ export declare function resolveStepContent(step: ManifestStep, locale: string, layoutKey: string): CaptureContent;
15
+ /**
16
+ * The layout key a render should read `step.captures[locale]` under.
17
+ *
18
+ * Prefers the requested key, then the manifest default, then whatever the bag
19
+ * actually holds. The schema guarantees the full (locale × layout)
20
+ * cross-product, so the first branch is the live path; the rest only matter
21
+ * when a host sets an unrecognised `variant`, and they exist so the fallback
22
+ * lands on the manifest's own default rather than on object insertion order.
23
+ */
24
+ export declare function captureLayoutKey(step: ManifestStep, locale: string, requested: string | null, manifest: Pick<GuideManifest, 'layouts' | 'defaultLayout'>): string | null;
@@ -0,0 +1,3 @@
1
+ export { GuideManifestSchema, SUPPORTED_MAJOR_VERSION, type Bbox, type Capture, type CaptureContent, type CaptureSize, type CursorBehavior, type CursorTimings, type Frame, type GuideManifest, type ManifestAction, type ManifestStep, } from './schema.js';
2
+ export { captureLayoutKey, resolveStepContent } from './content.js';
3
+ export { parseManifest, type ParseError, type ParseErrorCode, type ParseResult, } from './parse.js';
@@ -0,0 +1,23 @@
1
+ import { type GuideManifest } from './schema.js';
2
+ export type ParseErrorCode = 'invalid_json' | 'version_missing' | 'version_unsupported' | 'schema_invalid' | 'fetch_failed' | 'screenshot_missing' | 'bad_attribute';
3
+ export interface ParseError {
4
+ code: ParseErrorCode;
5
+ message: string;
6
+ issues?: Array<{
7
+ path: string;
8
+ message: string;
9
+ }>;
10
+ }
11
+ export type ParseResult = {
12
+ ok: true;
13
+ manifest: GuideManifest;
14
+ } | {
15
+ ok: false;
16
+ error: ParseError;
17
+ };
18
+ /**
19
+ * Parse and validate a manifest from either a JSON string or a pre-parsed
20
+ * value. Performs major-version compatibility check before structural
21
+ * validation so version errors are reported with a clearer code.
22
+ */
23
+ export declare function parseManifest(input: unknown): ParseResult;