-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tweaks in HTML/DOM rendering; other misc
- Loading branch information
Showing
37 changed files
with
679 additions
and
509 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,7 @@ | |
CLI args: | ||
|
||
```js | ||
import * as cl from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].47/cli.mjs' | ||
import * as cl from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].48/cli.mjs' | ||
|
||
const cli = cl.Flag.os() | ||
|
||
|
@@ -34,15 +34,15 @@ console.log(...cli.args) | |
Console clearing: | ||
|
||
```js | ||
import * as cl from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].47/cli.mjs' | ||
import * as cl from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].48/cli.mjs' | ||
|
||
cl.emptty() | ||
``` | ||
|
||
Clearing the console only once, before running your code: | ||
|
||
```js | ||
import 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].47/cli_emptty.mjs' | ||
import 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].48/cli_emptty.mjs' | ||
``` | ||
|
||
## API | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,7 +26,7 @@ Port and rework of https://github.com/mitranim/jol. | |
## Usage | ||
|
||
```js | ||
import * as c from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].47/coll.mjs' | ||
import * as c from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].48/coll.mjs' | ||
``` | ||
|
||
## API | ||
|
@@ -101,8 +101,8 @@ Links: [source](../coll.mjs#L102); [test/example](../test/coll_test.mjs#L218). | |
Variant of [#`Bmap`](#class-bmap) with support for key and value checks. Subclasses must override methods `.reqKey` and `.reqVal`. These methods are automatically called by `.set`. Method `.reqKey` must validate and return the given key, and method `.reqVal` must validate and return the given value. Use type assertions provided by [`lang`](lang_readme.md). | ||
|
||
```js | ||
import * as l from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].47/lang.mjs' | ||
import * as c from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].47/coll.mjs' | ||
import * as l from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].48/lang.mjs' | ||
import * as c from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].48/coll.mjs' | ||
|
||
class StrNatMap extends c.TypedMap { | ||
reqKey(key) {return l.reqStr(key)} | ||
|
@@ -242,7 +242,7 @@ Differences and advantages over `Array`: | |
The overhead of the wrapper is insignificant. | ||
|
||
```js | ||
import * as c from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].47/coll.mjs' | ||
import * as c from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].48/coll.mjs' | ||
|
||
console.log(new c.Vec()) | ||
// Vec{$: []} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ | |
## Usage | ||
|
||
```js | ||
import * as dg from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].47/dom_glob_native.mjs' | ||
import * as dg from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].48/dom_glob_native.mjs' | ||
|
||
console.log(dg.glob) | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ | |
## Usage | ||
|
||
```js | ||
import * as dg from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].47/dom_glob_shim.mjs' | ||
import * as dg from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].48/dom_glob_shim.mjs' | ||
|
||
console.log(dg.glob) | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ | |
## Usage | ||
|
||
```js | ||
import * as d from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].47/dom.mjs' | ||
import * as d from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].48/dom.mjs' | ||
``` | ||
|
||
## API | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,7 +26,7 @@ | |
Example mockup for a pushstate link. | ||
|
||
```js | ||
import * as dr from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].47/dom_reg.mjs' | ||
import * as dr from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].48/dom_reg.mjs' | ||
|
||
// Immediately ready for use. Tag is automatically set to `a-btn`. | ||
class Btn extends dr.HTMLButtonElement { | ||
|
@@ -74,7 +74,7 @@ Registry for custom DOM element classes. Automatically derives tag name from cla | |
By default, this registry has **no global side effects**. To enable global registration, provide a "definer" to the registry. | ||
|
||
```js | ||
import * as dr from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].47/dom_reg.mjs' | ||
import * as dr from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].48/dom_reg.mjs' | ||
|
||
class Btn extends HTMLButtonElement { | ||
static customName = `some-btn` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ | |
## Usage | ||
|
||
```js | ||
import * as ds from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].47/dom_shim.mjs' | ||
import * as ds from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].48/dom_shim.mjs' | ||
``` | ||
|
||
## API | ||
|
@@ -83,29 +83,29 @@ The following APIs are exported but undocumented. Check [dom_shim.mjs](../dom_sh | |
* [`class HTMLMetaElement`](../dom_shim.mjs#L582) | ||
* [`class HTMLAnchorElement`](../dom_shim.mjs#L587) | ||
* [`class HTMLButtonElement`](../dom_shim.mjs#L614) | ||
* [`class HTMLInputElement`](../dom_shim.mjs#L636) | ||
* [`class HTMLTextAreaElement`](../dom_shim.mjs#L648) | ||
* [`class HTMLTableElement`](../dom_shim.mjs#L650) | ||
* [`class HTMLScriptElement`](../dom_shim.mjs#L659) | ||
* [`class SVGElement`](../dom_shim.mjs#L677) | ||
* [`class DocumentType`](../dom_shim.mjs#L682) | ||
* [`class Document`](../dom_shim.mjs#L705) | ||
* [`class HTMLDocument`](../dom_shim.mjs#L796) | ||
* [`class DOMImplementation`](../dom_shim.mjs#L813) | ||
* [`class DictPh`](../dom_shim.mjs#L847) | ||
* [`class StylePh`](../dom_shim.mjs#L860) | ||
* [`class ClassList`](../dom_shim.mjs#L979) | ||
* [`class GlobPh`](../dom_shim.mjs#L1049) | ||
* [`const glob`](../dom_shim.mjs#L1068) | ||
* [`const document`](../dom_shim.mjs#L1069) | ||
* [`const customElements`](../dom_shim.mjs#L1070) | ||
* [`function auto`](../dom_shim.mjs#L1072) | ||
* [`function escapeAttr`](../dom_shim.mjs#L1085) | ||
* [`function escapeText`](../dom_shim.mjs#L1098) | ||
* [`function escapeChar`](../dom_shim.mjs#L1105) | ||
* [`function unescape`](../dom_shim.mjs#L1114) | ||
* [`function unescapeMatch`](../dom_shim.mjs#L1118) | ||
* [`const styleToCssCache`](../dom_shim.mjs#L1133) | ||
* [`const camelToDataCache`](../dom_shim.mjs#L1137) | ||
* [`const dataToCamelCache`](../dom_shim.mjs#L1141) | ||
* [`const outerHtmlDyn`](../dom_shim.mjs#L1145) | ||
* [`class HTMLInputElement`](../dom_shim.mjs#L639) | ||
* [`class HTMLTextAreaElement`](../dom_shim.mjs#L651) | ||
* [`class HTMLTableElement`](../dom_shim.mjs#L653) | ||
* [`class HTMLScriptElement`](../dom_shim.mjs#L662) | ||
* [`class SVGElement`](../dom_shim.mjs#L680) | ||
* [`class DocumentType`](../dom_shim.mjs#L685) | ||
* [`class Document`](../dom_shim.mjs#L708) | ||
* [`class HTMLDocument`](../dom_shim.mjs#L799) | ||
* [`class DOMImplementation`](../dom_shim.mjs#L816) | ||
* [`class DictPh`](../dom_shim.mjs#L850) | ||
* [`class StylePh`](../dom_shim.mjs#L863) | ||
* [`class ClassList`](../dom_shim.mjs#L982) | ||
* [`class GlobPh`](../dom_shim.mjs#L1052) | ||
* [`const glob`](../dom_shim.mjs#L1071) | ||
* [`const document`](../dom_shim.mjs#L1072) | ||
* [`const customElements`](../dom_shim.mjs#L1073) | ||
* [`function auto`](../dom_shim.mjs#L1075) | ||
* [`function escapeAttr`](../dom_shim.mjs#L1088) | ||
* [`function escapeText`](../dom_shim.mjs#L1101) | ||
* [`function escapeChar`](../dom_shim.mjs#L1108) | ||
* [`function unescape`](../dom_shim.mjs#L1117) | ||
* [`function unescapeMatch`](../dom_shim.mjs#L1121) | ||
* [`const styleToCssCache`](../dom_shim.mjs#L1136) | ||
* [`const camelToDataCache`](../dom_shim.mjs#L1140) | ||
* [`const dataToCamelCache`](../dom_shim.mjs#L1144) | ||
* [`const outerHtmlDyn`](../dom_shim.mjs#L1149) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,7 +32,7 @@ HTTP request/response utils are ported and reworked from https://github.com/mitr | |
## Usage | ||
|
||
```js | ||
import * as h from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].47/http.mjs' | ||
import * as h from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].48/http.mjs' | ||
|
||
const reqBody = {msg: `hello world`} | ||
const resBody = await h.reqBui().to(`/api`).post().json(reqBody).fetchOkJson() | ||
|
@@ -234,8 +234,8 @@ rou.groups // {key: `path`} | |
Routing is imperative: | ||
|
||
```js | ||
import * as h from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].47/http.mjs' | ||
import * as l from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].47/lang.mjs' | ||
import * as h from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].48/http.mjs' | ||
import * as l from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].48/lang.mjs' | ||
|
||
const nextPage = route(window.location) | ||
|
||
|
@@ -263,7 +263,7 @@ Short for "request router" or "request-response router". Advanced version of [#` | |
Routing can be shared between SSR and SPA: | ||
|
||
```js | ||
import * as h from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].47/http.mjs' | ||
import * as h from 'https://cdn.jsdelivr.net/npm/@mitranim/[email protected].48/http.mjs' | ||
|
||
function route(rou) { | ||
l.reqInst(rou, h.ReqRou) | ||
|
Oops, something went wrong.