@marianmeres/stuic 3.44.1 → 3.45.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.
@@ -92,6 +92,10 @@ export interface TourOptions {
92
92
  storageKey?: string;
93
93
  /** Storage backend for persistence. Default: 'local' */
94
94
  storage?: "local" | "session";
95
+ /** Added to the current step index for display purposes. Default: 0 */
96
+ indexOffset?: number;
97
+ /** Overrides steps.length for display purposes (the `total` value passed to the shell) */
98
+ totalSteps?: number;
95
99
  }
96
100
  /**
97
101
  * Creates a multi-step onboarding tour on top of the spotlight primitive.
@@ -87,15 +87,16 @@ export function createTour(options) {
87
87
  function _getShellContent(id) {
88
88
  const step = options.steps.find((s) => s.id === id);
89
89
  const index = options.steps.indexOf(step);
90
- const total = options.steps.length;
90
+ const displayIndex = index + (options.indexOffset ?? 0);
91
+ const displayTotal = options.totalSteps ?? options.steps.length;
91
92
  return {
92
93
  component: OnboardingShell,
93
94
  props: {
94
95
  step,
95
- index,
96
- total,
96
+ index: displayIndex,
97
+ total: displayTotal,
97
98
  isFirst: index === 0,
98
- isLast: index === total - 1,
99
+ isLast: displayIndex === displayTotal - 1,
99
100
  labels: resolvedLabels,
100
101
  shell: options.shell,
101
102
  next,
@@ -147,6 +147,7 @@
147
147
  /* Layout */
148
148
  min-width: var(--stuic-dropdown-menu-min-width);
149
149
  overflow-y: auto;
150
+ scrollbar-gutter: stable;
150
151
  scrollbar-width: thin;
151
152
 
152
153
  /* Stacking */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marianmeres/stuic",
3
- "version": "3.44.1",
3
+ "version": "3.45.1",
4
4
  "files": [
5
5
  "dist",
6
6
  "!dist/**/*.test.*",
@@ -39,7 +39,7 @@
39
39
  "svelte": "^5.0.0"
40
40
  },
41
41
  "devDependencies": {
42
- "@eslint/js": "^9.39.3",
42
+ "@eslint/js": "^9.39.4",
43
43
  "@marianmeres/random-human-readable": "^1.6.1",
44
44
  "@sveltejs/adapter-auto": "^4.0.0",
45
45
  "@sveltejs/kit": "^2.53.4",
@@ -49,19 +49,19 @@
49
49
  "@tailwindcss/forms": "^0.5.11",
50
50
  "@tailwindcss/typography": "^0.5.19",
51
51
  "@tailwindcss/vite": "^4.2.1",
52
- "@types/node": "^25.3.3",
52
+ "@types/node": "^25.4.0",
53
53
  "dotenv": "^16.6.1",
54
- "eslint": "^9.39.3",
54
+ "eslint": "^9.39.4",
55
55
  "globals": "^16.5.0",
56
56
  "prettier": "^3.8.1",
57
57
  "prettier-plugin-svelte": "^3.5.1",
58
58
  "publint": "^0.3.18",
59
- "svelte": "^5.53.7",
60
- "svelte-check": "^4.4.4",
59
+ "svelte": "^5.53.8",
60
+ "svelte-check": "^4.4.5",
61
61
  "tailwindcss": "^4.2.1",
62
62
  "tsx": "^4.21.0",
63
63
  "typescript": "^5.9.3",
64
- "typescript-eslint": "^8.56.1",
64
+ "typescript-eslint": "^8.57.0",
65
65
  "vite": "^7.3.1",
66
66
  "vitest": "^3.2.4"
67
67
  },
@@ -73,7 +73,7 @@
73
73
  "@marianmeres/parse-boolean": "^2.0.5",
74
74
  "@marianmeres/ticker": "^1.16.5",
75
75
  "esm-env": "^1.2.2",
76
- "libphonenumber-js": "^1.12.38",
76
+ "libphonenumber-js": "^1.12.39",
77
77
  "runed": "^0.23.4",
78
78
  "tailwind-merge": "^3.5.0"
79
79
  },