handoff-app 1.2.0-2 → 1.2.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.
- package/Changelog.md +70 -0
- package/dist/app-builder/config-diff/registry.js +1 -1
- package/dist/cli.js +1 -1
- package/handoff.config.js +90 -0
- package/package.json +1 -1
- package/src/app-builder/config-diff/registry.ts +1 -1
- package/src/cli.ts +1 -1
package/Changelog.md
CHANGED
|
@@ -6,6 +6,76 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
|
6
6
|
and this project adheres to
|
|
7
7
|
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
8
8
|
|
|
9
|
+
## \[1.2.1] - 2026-04-08
|
|
10
|
+
|
|
11
|
+
This is a minor release that fixes a bug in the new config diff calculator.
|
|
12
|
+
Under some conditions, this would fail depending on your node configuration.
|
|
13
|
+
|
|
14
|
+
## \[1.2.0] - 2026-04-03
|
|
15
|
+
|
|
16
|
+
This release introduces support for patterns and significantly
|
|
17
|
+
modernizes the configuration and declaration workflow. It expands Handoff from
|
|
18
|
+
documenting individual components to documenting larger design-system
|
|
19
|
+
compositions, while also improving TypeScript support, preview usability, and
|
|
20
|
+
overall build and development reliability.
|
|
21
|
+
|
|
22
|
+
### Patterns
|
|
23
|
+
|
|
24
|
+
* Added support for design system patterns as a new documentation
|
|
25
|
+
layer above individual components.
|
|
26
|
+
* Patterns support composing multiple component previews into a single page.
|
|
27
|
+
* Pattern definitions can reference existing named component previews or
|
|
28
|
+
provide inline args for custom pattern-specific compositions.
|
|
29
|
+
* Added support for `entries.patterns`, allowing projects to register composed
|
|
30
|
+
design-system patterns alongside components.
|
|
31
|
+
* Added pattern summary and detail artifacts so patterns behave as first-class
|
|
32
|
+
generated output alongside components.
|
|
33
|
+
|
|
34
|
+
### Typed Config and Declaration Workflow
|
|
35
|
+
|
|
36
|
+
* Added support for typed TypeScript and JavaScript config and declaration
|
|
37
|
+
files across the project workflow.
|
|
38
|
+
* Established TypeScript-based config and declaration files as the preferred
|
|
39
|
+
convention, while continuing to support JavaScript, CJS, and JSON where
|
|
40
|
+
applicable.
|
|
41
|
+
* Added clear config resolution precedence when multiple root config files are
|
|
42
|
+
present.
|
|
43
|
+
* Introduced the `.handoff.ts` and `.handoff.js` declaration convention for
|
|
44
|
+
components and patterns.
|
|
45
|
+
* Introduced structured helper APIs including `defineConfig`,
|
|
46
|
+
`defineReactComponent`, `defineHandlebarsComponent`,
|
|
47
|
+
`defineCsfComponent`, and `definePattern`.
|
|
48
|
+
* Updated runtime loading and normalization so typed declarations and modern
|
|
49
|
+
config shapes work consistently across the pipeline.
|
|
50
|
+
* Updated scaffolding and CLI flows to support both TypeScript and JavaScript
|
|
51
|
+
project setup.
|
|
52
|
+
* Updated generated examples and component scaffolds to follow the new
|
|
53
|
+
`.handoff.*` declaration convention.
|
|
54
|
+
|
|
55
|
+
### Usage Snippets and Preview Improvements
|
|
56
|
+
|
|
57
|
+
* Added usage snippets as a new documentation feature, with output that
|
|
58
|
+
reflects the currently selected preview variant.
|
|
59
|
+
* Expanded CSF preview handling to produce more useful implementation examples
|
|
60
|
+
for React and Storybook-style components.
|
|
61
|
+
* Improved story and preview resolution so generated documentation is more
|
|
62
|
+
actionable for engineers consuming the design system.
|
|
63
|
+
* Enhanced code display behavior to better support usage-oriented
|
|
64
|
+
documentation rather than only static rendered output.
|
|
65
|
+
|
|
66
|
+
### General Improvements
|
|
67
|
+
|
|
68
|
+
* Improved incremental build and watch behavior so changes trigger more
|
|
69
|
+
selective and reliable rebuilds.
|
|
70
|
+
* Added better cleanup of stale generated artifacts to keep component and
|
|
71
|
+
pattern output in sync as files change or are removed.
|
|
72
|
+
* Improved summary artifact maintenance during rebuilds so generated API output
|
|
73
|
+
stays aligned with the current source of truth.
|
|
74
|
+
* Enhanced logging with clearer scoped output across Handoff, Vite, and Next.js
|
|
75
|
+
processes.
|
|
76
|
+
* Improved child-process logging and development server reporting to make local
|
|
77
|
+
debugging and build visibility better.
|
|
78
|
+
|
|
9
79
|
## \[1.1.3] - 2026-03-27
|
|
10
80
|
|
|
11
81
|
This release reworks the markdown page rendering system with four improvements:
|
|
@@ -23,7 +23,7 @@ exports.getAllStrategies = getAllStrategies;
|
|
|
23
23
|
* Called after component rebuilds so derived artifacts stay up-to-date.
|
|
24
24
|
*/
|
|
25
25
|
const runAllFinalizers = (handoff, context) => __awaiter(void 0, void 0, void 0, function* () {
|
|
26
|
-
for (const strategy of strategies.values()) {
|
|
26
|
+
for (const strategy of Array.from(strategies.values())) {
|
|
27
27
|
yield strategy.finalize(handoff, context);
|
|
28
28
|
}
|
|
29
29
|
});
|
package/dist/cli.js
CHANGED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/** @type {import('handoff-app').Config} */
|
|
2
|
+
const path = require('path');
|
|
3
|
+
module.exports = {
|
|
4
|
+
// Set your Figma project ID here or in the environment variable HANDOFF_FIGMA_PROJECT_ID
|
|
5
|
+
figma_project_id: null,
|
|
6
|
+
// Set the output directory for the exported components
|
|
7
|
+
exportsOutputDirectory: 'exported',
|
|
8
|
+
// Set the output directory for the sites
|
|
9
|
+
sitesOutputDirectory: 'out',
|
|
10
|
+
// These settings control the behavior of the application
|
|
11
|
+
app: {
|
|
12
|
+
// Set the theme for the application
|
|
13
|
+
theme: 'default',
|
|
14
|
+
// Set the title for the application
|
|
15
|
+
title: 'Handoff Design System',
|
|
16
|
+
// Set the client for the application, used in the footer
|
|
17
|
+
client: 'Handoff Technologies',
|
|
18
|
+
// Set the Google Tag Manager ID to add GTM scripts
|
|
19
|
+
google_tag_manager: null,
|
|
20
|
+
// Set the attribution for the application
|
|
21
|
+
attribution: true, // Should we remove this?
|
|
22
|
+
// Set the type copy for the typeography page
|
|
23
|
+
type_copy: 'Almost before we knew it, we had left the ground.',
|
|
24
|
+
// Set the type sort for the typeography page
|
|
25
|
+
type_sort: [
|
|
26
|
+
'Heading 1',
|
|
27
|
+
'Heading 2',
|
|
28
|
+
'Heading 3',
|
|
29
|
+
'Heading 4',
|
|
30
|
+
'Heading 5',
|
|
31
|
+
'Heading 6',
|
|
32
|
+
'Paragraph',
|
|
33
|
+
'Subheading',
|
|
34
|
+
'Blockquote',
|
|
35
|
+
'Input Labels',
|
|
36
|
+
'Link',
|
|
37
|
+
],
|
|
38
|
+
// Set the color sort for the color page
|
|
39
|
+
color_sort: ['primary', 'secondary', 'extra', 'system'],
|
|
40
|
+
// Set the component sort for the component page
|
|
41
|
+
component_sort: ['primary', 'secondary', 'transparent'],
|
|
42
|
+
// Set the base path for the application
|
|
43
|
+
base_path: '',
|
|
44
|
+
// Set the breakpoints for the application
|
|
45
|
+
breakpoints: {
|
|
46
|
+
sm: { size: 576, name: 'Small' },
|
|
47
|
+
md: { size: 768, name: 'Medium' },
|
|
48
|
+
lg: { size: 992, name: 'Large' },
|
|
49
|
+
xl: { size: 1200, name: 'Extra Large' },
|
|
50
|
+
},
|
|
51
|
+
// Set the ports for the application
|
|
52
|
+
ports: { app: 3000, websocket: 3001 },
|
|
53
|
+
},
|
|
54
|
+
// These are the entry points used to compile the target application
|
|
55
|
+
entries: {
|
|
56
|
+
scss: './sass/main.scss',
|
|
57
|
+
js: './js/main.js',
|
|
58
|
+
bundle: './js/main.js',
|
|
59
|
+
components: ['./test_components'],
|
|
60
|
+
patterns: ['./test_patterns'],
|
|
61
|
+
},
|
|
62
|
+
// These are the asset zip file download links
|
|
63
|
+
assets_zip_links: {
|
|
64
|
+
icons: null,
|
|
65
|
+
logos: null,
|
|
66
|
+
},
|
|
67
|
+
// Hooks allow you to override the default behavior of the application
|
|
68
|
+
hooks: {
|
|
69
|
+
// Alter the vite css build config
|
|
70
|
+
cssBuildConfig: (config) => {
|
|
71
|
+
return config;
|
|
72
|
+
},
|
|
73
|
+
// Validate each component before it is exported
|
|
74
|
+
validateComponent: (component) => {
|
|
75
|
+
return {};
|
|
76
|
+
},
|
|
77
|
+
// Alter the vite client build config
|
|
78
|
+
clientBuildConfig: (config) => {
|
|
79
|
+
return config;
|
|
80
|
+
},
|
|
81
|
+
// Alter the vite html build config
|
|
82
|
+
htmlBuildConfig: (config) => {
|
|
83
|
+
return config;
|
|
84
|
+
},
|
|
85
|
+
// Alter the vite js build config
|
|
86
|
+
jsBuildConfig: (config) => {
|
|
87
|
+
return config;
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
};
|
package/package.json
CHANGED
|
@@ -17,7 +17,7 @@ export const getAllStrategies = (): ConfigDiffStrategy[] =>
|
|
|
17
17
|
* Called after component rebuilds so derived artifacts stay up-to-date.
|
|
18
18
|
*/
|
|
19
19
|
export const runAllFinalizers = async (handoff: Handoff, context?: FinalizeContext): Promise<void> => {
|
|
20
|
-
for (const strategy of strategies.values()) {
|
|
20
|
+
for (const strategy of Array.from(strategies.values())) {
|
|
21
21
|
await strategy.finalize(handoff, context);
|
|
22
22
|
}
|
|
23
23
|
};
|