@chrisflippen/blueprint-document-assembly 3.0.0 → 3.0.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/README.md +277 -176
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,49 +1,33 @@
|
|
|
1
1
|
# Blueprint Document Assembly
|
|
2
2
|
|
|
3
|
-
An animation-heavy React component for visualizing multi-step processes as a Blueprint/Technical Document Assembly system.
|
|
3
|
+
An animation-heavy React component library for visualizing multi-step processes as a Blueprint/Technical Document Assembly system. Features progressive document construction, streaming logs, cinematic completion effects, theming, animation presets, and accessibility support.
|
|
4
4
|
|
|
5
|
-

|
|
6
|
-

|
|
5
|
+

|
|
6
|
+

|
|
7
7
|
|
|
8
|
-
##
|
|
8
|
+
## Features
|
|
9
9
|
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
10
|
+
- **Cinematic Animations** — Smooth, professional animations powered by Motion (Framer Motion) with 4 built-in presets
|
|
11
|
+
- **Progressive Document Assembly** — Watch documents build piece-by-piece as steps complete with typewriter effects
|
|
12
|
+
- **ThemeProvider** — Full React Context theming; change all colors by passing a single config
|
|
13
|
+
- **Animation Presets** — Smooth, Snappy, Cinematic, and Minimal presets with configurable timings
|
|
14
|
+
- **Accessibility** — `prefers-reduced-motion` support, ARIA roles (`progressbar`, `log`, `listitem`), `aria-live` regions
|
|
15
|
+
- **Mobile Responsive** — Automatic vertical stacking on small screens via `useResponsiveLayout`
|
|
16
|
+
- **Headless Hook** — `useDocumentAssembly()` for full control without any UI
|
|
17
|
+
- **Generic Presets** — Squiggle text presets (`~~~~~ ~~~ ~~~~~~~`) for non-domain-specific demos
|
|
18
|
+
- **Real-time Metrics** — Track tokens, costs, and elapsed time
|
|
19
|
+
- **Dark Mode** — Respects system theme preferences
|
|
20
|
+
- **TypeScript** — Fully typed with exported interfaces
|
|
19
21
|
|
|
20
|
-
##
|
|
22
|
+
## Installation
|
|
21
23
|
|
|
22
24
|
```bash
|
|
23
|
-
npm install blueprint-document-assembly motion lucide-react
|
|
25
|
+
npm install @chrisflippen/blueprint-document-assembly motion lucide-react
|
|
24
26
|
```
|
|
25
27
|
|
|
26
|
-
|
|
28
|
+
## Styling Requirements
|
|
27
29
|
|
|
28
|
-
|
|
29
|
-
yarn add blueprint-document-assembly motion lucide-react
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
Or with pnpm:
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
pnpm add blueprint-document-assembly motion lucide-react
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
## 🎨 Styling Requirements
|
|
39
|
-
|
|
40
|
-
This component requires **Tailwind CSS v4**. Make sure you have Tailwind CSS installed and configured:
|
|
41
|
-
|
|
42
|
-
```bash
|
|
43
|
-
npm install tailwindcss @tailwindcss/vite
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
Your Tailwind CSS theme should include these CSS variables for optimal styling:
|
|
30
|
+
This component requires **Tailwind CSS v4**. Your theme should include these CSS variables:
|
|
47
31
|
|
|
48
32
|
```css
|
|
49
33
|
@theme {
|
|
@@ -52,7 +36,6 @@ Your Tailwind CSS theme should include these CSS variables for optimal styling:
|
|
|
52
36
|
--color-muted: #f4f4f5;
|
|
53
37
|
--color-muted-foreground: #71717a;
|
|
54
38
|
--color-border: #e4e4e7;
|
|
55
|
-
/* Add more theme variables as needed */
|
|
56
39
|
}
|
|
57
40
|
|
|
58
41
|
@media (prefers-color-scheme: dark) {
|
|
@@ -66,215 +49,333 @@ Your Tailwind CSS theme should include these CSS variables for optimal styling:
|
|
|
66
49
|
}
|
|
67
50
|
```
|
|
68
51
|
|
|
69
|
-
|
|
52
|
+
### Tailwind Safelist (required when using ThemeProvider)
|
|
53
|
+
|
|
54
|
+
Dynamic theme colors generate Tailwind classes at runtime. Add them to your safelist:
|
|
55
|
+
|
|
56
|
+
```ts
|
|
57
|
+
import { getThemeSafelist } from '@chrisflippen/blueprint-document-assembly';
|
|
58
|
+
|
|
59
|
+
// In your Tailwind config
|
|
60
|
+
safelist: getThemeSafelist({ primary: 'blue', success: 'green' })
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Quick Start
|
|
70
64
|
|
|
71
65
|
```tsx
|
|
72
|
-
import { BlueprintDocumentAssembly } from 'blueprint-document-assembly';
|
|
66
|
+
import { BlueprintDocumentAssembly } from '@chrisflippen/blueprint-document-assembly';
|
|
73
67
|
|
|
74
68
|
function App() {
|
|
75
69
|
return <BlueprintDocumentAssembly />;
|
|
76
70
|
}
|
|
77
71
|
```
|
|
78
72
|
|
|
79
|
-
|
|
73
|
+
Zero-config renders a sworn affidavit assembly with default steps, logs, and document sections.
|
|
80
74
|
|
|
81
|
-
##
|
|
75
|
+
## Usage Examples
|
|
82
76
|
|
|
83
|
-
###
|
|
77
|
+
### Callbacks
|
|
84
78
|
|
|
85
79
|
```tsx
|
|
86
|
-
import { BlueprintDocumentAssembly } from 'blueprint-document-assembly';
|
|
87
|
-
import type { DocumentMetrics, Step } from 'blueprint-document-assembly';
|
|
80
|
+
import { BlueprintDocumentAssembly } from '@chrisflippen/blueprint-document-assembly';
|
|
81
|
+
import type { DocumentMetrics, Step } from '@chrisflippen/blueprint-document-assembly';
|
|
88
82
|
|
|
89
83
|
function App() {
|
|
90
|
-
const handleComplete = (metrics: DocumentMetrics) => {
|
|
91
|
-
console.log('Assembly complete!', metrics);
|
|
92
|
-
// { tokens: 2847, cost: 0.0234, elapsed: 14.2 }
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
const handleStepComplete = (step: Step, metrics: DocumentMetrics) => {
|
|
96
|
-
console.log(`Step ${step.number} completed:`, step.title);
|
|
97
|
-
};
|
|
98
|
-
|
|
99
84
|
return (
|
|
100
85
|
<BlueprintDocumentAssembly
|
|
101
|
-
onComplete={
|
|
102
|
-
onStepComplete={
|
|
86
|
+
onComplete={(metrics: DocumentMetrics) => console.log('Done!', metrics)}
|
|
87
|
+
onStepComplete={(step: Step) => console.log(`Step ${step.number} done`)}
|
|
103
88
|
/>
|
|
104
89
|
);
|
|
105
90
|
}
|
|
106
91
|
```
|
|
107
92
|
|
|
108
|
-
### Custom
|
|
93
|
+
### ThemeProvider — Custom Colors
|
|
94
|
+
|
|
95
|
+
Pass a `theme` prop to recolor all components. Colors map to Tailwind color names.
|
|
109
96
|
|
|
110
97
|
```tsx
|
|
111
98
|
<BlueprintDocumentAssembly
|
|
112
|
-
|
|
99
|
+
theme={{ primary: 'blue', success: 'green', processing: 'indigo' }}
|
|
113
100
|
/>
|
|
101
|
+
```
|
|
114
102
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
103
|
+
Under the hood this wraps the component tree in a `<ThemeProvider>` that resolves color names into Tailwind class strings. Components read from context via `useThemeOptional()` and fall back to hardcoded styles when no provider is present.
|
|
104
|
+
|
|
105
|
+
You can also use the provider directly for sub-components:
|
|
106
|
+
|
|
107
|
+
```tsx
|
|
108
|
+
import { ThemeProvider, useTheme, resolveTheme } from '@chrisflippen/blueprint-document-assembly';
|
|
109
|
+
|
|
110
|
+
function CustomUI() {
|
|
111
|
+
const theme = useTheme(); // throws if no provider
|
|
112
|
+
return <div className={theme.primary.bg}>Themed content</div>;
|
|
113
|
+
}
|
|
118
114
|
```
|
|
119
115
|
|
|
120
|
-
###
|
|
116
|
+
### Animation Presets
|
|
117
|
+
|
|
118
|
+
Four built-in presets control all animation timings, springs, stagger delays, and typewriter speeds:
|
|
121
119
|
|
|
122
120
|
```tsx
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
121
|
+
import {
|
|
122
|
+
BlueprintDocumentAssembly,
|
|
123
|
+
SMOOTH_PRESET, // Default — balanced
|
|
124
|
+
SNAPPY_PRESET, // Fast, responsive
|
|
125
|
+
CINEMATIC_PRESET, // Slow, dramatic
|
|
126
|
+
MINIMAL_PRESET, // Near-instant (used automatically for reduced motion)
|
|
127
|
+
} from '@chrisflippen/blueprint-document-assembly';
|
|
128
|
+
|
|
129
|
+
<BlueprintDocumentAssembly animationPreset={SNAPPY_PRESET} />
|
|
126
130
|
```
|
|
127
131
|
|
|
128
|
-
|
|
132
|
+
You can also override individual timings without a full preset:
|
|
129
133
|
|
|
130
134
|
```tsx
|
|
131
135
|
<BlueprintDocumentAssembly
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
136
|
+
animationTimings={{
|
|
137
|
+
stepActivation: 400,
|
|
138
|
+
substepDelay: 250,
|
|
139
|
+
typewriterSpeed: 15,
|
|
135
140
|
}}
|
|
136
141
|
/>
|
|
137
142
|
```
|
|
138
143
|
|
|
139
|
-
###
|
|
144
|
+
### Squiggle Text Presets
|
|
145
|
+
|
|
146
|
+
Generic document presets using tilde characters instead of real content — useful for demos, portfolios, and non-legal use cases:
|
|
140
147
|
|
|
141
148
|
```tsx
|
|
142
|
-
import
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
},
|
|
157
|
-
// ... more steps
|
|
158
|
-
];
|
|
159
|
-
|
|
160
|
-
<BlueprintDocumentAssembly steps={customSteps} />
|
|
149
|
+
import {
|
|
150
|
+
BlueprintDocumentAssembly,
|
|
151
|
+
SQUIGGLE_STEPS,
|
|
152
|
+
SQUIGGLE_STEP_LOGS,
|
|
153
|
+
SQUIGGLE_SUBSTEP_LOGS,
|
|
154
|
+
SQUIGGLE_DOCUMENT_SECTIONS,
|
|
155
|
+
} from '@chrisflippen/blueprint-document-assembly';
|
|
156
|
+
|
|
157
|
+
<BlueprintDocumentAssembly
|
|
158
|
+
steps={SQUIGGLE_STEPS}
|
|
159
|
+
stepLogs={SQUIGGLE_STEP_LOGS}
|
|
160
|
+
substepLogs={SQUIGGLE_SUBSTEP_LOGS}
|
|
161
|
+
documentSections={SQUIGGLE_DOCUMENT_SECTIONS}
|
|
162
|
+
/>
|
|
161
163
|
```
|
|
162
164
|
|
|
163
|
-
|
|
165
|
+
Squiggle presets use the same section IDs and substep triggers as the legal preset, so they're a drop-in replacement.
|
|
164
166
|
|
|
165
|
-
###
|
|
167
|
+
### Headless Hook
|
|
166
168
|
|
|
167
|
-
|
|
168
|
-
|------|------|---------|-------------|
|
|
169
|
-
| `steps` | `Step[]` | Default affidavit steps | Array of steps to process |
|
|
170
|
-
| `stepLogs` | `Record<string, string[][]>` | Default logs | Custom log data for each step |
|
|
171
|
-
| `substepLogs` | `Record<string, string[][]>` | Default logs | Custom log data for each substep |
|
|
172
|
-
| `autoScroll` | `boolean` | `true` | Auto-scroll to show new content |
|
|
173
|
-
| `showWholeDocumentView` | `boolean` | `true` | Show zoom-out view on completion |
|
|
174
|
-
| `documentIds` | `DocumentIds` | Auto-generated | Custom case/file numbers |
|
|
175
|
-
| `animationSpeed` | `number` | `1` | Animation speed multiplier |
|
|
176
|
-
| `onComplete` | `(metrics: DocumentMetrics) => void` | - | Callback when complete |
|
|
177
|
-
| `onStepComplete` | `(step: Step, metrics: DocumentMetrics) => void` | - | Callback when step completes |
|
|
178
|
-
| `className` | `string` | - | Custom className for root |
|
|
179
|
-
|
|
180
|
-
### Types
|
|
181
|
-
|
|
182
|
-
```typescript
|
|
183
|
-
interface Step {
|
|
184
|
-
id: string;
|
|
185
|
-
number: number;
|
|
186
|
-
title: string;
|
|
187
|
-
status: 'pending' | 'active' | 'processing' | 'completed';
|
|
188
|
-
substeps?: SubStep[];
|
|
189
|
-
documentSection?: string;
|
|
190
|
-
logs: LogEntry[];
|
|
191
|
-
}
|
|
169
|
+
Use `useDocumentAssembly()` for full programmatic control without the built-in UI:
|
|
192
170
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
171
|
+
```tsx
|
|
172
|
+
import { useDocumentAssembly } from '@chrisflippen/blueprint-document-assembly';
|
|
173
|
+
|
|
174
|
+
function CustomAssembly() {
|
|
175
|
+
const {
|
|
176
|
+
steps, progress, isRunning, isComplete, metrics,
|
|
177
|
+
completedSubsteps, completedSections,
|
|
178
|
+
start, pause, resume, reset, goToStep,
|
|
179
|
+
} = useDocumentAssembly({
|
|
180
|
+
autoStart: false,
|
|
181
|
+
animationTimings: { stepActivation: 500 },
|
|
182
|
+
onComplete: (m) => console.log('Done', m),
|
|
183
|
+
});
|
|
199
184
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
185
|
+
return (
|
|
186
|
+
<div>
|
|
187
|
+
<p>Progress: {progress}%</p>
|
|
188
|
+
<button onClick={start}>Start</button>
|
|
189
|
+
<button onClick={pause}>Pause</button>
|
|
190
|
+
<button onClick={resume}>Resume</button>
|
|
191
|
+
<button onClick={reset}>Reset</button>
|
|
192
|
+
</div>
|
|
193
|
+
);
|
|
205
194
|
}
|
|
195
|
+
```
|
|
206
196
|
|
|
207
|
-
|
|
208
|
-
tokens: number;
|
|
209
|
-
cost: number;
|
|
210
|
-
elapsed: number;
|
|
211
|
-
}
|
|
197
|
+
### Imperative Control via Ref
|
|
212
198
|
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
199
|
+
```tsx
|
|
200
|
+
import { useRef } from 'react';
|
|
201
|
+
import { BlueprintDocumentAssembly } from '@chrisflippen/blueprint-document-assembly';
|
|
202
|
+
import type { BlueprintDocumentAssemblyRef } from '@chrisflippen/blueprint-document-assembly';
|
|
203
|
+
|
|
204
|
+
function App() {
|
|
205
|
+
const ref = useRef<BlueprintDocumentAssemblyRef>(null);
|
|
206
|
+
|
|
207
|
+
return (
|
|
208
|
+
<>
|
|
209
|
+
<BlueprintDocumentAssembly ref={ref} autoStart={false} />
|
|
210
|
+
<button onClick={() => ref.current?.start()}>Start</button>
|
|
211
|
+
<button onClick={() => ref.current?.pause()}>Pause</button>
|
|
212
|
+
</>
|
|
213
|
+
);
|
|
216
214
|
}
|
|
217
215
|
```
|
|
218
216
|
|
|
219
|
-
##
|
|
217
|
+
## Accessibility
|
|
220
218
|
|
|
221
|
-
|
|
222
|
-
- **Compliance Workflows**: Multi-step verification and approval processes
|
|
223
|
-
- **Technical Documentation**: System build processes, deployment pipelines
|
|
224
|
-
- **Manufacturing**: Assembly line visualization
|
|
225
|
-
- **Medical**: Patient intake and verification processes
|
|
226
|
-
- **Financial**: Loan application processing, KYC workflows
|
|
219
|
+
### Reduced Motion
|
|
227
220
|
|
|
228
|
-
|
|
221
|
+
The library automatically detects `prefers-reduced-motion: reduce` and:
|
|
222
|
+
- Skips typewriter animations (shows full text immediately)
|
|
223
|
+
- Disables sparkle/celebration effects
|
|
224
|
+
- Uses `MINIMAL_PRESET` timings (near-instant transitions)
|
|
225
|
+
- Removes entrance slide/scale animations
|
|
229
226
|
|
|
230
|
-
|
|
227
|
+
When using `AnimationProvider`, reduced motion detection is automatic:
|
|
231
228
|
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
3. **Custom Logs**: Provide custom log messages for each step/substep
|
|
235
|
-
4. **Props**: Use the extensive props API for behavior customization
|
|
229
|
+
```tsx
|
|
230
|
+
import { AnimationProvider, useAnimation } from '@chrisflippen/blueprint-document-assembly';
|
|
236
231
|
|
|
237
|
-
|
|
232
|
+
function MyComponent() {
|
|
233
|
+
const { reducedMotion, preset } = useAnimation();
|
|
234
|
+
// reducedMotion === true when user prefers reduced motion
|
|
235
|
+
}
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
You can also use the hook standalone:
|
|
238
239
|
|
|
239
|
-
|
|
240
|
+
```tsx
|
|
241
|
+
import { useReducedMotion } from '@chrisflippen/blueprint-document-assembly';
|
|
240
242
|
|
|
243
|
+
const prefersReduced = useReducedMotion(); // boolean
|
|
241
244
|
```
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
245
|
+
|
|
246
|
+
### ARIA Attributes
|
|
247
|
+
|
|
248
|
+
- Progress bar: `role="progressbar"` with `aria-valuenow`, `aria-valuemin`, `aria-valuemax`
|
|
249
|
+
- Log containers: `role="log"` with `aria-live="polite"`
|
|
250
|
+
- Log toggles: `aria-expanded` and `aria-label`
|
|
251
|
+
- Substep lists: `role="list"` and `role="listitem"`
|
|
252
|
+
- Root container: `aria-label="Document assembly"`
|
|
253
|
+
|
|
254
|
+
## Mobile Responsive
|
|
255
|
+
|
|
256
|
+
On screens narrower than 768px, the layout automatically switches from horizontal (side-by-side) to vertical (stacked). Use the hook directly:
|
|
257
|
+
|
|
258
|
+
```tsx
|
|
259
|
+
import { useResponsiveLayout } from '@chrisflippen/blueprint-document-assembly';
|
|
260
|
+
|
|
261
|
+
const { isMobile, isTablet, direction } = useResponsiveLayout();
|
|
262
|
+
// direction: 'vertical' on mobile, 'horizontal' on desktop
|
|
256
263
|
```
|
|
257
264
|
|
|
258
|
-
|
|
265
|
+
Or override via the `layout` prop:
|
|
259
266
|
|
|
260
|
-
|
|
267
|
+
```tsx
|
|
268
|
+
<BlueprintDocumentAssembly layout={{ direction: 'vertical' }} />
|
|
269
|
+
```
|
|
261
270
|
|
|
262
|
-
##
|
|
271
|
+
## API Reference
|
|
263
272
|
|
|
264
|
-
|
|
273
|
+
### BlueprintDocumentAssembly Props
|
|
265
274
|
|
|
266
|
-
|
|
275
|
+
| Prop | Type | Default | Description |
|
|
276
|
+
|------|------|---------|-------------|
|
|
277
|
+
| `steps` | `Step[]` | Default affidavit steps | Steps to process |
|
|
278
|
+
| `stepLogs` | `Record<string, string[][]>` | Default logs | Log data per step |
|
|
279
|
+
| `substepLogs` | `Record<string, string[][]>` | Default logs | Log data per substep |
|
|
280
|
+
| `documentSections` | `DocumentSection[]` | Legal preset | Document content sections |
|
|
281
|
+
| `autoStart` | `boolean` | `true` | Start assembly on mount |
|
|
282
|
+
| `autoScroll` | `boolean` | `true` | Auto-scroll document |
|
|
283
|
+
| `showWholeDocumentView` | `boolean` | `true` | Show completion overlay |
|
|
284
|
+
| `documentIds` | `DocumentIds` | Auto-generated | Custom case/file numbers |
|
|
285
|
+
| `animationSpeed` | `number` | `1` | Speed multiplier |
|
|
286
|
+
| `animationPreset` | `AnimationPreset` | - | Animation preset (SMOOTH, SNAPPY, etc.) |
|
|
287
|
+
| `animationTimings` | `AnimationTimings` | - | Override individual timing values |
|
|
288
|
+
| `theme` | `ThemeConfig` | - | Theme color config |
|
|
289
|
+
| `classNames` | `ClassNameSlots` | - | CSS class overrides for internal slots |
|
|
290
|
+
| `labels` | `LabelConfig` | - | UI string overrides |
|
|
291
|
+
| `layout` | `LayoutConfig` | - | Layout direction and panel widths |
|
|
292
|
+
| `className` | `string` | - | Root container className |
|
|
293
|
+
| `renderStep` | `(step, default) => ReactNode` | - | Custom step renderer |
|
|
294
|
+
| `renderSubstep` | `(substep, default) => ReactNode` | - | Custom substep renderer |
|
|
295
|
+
| `renderLog` | `(log, default) => ReactNode` | - | Custom log renderer |
|
|
296
|
+
| `renderDocumentSection` | `(section, substeps) => ReactNode` | - | Custom section renderer |
|
|
297
|
+
| `onComplete` | `(metrics) => void` | - | Assembly complete callback |
|
|
298
|
+
| `onStepStart` | `(step, index) => void` | - | Step started callback |
|
|
299
|
+
| `onStepComplete` | `(step, metrics) => void` | - | Step complete callback |
|
|
300
|
+
| `onSubstepComplete` | `(substepId, stepIndex) => void` | - | Substep complete callback |
|
|
301
|
+
| `onSectionReveal` | `(sectionId) => void` | - | Section revealed callback |
|
|
302
|
+
| `onLogEntry` | `(log) => void` | - | Log entry added callback |
|
|
303
|
+
| `onPause` | `() => void` | - | Paused callback |
|
|
304
|
+
| `onResume` | `() => void` | - | Resumed callback |
|
|
305
|
+
| `onReset` | `() => void` | - | Reset callback |
|
|
306
|
+
|
|
307
|
+
### Exports
|
|
308
|
+
|
|
309
|
+
**Components:**
|
|
310
|
+
`BlueprintDocumentAssembly`, `StepItem`, `SubStepItem`, `LogLine`, `LogContainer`, `DocumentPreview`, `DocumentLine`, `WholeDocumentView`, `WholeDocumentContent`
|
|
311
|
+
|
|
312
|
+
**Theme:**
|
|
313
|
+
`ThemeProvider`, `useTheme`, `useThemeOptional`, `resolveTheme`, `getThemeSafelist`
|
|
314
|
+
|
|
315
|
+
**Animation:**
|
|
316
|
+
`AnimationProvider`, `useAnimation`, `useAnimationOptional`, `SMOOTH_PRESET`, `SNAPPY_PRESET`, `CINEMATIC_PRESET`, `MINIMAL_PRESET`
|
|
317
|
+
|
|
318
|
+
**Hooks:**
|
|
319
|
+
`useDocumentAssembly`, `useReducedMotion`, `useResponsiveLayout`
|
|
320
|
+
|
|
321
|
+
**Presets:**
|
|
322
|
+
`LEGAL_DOCUMENT_SECTIONS`, `LEGAL_WHOLE_DOCUMENT_SECTIONS`, `SQUIGGLE_DOCUMENT_SECTIONS`, `SQUIGGLE_WHOLE_DOCUMENT_SECTIONS`, `SQUIGGLE_STEPS`, `SQUIGGLE_STEP_LOGS`, `SQUIGGLE_SUBSTEP_LOGS`
|
|
323
|
+
|
|
324
|
+
**Constants:**
|
|
325
|
+
`DEFAULT_STEPS`, `DEFAULT_STEP_LOGS`, `DEFAULT_SUBSTEP_LOGS`, `DEFAULT_LABELS`, `DEFAULT_THEME`, `STEP_ICON_MAP`
|
|
326
|
+
|
|
327
|
+
**Factories:**
|
|
328
|
+
`createStep`, `createSubStep`, `createDocumentSection`, `resetStepCounter`
|
|
329
|
+
|
|
330
|
+
**Types:**
|
|
331
|
+
`Step`, `SubStep`, `LogEntry`, `DocumentMetrics`, `DocumentIds`, `DocumentSection`, `DocumentSubsection`, `ClassNameSlots`, `ThemeConfig`, `AnimationTimings`, `AnimationPreset`, `ResolvedTheme`, `ResolvedThemeColors`, `LabelConfig`, `LayoutConfig`, `UseDocumentAssemblyOptions`, `UseDocumentAssemblyReturn`, `BlueprintDocumentAssemblyRef`, `BlueprintDocumentAssemblyProps`, and all component prop types
|
|
332
|
+
|
|
333
|
+
## Architecture
|
|
267
334
|
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
335
|
+
```
|
|
336
|
+
src/
|
|
337
|
+
├── components/
|
|
338
|
+
│ ├── BlueprintDocumentAssembly.tsx # Main component (providers, responsive, ARIA)
|
|
339
|
+
│ ├── StepItem.tsx # Step card with theme context
|
|
340
|
+
│ ├── SubStepItem.tsx # Substep with ARIA listitem
|
|
341
|
+
│ ├── LogComponents.tsx # Log display with ARIA log role
|
|
342
|
+
│ ├── DocumentPreview.tsx # Progressive document builder
|
|
343
|
+
│ ├── DocumentLine.tsx # Typewriter text (reduced motion aware)
|
|
344
|
+
│ ├── WholeDocumentView.tsx # Completion overlay (GPU-safe glow)
|
|
345
|
+
│ └── WholeDocumentContent.tsx # Static document renderer
|
|
346
|
+
├── theme/
|
|
347
|
+
│ ├── ThemeContext.tsx # ThemeProvider, resolveTheme, safelist
|
|
348
|
+
│ └── index.ts
|
|
349
|
+
├── animation/
|
|
350
|
+
│ ├── presets.ts # SMOOTH, SNAPPY, CINEMATIC, MINIMAL
|
|
351
|
+
│ ├── AnimationContext.tsx # AnimationProvider, useAnimation
|
|
352
|
+
│ └── index.ts
|
|
353
|
+
├── hooks/
|
|
354
|
+
│ ├── useDocumentAssembly.ts # Headless assembly hook
|
|
355
|
+
│ ├── useReducedMotion.ts # prefers-reduced-motion detection
|
|
356
|
+
│ ├── useResponsiveLayout.ts # Breakpoint detection
|
|
357
|
+
│ └── index.ts
|
|
358
|
+
├── presets/
|
|
359
|
+
│ ├── legal-document-sections.ts # Sworn affidavit sections
|
|
360
|
+
│ ├── legal-whole-document.ts # Legal completion view
|
|
361
|
+
│ ├── squiggle-document-sections.ts # Generic squiggle text sections
|
|
362
|
+
│ ├── squiggle-steps.ts # Generic steps + logs
|
|
363
|
+
│ └── index.ts
|
|
364
|
+
├── constants/
|
|
365
|
+
│ ├── default-labels.ts
|
|
366
|
+
│ └── default-theme.ts
|
|
367
|
+
├── types.ts
|
|
368
|
+
├── constants.ts
|
|
369
|
+
├── default-steps.ts
|
|
370
|
+
└── index.tsx # Public API
|
|
371
|
+
```
|
|
271
372
|
|
|
272
|
-
##
|
|
373
|
+
## License
|
|
273
374
|
|
|
274
|
-
|
|
275
|
-
- 💬 Discussions: [GitHub Discussions](https://github.com/yourusername/blueprint-document-assembly/discussions)
|
|
276
|
-
- 📧 Email: your.email@example.com
|
|
375
|
+
MIT
|
|
277
376
|
|
|
278
|
-
|
|
377
|
+
## Acknowledgments
|
|
279
378
|
|
|
280
|
-
|
|
379
|
+
- Built with [Motion](https://motion.dev/) (Framer Motion)
|
|
380
|
+
- Icons by [Lucide](https://lucide.dev/)
|
|
381
|
+
- Styled with [Tailwind CSS](https://tailwindcss.com/)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chrisflippen/blueprint-document-assembly",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"description": "An animation-heavy React component for visualizing multi-step processes as a Blueprint/Technical Document Assembly system with streaming logs, progressive document construction, and cinematic completion effects",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|