@axceera/playstep 0.9.0 → 0.11.2

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
@@ -1,332 +1,5 @@
1
- //#region ../spec/src/strings.d.ts
2
- /** Every word the SDK UI shows. `{n}`, `{total}`, `{guide}` and `{title}` are filled in by the SDK. */
3
- declare const UI_STRING_KEYS: readonly ["next", "back", "done", "close_guide", "step_of", "waiting", "level_cleared", "finished", "next_up", "replay", "next_guide", "guides", "open_guides", "close_guides", "need_a_hand", "pick_a_guide", "completed", "n_steps", "new", "start_over", "video", "play_video", "clip", "play_clip", "loop", "mute_clip", "unmute_clip", "expand_clip", "shrink_clip"];
4
- type UiStringKey = (typeof UI_STRING_KEYS)[number];
5
- //#endregion
6
- //#region ../spec/src/types.d.ts
7
- interface ClipBase {
8
- poster?: string;
9
- duration_ms?: number;
10
- }
11
- type Clip = (ClipBase & {
12
- source: 'hosted';
13
- clip_id?: string;
14
- url: string;
15
- bytes?: number;
16
- }) | (ClipBase & {
17
- source: 'external';
18
- url: string;
19
- }) | (ClipBase & {
20
- source: 'embed';
21
- provider: 'youtube' | 'vimeo';
22
- url: string;
23
- });
24
- type ClipSource = Clip['source'];
25
- type CompleteOn = {
26
- type: 'tap_anchor';
27
- } | {
28
- type: 'event';
29
- name: string;
30
- } | {
31
- type: 'manual';
32
- } | {
33
- type: 'next_button';
34
- } | {
35
- type: 'page';
36
- path: string;
37
- };
38
- /** Where an anchor is when the app has no data-guide / GuideAnchor for it (see findSchema). */
39
- interface Find {
40
- web?: {
41
- css: string;
42
- text?: string;
43
- };
44
- flutter?: {
45
- by: 'key' | 'text' | 'semantics' | 'tooltip';
46
- value: string;
47
- };
48
- }
49
- type Trigger = {
50
- type: 'first_visit';
51
- once: boolean;
52
- } | {
53
- type: 'page_view';
54
- path: string;
55
- once: boolean;
56
- } | {
57
- type: 'event';
58
- name: string;
59
- once: boolean;
60
- } | {
61
- type: 'manual';
62
- };
63
- interface SegmentRule {
64
- trait: string;
65
- op: 'eq' | 'neq' | 'in' | 'exists';
66
- value?: string | number | boolean | (string | number)[];
67
- }
68
- type ColorMode = 'auto' | 'light' | 'dark';
69
- /** Guide UI token values from a brand kit, applied as `--ps-<name>` (see themeTokensSchema). */
70
- interface ThemeTokens {
71
- accent?: string;
72
- 'accent-hover'?: string;
73
- 'on-accent'?: string;
74
- 'primary-soft'?: string;
75
- 'primary-ink'?: string;
76
- 'surface-raised'?: string;
77
- surface?: string;
78
- 'surface-sunken'?: string;
79
- line?: string;
80
- ink?: string;
81
- 'ink-secondary'?: string;
82
- 'ink-muted'?: string;
83
- scrim?: string;
84
- 'shadow-lg'?: string;
85
- 'ring-focus'?: string;
86
- 'radius-lg'?: string;
87
- 'radius-md'?: string;
88
- 'radius-btn'?: string;
89
- 'font-sans'?: string;
90
- 'font-display'?: string;
91
- }
92
- /** The app's brand kit as the SDKs get it (see resolvedThemeSchema). */
93
- interface ResolvedTheme {
94
- mode: ColorMode;
95
- light: ThemeTokens;
96
- dark: ThemeTokens;
97
- radius?: 'sharp' | 'small' | 'medium' | 'round';
98
- shadow?: 'none' | 'soft' | 'strong';
99
- scrim?: number;
100
- font?: {
101
- body?: string;
102
- display?: string;
103
- };
104
- }
105
- interface ConfigFlags {
106
- disabled: boolean;
107
- paused_for_new_users: boolean;
108
- show_badge: boolean;
109
- }
110
- /** Capture links (Generate with AI): where the capture panel sends screens. */
111
- interface CaptureConfig {
112
- endpoint: string;
113
- expires_at: string;
114
- max_screens: number;
115
- }
116
- type EventType = 'guide_shown' | 'step_shown' | 'step_completed' | 'clip_loaded' | 'clip_played' | 'clip_unmuted' | 'guide_completed' | 'guide_dismissed' | 'anchor_missing' | 'sdk_error' | 'progress_reset';
117
- interface AnalyticsEvent {
118
- /** Random per event, so a batch delivered twice counts once. */
119
- id?: string;
120
- type: EventType;
121
- ts: number;
122
- guide_id?: string;
123
- guide_version?: number;
124
- step_id?: string;
125
- step_index?: number;
126
- anchor?: string;
127
- clip_id?: string;
128
- clip_source?: ClipSource;
129
- /** guide_shown: what started the guide. */
130
- source?: GuideSource;
131
- message?: string;
132
- }
133
- /** What started a guide (see GUIDE_SOURCES). */
134
- type GuideSource = 'trigger' | 'launcher' | 'api';
135
- /** A step's clip or image, ready to draw. */
136
- interface RenderedMedia {
137
- /** `video`: a muted looping <video>; `embed`: a click-to-load player (`url` is the player); `image`. */
138
- kind: 'video' | 'embed' | 'image';
139
- url: string;
140
- poster?: string;
141
- duration_ms?: number;
142
- /** For clip events. */
143
- source?: ClipSource;
144
- clip_id?: string;
145
- /** `embed`: the site it plays from; `image`: its description for screen readers. */
146
- label?: string;
147
- width?: number;
148
- height?: number;
149
- }
150
- interface RenderedStep {
151
- id: string;
152
- anchor?: string;
153
- find?: Find;
154
- title: string;
155
- body: string;
156
- media?: RenderedMedia;
157
- complete_on: CompleteOn;
158
- skip_if_on?: string;
159
- /**
160
- * The page (path or route pattern) this step belongs on: the page trigger's or a page step's, kept through Next
161
- * steps only; none: any page. Elsewhere a running guide waits, its progress kept, so it neither follows the user
162
- * around nor blocks that page's own guide.
163
- */
164
- page?: string;
165
- placement: 'auto' | 'top' | 'bottom' | 'left' | 'right';
166
- /** Show Back on this step. */
167
- back?: true;
168
- }
169
- interface RenderedGuide {
170
- id: string;
171
- version: number;
172
- name: string;
173
- /** The language it shows in: a key of the config's `words`. */
174
- lang: string;
175
- rtl?: true;
176
- trigger: Trigger;
177
- segments?: SegmentRule[];
178
- launcher: boolean;
179
- /**
180
- * The page it begins on, `*` parts to fill in from the current path. Started from the guide list, the finish screen
181
- * or start(id) elsewhere, an SDK with the app's router takes the user there first.
182
- */
183
- start_path?: string;
184
- /** Where the card sits for steps without an anchor. */
185
- position: 'bottom' | 'center';
186
- /** Always this mode, whatever the app does. */
187
- mode?: 'light' | 'dark';
188
- /** Its own accent's tokens, over the brand kit's. */
189
- tokens?: {
190
- light: ThemeTokens;
191
- dark: ThemeTokens;
192
- };
193
- steps: RenderedStep[];
194
- }
195
- /** The guide UI's own words in one language, every one filled. */
196
- type Words = Record<UiStringKey, string>;
197
- interface RenderedConfig {
198
- /** The render protocol it was made for (RENDER_PROTOCOL). */
199
- render: number;
200
- app_id: string;
201
- env: 'dev' | 'prod';
202
- generated_at: string;
203
- ingest_url?: string;
204
- flags: ConfigFlags;
205
- /** The guide list's language. */
206
- lang: string;
207
- rtl?: true;
208
- /** Per language used: the list's and each guide's. */
209
- words: Record<string, Words>;
210
- launcher: {
211
- enabled: boolean;
212
- position: 'bottom-right' | 'bottom-left';
213
- title: string;
214
- description: string;
215
- };
216
- theme?: ResolvedTheme;
217
- guides: RenderedGuide[];
218
- capture?: CaptureConfig;
219
- }
220
- //#endregion
221
- //#region src/core/engine.d.ts
222
- type Traits = Record<string, unknown>;
223
- //#endregion
224
- //#region src/core/queue.d.ts
225
- interface SendResult {
226
- /** The HTTP status; 0 when the request never got an answer. */
227
- status: number;
228
- /** Retry-After, in seconds. */
229
- retryAfter?: number;
230
- }
231
- //#endregion
232
- //#region src/core/sdk.d.ts
233
- interface InitOptions {
234
- /** Your publishable key, `ps_pub_…`. */
235
- appKey: string;
236
- /** Where configs and events live. Defaults to https://cdn.playstep.app. */
237
- apiBase?: string;
238
- /**
239
- * The language to show guides in, like `fr` or `pt-BR`. Defaults to the browser language. A guide without that
240
- * language shows in its default one. Change it later with setLocale().
241
- */
242
- locale?: string;
243
- /** Send page views for client-side navigation automatically. Default true. */
244
- autoPageViews?: boolean;
245
- /** Use this config instead of fetching one (dashboard previews and tests). Nothing is metered. */
246
- config?: RenderedConfig;
247
- /** Preview mode: nothing is metered. Set automatically by `?playstep_preview=` links. */
248
- preview?: boolean;
249
- /** Called for every analytics event, so you can pipe guide events into your own analytics. */
250
- onEvent?: (event: AnalyticsEvent) => void;
251
- /**
252
- * Light or dark guides. `auto` (the default) follows your page: a `dark` or `light` class, `data-theme`,
253
- * `data-bs-theme` or `color-scheme` on `<html>` or `<body>` (re-checked whenever they change), else the device
254
- * setting. A guide or brand kit set to always light or dark wins over this.
255
- */
256
- colorMode?: ColorMode;
257
- /**
258
- * Your router, so a guide can begin where it starts (its start page, set in the dashboard): `(path) =>
259
- * router.push(path)`. When someone starts a guide from the guide list, replays it from the finish screen, or your code
260
- * calls start(id) on another page, PlayStep calls this with that page and shows step 1 once the page view is reported.
261
- * Triggers never navigate. Without it, guides start wherever the user is.
262
- */
263
- navigate?: (path: string) => void;
264
- /**
265
- * Where a guide's start page is for this user right now, for `navigate`. `startPath` is the page as set in the
266
- * dashboard, with `*` for the parts that vary, like `/app/*\/projects`. Without this, each `*` takes the same part of
267
- * the current URL: `/app/acme/projects` from `/app/acme/settings`. Give it when that part is not always in the URL
268
- * (pages outside a workspace, like `/app/home`), so nobody is sent to a page that does not exist. Return nothing to
269
- * start the guide where the user is.
270
- */
271
- startPage?: (startPath: string, guideId: string) => string | null | undefined;
272
- /** @internal Set by @axceera/playstep-react. */
273
- sdkName?: 'web' | 'react';
274
- /** @internal Tests: replaces fetch and navigator.sendBeacon. Returning nothing counts as delivered. */
275
- transport?: (url: string, body: string) => Promise<SendResult> | SendResult | undefined;
276
- }
277
- interface OpenLauncherOptions {
278
- /** The element that opened the list (your help button): the list opens next to it instead of in a corner. */
279
- anchor?: Element;
280
- }
281
- interface PlayStep {
282
- readonly version: string;
283
- /** Starts the SDK. Safe to call once; later calls are ignored. */
284
- init: (options: InitOptions) => void;
285
- /** Tells PlayStep who the user is. The id is hashed before it leaves the browser; traits drive segments. */
286
- identify: (userId: string, traits?: Traits) => void;
287
- /** Reports one of your events: it can start a guide or complete an `event` step. */
288
- track: (event: string) => void;
289
- /** Starts a guide now, even if it has been completed before (a replay). */
290
- start: (guideId: string) => void;
291
- /** Completes the current step if its id matches (for `manual` steps). */
292
- complete: (stepId: string) => void;
293
- /** Reports a page or screen view (automatic for client-side navigation unless autoPageViews is false). */
294
- page: (path?: string) => void;
295
- /**
296
- * Opens the list of guides this user can replay, whether or not the floating launcher button is on: call it from
297
- * your own help menu, passing that button as the `anchor` option so the list opens next to it (else next to the
298
- * focused element, or in the launcher's corner). A guide that is showing pauses until the list closes. Does nothing when there are no
299
- * guides to list; before the SDK has loaded, it opens once loaded.
300
- */
301
- openLauncher: (options?: OpenLauncherOptions) => void;
302
- /**
303
- * Clears guide progress on this device so guides can start again: every guide, or only `guideId`. The user, their
304
- * traits and the device id stay. A guide it clears closes, and first-visit and page triggers are checked again for
305
- * the current page straight away. Emits `progress_reset`.
306
- */
307
- resetProgress: (guideId?: string) => void;
308
- /**
309
- * Forgets the user and their guide progress on this device (call on sign-out). It does not end a pause().
310
- */
311
- reset: () => void;
312
- /**
313
- * Stops guides for now, for a user who should not see them at the moment (a guest in this workspace, say): nothing
314
- * starts, a guide that is showing leaves the screen with nothing stored, and the guide list cannot open. Stored
315
- * progress is untouched. Lasts until resume() or the next page load. Use reset() on sign-out instead.
316
- */
317
- pause: () => void;
318
- /** Ends a pause(): the guide that was showing comes back on its step, else triggers are checked for this page. */
319
- resume: () => void;
320
- /** Whether guides are paused. */
321
- isPaused: () => boolean;
322
- /**
323
- * Shows guides in another language from now on, for an app that switches language without reloading. A guide that
324
- * is showing switches straight away.
325
- */
326
- setLocale: (locale: string) => void;
327
- }
328
- //#endregion
1
+ import { a as PlayStepPlugin, d as AnalyticsEvent, f as ColorMode, i as PlayStep, m as RenderedGuide, n as InitOptions, p as RenderedConfig, r as OpenLauncherOptions, t as EventProps } from "./plugin-nV4NXmVz.js";
329
2
  //#region src/index.d.ts
