effcss 1.2.0 → 1.2.2

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/README.md +48 -99
  2. package/dist/build/define-provider-with-configs.min.js +1 -1
  3. package/dist/build/define-provider.min.js +1 -1
  4. package/dist/css/dict.js +1 -1
  5. package/dist/index.js +1 -1
  6. package/dist/types/src/_provider/constants.d.ts +2 -2
  7. package/dist/types/src/_provider/manage.d.ts +4 -3
  8. package/dist/types/src/_provider/process.d.ts +7 -13
  9. package/dist/types/src/configs/basic/Agent.d.ts +2 -2
  10. package/dist/types/src/configs/basic/AgentColor.d.ts +2 -2
  11. package/dist/types/src/configs/basic/Animation.d.ts +2 -2
  12. package/dist/types/src/configs/basic/Background.d.ts +2 -2
  13. package/dist/types/src/configs/basic/Border.d.ts +2 -2
  14. package/dist/types/src/configs/basic/BorderExt.d.ts +2 -2
  15. package/dist/types/src/configs/basic/Box.d.ts +2 -2
  16. package/dist/types/src/configs/basic/Color.d.ts +2 -2
  17. package/dist/types/src/configs/basic/Column.d.ts +2 -2
  18. package/dist/types/src/configs/basic/FlexContainer.d.ts +2 -2
  19. package/dist/types/src/configs/basic/FlexItem.d.ts +2 -2
  20. package/dist/types/src/configs/basic/Font.d.ts +2 -2
  21. package/dist/types/src/configs/basic/GridContainer.d.ts +2 -2
  22. package/dist/types/src/configs/basic/GridItem.d.ts +2 -2
  23. package/dist/types/src/configs/basic/Indent.d.ts +2 -2
  24. package/dist/types/src/configs/basic/Inset.d.ts +2 -2
  25. package/dist/types/src/configs/basic/Mask.d.ts +2 -2
  26. package/dist/types/src/configs/basic/Object.d.ts +2 -2
  27. package/dist/types/src/configs/basic/Outline.d.ts +2 -2
  28. package/dist/types/src/configs/basic/Scroll.d.ts +2 -2
  29. package/dist/types/src/configs/basic/ScrollExt.d.ts +2 -2
  30. package/dist/types/src/configs/basic/Size.d.ts +2 -2
  31. package/dist/types/src/configs/basic/SizeExt.d.ts +2 -2
  32. package/dist/types/src/configs/basic/Text.d.ts +2 -2
  33. package/dist/types/src/configs/basic/Transform.d.ts +2 -2
  34. package/dist/types/src/configs/basic/Transition.d.ts +2 -2
  35. package/dist/types/src/configs/basic/User.d.ts +2 -2
  36. package/dist/types/src/configs/basic/View.d.ts +2 -2
  37. package/dist/types/src/configs/ext/Keyframes.d.ts +2 -2
  38. package/dist/types/src/configs/ext/Reset.d.ts +2 -2
  39. package/dist/types/src/css/functions.d.ts +2 -2
  40. package/dist/types/src/index.d.ts +22 -6
  41. package/dist/types/src/types.d.ts +221 -255
  42. package/dist/types/src/utils.d.ts +108 -25
  43. package/dist/utils.js +1 -1
  44. package/package.json +1 -1
  45. package/dist/types/allConfigs.d.ts +0 -1
  46. package/dist/types/defineProvider.d.ts +0 -1
  47. package/dist/types/defineProviderWithConfigs.d.ts +0 -1
@@ -1,27 +1,51 @@
1
+ /**
2
+ * Style config
3
+ * @description
4
+ * Config which is used as initial settings for the {@link IStyleProvider | style provider}.
5
+ */
6
+ export interface IStyleConfig {
7
+ /**
8
+ * Global params
9
+ */
10
+ params?: TDisplayModeValues;
11
+ /**
12
+ * Stylesheets` configs
13
+ */
14
+ styles?: Record<string, TStyleSheetConfig>;
15
+ /**
16
+ * Stylesheets` extra rules
17
+ */
18
+ ext?: Record<string, string[]>;
19
+ }
1
20
  /**
2
21
  * Style manager
3
22
  * @description
4
- * Class that manage CSSStylesheets
23
+ * Class that manages CSS stylesheets.
24
+ * You usually don't need to use it directly, as it is contained in the {@link IStyleProvider.manager | style provider}.
5
25
  */
