@qaiddev/quests-embed 1.0.0 → 1.1.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.
package/dist/embed.d.ts CHANGED
@@ -32,12 +32,32 @@ export declare class QaidQuests {
32
32
  private currentInput;
33
33
  private boundKeyDown;
34
34
  private cssVars;
35
+ private hostThemeOverrides;
36
+ private hostInlineVars;
37
+ private themeUrl;
38
+ private themeDocument;
39
+ private hostCss;
35
40
  constructor(config: QuestsConfig);
36
41
  private init;
42
+ private loadTheme;
43
+ /**
44
+ * Merge a fetched theme document into the live config, then inject
45
+ * the resulting CSS layers + class toggles into the shadow root.
46
+ *
47
+ * Precedence (highest first):
48
+ * 1. Host's explicit `QuestsConfig` fields (preset/theme/unstyled/css)
49
+ * 2. Theme document fields (preset/mode/unstyled/tokens/css)
50
+ * 3. Embed defaults
51
+ *
52
+ * CSS layer order (later wins for same-specificity rules):
53
+ * base stylesheet → theme.tokens block → preset CSS → theme.css → host css
54
+ */
55
+ private applyResolvedTheme;
37
56
  private loadQuestionnaire;
38
57
  private mountShell;
39
58
  private renderLoading;
40
59
  private renderError;
60
+ private effectiveProgressPosition;
41
61
  private renderHeader;
42
62
  private renderStep;
43
63
  private renderDone;
@@ -58,6 +78,13 @@ export declare class QaidQuests {
58
78
  destroy(): void;
59
79
  /** Read-only snapshot of current answers */
60
80
  getAnswers(): Answers;
81
+ /**
82
+ * Id of the question currently rendered, or `null` if the embed
83
+ * isn't on a question (still loading, on the thank-you screen, or
84
+ * unmounted). Useful for editor previews that want to restore the
85
+ * user's place after a forced re-mount.
86
+ */
87
+ getCurrentQuestionId(): string | null;
61
88
  /**
62
89
  * Jump to the visible question with the given id. Returns true if
63
90
  * the question is currently visible (and the embed navigated to