@molecule/app-stage-timeline-svelte 0.0.1-stage → 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.
Files changed (2) hide show
  1. package/README.md +163 -4
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -1,11 +1,170 @@
1
+ <!--
2
+ AUTO-GENERATED — DO NOT EDIT THIS FILE.
3
+ Generated by `mlcl sync-docs` from the package's src/index.ts JSDoc + mlcl/registry.json.
4
+ Edits here are overwritten on the next commit (molecule's pre-commit hook regenerates).
5
+ To change this document, edit the module-level JSDoc in src/index.ts.
6
+ Generated: 2026-11-21T12:47:25.968Z
7
+ -->
8
+
1
9
  # @molecule/app-stage-timeline-svelte
2
10
 
3
- Multi-stage horizontal progress timeline with current marker — onboarding, applicant tracking, kanban status flow
11
+ Svelte multi-stage horizontal progress timeline with a current-stage marker.
12
+ Used by employee-onboarding, applicant-tracking, kanban-board status
13
+ flows, and order-fulfillment progress trackers.
14
+
15
+ Exports `StageTimeline` and `statusOf` — the Svelte counterpart of
16
+ `@molecule/app-stage-timeline-react`, with the same props (React names) and
17
+ the same DOM for the same input.
18
+
19
+ > **Auto-generated, AI-first package reference** for the [molecule.dev](https://molecule.dev) ecosystem.
20
+ > It is written to be read by coding agents as much as by people, and is generated from this
21
+ > package's source — edit `src/index.ts` JSDoc, not this file.
22
+
23
+ ## Quick Start
24
+
25
+ ```svelte
26
+ <script lang="ts">
27
+ import { StageTimeline } from '@molecule/app-stage-timeline-svelte'
28
+
29
+ const stages = [
30
+ { id: 'applied', label: 'Applied' },
31
+ { id: 'screen', label: 'Phone Screen' },
32
+ { id: 'onsite', label: 'On-site' },
33
+ { id: 'offer', label: 'Offer' },
34
+ ]
35
+ </script>
36
+
37
+ <StageTimeline currentIndex={2} {stages} />
38
+ ```
39
+
40
+ ## Type
41
+
42
+ `feature`
43
+
44
+ ## Installation
4
45
 
46
+ ```bash
47
+ npm install @molecule/app-stage-timeline-svelte @molecule/app-i18n @molecule/app-svelte @molecule/app-ui @molecule/app-ui-svelte svelte
5
48
  ```
6
- npm install @molecule/app-stage-timeline-svelte
49
+
50
+ ## API
51
+
52
+ ### Interfaces
53
+
54
+ #### `StageTimelineStage`
55
+
56
+ A single stage on the timeline.
57
+
58
+ ```typescript
59
+ interface StageTimelineStage {
60
+ /** Stable id (used as the render key + `data-stage-id`). */
61
+ id: string
62
+ /** Stage label (a snippet, or plain text). */
63
+ label: Snippet | string | number
64
+ /** Optional secondary line (timestamp, owner, etc.; a snippet, or plain text). */
65
+ subtitle?: Snippet | string | number
66
+ /** Optional click handler. */
67
+ onClick?: () => void
68
+ }
7
69
  ```
8
70
 
9
- Part of the [Molecule](https://www.molecule.dev) package fleet. This page carries the manifest summary; the full generated documentation ships with the package's first committed version.
71
+ #### `StageTimelineProps`
72
+
73
+ Props for {@link StageTimeline}.
74
+
75
+ ```typescript
76
+ interface StageTimelineProps {
77
+ /** Ordered stages to render, left-to-right. */
78
+ stages: StageTimelineStage[]
79
+ /**
80
+ * Index of the **current** stage (0-based). Stages before this index
81
+ * are rendered as `completed`; stages after are rendered as `upcoming`.
82
+ * Pass `-1` to render every stage as upcoming (e.g. before kickoff).
83
+ * Pass `stages.length` to render every stage as completed (process done).
84
+ */
85
+ currentIndex: number
86
+ /** `data-mol-id` attribute for AI-agent selectors. */
87
+ dataMolId?: string
88
+ /** Extra classes appended via the ClassMap `cn()` helper. */
89
+ className?: string
90
+ }
91
+ ```
92
+
93
+ ### Types
94
+
95
+ #### `StageStatus`
96
+
97
+ Per-stage rendering state.
98
+
99
+ ```typescript
100
+ type StageStatus = 'completed' | 'current' | 'upcoming'
101
+ ```
102
+
103
+ ### Functions
104
+
105
+ #### `statusOf(i, currentIndex)`
106
+
107
+ Resolve a stage's rendering status given its index and the current index.
108
+
109
+ ```typescript
110
+ function statusOf(i: number, currentIndex: number): StageStatus
111
+ ```
112
+
113
+ - `i` — Zero-based stage index.
114
+ - `currentIndex` — Index of the current stage (`-1` = none, `len` = all done).
115
+
116
+ **Returns:** The rendering status for stage `i`.
117
+
118
+ ### Constants
119
+
120
+ #### `StageTimeline`
121
+
122
+ ```typescript
123
+ const StageTimeline: LegacyComponentType
124
+ ```
125
+
126
+ ## Injection Notes
127
+
128
+ ### Requirements
129
+
130
+ Peer dependencies:
131
+
132
+ - `@molecule/app-i18n` ^1.0.1
133
+ - `@molecule/app-svelte` ^3.5.0
134
+ - `@molecule/app-ui` ^1.0.1
135
+ - `@molecule/app-ui-svelte` ^1.1.0
136
+ - `svelte` ^5.0.0
137
+
138
+ ### Runtime Dependencies
139
+
140
+ - `@molecule/app-i18n`
141
+ - `@molecule/app-svelte`
142
+ - `@molecule/app-ui`
143
+ - `@molecule/app-ui-svelte`
144
+ - `svelte`
145
+
146
+ - Must render inside the app's i18n provider and with a ClassMap bond
147
+ wired (`useTranslation()` / `getClassMap()` throw otherwise).
148
+ - Colors are read from `--mol-color-primary`, `--mol-color-on-primary`,
149
+ `--mol-color-primary-container`, `--mol-color-outline`,
150
+ `--mol-color-surface(-variant)`, `--mol-color-on-surface(-variant)`
151
+ CSS custom properties with hardcoded light-theme fallbacks
152
+ (blue #3366ff, black-alpha grays). Define those `--mol-color-*`
153
+ variables in your theme (both light and dark) or the timeline stays
154
+ default-blue and looks wrong in dark mode.
155
+ - `currentIndex` semantics: stages before it render completed, after
156
+ it upcoming; pass `-1` for "not started" and `stages.length` for
157
+ "all done".
158
+ - Stage dots render as buttons but are disabled unless that stage has
159
+ an `onClick`.
160
+ - Labels and subtitles are snippets, or plain text, as React's `ReactNode`
161
+ fields are.
162
+ - Stages are keyed by their `id` (a keyed each block), so a re-passed or
163
+ re-ordered list keeps each marker's DOM the way React's `key` does.
164
+ - This is the horizontal stage/pipeline marker; for a vertical
165
+ ordered-step list use `@molecule/app-status-timeline-svelte`, and for
166
+ wizard/checkout progress chrome use `@molecule/app-stepper-svelte`.
167
+
168
+ ## Translations
10
169
 
11
- License: Apache-2.0
170
+ Translation strings are provided by `@molecule/app-locales-stage-timeline`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@molecule/app-stage-timeline-svelte",
3
- "version": "0.0.1-stage",
3
+ "version": "1.1.0",
4
4
  "description": "Multi-stage horizontal progress timeline with current marker — onboarding, applicant tracking, kanban status flow",
5
5
  "homepage": "https://www.molecule.dev/packages/app-stage-timeline-svelte",
6
6
  "type": "module",
@@ -60,9 +60,9 @@
60
60
  "@molecule/app-framework-conformance": "0.0.0",
61
61
  "@molecule/app-i18n": "1.2.2",
62
62
  "@molecule/app-icons": "1.0.4",
63
- "@molecule/app-svelte": "3.7.2",
64
- "@molecule/app-ui": "1.4.0",
65
- "@molecule/app-ui-svelte": "1.1.7",
63
+ "@molecule/app-svelte": "3.9.0",
64
+ "@molecule/app-ui": "1.5.0",
65
+ "@molecule/app-ui-svelte": "1.2.1",
66
66
  "@molecule/app-ui-tailwind": "1.3.0",
67
67
  "@sveltejs/package": "3.0.2",
68
68
  "@sveltejs/vite-plugin-svelte": "7.1.2",