@nuasite/cms-marker 0.0.63 → 0.0.65

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.
@@ -1 +1 @@
1
- {"version":3,"file":"dev-middleware.d.ts","sourceRoot":"","sources":["../../src/dev-middleware.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,MAAM,CAAA;AAEzC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAEvD,OAAO,KAAK,EAAE,gBAAgB,EAAmB,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAkBrF,wBAAgB,mBAAmB,CAClC,MAAM,EAAE,aAAa,EACrB,MAAM,EAAE,QAAQ,CAAC,gBAAgB,CAAC,EAClC,cAAc,EAAE,cAAc,EAC9B,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,EACzD,SAAS,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,QA0H5B"}
1
+ {"version":3,"file":"dev-middleware.d.ts","sourceRoot":"","sources":["../../src/dev-middleware.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,MAAM,CAAA;AAEzC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAEvD,OAAO,KAAK,EAAE,gBAAgB,EAAmB,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAkBrF,wBAAgB,mBAAmB,CAClC,MAAM,EAAE,aAAa,EACrB,MAAM,EAAE,QAAQ,CAAC,gBAAgB,CAAC,EAClC,cAAc,EAAE,cAAc,EAC9B,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,EACzD,SAAS,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,QA2H5B"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAA;AAK7C,OAAO,KAAK,EAAE,gBAAgB,EAAuB,MAAM,SAAS,CAAA;AAGpE,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,OAAO,GAAE,gBAAqB,GAAG,gBAAgB,CAkFlF;AAED,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAA;AAG5E,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AACzG,mBAAmB,SAAS,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAA;AAK7C,OAAO,KAAK,EAAE,gBAAgB,EAAuB,MAAM,SAAS,CAAA;AAGpE,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,OAAO,GAAE,gBAAqB,GAAG,gBAAgB,CAqFlF;AAED,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAA;AAG5E,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AACzG,mBAAmB,SAAS,CAAA"}
@@ -1,4 +1,4 @@
1
- import type { AvailableColors, CmsManifest, CollectionEntry, ComponentDefinition, ComponentInstance, ManifestEntry } from './types';
1
+ import type { AvailableColors, AvailableTextStyles, CmsManifest, CollectionEntry, ComponentDefinition, ComponentInstance, ManifestEntry } from './types';
2
2
  /**
3
3
  * Manages streaming manifest writes during build.
4
4
  * Accumulates entries and writes per-page manifests as pages are processed.
@@ -10,6 +10,7 @@ export declare class ManifestWriter {
10
10
  private manifestFile;
11
11
  private componentDefinitions;
12
12
  private availableColors;
13
+ private availableTextStyles;
13
14
  private writeQueue;
14
15
  constructor(manifestFile: string, componentDefinitions?: Record<string, ComponentDefinition>);
15
16
  /**
@@ -21,13 +22,17 @@ export declare class ManifestWriter {
21
22
  */
22
23
  setComponentDefinitions(definitions: Record<string, ComponentDefinition>): void;
23
24
  /**
24
- * Load available Tailwind colors from the project's CSS config
25
+ * Load available Tailwind colors and text styles from the project's CSS config
25
26
  */
26
27
  loadAvailableColors(projectRoot?: string): Promise<void>;
27
28
  /**
28
29
  * Set available colors directly (for testing or custom colors)
29
30
  */
30
31
  setAvailableColors(colors: AvailableColors): void;
32
+ /**
33
+ * Set available text styles directly (for testing or custom styles)
34
+ */
35
+ setAvailableTextStyles(textStyles: AvailableTextStyles): void;
31
36
  /**
32
37
  * Get the manifest path for a given page
33
38
  * Places manifest next to the page: /about -> /about.json, / -> /index.json
@@ -71,5 +76,9 @@ export declare class ManifestWriter {
71
76
  * Get available colors (for use in dev middleware)
72
77
  */
73
78
  getAvailableColors(): AvailableColors | undefined;
79
+ /**
80
+ * Get available text styles (for use in dev middleware)
81
+ */
82
+ getAvailableTextStyles(): AvailableTextStyles | undefined;
74
83
  }
75
84
  //# sourceMappingURL=manifest-writer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"manifest-writer.d.ts","sourceRoot":"","sources":["../../src/manifest-writer.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,eAAe,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,aAAa,EAAoB,MAAM,SAAS,CAAA;AAMrJ;;;GAGG;AACH,qBAAa,cAAc;IAC1B,OAAO,CAAC,cAAc,CAAa;IACnC,OAAO,CAAC,aAAa,CAIP;IACd,OAAO,CAAC,MAAM,CAAa;IAC3B,OAAO,CAAC,YAAY,CAAQ;IAC5B,OAAO,CAAC,oBAAoB,CAAqC;IACjE,OAAO,CAAC,eAAe,CAA6B;IACpD,OAAO,CAAC,UAAU,CAAmC;gBAEzC,YAAY,EAAE,MAAM,EAAE,oBAAoB,GAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAM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AM,CAAA;KAAE,CAAC;IAkChG;;OAEG;IACH,iBAAiB,IAAI,WAAW;IAIhC;;OAEG;IACH,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG;QAClC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAA;QACtC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAA;QAC7C,UAAU,CAAC,EAAE,eAAe,CAAA;KAC5B,GAAG,SAAS;IAIb;;OAEG;IACH,KAAK,IAAI,IAAI;IAab;;OAEG;IACH,kBAAkB,IAAI,eAAe,GAAG,SAAS;IAIjD;;OAEG;IACH,sBAAsB,IAAI,mBAAmB,GAAG,SAAS;CAGzD"}
@@ -1,7 +1,6 @@
1
- import type { AvailableColors, ColorClasses } from './types';
1
+ import type { AvailableColors, AvailableTextStyles, ColorClasses } from './types';
2
2
  /**
3
3
  * Default Tailwind CSS v4 color names.
4
- * These are available by default in Tailwind v4.
5
4
  */
6
5
  export declare const DEFAULT_TAILWIND_COLORS: readonly ["slate", "gray", "zinc", "neutral", "stone", "red", "orange", "amber", "yellow", "lime", "green", "emerald", "teal", "cyan", "sky", "blue", "indigo", "violet", "purple", "fuchsia", "pink", "rose"];
7
6
  /**
@@ -13,19 +12,13 @@ export declare const STANDARD_SHADES: readonly ["50", "100", "200", "300", "400"
13
12
  */
14
13
  export declare const SPECIAL_COLORS: readonly ["transparent", "current", "inherit", "white", "black"];
15
14
  /**
16
- * Parse Tailwind v4 CSS config to extract available colors.
17
- * Tailwind v4 uses CSS-based configuration with @theme directive.
18
- *
19
- * Example CSS:
20
- * ```css
21
- * @theme {
22
- * --color-primary-50: #eff6ff;
23
- * --color-primary-500: #3b82f6;
24
- * --color-accent: #f59e0b;
25
- * }
26
- * ```
15
+ * Parse Tailwind v4 CSS config to extract available colors with their values.
27
16
  */
28
17
  export declare function parseTailwindConfig(projectRoot?: string): Promise<AvailableColors>;
18
+ /**
19
+ * Parse Tailwind v4 CSS config to extract available text styles.
20
+ */
21
+ export declare function parseTextStyles(projectRoot?: string): Promise<AvailableTextStyles>;
29
22
  /**
30
23
  * Extract color classes from an element's class attribute.
31
24
  */
@@ -36,22 +29,14 @@ export declare function extractColorClasses(classAttr: string | null | undefined
36
29
  export declare function isColorClass(className: string): boolean;
37
30
  /**
38
31
  * Generate a new class string with a color class replaced.
39
- * @param currentClasses - Current class attribute value
40
- * @param oldColorClass - The color class to replace (e.g., 'bg-blue-500')
41
- * @param newColorClass - The new color class (e.g., 'bg-red-500')
42
- * @returns New class string with the replacement
43
32
  */
44
33
  export declare function replaceColorClass(currentClasses: string, oldColorClass: string, newColorClass: string): string;
45
34
  /**
46
35
  * Get the color type from a color class.
47
- * @param colorClass - e.g., 'bg-blue-500', 'text-white', 'hover:bg-red-600'
48
- * @returns The type: 'bg', 'text', 'border', 'hoverBg', 'hoverText', or undefined
49
36
  */
50
37
  export declare function getColorType(colorClass: string): keyof ColorClasses | undefined;
51
38
  /**
52
39
  * Parse a color class into its components.
53
- * @param colorClass - e.g., 'bg-blue-500', 'text-white', 'hover:bg-red-600'
54
- * @returns Object with prefix, colorName, and shade (if any)
55
40
  */
56
41
  export declare function parseColorClass(colorClass: string): {
57
42
  prefix: string;
@@ -1 +1 @@
1
- {"version":3,"file":"tailwind-colors.d.ts","sourceRoot":"","sources":["../../src/tailwind-colors.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAiB,MAAM,SAAS,CAAA;AAE3E;;;GAGG;AACH,eAAO,MAAM,uBAAuB,gNAuB1B,CAAA;AAEV;;GAEG;AACH,eAAO,MAAM,eAAe,uFAAwF,CAAA;AAEpH;;GAEG;AACH,eAAO,MAAM,cAAc,kEAAmE,CAAA;AAgC9F;;;;;;;;;;;;GAYG;AACH,wBAAsB,mBAAmB,CAAC,WAAW,GAAE,MAAsB,GAAG,OAAO,CAAC,eAAe,CAAC,CA+CvG;AA6FD;;GAEG;AACH,wBAAgB,mBAAmB,C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