@yuneta/gobj-ui 7.26.48 → 7.26.50

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/README.md CHANGED
@@ -229,12 +229,26 @@ Published as `@yuneta/gobj-ui`. Built on top of [`@yuneta/gobj-js`](https://gith
229
229
  > yui_shell_push_escape(shell, "modal", ask_then_close, close_now);
230
230
  > ```
231
231
  >
232
- > **And it moves no browser history (7.26.47).** The markers of the overlays it
233
- > closes are left in place, inert, as those of overlays a navigation drains: a
234
- > later Back lands on one and is absorbed. In 7.26.46 the stop retired them with
235
- > `history.back()`, which is asynchronous, and a stopped shell no longer hears
236
- > where it lands: a logout followed by a new shell in the same turn had it take
237
- > the new shell's first marker (Chromium), and the next Back left the app. An
232
+ > **And it moves no browser history (7.26.47); the NEXT shell takes off what
233
+ > it left (7.26.49).** The markers of the overlays it closes, and the action
234
+ > entry of a `stay` route parked under one, are dead once it stops: a Back
235
+ > onto one closes nothing. The stopped shell does not take them off -- a
236
+ > `history.back()` is asynchronous, and a stopped shell no longer hears where
237
+ > it lands (in 7.26.46 a logout followed by a new shell in the same turn had
238
+ > it take the new shell's first marker in Chromium, and the next Back left the
239
+ > app) --; it hands them over, and the next shell that starts with `use_hash`
240
+ > takes them off with ONE `history.go(-n)` heard by its own landing bookkeeping:
241
+ > an overlay it opens meanwhile gets its marker after the landing, a route it
242
+ > pushes runs after it, and the position the URL holds is put back where it
243
+ > lands. In 7.26.47 and 7.26.48 they stayed, and every logout with an overlay
244
+ > up left more dead Backs (two per cycle with a question over a panel). The
245
+ > entries are known by their Navigation API key (Chromium, Firefox and Safari
246
+ > 26.2+); without the API they stay, as in 7.26.48. A page with no next shell
247
+ > keeps them until one starts -- with no router on the page a Back over them
248
+ > changes nothing on screen anyway --, and a reload keeps them in the tab's
249
+ > `sessionStorage` for the first shell of the new load. A `history.back()` of
250
+ > the stopped shell still in flight (an overlay closed by its own control in
251
+ > the same turn as the stop) is adopted by a shell started before it lands. An
238
252
  > overlay parked on an action route (`redirect: "stay"`) whose `on_close` calls
239
253
  > `yui_shell_unpark_route()` has the URL rewritten in place to the resting
240
254
  > route, not taken back (7.26.48): a single `back()` landed on the action entry
@@ -251,7 +265,10 @@ Published as `@yuneta/gobj-ui`. Built on top of [`@yuneta/gobj-js`](https://gith
251
265
  > down with it no longer stands for an overlay that is gone. It is skipped, not
252
266
  > dropped: it leaves the stack only by its `release()`, and a panel that only
253
267
  > moves (taken out and put back) has its trap again (7.26.47; 7.26.46 dropped
254
- > it for good).
268
+ > it for good). The first time a trap is skipped it is said, once, with the
269
+ > panel's classes (7.26.49): a panel whose owner is gone keeps its `keydown`
270
+ > listener until a `release()` that will never come, and the warning is how
271
+ > that owner is found.
255
272
 
256
273
  ## Two maintained lines
257
274
 
@@ -3701,15 +3718,31 @@ empty box, and only `validity.badInput` tells them apart: Enter leaves the edito
3701
3718
  open, outlined and with `aria-invalid`, until the date is whole again or Escape;
3702
3719
  leaving the cell cancels, and the cell keeps its time (7.26.47+; up to 7.26.46
3703
3720
  one Backspace and Enter erased the stored time). **To clear a time on purpose,
3704
- clear every part of the box**: an empty box writes `null`. Inside the box Tab
3705
- moves between its parts, as the browser does.
3721
+ clear every part of the box**: an empty box writes `null`, and the box is no
3722
+ longer said invalid once its last part is cleared (7.26.49: Chromium says no
3723
+ `input` for it, the value stays `""`). Inside the box the Left and Right arrows
3724
+ move between its parts; Tab is the table's: it leaves the cell and opens the
3725
+ editor of the next one (Chromium and Firefox). Enter on a time left as it was
3726
+ is a cancel, on the hour too (7.26.49): the browser writes `…T02:30:00` back as
3727
+ `…T02:30`, so the text never matched, and in the hour that repeats in autumn
3728
+ the epoch of the wall time is the earlier one -- Enter wrote -3600 s.
3706
3729
 
3707
3730
  The form's own time field and the cell editor read and write a column the same
3708
3731
  way (7.26.47+): an epoch in seconds, an ISO text for a `string` column, and an
3709
3732
  empty box for a column that holds no time. Up to 7.26.46 the field read every
3710
3733
  column with `parseInt` -- an ISO text as 2026 seconds, in January 1970 --, wrote
3711
3734
  the epoch into a `string` column, and showed no time as January 1970, which a
3712
- save wrote back as `0`.
3735
+ save wrote back as `0`. A template field written `"time.writable"` (no real
3736
+ type) is an epoch (7.26.49): the template grammar gives such a spec `string`,
3737
+ and 7.26.47 read it as an ISO text -- the field showed no time and a save wrote
3738
+ `null` over it. Write `"string.time.writable"` for an ISO text.
3739
+
3740
+ A field Save refuses (a required box left empty, a date with a part cleared)
3741
+ is outlined AND carries `aria-invalid`, and the line under it is its
3742
+ `aria-describedby` (7.26.49; up to 7.26.48 only the outline said it, which a
3743
+ reader does not see). The line holds the form's own sentence for an empty
3744
+ required box and the browser's for the rest (`validationMessage`, in the
3745
+ browser's language).
3713
3746
 
3714
3747
  A table hears the reader through Tabulator's `dataChanged`, which Tabulator
3715
3748
  does not say for `setData()` / `replaceData()`, nor when its `history` module
@@ -3792,7 +3825,10 @@ the form is not selectable (7.26.46): Tabulator's row box ticks before its
3792
3825
  toggle is refused, and its header box selects every row without asking. It
3793
3826
  follows `selectable` written at any time, in every table (7.26.47+; in 7.26.46
3794
3827
  it was read when the table was built, and a `false` written later left boxes
3795
- that ticked without selecting). Its header box is named *select all rows*, a
3828
+ that ticked without selecting). Writing `selectable: false` also takes off what
3829
+ was selected, in every table (7.26.49): the rows stayed selected with no box to
3830
+ untick, and a click could not take them off either -- the check refuses it
3831
+ (Chromium and Firefox, Tabulator 6.6.0). Its header box is named *select all rows*, a
3796
3832
  row's *select row*, and both change language with the form (consumer key
3797
3833
  `select all rows`, 7.26.47). A click in a NESTED table selects in that table
3798
3834
  only; it bubbled up to the row holding the table, which toggled too.
@@ -4123,6 +4159,23 @@ that is not json (a stray comma, conflict markers) is read by its lines, every
4123
4159
  refused the app on every round, without naming the commit. A package.json of
4124
4160
  the working tree that is not json is refused naming the file.
4125
4161
 
4162
+ Since `7.26.49` the states read for a package.json born with the range are
4163
+ kept between rounds in `~/.yuneta/deploy-round-history.json` (commits do not
4164
+ change, so the states of the history before a birth are the same on every
4165
+ run; a shallow clone is not kept, and a file that cannot be read is said and
4166
+ read again from git). Up to `7.26.48` that search read every package.json of
4167
+ the history again on every round while the range was the current one: on a
4168
+ history of 30 000 commits, 1.2 s per round against 0.25 s without it; now the
4169
+ first round pays it once. A package.json born with the range in the ROOT of a
4170
+ history joined to another one (`--allow-unrelated-histories`) is asked of the
4171
+ other history, by version, as one born in a commit with parents is. The
4172
+ version raised is the package's own, the `"version"` of the top object: up to
4173
+ `7.26.48` the first `"version": "x.y.z"` of the text was, so a `config.version`
4174
+ or a `scripts.version` equal to it was raised in its place and the app went
4175
+ out under its old number; the json is read back after the edit. A
4176
+ package.json that starts with a byte order mark is read, as npm reads it (up to
4177
+ `7.26.48` it was refused as not json).
4178
+
4126
4179
  ### Colour: a brand token as INK takes `-on-scheme`, as a FILL it does not
4127
4180
 
4128
4181
  A Bulma brand colour (`--bulma-link`, `--bulma-danger`, …) is built to carry
@@ -4491,12 +4544,18 @@ with `const T = "t"`), and so is a SPREAD of an array the source writes out:
4491
4544
  `t(...["k"])`, `t.call(x, ...["k"])`, `t(...KEYS)` and `t.apply(x, KEYS)` with
4492
4545
  `const KEYS = ["k"]` -- each element of the const read as `KEYS[0]`,
4493
4546
  `KEYS[1]`... (up to `7.26.45` none of them was read, and nothing failed). Since
4494
- `7.26.47` each of those is THAT element, so `t.apply(null, ["save", "Save it"])`
4495
- asks for "save" and not for its default value (`7.26.46` read every element of
4496
- the array at every position, and asked for both), and a const ALIAS of such an
4497
- array (`const B = KEYS; t(...B)`), an import of one, and an
4498
- `Object.freeze([...])` are read as it is (up to `7.26.46` they were spreads of
4499
- what the source does not write).
4547
+ `7.26.47` each of those is THAT element of a const array only ever read (below),
4548
+ so `t.apply(null, SAVE)` with `const SAVE = ["save", "Save it"]` asks for
4549
+ "save" and not for its default value (`7.26.46` read every element of a const
4550
+ array at every position, and asked for both; an array written in the call,
4551
+ `t.apply(null, ["save", "Save it"])`, was read by position already), and a
4552
+ const ALIAS of such an array (`const B = KEYS; t(...B)`), an import of one, and
4553
+ an `Object.freeze([...])` are read as it is (up to `7.26.46` they were spreads
4554
+ of what the source does not write; `7.26.47` and `7.26.48` read a frozen array
4555
+ by every element at every position, so `f.apply(x, Object.freeze([shell,
4556
+ "k"]))` failed the rule per call). A `let` of literal arrays is read too, by
4557
+ every element at each position (since `7.26.49`; up to `7.26.48` `t(...L)` and
4558
+ `t(L[1])` with `let L = ["a", "b"]` read nothing).
4500
4559
  An ARRAY given to it is i18next's list of fallback keys, and
4501
4560
  each one is a key: `t([specific, "generic"])` asks for "generic". A `.bind()`
4502
4561
  that binds a KEY makes a translator whose calls hand i18next its options or its
@@ -4550,11 +4609,35 @@ options). What is followed:
4550
4609
  COPY of one (since `7.26.32`): `{...BASE, title: "t"}`,
4551
4610
  `Object.assign({}, BASE)`;
4552
4611
  - an element of a const array literal read by an index the source writes
4553
- (`LABELS[1]`, `LABELS["1"]`): that element, nothing past the end or in a
4554
- hole (since `7.26.47`; up to `7.26.46` every element of the array). An
4555
- index past a spread, a computed one, and an array its scope writes into
4556
- (`LABELS[0] = k`, `.push()`, `.reverse()`, `.sort()`, `delete`, ...: an
4557
- element may be another one by then) read every element written out;
4612
+ (`LABELS[1]`, `LABELS["1"]`, `LABELS.at(1)`, `LABELS.at(-1)`, `const [a, b]
4613
+ = LABELS`, `const {1: b} = LABELS`, a spread of `LABELS.slice(1, 3)`): that
4614
+ element, nothing past the end or in a hole (since `7.26.47`; up to `7.26.46`
4615
+ every element of the array; `.at()`, the destructuring and `.slice()` since
4616
+ `7.26.49`, up to `7.26.48` they read nothing) -- when EVERY use of the array
4617
+ is a read that leaves its elements where they are: an element or a property
4618
+ read, a spread, the array of an `.apply()`, a destructuring, a `for...of`, a
4619
+ test or an operand, `Object.freeze()`, `Array.isArray()`, the methods that
4620
+ write nothing (`.at()`, `.slice()`, `.includes()`, `.join()`, ...) and the
4621
+ callbacks of `.map()`, `.forEach()`, `.reduce()` ... that cannot reach the
4622
+ array (a function written there with no parameter for it, or `t`). A const
4623
+ alias of it is held to the same, and so is every module of the run that
4624
+ imports it (the app's sources, and the library's for an array of the
4625
+ library); a namespace import, a re-export or an `import()` of its module is
4626
+ not a read. Any other use -- written into, handed to a function
4627
+ (`shuffle(LABELS)`, `Reflect.set(LABELS, 0, k)`,
4628
+ `Array.prototype.reverse.call(LABELS)`), kept (`{x: LABELS}`, `let L =
4629
+ LABELS`), returned, a method named by what is no string written out
4630
+ (`LABELS["re" + "verse"]()`), a callback that takes the array (`(v, i, arr)
4631
+ => ...`, a function named) -- reads every element written out, at any index,
4632
+ and so do an index past a spread and a computed one (since `7.26.49`; up to
4633
+ `7.26.48` only the writes the reader knew -- `X[0] = k`, `.push()`,
4634
+ `.reverse()`, `delete`, ... in the array's own scope -- did, and the shapes
4635
+ above read the element the source wrote there, not the one the array held);
4636
+ - an element of a `let` (or `var`) that is only ever given array literals of
4637
+ literals and elements that are literals (`L[0] = "k"`, `L.push("k")`):
4638
+ every one of them, at any index (`L[1]`, `L.at(1)`, `t(...L)`, a `for...of`,
4639
+ `const [a, b] = L`), since `7.26.49`; up to `7.26.48` it was read as nothing.
4640
+ A let given anything else is not followed (below);
4558
4641
  - the element of a const array literal that a `for...of` walks, or that the
4559
4642
  first parameter of a callback of one of the methods above receives (in the
4560
4643
  same forms, and since `7.26.42` also the callback of `Array.from(ROWS, cb)`,
@@ -5210,9 +5293,14 @@ reading the page in another language:
5210
5293
  `m` a parameter or a `let`, `t[c()? "call" : "apply"]`);
5211
5294
  - a key handed to a translator in a spread of what is no array the source
5212
5295
  writes out (`t(...args)`, `t.apply(x, args)` with `args` a parameter, a
5213
- `let`, or a const whose array holds a spread or a hole; a const alias, an
5214
- import or an `Object.freeze()` of an array written out is read, since
5215
- `7.26.47`): from the spread on, no position is known;
5296
+ `let` given anything but literal arrays, or a const whose array holds a
5297
+ spread or a hole; a const alias, an import or an `Object.freeze()` of an
5298
+ array written out is read, since `7.26.47`, and a `let` of literal arrays
5299
+ since `7.26.49`), and a spread of a `.slice()` whose bounds are not integers
5300
+ written out (`t(...KEYS.slice(i))`): from the spread on, no position is
5301
+ known;
5302
+ - an element a REST takes from an array (`const [first, ...others] = KEYS;
5303
+ t(others[0])`): the reader does not count positions through a rest;
5216
5304
  - a translator handed to a FUNCTION (`{t: t}`, `yui_tabulator_lang(t)`,
5217
5305
  `run(t)`) or to any method but those listed above (`keys.reduce(t)`,
5218
5306
  `keys.sort(t)`, an alias of a method, `Reflect.apply()`): only those
@@ -5236,11 +5324,13 @@ reading the page in another language:
5236
5324
  (`TABLE.k = "k"`, `LIST[0] = "k"`, `LIST.push("k")`): the reader follows a
5237
5325
  const to its value, and only a marked `let` is followed into what is
5238
5326
  written into it (a published list that is written into fails: above). An
5239
- array written into in its own scope is read by every element at any index
5240
- (above); written through an alias (`const B = LIST; B.reverse()`), from a
5241
- module that imports it, or by a function it is handed to (`shuffle(LIST)`),
5242
- it is not seen, and an element
5243
- read by its index is the one the source writes there;
5327
+ array used in any way but a read is read by every element written out, at
5328
+ any index (above), so an element read by its index is never one the array
5329
+ may no longer hold; what such a use PUTS into it is not read, whatever the
5330
+ use (`LIST.push("k")`, `Reflect.set(LIST, 0, "k")`, `fill(LIST)`). The same
5331
+ for a `let` of literal arrays, for what is written into it in a way the
5332
+ reader does not read (`Reflect.set(L, 0, "k")`, a function it is handed
5333
+ to);
5244
5334
  - what a module of a package exports (gobj-js, i18next), and an exported
5245
5335
  `let`;
5246
5336
  - in the library's forwarder search, a key stored in a heap object or a DOM
@@ -5323,7 +5413,19 @@ reached through a symlinked package with `--preserve-symlinks-main` (also from
5323
5413
  `NODE_OPTIONS`): both sides of its "am I the script?" test are resolved. A
5324
5414
  locale is IMPORTED, so its code runs: the script ends itself once what it wrote
5325
5415
  has left, and a timer a locale leaves running does not hold the build (since
5326
- `7.26.46`; up to `7.26.45` it held it for ever, a failing run included).
5416
+ `7.26.46`; up to `7.26.45` it held it for ever, a failing run included). The
5417
+ run ends with the code of its own verdict: what a locale writes into
5418
+ `process.exitCode` changes nothing, and a `process.exit()` the script did not
5419
+ call fails the run, saying so (since `7.26.49`; a locale's
5420
+ `setTimeout(() => process.exit(0), 0)` or `process.exitCode = 0` in a timer
5421
+ turned a failing run into exit code 0 up to `7.26.45`, and again in `7.26.47`
5422
+ and `7.26.48`; a `process.exit(0)` at the top of a locale ended the run with 0
5423
+ before anything was checked, in every version). In a browser `process` does not exist, so such a locale is broken in
5424
+ the app too. The run waits for a timer of 0 before it ends, so a promise a
5425
+ locale rejects at its top or in such a timer, with nothing to handle it, fails
5426
+ the run with its stack (since `7.26.47`). A timer of more than 0 ms is not
5427
+ waited for -- a `setInterval` would hold the build for ever --, and what it
5428
+ does after the verdict, a rejection included, is not seen.
5327
5429
 
5328
5430
  Up to `7.26.24` each app carried its own copy, and the copies had drifted into
5329
5431
  three families: only one read the codes of the schema editor, only the other