pattern-dump 0.1.0-alpha.2 → 0.1.0-alpha.4

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.
@@ -37,9 +37,10 @@ export interface StylesConfig {
37
37
  entry?: string | string[];
38
38
  }
39
39
  export interface ThemesConfig {
40
- /** Directory of theme files (custom-property value-sets). */
41
- dir: string;
42
- /** Default theme name applied via data-theme on the preview body. */
40
+ /** Directory of the project's own theme files (custom-property value-sets). Leave it out to use
41
+ * only the themes pattern packages provide, with `default` naming one of them. */
42
+ dir?: string;
43
+ /** Default theme name applied via data-theme on the preview body: a project theme or a package's. */
43
44
  default: string;
44
45
  /** Switch wiring: attribute toggle (default) or per-theme stylesheet swap. */
45
46
  switch?: ThemeSwitch;
@@ -66,10 +67,17 @@ export interface ShellConfig {
66
67
  * invoking `cwd`. This holds even when the file is supplied via `--config` from outside the
67
68
  * root — which is what lets PD open a read-only project it does not own.
68
69
  */
69
- /** A pattern package named in the config: the npm name, or the name plus extra excludes. */
70
+ /**
71
+ * A pattern package named in the config: the npm name, or the name plus options.
72
+ * - `exclude`: extra globs of the package's templates to hide.
73
+ * - `styles: false`: leave the package's stylesheets out (its templates, data, themes, scripts and
74
+ * assets are still used), e.g. when the project compiles that CSS itself. A package reached only
75
+ * as another package's peer can be named here just to carry this option.
76
+ */
70
77
  export type PackageReference = string | {
71
78
  name: string;
72
79
  exclude?: string[];
80
+ styles?: boolean;
73
81
  };
74
82
  export interface PatternDumpConfig {
75
83
  sourceDir: string;
@@ -8,7 +8,8 @@ export type ComponentStatus = "draft" | "stable" | "deprecated";
8
8
  * in both — the markup directly in <body>, no wrapper — only the frame around it differs:
9
9
  * - "centered": the frame is sized to what the content needs (pd-width, measured at the full width
10
10
  * available) and to its height (pd-height), and the stage centres it (atoms/molecules/organisms)
11
- * - "full": the frame fills the stage width AND height, top-aligned (pages/templates)
11
+ * - "full": the frame fills the stage width AND height, top-aligned (pages/templates, with or
12
+ * without an ordering prefix: `05-pages` counts)
12
13
  * This is the RESOLVED mode (category default ← category index.md frontmatter ← component override),
13
14
  * so the shell renders directly without re-deriving precedence.
14
15
  */
@@ -69,7 +70,7 @@ export interface TreeNode {
69
70
  children?: TreeNode[];
70
71
  }
71
72
  export type DiagnosticSeverity = "error" | "warning" | "info";
72
- export type DiagnosticKind = "RENDER_ERROR" | "UNFILLED_REQUIRED" | "SHAPE_MISMATCH" | "HTML_INVALID" | "CASCADE_WARNING" | "A11Y" | "HIGHLIGHT_FALLBACK" | "HANDLE_COLLISION";
73
+ export type DiagnosticKind = "RENDER_ERROR" | "UNFILLED_REQUIRED" | "SHAPE_MISMATCH" | "HTML_INVALID" | "CASCADE_WARNING" | "A11Y" | "HIGHLIGHT_FALLBACK" | "HANDLE_COLLISION" | "DATA_INVALID";
73
74
  /** Fields every diagnostic carries, whichever engine produced it. */
74
75
  interface DiagnosticBase {
75
76
  severity: DiagnosticSeverity;
@@ -80,7 +81,7 @@ interface DiagnosticBase {
80
81
  ruleId?: string;
81
82
  /** JSON Schema / data pointer, e.g. "#/properties/label" — schema kinds only. */
82
83
  path?: string;
83
- /** Source-file position — RENDER_ERROR, best-effort. */
84
+ /** Source-file position — RENDER_ERROR and DATA_INVALID, best-effort. */
84
85
  location?: {
85
86
  file?: string;
86
87
  line?: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pattern-dump",
3
- "version": "0.1.0-alpha.2",
3
+ "version": "0.1.0-alpha.4",
4
4
  "description": "A workbench for HTML and CSS design systems: live component previews, docs, checks and static publishing.",
5
5
  "keywords": [
6
6
  "design-system",
@@ -69,6 +69,7 @@
69
69
  "markdown-it": "^14.2.0",
70
70
  "node-html-parser": "^7.1.0",
71
71
  "postcss": "^8.5.15",
72
+ "postcss-selector-parser": "^7.1.1",
72
73
  "sass": "^1.100.0",
73
74
  "shiki": "^4.1.0",
74
75
  "source-map": "^0.6.1",