6
26
  export interface IStyleManager {
7
27
  /**
8
- * Get stylesheet
28
+ * Get stylesheet by key
9
29
  * @param key - stylesheet key
30
+ * @returns CSS stylesheet if found with this key, otherwise `undefined`
10
31
  */
11
32
  get(key: string): CSSStyleSheet | undefined;
12
33
  /**
13
34
  * Get all stylesheets
35
+ * @returns CSS stylesheet dicitonary
14
36
  */
15
37
  getAll(): Record<string, CSSStyleSheet>;
16
38
  /**
17
39
  * Add stylesheet
18
40
  * @param key - stylesheet key
19
- * @param stylesheet - CSSStylesheet instance
41
+ * @param stylesheet - {@link https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleSheet | CSSStylesheet} instance
42
+ * @returns `true` if stylesheet is added, otherwise `undefined`
20
43
  */
21
44
  add(key: string, stylesheet: CSSStyleSheet): true | void;
22
45
  /**
23
- * Remove sheet
46
+ * Remove stylesheet
24
47
  * @param key - stylesheet key
48
+ * @returns `true` if stylesheet is removed, otherwise `undefined`
25
49
  */
26
50
  remove(key: string): true | void;
27
51
  /**
@@ -29,20 +53,26 @@ export interface IStyleManager {
29
53
  */
30
54
  removeAll(): void;
31
55
  /**
32
- * Pack styles into CSSStyleSheet
56
+ * Pack styles into CSSStyleSheet and add it into stylesheet dictionary
33
57
  * @param key - stylesheet key
34
- * @param styles - stylesheet content
58
+ * @param styles - stylesheet content string
59
+ * @returns `true` if stylesheet is packed, otherwise `undefined`
60
+ * @example
61
+ * ```ts
62
+ * getProvider().manager.pack('card', '.card{width: auto;height:100%};.card__header{display:flex;height:5rem;}');
63
+ * ```
35
64
  */
36
65
  pack(key: string, styles: string): boolean | void;
37
66
  /**
38
- * Cache computed CSS rules
39
- * @param key
40
- * @param styleSheet
67
+ * Caches CSS rules in the special dictionary so that they can be expanded.
68
+ * @param key - stylesheet key
69
+ * @param styleSheet - {@link https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleSheet | CSSStylesheet} instance
41
70
  */
42
71
  cacheRules: (key: string, stylesheet: CSSStyleSheet) => void;
43
72
  /**
44
- * Get expanded selectors
45
- * @param key
73
+ * Get expanded selectors by stylesheet key
74
+ * @param key - stylesheet key
75
+ * @returns expanded selectors Set
46
76
  */
47
77
  getExpandedSelectors: (key: string) => Set<string>;
48
78
  /**
@@ -50,75 +80,102 @@ export interface IStyleManager {
50
80
  * @param key - stylesheet key
51
81
  * @param init - initial selector
52
82
  * @param exp - expanded selector
83
+ * @returns `true` if rule is expanded, otherwise `undefined`
53
84
  */
54
85
  expandRule: (key: string, init: string, exp: string) => true | void;
55
86
  /**
56
- * Apply stylesheets to node
57
- * @param root
87
+ * Apply stylesheets to style consumer
88
+ * @param consumer - {@link TStyleConsumer | style consumer}
89
+ * @description
90
+ * Explicitly applies the current style sheets to the consumer.
91
+ * You usually don't need to call this method, as the manager automatically updates the styles of registered consumers.
92
+ * @see {@link IStyleManager.registerNode}
58
93
  */
59
- apply(root: {
60
- adoptedStyleSheets: CSSStyleSheet[];
61
- }): void;
94
+ apply(consumer: TStyleConsumer): void;
62
95
  /**
63
- * Register dependent node
64
- * @param node
96
+ * Register style consumer
97
+ * @param consumer - {@link TStyleConsumer | style consumer}
98
+ * @description
99
+ * A registered consumer will automatically receive up-to-date styles when they are added, modified, or deleted.
100
+ * If the style provider does not contain the `isolated` {@link IStyleProviderParams.isolated | attribute}, the current document will be automatically registered.
101
+ * @example
102
+ * ```ts
103
+ * // register web component shadow root as consumer
104
+ * const shadow = this.attachShadow({mode: 'open'});
105
+ * getProvider().manager.registerNode(shadow);
106
+ * ```
65
107
  */
66
- registerNode(node: {
67
- adoptedStyleSheets: CSSStyleSheet[];
68
- }): void;
108
+ registerNode(consumer: TStyleConsumer): void;
69
109
  /**
70
- * Unregister dependent node
71
- * @param node
110
+ * Unregister style consumer
111
+ * @param consumer - {@link TStyleConsumer | style consumer}
72
112
  */
73
- unregisterNode(node: {
74
- adoptedStyleSheets: CSSStyleSheet[];
75
- }): void;
113
+ unregisterNode(consumer: TStyleConsumer): void;
76
114
  /**
77
115
  * Apply style changes to dependent nodes
116
+ * @description
117
+ * You usually don't need to use this method.
118
+ * If you update the stylesheets through the style provider's methods,
119
+ * it will automatically apply them to all consumers.
120
+ * @see {@link IStyleProvider}
78
121
  */
79
122
  notify(): void;
80
123
  }
