pattern-dump 0.1.0-alpha.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 (47) hide show
  1. package/LICENSE +8 -0
  2. package/README.md +92 -0
  3. package/dist/dev-ui/main.css +1825 -0
  4. package/dist/dev-ui/main.js +3054 -0
  5. package/dist/index.d.ts +1 -0
  6. package/dist/index.js +7 -0
  7. package/dist/pd.js +4759 -0
  8. package/dist/types/config/index.d.ts +145 -0
  9. package/dist/types/contracts/dev-protocol.d.ts +624 -0
  10. package/dist/types/contracts/index.d.ts +294 -0
  11. package/package.json +76 -0
  12. package/templates/base/README.md +77 -0
  13. package/templates/base/_gitignore +3 -0
  14. package/templates/base/pattern-dump.config.ts +36 -0
  15. package/templates/base/src/scripts/globals.d.ts +6 -0
  16. package/templates/base/src/styles/base/_tokens.scss +8 -0
  17. package/templates/base/src/styles/base/document.scss +18 -0
  18. package/templates/base/themes/dark.theme.scss +8 -0
  19. package/templates/base/themes/light.theme.scss +8 -0
  20. package/templates/base/tsconfig.json +19 -0
  21. package/templates/examples/src/patterns/atoms/button/button.hbs +1 -0
  22. package/templates/examples/src/patterns/atoms/button/button.json +1 -0
  23. package/templates/examples/src/patterns/atoms/button/button.md +21 -0
  24. package/templates/examples/src/patterns/atoms/button/button.schema.json +11 -0
  25. package/templates/examples/src/patterns/atoms/button/button~icon.hbs +5 -0
  26. package/templates/examples/src/patterns/atoms/button/button~secondary.json +1 -0
  27. package/templates/examples/src/patterns/atoms/index.md +6 -0
  28. package/templates/examples/src/patterns/index.md +3 -0
  29. package/templates/examples/src/patterns/molecules/index.md +6 -0
  30. package/templates/examples/src/patterns/molecules/search-field/input/input.hbs +4 -0
  31. package/templates/examples/src/patterns/molecules/search-field/input/input.json +1 -0
  32. package/templates/examples/src/patterns/molecules/search-field/input/input.md +8 -0
  33. package/templates/examples/src/patterns/molecules/search-field/input/input.schema.json +10 -0
  34. package/templates/examples/src/patterns/molecules/search-field/search-field.hbs +5 -0
  35. package/templates/examples/src/patterns/molecules/search-field/search-field.json +1 -0
  36. package/templates/examples/src/patterns/molecules/search-field/search-field.md +21 -0
  37. package/templates/examples/src/patterns/molecules/search-field/search-field.schema.json +11 -0
  38. package/templates/examples/src/patterns/pages/example/example.hbs +11 -0
  39. package/templates/examples/src/patterns/pages/example/example.json +8 -0
  40. package/templates/examples/src/patterns/pages/example/example.md +11 -0
  41. package/templates/examples/src/patterns/pages/example/example.schema.json +14 -0
  42. package/templates/examples/src/patterns/pages/index.md +6 -0
  43. package/templates/examples/src/scripts/search-field.ts +16 -0
  44. package/templates/examples/src/styles/atoms/button.scss +36 -0
  45. package/templates/examples/src/styles/molecules/search-field/input.scss +21 -0
  46. package/templates/examples/src/styles/molecules/search-field.scss +13 -0
  47. package/templates/examples/src/styles/pages/example.scss +28 -0
