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 +597 -1
- package/node.d.ts.map +1 -1
- package/node.deps.json +1 -1
- package/node.js +318 -14
- package/node.js.map +1 -1
- package/node.mjs +318 -14
- package/node.test.js +443 -15
- package/node.test.js.map +1 -1
- package/package.json +1 -1
- package/web.d.ts +546 -0
- package/web.d.ts.map +1 -1
- package/web.deps.json +1 -1
- package/web.js +262 -10
- package/web.js.map +1 -1
- package/web.mjs +262 -10
- package/web.test.js +135 -7
- package/web.test.js.map +1 -1
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;
|
|
@@ -1042,6 +1571,7 @@ declare namespace $ {
|
|
|
1042
1571
|
}
|
|
1043
1572
|
|
|
1044
1573
|
declare namespace $ {
|
|
1574
|
+
/** State of time moment */
|
|
1045
1575
|
class $mol_state_time extends $mol_object {
|
|
1046
1576
|
static task(precision: number, reset?: null): $mol_after_timeout | $mol_after_frame;
|
|
1047
1577
|
static now(precision: number): number;
|
|
@@ -1062,6 +1592,7 @@ declare namespace $ {
|
|
|
1062
1592
|
|
|
1063
1593
|
//# sourceMappingURL=svg.view.tree.d.ts.map
|
|
1064
1594
|
declare namespace $.$$ {
|
|
1595
|
+
/** Base SVG component to display SVG images or icons. */
|
|
1065
1596
|
class $mol_svg extends $.$mol_svg {
|
|
1066
1597
|
computed_style(): Record<string, any>;
|
|
1067
1598
|
font_size(): number;
|
|
@@ -1166,6 +1697,9 @@ declare namespace $ {
|
|
|
1166
1697
|
}
|
|
1167
1698
|
|
|
1168
1699
|
declare namespace $ {
|
|
1700
|
+
/**
|
|
1701
|
+
* Fails if `Actual` type is not subtype of `Expected`.
|
|
1702
|
+
*/
|
|
1169
1703
|
type $mol_type_enforce<Actual extends Expected, Expected> = Actual;
|
|
1170
1704
|
}
|
|
1171
1705
|
|
|
@@ -1237,6 +1771,10 @@ declare namespace $ {
|
|
|
1237
1771
|
|
|
1238
1772
|
//# sourceMappingURL=touch.view.tree.d.ts.map
|
|
1239
1773
|
declare namespace $.$$ {
|
|
1774
|
+
/**
|
|
1775
|
+
* Plugin for touch gestures.
|
|
1776
|
+
* @see [mol_plugin](../plugin/readme.md)
|
|
1777
|
+
*/
|
|
1240
1778
|
class $mol_touch extends $.$mol_touch {
|
|
1241
1779
|
auto(): void;
|
|
1242
1780
|
pointer_events(next?: readonly PointerEvent[]): readonly PointerEvent[];
|
|
@@ -1632,6 +2170,10 @@ declare namespace $ {
|
|
|
1632
2170
|
|
|
1633
2171
|
//# sourceMappingURL=pane.view.tree.d.ts.map
|
|
1634
2172
|
declare namespace $.$$ {
|
|
2173
|
+
/**
|
|
2174
|
+
* Fastest plot lib for vector graphics.
|
|
2175
|
+
* @see https://mol.hyoo.ru/#!section=demos/demo=mol_plot_demo
|
|
2176
|
+
*/
|
|
1635
2177
|
class $mol_plot_pane extends $.$mol_plot_pane {
|
|
1636
2178
|
dimensions(): $mol_vector_2d<$mol_vector_range<number>>;
|
|
1637
2179
|
size(): $mol_vector_2d<number>;
|
|
@@ -1841,6 +2383,10 @@ declare namespace $ {
|
|
|
1841
2383
|
|
|
1842
2384
|
//# sourceMappingURL=heat.view.tree.d.ts.map
|
|
1843
2385
|
declare namespace $.$$ {
|
|
2386
|
+
/**
|
|
2387
|
+
* Heat map graph.
|
|
2388
|
+
* @see https://mol.hyoo.ru/#!section=demos/demo=mol_plot_map_heat_demo
|
|
2389
|
+
*/
|
|
1844
2390
|
class $mol_plot_map_heat extends $.$mol_plot_map_heat {
|
|
1845
2391
|
levels(): number[];
|
|
1846
2392
|
level_graphs(): $mol_plot_map_heat_level[];
|