@yuneta/gobj-ui 7.23.143 → 7.23.145
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 +16 -2
- package/dist/gobj-ui.cjs.js +765 -162
- package/dist/gobj-ui.es.js +766 -163
- package/package.json +1 -1
- package/src/c_g6_nodes_tree.js +50 -2
- package/src/c_yui_json_pad.css +94 -0
- package/src/c_yui_json_pad.js +567 -114
- package/src/json_view_helpers.js +56 -1
- package/src/json_view_helpers.test.js +43 -0
- package/src/yui_icons.css +12 -0
package/README.md
CHANGED
|
@@ -1918,15 +1918,29 @@ frontend view it returns `null` when the window is already open, so the host
|
|
|
1918
1918
|
toggles with it, and it registers `C_YUI_JSON_PAD` (and the `C_YUI_JSON` it
|
|
1919
1919
|
hosts) itself when the app did not.
|
|
1920
1920
|
|
|
1921
|
-
- A **paste anywhere in
|
|
1921
|
+
- A **paste anywhere in a pane** replaces its document and shows it at once;
|
|
1922
1922
|
**view** (or Ctrl+Enter) reads the text area as typed; **clear** empties it.
|
|
1923
1923
|
- Text that is not JSON leaves the last document on screen and says so under
|
|
1924
1924
|
the text area, with the parser's reason.
|
|
1925
|
+
- **Two panes.** *Second json* opens a second pane beside the first (stacked
|
|
1926
|
+
when the pad is narrower than 40rem), and *compare* puts the differences of
|
|
1927
|
+
the two documents in place of the two viewers: one row per id of the flat
|
|
1928
|
+
form (`json2flat`, `json_diff_rows()` in `json_view_helpers.js`), tagged
|
|
1929
|
+
added / removed / changed, sorted by id. Edit either text area and view it
|
|
1930
|
+
again: the differences follow.
|
|
1931
|
+
- **What was pasted is kept**: both texts and the layout, in `localStorage`
|
|
1932
|
+
under the pad's `storage_key` attribute (default `yui_json_pad`; empty keeps
|
|
1933
|
+
nothing), so the next pad opens as the last one was left. A text too big for
|
|
1934
|
+
the browser's quota is not kept, and the pad says so in its toolbar.
|
|
1925
1935
|
- A `__collapsed__` sentinel in a pasted dump is answered with
|
|
1926
1936
|
`EV_SUBTREE_ERROR`: the source truncated it, and a pad has no backend to ask.
|
|
1927
1937
|
|
|
1928
1938
|
Consumer i18n keys: `json viewer`, `paste json here`, `invalid json`,
|
|
1929
|
-
`collapsed in the source`
|
|
1939
|
+
`collapsed in the source`, `first json`, `second json`, `compare`, `added`,
|
|
1940
|
+
`removed`, `changed`, `path`, `no differences`, `compare needs two json`,
|
|
1941
|
+
`cannot compare`, `json not kept` (plus `view` and `clear`, which every app
|
|
1942
|
+
has). `compare`, `view` and `clear` reach `t()` as variables, so a consumer's
|
|
1943
|
+
`validate-locales` does not see them.
|
|
1930
1944
|
|
|
1931
1945
|
### Frontend view — `setup_frontend_view`
|
|
1932
1946
|
|