81
124
  /**
82
125
  * BEM selector resolver
126
+ * @description
127
+ * Creates a selector from the passed parts.
128
+ * @returns BEM selector string
83
129
  */
84
130
  type TGetBEMSelector = (params: {
85
131
  /**
86
- * Block
132
+ * {@link https://en.bem.info/methodology/key-concepts/#block | Block}
87
133
  */
88
134
  b: string;
89
135
  /**
90
- * Element
136
+ * {@link https://en.bem.info/methodology/key-concepts/#element | Element}
91
137
  */
92
138
  e?: string;
93
139
  /**
94
- * Modifier
140
+ * {@link https://en.bem.info/methodology/key-concepts/#modifier | Modifier}
95
141
  */
96
142
  m?: string;
97
143
  /**
98
- * Modifier value
144
+ * {@link https://en.bem.info/methodology/key-concepts/#modifier | Modifier value}
99
145
  */
100
146
  mv?: string;
101
147
  /**
102
- * HTML element state for modifier activation
148
+ * Modifier value condition
149
+ * @description
150
+ * Usually a pseudo state, a pseudo element or some query (`@container`, `@media`).
103
151
  */
104
152
  s?: string;
105
153
  }) => string;
106
154
  /**
107
- * BEM attr resolver
155
+ * BEM attribute resolver
156
+ * @description
157
+ * Creates an object containing target attribute with its value.
158
+ * The object content depends on the value of the style provider's `mode` {@link IStyleProviderParams.mode | attribute}.
159
+ * @returns object containing target attribute with its value.
108
160
  */
109
161
  type TGetBEMAttr = (
110
162
  /**
111
- * Block
163
+ * {@link https://en.bem.info/methodology/key-concepts/#block | Block}
112
164
  */
113
165
  b: string) => (
114
166
  /**
115
- * Element
167
+ * {@link https://en.bem.info/methodology/key-concepts/#element | Element}
116
168
  */
117
169
  e?: string) => (
118
170
  /**
119
- * Modifier
171
+ * {@link https://en.bem.info/methodology/key-concepts/#modifier | Modifiers}
172
+ */
173
+ m?: string) => Record<string, string>;
174
+ /**
175
+ * {@link BEM | https://en.bem.info/methodology/} resolver
176
+ * @description
177
+ * Resolver object allows to create selectors/attribute by passed parts.
120
178
  */
