@tenphi/tasty 0.0.0-snapshot.26b4630 → 0.0.0-snapshot.2705ab9

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 (218) hide show
  1. package/README.md +315 -159
  2. package/dist/chunks/cacheKey.js +16 -8
  3. package/dist/chunks/cacheKey.js.map +1 -1
  4. package/dist/chunks/definitions.d.ts +1 -1
  5. package/dist/chunks/definitions.js +2 -3
  6. package/dist/chunks/definitions.js.map +1 -1
  7. package/dist/chunks/renderChunk.js +31 -32
  8. package/dist/chunks/renderChunk.js.map +1 -1
  9. package/dist/config.d.ts +98 -12
  10. package/dist/config.js +134 -33
  11. package/dist/config.js.map +1 -1
  12. package/dist/core/index.d.ts +11 -10
  13. package/dist/core/index.js +8 -7
  14. package/dist/counter-style/index.js +51 -0
  15. package/dist/counter-style/index.js.map +1 -0
  16. package/dist/debug.d.ts +26 -141
  17. package/dist/debug.js +356 -635
  18. package/dist/debug.js.map +1 -1
  19. package/dist/font-face/index.js +63 -0
  20. package/dist/font-face/index.js.map +1 -0
  21. package/dist/hooks/resolve-ssr-collector.js +15 -0
  22. package/dist/hooks/resolve-ssr-collector.js.map +1 -0
  23. package/dist/hooks/useCounterStyle.d.ts +50 -0
  24. package/dist/hooks/useCounterStyle.js +47 -0
  25. package/dist/hooks/useCounterStyle.js.map +1 -0
  26. package/dist/hooks/useFontFace.d.ts +43 -0
  27. package/dist/hooks/useFontFace.js +71 -0
  28. package/dist/hooks/useFontFace.js.map +1 -0
  29. package/dist/hooks/useGlobalStyles.d.ts +3 -0
  30. package/dist/hooks/useGlobalStyles.js +24 -1
  31. package/dist/hooks/useGlobalStyles.js.map +1 -1
  32. package/dist/hooks/useKeyframes.js +14 -3
  33. package/dist/hooks/useKeyframes.js.map +1 -1
  34. package/dist/hooks/useProperty.js +32 -13
  35. package/dist/hooks/useProperty.js.map +1 -1
  36. package/dist/hooks/useRawCSS.js +9 -1
  37. package/dist/hooks/useRawCSS.js.map +1 -1
  38. package/dist/hooks/useStyles.d.ts +5 -0
  39. package/dist/hooks/useStyles.js +115 -46
  40. package/dist/hooks/useStyles.js.map +1 -1
  41. package/dist/index.d.ts +22 -11
  42. package/dist/index.js +10 -7
  43. package/dist/injector/index.d.ts +28 -2
  44. package/dist/injector/index.js +27 -1
  45. package/dist/injector/index.js.map +1 -1
  46. package/dist/injector/injector.d.ts +28 -1
  47. package/dist/injector/injector.js +93 -32
  48. package/dist/injector/injector.js.map +1 -1
  49. package/dist/injector/sheet-manager.d.ts +16 -7
  50. package/dist/injector/sheet-manager.js +31 -11
  51. package/dist/injector/sheet-manager.js.map +1 -1
  52. package/dist/injector/types.d.ts +70 -1
  53. package/dist/parser/classify.js +5 -4
  54. package/dist/parser/classify.js.map +1 -1
  55. package/dist/parser/const.js +17 -1
  56. package/dist/parser/const.js.map +1 -1
  57. package/dist/parser/parser.js +1 -1
  58. package/dist/pipeline/conditions.js +14 -8
  59. package/dist/pipeline/conditions.js.map +1 -1
  60. package/dist/pipeline/index.d.ts +3 -1
  61. package/dist/pipeline/index.js +137 -69
  62. package/dist/pipeline/index.js.map +1 -1
  63. package/dist/pipeline/materialize.js +404 -208
  64. package/dist/pipeline/materialize.js.map +1 -1
  65. package/dist/pipeline/parseStateKey.d.ts +1 -1
  66. package/dist/pipeline/parseStateKey.js +37 -20
  67. package/dist/pipeline/parseStateKey.js.map +1 -1
  68. package/dist/pipeline/simplify.js +111 -152
  69. package/dist/pipeline/simplify.js.map +1 -1
  70. package/dist/pipeline/warnings.js +18 -0
  71. package/dist/pipeline/warnings.js.map +1 -0
  72. package/dist/plugins/okhsl-plugin.js +2 -275
  73. package/dist/plugins/okhsl-plugin.js.map +1 -1
  74. package/dist/plugins/types.d.ts +9 -2
  75. package/dist/properties/index.js +82 -17
  76. package/dist/properties/index.js.map +1 -1
  77. package/dist/properties/property-type-resolver.d.ts +24 -0
  78. package/dist/properties/property-type-resolver.js +91 -0
  79. package/dist/properties/property-type-resolver.js.map +1 -0
  80. package/dist/ssr/astro.d.ts +29 -0
  81. package/dist/ssr/astro.js +65 -0
  82. package/dist/ssr/astro.js.map +1 -0
  83. package/dist/ssr/async-storage.d.ts +17 -0
  84. package/dist/ssr/async-storage.js +35 -0
  85. package/dist/ssr/async-storage.js.map +1 -0
  86. package/dist/ssr/collect-auto-properties.js +40 -0
  87. package/dist/ssr/collect-auto-properties.js.map +1 -0
  88. package/dist/ssr/collector.d.ts +102 -0
  89. package/dist/ssr/collector.js +227 -0
  90. package/dist/ssr/collector.js.map +1 -0
  91. package/dist/ssr/context.d.ts +8 -0
  92. package/dist/ssr/context.js +14 -0
  93. package/dist/ssr/context.js.map +1 -0
  94. package/dist/ssr/format-global-rules.js +22 -0
  95. package/dist/ssr/format-global-rules.js.map +1 -0
  96. package/dist/ssr/format-keyframes.js +70 -0
  97. package/dist/ssr/format-keyframes.js.map +1 -0
  98. package/dist/ssr/format-property.js +50 -0
  99. package/dist/ssr/format-property.js.map +1 -0
  100. package/dist/ssr/format-rules.js +73 -0
  101. package/dist/ssr/format-rules.js.map +1 -0
  102. package/dist/ssr/hydrate.d.ts +22 -0
  103. package/dist/ssr/hydrate.js +50 -0
  104. package/dist/ssr/hydrate.js.map +1 -0
  105. package/dist/ssr/index.d.ts +5 -0
  106. package/dist/ssr/index.js +12 -0
  107. package/dist/ssr/index.js.map +1 -0
  108. package/dist/ssr/next.d.ts +45 -0
  109. package/dist/ssr/next.js +71 -0
  110. package/dist/ssr/next.js.map +1 -0
  111. package/dist/ssr/ssr-collector-ref.js +12 -0
  112. package/dist/ssr/ssr-collector-ref.js.map +1 -0
  113. package/dist/states/index.js +12 -257
  114. package/dist/states/index.js.map +1 -1
  115. package/dist/styles/align.d.ts +1 -1
  116. package/dist/styles/align.js.map +1 -1
  117. package/dist/styles/border.d.ts +1 -1
  118. package/dist/styles/border.js +2 -2
  119. package/dist/styles/border.js.map +1 -1
  120. package/dist/styles/color.d.ts +2 -2
  121. package/dist/styles/color.js +9 -5
  122. package/dist/styles/color.js.map +1 -1
  123. package/dist/styles/createStyle.js +25 -22
  124. package/dist/styles/createStyle.js.map +1 -1
  125. package/dist/styles/fade.d.ts +1 -1
  126. package/dist/styles/fade.js.map +1 -1
  127. package/dist/styles/fill.d.ts +14 -16
  128. package/dist/styles/fill.js +6 -5
  129. package/dist/styles/fill.js.map +1 -1
  130. package/dist/styles/flow.d.ts +3 -3
  131. package/dist/styles/flow.js.map +1 -1
  132. package/dist/styles/index.js +1 -1
  133. package/dist/styles/justify.d.ts +1 -1
  134. package/dist/styles/justify.js.map +1 -1
  135. package/dist/styles/predefined.d.ts +0 -2
  136. package/dist/styles/predefined.js +1 -4
  137. package/dist/styles/predefined.js.map +1 -1
  138. package/dist/styles/preset.d.ts +5 -0
  139. package/dist/styles/preset.js +48 -47
  140. package/dist/styles/preset.js.map +1 -1
  141. package/dist/styles/radius.d.ts +1 -1
  142. package/dist/styles/radius.js.map +1 -1
  143. package/dist/styles/scrollbar.d.ts +9 -5
  144. package/dist/styles/scrollbar.js +25 -82
  145. package/dist/styles/scrollbar.js.map +1 -1
  146. package/dist/styles/shadow.d.ts +2 -2
  147. package/dist/styles/shadow.js.map +1 -1
  148. package/dist/styles/transition.d.ts +1 -1
  149. package/dist/styles/transition.js +1 -1
  150. package/dist/styles/transition.js.map +1 -1
  151. package/dist/styles/types.d.ts +70 -21
  152. package/dist/tasty.d.ts +30 -893
  153. package/dist/tasty.js +60 -19
  154. package/dist/tasty.js.map +1 -1
  155. package/dist/types.d.ts +3 -3
  156. package/dist/utils/cache-wrapper.js +4 -8
  157. package/dist/utils/cache-wrapper.js.map +1 -1
  158. package/dist/utils/color-math.d.ts +46 -0
  159. package/dist/utils/color-math.js +749 -0
  160. package/dist/utils/color-math.js.map +1 -0
  161. package/dist/utils/color-space.d.ts +5 -0
  162. package/dist/utils/color-space.js +229 -0
  163. package/dist/utils/color-space.js.map +1 -0
  164. package/dist/utils/colors.d.ts +1 -1
  165. package/dist/utils/colors.js +3 -1
  166. package/dist/utils/colors.js.map +1 -1
  167. package/dist/utils/css-types.d.ts +1 -1
  168. package/dist/utils/dotize.d.ts +1 -1
  169. package/dist/utils/has-keys.js +13 -0
  170. package/dist/utils/has-keys.js.map +1 -0
  171. package/dist/utils/mod-attrs.js +2 -2
  172. package/dist/utils/mod-attrs.js.map +1 -1
  173. package/dist/utils/process-tokens.d.ts +3 -13
  174. package/dist/utils/process-tokens.js +18 -98
  175. package/dist/utils/process-tokens.js.map +1 -1
  176. package/dist/utils/selector-transform.js +32 -0
  177. package/dist/utils/selector-transform.js.map +1 -0
  178. package/dist/utils/string.js.map +1 -1
  179. package/dist/utils/styles.d.ts +4 -88
  180. package/dist/utils/styles.js +34 -398
  181. package/dist/utils/styles.js.map +1 -1
  182. package/dist/utils/typography.d.ts +24 -13
  183. package/dist/utils/typography.js +14 -16
  184. package/dist/utils/typography.js.map +1 -1
  185. package/dist/zero/babel.d.ts +67 -8
  186. package/dist/zero/babel.js +109 -17
  187. package/dist/zero/babel.js.map +1 -1
  188. package/dist/zero/extractor.js +118 -1
  189. package/dist/zero/extractor.js.map +1 -1
  190. package/dist/zero/next.d.ts +44 -30
  191. package/dist/zero/next.js +102 -38
  192. package/dist/zero/next.js.map +1 -1
  193. package/docs/PIPELINE.md +519 -0
  194. package/docs/README.md +31 -0
  195. package/docs/adoption.md +296 -0
  196. package/docs/comparison.md +420 -0
  197. package/docs/configuration.md +326 -0
  198. package/docs/debug.md +318 -0
  199. package/docs/design-system.md +424 -0
  200. package/docs/dsl.md +673 -0
  201. package/docs/getting-started.md +217 -0
  202. package/docs/injector.md +528 -0
  203. package/docs/methodology.md +567 -0
  204. package/docs/runtime.md +485 -0
  205. package/docs/ssr.md +384 -0
  206. package/docs/styles.md +579 -0
  207. package/docs/tasty-static.md +433 -0
  208. package/package.json +98 -28
  209. package/dist/styles/styledScrollbar.d.ts +0 -47
  210. package/dist/styles/styledScrollbar.js +0 -38
  211. package/dist/styles/styledScrollbar.js.map +0 -1
  212. package/dist/tokens/typography.d.ts +0 -19
  213. package/dist/tokens/typography.js +0 -237
  214. package/dist/tokens/typography.js.map +0 -1
  215. package/dist/utils/hsl-to-rgb.js +0 -38
  216. package/dist/utils/hsl-to-rgb.js.map +0 -1
  217. package/dist/utils/okhsl-to-rgb.js +0 -296
  218. package/dist/utils/okhsl-to-rgb.js.map +0 -1
