@kgdiff/viewer 0.4.0 → 0.6.0
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 +43 -16
- package/custom-elements.json +2347 -0
- package/dist/bind.d.ts +41 -0
- package/dist/bind.d.ts.map +1 -0
- package/dist/bind.js +47 -0
- package/dist/bind.js.map +1 -0
- package/dist/context.d.ts +42 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/context.js +87 -0
- package/dist/context.js.map +1 -0
- package/dist/controller.d.ts +26 -237
- package/dist/controller.d.ts.map +1 -1
- package/dist/controller.js +33 -1484
- package/dist/controller.js.map +1 -1
- package/dist/dom.d.ts +10 -0
- package/dist/dom.d.ts.map +1 -1
- package/dist/dom.js +29 -0
- package/dist/dom.js.map +1 -1
- package/dist/element.d.ts +51 -42
- package/dist/element.d.ts.map +1 -1
- package/dist/element.js +381 -602
- package/dist/element.js.map +1 -1
- package/dist/elements/actions.d.ts +27 -0
- package/dist/elements/actions.d.ts.map +1 -0
- package/dist/elements/actions.js +81 -0
- package/dist/elements/actions.js.map +1 -0
- package/dist/elements/bound.d.ts +63 -0
- package/dist/elements/bound.d.ts.map +1 -0
- package/dist/elements/bound.js +213 -0
- package/dist/elements/bound.js.map +1 -0
- package/dist/elements/change-detail.d.ts +25 -0
- package/dist/elements/change-detail.d.ts.map +1 -0
- package/dist/elements/change-detail.js +19 -0
- package/dist/elements/change-detail.js.map +1 -0
- package/dist/elements/change-list.d.ts +27 -0
- package/dist/elements/change-list.d.ts.map +1 -0
- package/dist/elements/change-list.js +29 -0
- package/dist/elements/change-list.js.map +1 -0
- package/dist/elements/filters.d.ts +25 -0
- package/dist/elements/filters.d.ts.map +1 -0
- package/dist/elements/filters.js +19 -0
- package/dist/elements/filters.js.map +1 -0
- package/dist/elements/legend.d.ts +40 -0
- package/dist/elements/legend.d.ts.map +1 -0
- package/dist/elements/legend.js +87 -0
- package/dist/elements/legend.js.map +1 -0
- package/dist/elements/minimap.d.ts +38 -0
- package/dist/elements/minimap.d.ts.map +1 -0
- package/dist/elements/minimap.js +59 -0
- package/dist/elements/minimap.js.map +1 -0
- package/dist/elements/root.d.ts +40 -0
- package/dist/elements/root.d.ts.map +1 -0
- package/dist/elements/root.js +67 -0
- package/dist/elements/root.js.map +1 -0
- package/dist/elements/search.d.ts +29 -0
- package/dist/elements/search.d.ts.map +1 -0
- package/dist/elements/search.js +23 -0
- package/dist/elements/search.js.map +1 -0
- package/dist/elements/stage-context.d.ts +31 -0
- package/dist/elements/stage-context.d.ts.map +1 -0
- package/dist/elements/stage-context.js +4 -0
- package/dist/elements/stage-context.js.map +1 -0
- package/dist/elements/stage.d.ts +65 -0
- package/dist/elements/stage.d.ts.map +1 -0
- package/dist/elements/stage.js +259 -0
- package/dist/elements/stage.js.map +1 -0
- package/dist/elements/title.d.ts +25 -0
- package/dist/elements/title.d.ts.map +1 -0
- package/dist/elements/title.js +19 -0
- package/dist/elements/title.js.map +1 -0
- package/dist/elements/transport.d.ts +29 -0
- package/dist/elements/transport.d.ts.map +1 -0
- package/dist/elements/transport.js +24 -0
- package/dist/elements/transport.js.map +1 -0
- package/dist/elements/view-bound.d.ts +39 -0
- package/dist/elements/view-bound.d.ts.map +1 -0
- package/dist/elements/view-bound.js +88 -0
- package/dist/elements/view-bound.js.map +1 -0
- package/dist/elements/view-dock.d.ts +28 -0
- package/dist/elements/view-dock.d.ts.map +1 -0
- package/dist/elements/view-dock.js +28 -0
- package/dist/elements/view-dock.js.map +1 -0
- package/dist/elements/zoom.d.ts +28 -0
- package/dist/elements/zoom.d.ts.map +1 -0
- package/dist/elements/zoom.js +22 -0
- package/dist/elements/zoom.js.map +1 -0
- package/dist/i18n.d.ts +10 -0
- package/dist/i18n.d.ts.map +1 -1
- package/dist/i18n.js +20 -0
- package/dist/i18n.js.map +1 -1
- package/dist/icons.d.ts +1 -0
- package/dist/icons.d.ts.map +1 -1
- package/dist/icons.js +1 -0
- package/dist/icons.js.map +1 -1
- package/dist/index.d.ts +331 -36
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -0
- package/dist/index.js.map +1 -1
- package/dist/keyboard.d.ts +39 -2
- package/dist/keyboard.d.ts.map +1 -1
- package/dist/keyboard.js +145 -62
- package/dist/keyboard.js.map +1 -1
- package/dist/layout-store.d.ts +26 -0
- package/dist/layout-store.d.ts.map +1 -0
- package/dist/layout-store.js +46 -0
- package/dist/layout-store.js.map +1 -0
- package/dist/panel-levels.d.ts +18 -0
- package/dist/panel-levels.d.ts.map +1 -0
- package/dist/panel-levels.js +41 -0
- package/dist/panel-levels.js.map +1 -0
- package/dist/panels.d.ts +28 -0
- package/dist/panels.d.ts.map +1 -0
- package/dist/panels.js +73 -0
- package/dist/panels.js.map +1 -0
- package/dist/pipeline.d.ts.map +1 -1
- package/dist/pipeline.js +3 -2
- package/dist/pipeline.js.map +1 -1
- package/dist/prefs.d.ts +5 -2
- package/dist/prefs.d.ts.map +1 -1
- package/dist/prefs.js +12 -3
- package/dist/prefs.js.map +1 -1
- package/dist/react.d.ts +460 -0
- package/dist/react.d.ts.map +1 -0
- package/dist/react.js +2 -0
- package/dist/react.js.map +1 -0
- package/dist/root-element.d.ts +122 -0
- package/dist/root-element.d.ts.map +1 -0
- package/dist/root-element.js +541 -0
- package/dist/root-element.js.map +1 -0
- package/dist/root.d.ts +54 -0
- package/dist/root.d.ts.map +1 -0
- package/dist/root.js +288 -0
- package/dist/root.js.map +1 -0
- package/dist/schedule.d.ts +22 -0
- package/dist/schedule.d.ts.map +1 -0
- package/dist/schedule.js +41 -0
- package/dist/schedule.js.map +1 -0
- package/dist/session.d.ts +269 -0
- package/dist/session.d.ts.map +1 -0
- package/dist/session.js +1237 -0
- package/dist/session.js.map +1 -0
- package/dist/standalone/kgdiff-viewer-compute.js +1 -1
- package/dist/standalone/kgdiff-viewer.js +4 -4
- package/dist/styles.d.ts +17 -6
- package/dist/styles.d.ts.map +1 -1
- package/dist/styles.js +367 -258
- package/dist/styles.js.map +1 -1
- package/dist/theme.d.ts +32 -0
- package/dist/theme.d.ts.map +1 -0
- package/dist/theme.js +152 -0
- package/dist/theme.js.map +1 -0
- package/dist/topics.d.ts +8 -0
- package/dist/topics.d.ts.map +1 -0
- package/dist/topics.js +18 -0
- package/dist/topics.js.map +1 -0
- package/dist/ui/change-list.d.ts +18 -0
- package/dist/ui/change-list.d.ts.map +1 -0
- package/dist/ui/change-list.js +331 -0
- package/dist/ui/change-list.js.map +1 -0
- package/dist/ui/context.d.ts +34 -7
- package/dist/ui/context.d.ts.map +1 -1
- package/dist/ui/context.js.map +1 -1
- package/dist/ui/filters.d.ts +9 -0
- package/dist/ui/filters.d.ts.map +1 -0
- package/dist/ui/filters.js +68 -0
- package/dist/ui/filters.js.map +1 -0
- package/dist/ui/header.d.ts +41 -3
- package/dist/ui/header.d.ts.map +1 -1
- package/dist/ui/header.js +101 -36
- package/dist/ui/header.js.map +1 -1
- package/dist/ui/legend.d.ts +15 -0
- package/dist/ui/legend.d.ts.map +1 -0
- package/dist/ui/legend.js +68 -0
- package/dist/ui/legend.js.map +1 -0
- package/dist/ui/popovers.d.ts +3 -1
- package/dist/ui/popovers.d.ts.map +1 -1
- package/dist/ui/popovers.js +62 -23
- package/dist/ui/popovers.js.map +1 -1
- package/dist/ui/search.d.ts +13 -0
- package/dist/ui/search.d.ts.map +1 -0
- package/dist/ui/search.js +192 -0
- package/dist/ui/search.js.map +1 -0
- package/dist/ui/sidebar.d.ts +32 -17
- package/dist/ui/sidebar.d.ts.map +1 -1
- package/dist/ui/sidebar.js +327 -519
- package/dist/ui/sidebar.js.map +1 -1
- package/dist/ui/stage.d.ts +56 -1
- package/dist/ui/stage.d.ts.map +1 -1
- package/dist/ui/stage.js +244 -256
- package/dist/ui/stage.js.map +1 -1
- package/dist/ui/swatch.js +1 -1
- package/dist/ui/swatch.js.map +1 -1
- package/dist/ui/transport.d.ts +12 -0
- package/dist/ui/transport.d.ts.map +1 -0
- package/dist/ui/transport.js +198 -0
- package/dist/ui/transport.js.map +1 -0
- package/dist/ui/zoom.d.ts +15 -0
- package/dist/ui/zoom.d.ts.map +1 -0
- package/dist/ui/zoom.js +30 -0
- package/dist/ui/zoom.js.map +1 -0
- package/dist/view.d.ts +94 -0
- package/dist/view.d.ts.map +1 -0
- package/dist/view.js +441 -0
- package/dist/view.js.map +1 -0
- package/package.json +95 -12
- package/src/bind.ts +80 -0
- package/src/context.ts +106 -0
- package/src/controller.ts +52 -1630
- package/src/dom.ts +30 -0
- package/src/element.ts +386 -619
- package/src/elements/actions.ts +94 -0
- package/src/elements/bound.ts +247 -0
- package/src/elements/change-detail.ts +34 -0
- package/src/elements/change-list.ts +51 -0
- package/src/elements/filters.ts +34 -0
- package/src/elements/legend.ts +103 -0
- package/src/elements/minimap.ts +75 -0
- package/src/elements/root.ts +86 -0
- package/src/elements/search.ts +38 -0
- package/src/elements/stage-context.ts +34 -0
- package/src/elements/stage.ts +285 -0
- package/src/elements/title.ts +34 -0
- package/src/elements/transport.ts +39 -0
- package/src/elements/view-bound.ts +118 -0
- package/src/elements/view-dock.ts +43 -0
- package/src/elements/zoom.ts +38 -0
- package/src/i18n.ts +20 -0
- package/src/icons.ts +1 -0
- package/src/index.ts +350 -35
- package/src/keyboard.ts +188 -61
- package/src/layout-store.ts +71 -0
- package/src/panel-levels.ts +53 -0
- package/src/panels.ts +81 -0
- package/src/pipeline.ts +4 -1
- package/src/prefs.ts +12 -4
- package/src/react.ts +459 -0
- package/src/root-element.ts +624 -0
- package/src/root.ts +335 -0
- package/src/schedule.ts +43 -0
- package/src/session.ts +1375 -0
- package/src/styles.ts +396 -263
- package/src/theme.ts +170 -0
- package/src/topics.ts +37 -0
- package/src/ui/change-list.ts +405 -0
- package/src/ui/context.ts +36 -7
- package/src/ui/filters.ts +79 -0
- package/src/ui/header.ts +129 -58
- package/src/ui/legend.ts +112 -0
- package/src/ui/popovers.ts +68 -25
- package/src/ui/search.ts +225 -0
- package/src/ui/sidebar.ts +362 -639
- package/src/ui/stage.ts +267 -331
- package/src/ui/swatch.ts +1 -1
- package/src/ui/transport.ts +240 -0
- package/src/ui/zoom.ts +45 -0
- package/src/view.ts +516 -0
- package/vscode.html-custom-data.json +726 -0
package/dist/prefs.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { normalizeLocale } from './i18n.js';
|
|
2
|
+
import { toPanels } from './panels.js';
|
|
2
3
|
const MODES = ['overlay', 'swipe', 'replay'];
|
|
3
4
|
const SCOPES = ['all', 'changes'];
|
|
4
5
|
const THEMES = ['auto', 'light', 'dark'];
|
|
@@ -39,8 +40,11 @@ export function toDelay(value) {
|
|
|
39
40
|
const n = typeof value === 'string' && value.trim() !== '' ? Number(value) : value;
|
|
40
41
|
return typeof n === 'number' && Number.isFinite(n) && n >= 0 ? n : null;
|
|
41
42
|
}
|
|
42
|
-
/**
|
|
43
|
-
|
|
43
|
+
/**
|
|
44
|
+
* Keep only the valid fields of a report's `view`, warning about the rest (once per payload:
|
|
45
|
+
* `quiet` for a second read of the same view).
|
|
46
|
+
*/
|
|
47
|
+
export function sanitizeView(view, quiet = false) {
|
|
44
48
|
if (typeof view !== 'object' || view === null)
|
|
45
49
|
return undefined;
|
|
46
50
|
const v = view;
|
|
@@ -50,8 +54,12 @@ export function sanitizeView(view) {
|
|
|
50
54
|
const theme = toTheme(v.theme);
|
|
51
55
|
const palette = toPalette(v.palette);
|
|
52
56
|
const locale = toLocale(v.locale);
|
|
57
|
+
const read = v.panels === undefined ? null : toPanels(v.panels);
|
|
58
|
+
const panels = read && Object.keys(read.panels).length > 0 ? read.panels : null;
|
|
53
59
|
const dropped = ['mode', 'scope', 'theme', 'palette', 'locale'].filter((k) => v[k] !== undefined && { mode, scope, theme, palette, locale }[k] === null);
|
|
54
|
-
if (
|
|
60
|
+
if (read && read.invalid.length > 0)
|
|
61
|
+
dropped.push(`panels (${read.invalid.join(' ')})`);
|
|
62
|
+
if (dropped.length > 0 && !quiet && typeof console !== 'undefined') {
|
|
55
63
|
console.warn(`[kgdiff] ignoring invalid report view preferences: ${dropped.join(', ')}`);
|
|
56
64
|
}
|
|
57
65
|
return {
|
|
@@ -60,6 +68,7 @@ export function sanitizeView(view) {
|
|
|
60
68
|
...(theme ? { theme } : {}),
|
|
61
69
|
...(palette ? { palette } : {}),
|
|
62
70
|
...(locale ? { locale } : {}),
|
|
71
|
+
...(panels ? { panels } : {}),
|
|
63
72
|
};
|
|
64
73
|
}
|
|
65
74
|
//# sourceMappingURL=prefs.js.map
|
package/dist/prefs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prefs.js","sourceRoot":"","sources":["../src/prefs.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"prefs.js","sourceRoot":"","sources":["../src/prefs.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAS5C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,MAAM,KAAK,GAA0B,CAAC,SAAS,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;AACpE,MAAM,MAAM,GAA2B,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;AAC1D,MAAM,MAAM,GAA+B,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;AACrE,MAAM,QAAQ,GAA2B,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;AACnE,MAAM,OAAO,GAA4B,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1D,MAAM,OAAO,GAA4B,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAE1E,wEAAwE;AACxE,MAAM,CAAC,MAAM,kBAAkB,GAAG,IAAI,CAAC;AAEvC,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC;AAExC,MAAM,UAAU,MAAM,CAAC,KAAc;IACnC,OAAO,K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MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAC9B,CAAC;AACJ,CAAC"}
|
package/dist/react.d.ts
ADDED
|
@@ -0,0 +1,460 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* React 19's JSX types for the viewer's elements (RFC 0001 §8). Generated from
|
|
3
|
+
* custom-elements.json by scripts/manifest.ts: do not edit; run
|
|
4
|
+
* `pnpm --filter @kgdiff/viewer manifest` after changing the sources.
|
|
5
|
+
*
|
|
6
|
+
* A TypeScript project with React 19 enables them once, anywhere:
|
|
7
|
+
*
|
|
8
|
+
* import type {} from '@kgdiff/viewer/react';
|
|
9
|
+
*
|
|
10
|
+
* Props are the elements' properties (React 19 sets a prop as the property the element has,
|
|
11
|
+
* and as an attribute otherwise), their attributes without a property, and the roots' events
|
|
12
|
+
* as React 19 listens to them: `onkgdiff-select`. Methods go through a `ref`.
|
|
13
|
+
*
|
|
14
|
+
* @experimental In 0.6; stable from 0.7 (RFC 0001, decision 7), as the elements it describes.
|
|
15
|
+
*/
|
|
16
|
+
import type { HTMLAttributes, Ref } from 'react';
|
|
17
|
+
import type { KgdiffEventMap } from './index.js';
|
|
18
|
+
/** The element of a tag: a prop's type is its property's. */
|
|
19
|
+
type Tag<T extends keyof HTMLElementTagNameMap> = HTMLElementTagNameMap[T];
|
|
20
|
+
/** What every element takes: React's HTML attributes and a ref to the element. */
|
|
21
|
+
type Props<T extends keyof HTMLElementTagNameMap> = HTMLAttributes<Tag<T>> & {
|
|
22
|
+
ref?: Ref<Tag<T>>;
|
|
23
|
+
};
|
|
24
|
+
declare module 'react' {
|
|
25
|
+
namespace JSX {
|
|
26
|
+
interface IntrinsicElements {
|
|
27
|
+
/**
|
|
28
|
+
* `<kgdiff-viewer>`:
|
|
29
|
+
* https://github.com/iiwish/kgdiff/blob/main/docs/viewer-elements.md#kgdiff-viewer
|
|
30
|
+
*/
|
|
31
|
+
'kgdiff-viewer': Props<'kgdiff-viewer'> & {
|
|
32
|
+
/**
|
|
33
|
+
* Reflected to the `chrome` attribute. `none` shows the graph alone: no title, actions,
|
|
34
|
+
* view dock (with the step caption and playback bar), change list, zoom buttons, minimap or
|
|
35
|
+
* legend card; the hover tooltip and a one-line legend stay. Clicks and keyboard shortcuts
|
|
36
|
+
* do nothing, the minimum height drops from 420px to 120px, and the view stays fitted: when
|
|
37
|
+
* the canvas is resized (unless the user panned or zoomed since) and at the start of every
|
|
38
|
+
* loop. Labels are never cut at the edge: one pushed from its spot by a neighbour moves
|
|
39
|
+
* inside or is left out. Default `full`.
|
|
40
|
+
*/
|
|
41
|
+
chrome?: Tag<'kgdiff-viewer'>['chrome'];
|
|
42
|
+
/**
|
|
43
|
+
* Reflected to the `legend` attribute: `full` (the card), `mini` (one line: the families
|
|
44
|
+
* this diff has, then unchanged), `none`. Default `auto`: `full`, or `mini` with
|
|
45
|
+
* `chrome="none"`.
|
|
46
|
+
*/
|
|
47
|
+
legend?: Tag<'kgdiff-viewer'>['legend'];
|
|
48
|
+
/**
|
|
49
|
+
* The page's declaration of panel states, reflected to the `panels` attribute: a string
|
|
50
|
+
* (`"detail:collapsed minimap:hidden"`) or an object (`{ detail: 'collapsed' }`); reading
|
|
51
|
+
* it gives the object. Regions not named keep their state; entries that name no region or
|
|
52
|
+
* state are ignored with a warning. It wins over what the user chose before (remembered)
|
|
53
|
+
* and a report's `view.panels`; the user can still open and close collapsed regions, and
|
|
54
|
+
* declaring the same again keeps what they did. The presets `sidebar="closed"` (list,
|
|
55
|
+
* detail, search and filters collapsed), `header="compact"` (title hidden) and
|
|
56
|
+
* `chrome="none"` (everything but the canvas and the legend hidden) are panel states too;
|
|
57
|
+
* `panels` wins over them for the regions it names. The states every region has now are in
|
|
58
|
+
* `layout`.
|
|
59
|
+
*/
|
|
60
|
+
panels?: Tag<'kgdiff-viewer'>['panels'] | string;
|
|
61
|
+
/**
|
|
62
|
+
* Reflected to the `persist` attribute. `local` (the default): the layout remembers the
|
|
63
|
+
* user's panel states, sizes, theme, palette and language in `localStorage` (under
|
|
64
|
+
* `persistKey`, shared by the viewers of the origin with the same key). `none`: it
|
|
65
|
+
* remembers nothing.
|
|
66
|
+
*/
|
|
67
|
+
persist?: Tag<'kgdiff-viewer'>['persist'];
|
|
68
|
+
/**
|
|
69
|
+
* Reflected to the `persist-key` attribute: the `localStorage` key the layout remembers
|
|
70
|
+
* under. Viewers with the same key share what they remember; give each app on a shared
|
|
71
|
+
* origin (a GitHub Pages user site, say) a key of its own. Default `kgdiff:viewer`.
|
|
72
|
+
*/
|
|
73
|
+
persistKey?: Tag<'kgdiff-viewer'>['persistKey'];
|
|
74
|
+
/**
|
|
75
|
+
* Reflected to the `mode` attribute. Default `overlay`.
|
|
76
|
+
*/
|
|
77
|
+
mode?: Tag<'kgdiff-viewer'>['mode'];
|
|
78
|
+
/**
|
|
79
|
+
* Reflected to the `scope` attribute. Default `all` (`changes` for large graphs). Fixed to
|
|
80
|
+
* `changes` when the layout covers only the changes.
|
|
81
|
+
*/
|
|
82
|
+
scope?: Tag<'kgdiff-viewer'>['scope'];
|
|
83
|
+
/**
|
|
84
|
+
* Reflected to the `theme` attribute. Default `auto`.
|
|
85
|
+
*/
|
|
86
|
+
theme?: Tag<'kgdiff-viewer'>['theme'];
|
|
87
|
+
/**
|
|
88
|
+
* Reflected to the `palette` attribute. Default `default`.
|
|
89
|
+
*/
|
|
90
|
+
palette?: Tag<'kgdiff-viewer'>['palette'];
|
|
91
|
+
/**
|
|
92
|
+
* Reflected to the `locale` attribute. Default from `navigator.language`.
|
|
93
|
+
*/
|
|
94
|
+
locale?: Tag<'kgdiff-viewer'>['locale'];
|
|
95
|
+
/**
|
|
96
|
+
* Reflected to the boolean `loop` attribute. In `replay` mode the replay plays by itself
|
|
97
|
+
* and starts again `loopDelay` ms after it ends. `pause()` stops it until `play()`. Default
|
|
98
|
+
* false.
|
|
99
|
+
*/
|
|
100
|
+
loop?: Tag<'kgdiff-viewer'>['loop'];
|
|
101
|
+
/**
|
|
102
|
+
* Reflected to `loop-delay`: ms between the end of a looping replay and its restart.
|
|
103
|
+
* Default 1200.
|
|
104
|
+
*/
|
|
105
|
+
loopDelay?: Tag<'kgdiff-viewer'>['loopDelay'];
|
|
106
|
+
/**
|
|
107
|
+
* With `loop`, the replay pauses while the pointer is over the graph and continues when it
|
|
108
|
+
* leaves (a mouse or pen; not touch). Reflected as `pause-on-hover="false"` when off.
|
|
109
|
+
* Default true.
|
|
110
|
+
*/
|
|
111
|
+
pauseOnHover?: Tag<'kgdiff-viewer'>['pauseOnHover'];
|
|
112
|
+
/**
|
|
113
|
+
* Reflected to the `shortcuts` attribute: where the keyboard shortcuts apply. `scoped` (the
|
|
114
|
+
* default): while focus is inside the root, or in an element bound to it with `for` (those
|
|
115
|
+
* forward their keys). `global`: also when nothing on the page has focus (for full-page
|
|
116
|
+
* viewers such as HTML reports), for the first such root, except the keys pages scroll with
|
|
117
|
+
* (arrows, Home / End, Page Up / Down, Space); the boolean `global-shortcuts` attribute is
|
|
118
|
+
* an alias. `none`: no shortcuts (a focused change list keeps its arrow keys, Home / End
|
|
119
|
+
* and Enter).
|
|
120
|
+
*/
|
|
121
|
+
shortcuts?: Tag<'kgdiff-viewer'>['shortcuts'];
|
|
122
|
+
/**
|
|
123
|
+
* **Experimental:** The shortcut names (`ShortcutName`) are new in 0.6. Single keys of the
|
|
124
|
+
* keyboard map bound to another shortcut, or unbound with `null`: `{ x: null, r: 'review'
|
|
125
|
+
* }`. The `keymap` attribute takes the same as text, `"x:none r:review"` (`Space` names the
|
|
126
|
+
* space bar). Keys are `KeyboardEvent.key` values; a letter stands for both its cases
|
|
127
|
+
* unless the other case is named too; keys not named keep the default map; entries naming
|
|
128
|
+
* no shortcut are ignored with a warning.
|
|
129
|
+
*/
|
|
130
|
+
keymap?: Tag<'kgdiff-viewer'>['keymap'] | string;
|
|
131
|
+
/**
|
|
132
|
+
* Set a precomputed report (no diff / layout work in the browser).
|
|
133
|
+
*/
|
|
134
|
+
payload?: Tag<'kgdiff-viewer'>['payload'];
|
|
135
|
+
/**
|
|
136
|
+
* Keep the selection, mode and scope in the page's URL hash
|
|
137
|
+
* (`#kgdiff=hunk:<id>;mode:<mode>;scope:<scope>`) and follow it: deep links.
|
|
138
|
+
*/
|
|
139
|
+
'sync-hash'?: boolean;
|
|
140
|
+
/**
|
|
141
|
+
* A preset: `closed` starts with the sidebar folded (`\` and the sidebar button open it),
|
|
142
|
+
* `open` with its four regions open. Reflects the sidebar's state once the user toggles it.
|
|
143
|
+
*/
|
|
144
|
+
sidebar?: 'open' | 'closed';
|
|
145
|
+
/**
|
|
146
|
+
* A preset: `compact` leaves the brand and the compared names out of the canvas, for hosts
|
|
147
|
+
* that show their own (`panels="title:hidden"`).
|
|
148
|
+
*/
|
|
149
|
+
header?: 'compact';
|
|
150
|
+
/**
|
|
151
|
+
* The same as `shortcuts="global"`.
|
|
152
|
+
*/
|
|
153
|
+
'global-shortcuts'?: boolean;
|
|
154
|
+
/**
|
|
155
|
+
* A diff is shown, from `load()` or a `payload`; `stats` counts its nodes, edges and
|
|
156
|
+
* changes.
|
|
157
|
+
*/
|
|
158
|
+
'onkgdiff-ready'?: (event: KgdiffEventMap['kgdiff-ready']) => void;
|
|
159
|
+
/**
|
|
160
|
+
* The selection changed: a change (`hunk`, its id, with the node chosen in it if any), a
|
|
161
|
+
* node alone (`hunk` null), or nothing (both null).
|
|
162
|
+
*/
|
|
163
|
+
'onkgdiff-select'?: (event: KgdiffEventMap['kgdiff-select']) => void;
|
|
164
|
+
/**
|
|
165
|
+
* The mode or the scope changed, by the user, a key or the host.
|
|
166
|
+
*/
|
|
167
|
+
'onkgdiff-mode'?: (event: KgdiffEventMap['kgdiff-mode']) => void;
|
|
168
|
+
/**
|
|
169
|
+
* A change was marked reviewed, or not; `progress` is the review state after it.
|
|
170
|
+
*/
|
|
171
|
+
'onkgdiff-review'?: (event: KgdiffEventMap['kgdiff-review']) => void;
|
|
172
|
+
/**
|
|
173
|
+
* Loading or showing a diff failed; `error` is a `KgdiffError` for bad input.
|
|
174
|
+
*/
|
|
175
|
+
'onkgdiff-error'?: (event: KgdiffEventMap['kgdiff-error']) => void;
|
|
176
|
+
/**
|
|
177
|
+
* Playback reached the end of the replay (not fired for seeking or stepping there). `loop`:
|
|
178
|
+
* it starts again after `loopDelay` ms; set `loop = false` or call `pause()` to stop it.
|
|
179
|
+
*/
|
|
180
|
+
'onkgdiff-replay-end'?: (event: KgdiffEventMap['kgdiff-replay-end']) => void;
|
|
181
|
+
/**
|
|
182
|
+
* The default layout changed: a panel opened, collapsed or was hidden, or a size changed
|
|
183
|
+
* (once a drag ends). `source`: the user did it in the viewer, or the host (attributes,
|
|
184
|
+
* properties, a report's `view.panels`).
|
|
185
|
+
*/
|
|
186
|
+
'onkgdiff-layout'?: (event: KgdiffEventMap['kgdiff-layout']) => void;
|
|
187
|
+
};
|
|
188
|
+
/**
|
|
189
|
+
* **Experimental:** In 0.6; stable from 0.7 (RFC 0001, decision 7). `<kgdiff-root>`:
|
|
190
|
+
* https://github.com/iiwish/kgdiff/blob/main/docs/viewer-elements.md#kgdiff-root
|
|
191
|
+
*/
|
|
192
|
+
'kgdiff-root': Props<'kgdiff-root'> & {
|
|
193
|
+
/**
|
|
194
|
+
* Reflected to the `mode` attribute. Default `overlay`.
|
|
195
|
+
*/
|
|
196
|
+
mode?: Tag<'kgdiff-root'>['mode'];
|
|
197
|
+
/**
|
|
198
|
+
* Reflected to the `scope` attribute. Default `all` (`changes` for large graphs). Fixed to
|
|
199
|
+
* `changes` when the layout covers only the changes.
|
|
200
|
+
*/
|
|
201
|
+
scope?: Tag<'kgdiff-root'>['scope'];
|
|
202
|
+
/**
|
|
203
|
+
* Reflected to the `theme` attribute. Default `auto`.
|
|
204
|
+
*/
|
|
205
|
+
theme?: Tag<'kgdiff-root'>['theme'];
|
|
206
|
+
/**
|
|
207
|
+
* Reflected to the `palette` attribute. Default `default`.
|
|
208
|
+
*/
|
|
209
|
+
palette?: Tag<'kgdiff-root'>['palette'];
|
|
210
|
+
/**
|
|
211
|
+
* Reflected to the `locale` attribute. Default from `navigator.language`.
|
|
212
|
+
*/
|
|
213
|
+
locale?: Tag<'kgdiff-root'>['locale'];
|
|
214
|
+
/**
|
|
215
|
+
* Reflected to the boolean `loop` attribute. In `replay` mode the replay plays by itself
|
|
216
|
+
* and starts again `loopDelay` ms after it ends. `pause()` stops it until `play()`. Default
|
|
217
|
+
* false.
|
|
218
|
+
*/
|
|
219
|
+
loop?: Tag<'kgdiff-root'>['loop'];
|
|
220
|
+
/**
|
|
221
|
+
* Reflected to `loop-delay`: ms between the end of a looping replay and its restart.
|
|
222
|
+
* Default 1200.
|
|
223
|
+
*/
|
|
224
|
+
loopDelay?: Tag<'kgdiff-root'>['loopDelay'];
|
|
225
|
+
/**
|
|
226
|
+
* With `loop`, the replay pauses while the pointer is over the graph and continues when it
|
|
227
|
+
* leaves (a mouse or pen; not touch). Reflected as `pause-on-hover="false"` when off.
|
|
228
|
+
* Default true.
|
|
229
|
+
*/
|
|
230
|
+
pauseOnHover?: Tag<'kgdiff-root'>['pauseOnHover'];
|
|
231
|
+
/**
|
|
232
|
+
* Reflected to the `shortcuts` attribute: where the keyboard shortcuts apply. `scoped` (the
|
|
233
|
+
* default): while focus is inside the root, or in an element bound to it with `for` (those
|
|
234
|
+
* forward their keys). `global`: also when nothing on the page has focus (for full-page
|
|
235
|
+
* viewers such as HTML reports), for the first such root, except the keys pages scroll with
|
|
236
|
+
* (arrows, Home / End, Page Up / Down, Space); the boolean `global-shortcuts` attribute is
|
|
237
|
+
* an alias. `none`: no shortcuts (a focused change list keeps its arrow keys, Home / End
|
|
238
|
+
* and Enter).
|
|
239
|
+
*/
|
|
240
|
+
shortcuts?: Tag<'kgdiff-root'>['shortcuts'];
|
|
241
|
+
/**
|
|
242
|
+
* **Experimental:** The shortcut names (`ShortcutName`) are new in 0.6. Single keys of the
|
|
243
|
+
* keyboard map bound to another shortcut, or unbound with `null`: `{ x: null, r: 'review'
|
|
244
|
+
* }`. The `keymap` attribute takes the same as text, `"x:none r:review"` (`Space` names the
|
|
245
|
+
* space bar). Keys are `KeyboardEvent.key` values; a letter stands for both its cases
|
|
246
|
+
* unless the other case is named too; keys not named keep the default map; entries naming
|
|
247
|
+
* no shortcut are ignored with a warning.
|
|
248
|
+
*/
|
|
249
|
+
keymap?: Tag<'kgdiff-root'>['keymap'] | string;
|
|
250
|
+
/**
|
|
251
|
+
* Set a precomputed report (no diff / layout work in the browser).
|
|
252
|
+
*/
|
|
253
|
+
payload?: Tag<'kgdiff-root'>['payload'];
|
|
254
|
+
/**
|
|
255
|
+
* Keep the selection, mode and scope in the page's URL hash
|
|
256
|
+
* (`#kgdiff=hunk:<id>;mode:<mode>;scope:<scope>`) and follow it: deep links.
|
|
257
|
+
*/
|
|
258
|
+
'sync-hash'?: boolean;
|
|
259
|
+
/**
|
|
260
|
+
* The same as `shortcuts="global"`.
|
|
261
|
+
*/
|
|
262
|
+
'global-shortcuts'?: boolean;
|
|
263
|
+
/**
|
|
264
|
+
* A diff is shown, from `load()` or a `payload`; `stats` counts its nodes, edges and
|
|
265
|
+
* changes.
|
|
266
|
+
*/
|
|
267
|
+
'onkgdiff-ready'?: (event: KgdiffEventMap['kgdiff-ready']) => void;
|
|
268
|
+
/**
|
|
269
|
+
* The selection changed: a change (`hunk`, its id, with the node chosen in it if any), a
|
|
270
|
+
* node alone (`hunk` null), or nothing (both null).
|
|
271
|
+
*/
|
|
272
|
+
'onkgdiff-select'?: (event: KgdiffEventMap['kgdiff-select']) => void;
|
|
273
|
+
/**
|
|
274
|
+
* The mode or the scope changed, by the user, a key or the host.
|
|
275
|
+
*/
|
|
276
|
+
'onkgdiff-mode'?: (event: KgdiffEventMap['kgdiff-mode']) => void;
|
|
277
|
+
/**
|
|
278
|
+
* A change was marked reviewed, or not; `progress` is the review state after it.
|
|
279
|
+
*/
|
|
280
|
+
'onkgdiff-review'?: (event: KgdiffEventMap['kgdiff-review']) => void;
|
|
281
|
+
/**
|
|
282
|
+
* Loading or showing a diff failed; `error` is a `KgdiffError` for bad input.
|
|
283
|
+
*/
|
|
284
|
+
'onkgdiff-error'?: (event: KgdiffEventMap['kgdiff-error']) => void;
|
|
285
|
+
/**
|
|
286
|
+
* Playback reached the end of the replay (not fired for seeking or stepping there). `loop`:
|
|
287
|
+
* it starts again after `loopDelay` ms; set `loop = false` or call `pause()` to stop it.
|
|
288
|
+
*/
|
|
289
|
+
'onkgdiff-replay-end'?: (event: KgdiffEventMap['kgdiff-replay-end']) => void;
|
|
290
|
+
};
|
|
291
|
+
/**
|
|
292
|
+
* **Experimental:** In 0.6; stable from 0.7 (RFC 0001, decision 7). `<kgdiff-stage>`:
|
|
293
|
+
* https://github.com/iiwish/kgdiff/blob/main/docs/viewer-elements.md#kgdiff-stage
|
|
294
|
+
*/
|
|
295
|
+
'kgdiff-stage': Props<'kgdiff-stage'> & {
|
|
296
|
+
/**
|
|
297
|
+
* The states of the built-in chrome (`dock`, `transport`, `legend`, `zoom`, `minimap`),
|
|
298
|
+
* reflected to the `panels` attribute, in the syntax of `<kgdiff-viewer>`'s `panels`:
|
|
299
|
+
* `"minimap:hidden zoom:hidden"` or `{ minimap: 'hidden' }`; reading it gives the object.
|
|
300
|
+
* Other regions are ignored with a warning. Default: all open, the legend collapsed.
|
|
301
|
+
*/
|
|
302
|
+
panels?: Tag<'kgdiff-stage'>['panels'] | string;
|
|
303
|
+
/**
|
|
304
|
+
* Reflected to the `version` attribute: the version this stage draws whatever the root's
|
|
305
|
+
* mode, `before` or `after` (two stages of one root side by side), or null to follow the
|
|
306
|
+
* mode. Another value is ignored with a warning. Each stage has its own camera; the
|
|
307
|
+
* selection, hover, filters and search are the root's, so both bring the same change into
|
|
308
|
+
* view.
|
|
309
|
+
*/
|
|
310
|
+
version?: Tag<'kgdiff-stage'>['version'];
|
|
311
|
+
/**
|
|
312
|
+
* Reflects the `for` attribute, as on `<label>` and `<output>`: the id of the root to show,
|
|
313
|
+
* or '' (no attribute; setting '' removes it) for the nearest one around the element.
|
|
314
|
+
* Changing it binds again.
|
|
315
|
+
*/
|
|
316
|
+
htmlFor?: Tag<'kgdiff-stage'>['htmlFor'];
|
|
317
|
+
};
|
|
318
|
+
/**
|
|
319
|
+
* **Experimental:** In 0.6; stable from 0.7 (RFC 0001, decision 7). `<kgdiff-change-list>`:
|
|
320
|
+
* https://github.com/iiwish/kgdiff/blob/main/docs/viewer-elements.md#kgdiff-change-list
|
|
321
|
+
*/
|
|
322
|
+
'kgdiff-change-list': Props<'kgdiff-change-list'> & {
|
|
323
|
+
/**
|
|
324
|
+
* Reflects the `for` attribute, as on `<label>` and `<output>`: the id of the root to show,
|
|
325
|
+
* or '' (no attribute; setting '' removes it) for the nearest one around the element.
|
|
326
|
+
* Changing it binds again.
|
|
327
|
+
*/
|
|
328
|
+
htmlFor?: Tag<'kgdiff-change-list'>['htmlFor'];
|
|
329
|
+
};
|
|
330
|
+
/**
|
|
331
|
+
* **Experimental:** In 0.6; stable from 0.7 (RFC 0001, decision 7). `<kgdiff-change-detail>`:
|
|
332
|
+
* https://github.com/iiwish/kgdiff/blob/main/docs/viewer-elements.md#kgdiff-change-detail
|
|
333
|
+
*/
|
|
334
|
+
'kgdiff-change-detail': Props<'kgdiff-change-detail'> & {
|
|
335
|
+
/**
|
|
336
|
+
* Reflects the `for` attribute, as on `<label>` and `<output>`: the id of the root to show,
|
|
337
|
+
* or '' (no attribute; setting '' removes it) for the nearest one around the element.
|
|
338
|
+
* Changing it binds again.
|
|
339
|
+
*/
|
|
340
|
+
htmlFor?: Tag<'kgdiff-change-detail'>['htmlFor'];
|
|
341
|
+
};
|
|
342
|
+
/**
|
|
343
|
+
* **Experimental:** In 0.6; stable from 0.7 (RFC 0001, decision 7). `<kgdiff-search>`:
|
|
344
|
+
* https://github.com/iiwish/kgdiff/blob/main/docs/viewer-elements.md#kgdiff-search
|
|
345
|
+
*/
|
|
346
|
+
'kgdiff-search': Props<'kgdiff-search'> & {
|
|
347
|
+
/**
|
|
348
|
+
* Reflects the `for` attribute, as on `<label>` and `<output>`: the id of the root to show,
|
|
349
|
+
* or '' (no attribute; setting '' removes it) for the nearest one around the element.
|
|
350
|
+
* Changing it binds again.
|
|
351
|
+
*/
|
|
352
|
+
htmlFor?: Tag<'kgdiff-search'>['htmlFor'];
|
|
353
|
+
};
|
|
354
|
+
/**
|
|
355
|
+
* **Experimental:** In 0.6; stable from 0.7 (RFC 0001, decision 7). `<kgdiff-filters>`:
|
|
356
|
+
* https://github.com/iiwish/kgdiff/blob/main/docs/viewer-elements.md#kgdiff-filters
|
|
357
|
+
*/
|
|
358
|
+
'kgdiff-filters': Props<'kgdiff-filters'> & {
|
|
359
|
+
/**
|
|
360
|
+
* Reflects the `for` attribute, as on `<label>` and `<output>`: the id of the root to show,
|
|
361
|
+
* or '' (no attribute; setting '' removes it) for the nearest one around the element.
|
|
362
|
+
* Changing it binds again.
|
|
363
|
+
*/
|
|
364
|
+
htmlFor?: Tag<'kgdiff-filters'>['htmlFor'];
|
|
365
|
+
};
|
|
366
|
+
/**
|
|
367
|
+
* **Experimental:** In 0.6; stable from 0.7 (RFC 0001, decision 7). `<kgdiff-view-dock>`:
|
|
368
|
+
* https://github.com/iiwish/kgdiff/blob/main/docs/viewer-elements.md#kgdiff-view-dock
|
|
369
|
+
*/
|
|
370
|
+
'kgdiff-view-dock': Props<'kgdiff-view-dock'> & {
|
|
371
|
+
/**
|
|
372
|
+
* Reflects the `for` attribute, as on `<label>` and `<output>`: the id of the root to show,
|
|
373
|
+
* or '' (no attribute; setting '' removes it) for the nearest one around the element.
|
|
374
|
+
* Changing it binds again.
|
|
375
|
+
*/
|
|
376
|
+
htmlFor?: Tag<'kgdiff-view-dock'>['htmlFor'];
|
|
377
|
+
};
|
|
378
|
+
/**
|
|
379
|
+
* **Experimental:** In 0.6; stable from 0.7 (RFC 0001, decision 7). `<kgdiff-transport>`:
|
|
380
|
+
* https://github.com/iiwish/kgdiff/blob/main/docs/viewer-elements.md#kgdiff-transport
|
|
381
|
+
*/
|
|
382
|
+
'kgdiff-transport': Props<'kgdiff-transport'> & {
|
|
383
|
+
/**
|
|
384
|
+
* Reflects the `for` attribute, as on `<label>` and `<output>`: the id of the root to show,
|
|
385
|
+
* or '' (no attribute; setting '' removes it) for the nearest one around the element.
|
|
386
|
+
* Changing it binds again.
|
|
387
|
+
*/
|
|
388
|
+
htmlFor?: Tag<'kgdiff-transport'>['htmlFor'];
|
|
389
|
+
};
|
|
390
|
+
/**
|
|
391
|
+
* **Experimental:** In 0.6; stable from 0.7 (RFC 0001, decision 7). `<kgdiff-legend>`:
|
|
392
|
+
* https://github.com/iiwish/kgdiff/blob/main/docs/viewer-elements.md#kgdiff-legend
|
|
393
|
+
*/
|
|
394
|
+
'kgdiff-legend': Props<'kgdiff-legend'> & {
|
|
395
|
+
/**
|
|
396
|
+
* Reflected to `variant`: `full` (default) or `mini`; another value reads `full`.
|
|
397
|
+
*/
|
|
398
|
+
variant?: Tag<'kgdiff-legend'>['variant'];
|
|
399
|
+
/**
|
|
400
|
+
* Reflected to the boolean `open`: whether the card is open (the user's toggle too).
|
|
401
|
+
*/
|
|
402
|
+
open?: Tag<'kgdiff-legend'>['open'];
|
|
403
|
+
/**
|
|
404
|
+
* Reflects the `for` attribute, as on `<label>` and `<output>`: the id of the root to show,
|
|
405
|
+
* or '' (no attribute; setting '' removes it) for the nearest one around the element.
|
|
406
|
+
* Changing it binds again.
|
|
407
|
+
*/
|
|
408
|
+
htmlFor?: Tag<'kgdiff-legend'>['htmlFor'];
|
|
409
|
+
};
|
|
410
|
+
/**
|
|
411
|
+
* **Experimental:** In 0.6; stable from 0.7 (RFC 0001, decision 7). `<kgdiff-zoom>`:
|
|
412
|
+
* https://github.com/iiwish/kgdiff/blob/main/docs/viewer-elements.md#kgdiff-zoom
|
|
413
|
+
*/
|
|
414
|
+
'kgdiff-zoom': Props<'kgdiff-zoom'> & {
|
|
415
|
+
/**
|
|
416
|
+
* Reflects the `stage` attribute: the id of the stage to act on, or '' (no attribute;
|
|
417
|
+
* setting '' removes it) for the nearest one around the element. Changing it binds again.
|
|
418
|
+
*/
|
|
419
|
+
stage?: Tag<'kgdiff-zoom'>['stage'];
|
|
420
|
+
};
|
|
421
|
+
/**
|
|
422
|
+
* **Experimental:** In 0.6; stable from 0.7 (RFC 0001, decision 7). `<kgdiff-minimap>`:
|
|
423
|
+
* https://github.com/iiwish/kgdiff/blob/main/docs/viewer-elements.md#kgdiff-minimap
|
|
424
|
+
*/
|
|
425
|
+
'kgdiff-minimap': Props<'kgdiff-minimap'> & {
|
|
426
|
+
/**
|
|
427
|
+
* Reflects the `stage` attribute: the id of the stage to act on, or '' (no attribute;
|
|
428
|
+
* setting '' removes it) for the nearest one around the element. Changing it binds again.
|
|
429
|
+
*/
|
|
430
|
+
stage?: Tag<'kgdiff-minimap'>['stage'];
|
|
431
|
+
};
|
|
432
|
+
/**
|
|
433
|
+
* **Experimental:** In 0.6; stable from 0.7 (RFC 0001, decision 7). `<kgdiff-title>`:
|
|
434
|
+
* https://github.com/iiwish/kgdiff/blob/main/docs/viewer-elements.md#kgdiff-title
|
|
435
|
+
*/
|
|
436
|
+
'kgdiff-title': Props<'kgdiff-title'> & {
|
|
437
|
+
/**
|
|
438
|
+
* Reflects the `for` attribute, as on `<label>` and `<output>`: the id of the root to show,
|
|
439
|
+
* or '' (no attribute; setting '' removes it) for the nearest one around the element.
|
|
440
|
+
* Changing it binds again.
|
|
441
|
+
*/
|
|
442
|
+
htmlFor?: Tag<'kgdiff-title'>['htmlFor'];
|
|
443
|
+
};
|
|
444
|
+
/**
|
|
445
|
+
* **Experimental:** In 0.6; stable from 0.7 (RFC 0001, decision 7). `<kgdiff-actions>`:
|
|
446
|
+
* https://github.com/iiwish/kgdiff/blob/main/docs/viewer-elements.md#kgdiff-actions
|
|
447
|
+
*/
|
|
448
|
+
'kgdiff-actions': Props<'kgdiff-actions'> & {
|
|
449
|
+
/**
|
|
450
|
+
* Reflects the `for` attribute, as on `<label>` and `<output>`: the id of the root to show,
|
|
451
|
+
* or '' (no attribute; setting '' removes it) for the nearest one around the element.
|
|
452
|
+
* Changing it binds again.
|
|
453
|
+
*/
|
|
454
|
+
htmlFor?: Tag<'kgdiff-actions'>['htmlFor'];
|
|
455
|
+
};
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
export {};
|
|
460
|
+
//# sourceMappingURL=react.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../src/react.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,6DAA6D;AAC7D,KAAK,GAAG,CAAC,CAAC,SAAS,MAAM,qBAAqB,IAAI,qBAAqB,CAAC,CAAC,CAAC,CAAC;AAE3E,kFAAkF;AAClF,KAAK,KAAK,CAAC,CAAC,SAAS,MAAM,qBAAqB,IAAI,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;CAAE,CAAC;AAEnG,OAAO,QAAQ,OAAO,CAAC;IACrB,UAAU,GAAG,CAAC;QACZ,UAAU,iBAAiB;YACzB;;;eAGG;YACH,eAAe,EAAE,KAAK,CAAC,eAAe,CAAC,GAAG;gBACxC;;;;;;;;mBAQG;gBACH,MAAM,CAAC,EAAE,GAAG,CAAC,eAAe,CAAC,CAAC,QAAQ,CAAC,CAAC;gBACxC;;;;mBAIG;gBACH,MAAM,CAAC,EAAE,GAAG,CAAC,eAAe,CAAC,CAAC,QAAQ,CAAC,CAAC;gBACxC;;;;;;;;;;;mBAWG;gBACH,MAAM,CAAC,EAAE,GAAG,CAAC,eAAe,CAAC,CAAC,QAAQ,CAAC,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