330
3
  export declare const playstep: PlayStep;
331
4
  //#endregion
332
- export { type AnalyticsEvent, type RenderedConfig as AppConfig, type ColorMode, type RenderedGuide as Guide, type InitOptions, type OpenLauncherOptions, type PlayStep, playstep as default };
5
+ export { type AnalyticsEvent, type RenderedConfig as AppConfig, type ColorMode, type EventProps, type RenderedGuide as Guide, type InitOptions, type OpenLauncherOptions, type PlayStep, type PlayStepPlugin, playstep as default };
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{n as e}from"./sdk-ujPSGL2k.js";const t=e(()=>import(`./ui-Wx3i3XXx.js`).then(e=>e.t),()=>import(`./launcher-button-BFeH6G4k.js`),()=>import(`./capture-NeIia2Wg.js`));export{t as default,t as playstep};
1
+ import{n as e}from"./sdk-DOZSBvmE.js";const t=e(()=>import(`./ui-BXeMvUwo.js`).then(e=>e.t),()=>import(`./launcher-button-B62YRJZF.js`),()=>import(`./capture-cKutY_OF.js`));export{t as default,t as playstep};
@@ -0,0 +1 @@
1
+ import{t as e}from"./mode-CPlpg1Yl.js";const t=``;function n(t,n,r,i,a){let o=n.launcherGuides();if(!o.length)return;let s=e(r,a.colorMode),c=r.theme?.[s?`dark`:`light`]??{},l=o.filter(e=>!n.progress.guides[e.id]).length;t.innerHTML=`<button style="position:fixed;${r.launcher.position.slice(7)}:24px;bottom:24px;z-index:2147483000;padding:15px;border:0;border-radius:50%;cursor:pointer;background:${c.accent??(s?`#7091ff`:`#2e5bff`)};color:${c[`on-accent`]??(s?`#0c0e13`:`#fff`)};box-shadow:0 8px 24px #0004"><svg width=26 height=26 viewBox="0 0 24 24" fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round><path d="M12 21a9 9 0 1 0-8.05-4.98L3 21l4.98-.95A8.96 8.96 0 0 0 12 21zM10 9v6l5-3z"/></svg>${l?`<b style="position:absolute;top:-2px;right:-2px;padding:0 6px;border-radius:9px;background:#ffc933;color:#151823;font:800 11px/20px sans-serif">${l}</b>`:``}</button>`;let u=t.firstChild;u.setAttribute(`aria-label`,r.words[r.lang].open_guides),u.onclick=i}export{t as captureIntegrity,n as drawLauncher};
@@ -1 +1 @@
1
- import{fillEl as e,h as t,icon as n,words as r}from"./ui-Wx3i3XXx.js";const i=`.panel{position:fixed;right:24px;bottom:96px;width:320px;max-width:calc(100vw - 36px);max-height:calc(100vh - 120px);overflow:auto;padding:16px}.solo{bottom:24px}.panel .x{float:right}.panel>p{font-size:13px;line-height:18px;color:var(--ps-ink-muted);margin:-2px 0 12px}.rows{list-style:none;padding:0}.row{display:flex;align-items:center;gap:12px;width:100%;padding:10px;border-radius:var(--ps-radius-md);text-align:left}.ti{width:36px;height:36px;flex:none;border-radius:var(--ps-radius-md);display:grid;place-items:center;background:var(--ps-primary-soft);color:var(--ps-primary-ink)}.ti.spark{background:var(--ps-spark-soft);color:var(--ps-spark-ink)}.ti.mint{background:var(--ps-tag-mint);color:var(--ps-ink)}.ti svg{width:18px;height:18px}.rb{flex:1;min-width:0}.rt,.rm{display:block;font-weight:600}.rm{font-size:12px;line-height:16px;font-weight:500;color:var(--ps-ink-muted)}.prog{display:block;height:6px;border-radius:99px;background:var(--ps-surface-sunken);margin-top:6px;overflow:hidden}.prog i{display:block;height:100%;background:var(--ps-accent)}.rp{display:flex;align-items:center;gap:4px;font-size:12px;line-height:16px;font-weight:600;color:var(--ps-ink-muted)}.so{margin-top:8px}.new{height:24px;padding:0 10px;border-radius:99px;background:var(--ps-spark-soft);color:var(--ps-spark-ink);font-size:12px;line-height:24px;font-weight:600}.pb{display:flex;align-items:center;justify-content:center;gap:6px;margin-top:10px;font-size:12px;line-height:16px;font-weight:600;color:var(--ps-ink-muted);text-decoration:none}.panel.left{right:auto;left:24px}@media (max-width:480px){.panel{right:18px;bottom:86px}.solo{bottom:18px}.panel.left{left:18px}}`;function a(i,a,o){let s=i.config.launcher,c=r(i),l=i.engine.launcherGuides(),u=i.engine.progress.guides;a.className=`panel${s.position==`bottom-left`?` left`:``}${s.enabled?``:` solo`}`,a.setAttribute(`aria-label`,c(`guides`)),a.lang=i.config.lang,i.config.rtl&&(a.dir=`rtl`),e(a,t(`button`,{class:`x`,"aria-label":c(`close_guides`),onClick:o},n(`x`)),t(`h2`,null,s.title),t(`p`,null,s.description),t(`ul`,{class:`rows`},l.map(e=>{let r=u[e.id],a=e.steps.length,s=r?.status==`done`,l=r?.status==`running`;return t(`li`,null,t(`button`,{class:`row`,onClick:()=>{o(),r&&i.dispatch({type:`reset_progress`,guide:e.id}),i.dispatch({type:`start`,guide:e.id,source:`launcher`})}},t(`span`,{class:`ti${s?` mint`:r?``:` spark`}`},n(s?`check`:`ps-guide`)),t(`span`,{class:`rb`},t(`span`,{class:`rt`},e.name),t(`span`,{class:`rm`},s?c(`completed`):l?c(`step_of`,{n:r.step+1,total:a}):c(`n_steps`,{n:a})),l&&t(`span`,{class:`prog`,"aria-hidden":`true`},t(`i`,{style:{width:`${r.step/a*100}%`}}))),r?t(`span`,{class:`rp`},n(`rotate-ccw`),c(`replay`)):t(`span`,{class:`new`},c(`new`))))})),l.some(e=>u[e.id])&&t(`div`,{class:`acts so`},t(`button`,{class:`btn gho`,onClick:()=>{i.dispatch({type:`reset_progress`}),i.engine.active?o():a.focus()}},c(`start_over`))),i.config.flags?.show_badge!==!1&&t(`a`,{class:`pb`,href:`https://playstep.app/?ref=badge`,target:`_blank`,rel:`noopener`},t(`span`,{style:{display:`inline-flex`,width:`16px`,height:`16px`},ref:e=>e.innerHTML=`<svg viewBox="0 0 48 48" aria-hidden="true"><rect width="48" height="48" rx="13" fill="#2E5BFF"/><rect x="11" y="10" width="8" height="28" rx="4" fill="#fff"/><path d="M23.5 12v17l12-8.5z" fill="#FFC933" stroke="#FFC933" stroke-width="3.5" stroke-linejoin="round"/></svg>`}),`Powered by PlayStep`))}export{i as css,a as drawList};
1
+ import{fillEl as e,h as t,icon as n,words as r}from"./ui-BXeMvUwo.js";const i=`.panel{position:fixed;right:24px;bottom:96px;width:320px;max-width:calc(100vw - 36px);max-height:calc(100vh - 120px);overflow:auto;padding:16px}.solo{bottom:24px}.panel .x{float:right}.panel>p{font-size:13px;line-height:18px;color:var(--ps-ink-muted);margin:-2px 0 12px}.rows{list-style:none;padding:0}.row{display:flex;align-items:center;gap:12px;width:100%;padding:10px;border-radius:var(--ps-radius-md);text-align:left}.ti{width:36px;height:36px;flex:none;border-radius:var(--ps-radius-md);display:grid;place-items:center;background:var(--ps-primary-soft);color:var(--ps-primary-ink)}.ti.spark{background:var(--ps-spark-soft);color:var(--ps-spark-ink)}.ti.mint{background:var(--ps-tag-mint);color:var(--ps-ink)}.ti svg{width:18px;height:18px}.rb{flex:1;min-width:0}.rt,.rm{display:block;font-weight:600}.rm{font-size:12px;line-height:16px;font-weight:500;color:var(--ps-ink-muted)}.prog{display:block;height:6px;border-radius:99px;background:var(--ps-surface-sunken);margin-top:6px;overflow:hidden}.prog i{display:block;height:100%;background:var(--ps-accent)}.rp{display:flex;align-items:center;gap:4px;font-size:12px;line-height:16px;font-weight:600;color:var(--ps-ink-muted)}.so{margin-top:8px}.new{height:24px;padding:0 10px;border-radius:99px;background:var(--ps-spark-soft);color:var(--ps-spark-ink);font-size:12px;line-height:24px;font-weight:600}.pb{display:flex;align-items:center;justify-content:center;gap:6px;margin-top:10px;font-size:12px;line-height:16px;font-weight:600;color:var(--ps-ink-muted);text-decoration:none}.panel.left{right:auto;left:24px}@media (max-width:480px){.panel{right:18px;bottom:86px}.solo{bottom:18px}.panel.left{left:18px}}`;function a(i,a,o){let s=i.config.launcher,c=r(i),l=i.engine.launcherGuides(),u=i.engine.progress.guides;a.className=`panel${s.position==`bottom-left`?` left`:``}${s.enabled?``:` solo`}`,a.setAttribute(`aria-label`,c(`guides`)),a.lang=i.config.lang,i.config.rtl&&(a.dir=`rtl`),e(a,t(`button`,{class:`x`,"aria-label":c(`close_guides`),onClick:o},n(`x`)),t(`h2`,null,s.title),t(`p`,null,s.description),t(`ul`,{class:`rows`},l.map(e=>{let r=u[e.id],a=e.steps.length,s=r?.status==`done`,l=r?.status==`running`;return t(`li`,null,t(`button`,{class:`row`,onClick:()=>{o(),r&&i.dispatch({type:`reset_progress`,guide:e.id}),i.dispatch({type:`start`,guide:e.id,source:`launcher`})}},t(`span`,{class:`ti${s?` mint`:r?``:` spark`}`},n(s?`check`:`ps-guide`)),t(`span`,{class:`rb`},t(`span`,{class:`rt`},e.name),t(`span`,{class:`rm`},s?c(`completed`):l?c(`step_of`,{n:r.step+1,total:a}):c(`n_steps`,{n:a})),l&&t(`span`,{class:`prog`,"aria-hidden":`true`},t(`i`,{style:{width:`${r.step/a*100}%`}}))),r?t(`span`,{class:`rp`},n(`rotate-ccw`),c(`replay`)):t(`span`,{class:`new`},c(`new`))))})),l.some(e=>u[e.id])&&t(`div`,{class:`acts so`},t(`button`,{class:`btn gho`,onClick:()=>{i.dispatch({type:`reset_progress`}),i.engine.active?o():a.focus()}},c(`start_over`))),i.config.flags?.show_badge!==!1&&t(`a`,{class:`pb`,href:`https://playstep.app/?ref=badge`,target:`_blank`,rel:`noopener`},t(`span`,{style:{display:`inline-flex`,width:`16px`,height:`16px`},ref:e=>e.innerHTML=`<svg viewBox="0 0 48 48" aria-hidden="true"><rect width="48" height="48" rx="13" fill="#2E5BFF"/><rect x="11" y="10" width="8" height="28" rx="4" fill="#fff"/><path d="M23.5 12v17l12-8.5z" fill="#FFC933" stroke="#FFC933" stroke-width="3.5" stroke-linejoin="round"/></svg>`}),`Powered by PlayStep`))}export{i as css,a as drawList};