@@ -0,0 +1,51 @@
1
+ //#region src/counter-style/index.ts
2
+ const COUNTER_STYLE_KEY = "@counterStyle";
3
+ /**
4
+ * Check if styles object has local @counterStyle definition.
5
+ */
6
+ function hasLocalCounterStyle(styles) {
7
+ return COUNTER_STYLE_KEY in styles;
8
+ }
9
+ /**
10
+ * Extract local @counterStyle from styles object.
11
+ * Returns null if no local counter styles (fast path).
12
+ */
13
+ function extractLocalCounterStyle(styles) {
14
+ const counterStyle = styles[COUNTER_STYLE_KEY];
15
+ if (!counterStyle || typeof counterStyle !== "object") return null;
16
+ return counterStyle;
17
+ }
18
+ const COUNTER_STYLE_DESCRIPTOR_MAP = {
19
+ system: "system",
20
+ symbols: "symbols",
21
+ additiveSymbols: "additive-symbols",
22
+ prefix: "prefix",
23
+ suffix: "suffix",
24
+ negative: "negative",
25
+ range: "range",
26
+ pad: "pad",
27
+ fallback: "fallback",
28
+ speakAs: "speak-as"
29
+ };
30
+ /**
31
+ * Format the inner declarations of a @counter-style rule (no wrapper).
32
+ * Used by the injector which needs selector and declarations separately.
33
+ */
34
+ function formatCounterStyleDeclarations(descriptors) {
35
+ const parts = [];
36
+ for (const [key, cssName] of Object.entries(COUNTER_STYLE_DESCRIPTOR_MAP)) {
37
+ const value = descriptors[key];
38
+ if (value !== void 0) parts.push(`${cssName}: ${value};`);
39
+ }
40
+ return parts.join(" ");
41
+ }
42
+ /**
43
+ * Format a @counter-style rule as CSS.
44
+ */
45
+ function formatCounterStyleRule(name, descriptors) {
46
+ return `@counter-style ${name} { ${formatCounterStyleDeclarations(descriptors)} }`;
47
+ }
48
+
49
+ //#endregion
50
+ export { extractLocalCounterStyle, formatCounterStyleDeclarations, formatCounterStyleRule, hasLocalCounterStyle };
51
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/counter-style/index.ts"],"sourcesContent":["/**\n * Counter Style Utilities\n *\n * Utilities for extracting and processing CSS @counter-style definitions in styles.\n * Counter-style rules are permanent once injected and do not need cleanup.\n */\n\nimport type { CounterStyleDescriptors } from '../injector/types';\nimport type { Styles } from '../styles/types';\n\n// ============================================================================\n// Constants\n// ============================================================================\n\nconst COUNTER_STYLE_KEY = '@counterStyle';\n\n// ============================================================================\n// Extraction Functions\n// ============================================================================\n\n/**\n * Check if styles object has local @counterStyle definition.\n */\nexport function hasLocalCounterStyle(styles: Styles): boolean {\n return COUNTER_STYLE_KEY in styles;\n}\n\n/**\n * Extract local @counterStyle from styles object.\n * Returns null if no local counter styles (fast path).\n */\nexport function extractLocalCounterStyle(\n styles: Styles,\n): Record<string, CounterStyleDescriptors> | null {\n const counterStyle = styles[COUNTER_STYLE_KEY];\n if (!counterStyle || typeof counterStyle !== 'object') {\n return null;\n }\n return counterStyle as Record<string, CounterStyleDescriptors>;\n}\n\n// ============================================================================\n// CSS Formatting\n// ============================================================================\n\nconst COUNTER_STYLE_DESCRIPTOR_MAP: Record<string, string> = {\n system: 'system',\n symbols: 'symbols',\n additiveSymbols: 'additive-symbols',\n prefix: 'prefix',\n suffix: 'suffix',\n negative: 'negative',\n range: 'range',\n pad: 'pad',\n fallback: 'fallback',\n speakAs: 'speak-as',\n};\n\n/**\n * Format the inner declarations of a @counter-style rule (no wrapper).\n * Used by the injector which needs selector and declarations separately.\n */\nexport function formatCounterStyleDeclarations(\n descriptors: CounterStyleDescriptors,\n): string {\n const parts: string[] = [];\n\n for (const [key, cssName] of Object.entries(COUNTER_STYLE_DESCRIPTOR_MAP)) {\n const value = descriptors[key as keyof CounterStyleDescriptors];\n if (value !== undefined) {\n parts.push(`${cssName}: ${value};`);\n }\n }\n\n return parts.join(' ');\n}\n\n/**\n * Format a @counter-style rule as CSS.\n */\nexport function formatCounterStyleRule(\n name: string,\n descriptors: CounterStyleDescriptors,\n): string {\n return `@counter-style ${name} { ${formatCounterStyleDeclarations(descriptors)} }`;\n}\n"],"mappings":";AAcA,MAAM,oBAAoB;;;;AAS1B,SAAgB,qBAAqB,QAAyB;AAC5D,QAAO,qBAAqB;;;;;;AAO9B,SAAgB,yBACd,QACgD;CAChD,MAAM,eAAe,OAAO;AAC5B,KAAI,CAAC,gBAAgB,OAAO,iBAAiB,SAC3C,QAAO;AAET,QAAO;;AAOT,MAAM,+BAAuD;CAC3D,QAAQ;CACR,SAAS;CACT,iBAAiB;CACjB,QAAQ;CACR,QAAQ;CACR,UAAU;CACV,OAAO;CACP,KAAK;CACL,UAAU;CACV,SAAS;CACV;;;;;AAMD,SAAgB,+BACd,aACQ;CACR,MAAM,QAAkB,EAAE;AAE1B,MAAK,MAAM,CAAC,KAAK,YAAY,OAAO,QAAQ,6BAA6B,EAAE;EACzE,MAAM,QAAQ,YAAY;AAC1B,MAAI,UAAU,OACZ,OAAM,KAAK,GAAG,QAAQ,IAAI,MAAM,GAAG;;AAIvC,QAAO,MAAM,KAAK,IAAI;;;;;AAMxB,SAAgB,uBACd,MACA,aACQ;AACR,QAAO,kBAAkB,KAAK,KAAK,+BAA+B,YAAY,CAAC"}
package/dist/debug.d.ts CHANGED
@@ -1,17 +1,21 @@
1
+ import { CacheMetrics } from "./injector/types.js";
2
+
1
3
  //#region src/debug.d.ts