121
- m?: string) => Record<string, string | undefined>;
122
179
  export interface IBEMResolver {
123
180
  /**
124
181
  * Selector resolver
@@ -132,15 +189,20 @@ export interface IBEMResolver {
132
189
  /**
133
190
  * Style processor
134
191
  * @description
135
- * Class that compiles style object to CSSStylesheet string content
192
+ * Class that converts style object to CSSStylesheet string content
193
+ * You usually don't need to use it directly, as it is contained in the {@link IStyleProvider.processor | style provider}.
136
194
  */
137
195
  export interface IStyleProcessor {
138
196
  /**
139
- * Basic styles
197
+ * Base styles
198
+ * @description
199
+ * Contains base styles created in the constructor that define global variables and display modes.
140
200
  */
141
201
  baseStyles: string;
142
202
  /**
143
203
  * BEM resolver
204
+ * @description
205
+ * Allows to get BEM selectors/attributes by passed parts
144
206
  */
145
207
  bem: IBEMResolver;
146
208
  /**
@@ -152,289 +214,193 @@ export interface IStyleProcessor {
152
214
  /**
153
215
  * Compile style config to CSS stylesheet text content
154
216
  * @param b - block key
155
- * @param styleConfig - style config
217
+ * @param config - stylesheet config
156
218
  */
157
- compile(b: string, styleConfig: TStyleConfig): string;
219
+ compile(b: string, config: TStyleSheetConfig): string;
158
220
  }
159
- export interface IStyleProvider extends HTMLElement {
221
+ /**
222
+ * Style provider
223
+ * @description
224
+ * Basic interface for style provider component.
225
+ */
226
+ export interface IStyleProvider {
227
+ /**
228
+ * {@link IStyleManager | Style manager}
229
+ */
160
230
  manager?: IStyleManager;
231
+ /**
232
+ * {@link IStyleProcessor | Style processor}
233
+ */
161
234
  processor?: IStyleProcessor;
162
235
  /**
163
236
  * Use stylesheet
237
+ * @param config - stylesheet config
238
+ * @returns {@link IBEMResolver.attr | attribute resolver}
239
+ * @description
240
+ * The method allows to use stylesheet without having its key.
241
+ * It returns {@link IBEMResolver.attr | attribute resolver}, that can create BEM selectors for config passed.
164
242
  */
165
- useStyleSheet(config: TStyleConfig): ReturnType<IBEMResolver['value']> | void;
243
+ useStyleSheet(config: TStyleSheetConfig): ReturnType<IBEMResolver['attr']> | void;
166
244
  /**
167
245
  * Compile stylesheet
246
+ * @key - stylesheet key
247
+ * @config - stylesheet config
248
+ * @returns `true` if stylesheet compiled, otherwise `undefined`
168
249
  */
169
- compileStyleSheet(key: string, config: TStyleConfig): boolean | void;
250
+ compileStyleSheet(key: string, config: TStyleSheetConfig): boolean | void;
170
251
  /**
171
252
  * Expand stylesheet
172
- * @param key
173
- * @param selectors
253
+ * @param key - stylesheet key
254
+ * @param selectors - stylesheet extra selectors
255
+ * @returns processed rules count if stylesheet expanded, otherwise `undefined`
174
256
  */
175
257
  expandStyleSheet(key: string, selectors: string[]): number | undefined;
176
258
  /**
177
259
  * Process configs
178
- * @param styles
179
- * @param ext
260
+ * @param styles - stylesheet dictionary
261
+ * @param ext - extra rules dictionary
180
262
  */
181
- processStyles(styles?: Record<string, TStyleConfig>, ext?: Record<string, string[]>): void;
263
+ processStyles(styles?: Record<string, TStyleSheetConfig>, ext?: Record<string, string[]>): void;
182
264
  }
183
265
  /**
184
266
  * Variable type
267
+ * @description
268
+ * `c` - oklch color variable,
269
+ * otherwise simple CSS variable.
270
+ */
271
+ export type TVariableType = 'c' | undefined;
272
+ /**
273
+ * CSS variable
274
+ * @description
275
+ * Specifies variable format in {@link TStyleSheetConfig | stylesheet config}.
276
+ * Extends {@link https://developer.mozilla.org/en-US/docs/Web/CSS/@property | `@property` rule}.
185
277
  */
186
278
  export type TVariable = {
279
+ /**
280
+ * {@link https://developer.mozilla.org/en-US/docs/Web/CSS/@property/syntax | Syntax}
281
+ */
187
282
  syn?: string;
283
+ /**
284
+ * {@link https://developer.mozilla.org/en-US/docs/Web/CSS/@property/initial-value | Initial value}
285
+ */
188
286
  ini?: number | string;
287
+ /**
288
+ * {@link https://developer.mozilla.org/en-US/docs/Web/CSS/@property/inherits | Inherits}
289
+ */
189
290
  inh?: boolean;
291
+ /**
292
+ * {@link TVariableType | Type}
293
+ */
190
294
  typ?: unknown;
191
- } | {
192
- syn?: string;
193
- ini?: number | string;
194
- inh?: boolean;
195
- typ: 'c';
295
+ /**
296
+ * Create service variables
297
+ * @description
298
+ * If this variable type use service variables,
299
+ * it will declare them.
300
+ */
196
301
  all?: boolean;
197
302
  };
198
303
  /**
199
- * Style config
304
+ * Stylesheet config
305
+ * @description
306
+ * Contains descriptions of rules, variables, keyframes, and interpolation dictionaries used within the stylesheet.
200
307
  */
201
- export type TStyleConfig = {
308
+ export type TStyleSheetConfig = {
202
309
  /**
203
- * CSS variables config
310
+ * CSS variables
311
+ * @see {@link TVariable}
204
312
  */
205
313
  _?: Record<string, TVariable>;
206
314
  /**
207
315
  * Keyframes
316
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/CSS/@keyframes}
208
317
  */
209
318
  kf?: Record<string, Record<string, Record<string, string>>>;
210
319
  /**
211
- * Keys dictionary
320
+ * Keys interpolation dictionary
212
321
  * @description
322
+ * Dictionary with primitive type values.
323
+ * In interpolation expressions, these values will have an advantage over the global ones.
213
324
  */
214
325
  k?: Record<string, string>;
215
326
  /**
216
- * Values dictionary
327
+ * Values interpolation dictionary
217
328
  * @description
329
+ * Dictionary with object type values. Each object is a mini dictionary of grouped variant values.
330
+ * In interpolation expressions, these values will have an advantage over the global ones.
218
331
  */
219
332
  v?: Record<string, Record<string, string | number>>;
220
333
  /**
221
- * Style config object
334
+ * Stylesheet content
222
335
  * @description
223
- * Config to be compiled to CSSStylesheet string content
336
+ * This object will be compiled to CSSStylesheet string content.
337
+ * The conversion rules are defined by the {@link IStyleProcessor | style processor}.
224
338
  */
225
- c: Record<string, Record<string, string | number> | string>;
339
+ c: object;
226
340
  };
227
- type TVariants = Record<string | number, string | number>;
228
- export interface IValues {
229
- /**
230
- * lightness
231
- */
232
- lig: TVariants;
233
- /**
234
- * hue
235
- */
236
- hue: TVariants;
237
- /**
238
- * chroma
239
- */
240
- chr: TVariants;
241
- /**
242
- * alpha
243
- */
244
- alp: TVariants;
245
- /**
246
- * Time
247
- */
248
- time: TVariants;
249
- /**
250
- * Iteration-count coefficients
251
- */
252
- ic: TVariants;
253
- /**
254
- * font-family
255
- */
256
- ff: TVariants;
257
- /**
258
- * Font-weight
259
- */
260
- fwg: TVariants;
261
- /**
262
- * Font-size coefficients
263
- */
264
- fsz: TVariants;
265
- /**
266
- * Root font-size
267
- */
268
- rem: TVariants;
269
- /**
270
- * Breakpoints
271
- */
272
- bp: TVariants;
273
- /**
274
- * Spacing
275
- */
276
- sp: TVariants;
277
- /**
278
- * Size
279
- */
280
- sz: TVariants;
281
- /**
282
- * Universal size units
283
- */
284
- szu: TVariants;
285
- /**
286
- * Thickness
287
- */
288
- th: TVariants;
289
- /**
290
- * Radius
291
- */
292
- rad: TVariants;
293
- /**
294
- * relative values
295
- */
296
- coef: TVariants;
297
- /**
298
- * Ratio coefficients
299
- */
300
- rat: TVariants;
301
- /**
302
- * Fractions (between 0 and 1)
303
- */
304
- fr: TVariants;
305
- /**
306
- * Opacity
307
- */
308
- o: TVariants;
309
- /**
310
- * Z-index coefficients
311
- */
312
- zi: TVariants;
313
- /**
314
- * Letter-spacing coefficients
315
- */
316
- lsp: TVariants;
317
- /**
318
- * Line-height coefficients
319
- */
320
- lh: TVariants;
321
- /**
322
- * Viewport width
323
- */
324
- vw: TVariants;
325
- /**
326
- * Viewport height
327
- */
328
- vh: TVariants;
329
- /**
330
- * Viewport min size
331
- */
332
- vmin: TVariants;
333
- /**
334
- * Viewport max size
335
- */
336
- vmax: TVariants;
337
- /**
338
- * Container query block size
339
- */
340
- cqb: TVariants;
341
- /**
342
- * Container query inline size
343
- */
344
- cqi: TVariants;
345
- /**
346
- * Container query min size
347
- */
348
- cqmin: TVariants;
349
- /**
350
- * Container query max size
351
- */
352
- cqmax: TVariants;
353
- /**
354
- * Perspective coefficients
355
- */
356
- pers: TVariants;
357
- /**
358
- * Zoom coefficients
359
- */
360
- zm: TVariants;
361
- /**
362
- * Rotate coefficients
363
- */
364
- rot: TVariants;
365
- /**
366
- * Skew coefficients
367
- */
368
- sk: TVariants;
369
- /**
370
- * Translate coefficients
371
- */
372
- tr: TVariants;
373
- /**
374
- * Scale coefficients
375
- */
376
- sc: TVariants;
377
- /**
378
- * Inset
379
- */
380
- ins: TVariants;
381
- /**
382
- * Flex-grow
383
- */
384
- fg: TVariants;
385
- /**
386
- * Flex-shrink
387
- */
388
- fs: TVariants;
389
- /**
390
- * Flex-basis
391
- */
392
- fb: TVariants;
393
- /**
394
- * Flex-order
395
- */
396
- fo: TVariants;
397
- /**
398
- * Grid row amount
399
- */
400
- ra: TVariants;
401
- /**
402
- * Grid column amount
403
- */
404
- co: TVariants;
405
- /**
406
- * Grid row offset
407
- */
408
- ro: TVariants;
409
- /**
410
- * Grid column offset
411
- */
412
- ca: TVariants;
413
- }
414
- export type TModeValues = Record<string, Record<string, Record<string, string | number>>>;
415
341
  /**
416
- * Attributes of style provider web component
342
+ * Display mode values
343
+ * @description
344
+ * The display mode allows you to override global values.
345
+ * The required mode is root.
346
+ * Other display modes can only override values from `root`, but not set their own.
347
+ */
348
+ export type TDisplayModeValues = Record<string, Record<string, Record<string, string | number>>>;
349
+ /**
350
+ * Style generation mode for {@link IBEMResolver | BEM selectors}
351
+ * @description
352
+ * `a` - attributes
353
+ * `c` - classes
354
+ */
355
+ export type TStyleMode = 'a' | 'c';
356
+ /**
357
+ * Style provider attributes
358
+ * @description
359
+ * Attributes that can be set on a component.
417
360
  */
418
361
  export interface IStyleProviderParams {
419
362
  /**
420
363
  * Settings script element id
364
+ * @description
365
+ * Allows to read the initial settings from a separate element script.
366
+ * If not specified, `effcss` is used.
421
367
  */
422
368
  settingsid?: string;
423
369
  /**
424
- * CSS var prefix
370
+ * Prefix
371
+ * @description
372
+ * Allows to prefix scoped keys with special string.
373
+ * If not specified, `eff` is used.
425
374
  */
426
375
  prefix?: string | null;
427
376
  /**
428
- * Style generation mode
377
+ * Style generation mode for BEM-selectors
429
378
  * @description
430
- * `a` - data-attributes, `c` - classes
379
+ * It only affects the generation of BEM selectors.
380
+ * @see {@link TStyleMode}
431
381
  */
432
- mode?: 'a' | 'c' | null;
382
+ mode?: TStyleMode | null;
433
383
  /**
434
- * If provider shoudn`t register document as dependent node
384
+ * Isolated provider
385
+ * @description
386
+ * If specified, provider won`t register document as dependent node
435
387
  */
436
388
  isolated?: string | null;
389
+ /**
390
+ * Initializer stylesheet key
391
+ * @description
392
+ * It value controls initializer stylesheet:
393
+ * - if it is equals '', the stylesheet will be omitted;
394
+ * - if it is not specified, the stylesheet will be generated with default `initkey`;
395
+ * - if it is specified as no-empty string, the stylesheet will be generated with specified key.
396
+ */
397
+ initkey?: string | null;
437
398
  }
399
+ /**
400
+ * Style consumer node
401
+ * @description
402
+ * It can be registered via {@link IStyleManager.registerNode | `StyleManager.registerNode`} method.
403
+ */
438
404
  export type TStyleConsumer = {
439
405
  adoptedStyleSheets: CSSStyleSheet[];
440
406
  };