mol_plot_all 1.2.1706 → 1.2.1707

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/node.d.ts CHANGED
@@ -73,11 +73,17 @@ declare namespace $ {
73
73
 
74
74
  declare namespace $ {
75
75
  const $mol_ambient_ref: unique symbol;
76
+ /** @deprecated use $ instead */
76
77
  type $mol_ambient_context = $;
77
78
  function $mol_ambient(this: $ | void, overrides: Partial<$>): $;
78
79
  }
79
80
 
80
81
  declare namespace $ {
82
+ /**
83
+ * Proxy that delegates all to lazy returned target.
84
+ *
85
+ * $mol_delegate( Array.prototype , ()=> fetch_array() )
86
+ */
81
87
  function $mol_delegate<Value extends object>(proto: Value, target: () => Value): Value;
82
88
  }
83
89
 
@@ -141,57 +147,130 @@ declare namespace $ {
141
147
  }
142
148
 
143
149
  declare namespace $ {
150
+ /** Generates unique identifier. */
144
151
  function $mol_guid(length?: number, exists?: (id: string) => boolean): string;
145
152
  }
146
153
 
147
154
  declare namespace $ {
155
+ /** Special status statuses. */
148
156
  enum $mol_wire_cursor {
157
+ /** Update required. */
149
158
  stale = -1,
159
+ /** Some of (transitive) pub update required. */
150
160
  doubt = -2,
161
+ /** Actual state but may be dropped. */
151
162
  fresh = -3,
163
+ /** State will never be changed. */
152
164
  final = -4
153
165
  }
154
166
  }
155
167
 
156
168
  declare namespace $ {
169
+ /**
170
+ * Collects subscribers in compact array. 28B
171
+ */
157
172
  class $mol_wire_pub extends Object {
158
173
  constructor(id?: string);
159
174
  [Symbol.toStringTag]: string;
160
175
  data: unknown[];
161
176
  static get [Symbol.species](): ArrayConstructor;
177
+ /**
178
+ * Index of first subscriber.
179
+ */
162
180
  protected sub_from: number;
181
+ /**
182
+ * All current subscribers.
183
+ */
163
184
  get sub_list(): readonly $mol_wire_sub[];
185
+ /**
186
+ * Has any subscribers or not.
187
+ */
164
188
  get sub_empty(): boolean;
189
+ /**
190
+ * Subscribe subscriber to this publisher events and return position of subscriber that required to unsubscribe.
191
+ */
165
192
  sub_on(sub: $mol_wire_pub, pub_pos: number): number;
193
+ /**
194
+ * Unsubscribe subscriber from this publisher events by subscriber position provided by `on(pub)`.
195
+ */
166
196
  sub_off(sub_pos: number): void;
197
+ /**
198
+ * Called when last sub was unsubscribed.
199
+ **/
167
200
  reap(): void;
201
+ /**
202
+ * Autowire this publisher with current subscriber.
203
+ **/
168
204
  promote(): void;
205
+ /**
206
+ * Enforce actualization. Should not throw errors.
207
+ */
169
208
  fresh(): void;
209
+ /**
210
+ * Allow to put data to caches in the subtree.
211
+ */
170
212
  complete(): void;
171
213
  get incompleted(): boolean;
214
+ /**
215
+ * Notify subscribers about self changes.
216
+ */
172
217
  emit(quant?: $mol_wire_cursor): void;
218
+ /**
219
+ * Moves peer from one position to another. Doesn't clear data at old position!
220
+ */
173
221
  peer_move(from_pos: number, to_pos: number): void;
222
+ /**
223
+ * Updates self position in the peer.
224
+ */
174
225
  peer_repos(peer_pos: number, self_pos: number): void;
175
226
  }
176
227
  }
177
228
 
178
229
  declare namespace $ {
230
+ /** Generic subscriber interface */
179
231
  interface $mol_wire_sub extends $mol_wire_pub {
180
232
  temp: boolean;
181
233
  pub_list: $mol_wire_pub[];
234
+ /**
235
+ * Begin auto wire to publishers.
236
+ * Returns previous auto subscriber that must me transfer to the `end`.
237
+ */
182
238
  track_on(): $mol_wire_sub | null;
239
+ /**
240
+ * Returns next auto wired publisher. It can be easely repormoted.
241
+ * Or promotes next publisher to auto wire its togeter.
242
+ * Must be used only between `track_on` and `track_off`.
243
+ */
183
244
  track_next(pub?: $mol_wire_pub): $mol_wire_pub | null;
184
245
  pub_off(pub_pos: number): void;
246
+ /**
247
+ * Unsubscribes from unpromoted publishers.
248
+ */
185
249
  track_cut(sub: $mol_wire_pub | null): void;
250
+ /**
251
+ * Ends auto wire to publishers.
252
+ */
186
253
  track_off(sub: $mol_wire_pub | null): void;
254
+ /**
255
+ * Receive notification about publisher changes.
256
+ */
187
257
  absorb(quant: $mol_wire_cursor, pos: number): void;
258
+ /**
259
+ * Unsubscribes from all publishers.
260
+ */
188
261
  destructor(): void;
189
262
  }
190
263
  }
191
264
 
192
265
  declare namespace $ {
193
266
  let $mol_wire_auto_sub: $mol_wire_sub | null;
267
+ /**
268
+ * When fulfilled, all publishers are promoted to this subscriber on access to its.
269
+ */
194
270
  function $mol_wire_auto(next?: $mol_wire_sub | null): $mol_wire_sub | null;
271
+ /**
272
+ * Affection queue. Used to prevent accidental stack overflow on emit.
273
+ */
195
274
  const $mol_wire_affected: ($mol_wire_sub | number)[];
196
275
  }
197
276
 
@@ -224,6 +303,13 @@ declare namespace $ {
224
303
  }
225
304
 
226
305
  declare namespace $ {
306
+ /**
307
+ * Publisher that can auto collect other publishers. 32B
308
+ *
309
+ * P1 P2 P3 P4 S1 S2 S3
310
+ * ^ ^
311
+ * pubs_from subs_from
312
+ */
227
313
  class $mol_wire_pub_sub extends $mol_wire_pub implements $mol_wire_sub {
228
314
  protected pub_from: number;
229
315
  protected cursor: $mol_wire_cursor;
@@ -240,6 +326,9 @@ declare namespace $ {
240
326
  complete_pubs(): void;
241
327
  absorb(quant?: $mol_wire_cursor, pos?: number): void;
242
328
  [$mol_dev_format_head](): any[];
329
+ /**
330
+ * Is subscribed to any publisher or not.
331
+ */
243
332
  get pub_empty(): boolean;
244
333
  }
245
334
  }
@@ -255,6 +344,13 @@ declare namespace $ {
255
344
  }
256
345
 
257
346
  declare namespace $ {
347
+ /**
348
+ * Suspendable task with support both sync/async api.
349
+ *
350
+ * A1 A2 A3 A4 P1 P2 P3 P4 S1 S2 S3
351
+ * ^ ^ ^
352
+ * args_from pubs_from subs_from
353
+ **/
258
354
  abstract class $mol_wire_fiber<Host, Args extends readonly unknown[], Result> extends $mol_wire_pub_sub {
259
355
  readonly task: (this: Host, ...args: Args) => Result;
260
356
  readonly host?: Host | undefined;
@@ -281,7 +377,15 @@ declare namespace $ {
281
377
  fresh(): this | undefined;
282
378
  refresh(): void;
283
379
  abstract put(next: Result | Error | Promise<Result | Error>): Result | Error | Promise<Result | Error>;
380
+ /**
381
+ * Synchronous execution. Throws Promise when waits async task (SuspenseAPI provider).
382
+ * Should be called inside SuspenseAPI consumer (ie fiber).
383
+ */
284
384
  sync(): Awaited<Result>;
385
+ /**
386
+ * Asynchronous execution.
387
+ * It's SuspenseAPI consumer. So SuspenseAPI providers can be called inside.
388
+ */
285
389
  async_raw(): Promise<Result>;
286
390
  async(): Promise<Result> & {
287
391
  destructor(): void;
@@ -293,31 +397,48 @@ declare namespace $ {
293
397
 
294
398
  declare namespace $ {
295
399
  let $mol_compare_deep_cache: WeakMap<any, WeakMap<any, boolean>>;
400
+ /**
401
+ * Deeply compares two values. Returns true if equal.
402
+ * Define `Symbol.toPrimitive` to customize.
403
+ */
296
404
  function $mol_compare_deep<Value>(left: Value, right: Value): boolean;
297
405
  }
298
406
 
299
407
  declare namespace $ {
408
+ /** Logger event data */
300
409
  type $mol_log3_event<Fields> = {
301
410
  [key in string]: unknown;
302
411
  } & {
412
+ /** Time of event creation */
303
413
  time?: string;
414
+ /** Place of event creation */
304
415
  place: unknown;
416
+ /** Short description of event */
305
417
  message: string;
306
418
  } & Fields;
419
+ /** Logger function */
307
420
  type $mol_log3_logger<Fields, Res = void> = (this: $, event: $mol_log3_event<Fields>) => Res;
421
+ /** Log begin of some task */
308
422
  let $mol_log3_come: $mol_log3_logger<{}>;
423
+ /** Log end of some task */
309
424
  let $mol_log3_done: $mol_log3_logger<{}>;
425
+ /** Log error */
310
426
  let $mol_log3_fail: $mol_log3_logger<{}>;
427
+ /** Log warning message */
311
428
  let $mol_log3_warn: $mol_log3_logger<{
312
429
  hint: string;
313
430
  }>;
431
+ /** Log some generic event */
314
432
  let $mol_log3_rise: $mol_log3_logger<{}>;
433
+ /** Log begin of log group, returns func to close group */
315
434
  let $mol_log3_area: $mol_log3_logger<{}, () => void>;
435
+ /** Log begin of collapsed group only when some logged inside, returns func to close group */
316
436
  function $mol_log3_area_lazy(this: $, event: $mol_log3_event<{}>): () => void;
317
437
  let $mol_log3_stack: (() => void)[];
318
438
  }
319
439
 
320
440
  declare namespace $ {
441
+ /** Position in any resource. */
321
442
  class $mol_span extends $mol_object2 {
322
443
  readonly uri: string;
323
444
  readonly source: string;
@@ -325,9 +446,13 @@ declare namespace $ {
325
446
  readonly col: number;
326
447
  readonly length: number;
327
448
  constructor(uri: string, source: string, row: number, col: number, length: number);
449
+ /** Span for begin of unknown resource */
328
450
  static unknown: $mol_span;
451
+ /** Makes new span for begin of resource. */
329
452
  static begin(uri: string, source?: string): $mol_span;
453
+ /** Makes new span for end of resource. */
330
454
  static end(uri: string, source: string): $mol_span;
455
+ /** Makes new span for entire resource. */
331
456
  static entire(uri: string, source: string): $mol_span;
332
457
  toString(): string;
333
458
  toJSON(): {
@@ -336,14 +461,19 @@ declare namespace $ {
336
461
  col: number;
337
462
  length: number;
338
463
  };
464
+ /** Makes new error for this span. */
339
465
  error(message: string, Class?: ErrorConstructor): Error;
466
+ /** Makes new span for same uri. */
340
467
  span(row: number, col: number, length: number): $mol_span;
468
+ /** Makes new span after end of this. */
341
469
  after(length?: number): $mol_span;
470
+ /** Makes new span between begin and end. */
342
471
  slice(begin: number, end?: number): $mol_span;
343
472
  }
344
473
  }
345
474
 
346
475
  declare namespace $ {
476
+ /** Serializes tree to string in tree format. */
347
477
  function $mol_tree2_to_string(this: $, tree: $mol_tree2): string;
348
478
  }
349
479
 
@@ -352,37 +482,74 @@ declare namespace $ {
352
482
  }
353
483
 
354
484
  declare namespace $ {
485
+ /** Path by types in tree. */
355
486
  type $mol_tree2_path = Array<string | number | null>;
487
+ /** Hask tool for processing node. */
356
488
  type $mol_tree2_hack<Context> = (input: $mol_tree2, belt: $mol_tree2_belt<Context>, context: Context) => readonly $mol_tree2[];
489
+ /** Collection of hask tools for processing tree. */
357
490
  type $mol_tree2_belt<Context> = Record<string, $mol_tree2_hack<Context>>;
491
+ /**
492
+ * Abstract Syntax Tree with human readable serialization.
493
+ * Avoid direct instantiation. Use static factories instead.
494
+ * @see https://github.com/nin-jin/tree.d
495
+ */
358
496
  class $mol_tree2 extends Object {
497
+ /** Type of structural node, `value` should be empty */
359
498
  readonly type: string;
499
+ /** Content of data node, `type` should be empty */
360
500
  readonly value: string;
501
+ /** Child nodes */
361
502
  readonly kids: readonly $mol_tree2[];
503
+ /** Position in most far source resource */
362
504
  readonly span: $mol_span;
363
- constructor(type: string, value: string, kids: readonly $mol_tree2[], span: $mol_span);
505
+ constructor(
506
+ /** Type of structural node, `value` should be empty */
507
+ type: string,
508
+ /** Content of data node, `type` should be empty */
509
+ value: string,
510
+ /** Child nodes */
511
+ kids: readonly $mol_tree2[],
512
+ /** Position in most far source resource */
513
+ span: $mol_span);
514
+ /** Makes collection node. */
364
515
  static list(kids: readonly $mol_tree2[], span?: $mol_span): $mol_tree2;
516
+ /** Makes new derived collection node. */
365
517
  list(kids: readonly $mol_tree2[]): $mol_tree2;
518
+ /** Makes data node for any string. */
366
519
  static data(value: string, kids?: readonly $mol_tree2[], span?: $mol_span): $mol_tree2;
520
+ /** Makes new derived data node. */
367
521
  data(value: string, kids?: readonly $mol_tree2[]): $mol_tree2;
522
+ /** Makes struct node. */
368
523
  static struct(type: string, kids?: readonly $mol_tree2[], span?: $mol_span): $mol_tree2;
524
+ /** Makes new derived structural node. */
369
525
  struct(type: string, kids?: readonly $mol_tree2[]): $mol_tree2;
526
+ /** Makes new derived node with different kids id defined. */
370
527
  clone(kids: readonly $mol_tree2[], span?: $mol_span): $mol_tree2;
528
+ /** Returns multiline text content. */
371
529
  text(): string;
530
+ /** Parses tree format. */
531
+ /** @deprecated Use $mol_tree2_from_string */
372
532
  static fromString(str: string, uri?: string): $mol_tree2;
533
+ /** Serializes to tree format. */
373
534
  toString(): string;
535
+ /** Makes new tree with node overrided by path. */
374
536
  insert(value: $mol_tree2 | null, ...path: $mol_tree2_path): $mol_tree2;
537
+ /** Makes new tree with node overrided by path. */
375
538
  update(value: readonly $mol_tree2[], ...path: $mol_tree2_path): readonly $mol_tree2[];
539
+ /** Query nodes by path. */
376
540
  select(...path: $mol_tree2_path): $mol_tree2;
541
+ /** Filter kids by path or value. */
377
542
  filter(path: string[], value?: string): $mol_tree2;
378
543
  hack_self<Context extends {
379
544
  span?: $mol_span;
380
545
  [key: string]: unknown;
381
546
  } = {}>(belt: $mol_tree2_belt<Context>, context?: Context): readonly $mol_tree2[];
547
+ /** Transform tree through context with transformers */
382
548
  hack<Context extends {
383
549
  span?: $mol_span;
384
550
  [key: string]: unknown;
385
551
  } = {}>(belt: $mol_tree2_belt<Context>, context?: Context): $mol_tree2[];
552
+ /** Makes Error with node coordinates. */
386
553
  error(message: string, Class?: ErrorConstructor): Error;
387
554
  }
388
555
  class $mol_tree2_empty extends $mol_tree2 {
@@ -391,6 +558,7 @@ declare namespace $ {
391
558
  }
392
559
 
393
560
  declare namespace $ {
561
+ /** Syntax error with cordinates and source line snippet. */
394
562
  class $mol_error_syntax extends SyntaxError {
395
563
  reason: string;
396
564
  line: string;
@@ -400,6 +568,7 @@ declare namespace $ {
400
568
  }
401
569
 
402
570
  declare namespace $ {
571
+ /** Parses tree format from string. */
403
572
  function $mol_tree2_from_string(this: $, str: string, uri?: string): $mol_tree2;
404
573
  }
405
574
 
@@ -412,6 +581,7 @@ declare namespace $ {
412
581
  }
413
582
 
414
583
  declare namespace $ {
584
+ /** Module for working with terminal. Text coloring when output in terminal */
415
585
  class $mol_term_color {
416
586
  static reset: (str: string) => string;
417
587
  static bold: (str: string) => string;
@@ -443,6 +613,7 @@ declare namespace $ {
443
613
  }
444
614
 
445
615
  declare namespace $ {
616
+ /** One-shot fiber */
446
617
  class $mol_wire_task<Host, Args extends readonly unknown[], Result> extends $mol_wire_fiber<Host, Args, Result> {
447
618
  static getter<Host, Args extends readonly unknown[], Result>(task: (this: Host, ...args: Args) => Result): (host: Host, args: Args) => $mol_wire_task<Host, Args, Result>;
448
619
  get temp(): boolean;
@@ -453,6 +624,10 @@ declare namespace $ {
453
624
  }
454
625
 
455
626
  declare namespace $ {
627
+ /**
628
+ * Convert asynchronous (promise-based) API to synchronous by wrapping function and method calls in a fiber.
629
+ * @see https://mol.hyoo.ru/#!section=docs/=1fcpsq_1wh0h2
630
+ */
456
631
  export function $mol_wire_sync<Host extends object>(obj: Host): ObjectOrFunctionResultAwaited<Host>;
457
632
  type FunctionResultAwaited<Some> = Some extends (...args: infer Args) => infer Res ? (...args: Args) => Awaited<Res> : Some;
458
633
  type ConstructorResultAwaited<Some> = Some extends new (...args: infer Args) => infer Res ? new (...args: Args) => Res : {};
@@ -540,6 +715,10 @@ declare namespace $ {
540
715
  type $mol_style_unit_time = 's' | 'ms';
541
716
  type $mol_style_unit_any = $mol_style_unit_length | $mol_style_unit_angle | $mol_style_unit_time;
542
717
  type $mol_style_unit_str<Quanity extends $mol_style_unit_any = $mol_style_unit_any> = `${number}${Quanity}`;
718
+ /**
719
+ * CSS Units
720
+ * @see https://mol.hyoo.ru/#!section=docs/=xwq9q5_f966fg
721
+ */
543
722
  class $mol_style_unit<Literal extends $mol_style_unit_any> extends $mol_decor<number> {
544
723
  readonly literal: Literal;
545
724
  constructor(value: number, literal: Literal);
@@ -579,6 +758,10 @@ declare namespace $ {
579
758
  type $mol_style_func_name = 'calc' | 'hsla' | 'rgba' | 'var' | 'clamp' | 'scale' | 'cubic-bezier' | 'linear' | 'steps' | $mol_style_func_image | $mol_style_func_filter;
580
759
  type $mol_style_func_image = 'url' | 'linear-gradient' | 'radial-gradient' | 'conic-gradient';
581
760
  type $mol_style_func_filter = 'blur' | 'brightness' | 'contrast' | 'drop-shadow' | 'grayscale' | 'hue-rotate' | 'invert' | 'opacity' | 'sepia' | 'saturate';
761
+ /**
762
+ * CSS Functions
763
+ * @see https://mol.hyoo.ru/#!section=docs/=xwq9q5_f966fg
764
+ */
582
765
  class $mol_style_func<Name extends $mol_style_func_name, Value = unknown> extends $mol_decor<Value> {
583
766
  readonly name: Name;
584
767
  constructor(name: Name, value: Value);
@@ -610,6 +793,7 @@ declare namespace $ {
610
793
  }
611
794
 
612
795
  declare namespace $ {
796
+ /** Replaces properties of `Base` record by properties from `Over`. */
613
797
  type $mol_type_override<Base, Over> = Omit<Base, keyof Over> & Over;
614
798
  }
615
799
 
@@ -656,46 +840,180 @@ declare namespace $ {
656
840
  type Repeat = 'repeat-x' | 'repeat-y' | 'repeat' | 'space' | 'round' | 'no-repeat' | $mol_style_func<'var'>;
657
841
  type BG_size = Length | 'auto' | 'contain' | 'cover';
658
842
  interface Overrides {
843
+ /**
844
+ * Sets the accent color for user-interface controls generated by some elements.
845
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/accent-color
846
+ */
659
847
  accentColor?: $mol_style_properties_color | Common;
660
848
  align?: {
849
+ /**
850
+ * Distribution of space between and around content items along a flexbox's cross-axis or a grid's block axis.
851
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/align-content
852
+ */
661
853
  content?: 'normal' | Baseline_position | Content_distribution | Content_position | `${Overflow_position} ${Content_position}` | Common;
854
+ /**
855
+ * Sets the align-self value on all direct children as a group.
856
+ * In Flexbox, it controls the alignment of items on the Cross Axis.
857
+ * In Grid Layout, it controls the alignment of items on the Block Axis within their grid area.
858
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/align-items
859
+ */
662
860
  items?: 'normal' | 'stretch' | Baseline_position | Self_position | `${Overflow_position} ${Self_position}` | Common;
861
+ /**
862
+ * Overrides a grid or flex item's align-items value.
863
+ * In Grid, it aligns the item inside the grid area.
864
+ * In Flexbox, it aligns the item on the cross axis.
865
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/align-self
866
+ */
663
867
  self?: 'auto' | 'normal' | 'stretch' | Baseline_position | Self_position | `${Overflow_position} ${Self_position}` | Common;
664
868
  };
665
869
  justify?: {
870
+ /**
871
+ * Distribution of space between and around content items along the main-axis of a flex container, and the inline axis of a grid container.
872
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/justify-content
873
+ */
666
874
  content?: 'normal' | Baseline_position | Content_distribution | Content_position | `${Overflow_position} ${Content_position}` | Common;
875
+ /**
876
+ * Sets the justify-self value on all direct children as a group.
877
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/justify-items
878
+ */
667
879
  items?: 'normal' | 'stretch' | Baseline_position | Self_position | `${Overflow_position} ${Self_position}` | Common;
880
+ /**
881
+ * Way a box is justified inside its alignment container along the appropriate axis.
882
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/justify-self
883
+ */
668
884
  self?: 'auto' | 'normal' | 'stretch' | Baseline_position | Self_position | `${Overflow_position} ${Self_position}` | Common;
669
885
  };
886
+ /**
887
+ * resets all of an element's properties except unicode-bidi, direction, and CSS Custom Properties.
888
+ * It can set properties to their initial or inherited values, or to the values specified in another cascade layer or stylesheet origin.
889
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/all
890
+ */
670
891
  all?: Common;
671
892
  animation?: {
893
+ /**
894
+ * Specifies the composite operation to use when multiple animations affect the same property simultaneously.
895
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/animation-composition
896
+ */
672
897
  composition?: Single_animation_composition | Single_animation_composition[][] | Common;
898
+ /**
899
+ * Specifies the amount of time to wait from applying the animation to an element before beginning to perform the animation.
900
+ * The animation can start later, immediately from its beginning, or immediately and partway through the animation.
901
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/animation-delay
902
+ */
673
903
  delay?: $mol_style_unit_str<$mol_style_unit_time> | $mol_style_unit_str<$mol_style_unit_time>[][] | Common;
904
+ /**
905
+ * Sets whether an animation should play forward, backward, or alternate back and forth between playing the sequence forward and backward.
906
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/animation-direction
907
+ */
674
908
  direction?: Single_animation_direction | Single_animation_direction[][] | Common;
909
+ /**
910
+ * Sets the length of time that an animation takes to complete one cycle.
911
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/animation-duration
912
+ */
675
913
  duration?: $mol_style_unit_str<$mol_style_unit_time> | $mol_style_unit_str<$mol_style_unit_time>[][] | Common;
914
+ /**
915
+ * Sets how a CSS animation applies styles to its target before and after its execution.
916
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/animation-fill-mode
917
+ */
676
918
  fillMode?: Single_animation_fill_mode | Single_animation_fill_mode[][] | Common;
919
+ /**
920
+ * Sets the number of times an animation sequence should be played before stopping.
921
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/animation-iteration-count
922
+ */
677
923
  iterationCount?: Single_animation_iteration_count | Single_animation_iteration_count[][] | Common;
924
+ /**
925
+ * Specifies the names of one or more keyframes at-rules that describe the animation to apply to an element.
926
+ * Multiple keyframe at-rules are specified as a comma-separated list of names.
927
+ * If the specified name does not match any keyframe at-rule, no properties are animated.
928
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/animation-name
929
+ */
678
930
  name?: 'none' | string & {} | ('none' | string & {})[][] | Common;
931
+ /**
932
+ * Sets whether an animation is running or paused.
933
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/animation-play-state
934
+ */
679
935
  playState?: Single_animation_play_state | Single_animation_play_state[][] | Common;
936
+ /**
937
+ * Sets how an animation progresses through the duration of each cycle.
938
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/animation-timing-function
939
+ */
680
940
  timingFunction?: Easing_function | Easing_function[][] | Common;
681
941
  };
942
+ /**
943
+ * Used to control native appearance of UI controls, that are based on operating system's theme.
944
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/appearance
945
+ */
682
946
  appearance?: 'none' | 'auto' | Compat_auto | Compat_special | Common;
947
+ /**
948
+ * Sets a preferred aspect ratio for the box, which will be used in the calculation of auto sizes and some other layout functions.
949
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/aspect-ratio
950
+ */
683
951
  aspectRatio?: 'auto' | number | `${number} / ${number}`;
952
+ /**
953
+ * lets you apply graphical effects such as blurring or color shifting to the area behind an element.
954
+ * Because it applies to everything behind the element, to see the effect you must make the element
955
+ * or its background at least partially transparent.
956
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/backdrop-filter
957
+ */
684
958
  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;
959
+ /**
960
+ * Sets whether the back face of an element is visible when turned towards the user.
961
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/backface-visibility
962
+ */
685
963
  backfaceVisibility: 'visible' | 'hidden' | Common;
964
+ /**
965
+ * 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.
966
+ * @see https://developer.mozilla.org/ru/docs/Web/CSS/justify-content
967
+ */
686
968
  justifyContent?: 'start' | 'end' | 'flex-start' | 'flex-end' | 'left' | 'right' | 'space-between' | 'space-around' | 'space-evenly' | 'normal' | 'stretch' | 'center' | Common;
969
+ /** @see https://developer.mozilla.org/en-US/docs/Web/CSS/gap */
687
970
  gap?: Length | readonly [Length, Length] | Common;
971
+ /**
972
+ * All background style properties.
973
+ * @see https://developer.mozilla.org/ru/docs/Web/CSS/background
974
+ * */
688
975
  background?: 'none' | {
976
+ /**
977
+ * Sets whether a background image's position is fixed within the viewport, or scrolls with its containing block.
978
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/background-attachment
979
+ */
689
980
  attachment?: 'scroll' | 'fixed' | 'local' | ('scroll' | 'fixed' | 'local')[][] | Common;
981
+ /**
982
+ * Sets how an element's background images should blend with each other and with the element's background color.
983
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/background-blend-mode
984
+ */
690
985
  blendMode?: Mix_blend_mode | Mix_blend_mode[][] | Common;
986
+ /**
987
+ * Sets whether an element's background extends underneath its border box, padding box, or content box.
988
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/background-clip
989
+ */
691
990
  clip?: Box | Box[][] | Common;
991
+ /**
992
+ * Background color.
993
+ * @see https://developer.mozilla.org/ru/docs/Web/CSS/background-color
994
+ */
692
995
  color?: $mol_style_properties_color | Common;
996
+ /**
997
+ * Background images.
998
+ * @see https://developer.mozilla.org/ru/docs/Web/CSS/background-image
999
+ */
693
1000
  image?: readonly (readonly [$mol_style_func<$mol_style_func_image> | string & {}])[] | 'none' | Common;
1001
+ /**
1002
+ * How background images are repeated.
1003
+ * @see https://developer.mozilla.org/ru/docs/Web/CSS/background-repeat
1004
+ */
694
1005
  repeat?: Repeat | [Repeat, Repeat] | Common;
1006
+ /** @see https://developer.mozilla.org/ru/docs/Web/CSS/background-position */
695
1007
  position?: 'left' | 'right' | 'top' | 'bottom' | 'center' | Common;
1008
+ /** @see https://developer.mozilla.org/ru/docs/Web/CSS/background-size */
696
1009
  size?: (BG_size | [BG_size] | [BG_size, BG_size])[];
697
1010
  };
1011
+ /** @see https://developer.mozilla.org/ru/docs/Web/CSS/box-shadow */
698
1012
  box?: {
1013
+ /**
1014
+ * Shadow effects around an element's frame.
1015
+ * @see https://developer.mozilla.org/ru/docs/Web/CSS/box-shadow
1016
+ */
699
1017
  shadow?: readonly ([
700
1018
  ...[inset: 'inset'] | [],
701
1019
  x: Length,
@@ -712,67 +1030,235 @@ declare namespace $ {
712
1030
  color: $mol_style_properties_color;
713
1031
  })[] | 'none' | Common;
714
1032
  };
1033
+ /** @see https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/rx */
715
1034
  rx?: Length | Common;
1035
+ /** @see https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/ry */
716
1036
  ry?: Length | Common;
1037
+ /** @see https://developer.mozilla.org/ru/docs/Web/CSS/font */
717
1038
  font?: {
1039
+ /**
1040
+ * Whether a font should be styled.
1041
+ * @see https://developer.mozilla.org/ru/docs/Web/CSS/font-style
1042
+ */
718
1043
  style?: 'normal' | 'italic' | Common;
1044
+ /**
1045
+ * Weight (or boldness) of the font.
1046
+ * @see https://developer.mozilla.org/ru/docs/Web/CSS/font-weight
1047
+ */
719
1048
  weight?: 'normal' | 'bold' | 'lighter' | 'bolder' | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | Common;
1049
+ /**
1050
+ * Size of the font. Changing the font size also updates the sizes of the font size-relative length units.
1051
+ * @see https://developer.mozilla.org/ru/docs/Web/CSS/font-size
1052
+ */
720
1053
  size?: 'xx-small' | 'x-small' | 'small' | 'medium' | 'large' | 'x-large' | 'xx-large' | 'xxx-large' | 'smaller' | 'larger' | Length | Common;
1054
+ /**
1055
+ * Prioritized list of one or more font family names and/or generic family names.
1056
+ * @see https://developer.mozilla.org/ru/docs/Web/CSS/font-family
1057
+ */
721
1058
  family?: string & {} | 'serif' | 'sans-serif' | 'monospace' | 'cursive' | 'fantasy' | 'system-ui' | 'ui-serif' | 'ui-sans-serif' | 'ui-monospace' | 'ui-rounded' | 'emoji' | 'math' | 'fangsong' | Common;
722
1059
  };
1060
+ /**
1061
+ * Foreground color value of text and text decorations, and sets the `currentcolor` value.
1062
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/color
1063
+ */
723
1064
  color?: $mol_style_properties_color | Common;
1065
+ /**
1066
+ * 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.
1067
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/display
1068
+ */
724
1069
  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;
1070
+ /**
1071
+ * 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`.
1072
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/overflow
1073
+ */
725
1074
  overflow?: Overflow | {
1075
+ /**
1076
+ * What shows when content overflows a block-level element's left and right edges.
1077
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/overflow-x
1078
+ */
726
1079
  x?: Overflow | Common;
1080
+ /**
1081
+ * What shows when content overflows a block-level element's top and bottom edges.
1082
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/overflow-y
1083
+ */
727
1084
  y?: Overflow | Common;
1085
+ /**
1086
+ * A way to opt out of the browser's scroll anchoring behavior, which adjusts scroll position to minimize content shifts.
1087
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/overflow-anchor
1088
+ */
728
1089
  anchor?: 'auto' | 'none' | Common;
729
1090
  };
1091
+ /**
1092
+ * 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.
1093
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/contain
1094
+ */
730
1095
  contain?: 'none' | 'strict' | 'content' | ContainRule | readonly ContainRule[] | Common;
1096
+ /**
1097
+ * How white space inside an element is handled.
1098
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/white-space
1099
+ */
731
1100
  whiteSpace?: 'normal' | 'nowrap' | 'break-spaces' | 'pre' | 'pre-wrap' | 'pre-line' | Common;
1101
+ /** @see https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-overflow-scrolling */
732
1102
  webkitOverflowScrolling?: 'auto' | 'touch' | Common;
1103
+ /** @see https://developer.mozilla.org/en-US/docs/Web/CSS/scrollbar-color */
733
1104
  scrollbar?: {
1105
+ /**
1106
+ * Color of thumb and track of scrollbars.
1107
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/scrollbar-color
1108
+ */
734
1109
  color?: readonly [$mol_style_properties_color, $mol_style_properties_color] | 'auto' | Common;
1110
+ /**
1111
+ * Maximum thickness of scrollbars.
1112
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/scrollbar-width
1113
+ */
735
1114
  width?: 'auto' | 'thin' | 'none' | Common;
736
1115
  };
1116
+ /** @see https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-behavior */
737
1117
  scroll?: {
1118
+ /** @see https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-snap-align */
738
1119
  snap?: {
1120
+ /**
1121
+ * How strictly snap points are enforced on the scroll container in case there is one.
1122
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-snap-type
1123
+ */
739
1124
  type: 'none' | Snap_axis | readonly [Snap_axis, 'mandatory' | 'proximity'] | Common;
1125
+ /**
1126
+ * Whether the scroll container is allowed to "pass over" possible snap positions.
1127
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-snap-stop
1128
+ */
740
1129
  stop: 'normal' | 'always' | Common;
1130
+ /**
1131
+ * 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.
1132
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-snap-align
1133
+ */
741
1134
  align: Span_align | readonly [Span_align, Span_align] | Common;
742
1135
  };
1136
+ /**
1137
+ * Offsets for the optimal viewing region of the scrollport: the region used as the target region for placing things in view of the user.
1138
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-padding
1139
+ */
743
1140
  padding?: Directions<Length | 'auto'>;
744
1141
  };
1142
+ /**
1143
+ * 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.
1144
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/width
1145
+ */
745
1146
  width?: Size;
1147
+ /**
1148
+ * Minimum width of an element. It prevents the used value of the `width` property from becoming smaller than the value specified for `minWidth`.
1149
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/min-width
1150
+ */
746
1151
  minWidth?: Size;
1152
+ /**
1153
+ * Maximum width of an element. It prevents the used value of the `width` property from becoming larger than the value specified for `maxWidth`.
1154
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/max-width
1155
+ */
747
1156
  maxWidth?: Size;
1157
+ /**
1158
+ * 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.
1159
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/height
1160
+ */
748
1161
  height?: Size;
1162
+ /**
1163
+ * Minimum height of an element. It prevents the used value of the `height` property from becoming smaller than the value specified for `minHeight`.
1164
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/min-height
1165
+ */
749
1166
  minHeight?: Size;
1167
+ /**
1168
+ * Maximum height of an element. It prevents the used value of the `height` property from becoming larger than the value specified for `maxHeight`.
1169
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/max-height
1170
+ */
750
1171
  maxHeight?: Size;
1172
+ /**
1173
+ * Margin area on all four sides of an element.
1174
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/margin
1175
+ */
751
1176
  margin?: Directions<Length | 'auto'>;
1177
+ /**
1178
+ * Padding area on all four sides of an element.
1179
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/padding
1180
+ */
752
1181
  padding?: Directions<Length | 'auto'>;
1182
+ /**
1183
+ * How an element is positioned in a document. The `top`, `right`, `bottom`, and `left` properties determine the final location of positioned elements.
1184
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/position
1185
+ */
753
1186
  position?: 'static' | 'relative' | 'absolute' | 'sticky' | 'fixed' | Common;
1187
+ /** @see https://developer.mozilla.org/en-US/docs/Web/CSS/top */
754
1188
  top?: Length | 'auto' | Common;
1189
+ /** @see https://developer.mozilla.org/en-US/docs/Web/CSS/right */
755
1190
  right?: Length | 'auto' | Common;
1191
+ /** @see https://developer.mozilla.org/en-US/docs/Web/CSS/bottom */
756
1192
  bottom?: Length | 'auto' | Common;
1193
+ /** @see https://developer.mozilla.org/en-US/docs/Web/CSS/left */
757
1194
  left?: Length | 'auto' | Common;
1195
+ /** @see https://developer.mozilla.org/en-US/docs/Web/CSS/border */
758
1196
  border?: Directions<{
1197
+ /**
1198
+ * 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.
1199
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius
1200
+ */
759
1201
  radius?: Length | [Length, Length];
1202
+ /**
1203
+ * Line style for all four sides of an element's border.
1204
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius
1205
+ */
760
1206
  style?: 'none' | 'hidden' | 'dotted' | 'dashed' | 'solid' | 'double' | 'groove' | 'ridge' | 'inset' | 'outset' | Common;
1207
+ /**
1208
+ * Color of element's border.
1209
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-color
1210
+ */
761
1211
  color?: $mol_style_properties_color | Common;
1212
+ /**
1213
+ * Width of element's border.
1214
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/border-width
1215
+ */
762
1216
  width?: Length | Common;
763
1217
  }>;
1218
+ /**
1219
+ * 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`.
1220
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/flex
1221
+ */
764
1222
  flex?: 'none' | 'auto' | {
1223
+ /**
1224
+ * Growing weight of the flex item. Negative values are considered invalid. Defaults to 1 when omitted.
1225
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/flex-grow
1226
+ */
765
1227
  grow?: number | Common;
1228
+ /**
1229
+ * Shrinking weight of the flex item. Negative values are considered invalid. Defaults to 1 when omitted.
1230
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/flex-shrink
1231
+ */
766
1232
  shrink?: number | Common;
1233
+ /**
1234
+ * 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.
1235
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/flex-basis
1236
+ */
767
1237
  basis?: Size | Common;
1238
+ /**
1239
+ * How flex items are placed in the flex container defining the main axis and the direction (normal or reversed).
1240
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/flex-basis
1241
+ */
768
1242
  direction?: 'row' | 'row-reverse' | 'column' | 'column-reverse' | Common;
1243
+ /**
1244
+ * 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.
1245
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/flex-wrap
1246
+ */
769
1247
  wrap?: 'wrap' | 'nowrap' | 'wrap-reverse' | Common;
770
1248
  };
771
1249
  container?: {
772
1250
  name?: string;
773
1251
  type?: Container_type | readonly Container_type[];
774
1252
  };
1253
+ /**
1254
+ * 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.
1255
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/z-index
1256
+ */
775
1257
  zIndex: number | Common;
1258
+ /**
1259
+ * Degree to which content behind an element is hidden, and is the opposite of transparency.
1260
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/opacity
1261
+ */
776
1262
  opacity: number | Common;
777
1263
  }
778
1264
  type Container_type = 'normal' | 'size' | 'inline-size' | 'scroll-state' | 'anchored';
@@ -780,10 +1266,15 @@ declare namespace $ {
780
1266
  }
781
1267
 
782
1268
  declare namespace $ {
1269
+ /** Create record of CSS variables. */
783
1270
  function $mol_style_prop<Keys extends string[]>(prefix: string, keys: Keys): Record<Keys[number], $mol_style_func<"var", unknown>>;
784
1271
  }
785
1272
 
786
1273
  declare namespace $ {
1274
+ /**
1275
+ * Theme css variables
1276
+ * @see https://mol.hyoo.ru/#!section=demos/demo=mol_textarea_demo
1277
+ */
787
1278
  const $mol_theme: Record<"image" | "line" | "text" | "focus" | "hue" | "back" | "hover" | "card" | "current" | "special" | "control" | "shade" | "field" | "spirit" | "hue_spread", $mol_style_func<"var", unknown>>;
788
1279
  }
789
1280
 
@@ -791,6 +1282,10 @@ declare namespace $ {
791
1282
  }
792
1283
 
793
1284
  declare namespace $ {
1285
+ /**
1286
+ * Gap in CSS
1287
+ * @see https://page.hyoo.ru/#!=msdb74_bm7nsq
1288
+ */
794
1289
  let $mol_gap: Record<"text" | "blur" | "page" | "block" | "space" | "round" | "emoji", $mol_style_func<"var", unknown>>;
795
1290
  }
796
1291
 
@@ -802,6 +1297,11 @@ declare namespace $ {
802
1297
  }
803
1298
 
804
1299
  declare namespace $ {
1300
+ /**
1301
+ * Recursive `Partial`.
1302
+ *
1303
+ * let props : $mol_type_partial_deep< HTMLElement > = { style : { display : 'block' } }
1304
+ */
805
1305
  type $mol_type_partial_deep<Val> = Val extends object ? Val extends Function ? Val : {
806
1306
  [field in keyof Val]?: $mol_type_partial_deep<Val[field]> | undefined;
807
1307
  } : Val;
@@ -813,6 +1313,12 @@ declare namespace $ {
813
1313
  let $mol_jsx_booked: null | Set<string>;
814
1314
  let $mol_jsx_document: $mol_jsx.JSX.ElementClass['ownerDocument'];
815
1315
  const $mol_jsx_frag = "";
1316
+ /**
1317
+ * JSX adapter that makes DOM tree.
1318
+ * Generates global unique ids for every DOM-element by components tree with ids.
1319
+ * Ensures all local ids are unique.
1320
+ * Can reuse an existing nodes by GUIDs when used inside [`mol_jsx_attach`](https://github.com/hyoo-ru/mam_mol/tree/master/jsx/attach).
1321
+ */
816
1322
  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;
817
1323
  namespace $mol_jsx.JSX {
818
1324
  interface Element extends HTMLElement {
@@ -827,9 +1333,11 @@ declare namespace $ {
827
1333
  type OrString<Dict> = {
828
1334
  [key in keyof Dict]: Dict[key] | string;
829
1335
  };
1336
+ /** Props for html elements */
830
1337
  type IntrinsicElements = {
831
1338
  [key in keyof ElementTagNameMap]?: $.$mol_type_partial_deep<OrString<Element & IntrinsicAttributes & ElementTagNameMap[key]>>;
832
1339
  };
1340
+ /** Additional undeclared props */
833
1341
  interface IntrinsicAttributes {
834
1342
  id?: string;
835
1343
  xmlns?: string;
@@ -852,6 +1360,7 @@ declare namespace $ {
852
1360
  }
853
1361
 
854
1362
  declare namespace $ {
1363
+ /** Returns string key for any value. */
855
1364
  function $mol_key<Value>(value: Value): string;
856
1365
  }
857
1366
 
@@ -873,6 +1382,9 @@ declare namespace $ {
873
1382
  }
874
1383
 
875
1384
  declare namespace $ {
1385
+ /**
1386
+ * Decorates method to fiber to ensure it is executed only once inside other fiber.
1387
+ */
876
1388
  function $mol_wire_method<Host extends object, Args extends readonly any[]>(host: Host, field: PropertyKey, descr?: TypedPropertyDescriptor<(...args: Args) => any>): {
877
1389
  value: (this: Host, ...args: Args) => any;
878
1390
  enumerable?: boolean;
@@ -884,14 +1396,25 @@ declare namespace $ {
884
1396
  }
885
1397
 
886
1398
  declare namespace $ {
1399
+ /**
1400
+ * Returns `Tuple` without first element.
1401
+ *
1402
+ * $mol_type_tail<[ 1 , 2 , 3 ]> // [ 2, 3 ]
1403
+ */
887
1404
  type $mol_type_tail<Tuple extends readonly any[]> = ((...tail: Tuple) => any) extends ((head: any, ...tail: infer Tail) => any) ? Tail : never;
888
1405
  }
889
1406
 
890
1407
  declare namespace $ {
1408
+ /**
1409
+ * Returns last element of `Tuple`.
1410
+ *
1411
+ * $mol_type_tail<[ 1 , 2 , 3 ]> // 3
1412
+ */
891
1413
  type $mol_type_foot<Tuple extends readonly any[]> = Tuple['length'] extends 0 ? never : Tuple[$mol_type_tail<Tuple>['length']];
892
1414
  }
893
1415
 
894
1416
  declare namespace $ {
1417
+ /** Long-living fiber. */
895
1418
  class $mol_wire_atom<Host, Args extends readonly unknown[], Result> extends $mol_wire_fiber<Host, Args, Result> {
896
1419
  static solo<Host, Args extends readonly unknown[], Result>(host: Host, task: (this: Host, ...args: Args) => Result): $mol_wire_atom<Host, Args, Result>;
897
1420
  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>;
@@ -899,6 +1422,9 @@ declare namespace $ {
899
1422
  static watcher: $mol_after_frame | null;
900
1423
  static watch(): void;
901
1424
  watch(): void;
1425
+ /**
1426
+ * Update atom value through another temp fiber.
1427
+ */
902
1428
  resync(args: Args): Error | Result | Promise<Error | Result>;
903
1429
  once(): Awaited<Result>;
904
1430
  channel(): ((next?: $mol_type_foot<Args>) => Awaited<Result>) & {
@@ -910,12 +1436,14 @@ declare namespace $ {
910
1436
  }
911
1437
 
912
1438
  declare namespace $ {
1439
+ /** Decorates solo object channel to [mol_wire_atom](../atom/atom.ts). */
913
1440
  export function $mol_wire_solo<Args extends any[]>(host: object, field: string, descr?: TypedPropertyDescriptor<(...args: Args) => any>): TypedPropertyDescriptor<(...args: First_optional<Args>) => any>;
914
1441
  type First_optional<Args extends any[]> = Args extends [] ? [] : [Args[0] | undefined, ...$mol_type_tail<Args>];
915
1442
  export {};
916
1443
  }
917
1444
 
918
1445
  declare namespace $ {
1446
+ /** Reactive memoizing multiplexed property decorator. */
919
1447
  function $mol_wire_plex<Args extends [any, ...any[]]>(host: object, field: string, descr?: TypedPropertyDescriptor<(...args: Args) => any>): {
920
1448
  value: (this: typeof host, ...args: Args) => any;
921
1449
  enumerable?: boolean;
@@ -927,7 +1455,25 @@ declare namespace $ {
927
1455
  }
928
1456
 
929
1457
  declare namespace $ {
1458
+ /**
1459
+ * Reactive memoizing solo property decorator from [mol_wire](../wire/README.md)
1460
+ * @example
1461
+ * '@' $mol_mem
1462
+ * name(next?: string) {
1463
+ * return next ?? 'default'
1464
+ * }
1465
+ * @see https://mol.hyoo.ru/#!section=docs/=qxmh6t_sinbmb
1466
+ */
930
1467
  let $mol_mem: typeof $mol_wire_solo;
1468
+ /**
1469
+ * Reactive memoizing multiplexed property decorator [mol_wire](../wire/README.md)
1470
+ * @example
1471
+ * '@' $mol_mem_key
1472
+ * name(id: number, next?: string) {
1473
+ * return next ?? 'default'
1474
+ * }
1475
+ * @see https://mol.hyoo.ru/#!section=docs/=qxmh6t_sinbmb
1476
+ */
931
1477
  let $mol_mem_key: typeof $mol_wire_plex;
932
1478
  }
933
1479
 
@@ -963,14 +1509,24 @@ declare namespace $ {
963
1509
  }
964
1510
 
965
1511
  declare namespace $ {
1512
+ /** Run code without state changes */
966
1513
  function $mol_wire_probe<Value>(task: () => Value, def?: Value): Value | undefined;
967
1514
  }
968
1515
 
969
1516
  declare namespace $ {
1517
+ /**
1518
+ * Real-time refresh current atom.
1519
+ * Don't use if possible. May reduce performance.
1520
+ */
970
1521
  function $mol_wire_watch(): void;
971
1522
  }
972
1523
 
973
1524
  declare namespace $ {
1525
+ /**
1526
+ * Returns closure that returns constant value.
1527
+ * @example
1528
+ * const rnd = $mol_const( Math.random() )
1529
+ */
974
1530
  function $mol_const<Value>(value: Value): {
975
1531
  (): Value;
976
1532
  '()': Value;
@@ -978,6 +1534,9 @@ declare namespace $ {
978
1534
  }
979
1535
 
980
1536
  declare namespace $ {
1537
+ /**
1538
+ * Disable reaping of current subscriber
1539
+ */
981
1540
  function $mol_wire_solid(): void;
982
1541
  }
983
1542
 
@@ -1010,6 +1569,7 @@ declare namespace $ {
1010
1569
  }
1011
1570
 
1012
1571
  declare namespace $ {
1572
+ /** Convert a pseudo-synchronous (Suspense API) API to an explicit asynchronous one (for integrating with external systems). */
1013
1573
  export function $mol_wire_async<Host extends object>(obj: Host): ObjectOrFunctionResultPromisify<Host>;
1014
1574
  type FunctionResultPromisify<Some> = Some extends (...args: infer Args) => infer Res ? Res extends PromiseLike<unknown> ? Some : (...args: Args) => Promise<Res> : Some;
1015
1575
  type MethodsResultPromisify<Host extends Object> = {
@@ -1020,6 +1580,11 @@ declare namespace $ {
1020
1580
  }
1021
1581
 
1022
1582
  declare namespace $ {
1583
+ /**
1584
+ * Extracts keys from `Input` which values extends `Upper` and extendable by `Lower`.
1585
+ *
1586
+ * type MathConstants = $mol_type_keys_extract< Math , number > // "E" | "PI" ...
1587
+ */
1023
1588
  type $mol_type_keys_extract<Input, Upper, Lower = never> = {
1024
1589
  [Field in keyof Input]: unknown extends Input[Field] ? never : Input[Field] extends never ? never : Input[Field] extends Upper ? [
1025
1590
  Lower
@@ -1028,17 +1593,27 @@ declare namespace $ {
1028
1593
  }
1029
1594
 
1030
1595
  declare namespace $ {
1596
+ /**
1597
+ * Picks keys from `Input` which values extends `Upper`.
1598
+ *
1599
+ * type MathConstants = $mol_type_pick< Math , number > // { E , PI , ... }
1600
+ */
1031
1601
  type $mol_type_pick<Input, Upper> = Pick<Input, $mol_type_keys_extract<Input, Upper>>;
1032
1602
  }
1033
1603
 
1034
1604
  declare namespace $ {
1035
1605
  }
1036
1606
 
1607
+ /** @jsx $mol_jsx */
1037
1608
  declare namespace $ {
1038
1609
  type $mol_view_content = $mol_view | Node | string | number | boolean | null;
1039
1610
  function $mol_view_visible_width(): number;
1040
1611
  function $mol_view_visible_height(): number;
1041
1612
  function $mol_view_state_key(suffix: string): string;
1613
+ /**
1614
+ * The base class for all visual components. It provides the infrastructure for reactive lazy rendering, handling exceptions.
1615
+ * @see https://mol.hyoo.ru/#!section=docs/=vv2nig_s5zr0f
1616
+ */
1042
1617
  class $mol_view extends $mol_object {
1043
1618
  static Root<This extends typeof $mol_view>(this: This, id: number): InstanceType<This>;
1044
1619
  static roots(): $mol_view[];
@@ -1095,8 +1670,11 @@ declare namespace $ {
1095
1670
  };
1096
1671
  plugins(): readonly $mol_view[];
1097
1672
  [$mol_dev_format_head](): any[];
1673
+ /** Deep search view by predicate. */
1098
1674
  view_find(check: (path: $mol_view, text?: string) => boolean, path?: $mol_view[]): Generator<$mol_view[]>;
1675
+ /** Renders path of views to DOM. */
1099
1676
  force_render(path: Set<$mol_view>): void;
1677
+ /** Renders view to DOM and scroll to it. */
1100
1678
  ensure_visible(view: $mol_view, align?: ScrollLogicalPosition): void;
1101
1679
  bring(): void;
1102
1680
  destructor(): void;
@@ -1105,6 +1683,7 @@ declare namespace $ {
1105
1683
  }
1106
1684
 
1107
1685
  declare namespace $ {
1686
+ /** Plugin is component without its own DOM element, but instead uses the owner DOM element */
1108
1687
  class $mol_plugin extends $mol_view {
1109
1688
  dom_node_external(next?: Element): Element;
1110
1689
  render(): void;
@@ -1112,6 +1691,7 @@ declare namespace $ {
1112
1691
  }
1113
1692
 
1114
1693
  declare namespace $ {
1694
+ /** State of time moment */
1115
1695
  class $mol_state_time extends $mol_object {
1116
1696
  static task(precision: number, reset?: null): $mol_after_timeout | $mol_after_frame;
1117
1697
  static now(precision: number): number;
@@ -1132,6 +1712,7 @@ declare namespace $ {
1132
1712
 
1133
1713
  //# sourceMappingURL=svg.view.tree.d.ts.map
1134
1714
  declare namespace $.$$ {
1715
+ /** Base SVG component to display SVG images or icons. */
1135
1716
  class $mol_svg extends $.$mol_svg {
1136
1717
  computed_style(): Record<string, any>;
1137
1718
  font_size(): number;
@@ -1236,6 +1817,9 @@ declare namespace $ {
1236
1817
  }
1237
1818
 
1238
1819
  declare namespace $ {
1820
+ /**
1821
+ * Fails if `Actual` type is not subtype of `Expected`.
1822
+ */
1239
1823
  type $mol_type_enforce<Actual extends Expected, Expected> = Actual;
1240
1824
  }
1241
1825
 
@@ -1307,6 +1891,10 @@ declare namespace $ {
1307
1891
 
1308
1892
  //# sourceMappingURL=touch.view.tree.d.ts.map
1309
1893
  declare namespace $.$$ {
1894
+ /**
1895
+ * Plugin for touch gestures.
1896
+ * @see [mol_plugin](../plugin/readme.md)
1897
+ */
1310
1898
  class $mol_touch extends $.$mol_touch {
1311
1899
  auto(): void;
1312
1900
  pointer_events(next?: readonly PointerEvent[]): readonly PointerEvent[];
@@ -1702,6 +2290,10 @@ declare namespace $ {
1702
2290
 
1703
2291
  //# sourceMappingURL=pane.view.tree.d.ts.map
1704
2292
  declare namespace $.$$ {
2293
+ /**
2294
+ * Fastest plot lib for vector graphics.
2295
+ * @see https://mol.hyoo.ru/#!section=demos/demo=mol_plot_demo
2296
+ */
1705
2297
  class $mol_plot_pane extends $.$mol_plot_pane {
1706
2298
  dimensions(): $mol_vector_2d<$mol_vector_range<number>>;
1707
2299
  size(): $mol_vector_2d<number>;
@@ -1911,6 +2503,10 @@ declare namespace $ {
1911
2503
 
1912
2504
  //# sourceMappingURL=heat.view.tree.d.ts.map
1913
2505
  declare namespace $.$$ {
2506
+ /**
2507
+ * Heat map graph.
2508
+ * @see https://mol.hyoo.ru/#!section=demos/demo=mol_plot_map_heat_demo
2509
+ */
1914
2510
  class $mol_plot_map_heat extends $.$mol_plot_map_heat {
1915
2511
  levels(): number[];
1916
2512
  level_graphs(): $mol_plot_map_heat_level[];