2
- /**
3
- * Debug utilities for inspecting tasty-generated CSS at runtime
4
- */
5
4
  declare global {
6
5
  interface Window {
7
6
  tastyDebug?: typeof tastyDebug;
8
7
  }
9
8
  }
10
9
  type CSSTarget = 'all' | 'global' | 'active' | 'unused' | 'page' | string | string[] | Element;
11
- interface CssOptions {
10
+ interface DebugOptions {
12
11
  root?: Document | ShadowRoot;
12
+ /** Suppress console logging and return data only (default: false) */
13
+ raw?: boolean;
14
+ }
15
+ interface CssOptions extends DebugOptions {
13
16
  prettify?: boolean;
14
- log?: boolean;
17
+ /** Read from stored source CSS (dev-mode only) instead of live CSSOM */
18
+ source?: boolean;
15
19
  }
16
20
  interface ChunkInfo {
17
21
  className: string;
@@ -25,22 +29,6 @@ interface InspectResult {
25
29
  size: number;
26
30
  rules: number;
27
31
  }
28
- interface CacheMetrics {
29
- hits: number;
30
- misses: number;
31
- bulkCleanups: number;
32
- totalInsertions: number;
33
- totalUnused: number;
34
- stylesCleanedUp: number;
35
- cleanupHistory: {
36
- timestamp: number;
37
- classesDeleted: number;
38
- cssSize: number;
39
- rulesDeleted: number;
40
- }[];
41
- startTime: number;
42
- unusedHits?: number;
43
- }
44
32
  interface CacheStatus {
45
33
  classes: {
46
34
  active: string[];
@@ -49,17 +37,14 @@ interface CacheStatus {
49
37
  };
50
38
  metrics: CacheMetrics | null;
51
39
  }
52
- interface Definitions {
53
- properties: string[];
54
- keyframes: {
55
- name: string;
56
- refCount: number;
57
- }[];
58
- }
59
- interface SummaryOptions {
60
- root?: Document | ShadowRoot;
61
- log?: boolean;
62
- includePageCSS?: false | true | 'all';
40
+ interface ChunkBreakdown {
41
+ byChunk: Record<string, {
42
+ classes: string[];
43
+ cssSize: number;
44
+ ruleCount: number;
45
+ }>;
46
+ totalChunkTypes: number;
47
+ totalClasses: number;
63
48
  }
64
49
  interface Summary {
65
50
  activeClasses: string[];
@@ -72,132 +57,32 @@ interface Summary {
72
57
  keyframesCSSSize: number;
73
58
  propertyCSSSize: number;
74
59
  totalCSSSize: number;
75
- activeCSS: string;
76
- unusedCSS: string;
77
- globalCSS: string;
78
- rawCSS: string;
79
- keyframesCSS: string;
80
- propertyCSS: string;
81
- allCSS: string;
60
+ activeRuleCount: number;
61
+ unusedRuleCount: number;
82
62
  globalRuleCount: number;
83
63
  rawRuleCount: number;
84
64
  keyframesRuleCount: number;
85
65
  propertyRuleCount: number;
86
- page?: {
87
- css?: string;
88
- cssSize: number;
89
- ruleCount: number;
90
- stylesheetCount: number;
91
- skippedStylesheets: number;
92
- };
66
+ totalRuleCount: number;
93
67
  metrics: CacheMetrics | null;
94
68
  definedProperties: string[];
95
69
  definedKeyframes: {
96
70
  name: string;
97
71
  refCount: number;
98
72
  }[];
99
- propertyCount: number;
100
- keyframeCount: number;
101
- cleanupSummary: {
102
- enabled: boolean;
103
- totalCleanups: number;
104
- totalClassesDeleted: number;
105
- totalCssDeleted: number;
106
- totalRulesDeleted: number;
107
- averageClassesPerCleanup: number;
108
- averageCssPerCleanup: number;
109
- averageRulesPerCleanup: number;
110
- lastCleanup?: {
111
- timestamp: number;
112
- date: string;
113
- classesDeleted: number;
114
- cssSize: number;
115
- rulesDeleted: number;
116
- };
117
- };
118
- chunkBreakdown: {
119
- byChunk: Record<string, {
120
- classes: string[];
121
- cssSize: number;
122
- ruleCount: number;
123
- }>;
124
- totalChunkTypes: number;
125
- };
73
+ chunkBreakdown: ChunkBreakdown;
126
74
  }
127
- /**
128
- * Concise tastyDebug API for inspecting styles at runtime
129
- */
130
75
  declare const tastyDebug: {
131
76
  css(target: CSSTarget, opts?: CssOptions): string;
132
- inspect(target: string | Element, opts?: {
133
- root?: Document | ShadowRoot;
134
- }): InspectResult;
135
- cache(opts?: {
136
- root?: Document | ShadowRoot;
137
- includeHistory?: boolean;
138
- }): CacheStatus;
77
+ inspect(target: string | Element, opts?: DebugOptions): InspectResult;
78
+ summary(opts?: DebugOptions): Summary;
79
+ chunks(opts?: DebugOptions): ChunkBreakdown;
80
+ cache(opts?: DebugOptions): CacheStatus;
139
81
  cleanup(opts?: {
140
82
  root?: Document | ShadowRoot;
141
83
  }): void;
142
- metrics(opts?: {
143
- root?: Document | ShadowRoot;
144
- }): CacheMetrics | null;
145
- resetMetrics(opts?: {
146
- root?: Document | ShadowRoot;
147
- }): void;
148
- /**
149
- * Get breakdown of styles by chunk type.
150
- *
151
- * With style chunking enabled, styles are split into logical chunks
152
- * (appearance, font, dimension, container, etc.) for better caching
153
- * and CSS reuse.
154
- *
155
- * @param opts - Options including root document/shadow root
156
- * @returns Breakdown by chunk type with class counts and CSS sizes
157
- */
158
- chunks(opts?: {
159
- root?: Document | ShadowRoot;
160
- log?: boolean;
161
- }): {
162
- byChunk: Record<string, {
163
- classes: string[];
164
- cssSize: number;
165
- ruleCount: number;
166
- }>;
167
- totalChunkTypes: number;
168
- totalClasses: number;
169
- };
170
- getGlobalTypeCSS(type: "global" | "raw" | "keyframes" | "property", opts?: {
171
- root?: Document | ShadowRoot;
172
- }): {
173
- css: string;
174
- ruleCount: number;
175
- size: number;
176
- };
177
- defs(opts?: {
178
- root?: Document | ShadowRoot;
179
- }): Definitions;
180
- summary(opts?: SummaryOptions): Summary;
181
- pageCSS(opts?: {
182
- root?: Document | ShadowRoot;
183
- prettify?: boolean;
184
- log?: boolean;
185
- includeCrossOrigin?: boolean;
186
- }): string;
187
- pageStats(opts?: {
188
- root?: Document | ShadowRoot;
189
- includeCrossOrigin?: boolean;
190
- }): {
191
- cssSize: number;
192
- ruleCount: number;
193
- stylesheetCount: number;
194
- skippedStylesheets: number;
195
- };
196
- install(): void;
197
- log(target: CSSTarget, opts?: CssOptions & {
198
- title?: string;
199
- }): void;
200
84
  help(): void;
85
+ install(): void;
201
86
  };
202
87
  //#endregion
203
88
  export { tastyDebug };