sitetourkit 0.0.0-stage → 0.7.1
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/CHANGELOG.md +436 -0
- package/LICENSE +21 -0
- package/README.md +323 -2
- package/dist/compat-introjs.cjs +7 -0
- package/dist/compat-introjs.d.cts +118 -0
- package/dist/compat-introjs.d.ts +118 -0
- package/dist/compat-introjs.global.js +7 -0
- package/dist/compat-introjs.js +7 -0
- package/dist/hints.cjs +7 -0
- package/dist/hints.d.cts +131 -0
- package/dist/hints.d.ts +131 -0
- package/dist/hints.global.js +7 -0
- package/dist/hints.js +7 -0
- package/dist/index.cjs +7 -0
- package/dist/index.d.cts +613 -0
- package/dist/index.d.ts +613 -0
- package/dist/index.global.js +7 -0
- package/dist/index.js +7 -0
- package/dist/inject-styles.cjs +680 -0
- package/dist/inject-styles.d.cts +20 -0
- package/dist/inject-styles.d.ts +20 -0
- package/dist/inject-styles.js +680 -0
- package/dist/locales.cjs +7 -0
- package/dist/locales.d.cts +28 -0
- package/dist/locales.d.ts +28 -0
- package/dist/locales.global.js +7 -0
- package/dist/locales.js +7 -0
- package/dist/styles.css +673 -0
- package/dist/types-M-1II5wP.d.cts +257 -0
- package/dist/types-M-1II5wP.d.ts +257 -0
- package/package.json +195 -4
|
@@ -0,0 +1,680 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* TourKit v0.7.1 | MIT License
|
|
3
|
+
* Dependency-free product tours. Independently implemented; contains no
|
|
4
|
+
* Intro.js source code. Not affiliated with Intro.js.
|
|
5
|
+
*/
|
|
6
|
+
"use strict";var s=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var h=(e,n)=>{for(var o in n)s(e,o,{get:n[o],enumerable:!0})},k=(e,n,o,i)=>{if(n&&typeof n=="object"||typeof n=="function")for(let t of c(n))!d.call(e,t)&&t!==o&&s(e,t,{get:()=>n[t],enumerable:!(i=p(n,t))||i.enumerable});return e};var g=e=>k(s({},"__esModule",{value:!0}),e);var b={};h(b,{css:()=>r,injectStyles:()=>u});module.exports=g(b);var r=`/*!
|
|
7
|
+
* TourKit | MIT License
|
|
8
|
+
* BEM blocks, themable via CSS custom properties.
|
|
9
|
+
*
|
|
10
|
+
* Default look: light surface with a teal accent (matches light host pages).
|
|
11
|
+
* A dark graphite variant is available via \`theme: "dark"\`; \`theme: "auto"\`
|
|
12
|
+
* follows prefers-color-scheme.
|
|
13
|
+
*
|
|
14
|
+
* The version is intentionally absent here: scripts/copy-styles.mjs stamps it
|
|
15
|
+
* into dist/styles.css at build time. Keeping the source free of it means the
|
|
16
|
+
* committed css.generated.ts (embedded for \`sitetourkit/inject-styles\`) never
|
|
17
|
+
* drifts when the package version is bumped.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
.tk-root {
|
|
21
|
+
--tk-z: 99999;
|
|
22
|
+
--tk-overlay-color: #05070a;
|
|
23
|
+
--tk-overlay-opacity: 0.5;
|
|
24
|
+
--tk-radius: 14px;
|
|
25
|
+
|
|
26
|
+
/* Surface & text (default: light \u2014 matches light host pages).
|
|
27
|
+
Contrast: muted \u2265 4.5:1 on white, white on accent \u2265 4.5:1 (axe serious). */
|
|
28
|
+
--tk-surface: #ffffff;
|
|
29
|
+
--tk-text: #181b20;
|
|
30
|
+
--tk-text-secondary: #454b55;
|
|
31
|
+
--tk-text-muted: #5d6673;
|
|
32
|
+
--tk-border: rgb(24 27 32 / 0.1);
|
|
33
|
+
--tk-bullet: rgb(24 27 32 / 0.18);
|
|
34
|
+
--tk-shadow:
|
|
35
|
+
0 0 0 1px rgb(24 27 32 / 0.06), 0 16px 40px rgb(24 27 32 / 0.16),
|
|
36
|
+
0 4px 12px rgb(24 27 32 / 0.08);
|
|
37
|
+
|
|
38
|
+
/* Accent: teal \u2014 intentionally not the generic "AI purple/blue" */
|
|
39
|
+
--tk-accent: #0f766e;
|
|
40
|
+
--tk-accent-hover: #115e59;
|
|
41
|
+
--tk-accent-contrast: #ffffff;
|
|
42
|
+
--tk-glow: rgb(15 118 110 / 0.3);
|
|
43
|
+
|
|
44
|
+
/* Spotlight ring: transparent in the light theme (clean look);
|
|
45
|
+
the dark theme brightens it for a stronger highlight. */
|
|
46
|
+
--tk-spotlight-ring: transparent;
|
|
47
|
+
--tk-spotlight-ring-width: 0;
|
|
48
|
+
--tk-spotlight-glow: transparent;
|
|
49
|
+
|
|
50
|
+
--tk-font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
|
|
51
|
+
--tk-tooltip-max-width: 360px;
|
|
52
|
+
--tk-transition: 180ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
53
|
+
|
|
54
|
+
position: fixed;
|
|
55
|
+
inset: 0;
|
|
56
|
+
z-index: var(--tk-z);
|
|
57
|
+
pointer-events: none;
|
|
58
|
+
opacity: 0;
|
|
59
|
+
transition: opacity var(--tk-transition);
|
|
60
|
+
font-family: var(--tk-font);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.tk-root,
|
|
64
|
+
.tk-root * {
|
|
65
|
+
box-sizing: border-box;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.tk-root--visible {
|
|
69
|
+
opacity: 1;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/* Dark variant (graphite + teal): for dark host pages \u2014 \`theme: "dark"\`.
|
|
73
|
+
\`theme: "light"\` needs no rules: light is the default.
|
|
74
|
+
Keep in sync with the \`theme: "auto"\` dark half below. */
|
|
75
|
+
.tk-root[data-tk-theme="dark"] {
|
|
76
|
+
--tk-surface: #15171c;
|
|
77
|
+
--tk-text: #f4f6f9;
|
|
78
|
+
--tk-text-secondary: #c3cad6;
|
|
79
|
+
--tk-text-muted: #8f98a6;
|
|
80
|
+
--tk-border: rgb(255 255 255 / 0.1);
|
|
81
|
+
--tk-bullet: rgb(255 255 255 / 0.24);
|
|
82
|
+
--tk-shadow:
|
|
83
|
+
0 0 0 1px rgb(255 255 255 / 0.07), 0 16px 40px rgb(0 0 0 / 0.45), 0 4px 12px rgb(0 0 0 / 0.35);
|
|
84
|
+
--tk-accent: #2dd4bf;
|
|
85
|
+
--tk-accent-hover: #5eead4;
|
|
86
|
+
--tk-accent-contrast: #06231f;
|
|
87
|
+
--tk-glow: rgb(45 212 191 / 0.45);
|
|
88
|
+
|
|
89
|
+
/* Stronger dimming + a bright glowing ring around the highlighted element */
|
|
90
|
+
--tk-overlay-opacity: 0.68;
|
|
91
|
+
--tk-spotlight-ring: rgb(94 234 212 / 0.9);
|
|
92
|
+
--tk-spotlight-ring-width: 2px;
|
|
93
|
+
--tk-spotlight-glow: rgb(45 212 191 / 0.55);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/* Auto theme: follows the OS preference (light stays the default look). */
|
|
97
|
+
@media (prefers-color-scheme: dark) {
|
|
98
|
+
.tk-root[data-tk-theme="auto"] {
|
|
99
|
+
--tk-surface: #15171c;
|
|
100
|
+
--tk-text: #f4f6f9;
|
|
101
|
+
--tk-text-secondary: #c3cad6;
|
|
102
|
+
--tk-text-muted: #8f98a6;
|
|
103
|
+
--tk-border: rgb(255 255 255 / 0.1);
|
|
104
|
+
--tk-bullet: rgb(255 255 255 / 0.24);
|
|
105
|
+
--tk-shadow:
|
|
106
|
+
0 0 0 1px rgb(255 255 255 / 0.07), 0 16px 40px rgb(0 0 0 / 0.45), 0 4px 12px rgb(0 0 0 / 0.35);
|
|
107
|
+
--tk-accent: #2dd4bf;
|
|
108
|
+
--tk-accent-hover: #5eead4;
|
|
109
|
+
--tk-accent-contrast: #06231f;
|
|
110
|
+
--tk-glow: rgb(45 212 191 / 0.45);
|
|
111
|
+
|
|
112
|
+
--tk-overlay-opacity: 0.68;
|
|
113
|
+
--tk-spotlight-ring: rgb(94 234 212 / 0.9);
|
|
114
|
+
--tk-spotlight-ring-width: 2px;
|
|
115
|
+
--tk-spotlight-glow: rgb(45 212 191 / 0.55);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/* ---------------------------------- Overlay -------------------------------- */
|
|
120
|
+
|
|
121
|
+
.tk-overlay {
|
|
122
|
+
position: absolute;
|
|
123
|
+
inset: 0;
|
|
124
|
+
width: 100%;
|
|
125
|
+
height: 100%;
|
|
126
|
+
pointer-events: none;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/* Only the painted (dimmed) area receives clicks; the cutout lets events through. */
|
|
130
|
+
.tk-overlay__path {
|
|
131
|
+
pointer-events: auto;
|
|
132
|
+
fill: var(--tk-overlay-color);
|
|
133
|
+
fill-opacity: var(--tk-overlay-opacity);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/* Themable outline of the spotlight cutouts (bright in the dark theme). */
|
|
137
|
+
.tk-overlay__ring {
|
|
138
|
+
pointer-events: none;
|
|
139
|
+
fill: none;
|
|
140
|
+
stroke: var(--tk-spotlight-ring);
|
|
141
|
+
stroke-width: var(--tk-spotlight-ring-width);
|
|
142
|
+
filter: drop-shadow(0 0 6px var(--tk-spotlight-glow));
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.tk-interaction-guard {
|
|
146
|
+
position: fixed;
|
|
147
|
+
pointer-events: auto;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/* ---------------------------------- Tooltip -------------------------------- */
|
|
151
|
+
|
|
152
|
+
.tk-tooltip {
|
|
153
|
+
position: fixed;
|
|
154
|
+
pointer-events: auto;
|
|
155
|
+
/* Never wider than the viewport minus the solver's 8px side padding \u2014
|
|
156
|
+
keeps narrow phones (320-390px) from overflowing. */
|
|
157
|
+
max-width: min(var(--tk-tooltip-max-width), calc(100vw - 16px));
|
|
158
|
+
min-width: min(260px, calc(100vw - 16px));
|
|
159
|
+
/* Same guarantee vertically: a long step on a short viewport must never
|
|
160
|
+
push its header (title + close) off screen. The content area scrolls
|
|
161
|
+
instead \u2014 see .tk-tooltip__content. */
|
|
162
|
+
max-height: calc(100dvh - 16px);
|
|
163
|
+
background: var(--tk-surface);
|
|
164
|
+
color: var(--tk-text);
|
|
165
|
+
border-radius: var(--tk-radius);
|
|
166
|
+
box-shadow: var(--tk-shadow);
|
|
167
|
+
outline: none;
|
|
168
|
+
font-size: 14px;
|
|
169
|
+
line-height: 1.55;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.tk-tooltip__arrow {
|
|
173
|
+
position: absolute;
|
|
174
|
+
width: 14px;
|
|
175
|
+
height: 14px;
|
|
176
|
+
background: var(--tk-surface);
|
|
177
|
+
transform: rotate(45deg);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/* The side names where the tooltip sits relative to the target,
|
|
181
|
+
so the arrow attaches to the opposite edge of the tooltip. */
|
|
182
|
+
.tk-tooltip__arrow[data-side="bottom"] {
|
|
183
|
+
top: -7px;
|
|
184
|
+
}
|
|
185
|
+
.tk-tooltip__arrow[data-side="top"] {
|
|
186
|
+
bottom: -7px;
|
|
187
|
+
}
|
|
188
|
+
.tk-tooltip__arrow[data-side="right"] {
|
|
189
|
+
left: -7px;
|
|
190
|
+
}
|
|
191
|
+
.tk-tooltip__arrow[data-side="left"] {
|
|
192
|
+
right: -7px;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/* Column layout so the content can shrink while header, meta row and footer
|
|
196
|
+
keep their intrinsic height. \`overflow\` stays on the content: the arrow is
|
|
197
|
+
an absolutely positioned sibling that sticks out of the tooltip box and
|
|
198
|
+
would be clipped by a scroll container on .tk-tooltip itself. */
|
|
199
|
+
.tk-tooltip__body {
|
|
200
|
+
position: relative;
|
|
201
|
+
display: flex;
|
|
202
|
+
flex-direction: column;
|
|
203
|
+
max-height: inherit;
|
|
204
|
+
border-radius: inherit;
|
|
205
|
+
background: inherit;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/* Everything except the content keeps its intrinsic height when the tooltip
|
|
209
|
+
hits its max-height \u2014 only the content scrolls. */
|
|
210
|
+
.tk-tooltip__header,
|
|
211
|
+
.tk-tooltip__once,
|
|
212
|
+
.tk-tooltip__step-number,
|
|
213
|
+
.tk-tooltip__progress,
|
|
214
|
+
.tk-tooltip__footer {
|
|
215
|
+
flex-shrink: 0;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.tk-tooltip__header {
|
|
219
|
+
display: flex;
|
|
220
|
+
align-items: flex-start;
|
|
221
|
+
gap: 10px;
|
|
222
|
+
padding: 16px 18px 0;
|
|
223
|
+
min-height: 22px;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.tk-tooltip__title {
|
|
227
|
+
flex: 1;
|
|
228
|
+
margin: 0;
|
|
229
|
+
font-size: 15px;
|
|
230
|
+
font-weight: 600;
|
|
231
|
+
letter-spacing: -0.01em;
|
|
232
|
+
line-height: 1.4;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.tk-tooltip__close {
|
|
236
|
+
flex-shrink: 0;
|
|
237
|
+
margin-inline-start: auto;
|
|
238
|
+
width: 28px;
|
|
239
|
+
height: 28px;
|
|
240
|
+
margin-top: -5px;
|
|
241
|
+
margin-inline-end: -9px;
|
|
242
|
+
border: none;
|
|
243
|
+
background: transparent;
|
|
244
|
+
color: var(--tk-text-muted);
|
|
245
|
+
font-size: 19px;
|
|
246
|
+
line-height: 1;
|
|
247
|
+
border-radius: 8px;
|
|
248
|
+
cursor: pointer;
|
|
249
|
+
transition:
|
|
250
|
+
background-color var(--tk-transition),
|
|
251
|
+
color var(--tk-transition);
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
.tk-tooltip__close:hover {
|
|
255
|
+
color: var(--tk-text);
|
|
256
|
+
background: rgb(128 128 128 / 0.16);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
.tk-tooltip__close:focus-visible {
|
|
260
|
+
outline: 2px solid var(--tk-accent);
|
|
261
|
+
outline-offset: 1px;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.tk-tooltip__content {
|
|
265
|
+
flex: 1 1 auto;
|
|
266
|
+
min-height: 0;
|
|
267
|
+
overflow-y: auto;
|
|
268
|
+
overscroll-behavior: contain;
|
|
269
|
+
padding: 8px 18px 16px;
|
|
270
|
+
color: var(--tk-text-secondary);
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
.tk-tooltip__header:has(+ .tk-tooltip__content:empty) {
|
|
274
|
+
padding-bottom: 16px;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
.tk-tooltip__once {
|
|
278
|
+
display: flex;
|
|
279
|
+
align-items: center;
|
|
280
|
+
gap: 8px;
|
|
281
|
+
padding: 0 18px 12px;
|
|
282
|
+
font-size: 12.5px;
|
|
283
|
+
color: var(--tk-text-muted);
|
|
284
|
+
cursor: pointer;
|
|
285
|
+
user-select: none;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.tk-tooltip__once:hover {
|
|
289
|
+
color: var(--tk-text-secondary);
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
.tk-tooltip__once-box {
|
|
293
|
+
width: 14px;
|
|
294
|
+
height: 14px;
|
|
295
|
+
margin: 0;
|
|
296
|
+
cursor: pointer;
|
|
297
|
+
accent-color: var(--tk-accent);
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
.tk-tooltip__step-number {
|
|
301
|
+
padding: 0 18px 8px;
|
|
302
|
+
font-size: 11px;
|
|
303
|
+
font-weight: 500;
|
|
304
|
+
letter-spacing: 0.06em;
|
|
305
|
+
text-transform: uppercase;
|
|
306
|
+
color: var(--tk-text-muted);
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
/* Segmented progress: one segment per step. Completed segments are dimmed
|
|
310
|
+
accent, the current one is a glowing gradient that sweeps in \u2014 reads as
|
|
311
|
+
discrete steps rather than an intro.js-style continuous bar. */
|
|
312
|
+
.tk-tooltip__progress {
|
|
313
|
+
display: flex;
|
|
314
|
+
gap: 3px;
|
|
315
|
+
margin: 0 18px 12px;
|
|
316
|
+
height: 4px;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
.tk-tooltip__progress-seg {
|
|
320
|
+
flex: 1;
|
|
321
|
+
height: 100%;
|
|
322
|
+
border-radius: 999px;
|
|
323
|
+
background: var(--tk-bullet);
|
|
324
|
+
transition:
|
|
325
|
+
background-color var(--tk-transition),
|
|
326
|
+
opacity var(--tk-transition);
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
.tk-tooltip__progress-seg--done {
|
|
330
|
+
background: var(--tk-accent);
|
|
331
|
+
opacity: 0.45;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
.tk-tooltip__progress-seg--current {
|
|
335
|
+
background: linear-gradient(90deg, var(--tk-accent), var(--tk-accent-hover));
|
|
336
|
+
box-shadow: 0 0 10px var(--tk-glow);
|
|
337
|
+
transform-origin: left;
|
|
338
|
+
animation:
|
|
339
|
+
tk-seg-fill 280ms cubic-bezier(0.4, 0, 0.2, 1),
|
|
340
|
+
tk-seg-glow 2.2s ease-in-out 280ms infinite alternate;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
@keyframes tk-seg-fill {
|
|
344
|
+
from {
|
|
345
|
+
transform: scaleX(0.25);
|
|
346
|
+
opacity: 0.4;
|
|
347
|
+
}
|
|
348
|
+
to {
|
|
349
|
+
transform: scaleX(1);
|
|
350
|
+
opacity: 1;
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
@keyframes tk-seg-glow {
|
|
355
|
+
from {
|
|
356
|
+
box-shadow: 0 0 4px var(--tk-glow);
|
|
357
|
+
}
|
|
358
|
+
to {
|
|
359
|
+
box-shadow: 0 0 12px var(--tk-glow);
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
.tk-tooltip__footer {
|
|
364
|
+
display: flex;
|
|
365
|
+
align-items: center;
|
|
366
|
+
justify-content: space-between;
|
|
367
|
+
gap: 10px 12px;
|
|
368
|
+
/* Narrow screens: bullets and action buttons stack instead of squeezing. */
|
|
369
|
+
flex-wrap: wrap;
|
|
370
|
+
padding: 12px 18px 14px;
|
|
371
|
+
border-top: 1px solid var(--tk-border);
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
/* ------------------------------ Bullets (crumbs) --------------------------- */
|
|
375
|
+
|
|
376
|
+
.tk-tooltip__bullets {
|
|
377
|
+
display: flex;
|
|
378
|
+
align-items: center;
|
|
379
|
+
gap: 8px;
|
|
380
|
+
flex-wrap: wrap;
|
|
381
|
+
min-height: 26px;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
.tk-tooltip__bullet {
|
|
385
|
+
position: relative;
|
|
386
|
+
width: 10px;
|
|
387
|
+
height: 10px;
|
|
388
|
+
padding: 0;
|
|
389
|
+
border: none;
|
|
390
|
+
border-radius: 999px;
|
|
391
|
+
background: var(--tk-bullet);
|
|
392
|
+
color: transparent;
|
|
393
|
+
font: inherit;
|
|
394
|
+
font-size: 0;
|
|
395
|
+
cursor: pointer;
|
|
396
|
+
transition:
|
|
397
|
+
width var(--tk-transition),
|
|
398
|
+
height var(--tk-transition),
|
|
399
|
+
background-color var(--tk-transition),
|
|
400
|
+
color var(--tk-transition),
|
|
401
|
+
font-size var(--tk-transition);
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
/* Invisible padding extends the hit target of small dots to ~24px. */
|
|
405
|
+
.tk-tooltip__bullet::after {
|
|
406
|
+
content: "";
|
|
407
|
+
position: absolute;
|
|
408
|
+
inset: -7px;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
.tk-tooltip__bullet:hover {
|
|
412
|
+
background: var(--tk-text-muted);
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
/* Active crumb: a large circle with the step number inside. */
|
|
416
|
+
.tk-tooltip__bullet--active {
|
|
417
|
+
width: 26px;
|
|
418
|
+
height: 26px;
|
|
419
|
+
display: grid;
|
|
420
|
+
place-items: center;
|
|
421
|
+
background: var(--tk-accent);
|
|
422
|
+
color: var(--tk-accent-contrast);
|
|
423
|
+
font-size: 12px;
|
|
424
|
+
font-weight: 700;
|
|
425
|
+
cursor: default;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
.tk-tooltip__bullet--active:hover {
|
|
429
|
+
background: var(--tk-accent);
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
.tk-tooltip__bullet:focus-visible {
|
|
433
|
+
outline: 2px solid var(--tk-accent);
|
|
434
|
+
outline-offset: 2px;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
/* ---------------------------------- Buttons -------------------------------- */
|
|
438
|
+
|
|
439
|
+
.tk-tooltip__actions {
|
|
440
|
+
display: flex;
|
|
441
|
+
gap: 8px;
|
|
442
|
+
margin-inline-start: auto;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
.tk-button {
|
|
446
|
+
padding: 7px 14px;
|
|
447
|
+
border-radius: 9px;
|
|
448
|
+
border: 1px solid transparent;
|
|
449
|
+
font: inherit;
|
|
450
|
+
font-size: 13px;
|
|
451
|
+
font-weight: 600;
|
|
452
|
+
letter-spacing: 0.01em;
|
|
453
|
+
cursor: pointer;
|
|
454
|
+
transition:
|
|
455
|
+
background-color var(--tk-transition),
|
|
456
|
+
border-color var(--tk-transition);
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
.tk-button:focus-visible {
|
|
460
|
+
outline: 2px solid var(--tk-accent);
|
|
461
|
+
outline-offset: 1px;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
.tk-button--primary {
|
|
465
|
+
background: var(--tk-accent);
|
|
466
|
+
color: var(--tk-accent-contrast);
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
.tk-button--primary:hover:not([disabled]) {
|
|
470
|
+
background: var(--tk-accent-hover);
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
.tk-button--ghost {
|
|
474
|
+
background: transparent;
|
|
475
|
+
border-color: var(--tk-border);
|
|
476
|
+
color: var(--tk-text);
|
|
477
|
+
font-weight: 500;
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
.tk-button--ghost:hover:not([disabled]) {
|
|
481
|
+
background: rgb(128 128 128 / 0.12);
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
.tk-button[disabled] {
|
|
485
|
+
opacity: 0.4;
|
|
486
|
+
cursor: default;
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
/* ----------------------------------- Hints --------------------------------- */
|
|
490
|
+
|
|
491
|
+
.tk-hint {
|
|
492
|
+
position: fixed;
|
|
493
|
+
pointer-events: auto;
|
|
494
|
+
width: 18px;
|
|
495
|
+
height: 18px;
|
|
496
|
+
padding: 0;
|
|
497
|
+
border: none;
|
|
498
|
+
border-radius: 999px;
|
|
499
|
+
background: var(--tk-accent);
|
|
500
|
+
box-shadow: 0 0 0 3px var(--tk-glow);
|
|
501
|
+
cursor: pointer;
|
|
502
|
+
transform: translate(-50%, -50%);
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
.tk-hint__pulse {
|
|
506
|
+
position: absolute;
|
|
507
|
+
inset: 0;
|
|
508
|
+
border-radius: inherit;
|
|
509
|
+
background: inherit;
|
|
510
|
+
opacity: 0.5;
|
|
511
|
+
animation: tk-hint-ping 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
|
|
512
|
+
pointer-events: none;
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
@keyframes tk-hint-ping {
|
|
516
|
+
from {
|
|
517
|
+
transform: scale(1);
|
|
518
|
+
opacity: 0.5;
|
|
519
|
+
}
|
|
520
|
+
to {
|
|
521
|
+
transform: scale(2.2);
|
|
522
|
+
opacity: 0;
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
.tk-hint--hidden {
|
|
527
|
+
display: none;
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
.tk-hint:focus-visible {
|
|
531
|
+
outline: 2px solid var(--tk-accent);
|
|
532
|
+
outline-offset: 3px;
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
/* Invisible padding: expands the 18px marker to a ~38px hit target. */
|
|
536
|
+
.tk-hint::after {
|
|
537
|
+
content: "";
|
|
538
|
+
position: absolute;
|
|
539
|
+
inset: -10px;
|
|
540
|
+
border-radius: inherit;
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
.tk-hint-popover {
|
|
544
|
+
position: fixed;
|
|
545
|
+
pointer-events: auto;
|
|
546
|
+
max-width: 300px;
|
|
547
|
+
min-width: 200px;
|
|
548
|
+
padding: 12px 14px;
|
|
549
|
+
background: var(--tk-surface);
|
|
550
|
+
color: var(--tk-text-secondary);
|
|
551
|
+
border-radius: var(--tk-radius);
|
|
552
|
+
box-shadow: var(--tk-shadow);
|
|
553
|
+
font-size: 13.5px;
|
|
554
|
+
line-height: 1.5;
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
.tk-hint-popover__button {
|
|
558
|
+
margin-top: 10px;
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
/* --------------------------------- Live region ----------------------------- */
|
|
562
|
+
|
|
563
|
+
.tk-live {
|
|
564
|
+
position: absolute;
|
|
565
|
+
width: 1px;
|
|
566
|
+
height: 1px;
|
|
567
|
+
margin: -1px;
|
|
568
|
+
padding: 0;
|
|
569
|
+
overflow: hidden;
|
|
570
|
+
clip: rect(0 0 0 0);
|
|
571
|
+
clip-path: inset(50%);
|
|
572
|
+
white-space: nowrap;
|
|
573
|
+
border: 0;
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
/* ------------------------------ Touch ergonomics --------------------------- */
|
|
577
|
+
|
|
578
|
+
@media (pointer: coarse) {
|
|
579
|
+
.tk-button {
|
|
580
|
+
padding: 10px 16px;
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
.tk-tooltip__close {
|
|
584
|
+
width: 36px;
|
|
585
|
+
height: 36px;
|
|
586
|
+
margin-top: -8px;
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
.tk-tooltip__bullet::after {
|
|
590
|
+
inset: -9px;
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
.tk-hint {
|
|
594
|
+
width: 22px;
|
|
595
|
+
height: 22px;
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
/* ------------------- Forced colors (Windows High Contrast) ----------------- */
|
|
600
|
+
|
|
601
|
+
@media (forced-colors: active) {
|
|
602
|
+
/* box-shadow is stripped in forced-colors mode \u2014 borders take over. */
|
|
603
|
+
.tk-tooltip,
|
|
604
|
+
.tk-hint-popover {
|
|
605
|
+
border: 1px solid CanvasText;
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
/* The arrow is a borderless rotated square; without its shadow it degrades
|
|
609
|
+
into a floating blob. The spotlight ring keeps pointing at the target. */
|
|
610
|
+
.tk-tooltip__arrow {
|
|
611
|
+
display: none;
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
/* Keep the dimming translucent: forced fills are opaque, but fill-opacity
|
|
615
|
+
is not on the forced list \u2014 an explicit pair preserves the see-through
|
|
616
|
+
scrim in both HC palettes. */
|
|
617
|
+
.tk-overlay__path {
|
|
618
|
+
forced-color-adjust: none;
|
|
619
|
+
fill: CanvasText;
|
|
620
|
+
fill-opacity: 0.4;
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
.tk-overlay__ring {
|
|
624
|
+
forced-color-adjust: none;
|
|
625
|
+
stroke: Highlight;
|
|
626
|
+
stroke-width: 3px;
|
|
627
|
+
filter: none;
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
.tk-button {
|
|
631
|
+
border: 1px solid ButtonText;
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
/* Color-only state indicators get explicit system colors. */
|
|
635
|
+
.tk-tooltip__bullet,
|
|
636
|
+
.tk-tooltip__progress-seg {
|
|
637
|
+
forced-color-adjust: none;
|
|
638
|
+
background: ButtonFace;
|
|
639
|
+
border: 1px solid ButtonText;
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
.tk-tooltip__bullet--active,
|
|
643
|
+
.tk-tooltip__progress-seg--done,
|
|
644
|
+
.tk-tooltip__progress-seg--current {
|
|
645
|
+
background: Highlight;
|
|
646
|
+
color: HighlightText;
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
.tk-tooltip__progress-seg--current {
|
|
650
|
+
box-shadow: none;
|
|
651
|
+
animation: none;
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
.tk-hint {
|
|
655
|
+
border: 2px solid ButtonText;
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
.tk-hint__pulse {
|
|
659
|
+
display: none;
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
/* ------------------------------- Reduced motion ---------------------------- */
|
|
664
|
+
|
|
665
|
+
@media (prefers-reduced-motion: reduce) {
|
|
666
|
+
.tk-root,
|
|
667
|
+
.tk-tooltip__progress-seg,
|
|
668
|
+
.tk-tooltip__bullet,
|
|
669
|
+
.tk-tooltip__close,
|
|
670
|
+
.tk-button {
|
|
671
|
+
transition: none;
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
.tk-tooltip__progress-seg--current,
|
|
675
|
+
.tk-hint__pulse {
|
|
676
|
+
animation: none;
|
|
677
|
+
}
|
|
678
|
+
}
|
|
679
|
+
`;var a=new WeakMap;function u(e={}){if(typeof document>"u")return()=>{};let n=e.target??document,o=a.get(n);if(o)return o;let i;if(x(n)){let t=new CSSStyleSheet;t.replaceSync(r),n.adoptedStyleSheets=[...n.adoptedStyleSheets,t],i=()=>{n.adoptedStyleSheets=n.adoptedStyleSheets.filter(l=>l!==t),a.delete(n)}}else{let t=document.createElement("style");t.setAttribute("data-tk-styles",""),e.nonce&&(t.nonce=e.nonce),t.textContent=r,(n instanceof Document?n.head:n).append(t),i=()=>{t.remove(),a.delete(n)}}return a.set(n,i),i}function x(e){return typeof CSSStyleSheet<"u"&&typeof CSSStyleSheet.prototype.replaceSync=="function"&&"adoptedStyleSheets"in e}0&&(module.exports={css,injectStyles});
|
|
680
|
+
//# sourceMappingURL=inject-styles.cjs.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
declare const css: string;
|
|
2
|
+
|
|
3
|
+
interface InjectStylesOptions {
|
|
4
|
+
/**
|
|
5
|
+
* CSP nonce for the `<style>` fallback. Not needed when constructable
|
|
6
|
+
* stylesheets are supported: `adoptedStyleSheets` bypass style-src.
|
|
7
|
+
*/
|
|
8
|
+
nonce?: string;
|
|
9
|
+
/** Where to inject: the document (default) or a shadow root. */
|
|
10
|
+
target?: Document | ShadowRoot;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Injects the TourKit stylesheet without a separate CSS file — the CSP-safe
|
|
14
|
+
* alternative to linking `sitetourkit/styles.css` (spec §7): constructable
|
|
15
|
+
* stylesheets when available, otherwise a `<style>` element that honors the
|
|
16
|
+
* provided nonce. Idempotent per target; returns a cleanup function.
|
|
17
|
+
*/
|
|
18
|
+
declare function injectStyles(options?: InjectStylesOptions): () => void;
|
|
19
|
+
|
|
20
|
+
export { type InjectStylesOptions, css, injectStyles };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
declare const css: string;
|
|
2
|
+
|
|
3
|
+
interface InjectStylesOptions {
|
|
4
|
+
/**
|
|
5
|
+
* CSP nonce for the `<style>` fallback. Not needed when constructable
|
|
6
|
+
* stylesheets are supported: `adoptedStyleSheets` bypass style-src.
|
|
7
|
+
*/
|
|
8
|
+
nonce?: string;
|
|
9
|
+
/** Where to inject: the document (default) or a shadow root. */
|
|
10
|
+
target?: Document | ShadowRoot;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Injects the TourKit stylesheet without a separate CSS file — the CSP-safe
|
|
14
|
+
* alternative to linking `sitetourkit/styles.css` (spec §7): constructable
|
|
15
|
+
* stylesheets when available, otherwise a `<style>` element that honors the
|
|
16
|
+
* provided nonce. Idempotent per target; returns a cleanup function.
|
|
17
|
+
*/
|
|
18
|
+
declare function injectStyles(options?: InjectStylesOptions): () => void;
|
|
19
|
+
|
|
20
|
+
export { type InjectStylesOptions, css, injectStyles };
|