@rak200/ui 0.2.16 → 0.2.18
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 +3 -2
- package/dist/field.js +2 -2
- package/dist/field.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/menu.d.ts +92 -0
- package/dist/menu.d.ts.map +1 -0
- package/dist/menu.js +597 -0
- package/dist/menu.js.map +1 -0
- package/dist/placement.d.ts +56 -0
- package/dist/placement.d.ts.map +1 -0
- package/dist/placement.js +60 -0
- package/dist/placement.js.map +1 -0
- package/dist/table.d.ts +56 -0
- package/dist/table.d.ts.map +1 -0
- package/dist/table.js +175 -0
- package/dist/table.js.map +1 -0
- package/dist/tokens.d.ts +2 -2
- package/dist/tokens.d.ts.map +1 -1
- package/dist/tokens.js +62 -0
- package/dist/tokens.js.map +1 -1
- package/dist/tooltip.d.ts +7 -3
- package/dist/tooltip.d.ts.map +1 -1
- package/dist/tooltip.js +16 -15
- package/dist/tooltip.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"placement.d.ts","sourceRoot":"","sources":["../src/placement.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,gGAAgG;AAChG,MAAM,MAAM,IAAI,GAAG,aAAa,GAAG,WAAW,CAAC;AAE/C,sEAAsE;AACtE,MAAM,MAAM,KAAK,GAAG,QAAQ,GAAG,cAAc,CAAC;AAE9C,6FAA6F;AAC7F,MAAM,WAAW,GAAG;IAChB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CAC3B;AAED,6EAA6E;AAC7E,MAAM,WAAW,SAAS;IACtB,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC;IACpB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAChC;AAOD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,KAAK,CACjB,MAAM,EAAE,GAAG,EACX,GAAG,EAAE,GAAG,EACR,QAAQ,EAAE;IAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,EAC7D,MAAM,EAAE,IAAI,EACZ,KAAK,EAAE,KAAK,GACb,SAAS,CAuBX"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where an overlay lands, as arithmetic rather than as a rendering.
|
|
3
|
+
*
|
|
4
|
+
* **One answer to one problem, which is what issue #23 asked for.** `<ui-tooltip>` settled
|
|
5
|
+
* how this package places a `popover` — by hand, over the top layer, with CSS anchor
|
|
6
|
+
* positioning measured as present in this engine and deliberately declined; its docblock
|
|
7
|
+
* carries the whole argument. `<ui-menu>` needs the same thing pointing the other way, so
|
|
8
|
+
* the answer moved here rather than being written twice. A component with two placements is
|
|
9
|
+
* a component that is wrong in one of them.
|
|
10
|
+
*
|
|
11
|
+
* **Taken as numbers rather than as elements, and that is the floors talking** — the same
|
|
12
|
+
* reason `reservedGutter` in `src/dialog.ts` is handed two widths instead of a window. A
|
|
13
|
+
* function of four boxes is decided here and checked directly, at the edges that a rendered
|
|
14
|
+
* page can only reach by luck: an anchor with exactly the tip's height above it, a box wider
|
|
15
|
+
* than the viewport, a menu at the last pixel of the screen. The callers keep no branch of
|
|
16
|
+
* their own.
|
|
17
|
+
*
|
|
18
|
+
* Internal — not re-exported from `src/index.ts`, because what a consumer positions is their
|
|
19
|
+
* own element, and this is how two of ours find each other.
|
|
20
|
+
*/
|
|
21
|
+
/** The other one. A placement has two sides and flipping is what the second one is for. */
|
|
22
|
+
function opposite(side) {
|
|
23
|
+
return side === 'block-start' ? 'block-end' : 'block-start';
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Puts `box` beside `anchor` on the side it asked for, on the other side when there is no
|
|
27
|
+
* room, and inside the viewport either way.
|
|
28
|
+
*
|
|
29
|
+
* @param anchor - The element being pointed at, in viewport coordinates.
|
|
30
|
+
* @param box - The overlay, measured **after** it is shown: its height depends on how its
|
|
31
|
+
* text wrapped at this width in this font, which no caller can know and none should guess.
|
|
32
|
+
* @param viewport - The visible area, scrollbar excluded — `document.documentElement`'s
|
|
33
|
+
* client size rather than `window.inner*`, so a reserved scrollbar is not counted as room.
|
|
34
|
+
* @param prefer - Where it goes when it fits. A tip goes above its trigger; a menu hangs
|
|
35
|
+
* below its button.
|
|
36
|
+
* @param align - `center` for something that points at the anchor, `inline-start` for
|
|
37
|
+
* something that hangs from it.
|
|
38
|
+
*/
|
|
39
|
+
export function place(anchor, box, viewport, prefer, align) {
|
|
40
|
+
const room = prefer === 'block-start' ? anchor.top : viewport.height - (anchor.top + anchor.height);
|
|
41
|
+
const side = room >= box.height ? prefer : opposite(prefer);
|
|
42
|
+
// Looked up by name rather than compared against one, and that is a measurement rather
|
|
43
|
+
// than a style: `align === 'center' ? … : anchor.left` sends every OTHER name down the
|
|
44
|
+
// same arm, so the caller that passes `inline-start` could pass anything at all — an
|
|
45
|
+
// empty string included — and this would compute the same number. Keyed by the name,
|
|
46
|
+
// each one reaches its own value and no other name reaches either.
|
|
47
|
+
const lined = {
|
|
48
|
+
center: anchor.left + anchor.width / 2 - box.width / 2,
|
|
49
|
+
'inline-start': anchor.left,
|
|
50
|
+
}[align];
|
|
51
|
+
return {
|
|
52
|
+
side,
|
|
53
|
+
blockStart: side === 'block-start' ? anchor.top - box.height : anchor.top + anchor.height,
|
|
54
|
+
// Lined up first, then pulled back inside — in that order, because a box centred on
|
|
55
|
+
// an anchor near the edge is a box half off the screen. `Math.max` last, so a box
|
|
56
|
+
// wider than the viewport starts at the leading edge rather than at a negative one.
|
|
57
|
+
inlineStart: Math.max(0, Math.min(lined, viewport.width - box.width)),
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=placement.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"placement.js","sourceRoot":"","sources":["../src/placement.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAuBH,2FAA2F;AAC3F,SAAS,QAAQ,CAAC,IAAU;IACxB,OAAO,IAAI,KAAK,aAAa,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,aAAa,CAAC;AAChE,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,KAAK,CACjB,MAAW,EACX,GAAQ,EACR,QAA6D,EAC7D,MAAY,EACZ,KAAY;IAEZ,MAAM,IAAI,GACN,MAAM,KAAK,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,MAAM,CAAC,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;IAC3F,MAAM,IAAI,GAAG,IAAI,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAE5D,uFAAuF;IACvF,uFAAuF;IACvF,qFAAqF;IACrF,qFAAqF;IACrF,mEAAmE;IACnE,MAAM,KAAK,GAAG;QACV,MAAM,EAAE,MAAM,CAAC,IAAI,GAAG,MAAM,CAAC,KAAK,GAAG,CAAC,GAAG,GAAG,CAAC,KAAK,GAAG,CAAC;QACtD,cAAc,EAAE,MAAM,CAAC,IAAI;KAC9B,CAAC,KAAK,CAAC,CAAC;IAET,OAAO;QACH,IAAI;QACJ,UAAU,EAAE,IAAI,KAAK,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,GAAG,MAAM,CAAC,MAAM;QACzF,oFAAoF;QACpF,kFAAkF;QAClF,oFAAoF;QACpF,WAAW,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,QAAQ,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC;KACxE,CAAC;AACN,CAAC"}
|
package/dist/table.d.ts
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { LitElement, type CSSResult, type TemplateResult } from 'lit';
|
|
2
|
+
/**
|
|
3
|
+
* A table, styled rather than rendered.
|
|
4
|
+
*
|
|
5
|
+
* **The `<table>` is yours**, and the whole of it: the rows, the cells, the header and the
|
|
6
|
+
* caption. This element writes no markup from data, which is the same shape `<ui-select>`
|
|
7
|
+
* and `<ui-input>` have and is chosen for a stronger reason here — a table's semantics are
|
|
8
|
+
* the host's subject, and a component that generates them is guessing at which column is a
|
|
9
|
+
* header and what the caption should say.
|
|
10
|
+
*
|
|
11
|
+
* **Explicitly not a data grid.** Sorting, selection, virtualization, editing and
|
|
12
|
+
* pagination are each an accessibility project of its own, and RFC 0016 defers all five.
|
|
13
|
+
* A `sortable` attribute here would reopen that decision, and `docs/table.md` says so
|
|
14
|
+
* where a consumer looks rather than leaving them to discover it in review.
|
|
15
|
+
*
|
|
16
|
+
* **It claims no role**, for the reason `<ui-card>` claims none: the platform already has
|
|
17
|
+
* the element that means *table*, and the host wrote it. What this adds is the surface
|
|
18
|
+
* around it.
|
|
19
|
+
*
|
|
20
|
+
* **The element scrolls, and it is focusable because it scrolls.** A region that overflows
|
|
21
|
+
* and cannot be reached by keyboard is unusable by keyboard, which is WCAG 2.1.1 — so the
|
|
22
|
+
* tab stop is not decoration. It is unconditional rather than measured, and that costs one
|
|
23
|
+
* tab stop on a table that happens to fit; the alternative watches every table's size
|
|
24
|
+
* forever to save it, which is the more expensive mistake.
|
|
25
|
+
*
|
|
26
|
+
* The name is left to the host: a scrollable region wants one, and the caption that would
|
|
27
|
+
* give it is in the host's tree where an IDREF from here cannot resolve. So write
|
|
28
|
+
* `aria-label` on this element, which is in one tree with nothing to miswire.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```html
|
|
32
|
+
* <ui-table aria-label="Invoices">
|
|
33
|
+
* <table>
|
|
34
|
+
* <caption>Every invoice raised this quarter.</caption>
|
|
35
|
+
* <thead>
|
|
36
|
+
* <tr><th scope="col">Number</th><th scope="col">Total</th></tr>
|
|
37
|
+
* </thead>
|
|
38
|
+
* <tbody>
|
|
39
|
+
* <tr><td>0001</td><td>R$ 1.200,00</td></tr>
|
|
40
|
+
* </tbody>
|
|
41
|
+
* </table>
|
|
42
|
+
* </ui-table>
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
export declare class UiTable extends LitElement {
|
|
46
|
+
#private;
|
|
47
|
+
static readonly styles: CSSResult;
|
|
48
|
+
connectedCallback(): void;
|
|
49
|
+
render(): TemplateResult;
|
|
50
|
+
}
|
|
51
|
+
declare global {
|
|
52
|
+
interface HTMLElementTagNameMap {
|
|
53
|
+
'ui-table': UiTable;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../src/table.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,KAAK,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AA6EjF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,qBAAa,OAAQ,SAAQ,UAAU;;IACnC,gBAAyB,MAAM,EAAE,SAAS,CAkBxC;IAEO,iBAAiB,IAAI,IAAI;IAgCzB,MAAM,IAAI,cAAc;CAGpC;AAQD,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,qBAAqB;QAC3B,UAAU,EAAE,OAAO,CAAC;KACvB;CACJ"}
|
package/dist/table.js
ADDED
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import { LitElement, css, html } from 'lit';
|
|
2
|
+
import { reference } from './reference.js';
|
|
3
|
+
/**
|
|
4
|
+
* The rules that cannot live in a shadow root, and the reason they cannot.
|
|
5
|
+
*
|
|
6
|
+
* `::slotted()` matches the **top level** of what a slot was given and nothing below it.
|
|
7
|
+
* `<ui-select>` styles one `::slotted(select)` and needs no more; a table is a tree — the
|
|
8
|
+
* cells, the rows, the header and the caption are all descendants of the slotted element,
|
|
9
|
+
* and no selector written inside a shadow root reaches them. Measured, and it is not a
|
|
10
|
+
* quirk to route around: shadow CSS is scoped to its own tree, and the host's table is in
|
|
11
|
+
* the host's tree.
|
|
12
|
+
*
|
|
13
|
+
* So these rules are adopted into **that** tree instead, and `#adopt()` finds it with
|
|
14
|
+
* `getRootNode()` rather than reaching for `document` — a `<ui-table>` inside another
|
|
15
|
+
* component's shadow root has to be styled in that shadow root, and hardcoding the
|
|
16
|
+
* document would leave it bare exactly there.
|
|
17
|
+
*
|
|
18
|
+
* Every selector is prefixed with the element, so what is adopted cannot reach a table
|
|
19
|
+
* the host wrote somewhere else.
|
|
20
|
+
*/
|
|
21
|
+
const rules = css `
|
|
22
|
+
ui-table table {
|
|
23
|
+
/* The box the cells' own borders are drawn against: separate borders would double
|
|
24
|
+
every internal rule and leave a gap at each junction. */
|
|
25
|
+
border-collapse: collapse;
|
|
26
|
+
inline-size: 100%;
|
|
27
|
+
font-family: ${reference('--ui-font')};
|
|
28
|
+
/* The pair, never half of it — the argument src/card.ts makes beside its own. */
|
|
29
|
+
color: ${reference('--ui-color-text')};
|
|
30
|
+
background: ${reference('--ui-color-surface')};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
ui-table th,
|
|
34
|
+
ui-table td {
|
|
35
|
+
padding: ${reference('--ui-space')};
|
|
36
|
+
/* start rather than left, so a right-to-left page needs no second rule — and
|
|
37
|
+
declared at all because the platform centres a th and only a th, which makes a
|
|
38
|
+
header sit off the column it heads. A host aligning a numeric column writes
|
|
39
|
+
text-align on their own cells; it inherits, so nothing here has to offer it. */
|
|
40
|
+
text-align: start;
|
|
41
|
+
vertical-align: top;
|
|
42
|
+
border-block-end: 1px solid ${reference('--ui-color-border')};
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/* The header rests on the second surface tone rather than on a heavier rule, so a
|
|
46
|
+
table with one row still reads as having a header. font-weight is the platform's
|
|
47
|
+
own on a th and is deliberately not restated. */
|
|
48
|
+
ui-table thead th {
|
|
49
|
+
background: ${reference('--ui-color-surface-muted')};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/* Zebra rows, on the same tone. nth-child rather than nth-of-type: a tbody holds tr
|
|
53
|
+
and nothing else, so the two agree, and the first is what a reader expects to find.
|
|
54
|
+
|
|
55
|
+
Scoped to tbody on purpose — a striped thead or tfoot would be counting rows the
|
|
56
|
+
reader is not scanning. */
|
|
57
|
+
ui-table tbody tr:nth-child(even) {
|
|
58
|
+
background: ${reference('--ui-color-surface-muted')};
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/* Below the table rather than above it, which is the platform's default reversed on
|
|
62
|
+
purpose: a caption that explains a table reads after it, and one that titles it is a
|
|
63
|
+
heading the host writes outside this element. */
|
|
64
|
+
ui-table caption {
|
|
65
|
+
caption-side: bottom;
|
|
66
|
+
text-align: start;
|
|
67
|
+
padding-block: ${reference('--ui-space')};
|
|
68
|
+
color: ${reference('--ui-color-text-muted')};
|
|
69
|
+
font-size: ${reference('--ui-text-supporting')};
|
|
70
|
+
}
|
|
71
|
+
`;
|
|
72
|
+
/** One sheet for the whole page, adopted per tree — see {@link rules}. */
|
|
73
|
+
const sheet = new CSSStyleSheet();
|
|
74
|
+
sheet.replaceSync(rules.cssText);
|
|
75
|
+
/**
|
|
76
|
+
* A table, styled rather than rendered.
|
|
77
|
+
*
|
|
78
|
+
* **The `<table>` is yours**, and the whole of it: the rows, the cells, the header and the
|
|
79
|
+
* caption. This element writes no markup from data, which is the same shape `<ui-select>`
|
|
80
|
+
* and `<ui-input>` have and is chosen for a stronger reason here — a table's semantics are
|
|
81
|
+
* the host's subject, and a component that generates them is guessing at which column is a
|
|
82
|
+
* header and what the caption should say.
|
|
83
|
+
*
|
|
84
|
+
* **Explicitly not a data grid.** Sorting, selection, virtualization, editing and
|
|
85
|
+
* pagination are each an accessibility project of its own, and RFC 0016 defers all five.
|
|
86
|
+
* A `sortable` attribute here would reopen that decision, and `docs/table.md` says so
|
|
87
|
+
* where a consumer looks rather than leaving them to discover it in review.
|
|
88
|
+
*
|
|
89
|
+
* **It claims no role**, for the reason `<ui-card>` claims none: the platform already has
|
|
90
|
+
* the element that means *table*, and the host wrote it. What this adds is the surface
|
|
91
|
+
* around it.
|
|
92
|
+
*
|
|
93
|
+
* **The element scrolls, and it is focusable because it scrolls.** A region that overflows
|
|
94
|
+
* and cannot be reached by keyboard is unusable by keyboard, which is WCAG 2.1.1 — so the
|
|
95
|
+
* tab stop is not decoration. It is unconditional rather than measured, and that costs one
|
|
96
|
+
* tab stop on a table that happens to fit; the alternative watches every table's size
|
|
97
|
+
* forever to save it, which is the more expensive mistake.
|
|
98
|
+
*
|
|
99
|
+
* The name is left to the host: a scrollable region wants one, and the caption that would
|
|
100
|
+
* give it is in the host's tree where an IDREF from here cannot resolve. So write
|
|
101
|
+
* `aria-label` on this element, which is in one tree with nothing to miswire.
|
|
102
|
+
*
|
|
103
|
+
* @example
|
|
104
|
+
* ```html
|
|
105
|
+
* <ui-table aria-label="Invoices">
|
|
106
|
+
* <table>
|
|
107
|
+
* <caption>Every invoice raised this quarter.</caption>
|
|
108
|
+
* <thead>
|
|
109
|
+
* <tr><th scope="col">Number</th><th scope="col">Total</th></tr>
|
|
110
|
+
* </thead>
|
|
111
|
+
* <tbody>
|
|
112
|
+
* <tr><td>0001</td><td>R$ 1.200,00</td></tr>
|
|
113
|
+
* </tbody>
|
|
114
|
+
* </table>
|
|
115
|
+
* </ui-table>
|
|
116
|
+
* ```
|
|
117
|
+
*/
|
|
118
|
+
export class UiTable extends LitElement {
|
|
119
|
+
static { this.styles = css `
|
|
120
|
+
:host {
|
|
121
|
+
display: block;
|
|
122
|
+
/* The scroll lives on the element itself rather than on a wrapper in the
|
|
123
|
+
shadow root, and that is what lets the host name it: aria-label on a box in
|
|
124
|
+
here would be a name written by this package, and the element is the one
|
|
125
|
+
node a consumer already has their hands on. */
|
|
126
|
+
overflow-x: auto;
|
|
127
|
+
border: 1px solid ${reference('--ui-color-border')};
|
|
128
|
+
border-radius: ${reference('--ui-radius')};
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/* A visible focus ring is not decoration: removing it is the single most common
|
|
132
|
+
way a component stops being usable by keyboard. */
|
|
133
|
+
:host(:focus-visible) {
|
|
134
|
+
outline: 2px solid ${reference('--ui-color-focus')};
|
|
135
|
+
outline-offset: 2px;
|
|
136
|
+
}
|
|
137
|
+
`; }
|
|
138
|
+
connectedCallback() {
|
|
139
|
+
super.connectedCallback();
|
|
140
|
+
this.#adopt();
|
|
141
|
+
// Not `setAttribute` unless it is absent: a host who wrote their own tabindex —
|
|
142
|
+
// taking the element out of the tab order deliberately, or putting it somewhere
|
|
143
|
+
// specific in it — has made a decision, and this would overwrite it on every
|
|
144
|
+
// reconnection a framework performs.
|
|
145
|
+
if (!this.hasAttribute('tabindex')) {
|
|
146
|
+
this.setAttribute('tabindex', '0');
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Puts {@link rules} in the tree this element is in.
|
|
151
|
+
*
|
|
152
|
+
* Run from `connectedCallback` rather than once at import, because the tree is not
|
|
153
|
+
* known until there is an element in one — and a second element in the same tree finds
|
|
154
|
+
* the sheet already there.
|
|
155
|
+
*/
|
|
156
|
+
#adopt() {
|
|
157
|
+
// `connectedCallback` runs when the element is connected to a document, so the
|
|
158
|
+
// root is a `Document` or a `ShadowRoot` and never a bare fragment. Both carry
|
|
159
|
+
// `adoptedStyleSheets`; asserted rather than narrowed, because the branch a guard
|
|
160
|
+
// would add is one no connected element can take.
|
|
161
|
+
const root = this.getRootNode();
|
|
162
|
+
if (!root.adoptedStyleSheets.includes(sheet)) {
|
|
163
|
+
root.adoptedStyleSheets = [...root.adoptedStyleSheets, sheet];
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
render() {
|
|
167
|
+
return html `<slot></slot>`;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
// Stryker disable next-line StringLiteral: the registration runs once, at import, inside
|
|
171
|
+
// the warm process Stryker switches mutants in — so by the time a mutant on this line is
|
|
172
|
+
// active the element is already defined under the original name, and no test can observe
|
|
173
|
+
// the change. Outside the runner's reach, not an equivalent mutant.
|
|
174
|
+
customElements.define('ui-table', UiTable);
|
|
175
|
+
//# sourceMappingURL=table.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table.js","sourceRoot":"","sources":["../src/table.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,EAAuC,MAAM,KAAK,CAAC;AACjF,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,KAAK,GAAc,GAAG,CAAA;;;;;;uBAML,SAAS,CAAC,WAAW,CAAC;;iBAE5B,SAAS,CAAC,iBAAiB,CAAC;sBACvB,SAAS,CAAC,oBAAoB,CAAC;;;;;mBAKlC,SAAS,CAAC,YAAY,CAAC;;;;;;;sCAOJ,SAAS,CAAC,mBAAmB,CAAC;;;;;;;sBAO9C,SAAS,CAAC,0BAA0B,CAAC;;;;;;;;;sBASrC,SAAS,CAAC,0BAA0B,CAAC;;;;;;;;;yBASlC,SAAS,CAAC,YAAY,CAAC;iBAC/B,SAAS,CAAC,uBAAuB,CAAC;qBAC9B,SAAS,CAAC,sBAAsB,CAAC;;CAErD,CAAC;A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@@ -31,7 +31,7 @@
|
|
|
31
31
|
* it does break is code that **enumerates** the set, an exhaustive `Record<Token, string>`
|
|
32
32
|
* above all. The supported shape is the partial map, which is what a theme is anyway.
|
|
33
33
|
*/
|
|
34
|
-
export declare const tokens: readonly ["--ui-color-accent", "--ui-color-accent-contrast", "--ui-color-surface", "--ui-color-text", "--ui-color-focus", "--ui-color-danger", "--ui-color-success", "--ui-color-warning", "--ui-color-scrim", "--ui-radius", "--ui-space", "--ui-font", "--ui-duration-100", "--ui-easing-state", "--ui-easing-enter", "--ui-easing-exit", "--ui-icon-size", "--ui-icon-stroke", "--ui-elevation-100"];
|
|
34
|
+
export declare const tokens: readonly ["--ui-color-accent", "--ui-color-accent-contrast", "--ui-color-surface", "--ui-color-text", "--ui-color-focus", "--ui-color-danger", "--ui-color-success", "--ui-color-warning", "--ui-color-scrim", "--ui-radius", "--ui-space", "--ui-font", "--ui-duration-100", "--ui-easing-state", "--ui-easing-enter", "--ui-easing-exit", "--ui-icon-size", "--ui-icon-stroke", "--ui-elevation-100", "--ui-text-100"];
|
|
35
35
|
/** A CSS custom property this package defines and gives a default. */
|
|
36
36
|
export type Token = (typeof tokens)[number];
|
|
37
37
|
/**
|
|
@@ -44,7 +44,7 @@ export type Token = (typeof tokens)[number];
|
|
|
44
44
|
* what it buys is an override surface a host can hold in their head: change the accent and
|
|
45
45
|
* the hover and pressed colours follow, rather than being one more name each.
|
|
46
46
|
*/
|
|
47
|
-
export declare const derivedTokens: readonly ["--ui-duration-state", "--ui-color-border", "--ui-color-text-muted", "--ui-color-hover", "--ui-color-pressed", "--ui-color-accent-hover", "--ui-color-accent-pressed", "--ui-elevation-raised"];
|
|
47
|
+
export declare const derivedTokens: readonly ["--ui-duration-state", "--ui-color-border", "--ui-color-text-muted", "--ui-color-hover", "--ui-color-pressed", "--ui-color-accent-hover", "--ui-color-accent-pressed", "--ui-elevation-raised", "--ui-text-supporting", "--ui-color-surface-muted"];
|
|
48
48
|
/** A CSS custom property this package computes rather than declares. */
|
|
49
49
|
export type DerivedToken = (typeof derivedTokens)[number];
|
|
50
50
|
/**
|
package/dist/tokens.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../src/tokens.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../src/tokens.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,MAAM,0ZA6GT,CAAC;AAEX,sEAAsE;AACtE,MAAM,MAAM,KAAK,GAAG,CAAC,OAAO,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;AAE5C;;;;;;;;;GASG;AACH,eAAO,MAAM,aAAa,+PA4ChB,CAAC;AAEX,wEAAwE;AACxE,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1D;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,CAiEpD,CAAC;AAqBF;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,CAqC3D,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,UAAU,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAgB/D,CAAC;AAKF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,eAAe,IAAI,MAAM,CAsBxC"}
|
package/dist/tokens.js
CHANGED
|
@@ -117,6 +117,29 @@ export const tokens = [
|
|
|
117
117
|
// and therefore already scheme-correct — which is why `src/card.ts` draws both and
|
|
118
118
|
// says so beside them.
|
|
119
119
|
'--ui-elevation-100',
|
|
120
|
+
// The type scale, arriving with `ui-table` — the category `ROADMAP.md` said would, and
|
|
121
|
+
// the last one the v0 surface expects. It arrives to fix a defect rather than to
|
|
122
|
+
// anticipate one: `src/field.ts` wrote `font-size: 0.875em` twice and `src/tooltip.ts`
|
|
123
|
+
// a third time, all three agreeing and nothing comparing them — the shape
|
|
124
|
+
// `src/reference.ts` records finding in thirteen hand-copied fallbacks, and the thing
|
|
125
|
+
// `ARCHITECTURE.md` forbids in writing, since a hardcoded value is a decision a host
|
|
126
|
+
// cannot override.
|
|
127
|
+
//
|
|
128
|
+
// A step in a scale, ordinal with gaps, for the reason the duration and elevation
|
|
129
|
+
// scales give above: a size is *relative* by nature, so the names have to be able to
|
|
130
|
+
// grow between each other. It follows the scale-and-purpose shape rather than easing's
|
|
131
|
+
// purpose-is-the-ground shape, and that split is item 9's: a curve is qualitative, a
|
|
132
|
+
// size is not. No component reads this one; they read `--ui-text-supporting`.
|
|
133
|
+
//
|
|
134
|
+
// The unit is `em` rather than `rem`, for the reason `--ui-icon-size` is: the role is
|
|
135
|
+
// text set *beside* other text, so it should be a fraction of whatever that text is
|
|
136
|
+
// rather than a fraction of the root. A host who wants a fixed size sets one.
|
|
137
|
+
//
|
|
138
|
+
// **The ordinal ascends with the size**, so `100` is the smallest step this package has
|
|
139
|
+
// needed and a body or heading step later is `200` or `300`. Neither is invented here:
|
|
140
|
+
// every component sets `font: inherit` and takes the page's own size, which is the
|
|
141
|
+
// right default and not a step at all.
|
|
142
|
+
'--ui-text-100',
|
|
120
143
|
];
|
|
121
144
|
/**
|
|
122
145
|
* The roles computed from the grounds rather than declared beside them.
|
|
@@ -152,6 +175,26 @@ export const derivedTokens = [
|
|
|
152
175
|
// and will not be the last, and the name a host retunes should not be the name of
|
|
153
176
|
// whichever component happened to need it first.
|
|
154
177
|
'--ui-elevation-raised',
|
|
178
|
+
// The purpose the type scale is read through, and the only name a component writes.
|
|
179
|
+
// `supporting` is a role rather than a size and rather than a component: the four
|
|
180
|
+
// places that want it are a field's help text, a field's error, a tooltip's tip and a
|
|
181
|
+
// table's caption, and what unites them is that each explains the thing beside it. A
|
|
182
|
+
// `--ui-text-small` here would be `--ui-color-blue-600` for type, which item 9 rejects
|
|
183
|
+
// in as many words.
|
|
184
|
+
'--ui-text-supporting',
|
|
185
|
+
// A second surface tone: the same plane, tinted only enough to group. A table stripes
|
|
186
|
+
// its rows with it and rests its header on it.
|
|
187
|
+
//
|
|
188
|
+
// **Not `--ui-color-hover`, which is the same kind of value at a different strength.**
|
|
189
|
+
// A token name says what it answers to, and a zebra row answers to nothing — reading
|
|
190
|
+
// the hover colour for it is the reverse engineering item 9 names as the cost of value
|
|
191
|
+
// names. It also sits deliberately *below* that value, so an interactive layer drawn
|
|
192
|
+
// over a striped row is still a change rather than a coincidence.
|
|
193
|
+
//
|
|
194
|
+
// The pairing with `--ui-color-text-muted` is the point of the name: this package
|
|
195
|
+
// already says `muted` for *the same role, one step back*, and a second vocabulary for
|
|
196
|
+
// the surface half would be one more thing for a host to learn.
|
|
197
|
+
'--ui-color-surface-muted',
|
|
155
198
|
];
|
|
156
199
|
/**
|
|
157
200
|
* The default value of every ground token, applied at `:root` by {@link tokenStyleSheet}.
|
|
@@ -218,6 +261,12 @@ export const defaults = {
|
|
|
218
261
|
// falls on rather than tinting it — a coloured shadow is a decision this layer would
|
|
219
262
|
// have to defend at every hue a host might set.
|
|
220
263
|
'--ui-elevation-100': '0 1px 2px -1px rgb(0 0 0 / 0.1), 0 2px 6px -1px rgb(0 0 0 / 0.1)',
|
|
264
|
+
// The value the three hardcoded sites already carried, adopted rather than re-chosen:
|
|
265
|
+
// this token exists to make an existing decision overridable, and changing it in the
|
|
266
|
+
// same breath would hide whether the extraction was faithful. 87.5% is 14px against a
|
|
267
|
+
// 16px page, which is the smallest size in wide use that is still ordinary body text
|
|
268
|
+
// rather than fine print.
|
|
269
|
+
'--ui-text-100': '0.875em',
|
|
221
270
|
};
|
|
222
271
|
/**
|
|
223
272
|
* A ground as it is written inside a formula: the name, with its own default behind it.
|
|
@@ -286,6 +335,19 @@ export const formulas = {
|
|
|
286
335
|
// lives, and a host who wants flatter cards moves the role rather than reverse
|
|
287
336
|
// engineering which step a card happens to read.
|
|
288
337
|
'--ui-elevation-raised': ground('--ui-elevation-100'),
|
|
338
|
+
// A plain reference, like the two purposes above: the scale is where the value lives,
|
|
339
|
+
// and a host who wants larger supporting text moves the role rather than working out
|
|
340
|
+
// which step a tooltip happens to read.
|
|
341
|
+
'--ui-text-supporting': ground('--ui-text-100'),
|
|
342
|
+
// 5% rather than the hover colour's 8%, and the gap is the whole design: a stripe has
|
|
343
|
+
// to be visible without reading as a different surface, and it has to leave room above
|
|
344
|
+
// itself for a state that is not a stripe. Mixing toward the text is what makes one
|
|
345
|
+
// formula right in both schemes, for the reason the neutrals above give — the tint
|
|
346
|
+
// darkens a light page and lightens a dark one without either being named.
|
|
347
|
+
//
|
|
348
|
+
// `tests/tokens.test.ts` holds the floor that matters here: text on a striped row is
|
|
349
|
+
// still text, so 4.5:1 is owed against this surface and not only against the plain one.
|
|
350
|
+
'--ui-color-surface-muted': mix('--ui-color-text', 5, '--ui-color-surface'),
|
|
289
351
|
};
|
|
290
352
|
/**
|
|
291
353
|
* The grounds whose value differs when the page is rendered dark.
|
package/dist/tokens.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.js","sourceRoot":"","sources":["../src/tokens.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG;IAClB,mBAAmB;IACnB,4BAA4B;IAC5B,oBAAoB;IACpB,iBAAiB;IACjB,kBAAkB;IAClB,mBAAmB;IACnB,qFAAqF;IACrF,uFAAuF;IACvF,mFAAmF;IACnF,cAAc;IACd,EAAE;IACF,oFAAoF;IACpF,+EAA+E;IAC/E,6EAA6E;IAC7E,oBAAoB;IACpB,oBAAoB;IACpB,oFAAoF;IACpF,mFAAmF;IACnF,kFAAkF;IAClF,iFAAiF;IACjF,oFAAoF;IACpF,wEAAwE;IACxE,EAAE;IACF,iFAAiF;IACjF,oFAAoF;IACpF,iFAAiF;IACjF,qFAAqF;IACrF,+EAA+E;IAC/E,kBAAkB;IAClB,aAAa;IACb,YAAY;IACZ,WAAW;IACX,kFAAkF;IAClF,sFAAsF;IACtF,+CAA+C;IAC/C,EAAE;IACF,uFAAuF;IACvF,sFAAsF;IACtF,uFAAuF;IACvF,oFAAoF;IACpF,4CAA4C;IAC5C,mBAAmB;IACnB,mBAAmB;IACnB,qFAAqF;IACrF,oFAAoF;IACpF,sFAAsF;IACtF,qDAAqD;IACrD,EAAE;IACF,uFAAuF;IACvF,uFAAuF;IACvF,mFAAmF;IACnF,kFAAkF;IAClF,mBAAmB;IACnB,kBAAkB;IAClB,oFAAoF;IACpF,mFAAmF;IACnF,mFAAmF;IACnF,2BAA2B;IAC3B,EAAE;IACF,mFAAmF;IACnF,kFAAkF;IAClF,6EAA6E;IAC7E,EAAE;IACF,8EAA8E;IAC9E,sFAAsF;IACtF,yDAAyD;IACzD,gBAAgB;IAChB,kBAAkB;IAClB,uFAAuF;IACvF,0CAA0C;IAC1C,EAAE;IACF,sFAAsF;IACtF,sFAAsF;IACtF,+EAA+E;IAC/E,qFAAqF;IACrF,mFAAmF;IACnF,qCAAqC;IACrC,EAAE;IACF,4EAA4E;IAC5E,qFAAqF;IACrF,sFAAsF;IACtF,sFAAsF;IACtF,mFAAmF;IACnF,uBAAuB;IACvB,oBAAoB;
|
|
1
|
+
{"version":3,"file":"tokens.js","sourceRoot":"","sources":["../src/tokens.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG;IAClB,mBAA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AAC,IAAI,CAAC,MAAM,CAAC,CAAC;AACnB,CAAC"}
|
package/dist/tooltip.d.ts
CHANGED
|
@@ -42,9 +42,13 @@ import { LitElement, type TemplateResult } from 'lit';
|
|
|
42
42
|
* a real element needs — and it would be this package's second runtime dependency, where
|
|
43
43
|
* RFC 0016's adoption was a *behaviour* library and not a layout one.
|
|
44
44
|
*
|
|
45
|
-
* So the placement is thirty lines
|
|
46
|
-
* real browser. When anchor positioning is available broadly it replaces them and
|
|
47
|
-
* tests stay: they assert where the tip lands, not who put it there.
|
|
45
|
+
* So the placement is thirty lines of arithmetic, measured at the edges by a suite that
|
|
46
|
+
* runs in a real browser. When anchor positioning is available broadly it replaces them and
|
|
47
|
+
* the tests stay: they assert where the tip lands, not who put it there.
|
|
48
|
+
*
|
|
49
|
+
* **The arithmetic itself is one module over**, in `src/placement.ts`. It was written here
|
|
50
|
+
* first and moved when `<ui-menu>` needed the same thing pointing the other way — which is
|
|
51
|
+
* what issue #23 asked for in as many words: two answers to one problem is one too many.
|
|
48
52
|
*
|
|
49
53
|
* @example
|
|
50
54
|
* ```html
|
package/dist/tooltip.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../src/tooltip.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../src/tooltip.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAUjE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0DG;AACH,qBAAa,SAAU,SAAQ,UAAU;;IACrC,gBAAyB,MAAM,0BAkD7B;IAiDO,iBAAiB,IAAI,IAAI;IAqBzB,oBAAoB,IAAI,IAAI;IAU5B,MAAM,IAAI,cAAc;CA+JpC;AAQD,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,qBAAqB;QAC3B,YAAY,EAAE,SAAS,CAAC;KAC3B;CACJ"}
|
package/dist/tooltip.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { LitElement, css, html } from 'lit';
|
|
2
|
+
import { place } from './placement.js';
|
|
2
3
|
import { reference } from './reference.js';
|
|
3
4
|
/** Distinguishes one tooltip's generated id from another's. */
|
|
4
5
|
let sequence = 0;
|
|
@@ -47,9 +48,13 @@ const side = 'data-side';
|
|
|
47
48
|
* a real element needs — and it would be this package's second runtime dependency, where
|
|
48
49
|
* RFC 0016's adoption was a *behaviour* library and not a layout one.
|
|
49
50
|
*
|
|
50
|
-
* So the placement is thirty lines
|
|
51
|
-
* real browser. When anchor positioning is available broadly it replaces them and
|
|
52
|
-
* tests stay: they assert where the tip lands, not who put it there.
|
|
51
|
+
* So the placement is thirty lines of arithmetic, measured at the edges by a suite that
|
|
52
|
+
* runs in a real browser. When anchor positioning is available broadly it replaces them and
|
|
53
|
+
* the tests stay: they assert where the tip lands, not who put it there.
|
|
54
|
+
*
|
|
55
|
+
* **The arithmetic itself is one module over**, in `src/placement.ts`. It was written here
|
|
56
|
+
* first and moved when `<ui-menu>` needed the same thing pointing the other way — which is
|
|
57
|
+
* what issue #23 asked for in as many words: two answers to one problem is one too many.
|
|
53
58
|
*
|
|
54
59
|
* @example
|
|
55
60
|
* ```html
|
|
@@ -83,7 +88,7 @@ export class UiTooltip extends LitElement {
|
|
|
83
88
|
max-inline-size: calc(${reference('--ui-space')} * 40);
|
|
84
89
|
padding: calc(${reference('--ui-space')} / 2) ${reference('--ui-space')};
|
|
85
90
|
font-family: ${reference('--ui-font')};
|
|
86
|
-
font-size:
|
|
91
|
+
font-size: ${reference('--ui-text-supporting')};
|
|
87
92
|
/* The pair, never half of it: a surface without the colour chosen against it
|
|
88
93
|
inherits whatever the page set, and the contrast measured for that pair
|
|
89
94
|
stops holding. */
|
|
@@ -289,7 +294,8 @@ export class UiTooltip extends LitElement {
|
|
|
289
294
|
*
|
|
290
295
|
* Read rather than assumed: the tip's own box is measured after it is shown, because
|
|
291
296
|
* its height depends on how its text wrapped at this width in this font — a number
|
|
292
|
-
* this file cannot know and must not guess.
|
|
297
|
+
* this file cannot know and must not guess. What it does with the two boxes is
|
|
298
|
+
* `src/placement.ts`, which `<ui-menu>` reads as well.
|
|
293
299
|
*/
|
|
294
300
|
#place() {
|
|
295
301
|
const trigger = this.#trigger();
|
|
@@ -297,16 +303,11 @@ export class UiTooltip extends LitElement {
|
|
|
297
303
|
if (trigger === undefined || tip === undefined) {
|
|
298
304
|
return;
|
|
299
305
|
}
|
|
300
|
-
const
|
|
301
|
-
const
|
|
302
|
-
|
|
303
|
-
tip.
|
|
304
|
-
tip.style.
|
|
305
|
-
// Centred on the trigger, then pulled back inside the viewport — in that order,
|
|
306
|
-
// because a tip centred on a trigger near the edge is a tip half off the screen.
|
|
307
|
-
// `Math.max` last so a tip wider than the viewport starts at the leading edge
|
|
308
|
-
// rather than at a negative one.
|
|
309
|
-
tip.style.insetInlineStart = `${String(Math.max(0, Math.min(anchor.left + anchor.width / 2 - box.width / 2, document.documentElement.clientWidth - box.width)))}px`;
|
|
306
|
+
const root = document.documentElement;
|
|
307
|
+
const placement = place(trigger.getBoundingClientRect(), tip.getBoundingClientRect(), { width: root.clientWidth, height: root.clientHeight }, 'block-start', 'center');
|
|
308
|
+
tip.setAttribute(side, placement.side);
|
|
309
|
+
tip.style.insetBlockStart = `${String(placement.blockStart)}px`;
|
|
310
|
+
tip.style.insetInlineStart = `${String(placement.inlineStart)}px`;
|
|
310
311
|
}
|
|
311
312
|
}
|
|
312
313
|
// Stryker disable next-line StringLiteral: the registration runs once, at import, inside
|
package/dist/tooltip.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.js","sourceRoot":"","sources":["../src/tooltip.ts"],"names":[],"mappings":"AAAA,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