mol_dump_lib 0.0.1026 → 0.0.1028

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.
package/web.d.ts CHANGED
@@ -60,6 +60,10 @@ declare namespace $ {
60
60
  type $mol_style_unit_time = 's' | 'ms';
61
61
  type $mol_style_unit_any = $mol_style_unit_length | $mol_style_unit_angle | $mol_style_unit_time;
62
62
  type $mol_style_unit_str<Quanity extends $mol_style_unit_any = $mol_style_unit_any> = `${number}${Quanity}`;
63
+ /**
64
+ * CSS Units
65
+ * @see https://mol.hyoo.ru/#!section=docs/=xwq9q5_f966fg
66
+ */
63
67
  class $mol_style_unit<Literal extends $mol_style_unit_any> extends $mol_decor<number> {
64
68
  readonly literal: Literal;
65
69
  constructor(value: number, literal: Literal);
@@ -99,6 +103,10 @@ declare namespace $ {
99
103
  type $mol_style_func_name = 'calc' | 'hsla' | 'rgba' | 'var' | 'clamp' | 'scale' | 'cubic-bezier' | 'linear' | 'steps' | $mol_style_func_image | $mol_style_func_filter;
100
104
  type $mol_style_func_image = 'url' | 'linear-gradient' | 'radial-gradient' | 'conic-gradient';
101
105
  type $mol_style_func_filter = 'blur' | 'brightness' | 'contrast' | 'drop-shadow' | 'grayscale' | 'hue-rotate' | 'invert' | 'opacity' | 'sepia' | 'saturate';
106
+ /**
107
+ * CSS Functions
108
+ * @see https://mol.hyoo.ru/#!section=docs/=xwq9q5_f966fg
109
+ */
102
110
  class $mol_style_func<Name extends $mol_style_func_name, Value = unknown> extends $mol_decor<Value> {
103
111
  readonly name: Name;
104
112
  constructor(name: Name, value: Value);
@@ -130,6 +138,7 @@ declare namespace $ {
130
138
  }
131
139
 
132
140
  declare namespace $ {
141
+ /** Replaces properties of `Base` record by properties from `Over`. */
133
142
  type $mol_type_override<Base, Over> = Omit<Base, keyof Over> & Over;
134
143
  }
135
144
 
@@ -176,46 +185,180 @@ declare namespace $ {
176
185
  type Repeat = 'repeat-x' | 'repeat-y' | 'repeat' | 'space' | 'round' | 'no-repeat' | $mol_style_func<'var'>;
177
186
  type BG_size = Length | 'auto' | 'contain' | 'cover';
178
187
  interface Overrides {
188
+ /**
189
+ * Sets the accent color for user-interface controls generated by some elements.
190
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/accent-color
191
+ */
179
192
  accentColor?: $mol_style_properties_color | Common;
180
193
  align?: {
194
+ /**
195
+ * Distribution of space between and around content items along a flexbox's cross-axis or a grid's block axis.
196
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/align-content
197
+ */
181
198
  content?: 'normal' | Baseline_position | Content_distribution | Content_position | `${Overflow_position} ${Content_position}` | Common;
199
+ /**
200
+ * Sets the align-self value on all direct children as a group.
201
+ * In Flexbox, it controls the alignment of items on the Cross Axis.
202
+ * In Grid Layout, it controls the alignment of items on the Block Axis within their grid area.
203
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/align-items
204
+ */
182
205
  items?: 'normal' | 'stretch' | Baseline_position | Self_position | `${Overflow_position} ${Self_position}` | Common;
206
+ /**
207
+ * Overrides a grid or flex item's align-items value.
208
+ * In Grid, it aligns the item inside the grid area.
209
+ * In Flexbox, it aligns the item on the cross axis.
210
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/align-self
211
+ */
183
212
  self?: 'auto' | 'normal' | 'stretch' | Baseline_position | Self_position | `${Overflow_position} ${Self_position}` | Common;
184
213
  };
185
214
  justify?: {
215
+ /**
216
+ * Distribution of space between and around content items along the main-axis of a flex container, and the inline axis of a grid container.
217
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/justify-content
218
+ */
186
219
  content?: 'normal' | Baseline_position | Content_distribution | Content_position | `${Overflow_position} ${Content_position}` | Common;
220
+ /**
221
+ * Sets the justify-self value on all direct children as a group.
222
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/justify-items
223
+ */
187
224
  items?: 'normal' | 'stretch' | Baseline_position | Self_position | `${Overflow_position} ${Self_position}` | Common;
225
+ /**
226
+ * Way a box is justified inside its alignment container along the appropriate axis.
227
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/justify-self
228
+ */
188
229
  self?: 'auto' | 'normal' | 'stretch' | Baseline_position | Self_position | `${Overflow_position} ${Self_position}` | Common;
189
230
  };
231
+ /**
232
+ * resets all of an element's properties except unicode-bidi, direction, and CSS Custom Properties.
233
+ * It can set properties to their initial or inherited values, or to the values specified in another cascade layer or stylesheet origin.
234
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/all
235
+ */
190
236
  all?: Common;
191
237
  animation?: {
238
+ /**
239
+ * Specifies the composite operation to use when multiple animations affect the same property simultaneously.
240
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/animation-composition
241
+ */
192
242
  composition?: Single_animation_composition | Single_animation_composition[][] | Common;
243
+ /**
244
+ * Specifies the amount of time to wait from applying the animation to an element before beginning to perform the animation.
245
+ * The animation can start later, immediately from its beginning, or immediately and partway through the animation.
246
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/animation-delay
247
+ */
193
248
  delay?: $mol_style_unit_str<$mol_style_unit_time> | $mol_style_unit_str<$mol_style_unit_time>[][] | Common;
249
+ /**
250
+ * Sets whether an animation should play forward, backward, or alternate back and forth between playing the sequence forward and backward.
251
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/animation-direction
252
+ */
194
253
  direction?: Single_animation_direction | Single_animation_direction[][] | Common;
254
+ /**
255
+ * Sets the length of time that an animation takes to complete one cycle.
256
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/animation-duration
257
+ */
195
258
  duration?: $mol_style_unit_str<$mol_style_unit_time> | $mol_style_unit_str<$mol_style_unit_time>[][] | Common;
259
+ /**
260
+ * Sets how a CSS animation applies styles to its target before and after its execution.
261
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/animation-fill-mode
262
+ */
196
263
  fillMode?: Single_animation_fill_mode | Single_animation_fill_mode[][] | Common;
264
+ /**
265
+ * Sets the number of times an animation sequence should be played before stopping.
266
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/animation-iteration-count
267
+ */
197
268
  iterationCount?: Single_animation_iteration_count | Single_animation_iteration_count[][] | Common;
269
+ /**
270
+ * Specifies the names of one or more keyframes at-rules that describe the animation to apply to an element.
271
+ * Multiple keyframe at-rules are specified as a comma-separated list of names.
272
+ * If the specified name does not match any keyframe at-rule, no properties are animated.
273
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/animation-name
274
+ */
198
275
  name?: 'none' | string & {} | ('none' | string & {})[][] | Common;
276
+ /**
277
+ * Sets whether an animation is running or paused.
278
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/animation-play-state
279
+ */
199
280
  playState?: Single_animation_play_state | Single_animation_play_state[][] | Common;
281
+ /**
282
+ * Sets how an animation progresses through the duration of each cycle.
283
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/animation-timing-function
284
+ */
200
285
  timingFunction?: Easing_function | Easing_function[][] | Common;
201
286
  };
287
+ /**
288
+ * Used to control native appearance of UI controls, that are based on operating system's theme.
289
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/appearance
290
+ */
202
291
  appearance?: 'none' | 'auto' | Compat_auto | Compat_special | Common;
292
+ /**
293
+ * Sets a preferred aspect ratio for the box, which will be used in the calculation of auto sizes and some other layout functions.
294
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/aspect-ratio
295
+ */
203
296
  aspectRatio?: 'auto' | number | `${number} / ${number}`;
297
+ /**
298
+ * lets you apply graphical effects such as blurring or color shifting to the area behind an element.
299
+ * Because it applies to everything behind the element, to see the effect you must make the element
300
+ * or its background at least partially transparent.
301
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/backdrop-filter
302
+ */
204
303
  backdropFilter: $mol_style_func<$mol_style_func_filter> | $mol_style_func<'url'> | ($mol_style_func<$mol_style_func_filter> | $mol_style_func<'url'>)[][] | 'none' | Common;
304
+ /**
305
+ * Sets whether the back face of an element is visible when turned towards the user.
306
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/backface-visibility
307
+ */
205
308
  backfaceVisibility: 'visible' | 'hidden' | Common;
309
+ /**
310
+ * How the browser distributes space between and around content items along the main-axis of a flex container, and the inline axis of a grid container.
311
+ * @see https://developer.mozilla.org/ru/docs/Web/CSS/justify-content
312
+ */
206
313
  justifyContent?: 'start' | 'end' | 'flex-start' | 'flex-end' | 'left' | 'right' | 'space-between' | 'space-around' | 'space-evenly' | 'normal' | 'stretch' | 'center' | Common;
314
+ /** @see https://developer.mozilla.org/en-US/docs/Web/CSS/gap */
207
315
  gap?: Length | readonly [Length, Length] | Common;
316
+ /**
317
+ * All background style properties.
318
+ * @see https://developer.mozilla.org/ru/docs/Web/CSS/background
319
+ * */
208
320
  background?: 'none' | {
321
+ /**
322
+ * Sets whether a background image's position is fixed within the viewport, or scrolls with its containing block.
323
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/background-attachment
324
+ */
209
325
  attachment?: 'scroll' | 'fixed' | 'local' | ('scroll' | 'fixed' | 'local')[][] | Common;
326
+ /**
327
+ * Sets how an element's background images should blend with each other and with the element's background color.
328
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/background-blend-mode
329
+ */
210
330
  blendMode?: Mix_blend_mode | Mix_blend_mode[][] | Common;
331
+ /**
332
+ * Sets whether an element's background extends underneath its border box, padding box, or content box.
333
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/background-clip
334
+ */
211
335
  clip?: Box | Box[][] | Common;
336
+ /**
337
+ * Background color.
338
+ * @see https://developer.mozilla.org/ru/docs/Web/CSS/background-color
339
+ */
212
340
  color?: $mol_style_properties_color | Common;
341
+ /**
342
+ * Background images.
343
+ * @see https://developer.mozilla.org/ru/docs/Web/CSS/background-image
344
+ */
213
345
  image?: readonly (readonly [$mol_style_func<$mol_style_func_image> | string & {}])[] | 'none' | Common;
346
+ /**
347
+ * How background images are repeated.
348
+ * @see https://developer.mozilla.org/ru/docs/Web/CSS/background-repeat
349
+ */
214
350
  repeat?: Repeat | [Repeat, Repeat] | Common;
351
+ /** @see https://developer.mozilla.org/ru/docs/Web/CSS/background-position */
215
352
  position?: 'left' | 'right' | 'top' | 'bottom' | 'center' | Common;
353
+ /** @see https://developer.mozilla.org/ru/docs/Web/CSS/background-size */
216
354
  size?: (BG_size | [BG_size] | [BG_size, BG_size])[];
217
355
  };
356
+ /** @see https://developer.mozilla.org/ru/docs/Web/CSS/box-shadow */
218
357
  box?: {
358
+ /**
359
+ * Shadow effects around an element's frame.
360
+ * @see https://developer.mozilla.org/ru/docs/Web/CSS/box-shadow
361
+ */
219
362
  shadow?: readonly ([
220
363
  ...[inset: 'inset'] | [],
221
364
  x: Length,
@@ -232,67 +375,235 @@ declare namespace $ {
232
375
  color: $mol_style_properties_color;
233
376
  })[] | 'none' | Common;
234
377
  };
378
+ /** @see https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/rx */
235
379
  rx?: Length | Common;
380
+ /** @see https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/ry */
236
381
  ry?: Length | Common;
382
+ /** @see https://developer.mozilla.org/ru/docs/Web/CSS/font */
237
383
  font?: {
384
+ /**
385
+ * Whether a font should be styled.
386
+ * @see https://developer.mozilla.org/ru/docs/Web/CSS/font-style
387
+ */
238
388
  style?: 'normal' | 'italic' | Common;
389
+ /**
390
+ * Weight (or boldness) of the font.
391
+ * @see https://developer.mozilla.org/ru/docs/Web/CSS/font-weight
392
+ */
239
393
  weight?: 'normal' | 'bold' | 'lighter' | 'bolder' | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | Common;
394
+ /**
395
+ * Size of the font. Changing the font size also updates the sizes of the font size-relative length units.
396
+ * @see https://developer.mozilla.org/ru/docs/Web/CSS/font-size
397
+ */
240
398
  size?: 'xx-small' | 'x-small' | 'small' | 'medium' | 'large' | 'x-large' | 'xx-large' | 'xxx-large' | 'smaller' | 'larger' | Length | Common;
399
+ /**
400
+ * Prioritized list of one or more font family names and/or generic family names.
401
+ * @see https://developer.mozilla.org/ru/docs/Web/CSS/font-family
402
+ */
241
403
  family?: string & {} | 'serif' | 'sans-serif' | 'monospace' | 'cursive' | 'fantasy' | 'system-ui' | 'ui-serif' | 'ui-sans-serif' | 'ui-monospace' | 'ui-rounded' | 'emoji' | 'math' | 'fangsong' | Common;
242
404
  };
405
+ /**
406
+ * Foreground color value of text and text decorations, and sets the `currentcolor` value.
407
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/color
408
+ */
243
409
  color?: $mol_style_properties_color | Common;
410
+ /**
411
+ * Whether an element is treated as a block or inline element and the layout used for its children, such as flow layout, grid or flex.
412
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/display
413
+ */
244
414
  display?: 'block' | 'inline' | 'run-in' | 'list-item' | 'none' | 'flow' | 'flow-root' | 'table' | 'flex' | 'grid' | 'contents' | 'table-row-group' | 'table-header-group' | 'table-footer-group' | 'table-column-group' | 'table-row' | 'table-cell' | 'table-column' | 'table-caption' | 'inline-block' | 'inline-table' | 'inline-flex' | 'inline-grid' | 'ruby' | 'ruby-base' | 'ruby-text' | 'ruby-base-container' | 'ruby-text-container' | Common;
415
+ /**
416
+ * What to do when an element's content is too big to fit in its block formatting context. It is a shorthand for `overflowX` and `overflowY`.
417
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/overflow
418
+ */
245
419
  overflow?: Overflow | {
420
+ /**
421
+ * What shows when content overflows a block-level element's left and right edges.
422
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/overflow-x
423
+ */
246
424
  x?: Overflow | Common;
425
+ /**
426
+ * What shows when content overflows a block-level element's top and bottom edges.
427
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/overflow-y
428
+ */
247
429
  y?: Overflow | Common;
430
+ /**
431
+ * A way to opt out of the browser's scroll anchoring behavior, which adjusts scroll position to minimize content shifts.
432
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/overflow-anchor
433
+ */
248
434
  anchor?: 'auto' | 'none' | Common;
249
435
  };
436
+ /**
437
+ * Indicate that an element and its contents are, as much as possible, independent of the rest of the document tree. This allows the browser to recalculate layout, style, paint, size, or any combination of them for a limited area of the DOM and not the entire page, leading to obvious performance benefits.
438
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/contain
439
+ */
250
440
  contain?: 'none' | 'strict' | 'content' | ContainRule | readonly ContainRule[] | Common;
441
+ /**
442
+ * How white space inside an element is handled.
443
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/white-space
444
+ */
251
445
  whiteSpace?: 'normal' | 'nowrap' | 'break-spaces' | 'pre' | 'pre-wrap' | 'pre-line' | Common;
446
+ /** @see https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-overflow-scrolling */
252
447
  webkitOverflowScrolling?: 'auto' | 'touch' | Common;
448
+ /** @see https://developer.mozilla.org/en-US/docs/Web/CSS/scrollbar-color */
253
449
  scrollbar?: {
450
+ /**
451
+ * Color of thumb and track of scrollbars.
452
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/scrollbar-color
453
+ */
254
454
  color?: readonly [$mol_style_properties_color, $mol_style_properties_color] | 'auto' | Common;
455
+ /**
456
+ * Maximum thickness of scrollbars.
457
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/scrollbar-width
458
+ */
255
459
  width?: 'auto' | 'thin' | 'none' | Common;
256
460
  };
461
+ /** @see https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-behavior */
257
462
  scroll?: {
463
+ /** @see https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-snap-align */
258
464
  snap?: {
465
+ /**
466
+ * How strictly snap points are enforced on the scroll container in case there is one.
467
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-snap-type
468
+ */
259
469
  type: 'none' | Snap_axis | readonly [Snap_axis, 'mandatory' | 'proximity'] | Common;
470
+ /**
471
+ * Whether the scroll container is allowed to "pass over" possible snap positions.
472
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-snap-stop
473
+ */
260
474
  stop: 'normal' | 'always' | Common;
475
+ /**
476
+ * The box’s snap position as an alignment of its snap area (as the alignment subject) within its snap container’s snapport (as the alignment container). The two values specify the snapping alignment in the block axis and inline axis, respectively. If only one value is specified, the second value defaults to the same value.
477
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-snap-align
478
+ */
261
479
  align: Span_align | readonly [Span_align, Span_align] | Common;
262
480
  };
481
+ /**
482
+ * Offsets for the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user.
483
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-padding
484
+ */
263
485
  padding?: Directions<Length | 'auto'>;
264
486
  };
487
+ /**
488
+ * Element's width. By default, it sets the width of the content area, but if `boxSizing` is set to `border-box`, it sets the width of the border area.
489
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/width
490
+ */
265
491
  width?: Size;
492
+ /**
493
+ * Minimum width of an element. It prevents the used value of the `width` property from becoming smaller than the value specified for `minWidth`.
494
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/min-width
495
+ */
266
496
  minWidth?: Size;
497
+ /**
498
+ * Maximum width of an element. It prevents the used value of the `width` property from becoming larger than the value specified for `maxWidth`.
499
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/max-width
500
+ */
267
501
  maxWidth?: Size;
502
+ /**
503
+ * Height of an element. By default, the property defines the height of the content area. If box-sizing is set to border-box, however, it instead determines the height of the border area.
504
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/height
505
+ */
268
506
  height?: Size;
507
+ /**
508
+ * Minimum height of an element. It prevents the used value of the `height` property from becoming smaller than the value specified for `minHeight`.
509
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/min-height
510
+ */
269
511
  minHeight?: Size;
512
+ /**
513
+ * Maximum height of an element. It prevents the used value of the `height` property from becoming larger than the value specified for `maxHeight`.
514
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/max-height
515
+ */
270
516
  maxHeight?: Size;
517
+ /**
518
+ * Margin area on all four sides of an element.
519
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/margin
520
+ */
271
521
  margin?: Directions<Length | 'auto'>;
522
+ /**
523
+ * Padding area on all four sides of an element.
524
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/padding
525
+ */
272
526
  padding?: Directions<Length | 'auto'>;
527
+ /**
528
+ * How an element is positioned in a document. The `top`, `right`, `bottom`, and `left` properties determine the final location of positioned elements.
529
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/position
530
+ */
273
531
  position?: 'static' | 'relative' | 'absolute' | 'sticky' | 'fixed' | Common;
532
+ /** @see https://developer.mozilla.org/en-US/docs/Web/CSS/top */
274
533
  top?: Length | 'auto' | Common;
534
+ /** @see https://developer.mozilla.org/en-US/docs/Web/CSS/right */
275
535
  right?: Length | 'auto' | Common;
536
+ /** @see https://developer.mozilla.org/en-US/docs/Web/CSS/bottom */
276
537
  bottom?: Length | 'auto' | Common;
538
+ /** @see https://developer.mozilla.org/en-US/docs/Web/CSS/left */
277
539
  left?: Length | 'auto' | Common;
540
+ /** @see https://developer.mozilla.org/en-US/docs/Web/CSS/border */
278
541
  border?: Directions<{
542
+ /**
543
+ * Rounds the corners of an element's outer border edge. You can set a single radius to make circular corners, or two radii to make elliptical corners.
544
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius
545
+ */
279
546
  radius?: Length | [Length, Length];
547
+ /**
548
+ * Line style for all four sides of an element's border.
549
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius
550
+ */
280
551
  style?: 'none' | 'hidden' | 'dotted' | 'dashed' | 'solid' | 'double' | 'groove' | 'ridge' | 'inset' | 'outset' | Common;
552
+ /**
553
+ * Color of element's border.
554
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-color
555
+ */
281
556
  color?: $mol_style_properties_color | Common;
557
+ /**
558
+ * Width of element's border.
559
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-width
560
+ */
282
561
  width?: Length | Common;
283
562
  }>;
563
+ /**
564
+ * How a flex item will grow or shrink to fit the space available in its flex container. It is a shorthand for `flexGrow`, `flexShrink`, and `flexBasis`.
565
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/flex
566
+ */
284
567
  flex?: 'none' | 'auto' | {
568
+ /**
569
+ * Growing weight of the flex item. Negative values are considered invalid. Defaults to 1 when omitted.
570
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/flex-grow
571
+ */
285
572
  grow?: number | Common;
573
+ /**
574
+ * Shrinking weight of the flex item. Negative values are considered invalid. Defaults to 1 when omitted.
575
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/flex-shrink
576
+ */
286
577
  shrink?: number | Common;
578
+ /**
579
+ * Preferred size of the flex item. A value of 0 must have a unit to avoid being interpreted as a flexibility. Defaults to 0 when omitted.
580
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/flex-basis
581
+ */
287
582
  basis?: Size | Common;
583
+ /**
584
+ * How flex items are placed in the flex container defining the main axis and the direction (normal or reversed).
585
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/flex-basis
586
+ */
288
587
  direction?: 'row' | 'row-reverse' | 'column' | 'column-reverse' | Common;
588
+ /**
589
+ * Whether flex items are forced onto one line or can wrap onto multiple lines. If wrapping is allowed, it sets the direction that lines are stacked.
590
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/flex-wrap
591
+ */
289
592
  wrap?: 'wrap' | 'nowrap' | 'wrap-reverse' | Common;
290
593
  };
291
594
  container?: {
292
595
  name?: string;
293
596
  type?: Container_type | readonly Container_type[];
294
597
  };
598
+ /**
599
+ * Z-order of a positioned element and its descendants or flex items. Overlapping elements with a larger z-index cover those with a smaller one.
600
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/z-index
601
+ */
295
602
  zIndex: number | Common;
603
+ /**
604
+ * Degree to which content behind an element is hidden, and is the opposite of transparency.
605
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/opacity
606
+ */
296
607
  opacity: number | Common;
297
608
  }
298
609
  type Container_type = 'normal' | 'size' | 'inline-size' | 'scroll-state' | 'anchored';
@@ -300,10 +611,15 @@ declare namespace $ {
300
611
  }
301
612
 
302
613
  declare namespace $ {
614
+ /** Create record of CSS variables. */
303
615
  function $mol_style_prop<Keys extends string[]>(prefix: string, keys: Keys): Record<Keys[number], $mol_style_func<"var", unknown>>;
304
616
  }
305
617
 
306
618
  declare namespace $ {
619
+ /**
620
+ * Theme css variables
621
+ * @see https://mol.hyoo.ru/#!section=demos/demo=mol_textarea_demo
622
+ */
307
623
  const $mol_theme: Record<"image" | "line" | "text" | "hue" | "back" | "hover" | "card" | "current" | "special" | "control" | "shade" | "focus" | "field" | "spirit" | "hue_spread", $mol_style_func<"var", unknown>>;
308
624
  }
309
625
 
@@ -311,6 +627,10 @@ declare namespace $ {
311
627
  }
312
628
 
313
629
  declare namespace $ {
630
+ /**
631
+ * Gap in CSS
632
+ * @see https://page.hyoo.ru/#!=msdb74_bm7nsq
633
+ */
314
634
  let $mol_gap: Record<"text" | "blur" | "page" | "block" | "space" | "round" | "emoji", $mol_style_func<"var", unknown>>;
315
635
  }
316
636
 
@@ -331,6 +651,11 @@ declare namespace $ {
331
651
  }
332
652
 
333
653
  declare namespace $ {
654
+ /**
655
+ * Recursive `Partial`.
656
+ *
657
+ * let props : $mol_type_partial_deep< HTMLElement > = { style : { display : 'block' } }
658
+ */
334
659
  type $mol_type_partial_deep<Val> = Val extends object ? Val extends Function ? Val : {
335
660
  [field in keyof Val]?: $mol_type_partial_deep<Val[field]> | undefined;
336
661
  } : Val;
@@ -342,6 +667,12 @@ declare namespace $ {
342
667
  let $mol_jsx_booked: null | Set<string>;
343
668
  let $mol_jsx_document: $mol_jsx.JSX.ElementClass['ownerDocument'];
344
669
  const $mol_jsx_frag = "";
670
+ /**
671
+ * JSX adapter that makes DOM tree.
672
+ * Generates global unique ids for every DOM-element by components tree with ids.
673
+ * Ensures all local ids are unique.
674
+ * Can reuse an existing nodes by GUIDs when used inside [`mol_jsx_attach`](https://github.com/hyoo-ru/mam_mol/tree/master/jsx/attach).
675
+ */
345
676
  function $mol_jsx<Props extends $mol_jsx.JSX.IntrinsicAttributes, Children extends Array<Node | string>>(Elem: string | ((props: Props, ...children: Children) => Element), props: Props, ...childNodes: Children): Element | DocumentFragment;
346
677
  namespace $mol_jsx.JSX {
347
678
  interface Element extends HTMLElement {
@@ -356,9 +687,11 @@ declare namespace $ {
356
687
  type OrString<Dict> = {
357
688
  [key in keyof Dict]: Dict[key] | string;
358
689
  };
690
+ /** Props for html elements */
359
691
  type IntrinsicElements = {
360
692
  [key in keyof ElementTagNameMap]?: $.$mol_type_partial_deep<OrString<Element & IntrinsicAttributes & ElementTagNameMap[key]>>;
361
693
  };
694
+ /** Additional undeclared props */
362
695
  interface IntrinsicAttributes {
363
696
  id?: string;
364
697
  xmlns?: string;
@@ -373,11 +706,17 @@ declare namespace $ {
373
706
 
374
707
  declare namespace $ {
375
708
  const $mol_ambient_ref: unique symbol;
709
+ /** @deprecated use $ instead */
376
710
  type $mol_ambient_context = $;
377
711
  function $mol_ambient(this: $ | void, overrides: Partial<$>): $;
378
712
  }
379
713
 
380
714
  declare namespace $ {
715
+ /**
716
+ * Proxy that delegates all to lazy returned target.
717
+ *
718
+ * $mol_delegate( Array.prototype , ()=> fetch_array() )
719
+ */
381
720
  function $mol_delegate<Value extends object>(proto: Value, target: () => Value): Value;
382
721
  }
383
722
 
@@ -438,57 +777,130 @@ declare namespace $ {
438
777
  }
439
778
 
440
779
  declare namespace $ {
780
+ /** Generates unique identifier. */
441
781
  function $mol_guid(length?: number, exists?: (id: string) => boolean): string;
442
782
  }
443
783
 
444
784
  declare namespace $ {
785
+ /** Special status statuses. */
445
786
  enum $mol_wire_cursor {
787
+ /** Update required. */
446
788
  stale = -1,
789
+ /** Some of (transitive) pub update required. */
447
790
  doubt = -2,
791
+ /** Actual state but may be dropped. */
448
792
  fresh = -3,
793
+ /** State will never be changed. */
449
794
  final = -4
450
795
  }
451
796
  }
452
797
 
453
798
  declare namespace $ {
799
+ /**
800
+ * Collects subscribers in compact array. 28B
801
+ */
454
802
  class $mol_wire_pub extends Object {
455
803
  constructor(id?: string);
456
804
  [Symbol.toStringTag]: string;
457
805
  data: unknown[];
458
806
  static get [Symbol.species](): ArrayConstructor;
807
+ /**
808
+ * Index of first subscriber.
809
+ */
459
810
  protected sub_from: number;
811
+ /**
812
+ * All current subscribers.
813
+ */
460
814
  get sub_list(): readonly $mol_wire_sub[];
815
+ /**
816
+ * Has any subscribers or not.
817
+ */
461
818
  get sub_empty(): boolean;
819
+ /**
820
+ * Subscribe subscriber to this publisher events and return position of subscriber that required to unsubscribe.
821
+ */
462
822
  sub_on(sub: $mol_wire_pub, pub_pos: number): number;
823
+ /**
824
+ * Unsubscribe subscriber from this publisher events by subscriber position provided by `on(pub)`.
825
+ */
463
826
  sub_off(sub_pos: number): void;
827
+ /**
828
+ * Called when last sub was unsubscribed.
829
+ **/
464
830
  reap(): void;
831
+ /**
832
+ * Autowire this publisher with current subscriber.
833
+ **/
465
834
  promote(): void;
835
+ /**
836
+ * Enforce actualization. Should not throw errors.
837
+ */
466
838
  fresh(): void;
839
+ /**
840
+ * Allow to put data to caches in the subtree.
841
+ */
467
842
  complete(): void;
468
843
  get incompleted(): boolean;
844
+ /**
845
+ * Notify subscribers about self changes.
846
+ */
469
847
  emit(quant?: $mol_wire_cursor): void;
848
+ /**
849
+ * Moves peer from one position to another. Doesn't clear data at old position!
850
+ */
470
851
  peer_move(from_pos: number, to_pos: number): void;
852
+ /**
853
+ * Updates self position in the peer.
854
+ */
471
855
  peer_repos(peer_pos: number, self_pos: number): void;
472
856
  }
473
857
  }
474
858
 
475
859
  declare namespace $ {
860
+ /** Generic subscriber interface */
476
861
  interface $mol_wire_sub extends $mol_wire_pub {
477
862
  temp: boolean;
478
863
  pub_list: $mol_wire_pub[];
864
+ /**
865
+ * Begin auto wire to publishers.
866
+ * Returns previous auto subscriber that must me transfer to the `end`.
867
+ */
479
868
  track_on(): $mol_wire_sub | null;
869
+ /**
870
+ * Returns next auto wired publisher. It can be easely repormoted.
871
+ * Or promotes next publisher to auto wire its togeter.
872
+ * Must be used only between `track_on` and `track_off`.
873
+ */
480
874
  track_next(pub?: $mol_wire_pub): $mol_wire_pub | null;
481
875
  pub_off(pub_pos: number): void;
876
+ /**
877
+ * Unsubscribes from unpromoted publishers.
878
+ */
482
879
  track_cut(sub: $mol_wire_pub | null): void;
880
+ /**
881
+ * Ends auto wire to publishers.
882
+ */
483
883
  track_off(sub: $mol_wire_pub | null): void;
884
+ /**
885
+ * Receive notification about publisher changes.
886
+ */
484
887
  absorb(quant: $mol_wire_cursor, pos: number): void;
888
+ /**
889
+ * Unsubscribes from all publishers.
890
+ */
485
891
  destructor(): void;
486
892
  }
487
893
  }
488
894
 
489
895
  declare namespace $ {
490
896
  let $mol_wire_auto_sub: $mol_wire_sub | null;
897
+ /**
898
+ * When fulfilled, all publishers are promoted to this subscriber on access to its.
899
+ */
491
900
  function $mol_wire_auto(next?: $mol_wire_sub | null): $mol_wire_sub | null;
901
+ /**
902
+ * Affection queue. Used to prevent accidental stack overflow on emit.
903
+ */
492
904
  const $mol_wire_affected: ($mol_wire_sub | number)[];
493
905
  }
494
906
 
@@ -521,6 +933,13 @@ declare namespace $ {
521
933
  }
522
934
 
523
935
  declare namespace $ {
936
+ /**
937
+ * Publisher that can auto collect other publishers. 32B
938
+ *
939
+ * P1 P2 P3 P4 S1 S2 S3
940
+ * ^ ^
941
+ * pubs_from subs_from
942
+ */
524
943
  class $mol_wire_pub_sub extends $mol_wire_pub implements $mol_wire_sub {
525
944
  protected pub_from: number;
526
945
  protected cursor: $mol_wire_cursor;
@@ -537,6 +956,9 @@ declare namespace $ {
537
956
  complete_pubs(): void;
538
957
  absorb(quant?: $mol_wire_cursor, pos?: number): void;
539
958
  [$mol_dev_format_head](): any[];
959
+ /**
960
+ * Is subscribed to any publisher or not.
961
+ */
540
962
  get pub_empty(): boolean;
541
963
  }
542
964
  }
@@ -556,6 +978,13 @@ declare namespace $ {
556
978
  }
557
979
 
558
980
  declare namespace $ {
981
+ /**
982
+ * Suspendable task with support both sync/async api.
983
+ *
984
+ * A1 A2 A3 A4 P1 P2 P3 P4 S1 S2 S3
985
+ * ^ ^ ^
986
+ * args_from pubs_from subs_from
987
+ **/
559
988
  abstract class $mol_wire_fiber<Host, Args extends readonly unknown[], Result> extends $mol_wire_pub_sub {
560
989
  readonly task: (this: Host, ...args: Args) => Result;
561
990
  readonly host?: Host | undefined;
@@ -582,7 +1011,15 @@ declare namespace $ {
582
1011
  fresh(): this | undefined;
583
1012
  refresh(): void;
584
1013
  abstract put(next: Result | Error | Promise<Result | Error>): Result | Error | Promise<Result | Error>;
1014
+ /**
1015
+ * Synchronous execution. Throws Promise when waits async task (SuspenseAPI provider).
1016
+ * Should be called inside SuspenseAPI consumer (ie fiber).
1017
+ */
585
1018
  sync(): Awaited<Result>;
1019
+ /**
1020
+ * Asynchronous execution.
1021
+ * It's SuspenseAPI consumer. So SuspenseAPI providers can be called inside.
1022
+ */
586
1023
  async_raw(): Promise<Result>;
587
1024
  async(): Promise<Result> & {
588
1025
  destructor(): void;
@@ -593,6 +1030,7 @@ declare namespace $ {
593
1030
  }
594
1031
 
595
1032
  declare namespace $ {
1033
+ /** Returns string key for any value. */
596
1034
  function $mol_key<Value>(value: Value): string;
597
1035
  }
598
1036
 
@@ -610,31 +1048,52 @@ declare namespace $ {
610
1048
 
611
1049
  declare namespace $ {
612
1050
  let $mol_compare_deep_cache: WeakMap<any, WeakMap<any, boolean>>;
1051
+ /**
1052
+ * Deeply compares two values. Returns true if equal.
1053
+ * Define `Symbol.toPrimitive` to customize.
1054
+ */
613
1055
  function $mol_compare_deep<Value>(left: Value, right: Value): boolean;
614
1056
  }
615
1057
 
616
1058
  declare namespace $ {
1059
+ /** Logger event data */
617
1060
  type $mol_log3_event<Fields> = {
618
1061
  [key in string]: unknown;
619
1062
  } & {
1063
+ /** Time of event creation */
620
1064
  time?: string;
1065
+ /** Place of event creation */
621
1066
  place: unknown;
1067
+ /** Short description of event */
622
1068
  message: string;
623
1069
  } & Fields;
1070
+ /** Logger function */
624
1071
  type $mol_log3_logger<Fields, Res = void> = (this: $, event: $mol_log3_event<Fields>) => Res;
1072
+ /** Log begin of some task */
625
1073
  let $mol_log3_come: $mol_log3_logger<{}>;
1074
+ /** Log end of some task */
626
1075
  let $mol_log3_done: $mol_log3_logger<{}>;
1076
+ /** Log error */
627
1077
  let $mol_log3_fail: $mol_log3_logger<{}>;
1078
+ /** Log warning message */
628
1079
  let $mol_log3_warn: $mol_log3_logger<{
629
1080
  hint: string;
630
1081
  }>;
1082
+ /** Log some generic event */
631
1083
  let $mol_log3_rise: $mol_log3_logger<{}>;
1084
+ /** Log begin of log group, returns func to close group */
632
1085
  let $mol_log3_area: $mol_log3_logger<{}, () => void>;
1086
+ /** Log begin of collapsed group only when some logged inside, returns func to close group */
633
1087
  function $mol_log3_area_lazy(this: $, event: $mol_log3_event<{}>): () => void;
634
1088
  let $mol_log3_stack: (() => void)[];
635
1089
  }
636
1090
 
637
1091
  declare namespace $ {
1092
+ /**
1093
+ * Extracts keys from `Input` which values extends `Upper` and extendable by `Lower`.
1094
+ *
1095
+ * type MathConstants = $mol_type_keys_extract< Math , number > // "E" | "PI" ...
1096
+ */
638
1097
  type $mol_type_keys_extract<Input, Upper, Lower = never> = {
639
1098
  [Field in keyof Input]: unknown extends Input[Field] ? never : Input[Field] extends never ? never : Input[Field] extends Upper ? [
640
1099
  Lower
@@ -647,6 +1106,7 @@ declare namespace $ {
647
1106
  }
648
1107
 
649
1108
  declare namespace $ {
1109
+ /** One-shot fiber */
650
1110
  class $mol_wire_task<Host, Args extends readonly unknown[], Result> extends $mol_wire_fiber<Host, Args, Result> {
651
1111
  static getter<Host, Args extends readonly unknown[], Result>(task: (this: Host, ...args: Args) => Result): (host: Host, args: Args) => $mol_wire_task<Host, Args, Result>;
652
1112
  get temp(): boolean;
@@ -657,6 +1117,9 @@ declare namespace $ {
657
1117
  }
658
1118
 
659
1119
  declare namespace $ {
1120
+ /**
1121
+ * Decorates method to fiber to ensure it is executed only once inside other fiber.
1122
+ */
660
1123
  function $mol_wire_method<Host extends object, Args extends readonly any[]>(host: Host, field: PropertyKey, descr?: TypedPropertyDescriptor<(...args: Args) => any>): {
661
1124
  value: (this: Host, ...args: Args) => any;
662
1125
  enumerable?: boolean;
@@ -668,10 +1131,20 @@ declare namespace $ {
668
1131
  }
669
1132
 
670
1133
  declare namespace $ {
1134
+ /**
1135
+ * Returns `Tuple` without first element.
1136
+ *
1137
+ * $mol_type_tail<[ 1 , 2 , 3 ]> // [ 2, 3 ]
1138
+ */
671
1139
  type $mol_type_tail<Tuple extends readonly any[]> = ((...tail: Tuple) => any) extends ((head: any, ...tail: infer Tail) => any) ? Tail : never;
672
1140
  }
673
1141
 
674
1142
  declare namespace $ {
1143
+ /**
1144
+ * Returns last element of `Tuple`.
1145
+ *
1146
+ * $mol_type_tail<[ 1 , 2 , 3 ]> // 3
1147
+ */
675
1148
  type $mol_type_foot<Tuple extends readonly any[]> = Tuple['length'] extends 0 ? never : Tuple[$mol_type_tail<Tuple>['length']];
676
1149
  }
677
1150
 
@@ -692,6 +1165,7 @@ declare namespace $ {
692
1165
  }
693
1166
 
694
1167
  declare namespace $ {
1168
+ /** Long-living fiber. */
695
1169
  class $mol_wire_atom<Host, Args extends readonly unknown[], Result> extends $mol_wire_fiber<Host, Args, Result> {
696
1170
  static solo<Host, Args extends readonly unknown[], Result>(host: Host, task: (this: Host, ...args: Args) => Result): $mol_wire_atom<Host, Args, Result>;
697
1171
  static plex<Host, Args extends readonly unknown[], Result>(host: Host, task: (this: Host, ...args: Args) => Result, key: Args[0]): $mol_wire_atom<Host, Args, Result>;
@@ -699,6 +1173,9 @@ declare namespace $ {
699
1173
  static watcher: $mol_after_frame | null;
700
1174
  static watch(): void;
701
1175
  watch(): void;
1176
+ /**
1177
+ * Update atom value through another temp fiber.
1178
+ */
702
1179
  resync(args: Args): Error | Result | Promise<Error | Result>;
703
1180
  once(): Awaited<Result>;
704
1181
  channel(): ((next?: $mol_type_foot<Args>) => Awaited<Result>) & {
@@ -710,12 +1187,14 @@ declare namespace $ {
710
1187
  }
711
1188
 
712
1189
  declare namespace $ {
1190
+ /** Decorates solo object channel to [mol_wire_atom](../atom/atom.ts). */
713
1191
  export function $mol_wire_solo<Args extends any[]>(host: object, field: string, descr?: TypedPropertyDescriptor<(...args: Args) => any>): TypedPropertyDescriptor<(...args: First_optional<Args>) => any>;
714
1192
  type First_optional<Args extends any[]> = Args extends [] ? [] : [Args[0] | undefined, ...$mol_type_tail<Args>];
715
1193
  export {};
716
1194
  }
717
1195
 
718
1196
  declare namespace $ {
1197
+ /** Reactive memoizing multiplexed property decorator. */
719
1198
  function $mol_wire_plex<Args extends [any, ...any[]]>(host: object, field: string, descr?: TypedPropertyDescriptor<(...args: Args) => any>): {
720
1199
  value: (this: typeof host, ...args: Args) => any;
721
1200
  enumerable?: boolean;
@@ -727,7 +1206,25 @@ declare namespace $ {
727
1206
  }
728
1207
 
729
1208
  declare namespace $ {
1209
+ /**
1210
+ * Reactive memoizing solo property decorator from [mol_wire](../wire/README.md)
1211
+ * @example
1212
+ * '@' $mol_mem
1213
+ * name(next?: string) {
1214
+ * return next ?? 'default'
1215
+ * }
1216
+ * @see https://mol.hyoo.ru/#!section=docs/=qxmh6t_sinbmb
1217
+ */
730
1218
  let $mol_mem: typeof $mol_wire_solo;
1219
+ /**
1220
+ * Reactive memoizing multiplexed property decorator [mol_wire](../wire/README.md)
1221
+ * @example
1222
+ * '@' $mol_mem_key
1223
+ * name(id: number, next?: string) {
1224
+ * return next ?? 'default'
1225
+ * }
1226
+ * @see https://mol.hyoo.ru/#!section=docs/=qxmh6t_sinbmb
1227
+ */
731
1228
  let $mol_mem_key: typeof $mol_wire_plex;
732
1229
  }
733
1230
 
@@ -756,6 +1253,10 @@ declare namespace $ {
756
1253
  }
757
1254
 
758
1255
  declare namespace $ {
1256
+ /**
1257
+ * Key names code for hotkey
1258
+ * @see [mol_hotkey](../../hotkey/hotkey.view.ts)
1259
+ */
759
1260
  enum $mol_keyboard_code {
760
1261
  backspace = 8,
761
1262
  tab = 9,
@@ -885,14 +1386,24 @@ declare namespace $ {
885
1386
  }
886
1387
 
887
1388
  declare namespace $ {
1389
+ /** Run code without state changes */
888
1390
  function $mol_wire_probe<Value>(task: () => Value, def?: Value): Value | undefined;
889
1391
  }
890
1392
 
891
1393
  declare namespace $ {
1394
+ /**
1395
+ * Real-time refresh current atom.
1396
+ * Don't use if possible. May reduce performance.
1397
+ */
892
1398
  function $mol_wire_watch(): void;
893
1399
  }
894
1400
 
895
1401
  declare namespace $ {
1402
+ /**
1403
+ * Returns closure that returns constant value.
1404
+ * @example
1405
+ * const rnd = $mol_const( Math.random() )
1406
+ */
896
1407
  function $mol_const<Value>(value: Value): {
897
1408
  (): Value;
898
1409
  '()': Value;
@@ -900,6 +1411,9 @@ declare namespace $ {
900
1411
  }
901
1412
 
902
1413
  declare namespace $ {
1414
+ /**
1415
+ * Disable reaping of current subscriber
1416
+ */
903
1417
  function $mol_wire_solid(): void;
904
1418
  }
905
1419
 
@@ -932,6 +1446,7 @@ declare namespace $ {
932
1446
  }
933
1447
 
934
1448
  declare namespace $ {
1449
+ /** Convert a pseudo-synchronous (Suspense API) API to an explicit asynchronous one (for integrating with external systems). */
935
1450
  export function $mol_wire_async<Host extends object>(obj: Host): ObjectOrFunctionResultPromisify<Host>;
936
1451
  type FunctionResultPromisify<Some> = Some extends (...args: infer Args) => infer Res ? Res extends PromiseLike<unknown> ? Some : (...args: Args) => Promise<Res> : Some;
937
1452
  type MethodsResultPromisify<Host extends Object> = {
@@ -952,17 +1467,27 @@ declare namespace $ {
952
1467
  }
953
1468
 
954
1469
  declare namespace $ {
1470
+ /**
1471
+ * Picks keys from `Input` which values extends `Upper`.
1472
+ *
1473
+ * type MathConstants = $mol_type_pick< Math , number > // { E , PI , ... }
1474
+ */
955
1475
  type $mol_type_pick<Input, Upper> = Pick<Input, $mol_type_keys_extract<Input, Upper>>;
956
1476
  }
957
1477
 
958
1478
  declare namespace $ {
959
1479
  }
960
1480
 
1481
+ /** @jsx $mol_jsx */
961
1482
  declare namespace $ {
962
1483
  type $mol_view_content = $mol_view | Node | string | number | boolean | null;
963
1484
  function $mol_view_visible_width(): number;
964
1485
  function $mol_view_visible_height(): number;
965
1486
  function $mol_view_state_key(suffix: string): string;
1487
+ /**
1488
+ * The base class for all visual components. It provides the infrastructure for reactive lazy rendering, handling exceptions.
1489
+ * @see https://mol.hyoo.ru/#!section=docs/=vv2nig_s5zr0f
1490
+ */
966
1491
  class $mol_view extends $mol_object {
967
1492
  static Root<This extends typeof $mol_view>(this: This, id: number): InstanceType<This>;
968
1493
  static roots(): $mol_view[];
@@ -1019,8 +1544,11 @@ declare namespace $ {
1019
1544
  };
1020
1545
  plugins(): readonly $mol_view[];
1021
1546
  [$mol_dev_format_head](): any[];
1547
+ /** Deep search view by predicate. */
1022
1548
  view_find(check: (path: $mol_view, text?: string) => boolean, path?: $mol_view[]): Generator<$mol_view[]>;
1549
+ /** Renders path of views to DOM. */
1023
1550
  force_render(path: Set<$mol_view>): void;
1551
+ /** Renders view to DOM and scroll to it. */
1024
1552
  ensure_visible(view: $mol_view, align?: ScrollLogicalPosition): void;
1025
1553
  bring(): void;
1026
1554
  destructor(): void;
@@ -1035,6 +1563,7 @@ declare namespace $ {
1035
1563
  }
1036
1564
 
1037
1565
  declare namespace $ {
1566
+ /** Plugin is component without its own DOM element, but instead uses the owner DOM element */
1038
1567
  class $mol_plugin extends $mol_view {
1039
1568
  dom_node_external(next?: Element): Element;
1040
1569
  render(): void;
@@ -1450,21 +1979,44 @@ declare namespace $ {
1450
1979
  }
1451
1980
 
1452
1981
  declare namespace $ {
1453
- type $mol_type_equals<A, B> = (<X>() => X extends A ? 1 : 2) extends (<X>() => X extends B ? 1 : 2) ? unknown : never;
1982
+ /**
1983
+ * Return `unknown` when `A` and `B` are the same type. `never` otherwise.
1984
+ *
1985
+ * $mol_type_equals< unknown , any > & number // true
1986
+ * $mol_type_equals< never , never > & number // false
1987
+ */
1988
+ type $mol_type_equals<A, B> = (<X>() => X extends A ? 1 : 2) extends (<X>() => X extends B ? 1 : 2) ? true : false;
1454
1989
  }
1455
1990
 
1456
1991
  declare namespace $ {
1457
- type $mol_type_merge<Intersection> = Intersection extends (...a: any[]) => any ? Intersection : Intersection extends new (...a: any[]) => any ? Intersection : Intersection extends object ? $mol_type_merge_object<Intersection> extends Intersection ? unknown extends $mol_type_equals<{
1992
+ /**
1993
+ * Reqursive converts intersection of records to record of intersections
1994
+ *
1995
+ * // { a : { x : 1 , y : 2 } }
1996
+ * $mol_type_merge< { a : { x : 1 } }&{ a : { y : 2 } } >
1997
+ */
1998
+ type $mol_type_merge<Intersection> = Intersection extends (...a: any[]) => any ? Intersection : Intersection extends new (...a: any[]) => any ? Intersection : Intersection extends object ? $mol_type_merge_object<Intersection> extends Intersection ? true extends $mol_type_equals<{
1458
1999
  [Key in keyof Intersection]: Intersection[Key];
1459
2000
  }, Intersection> ? Intersection : {
1460
2001
  [Key in keyof Intersection]: $mol_type_merge<Intersection[Key]>;
1461
2002
  } : Intersection : Intersection;
2003
+ /**
2004
+ * Flat converts intersection of records to record of intersections
2005
+ *
2006
+ * // { a: 1, b: 2 }
2007
+ * $mol_type_merge< { a: 1 } & { b: 2 } >
2008
+ */
1462
2009
  type $mol_type_merge_object<Intersection> = {
1463
2010
  [Key in keyof Intersection]: Intersection[Key];
1464
2011
  };
1465
2012
  }
1466
2013
 
1467
2014
  declare namespace $ {
2015
+ /**
2016
+ * Converts union of types to intersection of same types
2017
+ *
2018
+ * $mol_type_intersect< number | string > // number & string
2019
+ */
1468
2020
  type $mol_type_intersect<Union> = (Union extends any ? (_: Union) => void : never) extends ((_: infer Intersection) => void) ? Intersection : never;
1469
2021
  }
1470
2022
 
@@ -1497,15 +2049,19 @@ declare namespace $ {
1497
2049
  readonly [k in key]: Source[key] extends string ? Source[key] : string;
1498
2050
  }> & $mol_regexp_groups<Source[key]>>;
1499
2051
  }[keyof Source]>> : never;
2052
+ /** Type safe reguar expression builder */
1500
2053
  export class $mol_regexp<Groups extends Record<string, string>> extends RegExp {
1501
2054
  readonly groups: (Extract<keyof Groups, string>)[];
2055
+ /** Prefer to use $mol_regexp.from */
1502
2056
  constructor(source: string, flags?: string, groups?: (Extract<keyof Groups, string>)[]);
1503
2057
  [Symbol.matchAll](str: string): RegExpStringIterator<RegExpExecArray & $mol_type_override<RegExpExecArray, {
1504
2058
  groups?: {
1505
2059
  [key in keyof Groups]: string;
1506
2060
  };
1507
2061
  }>>;
2062
+ /** Parses input and returns found capture groups or null */
1508
2063
  [Symbol.match](str: string): null | RegExpMatchArray;
2064
+ /** Splits string by regexp edges */
1509
2065
  [Symbol.split](str: string): string[];
1510
2066
  test(str: string): boolean;
1511
2067
  exec(str: string): RegExpExecArray & $mol_type_override<RegExpExecArray, {
@@ -1515,6 +2071,7 @@ declare namespace $ {
1515
2071
  }> | null;
1516
2072
  generate(params: Groups_to_params<Groups>): string | null;
1517
2073
  get native(): RegExp;
2074
+ /** Makes regexp that greedy repeats this pattern with delimiter */
1518
2075
  static separated<Chunk extends $mol_regexp_source, Sep extends $mol_regexp_source>(chunk: Chunk, sep: Sep): $mol_regexp<[$mol_regexp<[[Chunk], Sep] extends infer T ? T extends [[Chunk], Sep] ? T extends $mol_regexp_source[] ? $mol_type_merge<$mol_type_intersect<{ [key in Extract<keyof T, number>]: $mol_regexp_groups<T[key]>; }[Extract<keyof T, number>]>> : T extends RegExp ? Record<string, string> extends NonNullable<NonNullable<ReturnType<T["exec"]>>["groups"]> ? {} : NonNullable<NonNullable<ReturnType<T["exec"]>>["groups"]> : T extends {
1519
2076
  readonly [x: string]: $mol_regexp_source;
1520
2077
  } ? $mol_type_merge<$mol_type_intersect<{ [key_1 in keyof T]: $mol_type_merge<Omit<{ readonly [k in Extract<keyof T, string>]: string; }, key_1> & { readonly [k_1 in key_1]: T[key_1] extends string ? T[key_1] : string; } & $mol_regexp_groups<T[key_1]>>; }[keyof T]>> : never : never : never>, Chunk] extends infer T_1 ? T_1 extends [$mol_regexp<[[Chunk], Sep] extends infer T_2 ? T_2 extends [[Chunk], Sep] ? T_2 extends $mol_regexp_source[] ? $mol_type_merge<$mol_type_intersect<{ [key_4 in Extract<keyof T_2, number>]: $mol_regexp_groups<T_2[key_4]>; }[Extract<keyof T_2, number>]>> : T_2 extends RegExp ? Record<string, string> extends NonNullable<NonNullable<ReturnType<T_2["exec"]>>["groups"]> ? {} : NonNullable<NonNullable<ReturnType<T_2["exec"]>>["groups"]> : T_2 extends {
@@ -1522,14 +2079,23 @@ declare namespace $ {
1522
2079
  } ? $mol_type_merge<$mol_type_intersect<{ [key_5 in keyof T_2]: $mol_type_merge<Omit<{ readonly [k in Extract<keyof T_2, string>]: string; }, key_5> & { readonly [k_1 in key_5]: T_2[key_5] extends string ? T_2[key_5] : string; } & $mol_regexp_groups<T_2[key_5]>>; }[keyof T_2]>> : never : never : never>, Chunk] ? T_1 extends $mol_regexp_source[] ? $mol_type_merge<$mol_type_intersect<{ [key_2 in Extract<keyof T_1, number>]: $mol_regexp_groups<T_1[key_2]>; }[Extract<keyof T_1, number>]>> : T_1 extends RegExp ? Record<string, string> extends NonNullable<NonNullable<ReturnType<T_1["exec"]>>["groups"]> ? {} : NonNullable<NonNullable<ReturnType<T_1["exec"]>>["groups"]> : T_1 extends {
1523
2080
  readonly [x: string]: $mol_regexp_source;
1524
2081
  } ? $mol_type_merge<$mol_type_intersect<{ [key_3 in keyof T_1]: $mol_type_merge<Omit<{ readonly [k in Extract<keyof T_1, string>]: string; }, key_3> & { readonly [k_1 in key_3]: T_1[key_3] extends string ? T_1[key_3] : string; } & $mol_regexp_groups<T_1[key_3]>>; }[keyof T_1]>> : never : never : never>;
2082
+ /** Makes regexp that non-greedy repeats this pattern from min to max count */
1525
2083
  static repeat<Source extends $mol_regexp_source>(source: Source, min?: number, max?: number): $mol_regexp<$mol_regexp_groups<Source>>;
2084
+ /** Makes regexp that greedy repeats this pattern from min to max count */
1526
2085
  static repeat_greedy<Source extends $mol_regexp_source>(source: Source, min?: number, max?: number): $mol_regexp<$mol_regexp_groups<Source>>;
2086
+ /** Makes regexp that match any of options */
1527
2087
  static vary<Sources extends readonly $mol_regexp_source[]>(sources: Sources, flags?: string): $mol_regexp<$mol_regexp_groups<Sources[number]>>;
2088
+ /** Makes regexp that allow absent of this pattern */
1528
2089
  static optional<Source extends $mol_regexp_source>(source: Source): $mol_regexp<$mol_regexp_groups<Source>>;
2090
+ /** Makes regexp that look ahead for pattern */
1529
2091
  static force_after(source: $mol_regexp_source): $mol_regexp<Record<string, string>>;
2092
+ /** Makes regexp that look ahead for pattern */
1530
2093
  static forbid_after(source: $mol_regexp_source): $mol_regexp<Record<string, string>>;
2094
+ /** Converts some js values to regexp */
1531
2095
  static from<Source extends $mol_regexp_source>(source: Source, { ignoreCase, multiline }?: Partial<Pick<RegExp, 'ignoreCase' | 'multiline'>>): $mol_regexp<$mol_regexp_groups<Source>>;
2096
+ /** Makes regexp which includes only unicode category */
1532
2097
  static unicode_only(...category: $mol_unicode_category): $mol_regexp<Record<string, string>>;
2098
+ /** Makes regexp which excludes unicode category */
1533
2099
  static unicode_except(...category: $mol_unicode_category): $mol_regexp<Record<string, string>>;
1534
2100
  static char_range(from: number, to: number): $mol_regexp<{}>;
1535
2101
  static char_only(...allowed: readonly [$mol_regexp_source, ...$mol_regexp_source[]]): $mol_regexp<{}>;
@@ -1558,6 +2124,9 @@ declare namespace $ {
1558
2124
  }
1559
2125
 
1560
2126
  declare namespace $ {
2127
+ /**
2128
+ * Fails if `Actual` type is not subtype of `Expected`.
2129
+ */
1561
2130
  type $mol_type_enforce<Actual extends Expected, Expected> = Actual;
1562
2131
  }
1563
2132
 
@@ -1587,6 +2156,10 @@ declare namespace $ {
1587
2156
 
1588
2157
  //# sourceMappingURL=dimmer.view.tree.d.ts.map
1589
2158
  declare namespace $.$$ {
2159
+ /**
2160
+ * Output text with dimmed mismatched substrings.
2161
+ * @see https://mol.hyoo.ru/#!section=demos/demo=mol_dimmer_demo
2162
+ */
1590
2163
  class $mol_dimmer extends $.$mol_dimmer {
1591
2164
  parts(): any[];
1592
2165
  strings(): string[];
@@ -1607,6 +2180,7 @@ declare namespace $ {
1607
2180
  }
1608
2181
 
1609
2182
  declare namespace $ {
2183
+ /** Returns error type, that don't match to normal value. */
1610
2184
  type $mol_type_error<Message, Info = {}> = Message & {
1611
2185
  $mol_type_error: Info;
1612
2186
  };
@@ -1639,6 +2213,11 @@ declare namespace $ {
1639
2213
  }
1640
2214
 
1641
2215
  declare namespace $ {
2216
+ /**
2217
+ * CSS in TS.
2218
+ * Statically typed CSS style sheets. Following samples show which CSS code are generated from TS code.
2219
+ * @see https://mol.hyoo.ru/#!section=docs/=xwq9q5_f966fg
2220
+ */
1642
2221
  function $mol_style_define<Component extends $mol_view, Config extends $mol_style_guard<Component, Config>>(Component: new () => Component, config: Config): HTMLStyleElement | null;
1643
2222
  }
1644
2223
 
@@ -1668,6 +2247,7 @@ declare namespace $.$$ {
1668
2247
  }
1669
2248
 
1670
2249
  declare namespace $ {
2250
+ /** Creates lexer by dictionary of lexems. Lexem that started first wins. Then lexem that declared earlier wins. Use regexp capture to take parts of token. */
1671
2251
  class $mol_syntax2<Lexems extends {
1672
2252
  [name: string]: RegExp;
1673
2253
  } = {}> {
@@ -1903,6 +2483,11 @@ declare namespace $ {
1903
2483
 
1904
2484
  //# sourceMappingURL=list.view.tree.d.ts.map
1905
2485
  declare namespace $.$$ {
2486
+ /**
2487
+ * The list of rows with lazy/virtual rendering support based on `minimal_height` of rows.
2488
+ * `mol_list` should contain only components that inherits `mol_view`. You should not place raw strings or numbers in list.
2489
+ * @see https://mol.hyoo.ru/#!section=demos/demo=mol_list_demo
2490
+ */
1906
2491
  class $mol_list extends $.$mol_list {
1907
2492
  sub(): readonly $mol_view[];
1908
2493
  render_visible_only(): boolean;
@@ -1922,6 +2507,10 @@ declare namespace $ {
1922
2507
  }
1923
2508
 
1924
2509
  declare namespace $ {
2510
+ /**
2511
+ * Z-index values for layers
2512
+ * https://page.hyoo.ru/#!=xthcpx_wqmiba
2513
+ */
1925
2514
  let $mol_layer: Record<"float" | "hover" | "focus" | "speck" | "popup", $mol_style_func<"var", unknown>>;
1926
2515
  }
1927
2516
 
@@ -1983,6 +2572,10 @@ declare namespace $ {
1983
2572
 
1984
2573
  //# sourceMappingURL=button.view.tree.d.ts.map
1985
2574
  declare namespace $.$$ {
2575
+ /**
2576
+ * Simple button.
2577
+ * @see https://mol.hyoo.ru/#!section=demos/demo=mol_button_demo
2578
+ */
1986
2579
  class $mol_button extends $.$mol_button {
1987
2580
  disabled(): boolean;
1988
2581
  event_activate(next: Event): void;
@@ -2032,6 +2625,7 @@ declare namespace $ {
2032
2625
  }
2033
2626
 
2034
2627
  declare namespace $ {
2628
+ /** State of time moment */
2035
2629
  class $mol_state_time extends $mol_object {
2036
2630
  static task(precision: number, reset?: null): $mol_after_timeout | $mol_after_frame;
2037
2631
  static now(precision: number): number;
@@ -2052,6 +2646,7 @@ declare namespace $ {
2052
2646
 
2053
2647
  //# sourceMappingURL=svg.view.tree.d.ts.map
2054
2648
  declare namespace $.$$ {
2649
+ /** Base SVG component to display SVG images or icons. */
2055
2650
  class $mol_svg extends $.$mol_svg {
2056
2651
  computed_style(): Record<string, any>;
2057
2652
  font_size(): number;
@@ -2135,6 +2730,10 @@ declare namespace $ {
2135
2730
  }
2136
2731
 
2137
2732
  declare namespace $ {
2733
+ /**
2734
+ * Convert asynchronous (promise-based) API to synchronous by wrapping function and method calls in a fiber.
2735
+ * @see https://mol.hyoo.ru/#!section=docs/=1fcpsq_1wh0h2
2736
+ */
2138
2737
  export function $mol_wire_sync<Host extends object>(obj: Host): ObjectOrFunctionResultAwaited<Host>;
2139
2738
  type FunctionResultAwaited<Some> = Some extends (...args: infer Args) => infer Res ? (...args: Args) => Awaited<Res> : Some;
2140
2739
  type ConstructorResultAwaited<Some> = Some extends new (...args: infer Args) => infer Res ? new (...args: Args) => Res : {};
@@ -2177,6 +2776,10 @@ declare namespace $ {
2177
2776
 
2178
2777
  //# sourceMappingURL=copy.view.tree.d.ts.map
2179
2778
  declare namespace $.$$ {
2779
+ /**
2780
+ * Button copy text() value to clipboard
2781
+ * @see https://mol.hyoo.ru/#!section=demos/demo=mol_button_demo
2782
+ */
2180
2783
  class $mol_button_copy extends $.$mol_button_copy {
2181
2784
  data(): {
2182
2785
  [k: string]: Blob;
@@ -2224,6 +2827,10 @@ declare namespace $ {
2224
2827
  }
2225
2828
 
2226
2829
  declare namespace $ {
2830
+ /**
2831
+ * Decorates method to fiber to ensure it is executed only once inside other fiber from [mol_wire](../wire/README.md)
2832
+ * @see https://mol.hyoo.ru/#!section=docs/=1fcpsq_1wh0h2
2833
+ */
2227
2834
  let $mol_action: typeof $mol_wire_method;
2228
2835
  }
2229
2836
 
@@ -2248,6 +2855,7 @@ declare namespace $ {
2248
2855
  }
2249
2856
 
2250
2857
  declare namespace $ {
2858
+ /** Temporary buffer. Recursive usage isn't supported. */
2251
2859
  function $mol_charset_buffer(size: number): Uint8Array<ArrayBuffer>;
2252
2860
  }
2253
2861
 
@@ -2290,6 +2898,10 @@ declare namespace $ {
2290
2898
  protected static changed: Set<$mol_file_base>;
2291
2899
  protected static frame: null | $mol_after_timeout;
2292
2900
  protected static changed_add(type: 'change' | 'rename', path: string): void;
2901
+ /**
2902
+ * Должно быть больше, чем время между событиями от вотчера при записи внешним процессом.
2903
+ * Иначе запуск ресетов паралельно с изменением может привести к неконсистентности.
2904
+ */
2293
2905
  static watch_debounce(): number;
2294
2906
  static flush(): void;
2295
2907
  protected static watching: boolean;
@@ -2516,6 +3128,10 @@ declare namespace $ {
2516
3128
  interface $mol_locale_dict {
2517
3129
  [key: string]: string;
2518
3130
  }
3131
+ /**
3132
+ * Localisation in $mol framework
3133
+ * @see https://mol.hyoo.ru/#!section=docs/=s5aqnb_odub8l
3134
+ */
2519
3135
  class $mol_locale extends $mol_object {
2520
3136
  static lang_default(): string;
2521
3137
  static lang(next?: string): string;
@@ -2612,6 +3228,10 @@ declare namespace $ {
2612
3228
 
2613
3229
  //# sourceMappingURL=code.view.tree.d.ts.map
2614
3230
  declare namespace $.$$ {
3231
+ /**
3232
+ * Code visualizer.
3233
+ * @see https://mol.hyoo.ru/#!section=demos/demo=mol_text_code_demo
3234
+ */
2615
3235
  class $mol_text_code extends $.$mol_text_code {
2616
3236
  render_visible_only(): boolean;
2617
3237
  text_lines(): readonly string[];
@@ -2687,6 +3307,10 @@ declare namespace $ {
2687
3307
 
2688
3308
  //# sourceMappingURL=check.view.tree.d.ts.map
2689
3309
  declare namespace $.$$ {
3310
+ /**
3311
+ * Checkbox UI component. See Variants for more concrete implementations.
3312
+ * @see https://mol.hyoo.ru/#!section=demos/demo=mol_check_box_demo
3313
+ */
2690
3314
  class $mol_check extends $.$mol_check {
2691
3315
  click(next?: Event): void;
2692
3316
  sub(): readonly $mol_view_content[];
@@ -2723,6 +3347,10 @@ declare namespace $ {
2723
3347
 
2724
3348
  //# sourceMappingURL=expand.view.tree.d.ts.map
2725
3349
  declare namespace $.$$ {
3350
+ /**
3351
+ * Expander for trees, lists, etc
3352
+ * @see https://mol.hyoo.ru/#!section=demos/demo=mol_check_expand_demo
3353
+ */
2726
3354
  class $mol_check_expand extends $.$mol_check_expand {
2727
3355
  level_style(): string;
2728
3356
  expandable(): boolean;
@@ -2768,6 +3396,10 @@ declare namespace $ {
2768
3396
 
2769
3397
  //# sourceMappingURL=list.view.tree.d.ts.map
2770
3398
  declare namespace $.$$ {
3399
+ /**
3400
+ * Dumps any JS values.
3401
+ * @see https://mol.hyoo.ru/#!section=demos/demo=mol_dump_demo
3402
+ */
2771
3403
  class $mol_dump_list extends $.$mol_dump_list {
2772
3404
  sub(): $.$mol_dump_value[];
2773
3405
  dump_value(index: number): any;
@@ -2821,6 +3453,10 @@ declare namespace $ {
2821
3453
 
2822
3454
  //# sourceMappingURL=expander.view.tree.d.ts.map
2823
3455
  declare namespace $.$$ {
3456
+ /**
3457
+ * Component which expands any content on title click.
3458
+ * @see https://mol.hyoo.ru/#!section=demos/demo=mol_expander_demo
3459
+ */
2824
3460
  class $mol_expander extends $.$mol_expander {
2825
3461
  rows(): $mol_view[];
2826
3462
  expandable(): boolean;
@@ -2944,6 +3580,10 @@ declare namespace $ {
2944
3580
 
2945
3581
  //# sourceMappingURL=value.view.tree.d.ts.map
2946
3582
  declare namespace $.$$ {
3583
+ /**
3584
+ * Dumps any JS values.
3585
+ * @see https://mol.hyoo.ru/#!section=demos/demo=mol_dump_demo
3586
+ */
2947
3587
  class $mol_dump_value extends $.$mol_dump_value {
2948
3588
  sub(): $.$mol_text_code[] | $.$mol_expander[];
2949
3589
  simple(): string;