mam 1.11.21 → 1.11.25

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/package.json CHANGED
@@ -1,31 +1,25 @@
1
1
  {
2
2
  "name": "mam",
3
- "version": "1.11.21",
3
+ "version": "1.11.25",
4
4
  "main": "node.js",
5
5
  "module": "node.esm.js",
6
6
  "browser": "web.js",
7
7
  "types": "web.d.ts",
8
8
  "dependencies": {
9
- "require": "*",
10
9
  "colorette": "*",
11
10
  "jsdom": "*",
12
11
  "chokidar": "*",
12
+ "sourcemap-codec": "*",
13
+ "typescript": "*",
13
14
  "express": "*",
14
15
  "portastic": "*",
15
16
  "ws": "*",
16
17
  "compression": "*",
18
+ "cors": "*",
17
19
  "body-parser": "*",
18
- "serve-index": "*",
19
- "sourcemap-codec": "*",
20
- "typescript": "*",
21
- "source-map-support": "*",
22
- "@types/compression": "*",
23
- "@types/express": "*",
24
- "@types/node": "*",
25
- "@types/serve-index": "*",
26
- "@types/ws": "*"
20
+ "serve-index": "*"
27
21
  },
28
22
  "bin": {
29
23
  "mam": "./bin/mam"
30
24
  }
31
- }
25
+ }
package/readme.md ADDED
@@ -0,0 +1,560 @@
1
+ # $mol
2
+
3
+ Reactive micro-modular ui framework. Very simple, but very powerful!
4
+
5
+ # Contents
6
+
7
+ - [Levels](#levels)
8
+ - [Features](#features)
9
+ - [Applications](https://apps.hyoo.ru/)
10
+ - [Benchmarks](#benchmarks)
11
+ - [Articles](#articles)
12
+ - [Discussions](https://teleg.run/mam_mol)
13
+ - [Quick start](#quick-start)
14
+ - [Tutorials](#tutorials)
15
+ - [Rationale](#rationale)
16
+ - [Modules](#modules)
17
+ - [Usage from NPM](#usage-from-npm-ecosystem)
18
+ - [Contributors](#contributors)
19
+ - [Cool stuff](#cool-stuff)
20
+ - [Donate](#donate)
21
+
22
+ # Levels
23
+
24
+ 1. ✅ **Library.** $mol is just set of small libs. Honor libs: jQuery, React, Redux, MobX.
25
+ 2. ✅ **Framework.** $mol is very flexible, but simple. Honor framewworks: Angular, Vue, Ember.
26
+ 3. ✅ **Сonstruction Kit.** $mol has many costomizable ui components. Honor construction kits: Ext, OpenUI5.
27
+ 4. ⭕ **Platform.** $mol doesn't fit it yet. Honor platforms: Drupal, SAP, 1C.
28
+
29
+ # Features
30
+
31
+ - [Zero configuration](#zero-configuration). Just checkout and use it.
32
+ - [Lazy rendering/evaluating/loading etc](#lazyness).
33
+ - [Full reactivity](#reactivity) in all application layers. Not only between View and ViewModel.
34
+ - [Automatic dependency tracking](#reactivity) between reactive containers. No need to manual publish/subscribe/unsubscribe and streams routing.
35
+ - [Effective state synchronization](mem) in right way.
36
+ - Automatic inclusion of modules in package at compile time. No need for manually importing them. [Just use it](#zero-configuration).
37
+ - Very small modules. [All of them are optional](#zero-configuration).
38
+ - Cross platform. [Support any environment](#zero-configuration) (NodeJS, Web browsers, Cordova).
39
+ - Static typing ([TypeScript](https://www.typescriptlang.org/)). Full IDE support.
40
+ - Full customization. No hidden implementation. [All aspects are overridable](#lego-components).
41
+ - [Lifecycle management](#reactivity). Automatic destruction of unnecessary objects.
42
+ - [Easy debugging](#debugging). User friendly id's of all objects. Quick access to all objects from console.
43
+ - Easy [user friendly logging](#debugging) of all state changes.
44
+ - Pseudosynchronous code. [Asynchrony is abstracted by reactivity](#reactivity). No callbacks/promises/streams hell. No async/await/yield virus.
45
+ - Automatic [BEM](https://en.bem.info/methodology/naming-convention/)-attributes generation for elements.
46
+
47
+ # Benchmarks
48
+
49
+ - [$hyoo_bench_list](https://github.com/hyoo-ru/bench.hyoo.ru/tree/master/list) - Frameworks comparison ([online](https://bench.hyoo.ru/list/#sort=fill/sample=angular-1-5-5~mol~native-html~react-15-3-2~native-dom))
50
+ - [ToDoMVC benchmark](https://github.com/hyoo-ru/todomvc/tree/master/benchmark) ([online](https://hyoo-ru.github.io/todomvc/benchmark/#sample=angular2%7Eangularjs%7Eknockoutjs%7Emol%7Epolymer%7Ereact-alt%7Evanillajs%7Evue#sort=fill#))
51
+ - [WebPageTest - Loading progress of ToDOMVC applications on some frameworks](https://www.webpagetest.org/video/compare.php?tests=161217_V8_6RFK%2C161217_G9_6RFM%2C161217_YZ_6RFN%2C161217_DM_6RFP%2C161217_2B_6RFQ%2C161217_RJ_6RFR%2C161217_2R_6RFS%2C161217_H5_6RFT%2C161217_CW_6RFV&thumbSize=150&ival=100&end=all)
52
+ - [Line charts comparison](https://github.com/hyoo-ru/bench.hyoo.ru/tree/master/chart/rope) ([online](https://bench.hyoo.ru/chart/rope/#sort=fill/sample=hcharts~mol))
53
+ - [Bar charts comparison](https://github.com/hyoo-ru/bench.hyoo.ru/tree/master/chart/bar) ([online](https://bench.hyoo.ru/chart/bar/#sort=fill/sample=hcharts~mol))
54
+ - [React vs React Fiber vs $mol](https://github.com/nin-jin/sierpinski) ([online](https://nin-jin.github.io/sierpinski))
55
+
56
+ # Articles
57
+
58
+ - [$mol — лучшее средство от геморроя](https://habr.com/ru/post/341146/) - Quick introduction to $mol
59
+ - [$mol: реактивный микромодульный фреймворк](https://habrahabr.ru/post/311172/) - Comprehensive $mol review
60
+ - [Объектное Реактивное Программирование](https://habrahabr.ru/post/330466/) - Features of Object Reactive Programming
61
+ - [Концепции автоматического тестирования](https://habr.com/ru/post/351430/) - Testing principles
62
+ - [Идеальный UI фреймворк](https://habrahabr.ru/post/276747/) - Problems of popular frameworks
63
+ - [Принципы написания кода](https://habrahabr.ru/post/236785/) - Code style principles
64
+
65
+ # Quick start
66
+
67
+ [Video of this process](https://www.youtube.com/watch?v=PyK3if5sgN0)
68
+
69
+ ## Create MAM project
70
+
71
+ The easiest way is to checkout this [preconfigured MAM repository](http://github.com/hyoo-ru/mam) and start a dev server:
72
+
73
+ ```sh
74
+ git clone https://github.com/hyoo-ru/mam.git ./mam && cd mam
75
+ npm install && npm start
76
+ ```
77
+
78
+ ## Setup your editor
79
+
80
+ - Use MAM directory as root of your project in editor
81
+ - [Install VScode intellisense plugin for *.view.tree files](https://marketplace.visualstudio.com/items?itemName=valikov.tree-language-service)
82
+ - [Install plugin for *.tree files](https://github.com/nin-jin/tree.d#ide-support)
83
+ - [Install .editorconfig plugin](https://editorconfig.org/#download) or use these preferences: **TABs for indents, LF for line endings**.
84
+
85
+ ## Create your application component
86
+
87
+ Examples use namespace `my` and application name `hello`, but you can use your own namespace and application name.
88
+
89
+ Add **web entry point** at `./my/hello/index.html`:
90
+
91
+ ```html
92
+ <!-- Disable quirks mode -->
93
+ <!doctype html>
94
+
95
+ <!-- Allow height:100% in body -->
96
+ <html style=" height: 100% ">
97
+
98
+ <!-- Force utf-8 encoding -->
99
+ <meta charset="utf-8" />
100
+
101
+ <!-- Disable mobile browser auto zoom, $mol is adaptive -->
102
+ <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1" />
103
+
104
+ <!-- autobind component to element on load -->
105
+ <body mol_view_root="$my_hello">
106
+
107
+ <!-- link to autogenerated js bundle -->
108
+ <script src="web.js"></script>
109
+ ```
110
+
111
+ Your application will be served at **`http://localhost:9080/my/hello/`**. Open it. You should refresh page to view your changes.
112
+
113
+ Add [**declarative component description**](view) at `./my/hello/hello.view.tree` with string input field and greeting message:
114
+
115
+ ```tree
116
+ $my_hello $mol_view
117
+ sub /
118
+ <= Name $mol_string
119
+ hint \Name
120
+ value?val <=> name?val \
121
+ <= message \
122
+ ```
123
+
124
+ That will be automatically compiled to typescript code like this:
125
+
126
+ ```typescript
127
+ namespace $ { export class $my_hello extends $mol_view {
128
+
129
+ /// name?val \
130
+ @ $mol_mem
131
+ name( next = '' ) {
132
+ return next
133
+ }
134
+
135
+ /// Name $mol_string
136
+ /// hint \Name
137
+ /// value?val <=> name?val
138
+ @ $mol_mem
139
+ Name() {
140
+ const obj = new $mol_string
141
+ obj.hint = () => "Name" ,
142
+ obj.value = next => this.name( next ) ,
143
+ return obj
144
+ }
145
+
146
+ /// message \
147
+ message() {
148
+ return ""
149
+ }
150
+
151
+ /// sub /
152
+ /// <= Name
153
+ /// <= message
154
+ sub() {
155
+ return [ this.Name() , this.message() ]
156
+ }
157
+
158
+ } }
159
+ ```
160
+
161
+ Add **your behaviour** at `./my/hello/hello.view.ts` by extending generated class:
162
+
163
+ ```typescript
164
+ namespace $.$$ {
165
+ export class $my_hello extends $.$my_hello {
166
+
167
+ message() {
168
+ let name = this.name()
169
+ return name && `Hello, ${name}!`
170
+ }
171
+
172
+ }
173
+ }
174
+ ```
175
+
176
+ Add **tests for your behaviour** at `./my/hello/hello.test.ts`
177
+
178
+ ```typescript
179
+ namespace $.$$ {
180
+
181
+ $mol_test({
182
+
183
+ 'Generating greeting message'() {
184
+
185
+ const app = new $my_hello
186
+ app.name( 'Jin' )
187
+
188
+ $mol_assert_equal( app.message() , 'Hello, Jin!' )
189
+
190
+ }
191
+
192
+ })
193
+
194
+ }
195
+ ```
196
+
197
+ Add **styles** at `./my/hello/hello.view.css`:
198
+
199
+ ```css
200
+ /* Styling BEM-block by autogenerated attribute */
201
+ [my_hello] {
202
+ display: flex;
203
+ flex-direction: column;
204
+ align-items: center;
205
+ font: 1.5rem/1 sans-serif;
206
+ box-shadow: var(--mol_skin_light_outline);
207
+ flex: 1 1 auto;
208
+ align-self: stretch;
209
+ margin: 0;
210
+ }
211
+
212
+ /* Styling BEM-element by autogenerated attribute */
213
+ [my_hello_name] {
214
+ flex-grow: 0;
215
+ margin: 1rem;
216
+ width: 14rem;
217
+ }
218
+ ```
219
+
220
+ [That is all!](https://mol.js.org/app/hello/-)
221
+
222
+ # Tutorials
223
+
224
+ - [$mol_app_calc: вечеринка электронных таблиц](https://github.com/nin-jin/HabHub/issues/10)
225
+ - [$hyoo_bench: готовим JS бенчмарки быстро и просто](https://github.com/nin-jin/HabHub/issues/8)
226
+ - [$mol_app_habhub: чтение статей с GitHub](https://github.com/nin-jin/HabHub/issues/5)
227
+
228
+ # Rationale
229
+
230
+ ## Zero configuration
231
+ Instead of ensuring configurability by any means, $mol concentrates on everything working good directly out of the box and does not bother $mol's developer by a typical configuration process. (Nevertheless, this doesn't exclude setup for your needs if required)
232
+
233
+ For example if you download **[base MAM-project](http://github.com/hyoo-ru/mam)** you'll get this:
234
+
235
+ **Building of JS and CSS bundles for different platforms.** A bundle can be built for any module. This bundle would contain sources of that module and sources of all other modules on which that module depends on. There also would not be any redundant modules in the bundle.
236
+
237
+ Here is a full set of supported bundles:
238
+
239
+ - `-/web.js` - JS for browser
240
+ - `-/web.d.ts` - TypeScript definitions
241
+ - `-/web.test.js` - JS with tests for a browser
242
+ - `-/web.deps.json` - map of dependencies modules for browser
243
+ - `-/web.locale=en.json` - strings pulled from ```*.view.tree``` and ```*.locale=en.json``` sources
244
+ - `-/node.js` - JS for NodeJS
245
+ - `-/node.test.js` - JS with tests for NodeJS
246
+ - `-/node.deps.json` - a map of dependencies modules for NodeJS
247
+
248
+ **Support of Source Maps**. Sources are compiled and integrate to maps, they are fully self-sufficient.
249
+
250
+ **Development server**, which compiles bundles as needed. For example, when `http://localhost:9080/hyoo/todomvc/-/web.js` is requested, the `js` bundle is built from `hyoo/todomvc` for `web` environment. Rebuilding occurs only if any source files are changed.
251
+
252
+ **Transpilling of modern CSS into CSS supported by browsers** ([postcss-cssnext](https://github.com/MoOx/postcss-cssnext)): vendor prefixes and variables etc.
253
+
254
+ **Transpilling [TypeScript](https://github.com/Microsoft/TypeScript) into JS**.
255
+ In TS configuration enabled support decorators and disabled implicit `any` type, to prevent missing typing by change.
256
+
257
+ **Watching dependencies by fact of using** and automatic inclusion of the needed modules on further bundling. You don't need to write `include` and `require`. All you need is to refer instance by full name like `$mol_state_arg` and `$mol.state.arg` (depending on its definition) in `*.ts`, `*.view.ts`, `*.view.tree` and `*.jam.js` files. Dependencies in CSS files are looked for by entries like `[mol_check_checked]` , `[mol_check_checked=` and `.mol_check_checked`.
258
+
259
+ ## Lego components
260
+
261
+ $mol uses the component approach to building interfaces, however **every component is self-sufficient** and can be used as a self-sufficient application. Small components are aggregated inside larger components etc.
262
+
263
+ Unlike another frameworks, $mol does not isolate the internals of its components. Vice versa, a comfortable mechanism is provided for developers to configure them, the creator of the component doesn't have to do any additional actions.
264
+
265
+ For example, to set the list of sub components you need to redefine `sub` property in view.tree
266
+
267
+ ```tree
268
+ Confirm_delte $mol_row sub /
269
+ <= Yes $mol_button_minor title \Yes
270
+ <= No $mol_button_major title \No
271
+ ```
272
+
273
+ Or the same code in TypeScript would be:
274
+
275
+ ```typescript
276
+ @ $mol_mem
277
+ Confirm_delete() {
278
+ return $mol_row.make({
279
+ sub : ()=> [ this.Yes() , this.No() ] ,
280
+ })
281
+ }
282
+ ```
283
+
284
+ In both variants the compiler would verify the existence of the property and correspondence of the signature. Normally you don't need to work with fields of the object directly, all definable properties
285
+ are public and can be safely overloaded.
286
+
287
+ Details about viewers and `view.tree` language: [$mol_view](view).
288
+
289
+ ## Lazyness
290
+
291
+ [$mol_view](view) implements lazy rendering. [$mol_scroll](scroll) watches scroll position and suggests the view height to embedded components. [$mol_list](list) knows the view height and minimal sizes of the embedded components, it excludes components definitely outside viewport from rendering. And all other components report their minimal size through `minimal_height` property.
292
+
293
+ ```
294
+ $my_icon $mol_view
295
+ minimal_height 16
296
+ ```
297
+
298
+ As the result opening of any window occurs instantly. It's independent from output data size. And since data would not be rendered, any requests would not be proceeded. This allows us to download them partly, when they are needed. Such a feature is possible due to reactive architecture, that penetrates through all layers of the application.
299
+
300
+ ## Reactivity
301
+
302
+ Unlike control-flow architectures, $mol implements the data-flow architecture. All applications are defined as a set of classes having properties. Every property is defined as some function from another property (and properties of another classes too). Properties, which were called while processing a function are saved as dependencies of current property. When their values change, all dependent properties would be invalidated cascading. Calling a non relevant property would lead to its pre-actualization.
303
+
304
+ In this way the whole application at the execution stage represents a huge tree of dependencies, with a special property at the root of the tree, which in case of invalidation would actualize itself automatically. And as any property always knows, whether something depends on it or not, then it is given a simple and reliable mechanism of controlling lifecycle of objects - they are created when dependence appears and are destroyed when nothing depends on them. This solves two fundamental problems: resources leaks and cache invalidation.
305
+
306
+ Besides, the reactive architecture allows us to abstract code elegantly from asynchronous operations. If the function can't return value at the moment, it can throw `Promise` and is marked as part of the tree as "waiting of results". When result is retrieved, it can be inserted into property directly and an application would be reconstructed for the new state.
307
+
308
+ ```typescript
309
+ namespace $ {
310
+ export class $my_greeter {
311
+
312
+ @ $mol_mem
313
+ greeting() : string {
314
+ const user_name = $mol_fetch.json( 'https://example.org/profile/name' ) as string
315
+ return `Hello, ${ user_name }!`
316
+ }
317
+
318
+ }
319
+ }
320
+ ```
321
+
322
+ Details: [$mol_mem](mem), [$mol_atom2](atom2).
323
+
324
+ ## Debugging
325
+
326
+ $mol pays special attention to debugging possibilities and research of how its code works.
327
+
328
+ A human friendly `id` is automatically formed for every DOM-element, e.g. `$hyoo_todomvc.root(0).taskRow(0).titler()`, which is a valid javascript code, that could be executed in a console, returning a link to the component, which the DOM-element corresponds to. Unfolding the content of the component you'd see names and values for its fields like:
329
+
330
+ ```
331
+ $hyoo_todomvc
332
+ dom_node() : div#$hyoo_todomvc.root(0)
333
+ task(1474385802391) : Object
334
+ task(1474386443175) : Object
335
+ taskRow(0) : $hyoo_todomvc_task_rowRow
336
+ taskRow(1) : $hyoo_todomvc_task_rowRow
337
+ taskrows() : Array[2]
338
+ ```
339
+
340
+ The name of the field corresponds to calling the property, the content of the field would be available through. And thanks to naming classes and functions by underscoring, you always know which class instance you're looking at and can briefly find it in the code by searching the substring.
341
+
342
+ # Modules
343
+
344
+ ## Flow
345
+
346
+ - **[$mol_fiber](fiber)** - suspendable tasks
347
+ - **[$mol_atom2](atom2)** - reactive container
348
+ - **[$mol_log2](log2)** - logging
349
+ - **[$mol_import](import)** - dynamic sources import
350
+ - **[$mol_after](after)** - scheduled callbacks with unified api
351
+ - **[$mol_fail](fail)** - throws all exceptions in one place to increase debug experience
352
+
353
+ ## Object model
354
+
355
+ - **[$mol_mem](mem)** - reactive property decorator
356
+ - **[$mol_object](object)** - components base class
357
+
358
+ ## Lifecycle
359
+
360
+ - **[$mol_ambient] - makes derived context
361
+ - **[$mol_owning] - owning relation between objects
362
+
363
+ ## Functions
364
+
365
+ - **[$mol_const](const)** - const value returning function
366
+ - **[$mol_func_name](func/name)** - name of function
367
+ - **[$mol_func_sandbox](func/sandbox)** - sandbox for safe code evaluation
368
+
369
+ ## Collections
370
+
371
+ - **[$mol_range2](range2)** - lazy array
372
+ - **[$mol_maybe](maybe)** - [maybe monad](https://en.wikipedia.org/wiki/Monad_(functional_programming)#The_Maybe_monad)
373
+ - **[$mol_conform](conform)** - object tree reconciler
374
+ - **[$mol_dict](dict)** - useful native `Map` extension
375
+ - **[$mol_array_chunks](array/chunks)** - splits array by different chunks
376
+ - **[$mol_array_trim](array/trim)** - shortens array without memory reallocation
377
+
378
+ ## [State modules](state)
379
+
380
+ - **[$mol_state_arg](state/arg)** - arguments state (location/argv)
381
+ - **[$mol_state_local](state/local)** - persistent local state (localStorage)
382
+ - **[$mol_state_session](state/session)** - session temporary state (sessionStorage)
383
+ - **[$mol_state_history](state/history)** - browser history bound state
384
+ - **[$mol_state_stack](state/stack)** - state of current stack of execution
385
+ - **[$mol_state_time](state/time)** - reactive current time stamp
386
+
387
+ ## Simple components
388
+
389
+ - **[$mol_view](view)** - reactive view model base class with lazy error-proof renderer
390
+ - **[$mol_ghost](ghost)** - node-less wrapper for another view
391
+ - **[$mol_filler](filler)** - lorem ipsum
392
+ - **[$mol_svg](svg)** - svg base components
393
+ - **[$mol_status](status)** - prints error status of some property
394
+ - **[$mol_speck](speck)** - attention speck
395
+
396
+ ## Simple controls
397
+
398
+ - **[$mol_link](link)** - navigation link
399
+ - **[$mol_button](button)** - button
400
+ - **[$mol_check](check)** - check box
401
+ - **[$mol_switch](switch)** - radio buttons
402
+ - **[$mol_select](select)** - select with search and lazy rendering support
403
+ - **[$mol_string](string)** - one string input control
404
+ - **[$mol_textarea](textarea)** - multiple line input control
405
+ - **[$mol_search](search)** - search string with suggests support
406
+ - **[$mol_number](number)** - one number input control
407
+ - **[$mol_code](code)** - bar code scanner
408
+ - **[$mol_portion](portion)** - portion visualizer
409
+
410
+ ## Layout components
411
+
412
+ - **[$mol_scroll](scroll)** - scroll pane with position saving
413
+ - **[$mol_tiler](tiler)** - items in row with balanced wrapping
414
+ - **[$mol_row](row)** - items in row with wrapping and padding between
415
+ - **[$mol_bar](bar)** - group of controls as own control
416
+ - **[$mol_list](list)** - vertical list of rows
417
+ - **[$mol_labeler](labeler)** - labeled content
418
+ - **[$mol_section](section)** - section with header
419
+ - **[$mol_book](book)** - horizontal stack of pages
420
+ - **[$mol_page](page)** - page with header, body and footer
421
+ - **[$mol_deck](deck)** - deck of panels with tab bar
422
+ - **[$mol_card](card)** - card with content
423
+
424
+ ## Plugin components
425
+
426
+ - **[$mol_nav](nav)** - keyboard navigation
427
+ - **[$mol_meter](meter)** - real time element size monitoring
428
+
429
+ ## Complex components
430
+
431
+ - **[$mol_form](form)** - forms with validators
432
+ - **[$mol_example](demo)** - demonstrates widget in various screens
433
+ - **[$mol_attach](attach)** - preview list and attach button
434
+ - **[$mol_cost](cost)** - prints currency values
435
+ - **[$mol_message](message)** - user message
436
+
437
+ ## Charts
438
+
439
+ - **[$mol_chart](chart)** - Plot pane with legend
440
+ - **[$mol_chart_legend](chart/legend)** - Simple legend for charts
441
+ - **[$mol_plot_pane](plot/pane)** - Pane for multiple graphs
442
+ - **[$mol_plot_graph](plot/graph)** - Plot graph base class
443
+ - **[$mol_plot_bar](plot/bar)** - Bar graph
444
+ - **[$mol_plot_line](plot/line)** - Linear graph
445
+ - **[$mol_plot_dot](plot/dot)** - Dots graph
446
+ - **[$mol_plot_fill](plot/fill)** - Filling graph
447
+ - **[$mol_plot_group](plot/group)** - Group of graph as single graph
448
+ - **[$mol_plot_ruler_vert](plot/ruler/vert)** - Verical ruler
449
+ - **[$mol_plot_ruler_hor](plot/ruler/hor)** - Horizontal ruler
450
+ - **[$mol_plot_mark_hor](plot/mark/hor)** - Horizontal markers
451
+
452
+ ## Data formats
453
+
454
+ - **[$mol_tree2](tree2)** - [tree format](https://github.com/nin-jin/tree.d) (`view.tree` language described at [$mol_view](view))
455
+ - **[$mol_base64](base64)** - Base64 encode/decode
456
+ - **[$mol_leb128](leb128)** - LEB128 encode/decode
457
+
458
+ ## Math
459
+
460
+ - **[$mol_graph](graph)** - graph algorithms
461
+ - **[$mol_unit](unit)** - typed number value
462
+ - **[$mol_merge_dict](merge/dict)** - merge two dictionaries to new one
463
+
464
+ ## Resources
465
+
466
+ - **[$mol_icon](https://github.com/nin-jin/mol_icon)** - css styled material design icons
467
+ - **[$mol_skin](theme)** - theming
468
+ - **[$mol_gap](theme)** - paddings, margins etc
469
+ - **[$mol_style](style)** - css-in-ts
470
+
471
+ ## Testing
472
+
473
+ - **[$mol_test](test)** - unit testing
474
+ - **[$mol_stub](stub)** - stub data generators
475
+ - **[$mol_assert](assert)** - assertion functions
476
+
477
+ ## API
478
+
479
+ - **[$mol_window](window)** - reactive view port configuration
480
+ - **[$mol_fetch](fetch)** - Reactive [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API)
481
+ - **[$mol_webdav](webdav)** - Reactive [WebDAV](https://wikipedia.org/wiki/WebDAV) client
482
+ - **[$mol_file](file)** - isomorphic reactive file system wrapper
483
+ - **[$mol_exec](exec)** - synchronous execute of system command
484
+ - **[$mol_cordova](cordova)** - [Apache Cordova](https://cordova.apache.org) API
485
+
486
+ ## Time
487
+
488
+ - **[$mol_time_moment](time/moment)** - [time moment](https://en.wikipedia.org/wiki/ISO_8601#Dates) representation with iso8601 support
489
+ - **[$mol_time_duration](time/duration)** - [time duration](https://en.wikipedia.org/wiki/ISO_8601#Durations) representation with iso8601 support
490
+ - **[$mol_time_interval](time/interval)** - [time interval](https://en.wikipedia.org/wiki/ISO_8601#Time_intervals) representation with iso8601 support
491
+ - **[$mol_state_time](state/time)** - reactive current time stamp
492
+ - **[$mol_date](date)** - date picker
493
+ - **[$mol_calendar](calendar)** - days of month as table
494
+
495
+ ## Maps
496
+
497
+ - **[$mol_map_yandex](map/yandex)** - [Yandex Maps](https://tech.yandex.ru/maps/doc/jsapi/2.1/)
498
+
499
+ ## WebAssemply
500
+
501
+ - **[$mol_wasm](wasm)** - wasm runner
502
+ - **[$mol_leb128](leb128)** - LEB128 encode/decode
503
+ - **[$mol_tree2_wasm](tree2/wasm)** - wasm.tree representation
504
+
505
+ ## Web Services
506
+
507
+ - **[$mol_github](github)** - [GitHub API](https://developer.github.com/v3/)
508
+ - **[$mol_chat](chat)** - GitHub based comments everywere
509
+
510
+ ## Building
511
+
512
+ - **[$mol_build](build)** - MAM builder
513
+ - **[$mol_build_server](build/server)** - MAM developer server
514
+
515
+ ## Usage from NPM ecosystem
516
+
517
+ You can manually build any $mol module as standalone lib:
518
+
519
+ ```
520
+ git clone https://github.com/hyoo-ru/mam.git ./mam
521
+ cd mam
522
+ npm install
523
+ npm start path/to/module
524
+ cp path/to/module/-/* your/build/directory
525
+ ```
526
+
527
+ Some libs are already published to NPM:
528
+
529
+ - [$mol_data](data) - Static typed DTO with strict runtime validation and user friendly error messages.
530
+ - [$mol_strict](strict) - Makes JS runtime more strict.
531
+ - [$mol_time](time) - Proper date/time/duration/interval arithmetic.
532
+ - [$mol_type](type) - TypeScript meta types for complex logic.
533
+ - [$mol_regexp](regexp) - Regular Expressions builder.
534
+ - [$mol_crypto](crypto) - Efficient cryptographic algorithms.
535
+ - [$mol_db](db) - Static typed IndexedDB wrapper with auto migrations.
536
+ - [$hyoo_crowd](https://github.com/hyoo-ru/crowd.hyoo.ru) - Conflict-free Reinterpretable Ordered Washed Data.
537
+ - [$mol_plot](plot) - [Fastest](https://bench.hyoo.ru/app/#!bench=https%3A%2F%2Fbench.hyoo.ru%2Fchart%2Frope%2F/sample=canvasjs~mol~chartjs/sort=update) plot lib for vector graphics.
538
+
539
+ All of them are very small, powerfull and fastest. Use it for your pleasure.
540
+
541
+ # Contributors
542
+
543
+ This project exists thanks to all the people who contribute.
544
+
545
+ - [nin-jin](https://github.com/nin-jin)
546
+ - [ar2r13](https://github.com/ar2r13)
547
+ - [zerkalica](https://github.com/zerkalica)
548
+ - [muleronko](https://github.com/muleronko)
549
+ - [slava-viktorov](https://github.com/slava-viktorov)
550
+ - [CONTRIBUTING](https://github.com/hyoo-ru/mol/blob/master/CONTRIBUTING.md)
551
+
552
+ # Cool stuff
553
+
554
+ - **[Commits visualization](http://ghv.artzub.com/#repo=mam_mol&user=hyoo-ru&climit=100000)**
555
+ - **[Sources visualization (fennel)](http://veniversum.me/git-visualizer/?owner=hyoo-ru&repo=mam_mol)**
556
+ - **[Sources visualization (foam)](https://octo-repo-visualization.vercel.app/?repo=hyoo-ru%2Fmam_mol)**
557
+
558
+ # Donate
559
+
560
+ - **[Shut up and take my money](http://yasobe.ru/na/mol)**
package/test.html CHANGED
@@ -1,8 +1,17 @@
1
1
  <!doctype html><meta charset="utf-8" /><body><script src="web.js" charset="utf-8"></script>
2
2
  <script src="/mol/build/client/client.js" charset="utf-8"></script>
3
3
  <script>
4
- setTimeout( ()=> {
5
- document.head.appendChild( document.createElement( 'script' ) ).src = 'web.test.js'
6
- },250)
4
+ addEventListener( 'load', ()=> {
5
+
6
+ const test = document.createElement( 'script' )
7
+ test.src = 'web.test.js'
8
+
9
+ const audit = document.createElement( 'script' )
10
+ audit.src = 'web.audit.js'
11
+
12
+ test.onload = ()=> document.head.appendChild( audit )
13
+ document.head.appendChild( test )
14
+
15
+ } )
7
16
  </script>
8
17
 
package/web.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- declare namespace $ { }
2
- export = $;
1
+
2
+ export = $;
package/web.deps.json CHANGED
@@ -1 +1 @@
1
- {"files":["mol/CNAME","mol/CODE_OF_CONDUCT.md","mol/CONTRIBUTING.md","mol/index.html","mol/LICENSE","mol/mol.jam.js","mol/mol.meta.tree","mol/mol.ts","mol/readme.md","mol/build/package.json"],"mods":{},"edgesIn":{},"edgesOut":{},"sloc":{"CNAME":1,"md":380,"html":1,"LICENSE":17,"js":11,"tree":1,"ts":4,"json":20},"deps":{"mol/build":{"..":-9007199254740991},"mol":{"..":-9007199254740991,"/mol":0}}}
1
+ {"files":["lang.lang.tree","LICENSE","mam.jam.js","mam.ts","package.json","README.md","sandbox.config.json","tsconfig.json","tsfmt.json","mol/CNAME","mol/CODE_OF_CONDUCT.md","mol/CONTRIBUTING.md","mol/index.html","mol/LICENSE","mol/mol.meta.tree","mol/readme.md","mol/build/package.json"],"mods":{},"deps_in":{"mol":{"mol/build":-9007199254740991},"":{"mol":-9007199254740991}},"deps_out":{"mol/build":{"mol":-9007199254740991},"mol":{"":-9007199254740991}},"sloc":{"tree":31,"LICENSE":113,"js":10,"ts":11,"json":98,"md":474,"CNAME":1,"html":1},"deps":{"mol/build":{"..":-9007199254740991},"mol":{"..":-9007199254740991},"":{}}}
package/web.esm.js CHANGED
@@ -1,31 +1,33 @@
1
+ "use strict";
1
2
  function require( path ){ return $node[ path ] };
2
3
  "use strict"
3
4
 
4
5
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
5
6
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
6
7
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
7
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
8
+ else for (var i = decorators.length - 1; i >= 0; i--) if ((d = decorators[i])) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
8
9
  return c > 3 && r && Object.defineProperty(target, key, r), r;
9
10
  };
10
11
 
11
- var globalThis = globalThis || global || self || this
12
- var $ = ( typeof module === 'object' ) ? Object.setPrototypeOf( module['export'+'s'] , globalThis ) : globalThis
12
+ var globalThis = globalThis || ( typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : this )
13
+ var $ = ( typeof module === 'object' ) ? ( module['export'+'s'] = globalThis ) : globalThis
13
14
  $.$$ = $
14
- $.$mol = $ // deprecated
15
15
 
16
16
  ;
17
17
 
18
18
  var $node = $node || {}
19
- void function( module ) { var exports = module.exports = this; function require( id ) { return $node[ id.replace( /^.\// , "../mol/" ) ] };
19
+ void function( module ) { var exports = module.exports = this; function require( id ) { return $node[ id.replace( /^.\// , "../" ) ] };
20
20
  ;
21
21
  "use strict";
22
- Object.defineProperty(exports, "__esModule", { value: true });
23
- Error.stackTraceLimit = Infinity;
24
- module.exports;
25
- //mol.js.map
22
+ Error.stackTraceLimit = 50;
23
+ var $;
24
+ (function ($) {
25
+ })($ || ($ = {}));
26
+ module.exports = $;
27
+ //mam.ts
26
28
  ;
27
29
 
28
- $node[ "../mol/mol" ] = $node[ "../mol/mol.js" ] = module.exports }.call( {} , {} )
30
+ $node[ "../mam.ts" ] = $node[ "../mam.ts" ] = module.exports }.call( {} , {} )
29
31
  ;
30
32
  export default $
31
33
  //# sourceMappingURL=web.esm.js.map