package/LICENSE ADDED
@@ -0,0 +1,8 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 n8d and contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, subject to the conditions of the MIT License.
8
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND.
package/README.md ADDED
@@ -0,0 +1,92 @@
1
+ # Pattern Dump
2
+
3
+ A workbench for HTML and CSS design systems, and a successor to PatternLab. Write components as
4
+ Handlebars templates with SCSS, data and Markdown docs; Pattern Dump shows them live, checks them, maps
5
+ how they relate, and publishes the result as a static site.
6
+
7
+ > **Alpha (0.1.0-alpha.0).** Published under the `alpha` tag. Options and file conventions can still change
8
+ > between releases.
9
+
10
+ ## Requirements
11
+
12
+ Node.js 20.10 or later, and npm.
13
+
14
+ ## Quick start
15
+
16
+ Create a new project:
17
+
18
+ ```bash
19
+ npx pattern-dump@alpha init my-design-system
20
+ cd my-design-system
21
+ npm run dev # → http://localhost:4000
22
+ ```
23
+
24
+ Or add Pattern Dump to an existing project:
25
+
26
+ ```bash
27
+ npm install --save-dev pattern-dump@alpha
28
+ npx pd init
29
+ ```
30
+
31
+ `pd init` writes a config, a patterns and styles tree, light and dark themes, a TypeScript setup and a
32
+ few starter components, and adds `dev`, `audit`, `typecheck` and `build:scripts` scripts. It never
33
+ overwrites an existing file.
34
+
35
+ ## Commands
36
+
37
+ | Command | What it does |
38
+ |---|---|
39
+ | `pd init [dir]` | Set up a project |
40
+ | `pd dev` | Start the workbench with live reload |
41
+ | `pd audit` | Report defects across every component (`--format md`, `text` or `json`) |
42
+ | `pd build` | Write the workbench as a static site for any host |
43
+ | `pd export` | Rewrite near-duplicate component copies as one base with variants |
44
+ | `pd help [command]` | Show options |
45
+
46
+ ## Configuration
47
+
48
+ ```ts
49
+ // pattern-dump.config.ts
50
+ import { defineConfig } from "pattern-dump";
51
+
52
+ export default defineConfig({
53
+ sourceDir: "./src",
54
+ patternsDir: "./src/patterns",
55
+ outDir: "./dist",
56
+ styles: { strategy: "parallel", dir: "./src/styles" },
57
+ themes: { dir: "./themes", default: "light" },
58
+ assets: { strategy: "central", dir: "./assets" },
59
+ scriptsDir: "./src/scripts",
60
+ });
61
+ ```
62
+
63
+ ## Features
64
+
65
+ - **Live workbench:** every component and variant, with themes, viewport sizes, colour-vision simulation
66
+ and reload on save.
67
+ - **Docs next to the code:** Markdown docs with live examples and source rendered from the component.
68
+ - **Relationships:** which components each one uses and is used by, including borrowed CSS classes.
69
+ - **Checks:** render errors, schema mismatches, HTML validation and accessibility findings, per component
70
+ and across the whole design system.
71
+ - **Static publishing:** the whole workbench as plain files.
72
+ - **Pattern packages:** use a design system from npm next to your own components.
73
+
74
+ ## Documentation
75
+
76
+ - [Getting started](https://github.com/n8design/pattern-dump/blob/main/docs/guide/getting-started.md)
77
+ - [Authoring components](https://github.com/n8design/pattern-dump/blob/main/docs/guide/authoring.md)
78
+ - [Configuration](https://github.com/n8design/pattern-dump/blob/main/docs/guide/configuration.md)
79
+ - [Themes](https://github.com/n8design/pattern-dump/blob/main/docs/guide/themes.md)
80
+ - [Pattern packages](https://github.com/n8design/pattern-dump/blob/main/docs/guide/pattern-packages.md)
81
+ - [Static build](https://github.com/n8design/pattern-dump/blob/main/docs/guide/static-build.md)
82
+ - [Command line](https://github.com/n8design/pattern-dump/blob/main/docs/guide/cli.md)
83
+
84
+ ## Support
85
+
86
+ - Bugs and feature requests: [GitHub issues](https://github.com/n8design/pattern-dump/issues)
87
+ - Sponsor the work: [Stefan Bauer](https://github.com/sponsors/stfbauer) ·
88
+ [n8design](https://github.com/sponsors/n8design)
89
+
90
+ ## License
91
+
92
+ [MIT](https://github.com/n8design/pattern-dump/blob/main/LICENSE) © 2026 [n8d](https://n8d.at) and contributors